[events] Hide edit on old events. Update deps.

This commit is contained in:
Ferdinand Thiessen 2021-03-24 18:15:17 +01:00
parent 6dc70d12f6
commit 6da4f67d68
2 changed files with 6 additions and 2 deletions

@ -1 +1 @@
Subproject commit ac6d0693a062f60d539d7f6d8fdee00fbcc528c7
Subproject commit f245cb8b16c855c059d9170611797028c600696a

View File

@ -64,7 +64,11 @@ export default defineComponent({
},
setup(props, { emit }) {
const canDelete = computed(() => hasPermission(PERMISSIONS.DELETE));
const canEdit = computed(() => hasPermission(PERMISSIONS.EDIT));
const canEdit = computed(
() =>
hasPermission(PERMISSIONS.EDIT) &&
(props.modelValue?.end || props.modelValue.start) > new Date()
);
const event = computed({
get: () => props.modelValue,
set: (v) => emit('update:modelValue', v),