This commit is contained in:
2026-02-11 17:46:22 +03:00
commit eacfacb13b
266 changed files with 51337 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
import { defineStore } from 'pinia'
import api from 'src/services/api'
export const useUserPermissionStore = defineStore('userPerm', {
state: () => ({
rows: [],
loading: false,
saving: false
}),
actions: {
async fetch (id) {
this.loading = true
const res = await api.get(`/users/${id}/permissions`)
this.rows = res.data || []
this.loading = false
},
async save (id) {
this.saving = true
await api.post(`/users/${id}/permissions`, this.rows)
this.saving = false
}
}
})