-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add booking workflow detail page for staff #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nnh53
wants to merge
1
commit into
main
Choose a base branch
from
codex/implement-booking-detail-routing-and-api-sequence
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
403 changes: 403 additions & 0 deletions
403
src/app/core-logic/bookings/booking-workflow.service.ts
Large diffs are not rendered by default.
Oops, something went wrong.
438 changes: 438 additions & 0 deletions
438
src/app/features/staff/booking-detail/booking-detail.html
Large diffs are not rendered by default.
Oops, something went wrong.
399 changes: 399 additions & 0 deletions
399
src/app/features/staff/booking-detail/booking-detail.scss
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,399 @@ | ||
| :host { | ||
| display: block; | ||
| padding: 2.5rem 0; | ||
| color: var(--mat-sys-on-surface, #0e1114); | ||
| } | ||
|
|
||
| .booking-detail { | ||
| display: grid; | ||
| gap: 2rem; | ||
| } | ||
|
|
||
| .booking-detail__header { | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
| align-items: center; | ||
| justify-content: space-between; | ||
| gap: 1rem; | ||
| } | ||
|
|
||
| .booking-detail__back { | ||
| display: inline-flex; | ||
| align-items: center; | ||
| gap: 0.5rem; | ||
| padding: 0.45rem 0.9rem; | ||
| border-radius: 999px; | ||
| border: 1px solid var(--mat-sys-outline-variant, #d1d5db); | ||
| background: var(--mat-sys-surface, #fff); | ||
| color: inherit; | ||
| text-decoration: none; | ||
| font-weight: 500; | ||
| transition: background 0.2s ease, transform 0.2s ease; | ||
| } | ||
|
|
||
| .booking-detail__back:hover { | ||
| background: rgb(37 99 235 / 12%); | ||
| transform: translateY(-1px); | ||
| } | ||
|
|
||
| .booking-detail__titles { | ||
| display: grid; | ||
| gap: 0.4rem; | ||
| } | ||
|
|
||
| .booking-detail__title { | ||
| margin: 0; | ||
| font-size: clamp(1.75rem, 2vw, 2rem); | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| .booking-detail__subtitle { | ||
| margin: 0; | ||
| color: var(--mat-sys-on-surface-variant, #4b5563); | ||
| max-width: 640px; | ||
| } | ||
|
|
||
| .booking-summary { | ||
| display: grid; | ||
| gap: 1.5rem; | ||
| padding: 1.75rem; | ||
| border-radius: 1.25rem; | ||
| background: var(--mat-sys-surface, #fff); | ||
| box-shadow: 0 16px 36px rgb(15 23 42 / 14%); | ||
| border: 1px solid rgb(148 163 184 / 18%); | ||
| } | ||
|
|
||
| .booking-summary__header { | ||
| display: flex; | ||
| align-items: flex-start; | ||
| justify-content: space-between; | ||
| gap: 1rem; | ||
| } | ||
|
|
||
| .booking-summary__customer { | ||
| margin: 0.5rem 0 0; | ||
| font-size: 1rem; | ||
| color: var(--mat-sys-on-surface-variant, #4b5563); | ||
| } | ||
|
|
||
| .booking-summary__badges { | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
| gap: 0.5rem; | ||
| justify-content: flex-end; | ||
| } | ||
|
|
||
| .booking-summary__grid { | ||
| display: grid; | ||
| gap: 1rem; | ||
| grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); | ||
| } | ||
|
|
||
| .booking-summary__grid div { | ||
| display: grid; | ||
| gap: 0.25rem; | ||
| } | ||
|
|
||
| .booking-summary__grid dt { | ||
| font-size: 0.8rem; | ||
| text-transform: uppercase; | ||
| letter-spacing: 0.08em; | ||
| color: var(--mat-sys-on-surface-variant, #6b7280); | ||
| } | ||
|
|
||
| .booking-summary__grid dd { | ||
| margin: 0; | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| .badge { | ||
| display: inline-flex; | ||
| align-items: center; | ||
| gap: 0.25rem; | ||
| padding: 0.3rem 0.75rem; | ||
| border-radius: 999px; | ||
| font-size: 0.78rem; | ||
| font-weight: 600; | ||
| text-transform: capitalize; | ||
| } | ||
|
|
||
| .badge--pending { | ||
| background: rgb(234 179 8 / 18%); | ||
| color: #92400e; | ||
| } | ||
|
|
||
| .badge--success { | ||
| background: rgb(34 197 94 / 18%); | ||
| color: #166534; | ||
| } | ||
|
|
||
| .badge--danger { | ||
| background: rgb(239 68 68 / 18%); | ||
| color: #b91c1c; | ||
| } | ||
|
|
||
| .badge--info { | ||
| background: rgb(37 99 235 / 18%); | ||
| color: #1d4ed8; | ||
| } | ||
|
|
||
| .workflow { | ||
| display: grid; | ||
| gap: 1.5rem; | ||
| padding: 1.75rem; | ||
| border-radius: 1.25rem; | ||
| background: var(--mat-sys-surface, #fff); | ||
| box-shadow: 0 16px 36px rgb(15 23 42 / 14%); | ||
| border: 1px solid rgb(148 163 184 / 18%); | ||
| } | ||
|
|
||
| .workflow__header h2 { | ||
| margin: 0; | ||
| font-size: 1.4rem; | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| .workflow__header p { | ||
| margin: 0.4rem 0 0; | ||
| color: var(--mat-sys-on-surface-variant, #4b5563); | ||
| } | ||
|
|
||
| .workflow-steps { | ||
| margin: 0; | ||
| padding: 0; | ||
| list-style: none; | ||
| display: grid; | ||
| gap: 1rem; | ||
| } | ||
|
|
||
| .workflow-step { | ||
| padding: 1rem 1.25rem; | ||
| border-radius: 1rem; | ||
| border: 1px solid rgb(148 163 184 / 24%); | ||
| background: rgb(15 23 42 / 3%); | ||
| transition: border 0.2s ease, background 0.2s ease; | ||
| } | ||
|
|
||
| .workflow-step--running { | ||
| border-color: var(--mat-sys-primary, #2563eb); | ||
| background: rgb(37 99 235 / 12%); | ||
| } | ||
|
|
||
| .workflow-step--success { | ||
| border-color: rgb(34 197 94 / 45%); | ||
| background: rgb(34 197 94 / 12%); | ||
| } | ||
|
|
||
| .workflow-step--error { | ||
| border-color: rgb(239 68 68 / 45%); | ||
| background: rgb(239 68 68 / 12%); | ||
| } | ||
|
|
||
| .workflow-step__header { | ||
| display: flex; | ||
| align-items: baseline; | ||
| justify-content: space-between; | ||
| gap: 0.75rem; | ||
| } | ||
|
|
||
| .workflow-step__title { | ||
| margin: 0; | ||
| font-size: 1rem; | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| .workflow-step__status { | ||
| font-size: 0.9rem; | ||
| color: var(--mat-sys-on-surface-variant, #4b5563); | ||
| } | ||
|
|
||
| .workflow-step__message { | ||
| margin: 0.5rem 0 0; | ||
| font-size: 0.95rem; | ||
| color: var(--mat-sys-on-surface, #0f172a); | ||
| } | ||
|
|
||
| .workflow__error { | ||
| padding: 0.75rem 1rem; | ||
| border-radius: 0.75rem; | ||
| background: rgb(239 68 68 / 12%); | ||
| color: #b91c1c; | ||
| font-weight: 500; | ||
| } | ||
|
|
||
| .workflow-form { | ||
| display: grid; | ||
| gap: 1.5rem; | ||
| } | ||
|
|
||
| .workflow-fieldset { | ||
| margin: 0; | ||
| padding: 1.25rem; | ||
| border: 1px solid rgb(148 163 184 / 24%); | ||
| border-radius: 1rem; | ||
| display: grid; | ||
| gap: 1rem; | ||
| } | ||
|
|
||
| .workflow-fieldset legend { | ||
| font-weight: 600; | ||
| padding: 0 0.5rem; | ||
| } | ||
|
|
||
| .form-grid { | ||
| display: grid; | ||
| gap: 1rem; | ||
| grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); | ||
| } | ||
|
|
||
| .form-field { | ||
| display: grid; | ||
| gap: 0.4rem; | ||
| } | ||
|
|
||
| .form-field label { | ||
| font-size: 0.9rem; | ||
| font-weight: 600; | ||
| color: var(--mat-sys-on-surface-variant, #4b5563); | ||
| } | ||
|
|
||
| .form-field input, | ||
| .form-field select { | ||
| appearance: none; | ||
| width: 100%; | ||
| padding: 0.65rem 0.75rem; | ||
| border-radius: 0.75rem; | ||
| border: 1px solid var(--mat-sys-outline-variant, #d1d5db); | ||
| background: var(--mat-sys-surface, #fff); | ||
| font: inherit; | ||
| color: inherit; | ||
| transition: border 0.2s ease, box-shadow 0.2s ease; | ||
| } | ||
|
|
||
| .form-field input:focus, | ||
| .form-field select:focus { | ||
| outline: none; | ||
| border-color: var(--mat-sys-primary, #2563eb); | ||
| box-shadow: 0 0 0 3px rgb(37 99 235 / 20%); | ||
| } | ||
|
|
||
| .input--invalid { | ||
| border-color: rgb(239 68 68 / 65%); | ||
| box-shadow: 0 0 0 3px rgb(239 68 68 / 12%); | ||
| } | ||
|
|
||
| .form-error { | ||
| font-size: 0.85rem; | ||
| color: #b91c1c; | ||
| } | ||
|
|
||
| .workflow__actions { | ||
| display: flex; | ||
| justify-content: flex-end; | ||
| } | ||
|
|
||
| .workflow__submit { | ||
| display: inline-flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| padding: 0.75rem 1.5rem; | ||
| border-radius: 999px; | ||
| border: 0; | ||
| background: var(--mat-sys-primary, #2563eb); | ||
| color: var(--mat-sys-on-primary, #fff); | ||
| font-weight: 600; | ||
| cursor: pointer; | ||
| transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; | ||
| } | ||
|
|
||
| .workflow__submit:disabled { | ||
| opacity: 0.65; | ||
| cursor: not-allowed; | ||
| } | ||
|
|
||
| .workflow__submit:hover:enabled { | ||
| background: color-mix(in srgb, var(--mat-sys-primary, #2563eb) 88%, #fff); | ||
| box-shadow: 0 12px 20px rgb(37 99 235 / 25%); | ||
| transform: translateY(-1px); | ||
| } | ||
|
|
||
| .workflow-result { | ||
| padding: 1.25rem; | ||
| border-radius: 1rem; | ||
| border: 1px solid rgb(34 197 94 / 30%); | ||
| background: rgb(34 197 94 / 10%); | ||
| display: grid; | ||
| gap: 0.75rem; | ||
| } | ||
|
|
||
| .workflow-result h3 { | ||
| margin: 0; | ||
| font-size: 1.1rem; | ||
| font-weight: 600; | ||
| color: #166534; | ||
| } | ||
|
|
||
| .workflow-result dl { | ||
| margin: 0; | ||
| display: grid; | ||
| gap: 0.75rem; | ||
| grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); | ||
| } | ||
|
|
||
| .workflow-result dl div { | ||
| display: grid; | ||
| gap: 0.25rem; | ||
| } | ||
|
|
||
| .workflow-result dt { | ||
| font-size: 0.8rem; | ||
| text-transform: uppercase; | ||
| letter-spacing: 0.08em; | ||
| color: #166534; | ||
| } | ||
|
|
||
| .workflow-result dd { | ||
| margin: 0; | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| .booking-missing { | ||
| padding: 2rem; | ||
| border-radius: 1.25rem; | ||
| background: var(--mat-sys-surface, #fff); | ||
| box-shadow: 0 16px 36px rgb(15 23 42 / 12%); | ||
| border: 1px solid rgb(148 163 184 / 18%); | ||
| display: grid; | ||
| gap: 0.75rem; | ||
| text-align: center; | ||
| } | ||
|
|
||
| .booking-missing__link { | ||
| justify-self: center; | ||
| padding: 0.6rem 1.25rem; | ||
| border-radius: 999px; | ||
| border: 0; | ||
| background: var(--mat-sys-primary, #2563eb); | ||
| color: var(--mat-sys-on-primary, #fff); | ||
| text-decoration: none; | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| @media (width <= 768px) { | ||
| :host { | ||
| padding: 1.5rem 0; | ||
| } | ||
|
|
||
| .booking-detail__header { | ||
| flex-direction: column; | ||
| align-items: flex-start; | ||
| } | ||
|
|
||
| .workflow { | ||
| padding: 1.25rem; | ||
| } | ||
|
|
||
| .booking-summary { | ||
| padding: 1.25rem; | ||
| } | ||
| } | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Using
color-mix(in srgb, ...)for hover effects may not be supported in older browsers. While this is likely acceptable for a modern Angular 20 app, consider adding a fallback or documenting the minimum browser requirements if not already done.