Skip to content

feat(fcau): add health certificate generation content - #32

Open
mushrafmim wants to merge 1 commit into
mainfrom
feat/fcau-certificate-generation
Open

feat(fcau): add health certificate generation content#32
mushrafmim wants to merge 1 commit into
mainfrom
feat/fcau-certificate-generation

Conversation

@mushrafmim

@mushrafmim mushrafmim commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Companion content for the FCAU Health Certificate generation feature (backend + officer UI in OpenNSW/agency#226).

  • Adds fcau_issue_certificate/certificate_template.gohtml, an html/template document sourcing consignor/consignee/product/vessel/port/destination/etc. fields directly from the consignment's fcau_application_review_v1 application via fromData/fromReview template functions. Only certificate_id and additional_declarations are officer-supplied.
  • fcau_issue_certificate_v1.json declares the template via a new certificate.templateId field on the task config.
  • officerinput_jsonform.json adds additional_declarations.
  • manifest.json registers the new certificate_template artifact.
  • port_and_country_of_loading / country_of_destination added to every fcau_* task's userinput_jsonform.json (trader input, since the trader — not the officer — knows shipping details), kept consistent across all fcau task view forms, so the certificate has a source for those two fields.
  • tnsw/fcau/1-application/workflow.json: the applicant_submission node's output_mapping was missing both fields, silently dropping them from global workflow state before they could reach the agency backend — fixed.

Testing

  • All changed JSON files validated as well-formed.
  • certificate_template.gohtml validated with html/template (parses cleanly, including the fromData/fromReview/today calls).
  • End-to-end rendering verified locally against the paired backend change with sample consignment data.

Related

Companion PR: OpenNSW/agency#226 (certificate generation API + officer UI).

@coderabbitai

coderabbitai Bot commented Aug 22, 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: Pro Plus

Run ID: 56e9ea48-074f-48f5-983a-972e5b39f55e


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.

Adds the FCAU Health Certificate gohtml template and wires it up end to
end so an agency officer can generate a populated certificate for a
consignment via the nsw-agency backend's POST /certificates/generate:

- fcau_issue_certificate/certificate_template.gohtml: the certificate,
  sourcing consignor/consignee/product/vessel/port/destination/etc.
  fields directly from the consignment's fcau_application_review_v1
  application via fromData/fromReview template functions, with only
  certificate_id and additional_declarations left as officer input.
- fcau_issue_certificate_v1.json: declares the certificate template
  via a new "certificate.templateId" field on the task config.
- officerinput_jsonform.json: adds the additional_declarations field
  the officer fills in alongside certificate_id.
- manifest.json: registers the new certificate_template artifact.
- port_and_country_of_loading / country_of_destination added to every
  fcau task's userinput_jsonform.json (trader input, since the trader —
  not the officer — knows shipping details) so the certificate's
  "Port and Country of Loading" / "Country of Destination" fields have
  a source; kept consistent across all fcau task view forms.
- tnsw/fcau/1-application/workflow.json: the applicant_submission
  node's output_mapping was missing port_and_country_of_loading and
  country_of_destination, silently dropping them from global workflow
  state before they could ever reach the agency backend — added.

Companion backend/frontend PR: OpenNSW/nsw-agency (certificate
generation API + officer UI).
@mushrafmim
mushrafmim force-pushed the feat/fcau-certificate-generation branch from dfb32a8 to 064a263 Compare August 23, 2026 00:45
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