Skip to content

date validation - #415

Merged
prooflesben merged 6 commits into
mainfrom
application-date-after-due-date
Apr 13, 2026
Merged

prooflesben merged 6 commits into
mainfrom
application-date-after-due-date

Conversation

@lyannne

@lyannne lyannne commented Apr 12, 2026 •

Copy link
Copy Markdown
Collaborator

ℹ️ Issue

Closes

📝 Description

Write a short summary of what you added. Why is it important? Any member of C4C should be able to read this and understand your contribution -- not just your team members.

Briefly list the changes made to the code:

  1. Deleted remember me and forgot password (jane did it too but also fixed the spacing so prob dont merge my commit)
  2. Added date validation to validateInputs inputs for application date, due date, and grant start date
  3. Added auto refresh of data every 5 mins (also changed fetchUsers to fetchAllData on login so everything is fetched)

✔️ Verification

What steps did you take to verify your changes work? These should be clear enough for someone to be able to clone the branch and follow the steps themselves.

Provide screenshots of any new components, styling changes, or pages.

  • Tested in UI! Errors show in the popup
image
  • As for auto refetching, logs show refetching after 5 minutes, and i tested with jane making a new grant and it showed up!
image

Test Changes

If your new feature required some test to be changed or added to fit the new functionality or changes please document these changes here.

  • N/A

🏕️ (Optional) Future Work / Notes

Did you notice anything ugly during the course of this ticket? Any bugs, design challenges, or unexpected behavior? Write it down so we can clean it up in a future ticket!

  • N/A

@lyannne lyannne linked an issue Apr 12, 2026 that may be closed by this pull request
6 tasks
Copilot AI review requested due to automatic review settings April 12, 2026 19:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the frontend grant editing flow to enforce basic date ordering constraints, and simplifies the login UI by removing the “Remember Me” / “Forgot Password” section.

Changes:

  • Added validation to prevent applicationDate being after the due date and grantStartDate being before the due date in the Edit Grant form.
  • Removed “Remember Me” checkbox state and the “Forgot Password?” UI block from the login page.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
frontend/src/main-page/grants/edit-grant/EditGrant.tsx Adds client-side date ordering checks in validateInputs() for application/due/start dates.
frontend/src/login/Login.tsx Removes “Remember Me” state and the “Remember Me / Forgot Password” UI section.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lyannne lyannne linked an issue Apr 12, 2026 that may be closed by this pull request
4 tasks
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@lyannne
lyannne requested a review from prooflesben April 12, 2026 20:18
lyannne and others added 2 commits April 12, 2026 19:13
… the inactive user, and that clickingback to login would log the user out (changed that to navigating to login instead) so the user stays logged in on the other tab and can refresh to refetch data
@prooflesben
prooflesben merged commit 10fb2cd into main Apr 13, 2026
1 check passed
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.

DEV - Auto-refetch all app data every 5 minutes and on full page reload DEV - Warn user and block submission when application date is after due date

3 participants