feat: enhance AdvanceSearch component to support date range selection and workflow template advance search

This commit is contained in:
puriphatt 2025-04-17 16:15:08 +07:00
parent d95d72806d
commit d7e53b764c
3 changed files with 52 additions and 25 deletions

View file

@ -9,7 +9,7 @@ defineProps<{
active?: boolean;
}>();
const date = defineModel<Date[]>();
const date = defineModel<string[]>();
const dateRange = ref<string>('');
const isDateSelect = ref(false);
@ -64,13 +64,14 @@ function mapDateRange(val: string) {
end = today.endOf('day');
break;
case 'customDateRange':
// Do nothing or allow manual date picking
return;
start = today.startOf('day');
end = today.endOf('day');
break;
default:
return;
}
return [start.toDate(), end.toDate()];
return [start.toDate().toISOString(), end.toDate().toISOString()];
}
watch(