feat(shows): block overlapping show times + drag day-view picker#184
Merged
Conversation
Prevent double-booking a slot, enforced on both layers: - backend: AppError::Conflict (409) + time_windows_overlap helper and ensure_no_show_conflict; checked in api_create_show and api_update_show. - frontend: findConflictingShow mirrors the backend; the wizard date step loads all shows, exposes conflictingShow, and gates canProceed. Add an Apple-Calendar-style DayTimeline next to the month calendar: click a slot to drop a default 1-hour show, drag the top/bottom handles to resize. Existing shows render as read-only blocks; the placed block turns red on conflict. Timeline height tracks the calendar via a ResizeObserver. After creation, land on the new show's detail page for hosts and admins. Closes #163
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #163.
What
Blocks scheduling a show when its time window overlaps an existing show, and adds an Apple-Calendar-style day-view time picker.
Conflict blocking (both layers)
AppError::Conflict(HTTP 409), puretime_windows_overlaphelper, andensure_no_show_conflict(queries same-date shows, excludes self on edit). Wired intoapi_create_showandapi_update_show. Half-open[start, end)overlap; missing end = zero-length point; identical starts always clash. 4 unit tests.showConflict.ts(rangesOverlap/findConflictingShow) mirrors backend semantics. The wizard date step loads all scheduled shows, exposesconflictingShow, and gatescanProceed. 9 Vitest cases.Day-view picker (
DayTimeline.vue)ResizeObserverso both columns match.UX
/shows/:id) for hosts and admins, instead of the overview / stream.Verification
cargo fmt+clippyclean, 4/4 overlap tests pass.tscerrors (pre-existing.vue-resolution errors only).