Skip to content

feat: link repair day events to repair booking and fix slug pattern - #54

Merged
m1ngsama merged 1 commit into
mainfrom
feat/repair-day-booking
Nov 24, 2026
Merged

m1ngsama merged 1 commit into
mainfrom
feat/repair-day-booking

Conversation

@m1ngsama

Copy link
Copy Markdown
Member

On repair days, a pass gets you in, but booking a repair happens on nbtca.space. Nothing on the event page connected the two.

Events marked "这是一场维修日" now show a "预约维修" action next to "加入日历" until the event ends. It links to https://nbtca.space/repair/create-ticket. Tickets booked there already appear in the repair tally while the event runs. Claiming a pass is still not tied to booking a repair, so guests can come without a repair.

The slug field on /e/new is also fixed. A member could not submit repair-day-2026-11-27 in Safari. The old pattern [a-z0-9][a-z0-9\-]{1,40} renders as \\- in the built HTML, and that is a syntax error under the v flag browsers now use to compile pattern. The new pattern [a-z0-9](?:[a-z0-9]|-){1,40} accepts the same slugs and is valid with both the u and v flags. I could not reproduce the rejection in Playwright's WebKit, so the field now also has a title, and the browser's error message will spell out the rule if a slug is still refused, for example a full-width hyphen typed with a Chinese input method.

@m1ngsama
m1ngsama requested a review from sheepkinn November 24, 2026 10:57
@m1ngsama
m1ngsama merged commit a09fad6 into main Nov 24, 2026
2 checks passed
@m1ngsama
m1ngsama deleted the feat/repair-day-booking branch November 24, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant