Add yes/no RSVP answers with required login

RSVPs now carry a status ('yes'/'no'). When auth is enabled, answering
requires login for all events, not just capped ones. Answers are deduped
one per user and re-answering updates in place. A 'no' zeroes plus_one,
is excluded from Going counts and cap math, frees the person's slot
claims, and shows in a separate "Can't make it" list.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-26 07:59:33 -04:00
parent 891b49b4c0
commit cf2ef77bb0
12 changed files with 341 additions and 107 deletions
+23 -2
View File
@@ -37,11 +37,11 @@
{{if .GoingList}}
{{range .GoingList}}
<span class="claim-chip">
{{if gt .RsvpID 0}}<span class="rsvp-name-link"
{{if and (gt .RsvpID 0) $.CanEditRsvps}}<span class="rsvp-name-link"
hx-get="/e/{{$.Event.Slug}}/rsvp/{{.RsvpID}}/edit"
hx-target="#edit-modal"
hx-swap="innerHTML">{{.Name}}</span>{{else}}{{.Name}}{{end}}{{if gt .PlusOne 0}} +{{.PlusOne}}{{end}}{{if .Note}} <small style="color:#888">({{.Note}})</small>{{end}}
{{if gt .RsvpID 0}}
{{if and (gt .RsvpID 0) $.CanEditRsvps}}
<button hx-delete="/e/{{$.Event.Slug}}/rsvp/{{.RsvpID}}"
hx-target="#slots-container"
hx-swap="innerHTML settle:0.1s"
@@ -54,6 +54,27 @@
<span class="nobody">no one yet</span>
{{end}}
</div>
{{if .NotGoingList}}
<div class="section-label">Can't make it ({{len .NotGoingList}})</div>
<div class="rsvp-list">
{{range .NotGoingList}}
<span class="claim-chip" style="opacity:0.6">
{{if $.CanEditRsvps}}<span class="rsvp-name-link"
hx-get="/e/{{$.Event.Slug}}/rsvp/{{.RsvpID}}/edit"
hx-target="#edit-modal"
hx-swap="innerHTML">{{.Name}}</span>{{else}}{{.Name}}{{end}}{{if .Note}} <small style="color:#888">({{.Note}})</small>{{end}}
{{if $.CanEditRsvps}}
<button hx-delete="/e/{{$.Event.Slug}}/rsvp/{{.RsvpID}}"
hx-target="#slots-container"
hx-swap="innerHTML settle:0.1s"
hx-confirm="Remove {{.Name}}?"
title="Remove">&#215;</button>
{{end}}
</span>
{{end}}
</div>
{{end}}
{{end}}
{{define "slots.html"}}{{template "slots-inner" .}}{{end}}