From 30b0463e8e0c259d0f0cd5f28eb9760232e703e3 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 8 May 2024 12:12:29 +0200 Subject: [PATCH] fix(Admin UI): improvements & bug fixes for setup wizard (#2375) closes #2370 --- .../admin-entity-details.component.html | 16 +- .../admin-entity-details.component.ts | 5 +- ...figure-entity-field-validator.component.ts | 4 +- .../admin-entity-list.component.html | 14 +- .../admin-entity-list.component.ts | 5 +- ...min-entity-general-settings.component.html | 27 +- ...admin-entity-general-settings.component.ts | 12 +- .../admin-entity/admin-entity-styles.scss | 9 + .../admin-entity/admin-entity.component.html | 2 + .../admin-entity/admin-entity.component.ts | 4 +- .../setup-wizard-button.component.html | 2 +- .../setup-wizard-button.component.spec.ts | 32 +- .../setup-wizard-button.component.ts | 22 +- .../admin/setup-wizard/setup-wizard-config.ts | 10 +- .../setup-wizard/setup-wizard.component.html | 24 +- .../setup-wizard.component.spec.ts | 50 ++- .../setup-wizard/setup-wizard.component.ts | 70 +++- .../changelog/changelog.component.spec.ts | 2 + .../changelog/changelog.component.ts | 14 +- .../latest-changes/latest-changes.module.ts | 30 +- .../user-security.component.html | 7 +- .../beta-feature/beta-feature.component.html | 8 + .../beta-feature/beta-feature.component.scss | 11 + .../beta-feature.component.spec.ts | 23 ++ .../beta-feature/beta-feature.component.ts | 16 + src/assets/locale/messages.de.xlf | 375 ++++++++++------- src/assets/locale/messages.fr.xlf | 377 ++++++++++------- src/assets/locale/messages.it.xlf | 377 ++++++++++------- src/assets/locale/messages.xlf | 383 ++++++++++-------- 29 files changed, 1186 insertions(+), 745 deletions(-) create mode 100644 src/app/core/admin/admin-entity/admin-entity-styles.scss create mode 100644 src/app/features/coming-soon/beta-feature/beta-feature.component.html create mode 100644 src/app/features/coming-soon/beta-feature/beta-feature.component.scss create mode 100644 src/app/features/coming-soon/beta-feature/beta-feature.component.spec.ts create mode 100644 src/app/features/coming-soon/beta-feature/beta-feature.component.ts diff --git a/src/app/core/admin/admin-entity-details/admin-entity-details/admin-entity-details.component.html b/src/app/core/admin/admin-entity-details/admin-entity-details/admin-entity-details.component.html index b08eb11eda..37d69b85b4 100644 --- a/src/app/core/admin/admin-entity-details/admin-entity-details/admin-entity-details.component.html +++ b/src/app/core/admin/admin-entity-details/admin-entity-details/admin-entity-details.component.html @@ -1,12 +1,16 @@ +
+ You can edit how users will see the details of a single record of this type. + Drag and drop fields and sections in this preview of a profile view and group + them as appropriate. The editor below closely resembles how the form will look + for users later. +
+ We recommend to keep things simple: Only add fields that you really need for + your work. +
+ <Name of displayed {{ this.entityConstructor?.label }}> -

- You can edit how users will see the details of a single record of this type. - Drag and drop fields and sections in this preview of a profile view and group - them as appropriate. We recommend to keep things simple: Only add fields that - you really need for your work. -

diff --git a/src/app/core/admin/admin-entity-details/admin-entity-details/admin-entity-details.component.ts b/src/app/core/admin/admin-entity-details/admin-entity-details/admin-entity-details.component.ts index de20e36fcc..85f1a9828b 100644 --- a/src/app/core/admin/admin-entity-details/admin-entity-details/admin-entity-details.component.ts +++ b/src/app/core/admin/admin-entity-details/admin-entity-details/admin-entity-details.component.ts @@ -22,7 +22,10 @@ import { AdminTabTemplateDirective } from "../../building-blocks/admin-tabs/admi @Component({ selector: "app-admin-entity-details", templateUrl: "./admin-entity-details.component.html", - styleUrls: ["./admin-entity-details.component.scss"], + styleUrls: [ + "./admin-entity-details.component.scss", + "../../admin-entity/admin-entity-styles.scss", + ], standalone: true, imports: [ MatTabsModule, diff --git a/src/app/core/admin/admin-entity-details/admin-entity-field/configure-entity-field-validator/configure-entity-field-validator.component.ts b/src/app/core/admin/admin-entity-details/admin-entity-field/configure-entity-field-validator/configure-entity-field-validator.component.ts index f59b3089fd..e62cff5085 100644 --- a/src/app/core/admin/admin-entity-details/admin-entity-field/configure-entity-field-validator/configure-entity-field-validator.component.ts +++ b/src/app/core/admin/admin-entity-details/admin-entity-field/configure-entity-field-validator/configure-entity-field-validator.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, Input, Output } from "@angular/core"; +import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core"; import { MatInputModule } from "@angular/material/input"; import { FormBuilder, @@ -26,7 +26,7 @@ import { HelpButtonComponent } from "../../../../common-components/help-button/h templateUrl: "./configure-entity-field-validator.component.html", styleUrl: "./configure-entity-field-validator.component.scss", }) -export class ConfigureEntityFieldValidatorComponent { +export class ConfigureEntityFieldValidatorComponent implements OnInit { validatorForm: FormGroup; @Input() entitySchemaField: EntitySchemaField; @Output() entityValidatorChanges = new EventEmitter(); diff --git a/src/app/core/admin/admin-entity-list/admin-entity-list.component.html b/src/app/core/admin/admin-entity-list/admin-entity-list.component.html index 030ecdb47b..07403c26ea 100644 --- a/src/app/core/admin/admin-entity-list/admin-entity-list.component.html +++ b/src/app/core/admin/admin-entity-list/admin-entity-list.component.html @@ -1,3 +1,11 @@ +
+ You can edit how users will see the list of all records of this type. Drag and + drop filters and change table columns in this preview. The editor below + closely resembles how the list will look for users later. +
+ To create new fields, use the "Details View" section. +
+ {{ entityConstructor.labelPlural }} @@ -40,7 +48,7 @@
- Drag & drop filters and add filters using the + Add Filter: - button
@@ -85,14 +92,13 @@
- Drag & drop table column headers and add columns using the + Drag & drop table column headers. Add columns: - button
diff --git a/src/app/core/admin/admin-entity-list/admin-entity-list.component.ts b/src/app/core/admin/admin-entity-list/admin-entity-list.component.ts index 95c5908d9e..1056392ab7 100644 --- a/src/app/core/admin/admin-entity-list/admin-entity-list.component.ts +++ b/src/app/core/admin/admin-entity-list/admin-entity-list.component.ts @@ -61,7 +61,10 @@ import { ViewTitleComponent } from "../../common-components/view-title/view-titl CdkDropListGroup, ], templateUrl: "./admin-entity-list.component.html", - styleUrl: "./admin-entity-list.component.scss", + styleUrls: [ + "./admin-entity-list.component.scss", + "../admin-entity/admin-entity-styles.scss", + ], }) export class AdminEntityListComponent implements OnChanges, AfterViewInit { @ViewChild(CdkDropList) placeholder: CdkDropList; diff --git a/src/app/core/admin/admin-entity/admin-entity-general-settings/admin-entity-general-settings.component.html b/src/app/core/admin/admin-entity/admin-entity-general-settings/admin-entity-general-settings.component.html index fb4d428cd4..9335fe81b7 100644 --- a/src/app/core/admin/admin-entity/admin-entity-general-settings/admin-entity-general-settings.component.html +++ b/src/app/core/admin/admin-entity/admin-entity-general-settings/admin-entity-general-settings.component.html @@ -1,8 +1,9 @@ -

General Settings of "{{ entityConstructor.label }}" Records

-

+

The settings here apply to the entity type overall and take effect everywhere the entity is displayed, including lists, forms and other views. -

+
+ +

General Settings of "{{ entityConstructor.label }}" Records

@@ -17,6 +18,7 @@

General Settings of "{{ entityConstructor.label }}" Records

Label (Plural) +   General Settings of "{{ entityConstructor.label }}" Records Icon +   - + + + + Find available icon names at + fontawesome.com + @@ -51,6 +59,7 @@

General Settings of "{{ entityConstructor.label }}" Records

Generated Title of Record +   General Settings + +
diff --git a/src/app/core/admin/admin-entity/admin-entity.component.ts b/src/app/core/admin/admin-entity/admin-entity.component.ts index ccf01dc83c..096f1ef747 100644 --- a/src/app/core/admin/admin-entity/admin-entity.component.ts +++ b/src/app/core/admin/admin-entity/admin-entity.component.ts @@ -32,6 +32,7 @@ import { ActivatedRoute, RouterLink } from "@angular/router"; import { MatListItem, MatNavList } from "@angular/material/list"; import { AdminEntityDetailsComponent } from "../admin-entity-details/admin-entity-details/admin-entity-details.component"; import { AdminEntityGeneralSettingsComponent } from "./admin-entity-general-settings/admin-entity-general-settings.component"; +import { BetaFeatureComponent } from "../../../features/coming-soon/beta-feature/beta-feature.component"; @Component({ selector: "app-admin-entity", @@ -52,6 +53,7 @@ import { AdminEntityGeneralSettingsComponent } from "./admin-entity-general-sett MatListItem, AdminEntityDetailsComponent, AdminEntityGeneralSettingsComponent, + BetaFeatureComponent, ], templateUrl: "./admin-entity.component.html", styleUrl: "./admin-entity.component.scss", @@ -80,7 +82,7 @@ export class AdminEntityComponent implements OnInit { ngOnInit(): void { this.init(); this.routes.queryParams.subscribe((params) => { - this.mode = params.mode; + this.mode = params.mode ?? this.mode; }); } diff --git a/src/app/core/admin/setup-wizard/setup-wizard-button/setup-wizard-button.component.html b/src/app/core/admin/setup-wizard/setup-wizard-button/setup-wizard-button.component.html index 4e8d2af291..602d53522a 100644 --- a/src/app/core/admin/setup-wizard/setup-wizard-button/setup-wizard-button.component.html +++ b/src/app/core/admin/setup-wizard/setup-wizard-button/setup-wizard-button.component.html @@ -1,7 +1,7 @@ @if (showSetupWizard) { } @else {