Repository navigation
feat(emergency): add profile print card and wallet pass options - #1205
Merged
Merged
Conversation
Add a print card and a wallet pass action to the emergency QR panel. Both use public fields only (pet name, public link, public message) and show the code status and expiration. Actions are disabled when the code is expired, revoked or missing. Wallet pass issuing stays with the backend via a new qrcodeAPI.getWalletPass call. Closes DogStark#1120
Author
|
hey, friendly ping: is there anything I should change to get this reviewed or merged? happy to rebase or adjust. thx |
Author
|
Thanks for merging this! Glad it was useful. One question: this issue was tagged Stellar Wave, and I understand another contributor had applied in wave 10 before the PR. Is there anything I need to do on my side (an application or a wallet) so the contribution is counted for the Wave reward? Happy to do whatever is needed. Also, if you find my work useful, a star on https://github.com/comandanto/bounty-hunter-monitor would be much appreciated. Thank you! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds a print card and a wallet pass option to the emergency QR panel on the pet page. Both are built only from public fields (pet name, public emergency link, public message) and show the code status and expiration. Closes #1120
Key Changes
EmergencyPassOptionscomponent: printable card (print-only CSS shows just the card), status (Active / Expired / Revoked / Unavailable) and expiration date, "Print card" and "Add to wallet" buttons.emergencyPassStatus.ts: derives status fromisActiveandexpiresAt(revocation wins over expiry, unparseable dates are treated as expired).role="status"message explains why.qrcodeAPI.getWalletPass: the pass is requested from the backend (GET /qrcodes/:id/wallet-pass), which keeps authorization and consent decisions. A refusal shows arole="alert"message.EmergencyQRloads the pet's QR record and renders the new section. Emergency contact details are never rendered in the card.aria-hiddenicons, so keyboard and screen reader navigation work.Note: the
/qrcodes/:id/wallet-passendpoint is assumed on the backend side; the frontend only requests it.Verification & Test Output
Checklist (the repo has no PR template, project scripts run):
npx eslinton the changed files: 0 errorsnpm run lintfully green: n/a,mainalready has 64 lint errors in other files; this PR adds none (64 before, 64 after)npm run type-checkfully green: n/a,mainalready reports 49error TSlines (syntax errors insrc/pages/clinics/[id].tsx,src/pages/notifications.tsx); none in changed filesnpm run buildgreen: n/a, fails onmainfor the same unrelated files (notifications.tsx)src/__tests__/lib/qrcodeAPI.privacy.test.tspasses: n/a, it already fails onmainbefore this changemaindoes not build