Refactor data sorting and logging in RGangguan_PerPosko.vue
This commit is contained in:
@ -983,15 +983,14 @@ const onExporting = (e: any) => {
|
||||
const onDataSelectionChanged = ({ selectedRowsData }: any) => {
|
||||
if (selectedRowsData[0] != undefined) {
|
||||
dataSelected.value = selectedRowsData[0]
|
||||
}
|
||||
showDetail()
|
||||
}
|
||||
}
|
||||
|
||||
const onDataSubSelectionChanged = ({ selectedRowsData }: any) => {
|
||||
if (selectedRowsData[0] != undefined) {
|
||||
dataSubSelected.value = selectedRowsData[0]
|
||||
}
|
||||
console.log(data)
|
||||
}
|
||||
|
||||
const filterData = (params: any) => {
|
||||
@ -1015,11 +1014,10 @@ const filterData = (params: any) => {
|
||||
|
||||
onResult((queryResult) => {
|
||||
if (queryResult.data != undefined) {
|
||||
data.value = queryResult.data.rekapitulasiGangguanPerPosko.sort((a: any, b: any) =>
|
||||
a.nama_up3 > b.nama_up3 ? 1 : -1
|
||||
)
|
||||
const result: any[] = [...queryResult.data.rekapitulasiGangguanPerPosko]
|
||||
console.table(result)
|
||||
data.value = result.sort((a: any, b: any) => a?.nama_up3.localeCompare(b?.nama_up3))
|
||||
}
|
||||
console.log(queryResult.data)
|
||||
})
|
||||
|
||||
onError((error) => {
|
||||
|
Reference in New Issue
Block a user