From 63fc7b3ab8656aaab05889589b44e584815f134f Mon Sep 17 00:00:00 2001 From: Padreug Date: Thu, 21 May 2026 16:53:55 +0200 Subject: [PATCH] feat(activities): pending-aware toast + unified pending gate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename willGoToPending → willLandInPending, drop the (now-redundant) isEditMode predicate from the gate so create can reuse it. Toast copy now confirms the destination explicitly: create + pending : "Submitted! Awaiting admin approval — your draft is visible on your feed with a Pending badge." edit + pending : "Updated — awaiting re-approval. Hidden from the public feed until reviewed." Closes the surprise where a non-admin user under auto_approve=off got a generic "Event submitted!" and then couldn't tell whether their post had been accepted or was just waiting. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../components/CreateEventDialog.vue | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/modules/activities/components/CreateEventDialog.vue b/src/modules/activities/components/CreateEventDialog.vue index a32846a..180184b 100644 --- a/src/modules/activities/components/CreateEventDialog.vue +++ b/src/modules/activities/components/CreateEventDialog.vue @@ -67,8 +67,12 @@ const emit = defineEmits<{ }>() const isEditMode = computed(() => Boolean(props.event?.id)) -const willGoToPending = computed( - () => isEditMode.value && !props.isAdmin && !props.autoApprove +// True when the submission will land in `proposed` status: a non-admin +// owner with the extension's auto_approve toggle off. Same gate for +// create and edit; the edit path also keys the in-form warning banner +// on this so the user sees the consequence before submitting. +const willLandInPending = computed( + () => !props.isAdmin && !props.autoApprove ) const { t } = useI18n() @@ -302,8 +306,8 @@ const onSubmit = form.handleSubmit(async (formValues) => { } await props.onUpdateEvent(props.event.id, eventData) toastService.success( - willGoToPending.value - ? 'Event updated — pending re-approval' + willLandInPending.value + ? 'Updated — awaiting re-approval. Hidden from the public feed until reviewed.' : 'Event updated!' ) emit('event-updated') @@ -313,7 +317,11 @@ const onSubmit = form.handleSubmit(async (formValues) => { return } await props.onCreateEvent(eventData) - toastService.success('Event submitted!') + toastService.success( + willLandInPending.value + ? 'Submitted! Awaiting admin approval — your draft is visible on your feed with a Pending badge.' + : 'Event submitted!' + ) emit('event-created') } @@ -363,7 +371,7 @@ const handleOpenChange = (open: boolean) => {
- + Saving will resubmit for approval. The event will be removed