From 4e67729a149fbb1a9733f6a23b3dfa7da87bd261 Mon Sep 17 00:00:00 2001 From: cameron Date: Fri, 25 Oct 2024 18:05:15 +0000 Subject: [PATCH] BRS-361 Increase variance note character limit to 200 --- .../forms/backcountry-cabins/backcountry-cabins.component.ts | 2 +- .../forms/backcountry-camping/backcountry-camping.component.ts | 2 +- src/app/forms/boating/boating.component.ts | 2 +- src/app/forms/day-use/day-use.component.ts | 2 +- .../forms/frontcountry-cabins/frontcountry-cabins.component.ts | 2 +- .../frontcountry-camping/frontcountry-camping.component.ts | 2 +- src/app/forms/group-camping/group-camping.component.ts | 2 +- src/app/forms/root-form/root-form.component.ts | 1 + 8 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/app/forms/backcountry-cabins/backcountry-cabins.component.ts b/src/app/forms/backcountry-cabins/backcountry-cabins.component.ts index 950d86f..9af6647 100644 --- a/src/app/forms/backcountry-cabins/backcountry-cabins.component.ts +++ b/src/app/forms/backcountry-cabins/backcountry-cabins.component.ts @@ -35,7 +35,7 @@ export class BackcountryCabinsComponent extends RootFormComponent { peopleChild: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.min(0), this.varianceFieldInvalidator('peopleChild')] }), peopleFamily: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.min(0), this.varianceFieldInvalidator('peopleFamily')] }), revenueFamily: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.min(0), this.varianceFieldInvalidator('revenueFamily')] }), - notes: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.maxLength(100)] }), + notes: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.maxLength(this.maxVarianceNotesCharacters)] }), }); this.calculateTotals(); this.form?.valueChanges.subscribe(() => { diff --git a/src/app/forms/backcountry-camping/backcountry-camping.component.ts b/src/app/forms/backcountry-camping/backcountry-camping.component.ts index f2d2fd4..f5c12be 100644 --- a/src/app/forms/backcountry-camping/backcountry-camping.component.ts +++ b/src/app/forms/backcountry-camping/backcountry-camping.component.ts @@ -33,7 +33,7 @@ export class BackcountryCampingComponent extends RootFormComponent { this.form = new UntypedFormGroup({ people: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.min(0), this.varianceFieldInvalidator('people')] }), grossCampingRevenue: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.min(0), this.varianceFieldInvalidator('grossCampingRevenue')] }), - notes: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.maxLength(100)] }), + notes: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.maxLength(this.maxVarianceNotesCharacters)] }), }); this.calculateTotals(); this.form?.valueChanges.subscribe(() => { diff --git a/src/app/forms/boating/boating.component.ts b/src/app/forms/boating/boating.component.ts index 649dd3c..ea71e29 100644 --- a/src/app/forms/boating/boating.component.ts +++ b/src/app/forms/boating/boating.component.ts @@ -35,7 +35,7 @@ export class BoatingComponent extends RootFormComponent { boatAttendanceNightsOnBouys: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.min(0), this.varianceFieldInvalidator('boatAttendanceNightsOnBouys')] }), boatAttendanceNightsOnDock: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.min(0), this.varianceFieldInvalidator('boatAttendanceNightsOnDock')] }), boatRevenueGross: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.min(0), this.varianceFieldInvalidator('boatRevenueGross')] }), - notes: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.maxLength(100)] }), + notes: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.maxLength(this.maxVarianceNotesCharacters)] }), }); this.calculateTotals(); this.form?.valueChanges.subscribe(() => { diff --git a/src/app/forms/day-use/day-use.component.ts b/src/app/forms/day-use/day-use.component.ts index f6676f2..ec5cd7c 100644 --- a/src/app/forms/day-use/day-use.component.ts +++ b/src/app/forms/day-use/day-use.component.ts @@ -42,7 +42,7 @@ export class DayUseComponent extends RootFormComponent { otherDayUseRevenueHotSprings: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.min(0), this.varianceFieldInvalidator('otherDayUseRevenueHotSprings')] }), picnicRevenueGross: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.min(0), this.varianceFieldInvalidator('picnicRevenueGross')] }), picnicRevenueShelter: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.min(0), this.varianceFieldInvalidator('picnicRevenueShelter')] }), - notes: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.maxLength(100)] }), + notes: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.maxLength(this.maxVarianceNotesCharacters)] }), }); this.calculateTotals(); this.form?.valueChanges.subscribe(() => { diff --git a/src/app/forms/frontcountry-cabins/frontcountry-cabins.component.ts b/src/app/forms/frontcountry-cabins/frontcountry-cabins.component.ts index d381c88..bef6836 100644 --- a/src/app/forms/frontcountry-cabins/frontcountry-cabins.component.ts +++ b/src/app/forms/frontcountry-cabins/frontcountry-cabins.component.ts @@ -32,7 +32,7 @@ export class FrontcountryCabinsComponent extends RootFormComponent { this.form = new UntypedFormGroup({ totalAttendanceParties: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.min(0), this.varianceFieldInvalidator('totalAttendanceParties')] }), revenueGrossCamping: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.min(0), this.varianceFieldInvalidator('revenueGrossCamping')] }), - notes: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.maxLength(100)] }), + notes: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.maxLength(this.maxVarianceNotesCharacters)] }), }); this.calculateTotals(); this.form?.valueChanges.subscribe(() => { diff --git a/src/app/forms/frontcountry-camping/frontcountry-camping.component.ts b/src/app/forms/frontcountry-camping/frontcountry-camping.component.ts index e1b8592..117bf61 100644 --- a/src/app/forms/frontcountry-camping/frontcountry-camping.component.ts +++ b/src/app/forms/frontcountry-camping/frontcountry-camping.component.ts @@ -48,7 +48,7 @@ export class FrontcountryCampingComponent extends RootFormComponent { otherRevenueGrossSani: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.min(0), this.varianceFieldInvalidator('otherRevenueGrossSani')] }), otherRevenueShower: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.min(0), this.varianceFieldInvalidator('otherRevenueShower')] }), secondCarsRevenueGross: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.min(0), this.varianceFieldInvalidator('secondCarsRevenueGross')] }), - notes: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.maxLength(100)] }), + notes: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.maxLength(this.maxVarianceNotesCharacters)] }), }); this.calculateTotals(); this.form?.valueChanges.subscribe(() => { diff --git a/src/app/forms/group-camping/group-camping.component.ts b/src/app/forms/group-camping/group-camping.component.ts index f7d40bf..ffeb4aa 100644 --- a/src/app/forms/group-camping/group-camping.component.ts +++ b/src/app/forms/group-camping/group-camping.component.ts @@ -42,7 +42,7 @@ export class GroupCampingComponent extends RootFormComponent { youthRateGroupsAttendancePeople: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.min(0), this.varianceFieldInvalidator('youthRateGroupsAttendancePeople')] }), standardRateGroupsRevenueGross: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.min(0), this.varianceFieldInvalidator('standardRateGroupsRevenueGross')] }), youthRateGroupsRevenueGross: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.min(0), this.varianceFieldInvalidator('youthRateGroupsRevenueGross')] }), - notes: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.maxLength(100)] }), + notes: new UntypedFormControl(null, { nonNullable: true, validators: [Validators.maxLength(this.maxVarianceNotesCharacters)] }), }); this.calculateTotals(); this.form?.valueChanges.subscribe(() => { diff --git a/src/app/forms/root-form/root-form.component.ts b/src/app/forms/root-form/root-form.component.ts index 8f397d1..e155b58 100644 --- a/src/app/forms/root-form/root-form.component.ts +++ b/src/app/forms/root-form/root-form.component.ts @@ -24,6 +24,7 @@ export class RootFormComponent implements OnInit, OnDestroy { public showVarianceModal: boolean = false; public activityType; public accordionType; + public maxVarianceNotesCharacters = 200; public invalidConfig = { showMessage: false };