diff --git a/src/pages/04_flow-managment/MainPage.vue b/src/pages/04_flow-managment/MainPage.vue index ba335b77..1285a99c 100644 --- a/src/pages/04_flow-managment/MainPage.vue +++ b/src/pages/04_flow-managment/MainPage.vue @@ -283,8 +283,8 @@ async function fetchWorkflowList(mobileFetch?: boolean) { : statusFilter.value === 'statusACTIVE' ? 'ACTIVE' : 'INACTIVE', - startDate: pageState.searchDate[0] || undefined, - endDate: pageState.searchDate[1] || undefined, + startDate: pageState.searchDate[0], + endDate: pageState.searchDate[1], }); if (res) { workflowData.value = @@ -533,12 +533,12 @@ watch( class="col surface-2 flex items-center justify-center" > ({ type: {}, }); const statusFilter = ref<'all' | 'statusACTIVE' | 'statusINACTIVE'>('all'); -const refFilter = ref>(); const fieldSelected = ref<('order' | 'name' | 'type')[]>([ 'order', 'name', @@ -118,6 +118,7 @@ const pageState = reactive({ addModal: false, viewDrawer: false, isDrawerEdit: true, + searchDate: [], }); async function fetchPropertyList(mobileFetch?: boolean) { @@ -134,6 +135,8 @@ async function fetchPropertyList(mobileFetch?: boolean) { : statusFilter.value === 'statusACTIVE' ? 'ACTIVE' : 'INACTIVE', + startDate: pageState.searchDate[0], + endDate: pageState.searchDate[1], }); if (res) { propertyData.value = @@ -317,11 +320,14 @@ watch( fetchPropertyList(); }, ); -watch([() => pageState.inputSearch, propertyPageSize], () => { - propertyData.value = []; - propertyPage.value = 1; - fetchPropertyList(); -}); +watch( + [() => pageState.inputSearch, propertyPageSize, () => pageState.searchDate], + () => { + propertyData.value = []; + propertyPage.value = 1; + fetchPropertyList(); + }, +); pageState.inputSearch, propertyPageSize], () => { - - - - + + + + {{ $t('general.status') }} + + - + pageState.inputSearch, propertyPageSize], () => { class="col surface-2 flex items-center justify-center" > { query?: string; status?: Status; activeOnly?: boolean; + startDate?: string; + endDate?: string; }) { const res = await api.get>('/property', { params,