From 4f830ca08480c4030180d42a9c9644fa5c8ec8ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bult=C3=A9?= Date: Wed, 10 Jan 2024 13:38:02 +0100 Subject: [PATCH] feat: edit bouquet fix #225 --- .../views/bouquets/BouquetDetailView.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/custom/ecospheres/views/bouquets/BouquetDetailView.vue b/src/custom/ecospheres/views/bouquets/BouquetDetailView.vue index 6f30102c5..a9ea5f498 100644 --- a/src/custom/ecospheres/views/bouquets/BouquetDetailView.vue +++ b/src/custom/ecospheres/views/bouquets/BouquetDetailView.vue @@ -26,6 +26,7 @@ const subtheme = ref() const loading = useLoading() const description = computed(() => descriptionFromMarkdown(bouquet)) +const showGoBack = computed(() => route.query.fromSearch !== undefined) const breadcrumbLinks = ref([ { @@ -38,8 +39,8 @@ const url = window.location.href const showDiscussions = config.website.discussions.topic.display -const goToCreate = () => { - router.push({ name: 'bouquet_add' }) +const goToEdit = () => { + router.push({ name: 'bouquet_edit', params: { bid: bouquet.value?.id } }) } const goBack = () => { @@ -73,7 +74,7 @@ const getSelectedThemeColor = (themed: string) => { return getThemeColor(selectedTheme.value) } -const canCreate = computed(() => { +const canEdit = computed(() => { return ( userStore.isAdmin() || (userStore.$state.isLoggedIn && @@ -114,6 +115,7 @@ onMounted(() => {
{ />