diff --git a/backend/core/pom.xml b/backend/core/pom.xml index 5860e512b..835291784 100644 --- a/backend/core/pom.xml +++ b/backend/core/pom.xml @@ -36,7 +36,7 @@ commons-validator commons-validator - 1.8.0 + 1.9.0 gr.cite @@ -71,7 +71,7 @@ gr.cite elastic - 2.1.2 + 2.1.4 gr.cite @@ -93,7 +93,7 @@ gr.cite keycloak-api - 2.3.0 + 2.4.0 diff --git a/backend/pom.xml b/backend/pom.xml index 0529f2d2f..8869918f4 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -11,7 +11,7 @@ org.springframework.boot spring-boot-starter-parent - 3.2.5 + 3.3.3 @@ -51,27 +51,6 @@ spring-boot-starter-data-jpa - - - org.elasticsearch - elasticsearch - 8.5.2 - - - org.apache.httpcomponents - httpclient - - - org.apache.httpcomponents - httpcore - - - org.apache.httpcomponents - httpcore-nio - - - - org.apache.httpcomponents.client5 httpclient5 @@ -87,18 +66,6 @@ httpcore 4.4.13 - - - org.elasticsearch.client - elasticsearch-rest-high-level-client - 7.17.19 - - - - org.elasticsearch.client - transport - 7.6.0 - org.hibernate.orm @@ -212,11 +179,6 @@ micrometer-core - - gr.cite - data-tools - 2.1.5 - gr.cite exceptions @@ -233,19 +195,6 @@ 2.2.0 - - gr.cite - elastic - 2.1.2 - - - - gr.cite - keycloak-api - 2.3.0 - - - gr.cite rabbitmq-core diff --git a/backend/web/pom.xml b/backend/web/pom.xml index b1eb56e01..c5ec3c171 100644 --- a/backend/web/pom.xml +++ b/backend/web/pom.xml @@ -70,14 +70,14 @@ io.swagger swagger-annotations - 1.5.20 + 1.6.14 org.junit.jupiter junit-jupiter-api - 5.9.2 + 5.10.3 test @@ -109,7 +109,7 @@ org.springdoc springdoc-openapi-starter-webmvc-ui - 2.1.0 + 2.3.0 diff --git a/frontend/Dockerfile b/frontend/Dockerfile index e9988086e..400173d44 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -14,7 +14,7 @@ COPY . . RUN npm run ng build -- --configuration production #RUN node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build -- --deploy-url=/ --prod -FROM nginx:alpine +FROM nginx:mainline-alpine #!/bin/sh diff --git a/frontend/src/app/ui/admin/description-template/editor/components/field-set/description-template-editor-field-set.component.html b/frontend/src/app/ui/admin/description-template/editor/components/field-set/description-template-editor-field-set.component.html index 1c0042612..b5e11e74a 100644 --- a/frontend/src/app/ui/admin/description-template/editor/components/field-set/description-template-editor-field-set.component.html +++ b/frontend/src/app/ui/admin/description-template/editor/components/field-set/description-template-editor-field-set.component.html @@ -260,11 +260,22 @@
  • - {{'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELDSET.COMMENT-FIELD' | translate}} + + {{'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELDSET.COMMENT-FIELD' | translate}} + {{form.get('hasCommentField').getError('backendError').message}}
  • - + {{'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELDSET.MULTIPLICITY' | translate}}
  • @@ -272,9 +283,30 @@ more_vert - {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD-SET.FIELDS.DESCRIPTION' | translate}} - {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD-SET.FIELDS.EXTENDED-DESCRIPTION' | translate}} - {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD-SET.FIELDS.ADDITIONAL-INFORMATION' | translate}} + + {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD-SET.FIELDS.DESCRIPTION' | translate}} + + + {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD-SET.FIELDS.EXTENDED-DESCRIPTION' | translate}} + + + {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD-SET.FIELDS.ADDITIONAL-INFORMATION' | translate}} + diff --git a/frontend/src/app/ui/admin/description-template/editor/components/field-set/description-template-editor-field-set.component.ts b/frontend/src/app/ui/admin/description-template/editor/components/field-set/description-template-editor-field-set.component.ts index 93894f918..335871ea7 100644 --- a/frontend/src/app/ui/admin/description-template/editor/components/field-set/description-template-editor-field-set.component.ts +++ b/frontend/src/app/ui/admin/description-template/editor/components/field-set/description-template-editor-field-set.component.ts @@ -22,7 +22,6 @@ import { DescriptionTemplateFieldSetPersist, DescriptionTemplateReferenceTypeFie import { DescriptionEditorModel } from '@app/ui/description/editor/description-editor.model'; import { Description } from '@app/core/model/description/description'; import { VisibilityRulesService } from '@app/ui/description/editor/description-form/visibility-rules/visibility-rules.service'; -import { ReferenceTypeService } from '@app/core/services/reference-type/reference-type.service'; import { ReferenceType } from '@app/core/model/reference-type/reference-type'; @Component({ @@ -66,7 +65,6 @@ export class DescriptionTemplateEditorFieldSetComponent extends BaseComponent im public descriptionTemplateService: DescriptionTemplateService, private configurationService: ConfigurationService, public visibilityRulesService: VisibilityRulesService, - private referenceTypeService: ReferenceTypeService, ) { super(); } diff --git a/frontend/src/app/ui/admin/description-template/editor/description-template-editor.component.html b/frontend/src/app/ui/admin/description-template/editor/description-template-editor.component.html index 15e864eaf..0871f4514 100644 --- a/frontend/src/app/ui/admin/description-template/editor/description-template-editor.component.html +++ b/frontend/src/app/ui/admin/description-template/editor/description-template-editor.component.html @@ -136,7 +136,7 @@ - +
    @@ -268,7 +268,7 @@ chevron_left {{'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.PREVIOUS' | translate}} - diff --git a/frontend/src/app/ui/admin/description-template/editor/description-template-editor.component.ts b/frontend/src/app/ui/admin/description-template/editor/description-template-editor.component.ts index c8383a333..cd2cec5a1 100644 --- a/frontend/src/app/ui/admin/description-template/editor/description-template-editor.component.ts +++ b/frontend/src/app/ui/admin/description-template/editor/description-template-editor.component.ts @@ -38,7 +38,7 @@ import { Guid } from '@common/types/guid'; import { TranslateService } from '@ngx-translate/core'; import { map, takeUntil } from 'rxjs/operators'; import { GENERAL_ANIMATIONS, STEPPER_ANIMATIONS } from './animations/animations'; -import { DescriptionTemplateEditorModel, DescriptionTemplateFieldEditorModel, DescriptionTemplateFieldSetEditorModel, DescriptionTemplatePageEditorModel, DescriptionTemplateSectionEditorModel, UserDescriptionTemplateEditorModel } from './description-template-editor.model'; +import { DescriptionTemplateEditorModel, DescriptionTemplateFieldEditorModel, DescriptionTemplateFieldSetEditorModel, DescriptionTemplateForm, DescriptionTemplatePageEditorModel, DescriptionTemplateSectionEditorModel, UserDescriptionTemplateEditorModel } from './description-template-editor.model'; import { DescriptionTemplateEditorResolver } from './description-template-editor.resolver'; import { DescriptionTemplateEditorService } from './description-template-editor.service'; import { NewEntryType, ToCEntry, ToCEntryType } from './table-of-contents/description-template-table-of-contents-entry'; @@ -59,7 +59,7 @@ export class DescriptionTemplateEditorComponent extends BaseEditor = null; item: DescriptionTemplate; showInactiveDetails = false; finalized: DescriptionTemplateStatus.Finalized; @@ -260,7 +260,7 @@ export class DescriptionTemplateEditorComponent extends BaseEditor void): void { if (!this.isNewVersion) { - const formData = this.formService.getValue(this.formGroup.value) as DescriptionTemplatePersist; + const formData = JSON.parse(JSON.stringify(this.formGroup.value)) as DescriptionTemplatePersist; formData.code = this.formGroup.get('code').getRawValue(); this.descriptionTemplateService.persist(formData) @@ -272,7 +272,7 @@ export class DescriptionTemplateEditorComponent extends BaseEditor { if (result) { - this.descriptionTemplateService.delete(value.id).pipe(takeUntil(this._destroyed)) + this.descriptionTemplateService.delete(id).pipe(takeUntil(this._destroyed)) .subscribe( complete => this.onCallbackDeleteSuccess(), error => this.onCallbackError(error) diff --git a/frontend/src/app/ui/admin/description-template/editor/description-template-editor.model.ts b/frontend/src/app/ui/admin/description-template/editor/description-template-editor.model.ts index aa2a4b8b2..63c9da55c 100644 --- a/frontend/src/app/ui/admin/description-template/editor/description-template-editor.model.ts +++ b/frontend/src/app/ui/admin/description-template/editor/description-template-editor.model.ts @@ -1,4 +1,4 @@ -import { FormArray, FormControl, UntypedFormArray, UntypedFormBuilder, UntypedFormGroup, Validators } from "@angular/forms"; +import { FormArray, FormControl, FormGroup, UntypedFormArray, UntypedFormBuilder, UntypedFormGroup, Validators } from "@angular/forms"; import { DescriptionTemplateFieldDataExternalDatasetType } from "@app/core/common/enum/description-template-field-data-external-dataset-type"; import { DescriptionTemplateFieldType } from "@app/core/common/enum/description-template-field-type"; import { DescriptionTemplateFieldValidationType } from "@app/core/common/enum/description-template-field-validation-type"; @@ -14,6 +14,20 @@ import { Validation, ValidationContext } from "@common/forms/validation/validati import { Guid } from "@common/types/guid"; import { EditorCustomValidators } from "./custom-validators/editor-custom-validators"; +export interface DescriptionTemplateForm { + id: FormControl; + hash: FormControl; + label: FormControl; + code: FormControl; + description: FormControl; + language: FormControl; + type: FormControl; + status: FormControl; + definition: FormGroup; + users: FormArray> + permissions: FormControl; +} + export class DescriptionTemplateEditorModel extends BaseEditorModel implements DescriptionTemplatePersist { label: string; code: string; @@ -45,7 +59,7 @@ export class DescriptionTemplateEditorModel extends BaseEditorModel implements D return this; } - buildForm(context: ValidationContext = null, disabled: boolean = false): UntypedFormGroup { + buildForm(context: ValidationContext = null, disabled: boolean = false): FormGroup { if (context == null) { context = this.createValidationContext(); } return this.formBuilder.group({ @@ -114,6 +128,10 @@ export class DescriptionTemplateEditorModel extends BaseEditorModel implements D } +export interface UserDescriptionTemplateForm { + userId: FormControl; + role: FormControl; +} export class UserDescriptionTemplateEditorModel implements UserDescriptionTemplatePersist { userId?: Guid; role?: UserDescriptionTemplateRole; @@ -136,7 +154,7 @@ export class UserDescriptionTemplateEditorModel implements UserDescriptionTempla context?: ValidationContext, disabled?: boolean, rootPath?: string - }): UntypedFormGroup { + }): FormGroup { let { context = null, disabled = false, rootPath } = params ?? {} if (context == null) { context = UserDescriptionTemplateEditorModel.createValidationContext({ @@ -187,6 +205,11 @@ export class UserDescriptionTemplateEditorModel implements UserDescriptionTempla } + +export interface DescriptionTemplateDefinitionForm { + pages: FormArray>; +} + export class DescriptionTemplateDefinitionEditorModel implements DescriptionTemplateDefinitionPersist { pages: DescriptionTemplatePageEditorModel[] = []; @@ -259,6 +282,13 @@ export class DescriptionTemplateDefinitionEditorModel implements DescriptionTemp } +export interface DescriptionTemplatePageForm{ + id: FormControl; + ordinal: FormControl; + title: FormControl; + sections: FormArray>; +} + export class DescriptionTemplatePageEditorModel implements DescriptionTemplatePagePersist { id: string; ordinal: number; @@ -364,6 +394,14 @@ export class DescriptionTemplatePageEditorModel implements DescriptionTemplatePa } +export interface DescriptionTemplateSectionForm { + id: FormControl; + ordinal: FormControl; + title: FormControl; + description: FormControl; + sections: FormArray>; + fieldSets: FormArray>; +} export class DescriptionTemplateSectionEditorModel implements DescriptionTemplateSectionPersist { id: string; ordinal: number; @@ -487,6 +525,18 @@ export class DescriptionTemplateSectionEditorModel implements DescriptionTemplat } +export interface DescriptionTemplateFieldSetForm { + id: FormControl; + ordinal: FormControl; + title: FormControl; + description: FormControl; + extendedDescription: FormControl; + additionalInformation: FormControl; + multiplicity: FormGroup; + hasMultiplicity: FormControl; + hasCommentField: FormControl; + fields: FormArray>; +} export class DescriptionTemplateFieldSetEditorModel implements DescriptionTemplateFieldSetPersist { id: string; ordinal: number; @@ -615,6 +665,12 @@ export class DescriptionTemplateFieldSetEditorModel implements DescriptionTempla } } +export interface DescriptionTemplateMultiplicityForm { + min: FormControl; + max: FormControl; + placeholder: FormControl; + tableView: FormControl; +} export class DescriptionTemplateMultiplicityEditorModel implements DescriptionTemplateMultiplicityPersist { min: number; max: number; @@ -700,6 +756,17 @@ export class DescriptionTemplateMultiplicityEditorModel implements DescriptionTe // Field Editor Model // // + +export interface DescriptionTemplateFieldForm { + id: FormControl; + ordinal: FormControl; + semantics: FormControl; + defaultValue: FormGroup; + visibilityRules: FormArray>; + validations: FormControl; + includeInExport: FormControl; + data: FormGroup; +} export class DescriptionTemplateFieldEditorModel implements DescriptionTemplateFieldPersist { id: string; ordinal: number; @@ -892,6 +959,12 @@ export class DescriptionTemplateFieldEditorModel implements DescriptionTemplateF } } +export interface DescriptionTemplateDefaultValueForm { + target: FormControl; + textValue: FormControl; + dateValue: FormControl; + booleanValue: FormControl; +} export class DescriptionTemplateDefaultValueEditorModel implements DescriptionTemplateDefaultValuePersist { target: string; textValue: string; @@ -969,6 +1042,13 @@ export class DescriptionTemplateDefaultValueEditorModel implements DescriptionTe } } +export interface DescriptionTemplateRuleForm { + target: FormControl; + textValue: FormControl; + dateValue: FormControl; + booleanValue: FormControl; +} + export class DescriptionTemplateRuleEditorModel implements DescriptionTemplateRulePersist { target: string; textValue: string; @@ -1049,6 +1129,10 @@ export class DescriptionTemplateRuleEditorModel implements DescriptionTemplateRu } } +export interface DescriptionTemplateLabelDataForm { + label: FormControl; + fieldType: FormControl; +} export class DescriptionTemplateLabelDataEditorModel implements DescriptionTemplateLabelDataPersist { label: string; fieldType: DescriptionTemplateFieldType; @@ -1470,6 +1554,7 @@ export class DescriptionTemplateRadioBoxOptionEditorModel implements Description // Select Field // // + export class DescriptionTemplateSelectDataEditorModel extends DescriptionTemplateLabelDataEditorModel implements DescriptionTemplateSelectDataPersist { options: DescriptionTemplateSelectOptionEditorModel[] = []; multipleSelect: boolean = false; @@ -1625,6 +1710,10 @@ export class DescriptionTemplateSelectOptionEditorModel implements DescriptionTe } +export interface DescriptionTemplateUploadDataForm { + types: FormArray; + maxFileSizeInMB: FormControl; +} // // // Upload Field @@ -1714,6 +1803,7 @@ export class DescriptionTemplateUploadDataEditorModel extends DescriptionTemplat } } + export class DescriptionTemplateUploadOptionEditorModel implements DescriptionTemplateUploadOptionPersist { label: string; value: string; @@ -1784,3 +1874,8 @@ export class DescriptionTemplateUploadOptionEditorModel implements DescriptionTe }) } } + +export interface LabelValueForm extends FormGroup<{ + label: FormControl; + value: FormControl; +}>{} \ No newline at end of file diff --git a/frontend/src/app/ui/admin/description-template/editor/table-of-contents/table-of-contents-internal-section/description-template-table-of-contents-internal-section.html b/frontend/src/app/ui/admin/description-template/editor/table-of-contents/table-of-contents-internal-section/description-template-table-of-contents-internal-section.html index 6694f32b1..0316eb2d0 100644 --- a/frontend/src/app/ui/admin/description-template/editor/table-of-contents/table-of-contents-internal-section/description-template-table-of-contents-internal-section.html +++ b/frontend/src/app/ui/admin/description-template/editor/table-of-contents/table-of-contents-internal-section/description-template-table-of-contents-internal-section.html @@ -71,7 +71,7 @@ - - + +
    diff --git a/frontend/src/app/ui/admin/plan-blueprint/editor/plan-blueprint-editor.component.html b/frontend/src/app/ui/admin/plan-blueprint/editor/plan-blueprint-editor.component.html index 573ff05cd..c466d7ab9 100644 --- a/frontend/src/app/ui/admin/plan-blueprint/editor/plan-blueprint-editor.component.html +++ b/frontend/src/app/ui/admin/plan-blueprint/editor/plan-blueprint-editor.component.html @@ -42,7 +42,7 @@ {{'PLAN-BLUEPRINT-EDITOR.SYSTEM-FIELDS-REQUIRED' | translate}}
    -
    +
    @@ -50,10 +50,10 @@
    {{'PLAN-BLUEPRINT-EDITOR.FIELDS.SECTION-PREFIX' | translate}} {{sectionIndex + 1}}
    -
    drag_indicator
    +
    drag_indicator
    -
    @@ -83,12 +83,12 @@
    -
    +
    {{fieldIndex + 1}} - drag_indicator + drag_indicator
    {{fieldIndex + 1}} - drag_indicator + drag_indicator
    @@ -238,16 +238,16 @@
    -
    +
    {{descriptionTemplateIndex + 1}} - drag_indicator + drag_indicator
    -
    @@ -255,7 +255,7 @@
    {{descriptionTemplateIndex + 1}} - drag_indicator + drag_indicator
    @@ -297,7 +297,7 @@
    -
    diff --git a/frontend/src/app/ui/admin/plan-blueprint/editor/plan-blueprint-editor.component.scss b/frontend/src/app/ui/admin/plan-blueprint/editor/plan-blueprint-editor.component.scss index 948baf217..e52566192 100644 --- a/frontend/src/app/ui/admin/plan-blueprint/editor/plan-blueprint-editor.component.scss +++ b/frontend/src/app/ui/admin/plan-blueprint/editor/plan-blueprint-editor.component.scss @@ -67,22 +67,6 @@ transform: translateX(-50%); } -.action-list-item{ - display: flex; - align-items: center; - cursor: pointer; - - .action-list-icon{ - font-size: 1.2em; - color: var(--primary-color); - } - - .action-list-text{ - font-size: 1em; - color: var(--primary-color); - } -} - .field-delete{ align-items: center; display: flex; diff --git a/frontend/src/app/ui/admin/prefilling-source/editor/prefilling-source-editor.component.html b/frontend/src/app/ui/admin/prefilling-source/editor/prefilling-source-editor.component.html index ea9749673..925a151db 100644 --- a/frontend/src/app/ui/admin/prefilling-source/editor/prefilling-source-editor.component.html +++ b/frontend/src/app/ui/admin/prefilling-source/editor/prefilling-source-editor.component.html @@ -70,7 +70,7 @@ {{'PREFILLING-SOURCE-EDITOR.FIELDS.FIELD' | translate}} {{fieldIndex + 1}}
    -
    @@ -112,7 +112,7 @@ {{'PREFILLING-SOURCE-EDITOR.FIELDS.FIELD' | translate}} {{fieldIndex + 1}}
    -
    diff --git a/frontend/src/app/ui/admin/prefilling-source/listing/prefilling-source-listing.component.html b/frontend/src/app/ui/admin/prefilling-source/listing/prefilling-source-listing.component.html index 1b18dd1e0..307c7321a 100644 --- a/frontend/src/app/ui/admin/prefilling-source/listing/prefilling-source-listing.component.html +++ b/frontend/src/app/ui/admin/prefilling-source/listing/prefilling-source-listing.component.html @@ -86,7 +86,7 @@ edit{{'PREFILLING-SOURCE-LISTING.ACTIONS.EDIT' | translate}} - diff --git a/frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.html b/frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.html index 6b1b33f2f..74270b0fb 100644 --- a/frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.html +++ b/frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.html @@ -117,7 +117,7 @@
    -
    @@ -144,7 +144,7 @@ {{'REFERENCE-TYPE-EDITOR.FIELDS.SOURCE-CONFIGURATION' | translate}} {{sourceIndex + 1}}
    -
    diff --git a/frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.scss b/frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.scss index 77591bcb1..cf8c26656 100644 --- a/frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.scss +++ b/frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.scss @@ -39,22 +39,6 @@ transform: translateX(-50%); } -.action-list-item{ - display: flex; - align-items: center; - cursor: pointer; - - .action-list-icon{ - font-size: 1.2em; - color: var(--primary-color); - } - - .action-list-text{ - font-size: 1em; - color: var(--primary-color); - } -} - .field-delete{ align-items: center; display: flex; diff --git a/frontend/src/app/ui/admin/reference/editor/reference-editor.component.html b/frontend/src/app/ui/admin/reference/editor/reference-editor.component.html index bb288a0fc..494eebf23 100644 --- a/frontend/src/app/ui/admin/reference/editor/reference-editor.component.html +++ b/frontend/src/app/ui/admin/reference/editor/reference-editor.component.html @@ -129,7 +129,7 @@
    -
    diff --git a/frontend/src/app/ui/admin/tenant-configuration/editor/deposit/deposit-editor.component.html b/frontend/src/app/ui/admin/tenant-configuration/editor/deposit/deposit-editor.component.html index 96e4d0694..997e2b38f 100644 --- a/frontend/src/app/ui/admin/tenant-configuration/editor/deposit/deposit-editor.component.html +++ b/frontend/src/app/ui/admin/tenant-configuration/editor/deposit/deposit-editor.component.html @@ -18,7 +18,7 @@ {{'TENANT-CONFIGURATION-EDITOR.FIELDS.DEPOSIT-PLUGINS' | translate}} {{sourceIndex + 1}}
    -
    diff --git a/frontend/src/app/ui/admin/tenant-configuration/editor/description-workflow/description-workflow-editor/description-workflow-editor.component.html b/frontend/src/app/ui/admin/tenant-configuration/editor/description-workflow/description-workflow-editor/description-workflow-editor.component.html index dad1c387b..342e767a3 100644 --- a/frontend/src/app/ui/admin/tenant-configuration/editor/description-workflow/description-workflow-editor/description-workflow-editor.component.html +++ b/frontend/src/app/ui/admin/tenant-configuration/editor/description-workflow/description-workflow-editor/description-workflow-editor.component.html @@ -27,7 +27,7 @@ {{'WORKFLOW-EDITOR.FIELDS.STATUS-TRANSITION' | translate}} {{index + 1}}
    -
    diff --git a/frontend/src/app/ui/admin/tenant-configuration/editor/file-transformer/file-transformer-editor.component.html b/frontend/src/app/ui/admin/tenant-configuration/editor/file-transformer/file-transformer-editor.component.html index 608f0e314..1b2d89e70 100644 --- a/frontend/src/app/ui/admin/tenant-configuration/editor/file-transformer/file-transformer-editor.component.html +++ b/frontend/src/app/ui/admin/tenant-configuration/editor/file-transformer/file-transformer-editor.component.html @@ -9,7 +9,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
    - +
    @@ -17,7 +17,7 @@ {{'TENANT-CONFIGURATION-EDITOR.FIELDS.FILE-TRANSFORMER-PLUGINS' | translate}} {{sourceIndex + 1}}
    -
    diff --git a/frontend/src/app/ui/admin/tenant-configuration/editor/plan-workflow/plan-workflow-editor/plan-workflow-editor.component.html b/frontend/src/app/ui/admin/tenant-configuration/editor/plan-workflow/plan-workflow-editor/plan-workflow-editor.component.html index 594607a0b..458fd70d2 100644 --- a/frontend/src/app/ui/admin/tenant-configuration/editor/plan-workflow/plan-workflow-editor/plan-workflow-editor.component.html +++ b/frontend/src/app/ui/admin/tenant-configuration/editor/plan-workflow/plan-workflow-editor/plan-workflow-editor.component.html @@ -27,7 +27,7 @@ {{'WORKFLOW-EDITOR.FIELDS.STATUS-TRANSITION' | translate}} {{index + 1}}
    -
    diff --git a/frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.html b/frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.html index 5f706640e..3e19a08f6 100644 --- a/frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.html +++ b/frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.html @@ -37,14 +37,13 @@
    -
    -
    diff --git a/frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.scss b/frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.scss index aa35222a8..b71c301ce 100644 --- a/frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.scss +++ b/frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.scss @@ -18,10 +18,6 @@ margin-right: 8px; } - .row-action { - color: var(--primary-color); - cursor: pointer; - } .user-role{ text-align: center; width: auto; @@ -150,10 +146,6 @@ padding-left: 10px; padding-right: 10px; } - - .save-button { - margin-bottom: 1em; - } } :host ::ng-deep .mat-form-field-wrapper { diff --git a/frontend/src/app/ui/dashboard/dashboard.component.html b/frontend/src/app/ui/dashboard/dashboard.component.html index 08159db03..ad4614a5c 100644 --- a/frontend/src/app/ui/dashboard/dashboard.component.html +++ b/frontend/src/app/ui/dashboard/dashboard.component.html @@ -59,16 +59,30 @@
    {{'DASHBOARD.LATEST-ACTIVITY' | translate}}
    - + - + - + - +
    diff --git a/frontend/src/app/ui/dashboard/dashboard.component.ts b/frontend/src/app/ui/dashboard/dashboard.component.ts index b779007bb..db8ce7474 100644 --- a/frontend/src/app/ui/dashboard/dashboard.component.ts +++ b/frontend/src/app/ui/dashboard/dashboard.component.ts @@ -31,10 +31,12 @@ export class DashboardComponent extends BaseComponent implements OnInit { public dashboardStatistics: DashboardStatistics; public grantCount = 0; public organizationCount = 0; - currentType: string = "recent"; + currentType: ActivityListingType = ActivityListingType.Recent; newReleaseNotificationVisible = false; isIntroCardVisible = true; + ActivityListingType = ActivityListingType; + constructor( public routerUtils: RouterUtilsService, private router: Router, @@ -57,11 +59,7 @@ export class DashboardComponent extends BaseComponent implements OnInit { ngOnInit() { this.route.queryParams.subscribe(params => { let type = params['type']; - if (type || type == "recent" || (type == "drafts" && this.isAuthenticated()) || type == "plans" || type == "descriptions") { - this.currentType = type; - } else { - this.currentType = "recent"; - } + this.currentType = type ?? ActivityListingType.Recent }); this.analyticsService.trackPageView(AnalyticsService.Dashboard); @@ -92,20 +90,13 @@ export class DashboardComponent extends BaseComponent implements OnInit { } public get indexFromCurrentType() { - if (this.currentType == "recent") { - return 0; - } - if (this.currentType == "drafts") { - return 1; - } - if (this.currentType == "plans") { - return this.isAuthenticated() ? 2 : 1; - } - if (this.currentType == "descriptions") { - return this.isAuthenticated() ? 3 : 2; - } - return 0; + switch(this.currentType){ + case ActivityListingType.Recent: return 0; + case ActivityListingType.Drafts: return 1; + case ActivityListingType.Plans: return this.isAuthenticated() ? 2 : 1; + case ActivityListingType.Descriptions: return this.isAuthenticated() ? 3 : 2; + } } public isAuthenticated(): boolean { @@ -255,3 +246,10 @@ export class DashboardComponent extends BaseComponent implements OnInit { return true; } } + +export enum ActivityListingType { + 'Recent'= 'recent', + 'Drafts' = 'drafts', + 'Plans' = 'plans', + 'Descriptions' = 'descriptions' +} \ No newline at end of file diff --git a/frontend/src/app/ui/dashboard/dashboard.module.ts b/frontend/src/app/ui/dashboard/dashboard.module.ts index 3967e273e..ac043ec2b 100644 --- a/frontend/src/app/ui/dashboard/dashboard.module.ts +++ b/frontend/src/app/ui/dashboard/dashboard.module.ts @@ -25,7 +25,7 @@ import { RecentEditedActivityComponent } from './recent-edited-activity/recent-e ], declarations: [ DashboardComponent, - RecentEditedActivityComponent, + RecentEditedActivityComponent, ] }) export class DashboardModule { } diff --git a/frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.ts b/frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.ts index 797e684c3..36c761abf 100644 --- a/frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.ts +++ b/frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.ts @@ -1,5 +1,5 @@ import { Location } from '@angular/common'; -import { Component, Input, OnInit, Output } from '@angular/core'; +import { Component, computed, effect, input, Input, OnInit, Output } from '@angular/core'; import { UntypedFormBuilder, UntypedFormControl } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; import { DescriptionStatusEnum } from '@app/core/common/enum/description-status'; @@ -27,6 +27,7 @@ import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/ import { BehaviorSubject } from 'rxjs'; import { debounceTime, map, takeUntil } from 'rxjs/operators'; import { nameof } from 'ts-simple-nameof'; +import { ActivityListingType } from '../dashboard.component'; @Component({ selector: 'app-recent-edited-activity', @@ -43,15 +44,32 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn pageSize: number = 5; listingItems: RecentActivityItem[]= []; - @Input() type: string; - @Input() selectedType: string; - @Input() includeDescriptions: boolean = false; - @Input() includePlans: boolean = false; - @Input() onlyDrafts: boolean = false; + @Input() type: ActivityListingType = ActivityListingType.Recent; @Input() hasPlans: boolean = false; - + @Output() addNewDescription: BehaviorSubject = new BehaviorSubject(false); + + currentType = input(); + isActive = computed(() => this.currentType() === this.type); + + get onlyDrafts(): boolean { + return this.type === ActivityListingType.Drafts; + } + + get includeDescriptions(): boolean { + const activityListingTypes = [ActivityListingType.Recent, ActivityListingType.Drafts, ActivityListingType.Descriptions] + return activityListingTypes.includes(this.type); + } + + get includePlans(): boolean { + const activityListingTypes = [ActivityListingType.Recent, ActivityListingType.Drafts, ActivityListingType.Plans] + return activityListingTypes.includes(this.type); + } + get isDefault(): boolean { + return this.type === ActivityListingType.Recent; + } + get onlyPlans(): boolean { return this.includePlans && !this.includeDescriptions; } @@ -72,7 +90,6 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn totalCount: number; offsetLess: number = 0; - @Input() isActive: boolean = false; constructor( private route: ActivatedRoute, @@ -86,12 +103,17 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn private httpErrorHandlingService: HttpErrorHandlingService ) { super(); + effect(() => { + if(this.isActive()){ //on Type Changes + this.updateUrl(); + } + }) } ngOnInit() { this.analyticsService.trackPageView(AnalyticsService.RecentEditedActivity); this.route.queryParams.subscribe(params => { - if (this.isActive) { + if (this.isActive()) { let page = (params['page'] === undefined) ? 0 : + params['page']; this.currentPage = (page <= 0) ? 0 : page; @@ -123,24 +145,20 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn this.refresh() }); - if (!this.formGroup.get('order').value) this.formGroup.get('order').setValue(this.order.UpdatedAt); - + if (!this.formGroup.get('order').value){ + this.formGroup.get('order').setValue(this.order.UpdatedAt); + } + this.formGroup.get('order').valueChanges .pipe(takeUntil(this._destroyed)) - .subscribe(x => this.refresh()); + .subscribe(x => {this.refresh()}); this.refresh(); } - ngOnChanges() { - if (this.isActive) { - this.updateUrl(); - } - } - updateUrl() { let parametersArray: string[] = [ - ...( this.selectedType && this.type === this.selectedType ? ["type=" + this.selectedType] : []), + ...( !this.isDefault && this.isActive() ? ["type=" + this.type] : []), ...(this.currentPage > 1 ? ["page=" + this.currentPage] : []), ...(this.formGroup.get("like").value ? ["keyword=" + this.formGroup.get("like").value] : []) ]