fix: load pane in daftar gangguan

This commit is contained in:
kur0nek-o
2024-04-01 14:23:12 +07:00
parent fd08049392
commit 10faa589a1
16 changed files with 84 additions and 37 deletions

View File

@@ -30,7 +30,7 @@
:show-info="true"
:show-navigation-buttons="true"
/>
<DxLoadPanel
<!-- <DxLoadPanel
shading-color="rgba(0,0,0,0.4)"
:position="position"
:show-indicator="showIndicator"
@@ -38,7 +38,7 @@
:shading="shading"
v-model:visible.sync="loadingData"
:enabled="true"
/>
/> -->
<DxSearchPanel :visible="true" :highlight-case-sensitive="true" />
<DxExport
:enabled="true"
@@ -323,7 +323,7 @@
:show-info="true"
:show-navigation-buttons="true"
/>
<DxLoadPanel
<!-- <DxLoadPanel
shading-color="rgba(0,0,0,0.4)"
:position="position"
:show-indicator="showIndicator"
@@ -331,7 +331,7 @@
:shading="shading"
v-model:visible="loadingSubData"
:enabled="true"
/>
/> -->
<DxSearchPanel :visible="true" :highlight-case-sensitive="true" />
<DxExport
:enabled="true"
@@ -421,13 +421,15 @@
</div>
</div>
</DetailDialog>
<BufferDialog v-if="loadingData || loadingSubData" />
</template>
<script setup lang="ts">
import Filters from '@/components/Form/Filters.vue'
import Type6 from '@/components/Form/FiltersType/Type6.vue'
import { formatWaktu } from '@/components/Form/FiltersType/reference'
import { onMounted, ref, watch } from 'vue'
import { onMounted, ref } from 'vue'
import { DxDataGrid } from 'devextreme-vue'
import {
DxColumn,
@@ -440,12 +442,12 @@ import {
} from 'devextreme-vue/data-grid'
import DetailDialog from '@/components/Dialogs/DetailDialog.vue'
import InputText from '@/components/InputText.vue'
import { useQuery } from '@vue/apollo-composable'
import { queries, requestGraphQl } from '@/utils/api/api.graphql'
import { formatNumber, isNumber } from '@/utils/numbers'
import { exportToPDF, exportToXLSX, exportToDOCX } from '@/report/Gangguan/Daftar/DGangguan_MLD1K'
import { apolloClient } from '@/utils/api/api.graphql'
import { provideApolloClient } from '@vue/apollo-composable'
import BufferDialog from '@/components/Dialogs/BufferDialog.vue'
const client = apolloClient()
provideApolloClient(client)
@@ -488,7 +490,7 @@ const getDetail = async () => {
const query = {
noLaporan: selected?.no_laporan ? selected?.no_laporan : ''
}
loadingSubData.value = false
loadingSubData.value = true
await requestGraphQl(queries.gangguan.daftar.melaporLebihDariSatuKaliDetail, query)
.then((result) => {
if (result.data.data != undefined) {
@@ -503,6 +505,7 @@ const getDetail = async () => {
console.error(err)
})
.finally(() => {
dialogDetail.value = true
loadingSubData.value = false
})
}
@@ -515,7 +518,6 @@ const clearSelection = () => {
const showDetail = () => {
clearSelection()
dataSubSelected.value = null
dialogDetail.value = true
if (detailType.value == 'table') {
getDetail()
}