Merge branch 'dev' into feat/laporan-tindakan-185

This commit is contained in:
Khafid Prayoga
2025-12-08 10:59:18 +07:00
committed by GitHub
46 changed files with 1176 additions and 362 deletions
+8 -6
View File
@@ -30,15 +30,17 @@ export function useQueryCRUD(modeKey: string = 'mode', recordIdKey: string = 're
})
const goToEntry = (myRecord_id?: any) => {
if (myRecord_id) {
crudQueryParams.value.mode = 'entry'
crudQueryParams.value.recordId = myRecord_id
if(myRecord_id) {
crudQueryParams.value = { mode: 'entry', recordId: myRecord_id }
} else {
crudQueryParams.value.mode = 'entry'
crudQueryParams.value.recordId = undefined
crudQueryParams.value = { mode: 'entry', recordId: undefined }
}
}
const goToDetail = (myRecord_id: string|number) => {
crudQueryParams.value = { mode: 'list', recordId: String(myRecord_id) }
}
const backToList = () => {
delete route.query[recordIdKey]
router.push({
@@ -50,7 +52,7 @@ export function useQueryCRUD(modeKey: string = 'mode', recordIdKey: string = 're
})
}
return { crudQueryParams, goToEntry, backToList }
return { crudQueryParams, goToEntry, goToDetail, backToList }
}
export function useQueryCRUDMode(key: string = 'mode') {