fix: do not allow pinning public views
This commit is contained in:
parent
6f8078d33f
commit
21ba843ceb
@ -402,21 +402,22 @@ const viewActions = computed(() => {
|
||||
]
|
||||
|
||||
if (route.query.view && (!view.value.public || isManager())) {
|
||||
actions[0].items.push(
|
||||
{
|
||||
label: 'Rename',
|
||||
icon: () => h(EditIcon, { class: 'h-4 w-4' }),
|
||||
onClick: () => renameView(),
|
||||
},
|
||||
{
|
||||
actions[0].items.push({
|
||||
label: 'Rename',
|
||||
icon: () => h(EditIcon, { class: 'h-4 w-4' }),
|
||||
onClick: () => renameView(),
|
||||
})
|
||||
|
||||
if (!view.value.public) {
|
||||
actions[0].items.push({
|
||||
label: view.value.pinned ? 'Unpin View' : 'Pin View',
|
||||
icon: () =>
|
||||
h(view.value.pinned ? UnpinIcon : PinIcon, { class: 'h-4 w-4' }),
|
||||
onClick: () => pinView(),
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
if (route.query.view && isManager()) {
|
||||
if (isManager()) {
|
||||
actions[0].items.push({
|
||||
label: view.value.public ? 'Make Private' : 'Make Public',
|
||||
icon: () =>
|
||||
|
||||
@ -25,9 +25,9 @@ export const usersStore = defineStore('crm-users', () => {
|
||||
},
|
||||
})
|
||||
|
||||
if (!users.data?.length) {
|
||||
users.fetch()
|
||||
}
|
||||
// if (!users.data?.length) {
|
||||
// users.fetch()
|
||||
// }
|
||||
|
||||
function getUser(email) {
|
||||
if (!email || email === 'sessionUser') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user