From ee034bacf9458a93228a5e1624db51d0fd18c1af Mon Sep 17 00:00:00 2001 From: Dede Fuji Abdul Date: Fri, 19 Apr 2024 19:34:54 +0700 Subject: [PATCH] Refactor code to update version numbers and fix bugs in Gangguan and Monalisa components --- package.json | 2 +- public/version.json | 2 +- .../Anomali/Gangguan/Anomali_LAPPGP_LPP.vue | 39 ++-- .../Anomali/Gangguan/Anomali_LAPPGP_LPT.vue | 11 +- .../Anomali/Gangguan/Anomali_LAPPGU_LPT.vue | 10 +- .../Anomali/Keluhan/Anomali_LAPPKU_LPT.vue | 9 +- .../Pages/Ctt/CTT_LaporanCttKwhPeriksa.vue | 11 +- .../Pages/Gangguan/Daftar/DGangguan_DKPL.vue | 3 +- .../Pages/Gangguan/Rekap/RGangguan_ALL.vue | 24 +-- .../Pages/Gangguan/Rekap/RGangguan_CTTM.vue | 2 +- .../Pages/Gangguan/Rekap/RGangguan_DMAPKT.vue | 18 +- .../Rekap/RGangguan_JenisGangguanSE.vue | 20 +-- .../Gangguan/Rekap/RGangguan_PerPosko.vue | 20 +-- .../Gangguan/Rekap/RGangguan_PerRegu.vue | 22 +-- .../Gangguan/Rekap/RGangguan_PerTanggal.vue | 20 +-- .../Rekap/RGangguan_RatingPerPosko.vue | 4 +- .../Pages/Keluhan/Rekap/RKeluhan_ALL.vue | 18 +- .../Rekap/RKeluhan_PerFungsiBidang.vue | 20 +-- .../Rekap/RKeluhan_PerJenisKeluhan.vue | 20 +-- .../Rekap/RKeluhan_PerKelompokKeluhan.vue | 20 +-- .../Keluhan/Rekap/RKeluhan_PerTanggal.vue | 22 +-- .../Pages/Keluhan/Rekap/RKeluhan_PerUnit.vue | 20 +-- .../MonalisaGR_DispatchingTimeGangguan.vue | 90 +++++++++- .../Rekap/MonalisaGR_GangguanBelumSelesai.vue | 161 +++++++++++++++-- .../Rekap/MonalisaKR_KeluhanBelumSelesai.vue | 167 ++++++++++++++++-- .../Bulanan/MonalisaLB_AgingComplaint.vue | 8 +- .../MonalisaLB_PenurunanJumlahKomplain.vue | 8 +- src/utils/api/api.graphql.ts | 4 + 28 files changed, 570 insertions(+), 205 deletions(-) diff --git a/package.json b/package.json index cb1cc8c..23b17f4 100755 --- a/package.json +++ b/package.json @@ -1 +1 @@ -{"name":"eis","version":"0.0.121-vm","private":true,"scripts":{"dev":"vite","host":"vite --host","tailwind":"tailwindcss -i ./src/assets/css/tailwind.css -o ./src/assets/css/style.css --watch","build":"run-p type-check build-only","preview":"vite preview --host","test:unit":"vitest","build-only":"vite build","type-check":"vue-tsc --noEmit -p tsconfig.vitest.json --composite false","lint":"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore","format":"prettier --write src/","deploy":"node deploy.js"},"dependencies":{"@apollo/client":"^3.8.10","@apollo/link-context":"^2.0.0-beta.3","@flavorly/vanilla-components":"^0.7.65","@headlessui/tailwindcss":"^0.2.0","@headlessui/vue":"^1.7.19","@heroicons/vue":"^2.0.18","@lottiefiles/lottie-player":"^2.0.4","@phosphor-icons/vue":"^2.1.6","@types/qs":"^6.9.12","@types/uuid":"^9.0.8","@types/vue-select":"^3.16.8","@vue/apollo-components":"^4.0.0","@vue/apollo-composable":"^4.0.1","@vue/apollo-option":"^4.0.0","axios":"^1.6.7","devextreme":"23.2.4","devextreme-vue":"23.2.4","docx":"^8.5.0","dotenv":"^16.3.1","encrypt-storage":"^2.12.22","exceljs":"^4.4.0","file-saver":"^2.0.5","graphql":"^16.8.1","graphql-tag":"^2.12.6","jspdf":"^2.5.1","jspdf-autotable":"^3.8.2","pinia":"^2.1.3","qs":"^6.11.2","uuid":"^9.0.1","vue":"^3.3.4","vue-html-to-paper":"^2.0.3","vue-router":"^4.2.2","vue-tailwind-datepicker":"^1.6.1","vue3-star-ratings":"^3.0.5"},"devDependencies":{"@rushstack/eslint-patch":"^1.5.1","@tailwindcss/aspect-ratio":"^0.4.2","@tailwindcss/container-queries":"^0.1.1","@tailwindcss/forms":"^0.5.7","@tailwindcss/typography":"^0.5.10","@tsconfig/node18":"^2.0.1","@types/file-saver":"^2.0.6","@types/jsdom":"^21.1.1","@types/node":"^18.16.17","@vitejs/plugin-vue":"^4.2.3","@vitejs/plugin-vue-jsx":"^3.0.1","@vue/eslint-config-prettier":"^8.0.0","@vue/eslint-config-typescript":"^12.0.0","@vue/test-utils":"^2.3.2","@vue/tsconfig":"^0.4.0","autoprefixer":"^10.4.14","eslint":"^8.39.0","eslint-plugin-vue":"^9.11.0","jsdom":"^22.1.0","npm-run-all":"^4.1.5","postcss":"^8.4.24","prettier":"^3.0.3","tailwindcss":"^3.3.2","typescript":"~5.2.2","vite":"^4.3.9","vitest":"^1.3.1","vue-tsc":"^2.0.5"}} \ No newline at end of file +{"name":"eis","version":"0.0.122-vm","private":true,"scripts":{"dev":"vite","host":"vite --host","tailwind":"tailwindcss -i ./src/assets/css/tailwind.css -o ./src/assets/css/style.css --watch","build":"run-p type-check build-only","preview":"vite preview --host","test:unit":"vitest","build-only":"vite build","type-check":"vue-tsc --noEmit -p tsconfig.vitest.json --composite false","lint":"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore","format":"prettier --write src/","deploy":"node deploy.js"},"dependencies":{"@apollo/client":"^3.8.10","@apollo/link-context":"^2.0.0-beta.3","@flavorly/vanilla-components":"^0.7.65","@headlessui/tailwindcss":"^0.2.0","@headlessui/vue":"^1.7.19","@heroicons/vue":"^2.0.18","@lottiefiles/lottie-player":"^2.0.4","@phosphor-icons/vue":"^2.1.6","@types/qs":"^6.9.12","@types/uuid":"^9.0.8","@types/vue-select":"^3.16.8","@vue/apollo-components":"^4.0.0","@vue/apollo-composable":"^4.0.1","@vue/apollo-option":"^4.0.0","axios":"^1.6.7","devextreme":"23.2.4","devextreme-vue":"23.2.4","docx":"^8.5.0","dotenv":"^16.3.1","encrypt-storage":"^2.12.22","exceljs":"^4.4.0","file-saver":"^2.0.5","graphql":"^16.8.1","graphql-tag":"^2.12.6","jspdf":"^2.5.1","jspdf-autotable":"^3.8.2","pinia":"^2.1.3","qs":"^6.11.2","uuid":"^9.0.1","vue":"^3.3.4","vue-html-to-paper":"^2.0.3","vue-router":"^4.2.2","vue-tailwind-datepicker":"^1.6.1","vue3-star-ratings":"^3.0.5"},"devDependencies":{"@rushstack/eslint-patch":"^1.5.1","@tailwindcss/aspect-ratio":"^0.4.2","@tailwindcss/container-queries":"^0.1.1","@tailwindcss/forms":"^0.5.7","@tailwindcss/typography":"^0.5.10","@tsconfig/node18":"^2.0.1","@types/file-saver":"^2.0.6","@types/jsdom":"^21.1.1","@types/node":"^18.16.17","@vitejs/plugin-vue":"^4.2.3","@vitejs/plugin-vue-jsx":"^3.0.1","@vue/eslint-config-prettier":"^8.0.0","@vue/eslint-config-typescript":"^12.0.0","@vue/test-utils":"^2.3.2","@vue/tsconfig":"^0.4.0","autoprefixer":"^10.4.14","eslint":"^8.39.0","eslint-plugin-vue":"^9.11.0","jsdom":"^22.1.0","npm-run-all":"^4.1.5","postcss":"^8.4.24","prettier":"^3.0.3","tailwindcss":"^3.3.2","typescript":"~5.2.2","vite":"^4.3.9","vitest":"^1.3.1","vue-tsc":"^2.0.5"}} \ No newline at end of file diff --git a/public/version.json b/public/version.json index 42106db..a5c0722 100644 --- a/public/version.json +++ b/public/version.json @@ -1 +1 @@ -{"version":"0.0.121-vm"} \ No newline at end of file +{"version":"0.0.122-vm"} \ No newline at end of file diff --git a/src/components/Pages/Anomali/Gangguan/Anomali_LAPPGP_LPP.vue b/src/components/Pages/Anomali/Gangguan/Anomali_LAPPGP_LPP.vue index 5bdabe2..8bd9f7f 100755 --- a/src/components/Pages/Anomali/Gangguan/Anomali_LAPPGP_LPP.vue +++ b/src/components/Pages/Anomali/Gangguan/Anomali_LAPPGP_LPP.vue @@ -176,7 +176,8 @@ class="text-right cursor-pointer" @click=" setParameterRequest({ - media: null + media: null, + value: data.text }) " > @@ -195,7 +196,8 @@ class="text-right" @click=" setParameterRequest({ - media: null + media: null, + value: data.text }) " > @@ -214,7 +216,8 @@ class="text-right cursor-pointer" @click=" setParameterRequest({ - media: 'PLN Mobile' + media: 'PLN Mobile', + value: data.text }) " > @@ -233,7 +236,8 @@ class="text-right cursor-pointer" @click=" setParameterRequest({ - media: 'Call PLN 123' + media: 'Call PLN 123', + value: data.text }) " > @@ -252,7 +256,8 @@ class="text-right cursor-pointer" @click=" setParameterRequest({ - media: '' + media: '', + value: data.text }) " > @@ -271,7 +276,8 @@ class="text-right" @click=" setParameterRequest({ - media: null + media: null, + value: data.text }) " > @@ -284,7 +290,8 @@ class="text-left" @click=" setParameterRequest({ - media: null + media: null, + value: data.text }) " > @@ -297,7 +304,8 @@ class="!text-right" @click=" setParameterRequest({ - media: null + media: null, + value: data.text }) " > @@ -880,9 +888,10 @@ const dataSelected = ref(null) const dataSubSelected = ref(null) const dialogDetail = ref(false) const loadingSubData = ref(false) -const agreeToShowDialog = ref(false) +const isDialogEnabled = ref(false) const parameterRequest = ref({ - media: null + media: null, + value: 0 }) const closedialogDetail = () => (dialogDetail.value = false) @@ -890,9 +899,13 @@ const setParameterRequest = (data: any) => { parameterRequest.value = data const parameter = parameterRequest.value if (parameter.media != null) { - agreeToShowDialog.value = true + if (parameter.value != 0) { + isDialogEnabled.value = true + } else { + isDialogEnabled.value = false + } } else { - agreeToShowDialog.value = false + isDialogEnabled.value = false } } @@ -990,7 +1003,7 @@ const showDetail = () => { clearSelection() dataSub.value = [] dataSubSelected.value = null - if (agreeToShowDialog.value) { + if (isDialogEnabled.value) { getDetail() } } diff --git a/src/components/Pages/Anomali/Gangguan/Anomali_LAPPGP_LPT.vue b/src/components/Pages/Anomali/Gangguan/Anomali_LAPPGP_LPT.vue index c3d6f93..86d7f5f 100755 --- a/src/components/Pages/Anomali/Gangguan/Anomali_LAPPGP_LPT.vue +++ b/src/components/Pages/Anomali/Gangguan/Anomali_LAPPGP_LPT.vue @@ -519,7 +519,7 @@ const dataSelected = ref(null) const dataSubSelected = ref(null) const dialogDetail = ref(false) const loadingSubData = ref(false) -const agreeToShowDialog = ref(false) +const isDialogEnabled = ref(false) const reportMeta = ref(computed(() => props.filters)) const parameterRequest = ref({ media: null, @@ -535,9 +535,9 @@ const setParameterRequest = (data: any) => { if (parameter.media != null && parameter.marking != null) { emit('update:marking', parameter.marking) - agreeToShowDialog.value = true + isDialogEnabled.value = true } else { - agreeToShowDialog.value = false + isDialogEnabled.value = false } } @@ -545,6 +545,9 @@ const onCellClicked = (e: any) => { if (e.rowType == 'group') { groupDialog.value = true groupIndex.value = e.row.groupIndex + console.log(e.data) + console.log('columnIndex', e) + console.log('columnValue', e.data.aggregates[e.column.columnIndex]) if (e.column.dataField == 'anomali_pln_mobile_marking') { setParameterRequest({ media: 'PLN Mobile', marking: 1 }) @@ -839,7 +842,7 @@ const showDetail = () => { clearSelection() dataSub.value = [] dataSubSelected.value = null - if (agreeToShowDialog.value) { + if (isDialogEnabled.value) { getDetail() } } diff --git a/src/components/Pages/Anomali/Gangguan/Anomali_LAPPGU_LPT.vue b/src/components/Pages/Anomali/Gangguan/Anomali_LAPPGU_LPT.vue index 4d62093..0c1f409 100755 --- a/src/components/Pages/Anomali/Gangguan/Anomali_LAPPGU_LPT.vue +++ b/src/components/Pages/Anomali/Gangguan/Anomali_LAPPGU_LPT.vue @@ -1053,7 +1053,6 @@ import { DxExport, DxGroupItem, DxGrouping, - DxLoadPanel, DxPager, DxPaging, DxScrolling, @@ -1074,7 +1073,6 @@ import { exportToDOCX, exportDetailToDOCX } from '@/report/Anomali/Gangguan/Anomali_LAPPGU_LPT' -import BufferDialog from '@/components/Dialogs/BufferDialog.vue' import { getDataRowGroup } from '@/utils/helper' const position = { of: '#data' } @@ -1099,7 +1097,7 @@ const dataSubSelected = ref(null) const dialogDetail = ref(false) const closedialogDetail = () => (dialogDetail.value = false) const loadingSubData = ref(false) -const agreeToShowDialog = ref(false) +const isDialogEnabled = ref(false) const reportMeta = ref(computed(() => props.filters)) const parameterRequest = ref({ media: null, @@ -1113,9 +1111,9 @@ const setParameterRequest = (data: any) => { parameterRequest.value = data const parameter = parameterRequest.value if (parameter.media != null && parameter.marking != null) { - agreeToShowDialog.value = true + isDialogEnabled.value = true } else { - agreeToShowDialog.value = false + isDialogEnabled.value = false } } @@ -1451,7 +1449,7 @@ const showDetail = () => { clearSelection() dataSub.value = [] dataSubSelected.value = null - if (agreeToShowDialog.value) { + if (isDialogEnabled.value) { getDetail() } } diff --git a/src/components/Pages/Anomali/Keluhan/Anomali_LAPPKU_LPT.vue b/src/components/Pages/Anomali/Keluhan/Anomali_LAPPKU_LPT.vue index 2f99d18..3051b7d 100755 --- a/src/components/Pages/Anomali/Keluhan/Anomali_LAPPKU_LPT.vue +++ b/src/components/Pages/Anomali/Keluhan/Anomali_LAPPKU_LPT.vue @@ -734,7 +734,6 @@ import { DxExport, DxGroupItem, DxGrouping, - DxLoadPanel, DxPager, DxPaging, DxScrolling, @@ -783,7 +782,7 @@ const dialogDetail = ref(false) const closedialogDetail = () => (dialogDetail.value = false) const loadingData = ref(false) const loadingSubData = ref(false) -const agreeToShowDialog = ref(false) +const isDialogEnabled = ref(false) const mediaSelected = ref(null) const reportMeta = ref(computed(() => props.filters)) const groupDialog = ref(false) @@ -794,9 +793,9 @@ const setParameterRequest = (media: any) => { mediaSelected.value = media if (media != null) { - agreeToShowDialog.value = true + isDialogEnabled.value = true } else { - agreeToShowDialog.value = false + isDialogEnabled.value = false } } @@ -1066,7 +1065,7 @@ const showDetail = () => { clearSelection() dataSub.value = [] dataSubSelected.value = null - if (agreeToShowDialog.value) { + if (isDialogEnabled.value) { getDetail() } } diff --git a/src/components/Pages/Ctt/CTT_LaporanCttKwhPeriksa.vue b/src/components/Pages/Ctt/CTT_LaporanCttKwhPeriksa.vue index a023f76..1eadc04 100755 --- a/src/components/Pages/Ctt/CTT_LaporanCttKwhPeriksa.vue +++ b/src/components/Pages/Ctt/CTT_LaporanCttKwhPeriksa.vue @@ -897,7 +897,7 @@