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())) {
|
if (route.query.view && (!view.value.public || isManager())) {
|
||||||
actions[0].items.push(
|
actions[0].items.push({
|
||||||
{
|
label: 'Rename',
|
||||||
label: 'Rename',
|
icon: () => h(EditIcon, { class: 'h-4 w-4' }),
|
||||||
icon: () => h(EditIcon, { class: 'h-4 w-4' }),
|
onClick: () => renameView(),
|
||||||
onClick: () => renameView(),
|
})
|
||||||
},
|
|
||||||
{
|
if (!view.value.public) {
|
||||||
|
actions[0].items.push({
|
||||||
label: view.value.pinned ? 'Unpin View' : 'Pin View',
|
label: view.value.pinned ? 'Unpin View' : 'Pin View',
|
||||||
icon: () =>
|
icon: () =>
|
||||||
h(view.value.pinned ? UnpinIcon : PinIcon, { class: 'h-4 w-4' }),
|
h(view.value.pinned ? UnpinIcon : PinIcon, { class: 'h-4 w-4' }),
|
||||||
onClick: () => pinView(),
|
onClick: () => pinView(),
|
||||||
}
|
})
|
||||||
)
|
}
|
||||||
|
|
||||||
if (route.query.view && isManager()) {
|
if (isManager()) {
|
||||||
actions[0].items.push({
|
actions[0].items.push({
|
||||||
label: view.value.public ? 'Make Private' : 'Make Public',
|
label: view.value.public ? 'Make Private' : 'Make Public',
|
||||||
icon: () =>
|
icon: () =>
|
||||||
|
|||||||
@ -25,9 +25,9 @@ export const usersStore = defineStore('crm-users', () => {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
if (!users.data?.length) {
|
// if (!users.data?.length) {
|
||||||
users.fetch()
|
// users.fetch()
|
||||||
}
|
// }
|
||||||
|
|
||||||
function getUser(email) {
|
function getUser(email) {
|
||||||
if (!email || email === 'sessionUser') {
|
if (!email || email === 'sessionUser') {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user