fix: load users on reload
This commit is contained in:
parent
517619271c
commit
4920027e85
@ -12,6 +12,7 @@ export const usersStore = defineStore('crm-users', () => {
|
||||
url: 'crm.api.session.get_users',
|
||||
cache: 'Users',
|
||||
initialData: [],
|
||||
auto: true,
|
||||
transform(users) {
|
||||
for (let user of users) {
|
||||
usersByName[user.name] = user
|
||||
@ -25,10 +26,6 @@ export const usersStore = defineStore('crm-users', () => {
|
||||
},
|
||||
})
|
||||
|
||||
// if (!users.data?.length) {
|
||||
// users.fetch()
|
||||
// }
|
||||
|
||||
function getUser(email) {
|
||||
if (!email || email === 'sessionUser') {
|
||||
email = session.user
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user