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

chore(v1.6.0): add allowedFileFormat properties for signature fields #260

Merged
merged 3 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,20 @@
- 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)
- 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

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

### New features

- 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

Comment on lines +19 to +24
Copy link
Collaborator

Choose a reason for hiding this comment

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

These are in the original CHANGELOG.md of the release-v1.6.0. Not sure how it comes in the diff. Here is the CHANGELOG.md of 1.6

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'll clean up the changelogs

### Breaking changes

- #### Update the certificate preview mechanism
Expand Down
1 change: 1 addition & 0 deletions src/form/common/common-optional-fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ export const informantsSignature = {
},
validator: [],
type: 'SIGNATURE',
allowedFileFormats: ['image/png', 'image/svg'],
mapping: {
mutation: {
operation: 'fieldValueSectionExchangeTransformer',
Expand Down
4 changes: 4 additions & 0 deletions src/form/marriage/required-sections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ const signatureFields = [
required: true,
validator: [],
type: 'SIGNATURE',
allowedFileFormats: ['image/png'],
mapping: {
mutation: {
operation: 'fieldValueSectionExchangeTransformer',
Expand All @@ -144,6 +145,7 @@ const signatureFields = [
required: true,
validator: [],
type: 'SIGNATURE',
allowedFileFormats: ['image/png'],
mapping: {
mutation: {
operation: 'fieldValueSectionExchangeTransformer',
Expand All @@ -165,6 +167,7 @@ const signatureFields = [
required: true,
validator: [],
type: 'SIGNATURE',
allowedFileFormats: ['image/png'],
mapping: {
mutation: {
operation: 'fieldValueSectionExchangeTransformer',
Expand All @@ -186,6 +189,7 @@ const signatureFields = [
required: true,
validator: [],
type: 'SIGNATURE',
allowedFileFormats: ['image/png'],
mapping: {
mutation: {
operation: 'fieldValueSectionExchangeTransformer',
Expand Down
7 changes: 6 additions & 1 deletion src/form/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
Loading