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

feat: add qr validation #11

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open

Conversation

tahmidrahman-dsi
Copy link
Collaborator

No description provided.

@tahmidrahman-dsi tahmidrahman-dsi self-assigned this Jan 28, 2025
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?".

package.json Outdated Show resolved Hide resolved
src/form/birth/index.ts Outdated Show resolved Hide resolved
Comment on lines 2 to 7

import { birthEvent } from './index'

// @TODO: remove this skip
test.skip('birth configuration is parsed', async () => {
test('birth configuration is parsed', async () => {
expect(birthEvent).toMatchSnapshot()
})
Copy link

Choose a reason for hiding this comment

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

Is this diff specific to MOSIP or should it be added to countryconfig as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

When I pulled countryconfig, this test was failing for missing snapshot. So I marked it skip. but now while I checked in countryconfig repo, I see the snapshot is pushed there

Comment on lines 28 to 32
export const iDReaderFields = (
event: 'birth' | 'death',
section: 'informant' | 'mother' | 'father',
conditionals: Conditional[] = []
) => {
Copy link

Choose a reason for hiding this comment

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

Maybe this as a whole could be in @opencrvs/mosip/packages/country-config going forward but we can move it separately

Comment on lines 28 to 37
export const getInitialValueFromIDReader = (fieldNameInReader: string) => ({
dependsOn: ['idReader', 'esignetCallback'],
expression: `$form?.idReader?.${fieldNameInReader} || $form?.esignetCallback?.data?.${fieldNameInReader} || ""`
})

export const iDReaderFields = (
event: 'birth' | 'death',
section: 'informant' | 'mother' | 'father',
conditionals: Conditional[] = []
) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@naftis now that I added one more function, would it make sense if I move all these to mosip/country-config package?

Copy link

@naftis naftis Jan 30, 2025

Choose a reason for hiding this comment

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

I see the design principle as keeping opencrvs-countryconfig-mosip as similar as possible to opencrvs-countryconfig (for easy conflict management for countries, easy integration)

So I would say your suggestion supports this design yes :P

If and when we need to change these functions in following releases, it's easier for countries to just bump the version number than to fix the conflicts

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.

3 participants