Skip to content

fix(npqs): require at least one commodity on the PSC apply form - #181

Merged
ginaxu1 merged 1 commit into
mainfrom
fix/npqs-psc-require-at-least-one-commodity
Oct 16, 2026
Merged

ginaxu1 merged 1 commit into
mainfrom
fix/npqs-psc-require-at-least-one-commodity

Conversation

@ginaxu1

@ginaxu1 ginaxu1 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Tested locally, screenrecording https://github.com/LSFLK/lsf-govtech-tnsw/issues/191#issuecomment-6209113830

Addresses https://github.com/LSFLK/lsf-govtech-tnsw/issues/191

Summary

  • The Phytosanitary Certificate apply form now requires at least one commodity before submit (schema required + minItems: 1).
  • The commodities control carries the validation message: At least one commodity must be added before submitting the Phytosanitary Certificate application.
  • Applies to the shared tnsw/npqs/1-apply user form used by both the npqs-v2 and npqs_v3 flows.

Companion UI change for the red asterisk and inline error on ArrayControl: OpenNSW/ui-packages#118

Test plan

  • Open [NPQS] Phytosanitary Certificate Application with no commodities added.
  • Confirm Commodities List shows a red asterisk (needs ui-packages feat(workflows): validate static data files in CI #118).
  • Submit and confirm submit is blocked with the message above.
  • Add one commodity, fill required fields, and confirm submit succeeds.
  • Repeat on an npqs_v3 consignment path that uses the same apply step.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e054644a-f728-46df-8743-6e2992adb1dc
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

An empty commodities list could be submitted. Mark the list required
with minItems 1 and a clear validation message on submit.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ginaxu1
ginaxu1 force-pushed the fix/npqs-psc-require-at-least-one-commodity branch from ca9969f to 8ebe394 Compare October 16, 2026 05:58

@Aravinda-HWK Aravinda-HWK left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@ginaxu1
ginaxu1 merged commit 7a9b5a8 into main Oct 16, 2026
1 check passed
@ginaxu1
ginaxu1 deleted the fix/npqs-psc-require-at-least-one-commodity branch October 16, 2026 06:20
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