Skip to content

feat(admin): manage timeslot link + per-order download on orders-by-timeslot#99

Merged
choden-dev merged 2 commits into
mainfrom
feat/timeslot-manage-and-per-order-download
Jul 14, 2026
Merged

feat(admin): manage timeslot link + per-order download on orders-by-timeslot#99
choden-dev merged 2 commits into
mainfrom
feat/timeslot-manage-and-per-order-download

Conversation

@choden-dev

Copy link
Copy Markdown
Owner

Summary

Two small admin improvements to the Orders by Pickup Timeslot view (components/admin/OrdersByTimeslotView.tsx):

  1. Open the timeslot document — each timeslot header now has a ⚙ Manage Timeslot link that opens /admin/collections/timeslots/{id}, the Payload document edit view. This is where the existing DeleteTimeslotButton (delete + notify customers) lives, so admins can jump straight there from the list.
  2. Download all files for a single order — added a ⬇ Download All button in each order's Actions column. It reuses the shared download logic (parallel presign, sequential open with a small delay to avoid popup blockers). Only shown when the order has downloadable files.

Implementation notes

  • Refactored the existing per-timeslot download into a shared downloadFilesForOrders(orders) helper. Both handleDownloadAllFiles (whole timeslot) and the new handleDownloadOrderFiles (single order) delegate to it, keeping behaviour identical.
  • The in-place delete was intentionally not implemented in this view: DeleteTimeslotButton depends on Payload's useDocumentInfo() hook, which is only available inside a Payload document context. Linking to the document view is the correct integration point.

Testing

  • tsc --noEmit passes with no errors.
  • biome check clean.

@choden-dev
choden-dev merged commit e4b4264 into main Jul 14, 2026
4 checks passed
@choden-dev
choden-dev deleted the feat/timeslot-manage-and-per-order-download branch July 14, 2026 09:45
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