feature(digi-ng-migrering): Valideringsmeddelanden är nu flyttat från digi till vår kod (TV-861)
Merge in TEA/mina-sidor-fa-web from feature/TV-861-digi-ng-form-validation-message to develop Squashed commit of the following: commit 0f499871aca875dfcca640e8fbf871f52adc33d3 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Fri Nov 19 11:54:42 2021 +0100 fix minor bugs commit ba3d2784903127e1b9dacbd04ad523a846cfe3f4 Merge: 20a004ba981fb51dAuthor: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Fri Nov 19 11:51:17 2021 +0100 Merge branch 'develop' into feature/TV-861-digi-ng-form-validation-message # Conflicts: # apps/mina-sidor-fa/src/app/pages/administration/pages/employee-form/employee-form.module.ts # apps/mina-sidor-fa/src/app/pages/deltagare/pages/deltagare-details/pages/report-forms/gemensam-planering-form/gemensam-planering-form.module.ts # apps/mina-sidor-fa/src/app/pages/deltagare/pages/deltagare-details/pages/report-forms/signal-form/signal-form.component.ts # apps/mina-sidor-fa/src/app/pages/deltagare/pages/deltagare-details/pages/report-forms/signal-form/signal-form.module.ts commit 20a004ba2f75f92043713704305815d60c61e2ef Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Thu Nov 18 15:54:16 2021 +0100 Removed unused messagetypes from validation messages commit 7dd5317267560dfdc95390b32f61b3df1518eb40 Merge: 9ffdefaec6bbfb1bAuthor: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Thu Nov 18 15:48:34 2021 +0100 Fixed some issues with a11y commit 9ffdefaea78c90f9d4f0ee3f9b4bf5a157c34667 Author: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Wed Nov 17 16:47:47 2021 +0100 removed reference to digiNgFormSelect commit 6c54a0ea9b0f3101adf60c6d04c7ac92010206c9 Author: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Wed Nov 17 16:45:29 2021 +0100 Replaced digi-ng-form-sleect with ui-select (handledare-picker and organization-picker-form left. commit 58341f57612bd70204bbdf3f9805bb54f8fc2078 Author: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Wed Nov 17 15:56:42 2021 +0100 removed reference in employee-form for digiNgFormSelect commit 663743508264cb781c3cb60682f6e6937a8e4eeb Author: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Wed Nov 17 15:50:29 2021 +0100 Replaced digi-ng-form-select with ui-select for edit-employee-form commit fea6215809128f78229cbded5f92fc5de461317e Author: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Wed Nov 17 14:33:58 2021 +0100 - Replaced all references to digi-form-validation-message (digi-core) to our new ui-validation-message ( a few left to change in this feature). - Replaced references from digi-ng-form-select to our new ui-select in franvaro-report and signal-form commit 28c152efe90acf766dbd190b12fd262344e39010 Author: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Wed Nov 17 10:14:50 2021 +0100 Removed blank space commit 42fa243d15bba562cd019d542e9815350623db63 Merge: a7a4a4c18f05343eAuthor: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Wed Nov 17 10:10:44 2021 +0100 Merge branch 'develop' into feature/TV-861-digi-ng-form-validation-message commit a7a4a4c111bc7a7cd3704d7c2866fcbb31ef00e0 Author: WP\holno <nikola.holst-nikolic@arbetsformedlingen.se> Date: Wed Nov 17 10:10:32 2021 +0100 - Created ui-validation-message component for digi-form-validation-message to replace digi-ng´s form-validation. - Removed css style as it did not work earlier and looks the same without (good margin top as it is). FYI: the new validation-message from digi-core includes three types (success, error, warning), digi-ng´s included only two types (success, error).
This commit is contained in:
+10
-15
@@ -15,21 +15,16 @@
|
||||
<digi-button *ngIf="!skipSubmit" class="handledare-picker-form__submit" af-type="submit">
|
||||
{{submitText}}
|
||||
</digi-button>
|
||||
<div class="handledare-picker-form__validation-wrapper" aria-atomic="true" role="alert">
|
||||
<digi-form-validation-message
|
||||
class="handledare-picker__validation-message"
|
||||
*ngIf="(handledareFormControl.invalid && handledareFormControl.touched) || invalid"
|
||||
af-variation="error"
|
||||
>
|
||||
Handledare måste väljas för att kunna spara
|
||||
</digi-form-validation-message>
|
||||
<digi-form-validation-message
|
||||
*ngIf="(lastSavedHandledare$ | async) && submitted"
|
||||
class="handledare-picker__validation-message"
|
||||
af-variation="success"
|
||||
>
|
||||
Vald handledare har uppdaterats
|
||||
</digi-form-validation-message>
|
||||
<div class="handledare-picker-form__validation-wrapper">
|
||||
<ui-validation-message
|
||||
[uiShowValidationMessage]="(handledareFormControl.invalid && handledareFormControl.touched) || invalid"
|
||||
uiValidationMessage="Handledare måste väljas för att kunna spara"
|
||||
></ui-validation-message>
|
||||
<ui-validation-message
|
||||
[uiShowValidationMessage]="(lastSavedHandledare$ | async) && submitted"
|
||||
uiValidationMessageType="success"
|
||||
uiValidationMessage="Vald handledare har uppdaterats"
|
||||
></ui-validation-message>
|
||||
</div>
|
||||
<ui-loader *ngIf="submitHandledareLoading$ | async" uiSize="s" uiType="absolute"></ui-loader>
|
||||
</form>
|
||||
|
||||
+2
-1
@@ -4,11 +4,12 @@ import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { UiLoaderModule } from '@ui/loader/loader.module';
|
||||
import { HandledarePickerFormComponent } from './handledare-picker-form.component';
|
||||
import { UiValidationMessageModule } from '@ui/validation-message/validation-message.module';
|
||||
|
||||
@NgModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
declarations: [HandledarePickerFormComponent],
|
||||
imports: [CommonModule, ReactiveFormsModule, UiLoaderModule, DigiNgFormSelectModule],
|
||||
imports: [CommonModule, ReactiveFormsModule, UiLoaderModule, DigiNgFormSelectModule, UiValidationMessageModule],
|
||||
exports: [HandledarePickerFormComponent],
|
||||
})
|
||||
export class HandledarePickerFormModule {}
|
||||
|
||||
+4
-6
@@ -18,11 +18,9 @@
|
||||
|
||||
<digi-button class="organization-picker-form__submit" af-type="submit">{{submitText}}</digi-button>
|
||||
|
||||
<digi-form-validation-message
|
||||
<ui-validation-message
|
||||
class="organization-picker-form__error"
|
||||
af-variation="error"
|
||||
*ngIf="organizationFormControl.invalid && organizationFormControl.touched"
|
||||
>
|
||||
Du måste välja en organisation för att kunna logga in
|
||||
</digi-form-validation-message>
|
||||
[uiShowValidationMessage]="organizationFormControl.invalid && organizationFormControl.touched"
|
||||
uiValidationMessage="Du måste välja en organisation för att kunna logga in"
|
||||
></ui-validation-message>
|
||||
</form>
|
||||
|
||||
+2
-1
@@ -2,12 +2,13 @@ import { DigiNgFormSelectModule } from '@af/digi-ng/_form/form-select';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { UiValidationMessageModule } from '@ui/validation-message/validation-message.module';
|
||||
import { OrganizationPickerFormComponent } from './organization-picker-form.component';
|
||||
|
||||
@NgModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
declarations: [OrganizationPickerFormComponent],
|
||||
imports: [CommonModule, ReactiveFormsModule, DigiNgFormSelectModule],
|
||||
imports: [CommonModule, ReactiveFormsModule, DigiNgFormSelectModule, UiValidationMessageModule],
|
||||
exports: [OrganizationPickerFormComponent],
|
||||
})
|
||||
export class OrganizationPickerFormModule {}
|
||||
|
||||
+4
-1
@@ -38,7 +38,10 @@
|
||||
<div aria-atomic="true" role="alert">
|
||||
<ul class="tree-nodes-selector__validation-messages" *ngIf="showValidation && validationMessages">
|
||||
<li *ngFor="let validationMessage of validationMessages">
|
||||
<digi-form-validation-message af-variation="error"> {{validationMessage}} </digi-form-validation-message>
|
||||
<ui-validation-message
|
||||
[uiShowValidationMessage]="true"
|
||||
[uiValidationMessage]="validationMessage"
|
||||
></ui-validation-message>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user