From b943474138442cec88f371e8477126f8dacc7e07 Mon Sep 17 00:00:00 2001 From: Daniel Appelgren Date: Tue, 28 Dec 2021 14:30:25 +0100 Subject: [PATCH] =?UTF-8?q?feature(Nya=20deltagare):=20Anv=C3=A4nd=20nya?= =?UTF-8?q?=20dialogen=20(TV-845)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge in TEA/mina-sidor-fa-web from feature(Nya-deltagare)-Använd-nya-dialogen-(TV-845) to develop Squashed commit of the following: commit cdc3acefcdd6e209e8009fb767ae375a0db2935a Merge: f9354d04 1de76242 Author: Daniel Appelgren Date: Tue Dec 28 14:26:35 2021 +0100 Merge branch 'develop' into feature(Nya-deltagare)-Använd-nya-dialogen-(TV-845) commit f9354d04f51425cce29f13a10b32555113edaaa2 Author: Daniel Appelgren Date: Tue Dec 28 09:16:54 2021 +0100 feature(Nya deltagare): Använd nya dialogen (TV-845) --- .../src/app/pages/avrop/avrop.component.html | 14 +++----------- .../src/app/pages/avrop/avrop.component.ts | 15 ++++++--------- libs/ui/src/dialog/ui-dialog.model.ts | 4 ++++ libs/ui/src/dialog/ui-dialog.service.ts | 8 +++++--- 4 files changed, 18 insertions(+), 23 deletions(-) diff --git a/apps/mina-sidor-fa/src/app/pages/avrop/avrop.component.html b/apps/mina-sidor-fa/src/app/pages/avrop/avrop.component.html index 1dd1b05..5f1f731 100644 --- a/apps/mina-sidor-fa/src/app/pages/avrop/avrop.component.html +++ b/apps/mina-sidor-fa/src/app/pages/avrop/avrop.component.html @@ -85,16 +85,8 @@ Läs mer information här - + +

Information

Genomförandereferens

Genomförandereferens är det referensnummer du ska använda dig av i kontakten med Arbetsförmedlingen. @@ -117,7 +109,7 @@ språkstöd som ingår i upphandlingen av olika tjänster och utbildningar. Du hittar mer information om språkstöd och tolk i förfrågningsunderlaget för specifik upphandling.

-
+ ; readonly totalAmountOfSteps = 3; currentStep$: Observable = this.avropService.currentStep$; error$: Observable = this.avropService.error$; @@ -23,9 +25,8 @@ export class AvropComponent implements OnDestroy { avropIsSubmitted$: Observable = this.avropService.avropIsSubmitted$; avropLoading$: Observable = this.avropService.avropLoading$; showUnauthorizedError$: Observable = this.avropService.showUnauthorizedError$; - displayAvropDialog$ = new BehaviorSubject(false); - constructor(private avropService: AvropService) {} + constructor(private avropService: AvropService, private uiDialog: UiDialog) {} ngOnDestroy(): void { this.returnToStep1(); @@ -76,10 +77,6 @@ export class AvropComponent implements OnDestroy { } openAvropDialog(): void { - this.displayAvropDialog$.next(true); - } - - closeAvropDialog(): void { - this.displayAvropDialog$.next(false); + this.uiDialog.open(this.informationDialog); } } diff --git a/libs/ui/src/dialog/ui-dialog.model.ts b/libs/ui/src/dialog/ui-dialog.model.ts index 8a12311..6b664d1 100644 --- a/libs/ui/src/dialog/ui-dialog.model.ts +++ b/libs/ui/src/dialog/ui-dialog.model.ts @@ -4,6 +4,10 @@ export const UI_DIALOG_DATA = 'UI_DIALOG_DATA'; export interface UiDialogConfig { data?: DialogInputData; + minWidth?: string; + maxWidth?: string; + minHeight?: string; + maxHeight?: string; /** * primaryButtonText defaults to 'Stäng' diff --git a/libs/ui/src/dialog/ui-dialog.service.ts b/libs/ui/src/dialog/ui-dialog.service.ts index 402d297..56e38e5 100644 --- a/libs/ui/src/dialog/ui-dialog.service.ts +++ b/libs/ui/src/dialog/ui-dialog.service.ts @@ -5,7 +5,7 @@ import { UiDialogRef } from '@ui/dialog/ui-dialog-ref'; import { UiDialogComponent } from './ui-dialog.component'; import { UI_DIALOG_DATA, UiDialogConfig } from '@ui/dialog/ui-dialog.model'; -@Injectable() +@Injectable({ providedIn: 'root' }) export class UiDialog { constructor(private overlay: Overlay, private injector: Injector) {} @@ -26,8 +26,10 @@ export class UiDialog { const positionStrategy = this.overlay.position().global().centerHorizontally().centerVertically(); const configs = new OverlayConfig({ positionStrategy, - minWidth: '40rem', - minHeight: '40rem', + minWidth: config.minWidth ?? '40rem', + minHeight: config.minHeight ?? '40rem', + maxWidth: config.maxWidth ?? '60rem', + maxHeight: config.maxHeight ?? '60rem', hasBackdrop: true, scrollStrategy: this.overlay.scrollStrategies.close(), backdropClass: 'cdk-overlay-dark-backdrop',