From 2e5b3b2d8d97d9989b2070ab767f5ff3f7b7bf72 Mon Sep 17 00:00:00 2001 From: "CITE\\spapacharalampous" Date: Thu, 5 Sep 2024 12:40:06 +0300 Subject: [PATCH] css clean up on platform buttons and other ui fixes --- .../description-status-listing.component.ts | 2 +- ...escription-template-listing.component.html | 16 +++---- ...ption-template-type-listing.component.html | 6 +-- .../listing/language-listing.component.html | 4 +- .../plan-blueprint-listing.component.html | 16 +++---- .../plan-status-listing.component.html | 4 +- .../plan-status-listing.component.ts | 2 +- .../prefilling-source-listing.component.html | 4 +- .../reference-type-listing.component.html | 4 +- .../listing/reference-listing.component.html | 4 +- .../listing/tenant-listing.component.html | 4 +- .../usage-limit-listing.component.html | 4 +- .../form-field/form-field.component.html | 2 +- ...tart-new-description-dialog.component.html | 4 +- ...tart-new-description-dialog.component.scss | 25 ----------- .../external-fetcher-source.component.html | 18 ++++---- .../external-fetcher-source.component.scss | 34 +++++++-------- .../ui/faq/dialog/faq-dialog.component.html | 2 +- .../ui/faq/dialog/faq-dialog.component.scss | 10 ----- .../plan-clone-dialog.component.html | 4 +- .../plan-clone-dialog.component.scss | 26 +----------- .../plan-invitation-dialog.component.html | 5 ++- .../plan-invitation-dialog.component.scss | 29 ------------- .../plan-listing-item.component.html | 4 +- .../plan-listing-item.component.ts | 10 +++++ .../plan-new-version-dialog.component.html | 4 +- .../plan-new-version-dialog.component.scss | 24 ----------- .../plan-upload-dialog.component.html | 4 +- .../plan-upload-dialog.component.scss | 20 --------- ...plan-contact-prefill-dialog.component.html | 6 +-- ...plan-contact-prefill-dialog.component.scss | 25 ----------- .../plan-contact-prefill-dialog.component.ts | 42 +++++++------------ ...lan-contact-prefill-dialog.editor.model.ts | 38 ----------------- .../plan-editor.component.html | 18 ++++---- .../plan-editor.component.ts | 9 +++- frontend/src/assets/i18n/baq.json | 4 +- frontend/src/assets/i18n/de.json | 4 +- frontend/src/assets/i18n/en.json | 4 +- frontend/src/assets/i18n/es.json | 4 +- frontend/src/assets/i18n/gr.json | 4 +- frontend/src/assets/i18n/hr.json | 4 +- frontend/src/assets/i18n/pl.json | 4 +- frontend/src/assets/i18n/pt.json | 4 +- frontend/src/assets/i18n/sk.json | 4 +- frontend/src/assets/i18n/sr.json | 4 +- frontend/src/assets/i18n/tr.json | 4 +- .../confirmation-dialog.component.html | 8 ++-- .../confirmation-dialog.component.scss | 38 ----------------- ...otification-template-editor.component.html | 6 +-- ...otification-template-editor.component.scss | 18 -------- ...tification-template-listing.component.html | 4 +- frontend/src/styles.scss | 4 ++ 52 files changed, 155 insertions(+), 400 deletions(-) delete mode 100644 frontend/src/app/ui/plan/plan-contact-prefill-dialog/plan-contact-prefill-dialog.editor.model.ts diff --git a/frontend/src/app/ui/admin/description-status/listing/description-status-listing/description-status-listing.component.ts b/frontend/src/app/ui/admin/description-status/listing/description-status-listing/description-status-listing.component.ts index 14bd7cb14..adccab46e 100644 --- a/frontend/src/app/ui/admin/description-status/listing/description-status-listing/description-status-listing.component.ts +++ b/frontend/src/app/ui/admin/description-status/listing/description-status-listing/description-status-listing.component.ts @@ -126,7 +126,7 @@ export class DescriptionStatusListingComponent extends BaseListingComponent(x => x.internalStatus), sortable: true, - languageName: 'PLAN-STATUS-LISTING.FIELDS.STATUS', + languageName: 'PLAN-STATUS-LISTING.FIELDS.INTERNAL-STATUS', cellTemplate: this.status }, { diff --git a/frontend/src/app/ui/admin/description-template/listing/description-template-listing.component.html b/frontend/src/app/ui/admin/description-template/listing/description-template-listing.component.html index d2da35f1c..5b829b2b7 100644 --- a/frontend/src/app/ui/admin/description-template/listing/description-template-listing.component.html +++ b/frontend/src/app/ui/admin/description-template/listing/description-template-listing.component.html @@ -90,19 +90,19 @@ more_horiz - - - - + diff --git a/frontend/src/app/ui/admin/description-types/listing/description-template-type-listing.component.html b/frontend/src/app/ui/admin/description-types/listing/description-template-type-listing.component.html index 6d35ce31b..7f062a88c 100644 --- a/frontend/src/app/ui/admin/description-types/listing/description-template-type-listing.component.html +++ b/frontend/src/app/ui/admin/description-types/listing/description-template-type-listing.component.html @@ -90,10 +90,10 @@ more_horiz - - diff --git a/frontend/src/app/ui/admin/language/listing/language-listing.component.html b/frontend/src/app/ui/admin/language/listing/language-listing.component.html index a11a2f370..109e324a0 100644 --- a/frontend/src/app/ui/admin/language/listing/language-listing.component.html +++ b/frontend/src/app/ui/admin/language/listing/language-listing.component.html @@ -81,9 +81,9 @@ more_horiz - + - - - - + diff --git a/frontend/src/app/ui/admin/plan-status/listing/plan-status-listing/plan-status-listing.component.html b/frontend/src/app/ui/admin/plan-status/listing/plan-status-listing/plan-status-listing.component.html index 0e709a45f..004000c49 100644 --- a/frontend/src/app/ui/admin/plan-status/listing/plan-status-listing/plan-status-listing.component.html +++ b/frontend/src/app/ui/admin/plan-status/listing/plan-status-listing/plan-status-listing.component.html @@ -53,9 +53,9 @@ more_horiz - + - + - + - + - + - + + {{propertiesFormGroup?.get(field.id).get('externalIdentifier')?.get('identifier').getError('backendError').message}} {{'GENERAL.VALIDATION.REQUIRED' | translate}} diff --git a/frontend/src/app/ui/description/start-new-description-dialog/start-new-description-dialog.component.html b/frontend/src/app/ui/description/start-new-description-dialog/start-new-description-dialog.component.html index e5f22127f..b5ad57253 100644 --- a/frontend/src/app/ui/description/start-new-description-dialog/start-new-description-dialog.component.html +++ b/frontend/src/app/ui/description/start-new-description-dialog/start-new-description-dialog.component.html @@ -22,10 +22,10 @@
- +
- +
diff --git a/frontend/src/app/ui/description/start-new-description-dialog/start-new-description-dialog.component.scss b/frontend/src/app/ui/description/start-new-description-dialog/start-new-description-dialog.component.scss index 88f53aa19..db6cbd662 100644 --- a/frontend/src/app/ui/description/start-new-description-dialog/start-new-description-dialog.component.scss +++ b/frontend/src/app/ui/description/start-new-description-dialog/start-new-description-dialog.component.scss @@ -38,31 +38,6 @@ line-height: 1.9rem; } -.cancel-btn { - background: #ffffff 0% 0% no-repeat padding-box; - border: 1px solid #b5b5b5; - border-radius: 30px; -min-width: 101px; - height: 43px; - color: #212121; - font-weight: 500; -} - -.next-btn:hover { - background-color: var(--primary-color); - color: white; -} - -// .disabled-btn { -// border: 1px solid #b5b5b5; -// border-radius: 30px; -// opacity: 1; -// min-width: 101px; -// height: 43px; -// color: #b5b5b5; -// font-weight: 500; -// } - .actions { display: flex; flex-direction: row; diff --git a/frontend/src/app/ui/external-fetcher/external-fetcher-source.component.html b/frontend/src/app/ui/external-fetcher/external-fetcher-source.component.html index e5b1825db..df93127eb 100644 --- a/frontend/src/app/ui/external-fetcher/external-fetcher-source.component.html +++ b/frontend/src/app/ui/external-fetcher/external-fetcher-source.component.html @@ -223,19 +223,19 @@

{{'EXTERNAL-FETCHER-SOURCE-EDITOR.FIELDS.QUERIES' | translate}}

- +
-
+
-

{{'EXTERNAL-FETCHER-SOURCE-EDITOR.FIELDS.QUERY' | translate}} {{queryIndex + 1}}

+

{{'EXTERNAL-FETCHER-SOURCE-EDITOR.FIELDS.QUERY' | translate}} {{queryIndex + 1}}

-
@@ -260,12 +260,12 @@
-
+

{{'EXTERNAL-FETCHER-SOURCE-EDITOR.FIELDS.CASES' | translate}}

- +
@@ -327,7 +327,7 @@
-
@@ -354,7 +354,7 @@
-
@@ -393,7 +393,7 @@
- + {{'EXTERNAL-FETCHER-SOURCE-EDITOR.STATIC-ITEMS-REQUIRED' | translate}} {{formGroup.get('items').getError('backendError').message}} diff --git a/frontend/src/app/ui/external-fetcher/external-fetcher-source.component.scss b/frontend/src/app/ui/external-fetcher/external-fetcher-source.component.scss index 186cc7dc6..6648a2104 100644 --- a/frontend/src/app/ui/external-fetcher/external-fetcher-source.component.scss +++ b/frontend/src/app/ui/external-fetcher/external-fetcher-source.component.scss @@ -1,18 +1,18 @@ -.action-btn { - border-radius: 30px; - background-color: var(--secondary-color); - border: 1px solid transparent; - padding-left: 2em; - padding-right: 2em; - box-shadow: 0px 3px 6px #1E202029; +// .action-btn { +// border-radius: 30px; +// background-color: var(--secondary-color); +// border: 1px solid transparent; +// padding-left: 2em; +// padding-right: 2em; +// box-shadow: 0px 3px 6px #1E202029; - transition-property: background-color, color; - transition-duration: 200ms; - transition-delay: 50ms; - transition-timing-function: ease-in-out; - &:disabled{ - background-color: #CBCBCB; - color: #FFF; - border: 0px; - } -} \ No newline at end of file +// transition-property: background-color, color; +// transition-duration: 200ms; +// transition-delay: 50ms; +// transition-timing-function: ease-in-out; +// &:disabled{ +// background-color: #CBCBCB; +// color: #FFF; +// border: 0px; +// } +// } \ No newline at end of file diff --git a/frontend/src/app/ui/faq/dialog/faq-dialog.component.html b/frontend/src/app/ui/faq/dialog/faq-dialog.component.html index c3e0eaee5..05893af52 100644 --- a/frontend/src/app/ui/faq/dialog/faq-dialog.component.html +++ b/frontend/src/app/ui/faq/dialog/faq-dialog.component.html @@ -11,6 +11,6 @@
-
+
diff --git a/frontend/src/app/ui/faq/dialog/faq-dialog.component.scss b/frontend/src/app/ui/faq/dialog/faq-dialog.component.scss index e52488eeb..a176c4f54 100644 --- a/frontend/src/app/ui/faq/dialog/faq-dialog.component.scss +++ b/frontend/src/app/ui/faq/dialog/faq-dialog.component.scss @@ -29,13 +29,3 @@ .faq { margin: 1.125rem 0; } - -.cancel-btn { - background: #ffffff 0% 0% no-repeat padding-box; - border: 1px solid #b5b5b5; - border-radius: 30px; -min-width: 101px; - height: 43px; - color: #212121; - font-weight: 500; -} diff --git a/frontend/src/app/ui/plan/clone-dialog/plan-clone-dialog.component.html b/frontend/src/app/ui/plan/clone-dialog/plan-clone-dialog.component.html index 0227cd929..c85bdc80c 100644 --- a/frontend/src/app/ui/plan/clone-dialog/plan-clone-dialog.component.html +++ b/frontend/src/app/ui/plan/clone-dialog/plan-clone-dialog.component.html @@ -54,7 +54,7 @@
-
-
+
+
\ No newline at end of file diff --git a/frontend/src/app/ui/plan/clone-dialog/plan-clone-dialog.component.scss b/frontend/src/app/ui/plan/clone-dialog/plan-clone-dialog.component.scss index 235ab2f6f..3d5d641b7 100644 --- a/frontend/src/app/ui/plan/clone-dialog/plan-clone-dialog.component.scss +++ b/frontend/src/app/ui/plan/clone-dialog/plan-clone-dialog.component.scss @@ -20,31 +20,7 @@ opacity: 0.81; margin-bottom: 0.625rem; } - - .cancel-btn { - min-width: 101px; - height: 43px; - background: #ffffff; - border: 1px solid #b5b5b5; - border-radius: 30px; - opacity: 1; - } - - .confirm-btn { - min-width: 84px; - height: 43px; - background: #ffffff; - color: var(--primary-color); - border: 1px solid var(--primary-color); - border-radius: 30px; - opacity: 1; - } - - .confirm-btn:hover { - background-color: var(--primary-color); - color: #ffffff; - } - + ::ng-deep label { margin: 0; } diff --git a/frontend/src/app/ui/plan/invitation/dialog/plan-invitation-dialog.component.html b/frontend/src/app/ui/plan/invitation/dialog/plan-invitation-dialog.component.html index 60d4ff67c..c95aeafdd 100644 --- a/frontend/src/app/ui/plan/invitation/dialog/plan-invitation-dialog.component.html +++ b/frontend/src/app/ui/plan/invitation/dialog/plan-invitation-dialog.component.html @@ -12,8 +12,9 @@
- + {{formGroup.get('users').getError('backendError').message}} {{'GENERAL.VALIDATION.REQUIRED' | translate}}
- \ No newline at end of file + + \ No newline at end of file diff --git a/frontend/src/app/ui/plan/invitation/dialog/plan-invitation-dialog.component.scss b/frontend/src/app/ui/plan/invitation/dialog/plan-invitation-dialog.component.scss index 7437e5b05..17143f8ea 100644 --- a/frontend/src/app/ui/plan/invitation/dialog/plan-invitation-dialog.component.scss +++ b/frontend/src/app/ui/plan/invitation/dialog/plan-invitation-dialog.component.scss @@ -69,35 +69,6 @@ padding-bottom: 0 !important; } - .invite-btn { - background: #ffffff 0% 0% no-repeat padding-box; - border: 1px solid var(--primary-color); - border-radius: 30px; - opacity: 1; - min-width: 101px; - height: 43px; - color: var(--primary-color); - font-weight: 500; - } - - .invite-btn-disabled { - min-width: 6.64em; - height: 2.93em; - background: #ffffff; - border: 1px solid #b5b5b5; - border-radius: 30px; - font-weight: bold; - letter-spacing: -0.35px; - color: #b5b5b5; - margin-bottom: 0.25em; - cursor: default; - } - - .invite-btn:hover { - background: var(--primary-color); - color: #ffffff; - } - @keyframes blink { 0% { border: 1px solid rgba(255, 0, 0, 0.2); diff --git a/frontend/src/app/ui/plan/listing/listing-item/plan-listing-item.component.html b/frontend/src/app/ui/plan/listing/listing-item/plan-listing-item.component.html index 3c397350c..6f35d93da 100644 --- a/frontend/src/app/ui/plan/listing/listing-item/plan-listing-item.component.html +++ b/frontend/src/app/ui/plan/listing/listing-item/plan-listing-item.component.html @@ -60,9 +60,9 @@ - + diff --git a/frontend/src/app/ui/plan/listing/listing-item/plan-listing-item.component.ts b/frontend/src/app/ui/plan/listing/listing-item/plan-listing-item.component.ts index 508eb87a2..7831cc55b 100644 --- a/frontend/src/app/ui/plan/listing/listing-item/plan-listing-item.component.ts +++ b/frontend/src/app/ui/plan/listing/listing-item/plan-listing-item.component.ts @@ -121,6 +121,16 @@ export class PlanListingItemComponent extends BaseComponent implements OnInit { } } + viewVersionsUrl(plan: Plan): string { + if (plan.accessType == PlanAccessType.Public && plan.status == PlanStatusEnum.Finalized && !this.plan.authorizationFlags?.some(x => x === AppPermission.EditPlan)) { + let url = this.router.createUrlTree(['/explore-plans/versions/', plan.groupId]); + return url.toString(); + } else { + let url = this.router.createUrlTree(['/plans/versions/', plan.groupId]); + return url.toString(); + } + } + isUserPlanRelated() { const principalId: Guid = this.authentication.userId(); return this.plan.planUsers?.some(x => (x.user.id === principalId)); diff --git a/frontend/src/app/ui/plan/new-version-dialog/plan-new-version-dialog.component.html b/frontend/src/app/ui/plan/new-version-dialog/plan-new-version-dialog.component.html index c251658c1..fdbe308b7 100644 --- a/frontend/src/app/ui/plan/new-version-dialog/plan-new-version-dialog.component.html +++ b/frontend/src/app/ui/plan/new-version-dialog/plan-new-version-dialog.component.html @@ -87,7 +87,7 @@
-
-
+
+
\ No newline at end of file diff --git a/frontend/src/app/ui/plan/new-version-dialog/plan-new-version-dialog.component.scss b/frontend/src/app/ui/plan/new-version-dialog/plan-new-version-dialog.component.scss index e982fba88..f5e76a72e 100644 --- a/frontend/src/app/ui/plan/new-version-dialog/plan-new-version-dialog.component.scss +++ b/frontend/src/app/ui/plan/new-version-dialog/plan-new-version-dialog.component.scss @@ -21,30 +21,6 @@ margin-bottom: 0.625rem; } - .cancel-btn { - min-width: 101px; - height: 43px; - background: #ffffff; - border: 1px solid #b5b5b5; - border-radius: 30px; - opacity: 1; - } - - .confirm-btn { - min-width: 84px; - height: 43px; - background: #ffffff; - color: var(--primary-color); - border: 1px solid var(--primary-color); - border-radius: 30px; - opacity: 1; - } - - .confirm-btn:hover { - background-color: var(--primary-color); - color: #ffffff; - } - ::ng-deep label { margin: 0; } diff --git a/frontend/src/app/ui/plan/new/upload-dialogue/plan-upload-dialog.component.html b/frontend/src/app/ui/plan/new/upload-dialogue/plan-upload-dialog.component.html index ed11a7c07..351e06117 100644 --- a/frontend/src/app/ui/plan/new/upload-dialogue/plan-upload-dialog.component.html +++ b/frontend/src/app/ui/plan/new/upload-dialogue/plan-upload-dialog.component.html @@ -3,7 +3,7 @@

{{'PLAN-UPLOAD.TITLE' | translate}}

-
+
@@ -84,7 +84,7 @@
- +
diff --git a/frontend/src/app/ui/plan/new/upload-dialogue/plan-upload-dialog.component.scss b/frontend/src/app/ui/plan/new/upload-dialogue/plan-upload-dialog.component.scss index c3eb7e5d3..bf4072e83 100644 --- a/frontend/src/app/ui/plan/new/upload-dialogue/plan-upload-dialog.component.scss +++ b/frontend/src/app/ui/plan/new/upload-dialogue/plan-upload-dialog.component.scss @@ -22,26 +22,6 @@ } } -.close-btn { - margin-left: auto; - cursor: pointer; -} - -.cancel-btn { - background: #ffffff 0% 0% no-repeat padding-box; - border: 1px solid #b5b5b5; - border-radius: 30px; -min-width: 101px; - height: 43px; - color: #212121; - font-weight: 500; -} - -.next-btn:hover { - background-color: var(--primary-color); - color: #ffffff; -} - .attach-btn { top: -20px; } diff --git a/frontend/src/app/ui/plan/plan-contact-prefill-dialog/plan-contact-prefill-dialog.component.html b/frontend/src/app/ui/plan/plan-contact-prefill-dialog/plan-contact-prefill-dialog.component.html index 7cf86b325..d7b704839 100644 --- a/frontend/src/app/ui/plan/plan-contact-prefill-dialog/plan-contact-prefill-dialog.component.html +++ b/frontend/src/app/ui/plan/plan-contact-prefill-dialog/plan-contact-prefill-dialog.component.html @@ -13,11 +13,11 @@
{{'PLAN-CONTACT-PREFILL-DIALOG.FIELDS.USER' | translate}} - +
-
-
+
+
\ No newline at end of file diff --git a/frontend/src/app/ui/plan/plan-contact-prefill-dialog/plan-contact-prefill-dialog.component.scss b/frontend/src/app/ui/plan/plan-contact-prefill-dialog/plan-contact-prefill-dialog.component.scss index 9b1fb76df..8b524a42c 100644 --- a/frontend/src/app/ui/plan/plan-contact-prefill-dialog/plan-contact-prefill-dialog.component.scss +++ b/frontend/src/app/ui/plan/plan-contact-prefill-dialog/plan-contact-prefill-dialog.component.scss @@ -7,38 +7,13 @@ padding-bottom: 20px; } - .close-btn { - margin-left: auto; - cursor: pointer; - } - .cancel { background-color: #aaaaaa; color: #ffffff; } - .cancel-btn { - min-width: 101px; - height: 43px; - background: #ffffff; - border: 1px solid #b5b5b5; - border-radius: 30px; - opacity: 1; - } - - .delete { background-color: #ba2c2c; color: #ffffff; } - - .delete-btn { - min-width: 101px; - height: 43px; - background: #ffffff; - color: #ba2c2c; - border: 1px solid #ba2c2c; - border-radius: 30px; - opacity: 1; - } } diff --git a/frontend/src/app/ui/plan/plan-contact-prefill-dialog/plan-contact-prefill-dialog.component.ts b/frontend/src/app/ui/plan/plan-contact-prefill-dialog/plan-contact-prefill-dialog.component.ts index b43358ed7..d164634bb 100644 --- a/frontend/src/app/ui/plan/plan-contact-prefill-dialog/plan-contact-prefill-dialog.component.ts +++ b/frontend/src/app/ui/plan/plan-contact-prefill-dialog/plan-contact-prefill-dialog.component.ts @@ -5,11 +5,7 @@ import { UserService } from '@app/core/services/user/user.service'; import { SingleAutoCompleteConfiguration } from '@app/library/auto-complete/single/single-auto-complete-configuration'; import { map } from 'rxjs'; import { PlanAssociatedUser } from '@app/core/model/user/user'; -import { UntypedFormGroup } from '@angular/forms'; -import { PlanContactPrefillDialogEditorModel } from './plan-contact-prefill-dialog.editor.model'; -import { FormService } from '@common/forms/form-service'; import { EnumUtils } from '@app/core/services/utilities/enum-utils.service'; -import { PlanBlueprintSystemFieldType } from '@app/core/common/enum/plan-blueprint-system-field-type'; @Component({ selector: 'app-plan-contact-prefill-dialog', @@ -18,34 +14,32 @@ import { PlanBlueprintSystemFieldType } from '@app/core/common/enum/plan-bluepri }) export class PlanContactPrefillDialogComponent extends BaseComponent { - formGroup: UntypedFormGroup; - contactFormGroup: UntypedFormGroup; label: string; + selectedUser: PlanAssociatedUser; - singleAutoCompletePlanAssociatedUserConfiguration: SingleAutoCompleteConfiguration = { - initialItems: (data?: any) => this.userService.queryPlanAssociated(this.userService.buildAutocompleteLookup()).pipe(map(x => x.items)), - filterFn: (searchQuery: string, data?: any) => this.userService.queryPlanAssociated(this.userService.buildAutocompleteLookup(searchQuery)).pipe(map(x => x.items)), - getSelectedItem: (selectedItem: any) => this.userService.queryPlanAssociated(this.userService.buildAutocompleteLookup(null, null, [selectedItem.id])).pipe(map(x => x.items[0])), - displayFn: (item: PlanAssociatedUser) => item.name, - subtitleFn: (item: PlanAssociatedUser) => item.email, - titleFn: (item: PlanAssociatedUser) => item.name, - valueAssign: (item: PlanAssociatedUser) => item, - uniqueAssign: (item: PlanAssociatedUser) => item.id + singleAutoCompletePlanAssociatedUserConfiguration: SingleAutoCompleteConfiguration; - }; constructor( + constructor( private userService: UserService, - private formService: FormService, public enumUtils: EnumUtils, public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data: any ) { super(); - this.contactFormGroup = data.contactFormGroup; this.label = data.label; } ngOnInit(): void { - this.formGroup = new PlanContactPrefillDialogEditorModel().buildForm(); + this.singleAutoCompletePlanAssociatedUserConfiguration = { + initialItems: (data?: any) => this.userService.queryPlanAssociated(this.userService.buildAutocompleteLookup()).pipe(map(x => x.items)), + filterFn: (searchQuery: string, data?: any) => this.userService.queryPlanAssociated(this.userService.buildAutocompleteLookup(searchQuery)).pipe(map(x => x.items)), + getSelectedItem: (selectedItem: any) => this.userService.queryPlanAssociated(this.userService.buildAutocompleteLookup(null, null, [selectedItem.id])).pipe(map(x => x.items[0])), + displayFn: (item: PlanAssociatedUser) => item.name, + subtitleFn: (item: PlanAssociatedUser) => item.email, + titleFn: (item: PlanAssociatedUser) => item.name, + valueAssign: (item: PlanAssociatedUser) => item, + uniqueAssign: (item: PlanAssociatedUser) => item.id + }; } cancel() { @@ -53,14 +47,6 @@ export class PlanContactPrefillDialogComponent extends BaseComponent { } confirm() { - this.formService.touchAllFormFields(this.formGroup); - if (!this.formGroup.valid) { return; } - - this.contactFormGroup.get('firstName').patchValue(this.formGroup.get('name').value); - this.contactFormGroup.get('lastName').patchValue(null); - this.contactFormGroup.get('email').patchValue(this.formGroup.get('email').value); - - this.dialogRef.close(true); + this.dialogRef.close(this.selectedUser); } - } diff --git a/frontend/src/app/ui/plan/plan-contact-prefill-dialog/plan-contact-prefill-dialog.editor.model.ts b/frontend/src/app/ui/plan/plan-contact-prefill-dialog/plan-contact-prefill-dialog.editor.model.ts deleted file mode 100644 index 01f2d0906..000000000 --- a/frontend/src/app/ui/plan/plan-contact-prefill-dialog/plan-contact-prefill-dialog.editor.model.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { UntypedFormBuilder, UntypedFormGroup, Validators } from "@angular/forms"; -import { PlanAssociatedUser } from "@app/core/model/user/user"; -import { BackendErrorValidator } from '@common/forms/validation/custom-validator'; -import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model'; -import { Validation, ValidationContext } from '@common/forms/validation/validation-context'; -import { Guid } from "@common/types/guid"; - -export class PlanContactPrefillDialogEditorModel implements PlanAssociatedUser { - id: Guid; - name: string; - email: string; - - public validationErrorModel: ValidationErrorModel = new ValidationErrorModel(); - protected formBuilder: UntypedFormBuilder = new UntypedFormBuilder(); - - constructor() { } - - buildForm(context: ValidationContext = null, disabled: boolean = false): UntypedFormGroup { - if (context == null) { context = this.createValidationContext(); } - - return this.formBuilder.group({ - id: [{ value: this.id, disabled: disabled }, context.getValidation('id').validators], - name: [{ value: this.name, disabled: disabled }, context.getValidation('name').validators], - email: [{ value: this.email, disabled: disabled }, context.getValidation('email').validators], - }); - } - - createValidationContext(): ValidationContext { - const baseContext: ValidationContext = new ValidationContext(); - const baseValidationArray: Validation[] = new Array(); - baseValidationArray.push({ key: 'id', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'id')] }); - baseValidationArray.push({ key: 'name', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'name')] }); - baseValidationArray.push({ key: 'email', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'email')] }); - - baseContext.validation = baseValidationArray; - return baseContext; - } -} diff --git a/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.component.html b/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.component.html index 9208e4a40..1cf2b38b0 100644 --- a/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.component.html +++ b/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.component.html @@ -249,12 +249,14 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}} -
+
- {{contactIndex + 1}} - drag_indicator + {{contactIndex + 1}} + + drag_indicator +
@@ -298,12 +300,10 @@ {{formGroup.get('properties').get('contacts').getError('backendError').message}} {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
-
- -
+
+
diff --git a/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.component.ts b/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.component.ts index 036114b81..6e5f31059 100644 --- a/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.component.ts +++ b/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.component.ts @@ -59,6 +59,7 @@ import { PlanEditorModel, PlanFieldIndicator } from './plan-editor.model'; import { PlanEditorService } from './plan-editor.service'; import { PlanEditorEntityResolver } from './resolvers/plan-editor-enitity.resolver'; import { FormAnnotationService } from '@app/ui/annotations/annotation-dialog-component/form-annotation.service'; +import { PlanAssociatedUser } from '@app/core/model/user/user'; @Component({ selector: 'app-plan-editor', @@ -656,12 +657,16 @@ export class PlanEditorComponent extends BaseEditor imple maxWidth: '700px', maxHeight: '80vh', data: { - contactFormGroup: (this.formGroup.get('properties').get('contacts') as FormArray).at(contactIndex), label: field.label } }); - dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe((result: Plan) => { + dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe((result: PlanAssociatedUser) => { if (result) { + const contactFormGroup = (this.formGroup.get('properties').get('contacts') as FormArray).at(contactIndex); + contactFormGroup.get('firstName').patchValue(result?.name); + contactFormGroup.get('lastName').patchValue(null); + contactFormGroup.get('email').patchValue(result?.email); + this.uiNotificationService.snackBarNotification(this.language.instant('PLAN-EDITOR.SNACK-BAR.SUCCESSFUL-PLAN-CONTACT'), SnackBarNotificationLevel.Success); } }); diff --git a/frontend/src/assets/i18n/baq.json b/frontend/src/assets/i18n/baq.json index 17d7dfbda..591f9472e 100644 --- a/frontend/src/assets/i18n/baq.json +++ b/frontend/src/assets/i18n/baq.json @@ -876,7 +876,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" @@ -915,7 +915,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" diff --git a/frontend/src/assets/i18n/de.json b/frontend/src/assets/i18n/de.json index 693969df2..a7ace923a 100644 --- a/frontend/src/assets/i18n/de.json +++ b/frontend/src/assets/i18n/de.json @@ -876,7 +876,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" @@ -915,7 +915,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" diff --git a/frontend/src/assets/i18n/en.json b/frontend/src/assets/i18n/en.json index 12cdce03f..3f0a8d94e 100644 --- a/frontend/src/assets/i18n/en.json +++ b/frontend/src/assets/i18n/en.json @@ -874,7 +874,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" @@ -922,7 +922,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" diff --git a/frontend/src/assets/i18n/es.json b/frontend/src/assets/i18n/es.json index fb60a9e74..c1bf4b281 100644 --- a/frontend/src/assets/i18n/es.json +++ b/frontend/src/assets/i18n/es.json @@ -876,7 +876,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" @@ -915,7 +915,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" diff --git a/frontend/src/assets/i18n/gr.json b/frontend/src/assets/i18n/gr.json index 445a5afd4..d38cd2fca 100644 --- a/frontend/src/assets/i18n/gr.json +++ b/frontend/src/assets/i18n/gr.json @@ -876,7 +876,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" @@ -915,7 +915,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" diff --git a/frontend/src/assets/i18n/hr.json b/frontend/src/assets/i18n/hr.json index 641d02eda..08a576c7e 100644 --- a/frontend/src/assets/i18n/hr.json +++ b/frontend/src/assets/i18n/hr.json @@ -876,7 +876,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" @@ -915,7 +915,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" diff --git a/frontend/src/assets/i18n/pl.json b/frontend/src/assets/i18n/pl.json index bcce68e83..7579b80a8 100644 --- a/frontend/src/assets/i18n/pl.json +++ b/frontend/src/assets/i18n/pl.json @@ -876,7 +876,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" @@ -915,7 +915,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" diff --git a/frontend/src/assets/i18n/pt.json b/frontend/src/assets/i18n/pt.json index dc173a1bf..1f5dee525 100644 --- a/frontend/src/assets/i18n/pt.json +++ b/frontend/src/assets/i18n/pt.json @@ -876,7 +876,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" @@ -915,7 +915,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" diff --git a/frontend/src/assets/i18n/sk.json b/frontend/src/assets/i18n/sk.json index de9636753..cd5b2b370 100644 --- a/frontend/src/assets/i18n/sk.json +++ b/frontend/src/assets/i18n/sk.json @@ -876,7 +876,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" @@ -915,7 +915,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" diff --git a/frontend/src/assets/i18n/sr.json b/frontend/src/assets/i18n/sr.json index f2aafcb28..0b644171b 100644 --- a/frontend/src/assets/i18n/sr.json +++ b/frontend/src/assets/i18n/sr.json @@ -876,7 +876,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" @@ -915,7 +915,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" diff --git a/frontend/src/assets/i18n/tr.json b/frontend/src/assets/i18n/tr.json index 7d885b25e..518591c7a 100644 --- a/frontend/src/assets/i18n/tr.json +++ b/frontend/src/assets/i18n/tr.json @@ -876,7 +876,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" @@ -915,7 +915,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", - "STATUS": "Status", + "INTERNAL-STATUS": "Internal Status", "UPDATED-AT": "Updated", "CREATED-AT": "Created", "IS-ACTIVE": "Is Active" diff --git a/frontend/src/common/modules/confirmation-dialog/confirmation-dialog.component.html b/frontend/src/common/modules/confirmation-dialog/confirmation-dialog.component.html index 2b70dd161..389692a2d 100644 --- a/frontend/src/common/modules/confirmation-dialog/confirmation-dialog.component.html +++ b/frontend/src/common/modules/confirmation-dialog/confirmation-dialog.component.html @@ -24,9 +24,9 @@
{{'GENERAL.CONFIRMATION-DIALOG.ACTIONS.REQUIRED' | translate}}
-
-
-
-
+
+
+
+
diff --git a/frontend/src/common/modules/confirmation-dialog/confirmation-dialog.component.scss b/frontend/src/common/modules/confirmation-dialog/confirmation-dialog.component.scss index d017433b4..a352f002c 100644 --- a/frontend/src/common/modules/confirmation-dialog/confirmation-dialog.component.scss +++ b/frontend/src/common/modules/confirmation-dialog/confirmation-dialog.component.scss @@ -17,15 +17,6 @@ color: #ffffff; } - .cancel-btn { - min-width: 101px; - height: 43px; - background: #ffffff; - border: 1px solid #b5b5b5; - border-radius: 30px; - opacity: 1; - } - .confirm { background-color: #2cba6c; color: #ffffff; @@ -45,33 +36,4 @@ font-size: smaller; color: #f44336; } - - .submit-btn { - min-width: 101px; - height: 43px; - background: #ffffff; - color: var(--primary-color); - border: 1px solid var(--primary-color); - border-radius: 30px; - opacity: 1; - } - - .submit-btn[disabled] { - border: 1px solid #b5b5b5 !important; - } - - .submit-btn:not([disabled]):hover { - background-color: var(--primary-color); - color: #ffffff; - } - - .delete-btn { - min-width: 101px; - height: 43px; - background: #ffffff; - color: #ba2c2c; - border: 1px solid #ba2c2c; - border-radius: 30px; - opacity: 1; - } } diff --git a/frontend/src/notification-service/ui/admin/notification-template/editor/notification-template-editor.component.html b/frontend/src/notification-service/ui/admin/notification-template/editor/notification-template-editor.component.html index 3bacbf05a..4338c030a 100644 --- a/frontend/src/notification-service/ui/admin/notification-template/editor/notification-template-editor.component.html +++ b/frontend/src/notification-service/ui/admin/notification-template/editor/notification-template-editor.component.html @@ -6,16 +6,16 @@
- +
-
- diff --git a/frontend/src/notification-service/ui/admin/notification-template/editor/notification-template-editor.component.scss b/frontend/src/notification-service/ui/admin/notification-template/editor/notification-template-editor.component.scss index 08ada2aa6..4e3acdefe 100644 --- a/frontend/src/notification-service/ui/admin/notification-template/editor/notification-template-editor.component.scss +++ b/frontend/src/notification-service/ui/admin/notification-template/editor/notification-template-editor.component.scss @@ -19,21 +19,3 @@ background-color: #b0b0b0; } - .action-btn { - border-radius: 30px; - background-color: var(--secondary-color); - border: 1px solid transparent; - padding-left: 2em; - padding-right: 2em; - box-shadow: 0px 3px 6px #1E202029; - - transition-property: background-color, color; - transition-duration: 200ms; - transition-delay: 50ms; - transition-timing-function: ease-in-out; - &:disabled{ - background-color: #CBCBCB; - color: #FFF; - border: 0px; - } - } diff --git a/frontend/src/notification-service/ui/admin/notification-template/listing/notification-template-listing.component.html b/frontend/src/notification-service/ui/admin/notification-template/listing/notification-template-listing.component.html index 30bba868e..0d6f17b8a 100644 --- a/frontend/src/notification-service/ui/admin/notification-template/listing/notification-template-listing.component.html +++ b/frontend/src/notification-service/ui/admin/notification-template/listing/notification-template-listing.component.html @@ -98,9 +98,9 @@ more_horiz - +