From 5d49546805f8ef11463d6c5341a39f8dfbb613b8 Mon Sep 17 00:00:00 2001 From: Emmanuel Date: Mon, 22 Jan 2024 10:50:53 +0100 Subject: [PATCH] feat: move files to environment --- public/src/app/all-files/all-files.component.ts | 6 ++---- public/src/app/generated/generated.component.html | 2 +- public/src/app/generated/generated.component.ts | 4 +--- public/src/environments/environment.cloudnord.ts | 1 + public/src/environments/environment.devfestlille.ts | 5 +++++ public/src/environments/environment.type.ts | 1 + 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/public/src/app/all-files/all-files.component.ts b/public/src/app/all-files/all-files.component.ts index 1f0db56..2368f1a 100644 --- a/public/src/app/all-files/all-files.component.ts +++ b/public/src/app/all-files/all-files.component.ts @@ -4,7 +4,7 @@ import { Company } from '../model/company'; import { StorageService } from '../storage.service'; import { FilesComponent } from '../ui/files/files.component'; import { StoreService } from '../services/store.service'; - +import { environment } from '../../environments/environment'; @Component({ selector: 'cms-all-files', standalone: true, @@ -16,9 +16,7 @@ export class AllFilesComponent implements OnInit { private readonly partnerStore = inject(StoreService); files: { [key: string]: string } = { - 'RIB du GDG Lille': '/assets/RIB.pdf', - 'Journal Officiel suite à la création du GDG Lille': - '/assets/JournalOfficiel.pdf', + ...environment.files, }; private readonly storageService = inject(StorageService); diff --git a/public/src/app/generated/generated.component.html b/public/src/app/generated/generated.component.html index 2b27803..cf2490b 100644 --- a/public/src/app/generated/generated.component.html +++ b/public/src/app/generated/generated.component.html @@ -107,7 +107,7 @@

Vous pouvez nous faire parvenir la convention soit en retour de ce mail, diff --git a/public/src/app/generated/generated.component.ts b/public/src/app/generated/generated.component.ts index c955f76..2c0968e 100644 --- a/public/src/app/generated/generated.component.ts +++ b/public/src/app/generated/generated.component.ts @@ -43,9 +43,7 @@ export class GeneratedComponent { @Input() company: Company | undefined; @Input() id: string | undefined; files: { [key: string]: string } = { - 'RIB du GDG Lille': '/assets/RIB.pdf', - 'Journal Officiel suite à la création du GDG Lille': - '/assets/JournalOfficiel.pdf', + ...environment.files, }; isAdmin = false; private readonly partnerService = inject(PartnerService); diff --git a/public/src/environments/environment.cloudnord.ts b/public/src/environments/environment.cloudnord.ts index 2e66843..71f947c 100644 --- a/public/src/environments/environment.cloudnord.ts +++ b/public/src/environments/environment.cloudnord.ts @@ -10,4 +10,5 @@ export const environment: Environement = { appId: '1:844221667986:web:ffa3f4d8c781b3c212244b', }, emailDomain: 'cloudnord.fr', + files: {}, }; diff --git a/public/src/environments/environment.devfestlille.ts b/public/src/environments/environment.devfestlille.ts index 83025bc..dd08e56 100644 --- a/public/src/environments/environment.devfestlille.ts +++ b/public/src/environments/environment.devfestlille.ts @@ -12,4 +12,9 @@ export const environment: Environement = { measurementId: 'G-S558S2HZ11', }, emailDomain: 'gdglille.org', + files: { + 'RIB du GDG Lille': '/assets/RIB.pdf', + 'Journal Officiel suite à la création du GDG Lille': + '/assets/JournalOfficiel.pdf', + }, }; diff --git a/public/src/environments/environment.type.ts b/public/src/environments/environment.type.ts index 66e9e64..0adcba5 100644 --- a/public/src/environments/environment.type.ts +++ b/public/src/environments/environment.type.ts @@ -1,4 +1,5 @@ export type Environement = { firebase?: Record; emailDomain: string; + files: Record; };