From 31c4100cba6b8fe088b735847c0125cd49094797 Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Thu, 28 Jan 2021 11:15:06 +0100 Subject: [PATCH] fix(form) : fix radio default select --- src/app/models/structure.model.ts | 6 +++--- .../shared/components/radio-form/radio-form.component.html | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/models/structure.model.ts b/src/app/models/structure.model.ts index 53141cc4f..eaf076cfe 100644 --- a/src/app/models/structure.model.ts +++ b/src/app/models/structure.model.ts @@ -27,7 +27,7 @@ export class Structure { public contactSurname: string = null; public fonction: string = null; public lockdownActivity: string = null; - public pmrAccess: boolean = false; + public pmrAccess: boolean = null; public publicsAccompaniment: string[] = []; public proceduresAccompaniment: string[] = []; public accessModality: string[] = []; @@ -43,8 +43,8 @@ export class Structure { public hours: Week; public equipmentsDetails: string = null; public equipmentsAccessType: string[] = []; - public freeWorkShop: boolean = false; - public freeWifi: boolean = false; + public freeWorkShop: boolean = null; + public freeWifi: boolean = null; public isOpen: boolean = false; public openedOn: OpeningDay = new OpeningDay(); diff --git a/src/app/shared/components/radio-form/radio-form.component.html b/src/app/shared/components/radio-form/radio-form.component.html index c3781da41..42570b7d7 100644 --- a/src/app/shared/components/radio-form/radio-form.component.html +++ b/src/app/shared/components/radio-form/radio-form.component.html @@ -1,6 +1,6 @@ <button (click)="clicked(true)" - [ngClass]="{ selected: selectedOption }" + [ngClass]="{ selected: selectedOption && selectedOption != null }" fxLayout="row" fxLayoutAlign=" center" fxLayoutGap="17px" @@ -14,7 +14,7 @@ </button> <button (click)="clicked(false)" - [ngClass]="{ selected: !selectedOption }" + [ngClass]="{ selected: !selectedOption && selectedOption != null }" fxLayout="row" fxLayoutAlign=" center" fxLayoutGap="17px" -- GitLab