Skip to content

Conversation

@Nil20
Copy link
Contributor

@Nil20 Nil20 commented Nov 19, 2025

Description

Country Config PR: opencrvs/opencrvs-countryconfig#1155
Farajaland PR: opencrvs/opencrvs-farajaland#1840

Clearly describe what has been changed. Include relevant context or background.
Explain how the issue was fixed (if applicable) and the root cause.

Link this pull request to the GitHub issue (and optionally name the branch ocrvs-<issue #>)

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?".

@Nil20 Nil20 linked an issue Nov 19, 2025 that may be closed by this pull request
5 tasks
@jpye-finch
Copy link
Contributor

Can we use the component Dialog

This PR is using the deprecated ResponsiveModel

@cibelius
Copy link
Contributor

Some styling issues

Screenshot 2025-11-21 at 8 49 24

Comment on lines 76 to 86
export function getCustomActionFields(eventConfig: EventConfig): FieldConfig[] {
const customActions = eventConfig.actions.filter(
(action): action is CustomActionConfig => action.type === ActionType.CUSTOM
) satisfies CustomActionConfig[]

if (!customActions.length) {
return []
}

return customActions.flatMap((action) => action.form)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This would currently cause issues if we have fields with the same id in different custom actions.

We should not get the fields for all custom actions, instead just the fields of the custom action we are executing now.

Lets use this function for getting the config of the correct action: https://github.com/opencrvs/opencrvs-core/blob/develop/packages/commons/src/events/utils.ts#L100

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done here

Refactored to call custom action configs with improved types. Leave any improvement suggestions if necessary.

expect(sanitizeForSnapshot(event, UNSTABLE_EVENT_FIELDS)).toMatchSnapshot()
})

// @todo - un-skip after implementing validation for error field input
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this not implemented yet?

@Nil20 Nil20 requested a review from cibelius November 21, 2025 12:22
Copy link
Contributor

@cibelius cibelius left a comment

Choose a reason for hiding this comment

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

Great work 💯

@cibelius cibelius merged commit de66fdb into develop Nov 25, 2025
116 of 118 checks 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.

Add support to form in action modals

4 participants