Refactor code to update version numbers and fix bugs in Gangguan and Monalisa components
This commit is contained in:
@ -22,7 +22,7 @@
|
||||
:allow-column-resizing="true"
|
||||
column-resizing-mode="widget"
|
||||
>
|
||||
<DxPaging :page-size="20" :enabled="true" />
|
||||
<DxPaging :page-size="20" :enabled="true" :page-index="0" />
|
||||
<DxPager
|
||||
:visible="true"
|
||||
:allowed-page-sizes="[20, 50, 100]"
|
||||
@ -351,7 +351,6 @@ import { DxDataGrid } from 'devextreme-vue'
|
||||
import {
|
||||
DxColumn,
|
||||
DxExport,
|
||||
DxLoadPanel,
|
||||
DxPager,
|
||||
DxPaging,
|
||||
DxSearchPanel,
|
||||
|
@ -589,13 +589,13 @@
|
||||
</DxSummary>
|
||||
|
||||
<template #formatText="{ data }">
|
||||
<p class="text-left cursor-pointer" @click="setAgreementDialog(data.column.caption)">
|
||||
<p class="text-left cursor-pointer" @click="setDialogStatus(data.column.caption)">
|
||||
{{ data.text }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<template #formatNumber="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setAgreementDialog(data.column.caption)">
|
||||
<p class="text-right cursor-pointer" @click="setDialogStatus(data.column.caption)">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@ -607,7 +607,7 @@
|
||||
</template>
|
||||
|
||||
<template #formatTime="{ data }">
|
||||
<p class="cursor-pointer" @click="setAgreementDialog(data.column.caption)">
|
||||
<p class="cursor-pointer" @click="setDialogStatus(data.column.caption)">
|
||||
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
|
||||
</p>
|
||||
</template>
|
||||
@ -616,7 +616,7 @@
|
||||
<p
|
||||
class="text-right cursor-pointer"
|
||||
:class="[data.text < 5 ? 'text-green-500' : 'text-red-500']"
|
||||
@click="setAgreementDialog(data.column.caption)"
|
||||
@click="setDialogStatus(data.column.caption)"
|
||||
>
|
||||
{{
|
||||
isNumber(data.text)
|
||||
@ -632,7 +632,7 @@
|
||||
<p
|
||||
class="text-right cursor-pointer"
|
||||
:class="[data.text < 45 ? 'text-green-500' : 'text-red-500']"
|
||||
@click="setAgreementDialog(data.column.caption)"
|
||||
@click="setDialogStatus(data.column.caption)"
|
||||
>
|
||||
{{
|
||||
isNumber(data.text)
|
||||
@ -648,7 +648,7 @@
|
||||
<p
|
||||
class="text-right cursor-pointer"
|
||||
:class="[data.text < 180 ? 'text-green-500' : 'text-red-500']"
|
||||
@click="setAgreementDialog(data.column.caption)"
|
||||
@click="setDialogStatus(data.column.caption)"
|
||||
>
|
||||
{{
|
||||
isNumber(data.text)
|
||||
@ -1191,7 +1191,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 progressSelected = ref(0)
|
||||
const groupIndex = ref(0)
|
||||
const groupDialog = ref(false)
|
||||
@ -1226,7 +1226,7 @@ const onCellClicked = (e: any) => {
|
||||
groupDialog.value = true
|
||||
groupIndex.value = e.row.groupIndex
|
||||
|
||||
setAgreementDialog(e.column.caption)
|
||||
setDialogStatus(e.column.caption)
|
||||
groupData.value = getDataRowGroup(e.data)
|
||||
showDetail()
|
||||
} else {
|
||||
@ -1234,9 +1234,9 @@ const onCellClicked = (e: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
const setAgreementDialog = (column: string) => {
|
||||
const setDialogStatus = (column: string) => {
|
||||
if (column == 'Total' || column == 'Selesai' || column == 'In Progress') {
|
||||
agreeToShowDialog.value = true
|
||||
isDialogEnabled.value = true
|
||||
if (column == 'Total') {
|
||||
progressSelected.value = 0
|
||||
} else if (column == 'Selesai') {
|
||||
@ -1245,7 +1245,7 @@ const setAgreementDialog = (column: string) => {
|
||||
progressSelected.value = 2
|
||||
}
|
||||
} else {
|
||||
agreeToShowDialog.value = false
|
||||
isDialogEnabled.value = false
|
||||
}
|
||||
}
|
||||
|
||||
@ -1580,7 +1580,7 @@ const clearSelection = () => {
|
||||
}
|
||||
const showDetail = () => {
|
||||
clearSelection()
|
||||
if (agreeToShowDialog.value) {
|
||||
if (isDialogEnabled.value) {
|
||||
dataSub.value = []
|
||||
dataSubSelected.value = null
|
||||
getDetail()
|
||||
|
@ -480,7 +480,7 @@ const closedialogDetail = () => (dialogDetail.value = false)
|
||||
const loadingData = ref(false)
|
||||
const loadingSubData = ref(false)
|
||||
const monthSelected = ref<any>(null)
|
||||
const agreeToShowDialog = ref(false)
|
||||
const isDialogEnabled = ref(false)
|
||||
const groupIndex = ref(0)
|
||||
const groupDialog = ref(false)
|
||||
const groupData = ref<any>(null)
|
||||
|
@ -334,13 +334,13 @@
|
||||
</DxColumn>
|
||||
|
||||
<template #formatText="{ data }">
|
||||
<p class="text-left" @click="setAgreementDialog(data.column.caption)">
|
||||
<p class="text-left" @click="setDialogStatus(data.column.caption)">
|
||||
{{ data.text }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<template #formatNumber="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setAgreementDialog(data.column.caption)">
|
||||
<p class="text-right cursor-pointer" @click="setDialogStatus(data.column.caption)">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@ -352,13 +352,13 @@
|
||||
</template>
|
||||
|
||||
<template #formatPercentage="{ data }">
|
||||
<p class="text-right" @click="setAgreementDialog(data.column.caption)">
|
||||
<p class="text-right" @click="setDialogStatus(data.column.caption)">
|
||||
{{ parseFloat(data.text) ? formatPercentage(data.text) : '0%' }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<template #formatTime="{ data }">
|
||||
<p class="!text-right" @click="setAgreementDialog(data.column.caption)">
|
||||
<p class="!text-right" @click="setDialogStatus(data.column.caption)">
|
||||
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
|
||||
</p>
|
||||
</template>
|
||||
@ -797,7 +797,7 @@ const dialogDetail = ref(false)
|
||||
const loadingData = ref(false)
|
||||
const loadingSubData = ref(false)
|
||||
const progressSelected = ref(0)
|
||||
const agreeToShowDialog = ref(false)
|
||||
const isDialogEnabled = ref(false)
|
||||
const reportMeta = ref({
|
||||
uid: { id: 0, name: 'Semua Unit Induk Distribusi/Wilayah' },
|
||||
up3: { id: 0, name: 'Semua Unit Pelaksanaan Pelayanan Pelanggan' },
|
||||
@ -805,9 +805,9 @@ const reportMeta = ref({
|
||||
periode: ''
|
||||
})
|
||||
|
||||
const setAgreementDialog = (column: string) => {
|
||||
const setDialogStatus = (column: string) => {
|
||||
if (column == 'd=(e+g)' || column == 'e' || column == 'g') {
|
||||
agreeToShowDialog.value = true
|
||||
isDialogEnabled.value = true
|
||||
if (column == 'd=(e+g)') {
|
||||
progressSelected.value = 0
|
||||
} else if (column == 'e') {
|
||||
@ -816,7 +816,7 @@ const setAgreementDialog = (column: string) => {
|
||||
progressSelected.value = 2
|
||||
}
|
||||
} else {
|
||||
agreeToShowDialog.value = false
|
||||
isDialogEnabled.value = false
|
||||
}
|
||||
}
|
||||
|
||||
@ -864,7 +864,7 @@ const clearSelection = () => {
|
||||
}
|
||||
const showDetail = () => {
|
||||
clearSelection()
|
||||
if (agreeToShowDialog.value) {
|
||||
if (isDialogEnabled.value) {
|
||||
dataSub.value = []
|
||||
dataSubSelected.value = null
|
||||
getDetail()
|
||||
|
@ -277,13 +277,13 @@
|
||||
</DxColumn>
|
||||
|
||||
<template #formatText="{ data }">
|
||||
<p class="text-left cursor-pointer" @click="setAgreementDialog(false, 0)">
|
||||
<p class="text-left cursor-pointer" @click="setDialogStatus(false, 0)">
|
||||
{{ data.text }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<template #formatNumber="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setAgreementDialog(false, 0)">
|
||||
<p class="text-right cursor-pointer" @click="setDialogStatus(false, 0)">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@ -295,7 +295,7 @@
|
||||
</template>
|
||||
|
||||
<template #formatNumberLaporanTotal="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setAgreementDialog(true, 0)">
|
||||
<p class="text-right cursor-pointer" @click="setDialogStatus(true, 0)">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@ -307,7 +307,7 @@
|
||||
</template>
|
||||
|
||||
<template #formatNumberLaporanJmlSelesai="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setAgreementDialog(true, 1)">
|
||||
<p class="text-right cursor-pointer" @click="setDialogStatus(true, 1)">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@ -319,7 +319,7 @@
|
||||
</template>
|
||||
|
||||
<template #formatNumberLaporanJmlBelumSelesai="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setAgreementDialog(true, 2)">
|
||||
<p class="text-right cursor-pointer" @click="setDialogStatus(true, 2)">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@ -331,7 +331,7 @@
|
||||
</template>
|
||||
|
||||
<template #formatTime="{ data }">
|
||||
<p class="!text-right cursor-pointer" @click="setAgreementDialog(false, 0)">
|
||||
<p class="!text-right cursor-pointer" @click="setDialogStatus(false, 0)">
|
||||
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
|
||||
</p>
|
||||
</template>
|
||||
@ -1011,7 +1011,7 @@ const reportMeta = ref({
|
||||
posko: { id: 0, name: 'Semua Posko' },
|
||||
periode: ''
|
||||
})
|
||||
const agreeToShowDialog = ref(false)
|
||||
const isDialogEnabled = ref(false)
|
||||
const progressSelected = ref(0)
|
||||
|
||||
let total = 0
|
||||
@ -1131,8 +1131,8 @@ const calculateCustomSummary = (options: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
const setAgreementDialog = (status: boolean, progress: number) => {
|
||||
agreeToShowDialog.value = status
|
||||
const setDialogStatus = (status: boolean, progress: number) => {
|
||||
isDialogEnabled.value = status
|
||||
progressSelected.value = progress
|
||||
}
|
||||
|
||||
@ -1248,7 +1248,7 @@ const showDetail = () => {
|
||||
clearSelection()
|
||||
dataSub.value = []
|
||||
dataSubSelected.value = null
|
||||
if (agreeToShowDialog.value) {
|
||||
if (isDialogEnabled.value) {
|
||||
getDetail()
|
||||
}
|
||||
}
|
||||
|
@ -557,13 +557,13 @@
|
||||
</DxSummary>
|
||||
|
||||
<template #formatText="{ data }">
|
||||
<p class="text-left cursor-pointer" @click="setAgreementDialog(false, 0)">
|
||||
<p class="text-left cursor-pointer" @click="setDialogStatus(false, 0)">
|
||||
{{ data.text }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<template #formatNumber="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setAgreementDialog(false, 0)">
|
||||
<p class="text-right cursor-pointer" @click="setDialogStatus(false, 0)">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@ -575,7 +575,7 @@
|
||||
</template>
|
||||
|
||||
<template #formatNumberLaporanTotal="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setAgreementDialog(true, 0)">
|
||||
<p class="text-right cursor-pointer" @click="setDialogStatus(true, 0)">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@ -587,7 +587,7 @@
|
||||
</template>
|
||||
|
||||
<template #formatNumberLaporanJmlSelesai="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setAgreementDialog(true, 1)">
|
||||
<p class="text-right cursor-pointer" @click="setDialogStatus(true, 1)">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@ -599,7 +599,7 @@
|
||||
</template>
|
||||
|
||||
<template #formatNumberLaporanJmlBelumSelesai="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setAgreementDialog(true, 2)">
|
||||
<p class="text-right cursor-pointer" @click="setDialogStatus(true, 2)">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@ -611,7 +611,7 @@
|
||||
</template>
|
||||
|
||||
<template #formatTime="{ data }">
|
||||
<p class="!text-right cursor-pointer" @click="setAgreementDialog(false, 0)">
|
||||
<p class="!text-right cursor-pointer" @click="setDialogStatus(false, 0)">
|
||||
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
|
||||
</p>
|
||||
</template>
|
||||
@ -999,7 +999,7 @@ const reportMeta = ref({
|
||||
up3: { id: 0, name: 'Semua Unit Pelaksanaan Pelayanan Pelanggan' },
|
||||
periode: ''
|
||||
})
|
||||
const agreeToShowDialog = ref(false)
|
||||
const isDialogEnabled = ref(false)
|
||||
const progressSelected = ref(0)
|
||||
|
||||
let total = 0
|
||||
@ -1119,8 +1119,8 @@ const calculateCustomSummary = (options: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
const setAgreementDialog = (status: boolean, progress: number) => {
|
||||
agreeToShowDialog.value = status
|
||||
const setDialogStatus = (status: boolean, progress: number) => {
|
||||
isDialogEnabled.value = status
|
||||
progressSelected.value = progress
|
||||
}
|
||||
|
||||
@ -1173,7 +1173,7 @@ const showDetail = () => {
|
||||
clearSelection()
|
||||
dataSub.value = []
|
||||
dataSubSelected.value = null
|
||||
if (agreeToShowDialog.value) {
|
||||
if (isDialogEnabled.value) {
|
||||
getDetail()
|
||||
}
|
||||
}
|
||||
|
@ -560,19 +560,19 @@
|
||||
</DxSummary>
|
||||
|
||||
<template #formatText="{ data }">
|
||||
<p class="text-left cursor-pointer" @click="setAgreementDialog(false, 0)">
|
||||
<p class="text-left cursor-pointer" @click="setDialogStatus(false, 0)">
|
||||
{{ data.text }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<template #formatNumbering="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setAgreementDialog(false, 0)">
|
||||
<p class="text-right cursor-pointer" @click="setDialogStatus(false, 0)">
|
||||
{{ data.rowIndex }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<template #formatNumber="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setAgreementDialog(false, 0)">
|
||||
<p class="text-right cursor-pointer" @click="setDialogStatus(false, 0)">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@ -584,7 +584,7 @@
|
||||
</template>
|
||||
|
||||
<template #formatNumberLaporanTotal="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setAgreementDialog(true, 0)">
|
||||
<p class="text-right cursor-pointer" @click="setDialogStatus(true, 0)">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@ -596,7 +596,7 @@
|
||||
</template>
|
||||
|
||||
<template #formatNumberLaporanJmlSelesai="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setAgreementDialog(true, 1)">
|
||||
<p class="text-right cursor-pointer" @click="setDialogStatus(true, 1)">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@ -608,7 +608,7 @@
|
||||
</template>
|
||||
|
||||
<template #formatNumberLaporanJmlBelumSelesai="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setAgreementDialog(true, 2)">
|
||||
<p class="text-right cursor-pointer" @click="setDialogStatus(true, 2)">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@ -619,7 +619,7 @@
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<template #formatTime="{ data }" @click="setAgreementDialog(false, 0)">
|
||||
<template #formatTime="{ data }" @click="setDialogStatus(false, 0)">
|
||||
<p class="!text-right">
|
||||
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
|
||||
</p>
|
||||
@ -1014,7 +1014,7 @@ const grouping = ref<any[]>([
|
||||
caption: 'Seluruh Unit'
|
||||
}
|
||||
])
|
||||
const agreeToShowDialog = ref(false)
|
||||
const isDialogEnabled = ref(false)
|
||||
const progressSelected = ref(0)
|
||||
const isGroupBy = ref(false)
|
||||
|
||||
@ -1135,8 +1135,8 @@ const calculateCustomSummary = (options: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
const setAgreementDialog = (status: boolean, progress: number) => {
|
||||
agreeToShowDialog.value = status
|
||||
const setDialogStatus = (status: boolean, progress: number) => {
|
||||
isDialogEnabled.value = status
|
||||
progressSelected.value = progress
|
||||
}
|
||||
|
||||
@ -1189,7 +1189,7 @@ const showDetail = () => {
|
||||
clearSelection()
|
||||
dataSub.value = []
|
||||
dataSubSelected.value = null
|
||||
if (agreeToShowDialog.value) {
|
||||
if (isDialogEnabled.value) {
|
||||
getDetail()
|
||||
}
|
||||
}
|
||||
|
@ -267,13 +267,13 @@
|
||||
</DxColumn>
|
||||
|
||||
<template #formatText="{ data }">
|
||||
<p class="text-left cursor-pointer" @click="setAgreementDialog(false, 0)">
|
||||
<p class="text-left cursor-pointer" @click="setDialogStatus(false, 0)">
|
||||
{{ data.text }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<template #formatNumber="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setAgreementDialog(false, 0)">
|
||||
<p class="text-right cursor-pointer" @click="setDialogStatus(false, 0)">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@ -285,7 +285,7 @@
|
||||
</template>
|
||||
|
||||
<template #formatNumberLaporanTotal="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setAgreementDialog(true, 0)">
|
||||
<p class="text-right cursor-pointer" @click="setDialogStatus(true, 0)">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@ -297,7 +297,7 @@
|
||||
</template>
|
||||
|
||||
<template #formatNumberLaporanJmlSelesai="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setAgreementDialog(true, 1)">
|
||||
<p class="text-right cursor-pointer" @click="setDialogStatus(true, 1)">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@ -309,7 +309,7 @@
|
||||
</template>
|
||||
|
||||
<template #formatNumberLaporanJmlBelumSelesai="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setAgreementDialog(true, 2)">
|
||||
<p class="text-right cursor-pointer" @click="setDialogStatus(true, 2)">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@ -321,7 +321,7 @@
|
||||
</template>
|
||||
|
||||
<template #formatTime="{ data }">
|
||||
<p class="!text-right cursor-pointer" @click="setAgreementDialog(false, 0)">
|
||||
<p class="!text-right cursor-pointer" @click="setDialogStatus(false, 0)">
|
||||
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
|
||||
</p>
|
||||
</template>
|
||||
@ -859,12 +859,12 @@ const grouping = ref<any[]>([
|
||||
caption: 'Seluruh Unit'
|
||||
}
|
||||
])
|
||||
const agreeToShowDialog = ref(false)
|
||||
const isDialogEnabled = ref(false)
|
||||
const progressSelected = ref(0)
|
||||
const isGroupBy = ref(false)
|
||||
|
||||
const setAgreementDialog = (status: boolean, progress: number) => {
|
||||
agreeToShowDialog.value = status
|
||||
const setDialogStatus = (status: boolean, progress: number) => {
|
||||
isDialogEnabled.value = status
|
||||
progressSelected.value = progress
|
||||
}
|
||||
|
||||
@ -960,7 +960,7 @@ const showDetail = () => {
|
||||
clearSelection()
|
||||
dataSub.value = []
|
||||
dataSubSelected.value = null
|
||||
if (agreeToShowDialog.value) {
|
||||
if (isDialogEnabled.value) {
|
||||
getDetail()
|
||||
}
|
||||
}
|
||||
|
@ -956,8 +956,8 @@ const getDetail = async () => {
|
||||
dialogDetail.value = true
|
||||
})
|
||||
}
|
||||
// const setAgreementDialog = (status: boolean, progress: number) => {
|
||||
// agreeToShowDialog.value = status
|
||||
// const setDialogStatus = (status: boolean, progress: number) => {
|
||||
// isDialogEnabled.value = status
|
||||
// progressSelected.value = progress
|
||||
// }
|
||||
|
||||
|
Reference in New Issue
Block a user