From fa997d49fc2f07dfadc899f8c9f66a917ec0a947 Mon Sep 17 00:00:00 2001 From: "Md. Ashikul Alam" Date: Wed, 11 Sep 2024 13:33:59 +0600 Subject: [PATCH 1/3] chore: add allowedFileFormat properties for signature fields --- src/form/common/common-optional-fields.ts | 1 + src/form/marriage/required-sections.ts | 4 ++++ src/form/types/types.ts | 7 ++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/form/common/common-optional-fields.ts b/src/form/common/common-optional-fields.ts index 3be7a5e25..3d78ff4e2 100644 --- a/src/form/common/common-optional-fields.ts +++ b/src/form/common/common-optional-fields.ts @@ -209,6 +209,7 @@ export const informantsSignature = { }, validator: [], type: 'SIGNATURE', + allowedFileFormats: ['image/png', 'image/svg'], mapping: { mutation: { operation: 'fieldValueSectionExchangeTransformer', diff --git a/src/form/marriage/required-sections.ts b/src/form/marriage/required-sections.ts index dc57c50a5..358b1f58c 100644 --- a/src/form/marriage/required-sections.ts +++ b/src/form/marriage/required-sections.ts @@ -123,6 +123,7 @@ const signatureFields = [ required: true, validator: [], type: 'SIGNATURE', + allowedFileFormats: ['image/png'], mapping: { mutation: { operation: 'fieldValueSectionExchangeTransformer', @@ -144,6 +145,7 @@ const signatureFields = [ required: true, validator: [], type: 'SIGNATURE', + allowedFileFormats: ['image/png'], mapping: { mutation: { operation: 'fieldValueSectionExchangeTransformer', @@ -165,6 +167,7 @@ const signatureFields = [ required: true, validator: [], type: 'SIGNATURE', + allowedFileFormats: ['image/png'], mapping: { mutation: { operation: 'fieldValueSectionExchangeTransformer', @@ -186,6 +189,7 @@ const signatureFields = [ required: true, validator: [], type: 'SIGNATURE', + allowedFileFormats: ['image/png'], mapping: { mutation: { operation: 'fieldValueSectionExchangeTransformer', diff --git a/src/form/types/types.ts b/src/form/types/types.ts index 28a95b547..04d315e4d 100644 --- a/src/form/types/types.ts +++ b/src/form/types/types.ts @@ -486,7 +486,12 @@ export interface IHeading3Field extends IFormFieldBase { export interface ISignatureFormField extends IFormFieldBase { type: typeof SIGNATURE maxSizeMb?: number - allowedFileFormats?: ('png' | 'jpg' | 'jpeg' | 'svg')[] + allowedFileFormats?: ( + | 'image/png' + | 'image/jpg' + | 'image/jpeg' + | 'image/svg' + )[] } export type IFormField = From 4e1a8df7c44c06139c99bc9f7811df112a655a8e Mon Sep 17 00:00:00 2001 From: "Md. Ashikul Alam" Date: Thu, 12 Sep 2024 13:47:22 +0600 Subject: [PATCH 2/3] docs: update changelog for updating allowed file format for signatures --- CHANGELOG.md | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66ab92ea4..e94f6857d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,13 +7,42 @@ - Remove `splitView` option from DOCUMENT_UPLOADER_WITH_OPTION field - New required sections preview & review added. Signature field definitions are now part of these two sections same as normal form fields. - Remove `inputFieldWidth` from Number type form field -- You can now configure the home screen application’s name and icons in your country configuration package as manifest.json and app icon files are moved from core to country config (check `src/client-static` folder) +- Application config file is renamed to `application-config.ts` +- Allow configuring the default search criteria for record search which can be done by adding or modifying a property named `SEARCH_DEFAULT_CRITERIA` in `application-config.ts` + Value of `SEARCH_DEFAULT_CRITERIA` can be one of the following + 1. 'TRACKING_ID', + 2. 'REGISTRATION_NUMBER', + 3. 'NATIONAL_ID', + 4. 'NAME', + 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. -### Bug fixes +### New features + +- Certificate handlebar for registration fees `registrationFees` [#6817](https://github.com/opencrvs/opencrvs-core/issues/6817) +- Logged in user details handlebar `loggedInUser` [#6529](https://github.com/opencrvs/opencrvs-core/issues/6529) +- Supporting document fields can now be made required +- If there is only one option in the document uploader select, then it stays hidden and only the upload button is showed with the only option being selected by default + +* **ElasticSearch reindexing** + +Allows reindexing ElasticSearch via a new search-service endpoint `reindex`. We're replacing the original `ocrvs` index with timestamped ones. This is done automatically when upgrading and migrating, but this is an important architectural change that should be noted. More details in [#7033](https://github.com/opencrvs/opencrvs-core/pull/7033). + +- Introduce a new certificate handlebar "preview" which can be used to conditionally render some svg element when previewing the certificate e.g. background image similar to security paper + +### New content keys requiring translation + +``` +INSERT CSV ROWS IN ENGLISH ONLY +``` + +## Bug fixes + +- 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) -- Protect individual certificate endpoint with token -- Kibana disk space alerts now work regardless of your disk device names. Alerts listen devices mounted both to `/` and `/data` (encrypted data partition) -- Environment creator script now requires countries to provide a Github token with no expiry date. This is to reduce effort in keeping the token up to date. +## 1.5.0 (https://github.com/opencrvs/opencrvs-countryconfig/compare/v1.4.1...v1.5.0) ### Breaking changes From c5391c334c671a3a7698d0ed6b3815d1e27348c9 Mon Sep 17 00:00:00 2001 From: "Md. Ashikul Alam" Date: Thu, 12 Sep 2024 15:40:32 +0600 Subject: [PATCH 3/3] chore: amend changelog --- CHANGELOG.md | 38 ++++++++------------------------------ 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e94f6857d..8966cafe5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,42 +7,20 @@ - Remove `splitView` option from DOCUMENT_UPLOADER_WITH_OPTION field - New required sections preview & review added. Signature field definitions are now part of these two sections same as normal form fields. - Remove `inputFieldWidth` from Number type form field -- Application config file is renamed to `application-config.ts` -- Allow configuring the default search criteria for record search which can be done by adding or modifying a property named `SEARCH_DEFAULT_CRITERIA` in `application-config.ts` - Value of `SEARCH_DEFAULT_CRITERIA` can be one of the following - 1. 'TRACKING_ID', - 2. 'REGISTRATION_NUMBER', - 3. 'NATIONAL_ID', - 4. 'NAME', - 5. 'PHONE_NUMBER', - 6. 'EMAIL' +- You can now configure the home screen application’s name and icons in your country configuration package as manifest.json and app icon files are moved from core to country config (check `src/client-static` folder) - 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. -### New features - -- Certificate handlebar for registration fees `registrationFees` [#6817](https://github.com/opencrvs/opencrvs-core/issues/6817) -- Logged in user details handlebar `loggedInUser` [#6529](https://github.com/opencrvs/opencrvs-core/issues/6529) -- Supporting document fields can now be made required -- If there is only one option in the document uploader select, then it stays hidden and only the upload button is showed with the only option being selected by default - -* **ElasticSearch reindexing** - -Allows reindexing ElasticSearch via a new search-service endpoint `reindex`. We're replacing the original `ocrvs` index with timestamped ones. This is done automatically when upgrading and migrating, but this is an important architectural change that should be noted. More details in [#7033](https://github.com/opencrvs/opencrvs-core/pull/7033). - -- Introduce a new certificate handlebar "preview" which can be used to conditionally render some svg element when previewing the certificate e.g. background image similar to security paper - -### New content keys requiring translation +### Bug fixes -``` -INSERT CSV ROWS IN ENGLISH ONLY -``` +- Protect individual certificate endpoint with token +- Kibana disk space alerts now work regardless of your disk device names. Alerts listen devices mounted both to `/` and `/data` (encrypted data partition) +- Environment creator script now requires countries to provide a Github token with no expiry date. This is to reduce effort in keeping the token up to date. -## Bug fixes +### New features -- 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) +- The select options in DOCUMENT_UPLOADER_WITH_OPTION field can now be hidden using the new `optionCondition` property. It works similarly to the same property available in SELECT_WITH_OPTIONS field -## 1.5.0 (https://github.com/opencrvs/opencrvs-countryconfig/compare/v1.4.1...v1.5.0) +## 1.5.0 ### Breaking changes