From 0ddeb6d5a14a0252f041482d9aee1eae582198af Mon Sep 17 00:00:00 2001 From: Slawomir Wieczorek Date: Fri, 22 Nov 2024 14:12:02 +0100 Subject: [PATCH] HELLODATA-1810 - small adjustments --- .../announcement-edit.component.html | 86 ++++++++++--------- .../faq-edit/faq-edit.component.html | 8 +- .../faq-edit/faq-edit.component.ts | 9 +- .../faq-management/faq-list.component.html | 6 +- .../home-documentation.component.html | 2 +- .../src/app/pages/home/faq/faq.component.html | 6 +- .../published-announcements.component.html | 4 +- ...published-announcements-popup.component.ts | 2 +- ...blished-announcements-wrapper.component.ts | 4 +- .../components/summary/summary.component.html | 3 +- .../components/summary/summary.component.scss | 9 +- 11 files changed, 73 insertions(+), 66 deletions(-) diff --git a/hello-data-portal/hello-data-portal-ui/src/app/pages/admin/announcements-management/announcement-edit/announcement-edit.component.html b/hello-data-portal/hello-data-portal-ui/src/app/pages/admin/announcements-management/announcement-edit/announcement-edit.component.html index 65c23584..0395d305 100644 --- a/hello-data-portal/hello-data-portal-ui/src/app/pages/admin/announcements-management/announcement-edit/announcement-edit.component.html +++ b/hello-data-portal/hello-data-portal-ui/src/app/pages/admin/announcements-management/announcement-edit/announcement-edit.component.html @@ -83,48 +83,50 @@
{{ '@Announcement' | transloco }}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/hello-data-portal/hello-data-portal-ui/src/app/pages/admin/faq-management/faq-edit/faq-edit.component.html b/hello-data-portal/hello-data-portal-ui/src/app/pages/admin/faq-management/faq-edit/faq-edit.component.html index 62bd7c41..5ad4a02e 100644 --- a/hello-data-portal/hello-data-portal-ui/src/app/pages/admin/faq-management/faq-edit/faq-edit.component.html +++ b/hello-data-portal/hello-data-portal-ui/src/app/pages/admin/faq-management/faq-edit/faq-edit.component.html @@ -82,15 +82,13 @@
{{ '@Faq' | transloco }}
id="title" type="text"> - {{ '@Value has minimum length' | transloco: {min: getTitle(language).errors?.['minlength']?.requiredLength} }} + {{ '@Value has minimum length' | transloco: {min: titleMinLenght} }} - + diff --git a/hello-data-portal/hello-data-portal-ui/src/app/pages/admin/faq-management/faq-edit/faq-edit.component.ts b/hello-data-portal/hello-data-portal-ui/src/app/pages/admin/faq-management/faq-edit/faq-edit.component.ts index bd86ac0f..0b3ba589 100644 --- a/hello-data-portal/hello-data-portal-ui/src/app/pages/admin/faq-management/faq-edit/faq-edit.component.ts +++ b/hello-data-portal/hello-data-portal-ui/src/app/pages/admin/faq-management/faq-edit/faq-edit.component.ts @@ -56,6 +56,8 @@ export class FaqEditComponent extends BaseComponent implements OnInit, OnDestroy supportedLanguages$: Observable; defaultLanguage$: Observable; formValueChangedSub!: Subscription; + titleMinLenght = 3; + messageMinLength = 3; constructor(private store: Store, private fb: FormBuilder, private translateService: TranslateService) { super(); @@ -117,7 +119,8 @@ export class FaqEditComponent extends BaseComponent implements OnInit, OnDestroy getTitle(language: string): FormControl { const languagesGroup = this.faqForm.get('languages') as FormGroup; const languageForm = languagesGroup.get(language) as FormGroup; - return languageForm.get('title') as FormControl; + const title = languageForm.get('title') as FormControl; + return title; } getHeaderNameWithStatus(language: string) { @@ -168,8 +171,8 @@ export class FaqEditComponent extends BaseComponent implements OnInit, OnDestroy faqCpy.messages[language] = {title: '', message: ''} } languageFaqFormGroups[language] = this.fb.group({ - title: [faqCpy?.messages?.[language]?.title || '', [Validators.required, Validators.minLength(3)]], - message: [faqCpy?.messages?.[language]?.message || '', [Validators.required, Validators.minLength(3)]], + title: [faqCpy?.messages?.[language]?.title || '', [Validators.required, Validators.minLength(this.titleMinLenght)]], + message: [faqCpy?.messages?.[language]?.message || '', [Validators.required, Validators.minLength(this.messageMinLength)]], }); }); diff --git a/hello-data-portal/hello-data-portal-ui/src/app/pages/admin/faq-management/faq-list.component.html b/hello-data-portal/hello-data-portal-ui/src/app/pages/admin/faq-management/faq-list.component.html index 61087488..7216156f 100644 --- a/hello-data-portal/hello-data-portal-ui/src/app/pages/admin/faq-management/faq-list.component.html +++ b/hello-data-portal/hello-data-portal-ui/src/app/pages/admin/faq-management/faq-list.component.html @@ -1,5 +1,5 @@

{{ '@Faq management' | transloco }}

-
+
diff --git a/hello-data-portal/hello-data-portal-ui/src/app/shared/components/published-announcement/published-announcements-wrapper/published-announcements-wrapper.component.ts b/hello-data-portal/hello-data-portal-ui/src/app/shared/components/published-announcement/published-announcements-wrapper/published-announcements-wrapper.component.ts index 26265d31..bfa5d35f 100644 --- a/hello-data-portal/hello-data-portal-ui/src/app/shared/components/published-announcement/published-announcements-wrapper/published-announcements-wrapper.component.ts +++ b/hello-data-portal/hello-data-portal-ui/src/app/shared/components/published-announcement/published-announcements-wrapper/published-announcements-wrapper.component.ts @@ -46,7 +46,9 @@ import {naviElements} from "../../../../app-navi-elements"; @Component({ providers: [DialogService], selector: 'app-published-announcements-wrapper', - template: '
', + template: ` +
+
`, }) export class PublishedAnnouncementsWrapperComponent implements AfterViewInit { diff --git a/hello-data-portal/hello-data-portal-ui/src/app/shared/components/summary/summary.component.html b/hello-data-portal/hello-data-portal-ui/src/app/shared/components/summary/summary.component.html index ff278e6d..e5aed0eb 100644 --- a/hello-data-portal/hello-data-portal-ui/src/app/shared/components/summary/summary.component.html +++ b/hello-data-portal/hello-data-portal-ui/src/app/shared/components/summary/summary.component.html @@ -60,7 +60,8 @@
+ [readonly]="true" + class="p-editor-readonly">
diff --git a/hello-data-portal/hello-data-portal-ui/src/app/shared/components/summary/summary.component.scss b/hello-data-portal/hello-data-portal-ui/src/app/shared/components/summary/summary.component.scss index 808c211e..a54587ad 100644 --- a/hello-data-portal/hello-data-portal-ui/src/app/shared/components/summary/summary.component.scss +++ b/hello-data-portal/hello-data-portal-ui/src/app/shared/components/summary/summary.component.scss @@ -28,14 +28,15 @@ border-bottom: none !important; } -::ng-deep .p-editor-container .p-editor-toolbar.ql-snow { - border: none !important; +::ng-deep .p-editor-readonly .p-editor-container .p-editor-toolbar.ql-snow { + border: none; } -::ng-deep .ql-toolbar.ql-snow + .ql-container.ql-snow { - border: none !important; +::ng-deep .p-editor-readonly .ql-toolbar.ql-snow + .ql-container.ql-snow { + border: none; } + ::ng-deep #editDocumentationBtn, ::ng-deep #editDocumentationBtnOvrl { height: 1.3rem; width: 1.3rem;