Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:opencrvs/opencrvs-countryconfig …
Browse files Browse the repository at this point in the history
…into ocrvs-7584
  • Loading branch information
tareq89 committed Dec 19, 2024
2 parents 5db618f + 180ea29 commit 173a327
Show file tree
Hide file tree
Showing 8 changed files with 345 additions and 125 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,15 @@ INSERT CSV ROWS IN ENGLISH ONLY

- TBC

## 1.6.0 Release candidate
## 1.6.1 (TBD)

### Bug fixes

- We make sure that the automatic cleanup job only runs before deployment (instead of cron schedule cleanup).
- Previously it was possible MongoDB replica set and users were left randomly uninitialised after a deployment. MongoDB initialisation container now retries on failure.
- On some machines 'file' utility was not preinstalled causing provision to fail. We now install the utility if it doesn't exist.

## 1.6.0

### Breaking changes

Expand Down Expand Up @@ -93,6 +101,7 @@ INSERT CSV ROWS IN ENGLISH ONLY
5. 'PHONE_NUMBER',
6. 'EMAIL'
- Updated `allowedFileFormats` in signature fields to use MIME types (`image/png`, `image/jpg`, `image/jpeg`, `image/svg`) instead of simple file extensions. If you are already using the `allowedFileFormats` field in your implementation, please ensure to update the format accordingly.
- The details exists conditionals for the various sections i.e. father, mother, spouse has to use the `values.detailsExist` property instead of accessing it from `draftData.[sectionName].detailsExists`. This is due to the fact that the draftData is not populated until any changes have been made to any of the fields in the current section.

### New features

Expand Down Expand Up @@ -127,6 +136,7 @@ INSERT CSV ROWS IN ENGLISH ONLY
- Github pipeline dedicated for reading secrets and variables from other environments now checks if GH_TOKEN is still valid before attempting other operations
- Remove unnecessary UI dividers that add in various sections of the declaration forms(e.g the Death, Birth and Marriage forms) [#244](https://github.com/opencrvs/opencrvs-countryconfig/pull/244)
- Update template transformer for fields `informantType` and `otherInformantType` that fixes the bug of unavailability of these template fields [#5952](https://github.com/opencrvs/opencrvs-countryconfig/pull/5952)
- Fixed missing InitialValue property to set initial values based on an expression

## 1.5.2 (https://github.com/opencrvs/opencrvs-countryconfig/compare/v1.5.1...v1.5.2)

Expand Down
1 change: 1 addition & 0 deletions infrastructure/docker-compose.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ services:
- OPENHIM_MONGODB_PASSWORD=${OPENHIM_MONGODB_PASSWORD}
- WEBHOOKS_MONGODB_PASSWORD=${WEBHOOKS_MONGODB_PASSWORD}
- NOTIFICATION_MONGODB_PASSWORD=${NOTIFICATION_MONGODB_PASSWORD}
- EVENTS_MONGODB_PASSWORD=${EVENTS_MONGODB_PASSWORD}
networks:
- overlay_net
logging:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@hapi/boom": "^9.1.1",
"@hapi/hapi": "^20.0.1",
"@hapi/inert": "^6.0.3",
"@opencrvs/toolkit": "^0.0.5",
"@opencrvs/toolkit": "0.0.6-events",
"@types/chalk": "^2.2.0",
"@types/csv2json": "^1.4.0",
"@types/fhir": "^0.0.30",
Expand Down
19 changes: 8 additions & 11 deletions src/form/addresses/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
*/

import {
FATHER_DETAILS_DONT_EXIST,
MOTHER_DETAILS_DONT_EXIST,
SPOUSE_DETAILS_DONT_EXIST,
detailsDontExist,
expressionToConditional,
hideIfInformantBrideOrGroom,
Expand Down Expand Up @@ -99,11 +96,11 @@ export const defaultAddressConfiguration: IAddressConfiguration[] = [
{
config: AddressSubsections.PRIMARY_ADDRESS_SUBSECTION,
label: formMessageDescriptors.primaryAddress,
conditionalCase: MOTHER_DETAILS_DONT_EXIST
conditionalCase: detailsDontExist
},
{
config: AddressCases.PRIMARY_ADDRESS,
conditionalCase: MOTHER_DETAILS_DONT_EXIST
conditionalCase: detailsDontExist
} /*,
{
config: AddressSubsections.SECONDARY_ADDRESS_SUBSECTION,
Expand All @@ -125,9 +122,9 @@ export const defaultAddressConfiguration: IAddressConfiguration[] = [
config: AddressSubsections.PRIMARY_ADDRESS_SUBSECTION,
label: formMessageDescriptors.primaryAddress,
conditionalCase: [
expressionToConditional(FATHER_DETAILS_DONT_EXIST),
expressionToConditional(detailsDontExist),
expressionToConditional(
`${FATHER_DETAILS_DONT_EXIST} || ${primaryAddressSameAsOtherPrimaryAddress}`,
`${detailsDontExist} || ${primaryAddressSameAsOtherPrimaryAddress}`,
'hideInPreview'
)
]
Expand All @@ -149,7 +146,7 @@ export const defaultAddressConfiguration: IAddressConfiguration[] = [
},
{
config: AddressCases.PRIMARY_ADDRESS,
conditionalCase: `((${FATHER_DETAILS_DONT_EXIST} || ${primaryAddressSameAsOtherPrimaryAddress}) && !(${mothersDetailsDontExistOnOtherPage}) || ((${detailsDontExist}) && (${mothersDetailsDontExistOnOtherPage})))`
conditionalCase: `((${detailsDontExist} || ${primaryAddressSameAsOtherPrimaryAddress}) && !(${mothersDetailsDontExistOnOtherPage}) || ((${detailsDontExist}) && (${mothersDetailsDontExistOnOtherPage})))`
} /*,
{
config: AddressSubsections.SECONDARY_ADDRESS_SUBSECTION,
Expand Down Expand Up @@ -275,9 +272,9 @@ export const defaultAddressConfiguration: IAddressConfiguration[] = [
config: AddressSubsections.PRIMARY_ADDRESS_SUBSECTION,
label: formMessageDescriptors.primaryAddress,
conditionalCase: [
expressionToConditional(SPOUSE_DETAILS_DONT_EXIST),
expressionToConditional(detailsDontExist),
expressionToConditional(
`${SPOUSE_DETAILS_DONT_EXIST} || ${primaryAddressSameAsOtherPrimaryAddress}`,
`${detailsDontExist} || ${primaryAddressSameAsOtherPrimaryAddress}`,
'hideInPreview'
)
]
Expand All @@ -297,7 +294,7 @@ export const defaultAddressConfiguration: IAddressConfiguration[] = [
},
{
config: AddressCases.PRIMARY_ADDRESS,
conditionalCase: `((${SPOUSE_DETAILS_DONT_EXIST} || ${primaryAddressSameAsOtherPrimaryAddress}) || (${detailsDontExist}))`
conditionalCase: `(${detailsDontExist} || ${primaryAddressSameAsOtherPrimaryAddress})`
}
]
},
Expand Down
10 changes: 1 addition & 9 deletions src/form/common/default-validation-conditionals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
* Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS.
*/
import { Conditional } from '../types/types'
import { IntegratingSystemType } from '../types/types'
import { Validator } from '../types/validators'

/**
Expand Down Expand Up @@ -442,18 +441,11 @@ export const spouseFamilyNameConditionals = [
}
]

export const FATHER_DETAILS_DONT_EXIST =
'(draftData?.father && !draftData?.father.detailsExist) || !values.detailsExist'
export const MOTHER_DETAILS_DONT_EXIST =
'(draftData?.mother && !draftData?.mother.detailsExist) || !values.detailsExist'
export const SPOUSE_DETAILS_DONT_EXIST =
'(draftData?.spouse && !draftData?.spouse.detailsExist) || !values.detailsExist'

// if mothers details do not exist on other page
export const mothersDetailsDontExistOnOtherPage =
'draftData && draftData.mother && !draftData.mother.detailsExist'

// if fathers details do not exist
// if details don't exist for the current section
export const detailsDontExist = '!values.detailsExist'

// primary address same as other primary
Expand Down
Loading

0 comments on commit 173a327

Please sign in to comment.