update event status
This commit is contained in:
@@ -133,8 +133,9 @@ const defaultColor = "#2f88ff";
|
||||
|
||||
// ---------- 权限与门店 ----------
|
||||
|
||||
const canUpdate = computed(() => userStore.hasPermissions(permissionCodes.event.update));
|
||||
const canDeleteEvent = computed(() => userStore.hasPermissions(permissionCodes.event.delete));
|
||||
const isDeletedEvent = computed(() => event.value?.status === "DELETED");
|
||||
const canUpdate = computed(() => !isDeletedEvent.value && userStore.hasPermissions(permissionCodes.event.update));
|
||||
const canDeleteEvent = computed(() => !isDeletedEvent.value && userStore.hasPermissions(permissionCodes.event.delete));
|
||||
const canReadEventRecord = computed(() => userStore.hasPermissions(permissionCodes.eventRecord.read));
|
||||
const isGlobalManager = computed(() => userStore.hasRoles(gaoRoleCodes.globalManager));
|
||||
const storeName = computed(() => {
|
||||
@@ -354,6 +355,13 @@ onMounted(() => {
|
||||
}
|
||||
});
|
||||
|
||||
watch(canUpdate, value => {
|
||||
navBarStore.clearRight();
|
||||
if (value) {
|
||||
navBarStore.setRightText("编辑", "var(--td-brand-color)", toEdit);
|
||||
}
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
navBarStore.clearRight();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user