feat:Build forgot password page — email submission form with success …#1016
Closed
bibi-fay wants to merge 1 commit into
Hidden character warning
The head ref may contain hidden characters: "feat/Build-forgot-password-page\u2014email-submission-form-with-success-state"
Closed
Conversation
|
@favour-GL is attempting to deploy a commit to the naijabuz's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@bibi-fay Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
PR 1 — feat(assets): add Change Status modal with transition guard
What
Wires up the previously inert "Update Status" button on the asset detail page. Introduces a ChangeStatusModal that presents only the statuses an asset can legally transition to, calls useUpdateAssetStatus, and feeds back loading and error states inline.
Why
Users had no way to change an asset's status from the UI. The mutation hook existed but was never called.
Changes
frontend/app/(dashboard)/assets/[id]/page.tsx
Added STATUS_TRANSITIONS map defining allowed moves per status (RETIRED is terminal — button is disabled)
Added useUpdateAssetStatus to the hook import list
New ChangeStatusModal component: dropdown filtered to valid next-states, inline API error display, loading state on Confirm button
showChangeStatus state wired to the "Update Status" button's onClick
Modal renders at the bottom of the page alongside the other modals
Testing
Open any active asset → click "Update Status" → modal appears with valid transitions (INACTIVE, MAINTENANCE, RETIRED)
Select a status → click Confirm → button shows spinner → asset status updates, modal closes
Open a RETIRED asset → "Update Status" button is disabled
Simulate a 500 from the API → inline error message appears inside the modal
PR 2 — feat(auth): add Forgot Password page
What
Adds frontend/app/(auth)/forgot-password/page.tsx — a single-field form that posts { email } to POST /auth/forgot-password and, on any non-5xx response, replaces itself with a success message.
Why
Users had no recovery path when they forgot their password. Unblocks BE-12 integration — the route and UI are ready to go live once the backend endpoint ships.
Changes
frontend/app/(auth)/forgot-password/page.tsx (new file)
Zod-validated email field
Always shows success state on 2xx/4xx (security: doesn't reveal whether an account exists)
Shows inline error only on 5xx / network failure
"Back to Login" link in both the form and success states
Sits inside the existing (auth) layout — no layout changes needed
frontend/app/(auth)/login/page.tsx — no changes needed (link was already present)
Testing
Navigate to /forgot-password → form renders inside the auth card
Submit with an invalid email → Zod error shown inline, no request fired
Submit a valid email → button shows spinner → success message replaces the form
Simulate a 500 → inline network error shown, form stays editable
Click "Back to Login" from either state → navigates to /login
Closes #944
Closes #991
Closes #942
Closes #940