This commit is contained in:
2025-07-03 14:57:57 +07:00
parent be4de9f24a
commit 1b05076317
22 changed files with 631 additions and 35 deletions

View File

@@ -0,0 +1,28 @@
import { defineStore } from 'pinia'
import type { PageAccess } from '@/types/menuAkses/access'
export const useHakAksesStore = defineStore('hakAksesMenu', {
state: () => ({
role: '',
pageAccess: [] as PageAccess[], //Array halaman dengan permissions
mergedSidebar: []
}),
actions: {
setAccess(payload: { role: string; pages: PageAccess[] }) {
this.role = payload.role
this.pageAccess = payload.pages
},
resetAccess() {
this.role = ''
this.pageAccess = []
},
setMergedSidebar(data: any) {
this.mergedSidebar = data
}
}
})