feat(admin-events): expose membersOnly toggle in the form
The Event model and Zod schemas already supported membersOnly, but the admin form never exposed it — public/private was implicit and not editable from the UI. Add a fifth checkbox alongside the other Event Settings, hydrate it on edit, reset it in saveAndCreateAnother.
This commit is contained in:
parent
2a66b0eb8a
commit
e1d224e260
1 changed files with 13 additions and 0 deletions
|
|
@ -536,6 +536,16 @@
|
|||
<span class="help-text"> Mark this event as cancelled </span>
|
||||
</div>
|
||||
</label>
|
||||
|
||||
<label class="check-label">
|
||||
<input v-model="eventForm.membersOnly" type="checkbox" />
|
||||
<div>
|
||||
<strong>Members Only</strong>
|
||||
<span class="help-text">
|
||||
Hide this event from the public; only members can see it
|
||||
</span>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -622,6 +632,7 @@ const eventForm = reactive({
|
|||
isOnline: true,
|
||||
isVisible: true,
|
||||
isCancelled: false,
|
||||
membersOnly: false,
|
||||
cancellationMessage: "",
|
||||
targetCircles: [],
|
||||
tags: [],
|
||||
|
|
@ -724,6 +735,7 @@ function populateEditForm(payload) {
|
|||
isOnline: event.isOnline,
|
||||
isVisible: event.isVisible !== undefined ? event.isVisible : true,
|
||||
isCancelled: event.isCancelled || false,
|
||||
membersOnly: event.membersOnly || false,
|
||||
cancellationMessage: event.cancellationMessage || "",
|
||||
targetCircles: event.targetCircles || [],
|
||||
tags: event.tags || [],
|
||||
|
|
@ -950,6 +962,7 @@ const saveAndCreateAnother = async () => {
|
|||
isOnline: true,
|
||||
isVisible: true,
|
||||
isCancelled: false,
|
||||
membersOnly: false,
|
||||
cancellationMessage: "",
|
||||
targetCircles: [],
|
||||
tags: [],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue