diff --git a/functions/src/cms4devfest.ts b/functions/src/cms4devfest.ts index 79b715b..37f7b0a 100644 --- a/functions/src/cms4devfest.ts +++ b/functions/src/cms4devfest.ts @@ -36,6 +36,17 @@ function updatesStatus(id: string, company: any, status: any) { .catch((err) => console.log(err)); } +export const getAllPublicSponsors = functions.https.onRequest(async (req, resp) => { + const data = await firestore.collection("companies-2024").get(); + const partners = data.docs + .map((d) => ({ + id: d.id, + ...d.data(), + })) + .filter((p: any) => p.status.paid === StatusEnum.DONE && p.public && !!p.siteUrl && !!p.logoUrl); + resp.send(partners); +}); + const relance = ( emailFactory: (partner: Record, settings: Settings) => any, partners: any[], @@ -46,6 +57,7 @@ const relance = ( sendEmailToAllContacts(c, emailTemplate, settings); }); }; + export const relancePartnaireConventionASigner = functions.https.onCall(async (req, res) => { const data = await firestore.collection("companies-2024").get(); const partners = data.docs.map((d) => d.data()).filter((p) => p.status.sign === StatusEnum.PENDING); diff --git a/public/src/app/model/company.ts b/public/src/app/model/company.ts index c36e213..b377840 100644 --- a/public/src/app/model/company.ts +++ b/public/src/app/model/company.ts @@ -43,6 +43,7 @@ export interface WorkflowStatus { received?: State; communicated?: State; generated?: State; + code?: State; } export interface Company { diff --git a/public/src/app/private-dashboard/dashboard/dashboard.component.ts b/public/src/app/private-dashboard/dashboard/dashboard.component.ts index 1db480a..65d95d2 100644 --- a/public/src/app/private-dashboard/dashboard/dashboard.component.ts +++ b/public/src/app/private-dashboard/dashboard/dashboard.component.ts @@ -26,7 +26,8 @@ type FilterValueType = | 'validated' | 'paid' | 'received' - | 'communicated'; + | 'communicated' + | 'code'; type FilterByPackValueType = string; type FilterByType = PartnerType | 'undefined'; @@ -69,6 +70,7 @@ export class DashboardComponent implements AfterViewInit { 'paid', 'received', 'communicated', + 'code', ]); shouldDisplayRelanceButton = computed(() => { @@ -243,6 +245,7 @@ export class DashboardComponent implements AfterViewInit { paid: 0, received: 0, communicated: 0, + code: 0, }; partners.forEach((partner) => { @@ -269,6 +272,10 @@ export class DashboardComponent implements AfterViewInit { value: 'communicated', label: `Communication (${counter['communicated']})`, }, + { + value: 'code', + label: `Code (${counter['code']})`, + }, ]; }