Refactor code to update version numbers and fix bugs in Gangguan and Monalisa components

This commit is contained in:
Dede Fuji Abdul
2024-04-19 19:34:54 +07:00
parent 3a891bf159
commit ee034bacf9
28 changed files with 570 additions and 205 deletions

View File

@ -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<any>(null)
const dataSubSelected = ref<any>(null)
const dialogDetail = ref(false)
const loadingSubData = ref(false)
const agreeToShowDialog = ref(false)
const isDialogEnabled = ref(false)
const parameterRequest = ref<any>({
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()
}
}

View File

@ -519,7 +519,7 @@ const dataSelected = ref<any>(null)
const dataSubSelected = ref<any>(null)
const dialogDetail = ref(false)
const loadingSubData = ref(false)
const agreeToShowDialog = ref(false)
const isDialogEnabled = ref(false)
const reportMeta = ref<any>(computed(() => props.filters))
const parameterRequest = ref<any>({
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()
}
}

View File

@ -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<any>(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<any>(computed(() => props.filters))
const parameterRequest = ref<any>({
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()
}
}

View File

@ -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<any>(null)
const reportMeta = ref<any>(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()
}
}