🐛 fix (general-consent): fix mapping data from api

This commit is contained in:
Abizrh
2025-11-20 00:35:25 +07:00
parent 0d821cbe31
commit f1307980ff
3 changed files with 22 additions and 6 deletions
+11 -1
View File
@@ -19,7 +19,17 @@ export function useQueryCRUDMode(key: string = 'mode') {
})
const goToEntry = () => (mode.value = 'entry')
const backToList = () =>(mode.value = 'list')
const backToList = () => {
router.push({
path: route.path,
query: {
...route.query,
mode: 'list',
// HAPUS record-id
'record-id': undefined,
},
})
}
return { mode, goToEntry, backToList }
}