Skip to content

feat: add shift acknowledgement on apply - #556

Merged
Krisha190235 merged 2 commits into
mainfrom
abrar/ga-043-shift-acknowledgement
Sep 14, 2026
Merged

Krisha190235 merged 2 commits into
mainfrom
abrar/ga-043-shift-acknowledgement

Conversation

@abrar-deakin

Copy link
Copy Markdown
Collaborator

Summary

Implements GA-043 Shift Acknowledgement for the Guard App.

Changes

  • Added acknowledgement gate before applying for a shift.
  • Displays site instructions before application.
  • Requires the guard to acknowledge the shift terms and instructions.
  • Added optional signature capture with clear functionality.
  • Stores the acknowledgement locally as a mock record.
  • Preserves the existing shift application flow and error handling.
  • Backend persistence can be added as a follow-up.

Testing

  • Verified the Apply button opens the acknowledgement modal.
  • Verified Apply is disabled until acknowledgement is checked.
  • Verified optional signature drawing and clearing.
  • Verified shift application succeeds after acknowledgement.
  • Verified site instructions are displayed when available.
image image image image

@Krisha190235

Copy link
Copy Markdown
Collaborator

Nice feature — the acknowledgement modal is a good upgrade over the plain confirm alert. One thing to fix before this merges though:

It silently breaks two tests. ShiftsScreen.test.js (from #544) still asserts the old apply flow — Alert.alert('Confirm Application', …) and pressing "Apply" inside that alert (lines ~91/117 + the confirmApplyAlert helper). This PR replaces that alert with the acknowledgement modal, so those two tests fail. I ran the suite on the merged branch: 2 failed / 14 passed. They don't turn CI red because we don't run jest in CI (lint only), but the tests are broken for anyone running them locally.

Could you update those two tests in this PR to drive the new flow — open the modal, tick the "I acknowledge…" checkbox, then press "Acknowledge & Apply"? The merge is otherwise clean and colors.link/colors.primarySoft both exist, so no other issues.

Non-blocking, but worth a follow-up: the acknowledgement + signature are saved to AsyncStorage only, never sent to the backend. Since this is meant as a shift acknowledgement (potentially a compliance record), it isn't verifiable server-side — worth a ticket for a backend endpoint to persist it. A test for the new ShiftAcknowledgementModal would be good to add too.

Once the two ShiftsScreen tests are updated, this is good to go. 👍

@abrar-deakin

Copy link
Copy Markdown
Collaborator Author

Thanks for the feedback! I’ve updated the two ShiftsScreen tests to use the new acknowledgement flow by opening the modal, selecting the acknowledgement checkbox, and pressing “Acknowledge & Apply”.

I also ran the ShiftsScreen test suite locally and all 4/4 tests are passing now. The changes have been pushed to this PR.

@Krisha190235
Krisha190235 merged commit 08c0a1e into main Sep 14, 2026
2 checks passed
@Krisha190235
Krisha190235 deleted the abrar/ga-043-shift-acknowledgement branch September 14, 2026 11:27
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