Added time_slot column to collection centres that is of type collection_timeslot_type[]
Collection_timeslot_type : {time: time without time zone; is_active: boolean}
Added a time slots column to collection centres table in the admin panel with a button that opens the collection slots modal
Modal opens to show a list of checkboxes with corresponding times
Checkboxes can be checked or unchecked to demonstrate opening hours (checked = open, unchecked = closed)
Save button to save changes to db
Selected collection datetime displayed in parcels modal
Available collection slot displayed when collection centre is selected
Screenshots / Videos
Before
After
Checklist
[x] The ticket is up-to-date - Please document any deviations from the original approach if there is any.
[x] I have documented the testing steps for QA
[x] I have self-reviewed this PR
[x] Make sure you've verified it works via npm run dev
[x] Make sure you've verified it works via npm run build and npm run start
[x] Make sure you've fixed all linting problems with npm run lint_fix
[x] Make sure you've tested via npm run test:e2e
If you have made any changes to the database...
[x] The migration files are up-to-date with my final set up (npx supabase db diff -f <name_of_migration> should create nothing at this point)
[x] I have updated the typescript definitions for the database with npm run db:local:generate_types
N/A I have modified the seed in supabase/seed/seed.mts if appropriate
N/A If I have modified the seed, I have also generated the seed with npm run db:generate_seed
[x] With my final set up, I can run npm run dev:reset_supabase without any errors.
[x] (Just before merging the ticket) I have updated the timestamps of the new migration files so that they are after all existing migration files.
[x] If I have added constraints e.g. set not null, I have taken reasonable measures to ensure constraint violations do not happen when the migration occurs.
[x] I have checked that migration can happen successfully without resetting the database, doing the following.
Make sure you have rebased your branch onto dev or merged dev into your branch.
Checkout the dev branch
Run npm run post_checkout to reset the database, including the seed data.
Checkout your branch
Run npx supabase migrations up --include-all --local to run all outstanding migration files
Check that the resulting database is what you expect, bar any seed data changes.
What's changed
Screenshots / Videos
Checklist
npm run dev
npm run build
andnpm run start
npm run lint_fix
npm run test:e2e
If you have made any changes to the database...
npx supabase db diff -f <name_of_migration>
should create nothing at this point)npm run db:local:generate_types
supabase/seed/seed.mts
if appropriatenpm run db:generate_seed
npm run dev:reset_supabase
without any errors.set not null
, I have taken reasonable measures to ensure constraint violations do not happen when the migration occurs.npm run post_checkout
to reset the database, including the seed data.npx supabase migrations up --include-all --local
to run all outstanding migration files