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 68b8ddeb0008f0978b92d4ee63df88e3292007fe..2b19ccac67b55d5f011f537da97c7e6cb968eaac 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 @@ -11,7 +11,7 @@ (updateFormError)="setHoursError()" /> - <div class="title secondTitle"> + <div class="title"> <h3>Avez-vous des précisions à apporter sur les horaires ?</h3> <p>Facultatif</p> </div> diff --git a/src/app/form/form-view/structure-form/structure-hours/structure-hours.component.scss b/src/app/form/form-view/structure-form/structure-hours/structure-hours.component.scss deleted file mode 100644 index f28ea0cf87acd72c693f0c7413c173b4f28320e9..0000000000000000000000000000000000000000 --- a/src/app/form/form-view/structure-form/structure-hours/structure-hours.component.scss +++ /dev/null @@ -1,3 +0,0 @@ -.secondTitle { - margin-top: 28px; -} diff --git a/src/app/form/form-view/structure-form/structure-hours/structure-hours.component.ts b/src/app/form/form-view/structure-form/structure-hours/structure-hours.component.ts index 3be5fa8d9e0b9823ab15f1cf02278620da720559..98fd4d6aa99e7538ee2402daaa33718ba69b643d 100644 --- a/src/app/form/form-view/structure-form/structure-hours/structure-hours.component.ts +++ b/src/app/form/form-view/structure-form/structure-hours/structure-hours.component.ts @@ -4,7 +4,6 @@ import { UntypedFormGroup } from '@angular/forms'; @Component({ selector: 'app-structure-hours', templateUrl: './structure-hours.component.html', - styleUrls: ['./structure-hours.component.scss'], }) export class StructureHoursComponent implements OnInit { @Input() structureForm: UntypedFormGroup; diff --git a/src/app/models/day.model.ts b/src/app/models/day.model.ts deleted file mode 100644 index 988336f4ba2eb33251e48f7e382c4f36757722e3..0000000000000000000000000000000000000000 --- a/src/app/models/day.model.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Time } from './time.model'; - -export class Day { - open = false; - time: Time[]; - - constructor(obj?: any) { - Object.assign(this, obj, { - time: obj?.time ? obj.time.map((time) => new Time(time)) : [], - }); - } -} diff --git a/src/app/models/structure.model.ts b/src/app/models/structure.model.ts index cb2ee15264f7319321f486e774a0a23386188ad8..a862d9f77229643f46166724db2a694258f8c966 100644 --- a/src/app/models/structure.model.ts +++ b/src/app/models/structure.model.ts @@ -3,11 +3,10 @@ import { StructureCategoryIconEnum } from '../shared/enum/structureCategoryIcon. import { Equipment } from '../structure-list/enum/equipment.enum'; import { Weekday } from '../structure-list/enum/weekday.enum'; import { Address } from './address.model'; -import { Day } from './day.model'; import { OpeningDay } from './openingDay.model'; import { PersonalOffer } from './personalOffer.model'; import { StructureType } from './structureType.model'; -import { Week } from './week.model'; +import { Day, Week } from './week.model'; export class Structure { public _id: string = null; diff --git a/src/app/models/time.model.ts b/src/app/models/time.model.ts deleted file mode 100644 index 7db99ae8b9cd374e8e06e1cdb410a54810fd025c..0000000000000000000000000000000000000000 --- a/src/app/models/time.model.ts +++ /dev/null @@ -1,20 +0,0 @@ -export class Time { - opening: string; - closing: string; - - constructor(obj?: any) { - Object.assign(this, obj); - } - - public formatOpeningDate(): string { - return this.formatDate(this.opening); - } - - public formatClosingDate(): string { - return this.formatDate(this.closing); - } - - private formatDate(n: string): string { - return n.replace(':', 'h'); - } -} diff --git a/src/app/models/week.model.ts b/src/app/models/week.model.ts index 94e35a67c33f9382801bcb514c40c9e44b3e4e8f..320c4522c63d8ddbb46864c1e863ef04fb709754 100644 --- a/src/app/models/week.model.ts +++ b/src/app/models/week.model.ts @@ -1,7 +1,51 @@ -import { Day } from './day.model'; - type dayType = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday'; +export enum WeekDayEnum { + monday = 'lundi', + tuesday = 'mardi', + wednesday = 'mercredi', + thursday = 'jeudi', + friday = 'vendredi', + saturday = 'samedi', + sunday = 'dimanche', +} + +export class Time { + opening: string; + closing: string; + + constructor(obj?: { opening: string; closing: string }) { + Object.assign(this, obj); + } + + public formatOpeningDate(): string { + return this.formatDate(this.opening); + } + + public formatClosingDate(): string { + return this.formatDate(this.closing); + } + + private formatDate(n: string): string { + return n.replace(':', 'h'); + } +} + +export class Day { + open = false; + /** + * A day can have two opening times + * @example 10:00 - 12:00 & 16:00 - 18:00 + */ + time: Time[]; + + constructor(obj?: Day) { + Object.assign(this, obj, { + time: obj?.time ? obj.time.map((time) => new Time(time)) : [], + }); + } +} + export class Week { monday: Day; tuesday: Day; @@ -11,7 +55,7 @@ export class Week { saturday: Day; sunday: Day; - constructor(obj?: any) { + constructor(obj?: Week) { Object.assign(this, obj, { monday: obj?.monday ? new Day(obj.monday) : new Day(), tuesday: obj?.tuesday ? new Day(obj.tuesday) : new Day(), @@ -41,27 +85,6 @@ export class Week { yield { key: 'sunday', value: this.sunday }; } - public getDayTranslation(day: dayType): string { - switch (day) { - case 'monday': - return 'lundi'; - case 'tuesday': - return 'mardi'; - case 'thursday': - return 'jeudi'; - case 'wednesday': - return 'mercredi'; - case 'friday': - return 'vendredi'; - case 'saturday': - return 'samedi'; - case 'sunday': - return 'dimanche'; - default: - return null; - } - } - public hasData(): boolean { if ( this.monday.time.length === 0 && diff --git a/src/app/profile/edit/edit.component.html b/src/app/profile/edit/edit.component.html index 5cdc807977179fc107ceb277814fe96ac77ceec1..ae297e26c68cfbb29bdce5d35e2ddaffcc2bb5c3 100644 --- a/src/app/profile/edit/edit.component.html +++ b/src/app/profile/edit/edit.component.html @@ -76,21 +76,21 @@ [label]="'Prénom'" [size]="'large'" [status]="getStatus(nameValid())" - [(ngModelValue)]="userProfile.name" + [(value)]="userProfile.name" /> <app-input [id]="'surname'" [label]="'Nom'" [size]="'large'" [status]="getStatus(surnameValid())" - [(ngModelValue)]="userProfile.surname" + [(value)]="userProfile.surname" /> <app-input [id]="'phone'" [label]="'Téléphone'" [size]="'large'" [status]="getStatus(phoneValid())" - [(ngModelValue)]="userProfile.phone" + [(value)]="userProfile.phone" /> </div> diff --git a/src/app/shared/components/hour-picker/hour-picker.component.html b/src/app/shared/components/hour-picker/hour-picker.component.html index 23edf282a0849ea44ed96ab4b52b93564e1cd93b..2e4785db74a736758ed63a27d1101205e4ef3e61 100644 --- a/src/app/shared/components/hour-picker/hour-picker.component.html +++ b/src/app/shared/components/hour-picker/hour-picker.component.html @@ -1,16 +1,6 @@ <div class="days"> - <div - *ngFor="let day of structure.hours" - class="day" - tabindex="0" - [ngClass]="{ active: day.active }" - (click)="activateDay(day)" - (keyup.enter)="activateDay(day)" - > - <div - class="header-container sub-text" - [ngClass]="modifiedFields && modifiedFields.hours && modifiedFields.hours[day.name] ? 'modified' : ''" - > + <div *ngFor="let day of structure.hours" class="day"> + <div class="dayHeader"> <app-switch checkedText="Ouvert" uncheckedText="Fermé" @@ -20,47 +10,47 @@ /> </div> - <div *ngIf="day.open" class="row-container"> - <div *ngIf="day.active" class="active"> - <div *ngFor="let hour of day.hours; let i = index" class="hour"> - <div>de</div> + <div *ngIf="day.open" class="dayContent"> + <div *ngFor="let hour of day.hours; let index = index" class="hour"> + <app-input + [id]="day.name + 'From'" + [type]="'time'" + [label]="'De :'" + [size]="'large'" + [status]="getStatus(hour)" + [statusText]="getStatusText(hour)" + [(value)]="hour.start" + (finishedEditing)="submitForm()" + /> - <div class="input-container"> - <input type="time" [(ngModel)]="hour.start" (change)="submitForm()" /> - </div> + <app-input + [id]="day.name + 'To'" + [type]="'time'" + [label]="'Jusqu’à :'" + [size]="'large'" + [status]="getStatus(hour)" + [statusText]="getStatusText(hour)" + [(value)]="hour.end" + (finishedEditing)="submitForm()" + /> - <div>à </div> - - <div class="input-container"> - <input type="time" [(ngModel)]="hour.end" (change)="submitForm()" (blur)="onBlur()" (focus)="onFocus()" /> - </div> - - <div> - <div *ngIf="hour.error === 'wrong' || hour.error === 'incomplete'" class="error-message"> - <app-svg-icon [iconClass]="'icon-32'" [type]="'ico'" [icon]="'nok'" /> - </div> - <div *ngIf="hour.error === null" class="error-message"> - <app-svg-icon [iconClass]="'icon-32'" [type]="'ico'" [icon]="'ok'" /> - </div> - </div> - </div> - <div *ngIf="day.hours.length === 1" class="extraAction"> - <app-v3-button - [variant]="buttonTypeEnumV3.PrimaryBlack" - [label]="'Ajouter un horaire'" - [wide]="true" - (action)="addHours(day)" - /> - </div> - <div *ngIf="day.hours.length === 2" class="extraAction"> - <app-v3-button - [variant]="buttonTypeEnumV3.Secondary" - [label]="'Supprimer'" - [iconName]="'deleteV3'" - (action)="this.removeHours(day, 1)" - /> - </div> + <app-v3-button + *ngIf="day.hours.length === 2 && index === 1" + style="margin-top: 3px" + [variant]="buttonTypeEnumV3.Secondary" + [label]="'Supprimer'" + [iconName]="'deleteV3'" + (action)="removeHours(day, 1)" + /> </div> + + <app-v3-button + *ngIf="day.hours.length === 1" + [variant]="buttonTypeEnumV3.PrimaryBlack" + [label]="'Ajouter un horaire'" + [wide]="true" + (action)="addHours(day)" + /> </div> </div> </div> diff --git a/src/app/shared/components/hour-picker/hour-picker.component.scss b/src/app/shared/components/hour-picker/hour-picker.component.scss index c9fa4290392aa8637e8cc52d0428f660f5463ee8..a782a72abfba9b37df5231708a8a51b0d8610aef 100644 --- a/src/app/shared/components/hour-picker/hour-picker.component.scss +++ b/src/app/shared/components/hour-picker/hour-picker.component.scss @@ -14,102 +14,38 @@ gap: 12px; align-self: stretch; border-radius: 4px; - border: 1px solid var(--grey-6, #dedede); + border: 1px solid $grey-6; - .row-container { - display: flex; + .dayHeader { + padding-inline: 8px; + + ::ng-deep app-switch span { + text-transform: capitalize; + } + } + + .dayContent { + border-top: 1px solid $grey-6; + width: 100%; padding-top: 12px; + padding-inline: 16px; + box-sizing: border-box; + display: flex; flex-direction: column; - align-items: flex-start; gap: 16px; - align-self: stretch; - border-top: 1px solid var(--grey-6, #dedede); - } - .active { - display: flex; - flex-wrap: wrap; - max-width: 400px; - @media #{$large-phone} { - grid-template-columns: unset; - grid-template-rows: 1fr 1fr; - grid-row-gap: 20px; - } - } - .extraAction { - display: grid; - align-items: center; - } - .hour { - height: 40px; - display: grid; - // grid-template-columns: auto 70px auto 70px 30px 80px 1fr; - grid-template-columns: auto 52px auto 61px 30px 0px; - column-gap: 10px; - align-items: center; - justify-items: center; + .hour { + display: flex; + gap: 24px; + align-items: center; + + ::ng-deep input { + width: 150px; + @media #{$tablet} { + width: unset; + } + } + } } } } - -.grey-rounded-border { - border: 1px solid $grey-5; - box-sizing: border-box; - border-radius: 22px; - @include font-regular-14; - color: $grey-2; - display: flex; - justify-content: center; -} - -.grid-center { - display: grid; - align-items: center; -} - -input { - background: $grey-9; - border: 1px solid $grey-5; - box-sizing: border-box; - border-radius: 4px; - height: 36px; - margin-top: 0; - @include font-regular-14; - min-width: 56px; - text-align: center; - outline: none; -} - -p { - margin-top: 0px; -} - -img { - cursor: pointer; - height: 15px; - width: 15px; - &.add { - height: 20px; - width: 20px; - } -} - -.modified { - border-left: 3px solid red; - padding-left: 8px; - margin-left: -11px; - border-radius: 3px; -} - -.warning-message, -.error-message { - font-weight: bold; - font-size: 1em; - display: grid; - align-items: center; -} - -input[type='time']::-webkit-calendar-picker-indicator { - background: none; - display: none; -} diff --git a/src/app/shared/components/hour-picker/hour-picker.component.ts b/src/app/shared/components/hour-picker/hour-picker.component.ts index b44a921a3927c4bff829adba511e36bc88b8e6ff..72c41d9d11b3b800ad3c44d227a40e3a9e542251 100644 --- a/src/app/shared/components/hour-picker/hour-picker.component.ts +++ b/src/app/shared/components/hour-picker/hour-picker.component.ts @@ -1,32 +1,35 @@ import { Component, EventEmitter, Input, OnChanges, OnDestroy, Output } from '@angular/core'; import { AbstractControl, UntypedFormArray, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms'; -import { Day } from '../../../models/day.model'; -import { Time } from '../../../models/time.model'; -import { WeekDayEnum } from '../../enum/weekDay.enum'; +import { Day, Time, WeekDayEnum } from '../../../models/week.model'; import { CheckHours } from '../../validator/form'; import { ButtonTypeV3 } from '../v3/button/button-type.enum'; +interface DayHour { + name: WeekDayEnum; + hours: { + start: string; + end: string; + error: string; + }[]; + open: boolean; +} + @Component({ selector: 'app-hour-picker', templateUrl: './hour-picker.component.html', styleUrls: ['./hour-picker.component.scss'], }) export class HourPickerComponent implements OnChanges, OnDestroy { - @Input() modifiedFields: any; @Input() structureInput: UntypedFormGroup; @Output() updateFormError = new EventEmitter<any>(); @Output() updateForm = new EventEmitter<UntypedFormGroup>(); public buttonTypeEnumV3 = ButtonTypeV3; - public error = false; - private copiedDay: any; - private isInputSelected = false; - public copiedDayName = ''; public structure = { hours: this.initHoursDefault(), }; - public structureHoursDefault: any[] = this.initHoursDefault(); + public structureHoursDefault: DayHour[] = this.initHoursDefault(); ngOnChanges(): void { this.formatHoursForEdition(); @@ -40,61 +43,51 @@ export class HourPickerComponent implements OnChanges, OnDestroy { return this.structureInput.get(nameControl); } - private initHoursDefault(): any { + private initHoursDefault(): DayHour[] { return [ { - name: 'Lundi', + name: WeekDayEnum.monday, hours: [{ start: '', end: '', error: 'incomplete' }], open: false, - active: false, }, { - name: 'Mardi', + name: WeekDayEnum.tuesday, hours: [{ start: '', end: '', error: 'incomplete' }], open: false, - active: false, }, { - name: 'Mercredi', + name: WeekDayEnum.wednesday, hours: [{ start: '', end: '', error: 'incomplete' }], open: false, - active: false, }, { - name: 'Jeudi', + name: WeekDayEnum.thursday, hours: [{ start: '', end: '', error: 'incomplete' }], open: false, - active: false, }, { - name: 'Vendredi', + name: WeekDayEnum.friday, hours: [{ start: '', end: '', error: 'incomplete' }], open: false, - active: false, }, { - name: 'Samedi', + name: WeekDayEnum.saturday, hours: [{ start: '', end: '', error: 'incomplete' }], open: false, - active: false, }, { - name: 'Dimanche', + name: WeekDayEnum.sunday, hours: [{ start: '', end: '', error: 'incomplete' }], open: false, - active: false, }, ]; } - /** - * Convert data from form to component structure - */ + /** Convert data from to component structure */ private parseFormToHours(day: Day, key: string): void { this.structureHoursDefault.forEach((element) => { if (element.name.toLowerCase() === key) { element.open = day.open; - element.active = day.open; element.hours = day.time.map((hour: Time) => { if (hour.opening && hour.closing) { return { @@ -124,12 +117,7 @@ export class HourPickerComponent implements OnChanges, OnDestroy { this.structure.hours = this.structureHoursDefault; } - private parseToDay(data: { - name: string; - hours: { start: string; end: string }[]; - open: boolean; - active: boolean; - }): Day { + private parseToDay(data: DayHour): Day { return new Day({ open: data.open, time: data.hours.map( @@ -182,29 +170,24 @@ export class HourPickerComponent implements OnChanges, OnDestroy { for (const day of this.structure.hours) { delete day.open; - delete day.active; + for (const hour of day.hours) { delete hour.error; } } } - public activateDay(day: any): void { - day.active = true; - } - - public toggleOpenDay(day: any, checked: boolean): void { + public toggleOpenDay(day: DayHour, checked: boolean): void { day.open = checked; + if (!checked) { day.hours = []; } this.submitForm(); } - /** - * Ajouter une ligne d'horaires à un jour - */ - public addHours(day: any): void { + /** Ajouter une ligne d'horaires à un jour */ + public addHours(day: DayHour): void { if (day.hours.length >= 5) { return; } @@ -217,43 +200,15 @@ export class HourPickerComponent implements OnChanges, OnDestroy { this.submitForm(); } - /** - * Supprimer la dernière ligne d'horaires d'un jour - */ - public removeHours(day: any, index: number): void { + /** Supprimer la dernière ligne d'horaires d'un jour */ + public removeHours(day: DayHour, index: number): void { if (index > -1) { day.hours.splice(index, 1); this.submitForm(); } } - /** - * Copier les horaires d'un jour pour les coller par dessus les horaires d'un autre jour - */ - public copy(day): void { - this.copiedDayName = day.name; - this.copiedDay = day; - } - - /** - * Remplacer les horaires d'un jour par les horaires copiés précédemment - */ - public paste(day): void { - day.hours = JSON.parse(JSON.stringify(this.copiedDay.hours)); - day.open = this.copiedDay.open; - } - - /** - * Annuler la copie des horaires - */ - public cancelCopy(): void { - this.copiedDayName = ''; - this.copiedDay = null; - } - - /** - * Vérifier que le format des horaires est correct - */ + /** Vérifier que le format des horaires est correct */ public checkHoursValid(): boolean { let error = false; for (const day of this.structure.hours) { @@ -281,17 +236,8 @@ export class HourPickerComponent implements OnChanges, OnDestroy { return !error; } - public onFocus(): void { - this.isInputSelected = true; - } - - public onBlur(): void { - this.isInputSelected = false; - this.submitForm(); - } - public submitForm(): void { - if (this.checkHoursValid() && this.isInputSelected === false) { + if (this.checkHoursValid()) { this.updateForm.emit(this.parseHoursToForm()); } else { this.updateFormError.emit(); @@ -301,7 +247,7 @@ export class HourPickerComponent implements OnChanges, OnDestroy { private createDay(day: Day): UntypedFormGroup { return new UntypedFormGroup({ open: new UntypedFormControl(day.open, Validators.required), - time: new UntypedFormArray(day.time.map((oneTime) => this.createTime(oneTime))) as UntypedFormArray, + time: new UntypedFormArray(day.time.map((oneTime) => this.createTime(oneTime))), }); } @@ -311,4 +257,20 @@ export class HourPickerComponent implements OnChanges, OnDestroy { closing: new UntypedFormControl(time.closing, [Validators.required, CheckHours(time.opening)]), }); } + + getStatus(hour: { start: string; end: string; error: string }): 'error' | 'success' | null { + if (hour.error === 'wrong' || hour.error === 'incomplete') { + return 'error'; + } else if (hour.error === null) { + return 'success'; + } + } + + getStatusText(hour: { start: string; end: string; error: string }): 'Horaire invalide' | 'Horaire valide' { + if (hour.error === 'wrong' || hour.error === 'incomplete') { + return 'Horaire invalide'; + } else if (hour.error === null) { + return 'Horaire valide'; + } + } } diff --git a/src/app/shared/components/v3/input/input.component.html b/src/app/shared/components/v3/input/input.component.html index bf6dccfc1b191b84859710e979863b4a611b9701..03e1f6877591608207fde89782cd51e85a393fef 100644 --- a/src/app/shared/components/v3/input/input.component.html +++ b/src/app/shared/components/v3/input/input.component.html @@ -7,8 +7,10 @@ [id]="id" [disabled]="disabled" [ngClass]="classes" - [ngModel]="ngModelValue" - (ngModelChange)="ngModelValueChange.emit($event)" + [(ngModel)]="value" + (change)="onChange($event)" + (blur)="onFinishedEditing()" + (keyup.enter)="onFinishedEditing()" /> <div *ngIf="status && getStatusText()" class="status" [ngClass]="status"> <img *ngIf="status === 'error'" src="assets/ico/error-rounded.svg" alt="" /> diff --git a/src/app/shared/components/v3/input/input.component.ts b/src/app/shared/components/v3/input/input.component.ts index 6aebd93ed4e5b5da2b293156f90fb20307bacd11..6d353998ab24af26c39a3538ad7a4d3b2424cdf0 100644 --- a/src/app/shared/components/v3/input/input.component.ts +++ b/src/app/shared/components/v3/input/input.component.ts @@ -9,7 +9,7 @@ export class InputV3Component { /** HTML id associated with for */ @Input() id: string; - @Input() type: 'text' | 'password' = 'text'; + @Input() type: 'text' | 'password' | 'time' = 'text'; @Input() disabled = false; @@ -27,14 +27,26 @@ export class InputV3Component { /** Additional text to display */ @Input() statusText?: string; - @Input() ngModelValue: string; + @Input() value: string; - @Output() ngModelValueChange = new EventEmitter<string>(); + /** Triggers when input changes */ + @Output() valueChange = new EventEmitter<string>(); + + @Output() finishedEditing = new EventEmitter<string>(); public get classes(): string { return [this.size, this.status].join(' '); } + public onChange(event: Event): void { + this.value = (event.target as HTMLInputElement).value; + this.valueChange.emit(this.value); + } + + public onFinishedEditing(): void { + this.finishedEditing.emit(this.value); + } + getStatusText(): string { if (this.statusText) return this.statusText; diff --git a/src/app/shared/enum/weekDay.enum.ts b/src/app/shared/enum/weekDay.enum.ts index 6935e53dbeaf5ec32e04d463c00848107ffe6a34..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 --- a/src/app/shared/enum/weekDay.enum.ts +++ b/src/app/shared/enum/weekDay.enum.ts @@ -1,9 +0,0 @@ -export enum WeekDayEnum { - monday = 'lundi', - tuesday = 'mardi', - wednesday = 'mercredi', - thursday = 'jeudi', - friday = 'vendredi', - saturday = 'samedi', - sunday = 'dimanche', -} diff --git a/src/app/shared/pipes/day.pipe.ts b/src/app/shared/pipes/day.pipe.ts index f8a64598e1b294a248e95e347875f853a63d5139..d722ceeb0edbd51c2562890e22db3cd2641d9a0d 100644 --- a/src/app/shared/pipes/day.pipe.ts +++ b/src/app/shared/pipes/day.pipe.ts @@ -2,7 +2,7 @@ import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'day', pure: false }) export class DayPipe implements PipeTransform { - transform(day: string): any { + transform(day: string): 'lundi' | 'mardi' | 'jeudi' | 'mercredi' | 'vendredi' | 'samedi' | 'dimanche' { switch (day) { case 'monday': return 'lundi'; diff --git a/src/app/utils/formUtils.ts b/src/app/utils/formUtils.ts index 139a03a111bc40492e1eea4761c7ebdbc1122afb..70f1cf016a461450d009c80121d3c1c131751d15 100644 --- a/src/app/utils/formUtils.ts +++ b/src/app/utils/formUtils.ts @@ -1,9 +1,7 @@ import { UntypedFormArray, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms'; import { structureFormStep } from '../form/form-view/structure-form/structureFormStep.enum'; -import { Day } from '../models/day.model'; import { Structure } from '../models/structure.model'; -import { Time } from '../models/time.model'; -import { Week } from '../models/week.model'; +import { Day, Time, Week } from '../models/week.model'; import { CustomRegExp } from './CustomRegExp'; import { FormValidators } from './formValidators';