diff --git a/public/src/app/all-files/all-files.component.ts b/public/src/app/all-files/all-files.component.ts index 2368f1a..d02bdc9 100644 --- a/public/src/app/all-files/all-files.component.ts +++ b/public/src/app/all-files/all-files.component.ts @@ -15,7 +15,7 @@ import { environment } from '../../environments/environment'; export class AllFilesComponent implements OnInit { private readonly partnerStore = inject(StoreService); - files: { [key: string]: string } = { + files: Record = { ...environment.files, }; diff --git a/public/src/app/generated/generated.component.ts b/public/src/app/generated/generated.component.ts index 2c0968e..08d2381 100644 --- a/public/src/app/generated/generated.component.ts +++ b/public/src/app/generated/generated.component.ts @@ -42,7 +42,7 @@ export class GeneratedComponent { @Input() step: WorkflowStep | undefined; @Input() company: Company | undefined; @Input() id: string | undefined; - files: { [key: string]: string } = { + files: Record = { ...environment.files, }; isAdmin = false; diff --git a/public/src/app/private-dashboard/dashboard/dashboard.component.ts b/public/src/app/private-dashboard/dashboard/dashboard.component.ts index 905df0f..1db480a 100644 --- a/public/src/app/private-dashboard/dashboard/dashboard.component.ts +++ b/public/src/app/private-dashboard/dashboard/dashboard.component.ts @@ -236,7 +236,7 @@ export class DashboardComponent implements AfterViewInit { }); } countByStep(partners: Company[]) { - const counter: { [key: string]: number } = { + const counter: Record = { sign: 0, generated: 0, validated: 0, diff --git a/public/src/app/ui/files/files.component.ts b/public/src/app/ui/files/files.component.ts index e3037a6..f79161a 100644 --- a/public/src/app/ui/files/files.component.ts +++ b/public/src/app/ui/files/files.component.ts @@ -30,5 +30,5 @@ import { MatIconModule } from '@angular/material/icon'; }) export class FilesComponent { @Input() - files: { [key: string]: string } | undefined; + files: Record | undefined; } diff --git a/public/src/app/ui/form/validators/index.ts b/public/src/app/ui/form/validators/index.ts index e611ad7..1e14465 100644 --- a/public/src/app/ui/form/validators/index.ts +++ b/public/src/app/ui/form/validators/index.ts @@ -1,7 +1,7 @@ import { ValidatorFn, FormControl, AbstractControl } from '@angular/forms'; export function Emails(): ValidatorFn { - return (control: AbstractControl): { [key: string]: any } | null => { + return (control: AbstractControl): Record | null => { const REGEXP = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; const value: string = control.value || ''; @@ -21,7 +21,7 @@ export function Emails(): ValidatorFn { } export function Siret(): ValidatorFn { - return (control: AbstractControl): { [key: string]: any } | null => { + return (control: AbstractControl): Record | null => { const value: string = control.value || ''; const withoutSpace = value.replace(' ', ''); if (value === '' || /^[\d]{14}$/.test(withoutSpace)) {