Reset data before filtering

This commit is contained in:
Dede Fuji Abdul
2024-03-31 00:33:46 +07:00
parent 3612a6cf66
commit f2dd2af2bb
45 changed files with 262 additions and 0 deletions

View File

@ -354,7 +354,13 @@ const onExporting = (e: any) => {
}
}
const resetData = () => {
data.value = []
dataSub.value = []
}
const filterData = async (params: any) => {
resetData()
const { regional, ulp, uid, up3, bulan, tahun } = params
lastMonth.value = bulan.id == 1 ? 12 : bulan.id - 1
lastYearMoM.value = bulan.id == 1 ? tahun.id - 1 : tahun.id