Skip to content

Conversation

@cibelius
Copy link
Contributor

@cibelius cibelius commented Nov 21, 2025

Description

Resolves: #10890

Cc PR: opencrvs/opencrvs-countryconfig#1157
Farajaland PR: opencrvs/opencrvs-farajaland#1845

  • Add support for action conditionals for ConditionalType.SHOW and ConditionalType.ENABLE
  • Add logic to useAllowedActionConfigurations.tsx for hiding and disabling certain actions from the menu
  • Add backend check to actions to make sure the conditions are met when executing action
  • Remove unused action config schemas from ActionConfig.ts
  • Make sure getActionConfig() supports all special cases, i.e. notify and correction

Checklist

  • I have linked the correct Github issue under "Development"
  • I have tested the changes locally, and written appropriate tests
  • I have tested beyond the happy path (e.g. edge cases, failure paths)
  • I have updated the changelog with this change (if applicable)
  • I have updated the GitHub issue status accordingly

@github-actions
Copy link

Oops! Looks like you forgot to update the changelog. When updating CHANGELOG.md, please consider the following:

  • Changelog is read by country implementors who might not always be familiar with all technical details of OpenCRVS. Keep language high-level, user friendly and avoid technical references to internals.
  • Answer "What's new?", "Why was the change made?" and "Why should I care?" for each change.
  • If it's a breaking change, include a migration guide answering "What do I need to do to upgrade?".

@cibelius cibelius changed the title add conditionals schema def Support action 'SHOW' and 'ENABLE' conditionals Nov 25, 2025
@cibelius cibelius marked this pull request as ready for review November 25, 2025 12:24
values: EventState | ActionUpdate,
context: ValidatorContext
context: ValidatorContext,
// @TODO: should this be non-optional
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will be changed by Ashikul in his work on #11013

@ocrvs-bot
Copy link
Contributor

Your environment is deployed to https://ocrvs-10890.e2e-k8s.opencrvs.dev

# Conflicts:
#	packages/commons/src/events/utils.ts
#	packages/events/src/router/event/__snapshots__/event.actions.custom.test.ts.snap
#	packages/events/src/tests/msw.ts
* feat: add flags conditional

* fix: amend export of new package

* refactor and support array of flags

* add support for status conditional

* fix lint error

* fix import

---------

Co-authored-by: Nil20 <[email protected]>
Co-authored-by: Cihan Bebek <[email protected]>
@cibelius cibelius merged commit 0eb454d into develop Nov 26, 2025
122 of 124 checks passed
@cibelius cibelius deleted the ocrvs-10890 branch November 26, 2025 10:08
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.

Action Conditionals

5 participants