From a6457b952a147c39258fdb3047eaf9bc8c7ffc9e Mon Sep 17 00:00:00 2001 From: Bastien Dumont <bdumont@grandlyon.com> Date: Mon, 19 Feb 2024 15:54:24 +0100 Subject: [PATCH] chore: remove logical or on textarea --- src/app/contact/contact.component.html | 2 +- .../structure-covid-info/structure-covid-info.component.html | 2 +- .../structure-description/structure-description.component.html | 2 +- .../structure-hours/structure-hours.component.html | 2 +- .../structure-public-target-other.component.html | 2 +- src/app/shared/components/textarea/textarea.component.html | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/contact/contact.component.html b/src/app/contact/contact.component.html index d54ac4bfb..3f0f49a0d 100644 --- a/src/app/contact/contact.component.html +++ b/src/app/contact/contact.component.html @@ -43,7 +43,7 @@ id="message" label="Message" placeholder="Exemple : J'aimerais avoir de l'aide sur Rés'in." - [value]="contactForm.get('message').value || ''" + [value]="contactForm.get('message').value" (valueChange)="contactForm.get('message').setValue($event)" /> diff --git a/src/app/form/form-view/structure-form/structure-covid-info/structure-covid-info.component.html b/src/app/form/form-view/structure-form/structure-covid-info/structure-covid-info.component.html index 090c68394..94d9e035d 100644 --- a/src/app/form/form-view/structure-form/structure-covid-info/structure-covid-info.component.html +++ b/src/app/form/form-view/structure-form/structure-covid-info/structure-covid-info.component.html @@ -8,7 +8,7 @@ id="covid" label="" placeholder="Exemple : nous ne sommes joignables que par visio" - [value]="getStructureControl('lockdownActivity').value || ''" + [value]="getStructureControl('lockdownActivity').value" (valueChange)="getStructureControl('lockdownActivity').setValue($event)" /> </form> diff --git a/src/app/form/form-view/structure-form/structure-description/structure-description.component.html b/src/app/form/form-view/structure-form/structure-description/structure-description.component.html index ec2dfc72a..49f0669aa 100644 --- a/src/app/form/form-view/structure-form/structure-description/structure-description.component.html +++ b/src/app/form/form-view/structure-form/structure-description/structure-description.component.html @@ -7,7 +7,7 @@ <app-textarea id="description" label="Description" - [value]="getStructureControl('description').value || ''" + [value]="getStructureControl('description').value" (valueChange)="getStructureControl('description').setValue($event)" /> </form> diff --git a/src/app/form/form-view/structure-form/structure-hours/structure-hours.component.html b/src/app/form/form-view/structure-form/structure-hours/structure-hours.component.html index b4eeeebe4..2b896e8e7 100644 --- a/src/app/form/form-view/structure-form/structure-hours/structure-hours.component.html +++ b/src/app/form/form-view/structure-form/structure-hours/structure-hours.component.html @@ -18,7 +18,7 @@ <app-textarea id="hoursDetails" label="Informations supplémentaires" - [value]="structureForm.get('exceptionalClosures').value || ''" + [value]="structureForm.get('exceptionalClosures').value" (valueChange)="structureForm.get('exceptionalClosures').setValue($event)" /> </form> diff --git a/src/app/form/form-view/structure-form/structure-public-target-other/structure-public-target-other.component.html b/src/app/form/form-view/structure-form/structure-public-target-other/structure-public-target-other.component.html index a85a7354b..301aebe63 100644 --- a/src/app/form/form-view/structure-form/structure-public-target-other/structure-public-target-other.component.html +++ b/src/app/form/form-view/structure-form/structure-public-target-other/structure-public-target-other.component.html @@ -6,7 +6,7 @@ <app-textarea id="otherTextarea" label="Autres démarches" - [value]="structureForm.get('otherDescription').value || ''" + [value]="structureForm.get('otherDescription').value" (valueChange)="structureForm.get('otherDescription').setValue($event)" /> </form> diff --git a/src/app/shared/components/textarea/textarea.component.html b/src/app/shared/components/textarea/textarea.component.html index be76d2d7e..1a62b7fd2 100644 --- a/src/app/shared/components/textarea/textarea.component.html +++ b/src/app/shared/components/textarea/textarea.component.html @@ -13,7 +13,7 @@ (input)="onValueChange($event)" ></textarea> - <div class="count">{{ value?.length }} / {{ maxLength }}</div> + <div class="count">{{ value?.length ?? 0 }} / {{ maxLength }}</div> <div *ngIf="status && statusText" class="status" [ngClass]="status"> <img *ngIf="status === 'error'" src="assets/ico/error-rounded.svg" alt="" /> <img *ngIf="status === 'success'" src="assets/ico/success-rounded.svg" alt="" /> -- GitLab