diff --git a/functions/src/generator/lib/generator.ts b/functions/src/generator/lib/generator.ts index c247042..386039a 100644 --- a/functions/src/generator/lib/generator.ts +++ b/functions/src/generator/lib/generator.ts @@ -11,7 +11,7 @@ function getSponsoringFees(sponsoringConfiguration: SponsorshipConfiguration): [ return [sponsoringConfiguration.priceString, sponsoringConfiguration.price, sponsoringConfiguration.freeTickets]; } -function generateFile(config: any, fileName: string, fileModule: any, configuration: Configuration, invoiceType: any) { +function generateFile(config: any, fileName: string, fileModule: any, configuration: Configuration, invoiceType: any): Promise { const file = fileModule.default; const getOfficialName = () => { if (config.officialName) { @@ -28,7 +28,7 @@ function generateFile(config: any, fileName: string, fileModule: any, configurat const sponsoringConfiguration: SponsorshipConfiguration | undefined = configuration.sponsorships.find((s) => s.name.toLowerCase() === config.sponsoring.toLowerCase()); if (!sponsoringConfiguration) { - return; + return Promise.reject(); } const [SPONSORING_TEXT, SPONSORING_NUMBER, NUMBER_PLACE] = getSponsoringFees(sponsoringConfiguration); diff --git a/functions/src/utils/files.ts b/functions/src/utils/files.ts index b9952d3..85924f5 100644 --- a/functions/src/utils/files.ts +++ b/functions/src/utils/files.ts @@ -29,12 +29,7 @@ export async function generateAndStoreProformaInvoiceAndConvention(company: Comp generateDevis({ ...company, id }, configuration) ]); - await Promise.all([ - storeFile('convention/', convention as any), - storeFile('devis/', proformaInvoice as any), - storeFile('devis/', depositInvoice as any), - storeFile('devis/', devis as any) - ]); + await Promise.all([storeFile('convention/', convention), storeFile('devis/', proformaInvoice), storeFile('devis/', depositInvoice), storeFile('devis/', devis)]); } export async function generateAndStoreInvoice(firestore: FirebaseFirestore.Firestore, company: Company, id: string, configuration: Configuration) { let invoiceNumber = company.invoiceNumber; diff --git a/public/src/app/v3/closed-form-warning-message.component.ts b/public/src/app/v3/closed-form-warning-message.component.ts index 1b39869..7098821 100644 --- a/public/src/app/v3/closed-form-warning-message.component.ts +++ b/public/src/app/v3/closed-form-warning-message.component.ts @@ -9,7 +9,7 @@ import { Timestamp } from '@angular/fire/firestore'; template: `

Le formulaire n'est pas encore ouvert. Nous vous donnons rendez-vous le - {{ date() | date: 'full' }}. + {{ date() | date: 'short' }}.

` }) diff --git a/public/src/index.html b/public/src/index.html index e654b5d..98474f0 100644 --- a/public/src/index.html +++ b/public/src/index.html @@ -9,6 +9,7 @@ +