From a55eb97a6ac5bd4ee4a32d07b09369d5d2fa286a Mon Sep 17 00:00:00 2001 From: Vlad Nouski Date: Fri, 20 Oct 2023 16:04:40 +0200 Subject: [PATCH 01/20] [CST-12043] fix: normalization for boolean --- src/app/shared/form/builder/form-builder.service.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/shared/form/builder/form-builder.service.ts b/src/app/shared/form/builder/form-builder.service.ts index cf6f38bf7b8..8bd449a07d1 100644 --- a/src/app/shared/form/builder/form-builder.service.ts +++ b/src/app/shared/form/builder/form-builder.service.ts @@ -196,6 +196,7 @@ export class FormBuilderService extends DynamicFormService { return new FormFieldMetadataValueObject((controlValue as any).value, controlLanguage, authority, (controlValue as any).display, place, (controlValue as any).confidence); } } + return controlValue; }; const iterateControlModels = (findGroupModel: DynamicFormControlModel[], controlModelIndex: number = 0): void => { From ffdeca69f45ff4b0ce811f237a314fc672816777 Mon Sep 17 00:00:00 2001 From: Vlad Nouski Date: Fri, 20 Oct 2023 16:07:31 +0200 Subject: [PATCH 02/20] [CST-12043] feature: add primary bitstream switch --- .../workspaceitem-section-upload.model.ts | 5 +- .../custom-switch.component.html | 2 +- .../objects/submission-objects.actions.ts | 25 +++++ .../objects/submission-objects.reducer.ts | 47 ++++++++- .../section-upload-file-edit.component.html | 6 +- .../section-upload-file-edit.component.ts | 69 +++++++------ .../edit/section-upload-file-edit.model.ts | 13 +++ .../file/section-upload-file.component.html | 9 +- .../file/section-upload-file.component.ts | 97 ++++++++++++++++++- .../themed-section-upload-file.component.ts | 8 ++ .../upload/section-upload.component.html | 28 +++--- .../upload/section-upload.component.ts | 35 +++---- .../sections/upload/section-upload.service.ts | 36 ++++++- 13 files changed, 303 insertions(+), 77 deletions(-) diff --git a/src/app/core/submission/models/workspaceitem-section-upload.model.ts b/src/app/core/submission/models/workspaceitem-section-upload.model.ts index f98e0584ebc..d992567df4c 100644 --- a/src/app/core/submission/models/workspaceitem-section-upload.model.ts +++ b/src/app/core/submission/models/workspaceitem-section-upload.model.ts @@ -4,7 +4,10 @@ import { WorkspaceitemSectionUploadFileObject } from './workspaceitem-section-up * An interface to represent submission's upload section data. */ export interface WorkspaceitemSectionUploadObject { - + /** + * Primary bitstream flag + */ + primary: string | null; /** * A list of [[WorkspaceitemSectionUploadFileObject]] */ diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component.html b/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component.html index ed117a50219..572c99ad3a7 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component.html +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component.html @@ -13,7 +13,7 @@ (blur)="onBlur($event)" (change)="onChange($event)" (focus)="onFocus($event)"/> -