Refactor filterData function parameters
This commit is contained in:
@ -55,16 +55,10 @@
|
||||
import Filters from '@/components/Form/Filters.vue'
|
||||
import Type1 from '@/components/Form/FiltersType/Type1.vue'
|
||||
import { computed, onMounted, ref, watch } from 'vue'
|
||||
import { useFiltersStore } from '@/stores/filters'
|
||||
import { DxDataGrid } from 'devextreme-vue'
|
||||
import { DxColumn, DxExport, DxLoadPanel, DxPager, DxPaging, DxScrolling, DxSearchPanel, DxSelection } from 'devextreme-vue/data-grid'
|
||||
import gql from 'graphql-tag';
|
||||
import { useQuery } from '@vue/apollo-composable';
|
||||
import { useDateStore } from '@/stores/date';
|
||||
import { useSearchStore } from '@/stores/filtersAction';
|
||||
import { usePostsStore } from '@/stores/posts';
|
||||
import { useRegionStore } from '@/stores/region';
|
||||
import { useUp3Store } from '@/stores/up3';
|
||||
const position = { of: '#data' };
|
||||
const showIndicator = ref(true);
|
||||
const shading = ref(true);
|
||||
@ -108,9 +102,9 @@ const { onResult, onError, loading, refetch } = useQuery(GET_SELESAI_TANPA_ID_PE
|
||||
idUid: 0,
|
||||
idUp3: 0,
|
||||
})
|
||||
const filterData = (data: any) => {
|
||||
const { posko, uid, up3 } = data;
|
||||
const dateValue = data.periode.split(' s/d ')
|
||||
const filterData = (params: any) => {
|
||||
const { posko, uid, up3 } = params;
|
||||
const dateValue = params.periode.split(' s/d ')
|
||||
refetch({
|
||||
dateFrom: dateValue[0] ? dateValue[0].split('-').reverse().join('-') : new Date().toISOString().slice(0, 10),
|
||||
dateTo: dateValue[1] ? dateValue[1].split('-').reverse().join('-') : new Date().toISOString().slice(0, 10),
|
||||
|
Reference in New Issue
Block a user