diff --git a/src/assets/css/style.css b/src/assets/css/style.css
index 1dd8ec9..deb3898 100755
--- a/src/assets/css/style.css
+++ b/src/assets/css/style.css
@@ -3715,6 +3715,16 @@ body {
color: rgb(102 102 0 / var(--tw-text-opacity));
}
+.text-slate-300 {
+ --tw-text-opacity: 1;
+ color: rgb(203 213 225 / var(--tw-text-opacity));
+}
+
+.text-slate-500 {
+ --tw-text-opacity: 1;
+ color: rgb(100 116 139 / var(--tw-text-opacity));
+}
+
.text-opacity-40 {
--tw-text-opacity: 0.4;
}
@@ -3723,6 +3733,10 @@ body {
text-decoration-line: underline;
}
+.no-underline {
+ text-decoration-line: none;
+}
+
.placeholder-gray-500::-moz-placeholder {
--tw-placeholder-opacity: 1;
color: rgb(107 114 128 / var(--tw-placeholder-opacity));
@@ -5252,6 +5266,11 @@ body {
color: rgb(51 51 0 / 0.9);
}
+:is(.dark .dark\:text-slate-500) {
+ --tw-text-opacity: 1;
+ color: rgb(100 116 139 / var(--tw-text-opacity));
+}
+
:is(.dark .dark\:text-opacity-70) {
--tw-text-opacity: 0.7;
}
diff --git a/src/components/Form/FiltersType/Type13.vue b/src/components/Form/FiltersType/Type13.vue
index 50c0401..00e0b98 100755
--- a/src/components/Form/FiltersType/Type13.vue
+++ b/src/components/Form/FiltersType/Type13.vue
@@ -67,12 +67,22 @@ onMounted(() => {
-
+
-
+
@@ -80,14 +90,25 @@ onMounted(() => {
(data.periode = value)" />
-
-
+
+
- (data.groupBy = value.id === 2)" :radio-items="[
- { id: 1, title: 'Tidak' },
- { id: 2, title: 'Ya, Grupkan' }
- ]" />
+ (data.groupBy = value.id === 2)"
+ :radio-items="[
+ { id: 1, title: 'Tidak' },
+ { id: 2, title: 'Ya, Grupkan' }
+ ]"
+ />
-
diff --git a/src/components/Pages/Gangguan/Rekap/RGangguan_ALL.vue b/src/components/Pages/Gangguan/Rekap/RGangguan_ALL.vue
index e2ec9a3..fb1c429 100755
--- a/src/components/Pages/Gangguan/Rekap/RGangguan_ALL.vue
+++ b/src/components/Pages/Gangguan/Rekap/RGangguan_ALL.vue
@@ -11,7 +11,7 @@
-
-
-
-
-
([
+ {
+ data: '',
+ caption: 'Semua Unit'
+ },
+ {
+ data: 'nama_regional',
+ caption: 'Regional'
+ },
+ {
+ data: 'nama_uid',
+ caption: 'UID'
+ },
+ {
+ data: 'nama_up3',
+ caption: 'UP3'
+ }
+])
const onCellClicked = (e: any) => {
if (e.rowType == 'group') {
@@ -1448,6 +1428,50 @@ const filterData = async (params: any) => {
const { posko, uid, up3 } = params
const dateValue = params.periode.split(' s/d ')
+ var groupList: any[] = [
+ {
+ data: '',
+ caption: 'Semua Unit'
+ },
+ {
+ data: 'nama_regional',
+ caption: 'Regional'
+ },
+ {
+ data: 'nama_uid',
+ caption: 'UID'
+ },
+ {
+ data: 'nama_up3',
+ caption: 'UP3'
+ }
+ ]
+
+ if (uid?.id != 0) {
+ groupList.forEach((item, index) => {
+ if (item.caption == 'Semua Unit' || item.caption == 'Regional') {
+ groupList.splice(index, 1)
+ }
+ })
+
+ if (up3?.id != 0) {
+ groupList.forEach((item, index) => {
+ if (item.caption == 'UID') {
+ groupList.splice(index, 1)
+ }
+ })
+
+ if (posko?.id != 0) {
+ groupList.forEach((item, index) => {
+ if (item.caption == 'UP3') {
+ groupList.splice(index, 1)
+ }
+ })
+ }
+ }
+ }
+ grouping.value = groupList
+
const query = {
dateFrom: dateValue[0]
? dateValue[0].split('-').reverse().join('-')
diff --git a/src/components/Pages/Gangguan/Rekap/RGangguan_AlihPosko.vue b/src/components/Pages/Gangguan/Rekap/RGangguan_AlihPosko.vue
index 22ebe90..119bbcf 100755
--- a/src/components/Pages/Gangguan/Rekap/RGangguan_AlihPosko.vue
+++ b/src/components/Pages/Gangguan/Rekap/RGangguan_AlihPosko.vue
@@ -1,14 +1,31 @@
- filterData(filters)"
- @run-report="() => exportToPDF(reportMeta, data, true)" class="mb-4">
+ filterData(filters)"
+ @run-report="() => exportToPDF(reportMeta, data, true)"
+ class="mb-4"
+ >
(filters = value)" />
-
+
@@ -16,30 +33,86 @@
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
@@ -51,94 +124,227 @@
{{
- isNumber(data.text)
- ? data.column.caption == '%'
- ? formatPercentage(data.text)
- : formatNumber(data.text)
- : data.text
- }}
+ isNumber(data.text)
+ ? data.column.caption == '%'
+ ? formatPercentage(data.text)
+ : formatNumber(data.text)
+ : data.text
+ }}
{{
- isNumber(data.text)
- ? data.column.caption == '%'
- ? formatPercentage(data.text)
- : formatNumber(data.text)
- : data.text
- }}
+ isNumber(data.text)
+ ? data.column.caption == '%'
+ ? formatPercentage(data.text)
+ : formatNumber(data.text)
+ : data.text
+ }}
{{
- isNumber(data.text)
- ? data.column.caption == '%'
- ? formatPercentage(data.text)
- : formatNumber(data.text)
- : data.text
- }}
+ isNumber(data.text)
+ ? data.column.caption == '%'
+ ? formatPercentage(data.text)
+ : formatNumber(data.text)
+ : data.text
+ }}
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -174,28 +380,46 @@
Tgl Datang:
-
+
Tgl Nyala:
-
+
Durasi Response Time:
-
+
Durasi Recovery Time:
-
+
@@ -215,17 +439,29 @@
Alamat Pelapor:
-
+
No Telp Pelapor:
-
+
Keterangan Pelapor:
-
+
@@ -268,7 +504,6 @@ import {
DxColumn,
DxColumnFixing,
DxExport,
- DxLoadPanel,
DxPaging,
DxScrolling,
DxSearchPanel,
diff --git a/src/components/Pages/Gangguan/Rekap/RGangguan_CTTM.vue b/src/components/Pages/Gangguan/Rekap/RGangguan_CTTM.vue
index 416f5a2..36e01c7 100755
--- a/src/components/Pages/Gangguan/Rekap/RGangguan_CTTM.vue
+++ b/src/components/Pages/Gangguan/Rekap/RGangguan_CTTM.vue
@@ -1,50 +1,162 @@
- exportToPDF(reportMeta, data, true)" @reset-form="data = []"
- @run-search="() => filterData(filters)" :report-button="true" class="mb-4">
+ exportToPDF(reportMeta, data, true)"
+ @reset-form="data = []"
+ @run-search="() => filterData(filters)"
+ :report-button="true"
+ class="mb-4"
+ >
(filters = value)" />
-
+
+
-
+
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -56,56 +168,165 @@
{{
- isNumber(data.text)
- ? data.column.caption == '%'
- ? formatPercentage(data.text)
- : formatNumber(data.text)
- : data.text
- }}
+ isNumber(data.text)
+ ? data.column.caption == '%'
+ ? formatPercentage(data.text)
+ : formatNumber(data.text)
+ : data.text
+ }}
+
+
+
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -152,23 +373,37 @@
Durasi Pencatatan:
-
+
Durasi Recovery Time:
-
+
Keterangan CLeansing:
-
+
@@ -203,15 +438,17 @@ import {
DxColumn,
DxColumnFixing,
DxExport,
- DxLoadPanel,
+ DxGroupItem,
+ DxGrouping,
DxPaging,
DxScrolling,
DxSearchPanel,
- DxSelection
+ DxSelection,
+ DxSummary
} from 'devextreme-vue/data-grid'
import { queries, requestGraphQl } from '@/utils/api/api.graphql'
import { formatNumber, formatPercentage, isNumber } from '@/utils/numbers'
-import { formatWaktu, years } from '@/components/Form/FiltersType/reference'
+import { formatWaktu } from '@/components/Form/FiltersType/reference'
import { apolloClient } from '@/utils/api/api.graphql'
import { provideApolloClient } from '@vue/apollo-composable'
import { getMonthNumber } from '@/utils/texts'
@@ -247,6 +484,24 @@ const reportMeta = ref({
posko: { id: 0, name: 'Semua Posko' },
periode: ''
})
+const grouping = ref
([
+ {
+ data: '',
+ caption: 'Semua Unit'
+ },
+ {
+ data: 'nama_regional',
+ caption: 'Regional'
+ },
+ {
+ data: 'nama_uid',
+ caption: 'UID'
+ },
+ {
+ data: 'nama_up3',
+ caption: 'UP3'
+ }
+])
const setMonth = (month: any) => {
if (month != '') {
@@ -266,6 +521,50 @@ const filterData = async (params: any) => {
const dateValue = params.periode.split(' s/d ')
const { posko, uid, up3 } = params
+ var groupList: any[] = [
+ {
+ data: '',
+ caption: 'Semua Unit'
+ },
+ {
+ data: 'nama_regional',
+ caption: 'Regional'
+ },
+ {
+ data: 'nama_uid',
+ caption: 'UID'
+ },
+ {
+ data: 'nama_up3',
+ caption: 'UP3'
+ }
+ ]
+
+ if (uid?.id != 0) {
+ groupList.forEach((item, index) => {
+ if (item.caption == 'Semua Unit' || item.caption == 'Regional') {
+ groupList.splice(index, 1)
+ }
+ })
+
+ if (up3?.id != 0) {
+ groupList.forEach((item, index) => {
+ if (item.caption == 'UID') {
+ groupList.splice(index, 1)
+ }
+ })
+
+ if (posko?.id != 0) {
+ groupList.forEach((item, index) => {
+ if (item.caption == 'UP3') {
+ groupList.splice(index, 1)
+ }
+ })
+ }
+ }
+ }
+ grouping.value = groupList
+
const query = {
dateFrom: dateValue[0]
? dateValue[0].split('-').reverse().join('-')
diff --git a/src/components/Pages/Gangguan/Rekap/RGangguan_DMAPKT.vue b/src/components/Pages/Gangguan/Rekap/RGangguan_DMAPKT.vue
index ab02a50..881ed0f 100755
--- a/src/components/Pages/Gangguan/Rekap/RGangguan_DMAPKT.vue
+++ b/src/components/Pages/Gangguan/Rekap/RGangguan_DMAPKT.vue
@@ -1,60 +1,135 @@
- exportToPDF(reportMeta, data, true)"
- @run-search="() => filterData(filters)" :report-button="true" class="mb-4">
+ exportToPDF(reportMeta, data, true)"
+ @run-search="() => filterData(filters)"
+ :report-button="true"
+ class="mb-4"
+ >
(filters = value)" />
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -64,23 +139,47 @@
-
+
-
+
-
+
-
+
@@ -88,23 +187,47 @@
-
+
-
+
-
+
-
+
@@ -114,23 +237,47 @@
-
+
-
+
-
+
-
+
@@ -138,23 +285,47 @@
-
+
-
+
-
+
-
+
@@ -170,12 +341,12 @@
{{
- isNumber(data.text)
- ? data.column.caption == '%'
- ? formatPercentage(data.text)
- : formatNumber(data.text)
- : data.text
- }}
+ isNumber(data.text)
+ ? data.column.caption == '%'
+ ? formatPercentage(data.text)
+ : formatNumber(data.text)
+ : data.text
+ }}
@@ -192,74 +363,242 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -295,28 +634,46 @@
Tgl Datang:
-
+
Tgl Nyala:
-
+
Durasi Response Time:
-
+
Durasi Recovery Time:
-
+
@@ -326,7 +683,11 @@
Referensi Marking:
-
+
@@ -341,17 +702,29 @@
Alamat Pelapor:
-
+
No Telp Pelapor:
-
+
Keterangan Pelapor:
-
+
@@ -384,7 +757,6 @@ import {
DxColumn,
DxColumnFixing,
DxExport,
- DxLoadPanel,
DxPager,
DxPaging,
DxScrolling,
diff --git a/src/components/Pages/Gangguan/Rekap/RGangguan_JenisGangguan.vue b/src/components/Pages/Gangguan/Rekap/RGangguan_JenisGangguan.vue
index 85d6571..51a5bb3 100755
--- a/src/components/Pages/Gangguan/Rekap/RGangguan_JenisGangguan.vue
+++ b/src/components/Pages/Gangguan/Rekap/RGangguan_JenisGangguan.vue
@@ -1,123 +1,558 @@
- filterData(filters)"
- @run-report="() => exportToPDF(reportMeta, data, true)" class="mb-4">
+ filterData(filters)"
+ @run-report="() => exportToPDF(reportMeta, data, true)"
+ class="mb-4"
+ >
(filters = value)" />
-
+
-
+
-
-
-
-
+
+
+
+
-
+
-
-
+
+
-
-
+
+
-
-
-
-
+
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -129,12 +564,12 @@
{{
- isNumber(data.text)
- ? data.column.caption == '%'
- ? formatPercentage(data.text)
- : formatNumber(data.text)
- : data.text
- }}
+ isNumber(data.text)
+ ? data.column.caption == '%'
+ ? formatPercentage(data.text)
+ : formatNumber(data.text)
+ : data.text
+ }}
@@ -153,25 +588,28 @@
import Filters from '@/components/Form/Filters.vue'
import Type1 from '@/components/Form/FiltersType/Type1.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,
DxColumnFixing,
DxExport,
DxGroupItem,
- DxGroupPanel,
DxGrouping,
- DxLoadPanel,
DxPaging,
DxScrolling,
DxSearchPanel,
DxSelection,
- DxSummary
+ DxSummary,
+ DxTotalItem
} from 'devextreme-vue/data-grid'
import { queries, requestGraphQl } from '@/utils/api/api.graphql'
import { formatNumber, formatPercentage, isNumber } from '@/utils/numbers'
-import { exportToPDF, exportToXLSX, exportToDOCX } from '@/report/Gangguan/Rekap/RGangguan_JenisGangguan'
+import {
+ exportToPDF,
+ exportToXLSX,
+ exportToDOCX
+} from '@/report/Gangguan/Rekap/RGangguan_JenisGangguan'
import { apolloClient } from '@/utils/api/api.graphql'
import { provideApolloClient } from '@vue/apollo-composable'
import BufferDialog from '@/components/Dialogs/BufferDialog.vue'
@@ -312,12 +750,10 @@ const filterData = async (params: any) => {
let total = 0
let total_selesai = 0
let total_inproses = 0
-let count_durasi_dispatch = 0
-let total_durasi_dispatch = 0
let count_durasi_response = 0
let total_durasi_response = 0
-let count_durasi_recovery = 0
let total_durasi_recovery = 0
+let count_durasi_recovery = 0
const calculateCustomSummary = (options: any) => {
if (options.name === 'total') {
if (options.summaryProcess === 'calculate') {
@@ -351,6 +787,74 @@ const calculateCustomSummary = (options: any) => {
options.totalValue = (total_selesai / total) * 100
}
}
+
+ if (options.name === 'persen_inproses') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_inproses = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_inproses / total) * 100
+ }
+ }
+
+ if (options.name === 'persen_selesai') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_selesai = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_selesai / total) * 100
+ }
+ }
+
+ if (options.name === 'total_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response
+ }
+ }
+
+ if (options.name === 'avg_durasi_response') {
+ if (options.summaryProcess === 'start') {
+ total_durasi_response = 0
+ count_durasi_response = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response / total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery
+ }
+ }
+
+ if (options.name === 'total_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_recovery
+ }
+ }
+
+ if (options.name === 'avg_durasi_recovery') {
+ if (options.summaryProcess === 'start') {
+ count_durasi_recovery = 0
+ total_durasi_recovery = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery / total_durasi_recovery
+ }
+ }
}
const filters = ref()
diff --git a/src/components/Pages/Gangguan/Rekap/RGangguan_JenisGangguanSE.vue b/src/components/Pages/Gangguan/Rekap/RGangguan_JenisGangguanSE.vue
index d7b86c6..1d52384 100755
--- a/src/components/Pages/Gangguan/Rekap/RGangguan_JenisGangguanSE.vue
+++ b/src/components/Pages/Gangguan/Rekap/RGangguan_JenisGangguanSE.vue
@@ -1,24 +1,45 @@
- exportToPDF(reportMeta, data, true)"
- @run-search="() => filterData(filters)" class="mb-4">
+ exportToPDF(reportMeta, data, true)"
+ @run-search="() => filterData(filters)"
+ class="mb-4"
+ >
(filters = value)" />
-
+
-
+
-
-
-
+
+
+
-
+
-
-
+
+
-
-
+
+
-
-
-
-
+
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
+
-
-
+
+
@@ -96,48 +284,48 @@
{{
- isNumber(data.text)
- ? data.column.caption == '%'
- ? formatPercentage(data.text)
- : formatNumber(data.text)
- : data.text
- }}
+ isNumber(data.text)
+ ? data.column.caption == '%'
+ ? formatPercentage(data.text)
+ : formatNumber(data.text)
+ : data.text
+ }}
{{
- isNumber(data.text)
- ? data.column.caption == '%'
- ? formatPercentage(data.text)
- : formatNumber(data.text)
- : data.text
- }}
+ isNumber(data.text)
+ ? data.column.caption == '%'
+ ? formatPercentage(data.text)
+ : formatNumber(data.text)
+ : data.text
+ }}
{{
- isNumber(data.text)
- ? data.column.caption == '%'
- ? formatPercentage(data.text)
- : formatNumber(data.text)
- : data.text
- }}
+ isNumber(data.text)
+ ? data.column.caption == '%'
+ ? formatPercentage(data.text)
+ : formatNumber(data.text)
+ : data.text
+ }}
{{
- isNumber(data.text)
- ? data.column.caption == '%'
- ? formatPercentage(data.text)
- : formatNumber(data.text)
- : data.text
- }}
+ isNumber(data.text)
+ ? data.column.caption == '%'
+ ? formatPercentage(data.text)
+ : formatNumber(data.text)
+ : data.text
+ }}
@@ -147,97 +335,473 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -273,28 +837,46 @@
Tgl Datang:
-
+
Tgl Nyala:
-
+
Durasi Response Time:
-
+
Durasi Recovery Time:
-
+
@@ -304,12 +886,20 @@
Referensi Marking:
-
+
IDPEL/NO METER:
-
+
@@ -319,17 +909,29 @@
Alamat Pelapor:
-
+
No Telp Pelapor:
-
+
Keterangan Pelapor:
-
+
@@ -363,7 +965,6 @@ import {
DxColumn,
DxColumnFixing,
DxExport,
- DxLoadPanel,
DxPaging,
DxScrolling,
DxSearchPanel,
@@ -371,7 +972,8 @@ import {
DxSummary,
DxGroupItem,
DxPager,
- DxGrouping
+ DxGrouping,
+ DxTotalItem
} from 'devextreme-vue/data-grid'
import { queries, requestGraphQl } from '@/utils/api/api.graphql'
import { formatNumber, formatPercentage, isNumber } from '@/utils/numbers'
@@ -411,6 +1013,116 @@ const reportMeta = ref({
const agreeToShowDialog = ref(false)
const progressSelected = ref(0)
+let total = 0
+let total_selesai = 0
+let total_inproses = 0
+let count_durasi_response = 0
+let total_durasi_response = 0
+let total_durasi_recovery = 0
+let count_durasi_recovery = 0
+const calculateCustomSummary = (options: any) => {
+ if (options.name === 'total') {
+ if (options.summaryProcess === 'calculate') {
+ total += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total
+ }
+ }
+
+ if (options.name === 'total_selesai') {
+ if (options.summaryProcess === 'calculate') {
+ total_selesai += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_selesai
+ }
+ }
+
+ if (options.name === 'total_inproses') {
+ if (options.summaryProcess === 'calculate') {
+ total_inproses += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_inproses
+ }
+ }
+
+ if (options.name === 'persen_selesai') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_selesai = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_selesai / total) * 100
+ }
+ }
+
+ if (options.name === 'persen_inproses') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_inproses = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_inproses / total) * 100
+ }
+ }
+
+ if (options.name === 'persen_selesai') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_selesai = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_selesai / total) * 100
+ }
+ }
+
+ if (options.name === 'total_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response
+ }
+ }
+
+ if (options.name === 'avg_durasi_response') {
+ if (options.summaryProcess === 'start') {
+ total_durasi_response = 0
+ count_durasi_response = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response / total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery
+ }
+ }
+
+ if (options.name === 'total_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_recovery
+ }
+ }
+
+ if (options.name === 'avg_durasi_recovery') {
+ if (options.summaryProcess === 'start') {
+ count_durasi_recovery = 0
+ total_durasi_recovery = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery / total_durasi_recovery
+ }
+ }
+}
+
const setAgreementDialog = (status: boolean, progress: number) => {
agreeToShowDialog.value = status
progressSelected.value = progress
diff --git a/src/components/Pages/Gangguan/Rekap/RGangguan_KTI.vue b/src/components/Pages/Gangguan/Rekap/RGangguan_KTI.vue
index 1b4c6cc..c89413f 100755
--- a/src/components/Pages/Gangguan/Rekap/RGangguan_KTI.vue
+++ b/src/components/Pages/Gangguan/Rekap/RGangguan_KTI.vue
@@ -1,86 +1,259 @@
- exportToPDF(reportMeta, data, true)"
- @run-search="() => filterData(filters)" :report-button="true" class="mb-4">
+ exportToPDF(reportMeta, data, true)"
+ @run-search="() => filterData(filters)"
+ :report-button="true"
+ class="mb-4"
+ >
(filters = value)" />
-
-
+
+
-
+
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -98,12 +271,12 @@
{{
- isNumber(data.text)
- ? data.column.caption == '%'
- ? formatPercentage(data.text)
- : formatNumber(data.text)
- : data.text
- }}
+ isNumber(data.text)
+ ? data.column.caption == '%'
+ ? formatPercentage(data.text)
+ : formatNumber(data.text)
+ : data.text
+ }}
@@ -115,113 +288,408 @@
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -257,7 +725,11 @@
Tgl Lapor Sebelum:
-
+
@@ -267,47 +739,83 @@
Tgl Penugasan Sebelum:
-
+
Tgl Penugasan Koreksi:
-
+
Tgl Perjalanan Sebelum:
-
+
Tgl Perjalanan Koreksi:
-
+
Tgl Pengerjaan Sebelum:
-
+
Tgl Pengerjaan Koreksi:
-
+
Tgl Nyala Sementara Sebelum:
-
+
Tgl Nyala Sementara Koreksi:
-
+
Tgl Nyala Sebelum:
-
+
@@ -317,36 +825,59 @@
Tgl Selesai Sebelum:
-
+
Tgl Selesai Koreksi:
-
+
Durasi Respon Time Sebelum:
-
+
Durasi Respon Time Koreksi:
-
+
Durasi Recovery Time Koreksi:
-
+
@@ -361,52 +892,92 @@
Sub Kelompok ID Sebelum:
-
+
Sub Kelopok ID Koreksi:
-
+
Fasilitas ID Sebelum:
-
+
Fasilitas ID Koreksi:
-
+
Sub Fasilitas ID Sebelum:
-
+
Sub Fasilitas ID Koreksi:
-
+
Equipment ID Sebelum:
-
+
Equipment ID Koreksi:
-
+
Event Damage ID Sebelum:
-
+
Event Damage ID Koreksi:
-
+
@@ -421,22 +992,38 @@
Cause Group ID Sebelum:
-
+
Cause Group ID Koreksi:
-
+
Weather ID Sebelum:
-
+
Weather ID Koreksi:
-
+
@@ -456,7 +1043,11 @@
Keterangan Pelapor:
-
+
@@ -491,7 +1082,6 @@ import {
DxExport,
DxGroupItem,
DxGrouping,
- DxLoadPanel,
DxPager,
DxPaging,
DxScrolling,
@@ -515,7 +1105,6 @@ import {
exportDetailToDOCX
} from '@/report/Gangguan/Rekap/RGangguan_KTI'
import { getMonthNumber } from '@/utils/texts'
-import { getDataRowGroup } from '@/utils/helper'
import BufferDialog from '@/components/Dialogs/BufferDialog.vue'
const client = apolloClient()
@@ -538,6 +1127,24 @@ const reportMeta = ref({
posko: { id: 0, name: 'Semua Posko' },
periode: ''
})
+const grouping = ref
([
+ {
+ data: '',
+ caption: 'Semua Unit'
+ },
+ {
+ data: 'nama_regional',
+ caption: 'Regional'
+ },
+ {
+ data: 'nama_uid',
+ caption: 'UID'
+ },
+ {
+ data: 'nama_up3',
+ caption: 'UP3'
+ }
+])
const groupDialog = ref(false)
const groupData = ref(null)
@@ -692,6 +1299,50 @@ const filterData = async (params: any) => {
const dateValue = filters.value.periode.split(' s/d ')
const { uid, up3, posko, jenisTransaksi } = params
+ var groupList: any[] = [
+ {
+ data: '',
+ caption: 'Semua Unit'
+ },
+ {
+ data: 'nama_regional',
+ caption: 'Regional'
+ },
+ {
+ data: 'nama_uid',
+ caption: 'UID'
+ },
+ {
+ data: 'nama_up3',
+ caption: 'UP3'
+ }
+ ]
+
+ if (uid?.id != 0) {
+ groupList.forEach((item, index) => {
+ if (item.caption == 'Semua Unit' || item.caption == 'Regional') {
+ groupList.splice(index, 1)
+ }
+ })
+
+ if (up3?.id != 0) {
+ groupList.forEach((item, index) => {
+ if (item.caption == 'UID') {
+ groupList.splice(index, 1)
+ }
+ })
+
+ if (posko?.id != 0) {
+ groupList.forEach((item, index) => {
+ if (item.caption == 'UP3') {
+ groupList.splice(index, 1)
+ }
+ })
+ }
+ }
+ }
+ grouping.value = groupList
+
const query = {
dateFrom: dateValue[0]
? dateValue[0].split('-').reverse().join('-')
diff --git a/src/components/Pages/Gangguan/Rekap/RGangguan_PerPosko.vue b/src/components/Pages/Gangguan/Rekap/RGangguan_PerPosko.vue
index 7622f95..13febde 100755
--- a/src/components/Pages/Gangguan/Rekap/RGangguan_PerPosko.vue
+++ b/src/components/Pages/Gangguan/Rekap/RGangguan_PerPosko.vue
@@ -131,6 +131,20 @@
css-class="custom-table-column"
cell-template="formatNumber"
/>
+
+
-
+
+
@@ -328,14 +371,24 @@
+
@@ -371,49 +424,63 @@
+
@@ -443,13 +510,22 @@
/>
+
@@ -872,7 +948,7 @@
import Filters from '@/components/Form/Filters.vue'
import { formatWaktu } from '@/components/Form/FiltersType/reference'
import Type8 from '@/components/Form/FiltersType/Type8.vue'
-import { onMounted, ref, watch } from 'vue'
+import { onMounted, ref } from 'vue'
import { DxDataGrid } from 'devextreme-vue'
import {
DxColumn,
@@ -880,7 +956,6 @@ import {
DxExport,
DxGroupItem,
DxGrouping,
- DxLoadPanel,
DxPager,
DxPaging,
DxScrolling,
@@ -926,6 +1001,116 @@ const reportMeta = ref({
const agreeToShowDialog = ref(false)
const progressSelected = ref(0)
+let total = 0
+let total_selesai = 0
+let total_inproses = 0
+let count_durasi_response = 0
+let total_durasi_response = 0
+let total_durasi_recovery = 0
+let count_durasi_recovery = 0
+const calculateCustomSummary = (options: any) => {
+ if (options.name === 'total') {
+ if (options.summaryProcess === 'calculate') {
+ total += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total
+ }
+ }
+
+ if (options.name === 'total_selesai') {
+ if (options.summaryProcess === 'calculate') {
+ total_selesai += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_selesai
+ }
+ }
+
+ if (options.name === 'total_inproses') {
+ if (options.summaryProcess === 'calculate') {
+ total_inproses += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_inproses
+ }
+ }
+
+ if (options.name === 'persen_selesai') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_selesai = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_selesai / total) * 100
+ }
+ }
+
+ if (options.name === 'persen_inproses') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_inproses = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_inproses / total) * 100
+ }
+ }
+
+ if (options.name === 'persen_selesai') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_selesai = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_selesai / total) * 100
+ }
+ }
+
+ if (options.name === 'total_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response
+ }
+ }
+
+ if (options.name === 'avg_durasi_response') {
+ if (options.summaryProcess === 'start') {
+ total_durasi_response = 0
+ count_durasi_response = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response / total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery
+ }
+ }
+
+ if (options.name === 'total_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_recovery
+ }
+ }
+
+ if (options.name === 'avg_durasi_recovery') {
+ if (options.summaryProcess === 'start') {
+ count_durasi_recovery = 0
+ total_durasi_recovery = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery / total_durasi_recovery
+ }
+ }
+}
+
const setAgreementDialog = (status: boolean, progress: number) => {
agreeToShowDialog.value = status
progressSelected.value = progress
diff --git a/src/components/Pages/Gangguan/Rekap/RGangguan_PerRegu.vue b/src/components/Pages/Gangguan/Rekap/RGangguan_PerRegu.vue
index b8888be..97c2963 100755
--- a/src/components/Pages/Gangguan/Rekap/RGangguan_PerRegu.vue
+++ b/src/components/Pages/Gangguan/Rekap/RGangguan_PerRegu.vue
@@ -49,13 +49,15 @@
:calculate-display-value="(item: any) => data.findIndex((i) => i == item) + 1"
/>
+
+
-
+
+
@@ -332,14 +375,24 @@
+
@@ -375,49 +428,63 @@
+
@@ -447,13 +514,22 @@
/>
+
@@ -888,7 +964,6 @@ import {
DxColumn,
DxColumnFixing,
DxExport,
- DxLoadPanel,
DxPager,
DxPaging,
DxScrolling,
@@ -910,7 +985,6 @@ import {
exportDetailToXLSX,
exportToDOCX,
exportDetailToDOCX
-
} from '@/report/Gangguan/Rekap/RGangguan_PerRegu'
import BufferDialog from '@/components/Dialogs/BufferDialog.vue'
@@ -934,10 +1008,126 @@ const reportMeta = ref({
periode: '',
groupBy: false
})
+const grouping = ref([
+ {
+ data: '',
+ caption: 'Seluruh Unit'
+ }
+])
const agreeToShowDialog = ref(false)
const progressSelected = ref(0)
const isGroupBy = ref(false)
+let total = 0
+let total_selesai = 0
+let total_inproses = 0
+let count_durasi_response = 0
+let total_durasi_response = 0
+let total_durasi_recovery = 0
+let count_durasi_recovery = 0
+const calculateCustomSummary = (options: any) => {
+ if (options.name === 'total') {
+ if (options.summaryProcess === 'calculate') {
+ total += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total
+ }
+ }
+
+ if (options.name === 'total_selesai') {
+ if (options.summaryProcess === 'calculate') {
+ total_selesai += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_selesai
+ }
+ }
+
+ if (options.name === 'total_inproses') {
+ if (options.summaryProcess === 'calculate') {
+ total_inproses += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_inproses
+ }
+ }
+
+ if (options.name === 'persen_selesai') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_selesai = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_selesai / total) * 100
+ }
+ }
+
+ if (options.name === 'persen_inproses') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_inproses = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_inproses / total) * 100
+ }
+ }
+
+ if (options.name === 'persen_selesai') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_selesai = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_selesai / total) * 100
+ }
+ }
+
+ if (options.name === 'total_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response
+ }
+ }
+
+ if (options.name === 'avg_durasi_response') {
+ if (options.summaryProcess === 'start') {
+ total_durasi_response = 0
+ count_durasi_response = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response / total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery
+ }
+ }
+
+ if (options.name === 'total_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_recovery
+ }
+ }
+
+ if (options.name === 'avg_durasi_recovery') {
+ if (options.summaryProcess === 'start') {
+ count_durasi_recovery = 0
+ total_durasi_recovery = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery / total_durasi_recovery
+ }
+ }
+}
+
const setAgreementDialog = (status: boolean, progress: number) => {
agreeToShowDialog.value = status
progressSelected.value = progress
@@ -1008,7 +1198,6 @@ const onExporting = (e: any) => {
exportToXLSX(reportMeta.value, e)
} else {
exportToDOCX(reportMeta.value, data.value)
-
}
}
@@ -1019,7 +1208,6 @@ const onExportingDetail = (e: any) => {
exportDetailToXLSX(reportMeta.value, e)
} else {
exportDetailToDOCX(reportMeta.value, dataSub.value)
-
}
}
@@ -1045,6 +1233,67 @@ const filterData = async (params: any) => {
resetData()
const dateValue = params.periode.split(' s/d ')
const { posko, uid, up3 } = params
+ isGroupBy.value = params.groupBy
+ if (isGroupBy.value) {
+ if (uid.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_up3',
+ caption: 'UP3'
+ }
+ ]
+
+ if (up3.id != 0 || posko.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_ulp',
+ caption: 'ULP'
+ }
+ ]
+ }
+ } else {
+ grouping.value = [
+ {
+ data: 'nama_uid',
+ caption: 'UID'
+ }
+ ]
+ }
+ } else {
+ if (uid.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_uid',
+ caption: 'UID'
+ }
+ ]
+
+ if (up3.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_up3',
+ caption: 'UP3'
+ }
+ ]
+
+ if (posko.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_ulp',
+ caption: 'ULP'
+ }
+ ]
+ }
+ }
+ } else {
+ grouping.value = [
+ {
+ data: '',
+ caption: 'Seluruh Unit'
+ }
+ ]
+ }
+ }
const query = {
dateFrom: dateValue[0]
@@ -1061,7 +1310,7 @@ const filterData = async (params: any) => {
loadingData.value = true
await requestGraphQl(queries.gangguan.rekap.gangguanPerRegu, query)
.then((result) => {
- isGroupBy.value = params.groupBy
+
if (result.data.data != undefined) {
data.value = result.data.data.rekapitulasiGangguanPerRegu
} else {
diff --git a/src/components/Pages/Gangguan/Rekap/RGangguan_PerTanggal.vue b/src/components/Pages/Gangguan/Rekap/RGangguan_PerTanggal.vue
index 56df85f..8214c32 100755
--- a/src/components/Pages/Gangguan/Rekap/RGangguan_PerTanggal.vue
+++ b/src/components/Pages/Gangguan/Rekap/RGangguan_PerTanggal.vue
@@ -1,81 +1,267 @@
- filterData(filters)"
- @run-report="() => exportToPDF(reportMeta, data, true)" :report-button="true" class="mb-4">
+ filterData(filters)"
+ @run-report="() => exportToPDF(reportMeta, data, true)"
+ :report-button="true"
+ class="mb-4"
+ >
(filters = value)" />
-
+
-
+
-
-
-
+
+
+
-
+
-
-
+
+
-
-
+
+
-
-
-
-
+
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
+
-
-
+
+
@@ -88,48 +274,48 @@
{{
- isNumber(data.text)
- ? data.column.caption == '%'
- ? formatPercentage(data.text)
- : formatNumber(data.text)
- : data.text
- }}
+ isNumber(data.text)
+ ? data.column.caption == '%'
+ ? formatPercentage(data.text)
+ : formatNumber(data.text)
+ : data.text
+ }}
{{
- isNumber(data.text)
- ? data.column.caption == '%'
- ? formatPercentage(data.text)
- : formatNumber(data.text)
- : data.text
- }}
+ isNumber(data.text)
+ ? data.column.caption == '%'
+ ? formatPercentage(data.text)
+ : formatNumber(data.text)
+ : data.text
+ }}
{{
- isNumber(data.text)
- ? data.column.caption == '%'
- ? formatPercentage(data.text)
- : formatNumber(data.text)
- : data.text
- }}
+ isNumber(data.text)
+ ? data.column.caption == '%'
+ ? formatPercentage(data.text)
+ : formatNumber(data.text)
+ : data.text
+ }}
{{
- isNumber(data.text)
- ? data.column.caption == '%'
- ? formatPercentage(data.text)
- : formatNumber(data.text)
- : data.text
- }}
+ isNumber(data.text)
+ ? data.column.caption == '%'
+ ? formatPercentage(data.text)
+ : formatNumber(data.text)
+ : data.text
+ }}
@@ -140,101 +326,323 @@
-
-
-
-
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -270,28 +678,46 @@
Tgl Datang:
-
+
Tgl Nyala:
-
+
Durasi Response Time:
-
+
Durasi Recovery Time:
-
+
@@ -301,12 +727,20 @@
Referensi Marking:
-
+
IDPEL/NO METER:
-
+
@@ -316,17 +750,29 @@
Alamat Pelapor:
-
+
No Telp Pelapor:
-
+
Keterangan Pelapor:
-
+
@@ -354,13 +800,12 @@
import Filters from '@/components/Form/Filters.vue'
import Type9 from '@/components/Form/FiltersType/Type9.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,
DxColumnFixing,
DxExport,
- DxLoadPanel,
DxPager,
DxPaging,
DxScrolling,
@@ -406,6 +851,12 @@ const reportMeta = ref({
periode: '',
groupBy: false
})
+const grouping = ref
([
+ {
+ data: '',
+ caption: 'Seluruh Unit'
+ }
+])
const agreeToShowDialog = ref(false)
const progressSelected = ref(0)
const isGroupBy = ref(false)
@@ -515,6 +966,67 @@ const filterData = async (params: any) => {
resetData()
const dateValue = params.periode.split(' s/d ')
const { posko, uid, up3 } = params
+ isGroupBy.value = params.groupBy
+ if (isGroupBy.value) {
+ if (uid.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_up3',
+ caption: 'UP3'
+ }
+ ]
+
+ if (up3.id != 0 || posko.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_ulp',
+ caption: 'ULP'
+ }
+ ]
+ }
+ } else {
+ grouping.value = [
+ {
+ data: 'nama_uid',
+ caption: 'UID'
+ }
+ ]
+ }
+ } else {
+ if (uid.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_uid',
+ caption: 'UID'
+ }
+ ]
+
+ if (up3.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_up3',
+ caption: 'UP3'
+ }
+ ]
+
+ if (posko.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_ulp',
+ caption: 'ULP'
+ }
+ ]
+ }
+ }
+ } else {
+ grouping.value = [
+ {
+ data: '',
+ caption: 'Seluruh Unit'
+ }
+ ]
+ }
+ }
const query = {
dateFrom: dateValue[0]
@@ -531,7 +1043,6 @@ const filterData = async (params: any) => {
loadingData.value = true
await requestGraphQl(queries.gangguan.rekap.gangguanPerTanggal, query)
.then((result) => {
- isGroupBy.value = params.groupBy
if (result.data.data != undefined) {
data.value = result.data.data.rekapitulasiGangguanPerTanggal
} else {
@@ -558,9 +1069,11 @@ const filterData = async (params: any) => {
let total = 0
let total_selesai = 0
-let persen_selesai = 0
let total_inproses = 0
-let persen_inproses = 0
+let count_durasi_response = 0
+let total_durasi_response = 0
+let total_durasi_recovery = 0
+let count_durasi_recovery = 0
const calculateCustomSummary = (options: any) => {
if (options.name === 'total') {
if (options.summaryProcess === 'calculate') {
@@ -603,6 +1116,65 @@ const calculateCustomSummary = (options: any) => {
options.totalValue = (total_inproses / total) * 100
}
}
+
+ if (options.name === 'persen_selesai') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_selesai = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_selesai / total) * 100
+ }
+ }
+
+ if (options.name === 'total_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response
+ }
+ }
+
+ if (options.name === 'avg_durasi_response') {
+ if (options.summaryProcess === 'start') {
+ total_durasi_response = 0
+ count_durasi_response = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response / total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery
+ }
+ }
+
+ if (options.name === 'total_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_recovery
+ }
+ }
+
+ if (options.name === 'avg_durasi_recovery') {
+ if (options.summaryProcess === 'start') {
+ count_durasi_recovery = 0
+ total_durasi_recovery = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery / total_durasi_recovery
+ }
+ }
}
onMounted(() => {
diff --git a/src/components/Pages/Keluhan/Rekap/RKeluhan_ALL.vue b/src/components/Pages/Keluhan/Rekap/RKeluhan_ALL.vue
index 72f6cff..6f4fb52 100755
--- a/src/components/Pages/Keluhan/Rekap/RKeluhan_ALL.vue
+++ b/src/components/Pages/Keluhan/Rekap/RKeluhan_ALL.vue
@@ -11,7 +11,7 @@
-
+
-
+
-
+
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -218,14 +436,29 @@
-
+
-
+
-
+
Dalam Proses Bidang:
-
+
Selesai Bidang Unit:
-
+
@@ -469,17 +714,30 @@
Alamat Pelapor:
-
+
NO Telp Pelapor:
-
+
Keterangan Pelapor:
-
+
@@ -489,7 +747,12 @@
Uraian:
-
+
@@ -517,12 +780,9 @@ import { ref, onMounted } from 'vue'
import { DxDataGrid } from 'devextreme-vue'
import {
DxColumn,
- DxColumnFixing,
DxExport,
- DxLoadPanel,
DxPaging,
DxPager,
- DxScrolling,
DxSearchPanel,
DxSelection,
DxSummary,
@@ -569,6 +829,134 @@ const reportMeta = ref({
ulp: { id: 0, name: 'Semua Unit Layanan Pelanggan' },
periode: ''
})
+const grouping = ref
([
+ {
+ data: '',
+ caption: 'Semua Unit'
+ },
+ {
+ data: 'nama_regional',
+ caption: 'Regional'
+ },
+ {
+ data: 'nama_uid',
+ caption: 'UID'
+ },
+ {
+ data: 'nama_up3',
+ caption: 'UP3'
+ }
+])
+
+let total = 0
+let total_selesai = 0
+let total_inproses = 0
+let count_durasi_response = 0
+let total_durasi_response = 0
+let total_durasi_recovery = 0
+let count_durasi_recovery = 0
+const calculateCustomSummary = (options: any) => {
+ if (options.name === 'total') {
+ if (options.summaryProcess === 'calculate') {
+ total += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total
+ }
+ }
+
+ if (options.name === 'total_selesai') {
+ if (options.summaryProcess === 'calculate') {
+ total_selesai += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_selesai
+ }
+ }
+
+ if (options.name === 'total_inproses') {
+ if (options.summaryProcess === 'calculate') {
+ total_inproses += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_inproses
+ }
+ }
+
+ if (options.name === 'persen_selesai') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_selesai = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_selesai / total) * 100
+ }
+ }
+
+ if (options.name === 'persen_inproses') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_inproses = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_inproses / total) * 100
+ }
+ }
+
+ if (options.name === 'persen_selesai') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_selesai = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_selesai / total) * 100
+ }
+ }
+
+ if (options.name === 'total_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response
+ }
+ }
+
+ if (options.name === 'avg_durasi_response') {
+ if (options.summaryProcess === 'start') {
+ total_durasi_response = 0
+ count_durasi_response = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response / total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery
+ }
+ }
+
+ if (options.name === 'total_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_recovery
+ }
+ }
+
+ if (options.name === 'avg_durasi_recovery') {
+ if (options.summaryProcess === 'start') {
+ count_durasi_recovery = 0
+ total_durasi_recovery = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery / total_durasi_recovery
+ }
+ }
+}
const onCellClicked = (e: any) => {
console.log('cell clicked', e)
@@ -638,6 +1026,50 @@ const filterData = async (params: any) => {
const { ulp, uid, up3 } = params
const dateValue = params.periode.split(' s/d ')
+ var groupList: any[] = [
+ {
+ data: '',
+ caption: 'Semua Unit'
+ },
+ {
+ data: 'nama_regional',
+ caption: 'Regional'
+ },
+ {
+ data: 'nama_uid',
+ caption: 'UID'
+ },
+ {
+ data: 'nama_up3',
+ caption: 'UP3'
+ }
+ ]
+
+ if (uid?.id != 0) {
+ groupList.forEach((item, index) => {
+ if (item.caption == 'Semua Unit' || item.caption == 'Regional') {
+ groupList.splice(index, 1)
+ }
+ })
+
+ if (up3?.id != 0) {
+ groupList.forEach((item, index) => {
+ if (item.caption == 'UID') {
+ groupList.splice(index, 1)
+ }
+ })
+
+ if (ulp?.id != 0) {
+ groupList.forEach((item, index) => {
+ if (item.caption == 'UP3') {
+ groupList.splice(index, 1)
+ }
+ })
+ }
+ }
+ }
+ grouping.value = groupList
+
const query = {
dateFrom: dateValue[0]
? dateValue[0].split('-').reverse().join('-')
diff --git a/src/components/Pages/Keluhan/Rekap/RKeluhan_PerFungsiBidang.vue b/src/components/Pages/Keluhan/Rekap/RKeluhan_PerFungsiBidang.vue
index 7d6f44d..e39f947 100755
--- a/src/components/Pages/Keluhan/Rekap/RKeluhan_PerFungsiBidang.vue
+++ b/src/components/Pages/Keluhan/Rekap/RKeluhan_PerFungsiBidang.vue
@@ -45,29 +45,20 @@
:width="50"
alignment="center"
data-type="number"
- data-field="number"
caption="No"
cell-template="formatNumber"
+ :calculate-display-value="(item: any) => data.findIndex((i) => i == item) + 1"
/>
-
+
+
-
+
+
+
@@ -779,7 +819,6 @@ import {
DxColumn,
DxColumnFixing,
DxExport,
- DxLoadPanel,
DxPaging,
DxPager,
DxSummary,
@@ -828,6 +867,122 @@ const reportMeta = ref({
periode: '',
groupBy: false
})
+const grouping = ref([
+ {
+ data: '',
+ caption: 'Seluruh Unit'
+ }
+])
+
+let total = 0
+let total_selesai = 0
+let total_inproses = 0
+let count_durasi_response = 0
+let total_durasi_response = 0
+let total_durasi_recovery = 0
+let count_durasi_recovery = 0
+const calculateCustomSummary = (options: any) => {
+ if (options.name === 'total') {
+ if (options.summaryProcess === 'calculate') {
+ total += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total
+ }
+ }
+
+ if (options.name === 'total_selesai') {
+ if (options.summaryProcess === 'calculate') {
+ total_selesai += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_selesai
+ }
+ }
+
+ if (options.name === 'total_inproses') {
+ if (options.summaryProcess === 'calculate') {
+ total_inproses += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_inproses
+ }
+ }
+
+ if (options.name === 'persen_selesai') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_selesai = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_selesai / total) * 100
+ }
+ }
+
+ if (options.name === 'persen_inproses') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_inproses = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_inproses / total) * 100
+ }
+ }
+
+ if (options.name === 'persen_selesai') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_selesai = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_selesai / total) * 100
+ }
+ }
+
+ if (options.name === 'total_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response
+ }
+ }
+
+ if (options.name === 'avg_durasi_response') {
+ if (options.summaryProcess === 'start') {
+ total_durasi_response = 0
+ count_durasi_response = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response / total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery
+ }
+ }
+
+ if (options.name === 'total_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_recovery
+ }
+ }
+
+ if (options.name === 'avg_durasi_recovery') {
+ if (options.summaryProcess === 'start') {
+ count_durasi_recovery = 0
+ total_durasi_recovery = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery / total_durasi_recovery
+ }
+ }
+}
const setAgreementDialog = (status: boolean, progress: number) => {
agreeToShowDialog.value = status
@@ -843,6 +998,67 @@ const filterData = async (params: any) => {
resetData()
const dateValue = params.periode.split(' s/d ')
const { ulp, uid, up3 } = params
+ isGroupBy.value = params.groupBy
+ if (isGroupBy.value) {
+ if (uid.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_up3',
+ caption: 'UP3'
+ }
+ ]
+
+ if (up3.id != 0 || ulp.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_ulp',
+ caption: 'ULP'
+ }
+ ]
+ }
+ } else {
+ grouping.value = [
+ {
+ data: 'nama_uid',
+ caption: 'UID'
+ }
+ ]
+ }
+ } else {
+ if (uid.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_uid',
+ caption: 'UID'
+ }
+ ]
+
+ if (up3.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_up3',
+ caption: 'UP3'
+ }
+ ]
+
+ if (ulp.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_ulp',
+ caption: 'ULP'
+ }
+ ]
+ }
+ }
+ } else {
+ grouping.value = [
+ {
+ data: '',
+ caption: 'Seluruh Unit'
+ }
+ ]
+ }
+ }
const query = {
dateFrom: dateValue[0]
@@ -860,7 +1076,6 @@ const filterData = async (params: any) => {
await requestGraphQl(queries.keluhan.rekap.keluhanPenyelesaianPerFungsiBIidang, query)
.then((result) => {
if (result.data.data != undefined) {
- isGroupBy.value = params.groupBy
if (filters.value.groupBy) {
data.value = [...result.data.data.rekapitulasiKeluhanPenyelesaianPerFungsiBidang]
.sort((a, b) => a.nama_uid.localeCompare(b.nama_uid))
diff --git a/src/components/Pages/Keluhan/Rekap/RKeluhan_PerJenisKeluhan.vue b/src/components/Pages/Keluhan/Rekap/RKeluhan_PerJenisKeluhan.vue
index 9a92bcf..d9055c2 100755
--- a/src/components/Pages/Keluhan/Rekap/RKeluhan_PerJenisKeluhan.vue
+++ b/src/components/Pages/Keluhan/Rekap/RKeluhan_PerJenisKeluhan.vue
@@ -128,6 +128,19 @@
css-class="custom-table-column"
cell-template="formatNumber"
/>
+
+
-
+
+
+
+
+ {
+ if (options.name === 'total') {
+ if (options.summaryProcess === 'calculate') {
+ total += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total
+ }
+ }
+
+ if (options.name === 'total_selesai') {
+ if (options.summaryProcess === 'calculate') {
+ total_selesai += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_selesai
+ }
+ }
+
+ if (options.name === 'total_inproses') {
+ if (options.summaryProcess === 'calculate') {
+ total_inproses += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_inproses
+ }
+ }
+
+ if (options.name === 'persen_selesai') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_selesai = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_selesai / total) * 100
+ }
+ }
+
+ if (options.name === 'persen_inproses') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_inproses = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_inproses / total) * 100
+ }
+ }
+
+ if (options.name === 'persen_selesai') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_selesai = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_selesai / total) * 100
+ }
+ }
+
+ if (options.name === 'total_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response
+ }
+ }
+
+ if (options.name === 'avg_durasi_response') {
+ if (options.summaryProcess === 'start') {
+ total_durasi_response = 0
+ count_durasi_response = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response / total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery
+ }
+ }
+
+ if (options.name === 'total_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_recovery
+ }
+ }
+
+ if (options.name === 'avg_durasi_recovery') {
+ if (options.summaryProcess === 'start') {
+ count_durasi_recovery = 0
+ total_durasi_recovery = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery / total_durasi_recovery
+ }
+ }
+}
+
const setAgreementDialog = (status: boolean, progress: number) => {
agreeToShowDialog.value = status
progressSelected.value = progress
diff --git a/src/components/Pages/Keluhan/Rekap/RKeluhan_PerKelompokKeluhan.vue b/src/components/Pages/Keluhan/Rekap/RKeluhan_PerKelompokKeluhan.vue
index 62e2827..def15ec 100755
--- a/src/components/Pages/Keluhan/Rekap/RKeluhan_PerKelompokKeluhan.vue
+++ b/src/components/Pages/Keluhan/Rekap/RKeluhan_PerKelompokKeluhan.vue
@@ -50,24 +50,15 @@
cell-template="formatNumber"
/>
-
+
+
-
+
+
+ ([
+ {
+ data: '',
+ caption: 'Seluruh Distribusi'
+ }
+])
+
+let total = 0
+let total_selesai = 0
+let total_inproses = 0
+let count_durasi_response = 0
+let total_durasi_response = 0
+let total_durasi_recovery = 0
+let count_durasi_recovery = 0
+const calculateCustomSummary = (options: any) => {
+ if (options.name === 'total') {
+ if (options.summaryProcess === 'calculate') {
+ total += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total
+ }
+ }
+
+ if (options.name === 'total_selesai') {
+ if (options.summaryProcess === 'calculate') {
+ total_selesai += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_selesai
+ }
+ }
+
+ if (options.name === 'total_inproses') {
+ if (options.summaryProcess === 'calculate') {
+ total_inproses += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_inproses
+ }
+ }
+
+ if (options.name === 'persen_selesai') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_selesai = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_selesai / total) * 100
+ }
+ }
+
+ if (options.name === 'persen_inproses') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_inproses = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_inproses / total) * 100
+ }
+ }
+
+ if (options.name === 'persen_selesai') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_selesai = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_selesai / total) * 100
+ }
+ }
+
+ if (options.name === 'total_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response
+ }
+ }
+
+ if (options.name === 'avg_durasi_response') {
+ if (options.summaryProcess === 'start') {
+ total_durasi_response = 0
+ count_durasi_response = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response / total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery
+ }
+ }
+
+ if (options.name === 'total_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_recovery
+ }
+ }
+
+ if (options.name === 'avg_durasi_recovery') {
+ if (options.summaryProcess === 'start') {
+ count_durasi_recovery = 0
+ total_durasi_recovery = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery / total_durasi_recovery
+ }
+ }
+}
const setAgreementDialog = (status: boolean, progress: number) => {
agreeToShowDialog.value = status
@@ -849,6 +994,67 @@ const filterData = async (params: any) => {
resetData()
const dateValue = params.periode.split(' s/d ')
const { ulp, uid, up3 } = params
+ isGroupBy.value = params.groupBy
+ if (isGroupBy.value) {
+ if (uid.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_up3',
+ caption: 'UP3'
+ }
+ ]
+
+ if (up3.id != 0 || ulp.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_ulp',
+ caption: 'ULP'
+ }
+ ]
+ }
+ } else {
+ grouping.value = [
+ {
+ data: 'nama_uid',
+ caption: 'UID'
+ }
+ ]
+ }
+ } else {
+ if (uid.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_uid',
+ caption: 'UID'
+ }
+ ]
+
+ if (up3.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_up3',
+ caption: 'UP3'
+ }
+ ]
+
+ if (ulp.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_ulp',
+ caption: 'ULP'
+ }
+ ]
+ }
+ }
+ } else {
+ grouping.value = [
+ {
+ data: '',
+ caption: 'Seluruh Distribusi'
+ }
+ ]
+ }
+ }
const query = {
dateFrom: dateValue[0]
@@ -870,7 +1076,6 @@ const filterData = async (params: any) => {
query
)
.then((result) => {
- isGroupBy.value = params.groupBy
if (result.data.data != undefined) {
data.value = isGroupBy.value
? result.data.data.rekapitulasiKeluhanPerKelompokKeluhanUid
diff --git a/src/components/Pages/Keluhan/Rekap/RKeluhan_PerTanggal.vue b/src/components/Pages/Keluhan/Rekap/RKeluhan_PerTanggal.vue
index 57abaa2..0552066 100755
--- a/src/components/Pages/Keluhan/Rekap/RKeluhan_PerTanggal.vue
+++ b/src/components/Pages/Keluhan/Rekap/RKeluhan_PerTanggal.vue
@@ -58,22 +58,15 @@
cell-template="formatText"
/>
-
+
+
-
+
+
+ ([
+ {
+ data: '',
+ caption: 'Seluruh Distribusi'
+ }
+])
+
+let total = 0
+let total_selesai = 0
+let total_inproses = 0
+let count_durasi_response = 0
+let total_durasi_response = 0
+let total_durasi_recovery = 0
+let count_durasi_recovery = 0
+const calculateCustomSummary = (options: any) => {
+ if (options.name === 'total') {
+ if (options.summaryProcess === 'calculate') {
+ total += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total
+ }
+ }
+
+ if (options.name === 'total_selesai') {
+ if (options.summaryProcess === 'calculate') {
+ total_selesai += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_selesai
+ }
+ }
+
+ if (options.name === 'total_inproses') {
+ if (options.summaryProcess === 'calculate') {
+ total_inproses += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_inproses
+ }
+ }
+
+ if (options.name === 'persen_selesai') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_selesai = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_selesai / total) * 100
+ }
+ }
+
+ if (options.name === 'persen_inproses') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_inproses = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_inproses / total) * 100
+ }
+ }
+
+ if (options.name === 'persen_selesai') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_selesai = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_selesai / total) * 100
+ }
+ }
+
+ if (options.name === 'total_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response
+ }
+ }
+
+ if (options.name === 'avg_durasi_response') {
+ if (options.summaryProcess === 'start') {
+ total_durasi_response = 0
+ count_durasi_response = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response / total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery
+ }
+ }
+
+ if (options.name === 'total_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_recovery
+ }
+ }
+
+ if (options.name === 'avg_durasi_recovery') {
+ if (options.summaryProcess === 'start') {
+ count_durasi_recovery = 0
+ total_durasi_recovery = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery / total_durasi_recovery
+ }
+ }
+}
const setAgreementDialog = (status: boolean, progress: number) => {
agreeToShowDialog.value = status
@@ -852,6 +999,67 @@ const filterData = async (params: any) => {
resetData()
const dateValue = params.periode.split(' s/d ')
const { ulp, uid, up3 } = params
+ isGroupBy.value = params.groupBy
+ if (isGroupBy.value) {
+ if (uid.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_up3',
+ caption: 'UP3'
+ }
+ ]
+
+ if (up3.id != 0 || ulp.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_ulp',
+ caption: 'ULP'
+ }
+ ]
+ }
+ } else {
+ grouping.value = [
+ {
+ data: 'nama_uid',
+ caption: 'UID'
+ }
+ ]
+ }
+ } else {
+ if (uid.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_uid',
+ caption: 'UID'
+ }
+ ]
+
+ if (up3.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_up3',
+ caption: 'UP3'
+ }
+ ]
+
+ if (ulp.id != 0) {
+ grouping.value = [
+ {
+ data: 'nama_ulp',
+ caption: 'ULP'
+ }
+ ]
+ }
+ }
+ } else {
+ grouping.value = [
+ {
+ data: '',
+ caption: 'Seluruh Unit'
+ }
+ ]
+ }
+ }
const query = {
dateFrom: dateValue[0]
@@ -868,7 +1076,6 @@ const filterData = async (params: any) => {
loadingData.value = true
await requestGraphQl(queries.keluhan.rekap.keluhanPerTanggal, query)
.then((result) => {
- isGroupBy.value = params.groupBy
if (result.data.data != undefined) {
data.value = result.data.data.rekapitulasiKeluhanPerTanggal
} else {
diff --git a/src/components/Pages/Keluhan/Rekap/RKeluhan_PerUnit.vue b/src/components/Pages/Keluhan/Rekap/RKeluhan_PerUnit.vue
index 5ae97ab..d0ab45f 100755
--- a/src/components/Pages/Keluhan/Rekap/RKeluhan_PerUnit.vue
+++ b/src/components/Pages/Keluhan/Rekap/RKeluhan_PerUnit.vue
@@ -128,6 +128,19 @@
css-class="custom-table-column"
cell-template="formatNumber"
/>
+
+
-
+
+
+
+
+ {
+ if (options.name === 'total') {
+ if (options.summaryProcess === 'calculate') {
+ total += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total
+ }
+ }
+
+ if (options.name === 'total_selesai') {
+ if (options.summaryProcess === 'calculate') {
+ total_selesai += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_selesai
+ }
+ }
+
+ if (options.name === 'total_inproses') {
+ if (options.summaryProcess === 'calculate') {
+ total_inproses += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_inproses
+ }
+ }
+
+ if (options.name === 'persen_selesai') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_selesai = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_selesai / total) * 100
+ }
+ }
+
+ if (options.name === 'persen_inproses') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_inproses = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_inproses / total) * 100
+ }
+ }
+
+ if (options.name === 'persen_selesai') {
+ if (options.summaryProcess === 'start') {
+ total = 0
+ total_selesai = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = (total_selesai / total) * 100
+ }
+ }
+
+ if (options.name === 'total_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_response') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_response += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response
+ }
+ }
+
+ if (options.name === 'avg_durasi_response') {
+ if (options.summaryProcess === 'start') {
+ total_durasi_response = 0
+ count_durasi_response = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_response / total_durasi_response
+ }
+ }
+
+ if (options.name === 'count_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ count_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery
+ }
+ }
+
+ if (options.name === 'total_durasi_recovery') {
+ if (options.summaryProcess === 'calculate') {
+ total_durasi_recovery += options.value
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = total_durasi_recovery
+ }
+ }
+
+ if (options.name === 'avg_durasi_recovery') {
+ if (options.summaryProcess === 'start') {
+ count_durasi_recovery = 0
+ total_durasi_recovery = 0
+ } else if (options.summaryProcess === 'finalize') {
+ options.totalValue = count_durasi_recovery / total_durasi_recovery
+ }
+ }
+}
+
const setAgreementDialog = (status: boolean, progress: number) => {
agreeToShowDialog.value = status
progressSelected.value = progress
diff --git a/src/components/Pages/Monalisa/Laporan/Bulanan/MonalisaLB_AgingComplaint.vue b/src/components/Pages/Monalisa/Laporan/Bulanan/MonalisaLB_AgingComplaint.vue
index 182181f..fa247eb 100755
--- a/src/components/Pages/Monalisa/Laporan/Bulanan/MonalisaLB_AgingComplaint.vue
+++ b/src/components/Pages/Monalisa/Laporan/Bulanan/MonalisaLB_AgingComplaint.vue
@@ -45,36 +45,15 @@
css-class="custom-table-column"
>
-
-