Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POLIO-1776: subactivity validation #1983

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

quang-le
Copy link
Member

What problem is this PR solving? Explain here in one sentence.

Related JIRA tickets : POLIO-1776

Self proofreading checklist

  • Did I use eslint and black formatters
  • Is my code clear enough and well documented
  • Are my typescript files well typed
  • New translations have been added or updated if new strings have been introduced in the frontend
  • My migrations file are included
  • Are there enough tests
  • Documentation has been included (for new feature)

Doc

NA

Changes

  • Add front-end validation for subactivities dates:
    • start and end-date should be after round start date
    • lqas and im dates should be after subactivity end date
  • Added round dates to formik values to be able to access them for validation
  • Remove round dates before calling subactivities API
  • fix some TS typing

How to test

Go to polio campaigns, create a sub-activity with dates that are all wrong

Print screen / video

Screenshot 2025-02-18 at 10 44 21

Notes

  • Validation was left front-end only on the basis that we don't validate round dates back-end side

Follow the Conventional Commits specification

The merge message of a pull request must follow the Conventional Commits specification.

This convention helps to automatically generate release notes.

Use lowercase for consistency.

Example:

fix: empty instance pop up

Refs: IA-3665

Note that the Jira reference is preceded by a line break.

Both the line break and the Jira reference are entered in the Add an optional extended description… field.

- LQAS/IM dates must be after subactivity end date
- subactivity start and end date must be after round end date
@quang-le quang-le marked this pull request as draft February 18, 2025 17:59
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.

1 participant