Skip to content

GA-009: add available shifts filtering and sorting - #448

Open
abrar-deakin wants to merge 2 commits into
mainfrom
abrar/ga-009-available-shifts
Open

GA-009: add available shifts filtering and sorting#448
abrar-deakin wants to merge 2 commits into
mainfrom
abrar/ga-009-available-shifts

Conversation

@abrar-deakin

Copy link
Copy Markdown
Collaborator

Summary

  • Added available shifts filtering by status.
  • Added sorting by date and pay.
  • Added date filters (Today / Next 7 Days / All).

Testing

  • Created a shift from Employer Panel.
  • Verified the shift appears in the Guard App.
  • Successfully applied for the shift.
  • Verified the status changes to Pending.
  • Verified Employer receives the application notification.

Screenshots

Employer - Shift Created

image

Guard App - Available Shift

image

Guard App - Application Success

image

Employer - Notification Received

image

@Krisha190235

Copy link
Copy Markdown
Collaborator

Nice filter/sort/error-retry additions — I confirmed the status values match mapAllShifts output, so that filter's correct, and bumping the page size 20→50 is a good call.

One thing worth fixing before merge:

The search now matches title + site only — it dropped company, which mapAllShifts does populate, so guards lose the ability to search by company. Can we add it back (${shift.title} ${shift.company} ${shift.site}``) unless that was intentional?

Two non-blockers:

catch (err: any) just trips the no-explicit-any warning (it's set to warn, so CI stays green) — optional to switch to unknown + narrow for consistency with the other screens.
listShifts(1, 50) loads one page of 50 and filters/sorts client-side, since /shifts is paginated — fine for now (and better than the old 20), but worth a follow-up for load-more or server-side filtering so large lists stay reachable.

Otherwise LGTM once the company-search line is sorted.

@Krisha190235
Krisha190235 self-requested a review July 31, 2026 09:12
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.

2 participants