Refactor code and fix loading issue

This commit is contained in:
Dede Fuji Abdul
2024-03-18 11:48:59 +07:00
parent 97d50a13a3
commit 2ac6c703cc
6 changed files with 670 additions and 258 deletions

View File

@@ -1022,7 +1022,11 @@ import { dummyData } from '@/utils/dummy'
import { formatNumber, formatPercentage, isNumber } from '@/utils/numbers'
import DetailDialog from '@/components/Dialogs/DetailDialog.vue'
import InputText from '@/components/InputText.vue'
import { apolloClient } from '@/utils/api/api.graphql'
import { provideApolloClient } from '@vue/apollo-composable'
const client = apolloClient()
provideApolloClient(client)
const position = { of: '#data' }
const showIndicator = ref(true)
const shading = ref(true)
@@ -1036,13 +1040,6 @@ const closeDialogDataSelected = () => (dialogDataSelected.value = false)
const loadingData = ref(false)
const loadingSubData = ref(false)
import { apolloClient } from '@/utils/api/api.graphql'
import { provideApolloClient } from '@vue/apollo-composable'
const client = apolloClient()
provideApolloClient(client)
const filterData = (params: any) => {
const { posko, uid, up3 } = params
const dateValue = params.periode.split(' s/d ')
@@ -1154,8 +1151,7 @@ const onExporting = (e: any) => {
}
const onDataSelectionChanged = ({ selectedRowsData }: any) => {
const data = selectedRowsData[0]
dataSelected.value = data
dataSelected.value = selectedRowsData[0]
showDialogDataSelected()
}