Refactor date formatting and add conditional dialog display
This commit is contained in:
@@ -821,6 +821,7 @@ import { queries, requestGraphQl } from '@/utils/api/api.graphql'
|
||||
import { formatNumber, formatPercentage, isNumber } from '@/utils/numbers'
|
||||
import { apolloClient } from '@/utils/api/api.graphql'
|
||||
import { provideApolloClient } from '@vue/apollo-composable'
|
||||
import { reformatDate } from '@/utils/texts'
|
||||
|
||||
const client = apolloClient()
|
||||
provideApolloClient(client)
|
||||
@@ -890,7 +891,15 @@ const getDetail = async () => {
|
||||
: new Date().toISOString().slice(0, 10),
|
||||
idUlp: selected?.id_ulp ? selected?.id_ulp : 0,
|
||||
idUid: selected?.id_uid ? selected?.id_uid : 0,
|
||||
idUp3: selected?.id_up3 ? selected?.id_up3 : 0
|
||||
idUp3: selected?.id_up3 ? selected?.id_up3 : 0,
|
||||
namaRegional: '',
|
||||
isSelesai: progressSelected.value,
|
||||
media: '',
|
||||
tanggal: selected?.tanggal_lapor
|
||||
? reformatDate(selected?.tanggal_lapor, 'dd/MM/yyyy', 'yyyy-MM-dd')
|
||||
: '',
|
||||
namaIssuetype: '',
|
||||
namaSubissuetype: ''
|
||||
}
|
||||
|
||||
loadingSubData.value = true
|
||||
@@ -918,8 +927,10 @@ const clearSelection = () => {
|
||||
const showDetail = () => {
|
||||
clearSelection()
|
||||
dataSubSelected.value = null
|
||||
dialogDetail.value = true
|
||||
getDetail()
|
||||
if (agreeToShowDialog.value) {
|
||||
dialogDetail.value = true
|
||||
getDetail()
|
||||
}
|
||||
}
|
||||
|
||||
const onExporting = (e: any) => {
|
||||
|
Reference in New Issue
Block a user