Refactor date formatting and add conditional dialog display

This commit is contained in:
Dede Fuji Abdul
2024-03-29 23:43:49 +07:00
parent ecd685227d
commit 3ca721e389
5 changed files with 134 additions and 37 deletions

View File

@ -572,8 +572,10 @@ const showDetail = () => {
clearSelection()
dataSub.value = []
dataSubSelected.value = null
dialogDetail.value = true
getDetail()
if (date.value != '') {
dialogDetail.value = true
getDetail()
}
}
const closeDialog = () => {
@ -601,10 +603,7 @@ const onExportingDetail = (e: any) => {
const onDataSelectionChanged = ({ selectedRowsData }: any) => {
if (selectedRowsData[0] != undefined) {
dataSelected.value = selectedRowsData[0]
if (date.value != '') {
showDetail()
}
showDetail()
}
}