From 4bf5b2ffa63521d74726c8ae2a9d7d1a9993144c Mon Sep 17 00:00:00 2001 From: joao vitor lobo Date: Sat, 24 Jan 2026 23:44:22 +0000 Subject: [PATCH 1/2] fix: 3 issues at once --- backend/src/mongodb/speaker.go | 4 +- frontend/public/templates/speakers/33-pt.html | 1226 +++++++---------- .../src/components/BulkEmailDialogTrigger.vue | 8 +- frontend/src/components/Communications.vue | 11 +- .../src/components/companies/ContactForm.vue | 4 +- .../components/speakers/CreateSpeakerForm.vue | 14 +- .../speakers/SpeakerCommunications.vue | 13 +- frontend/src/composables/useBulkEmails.ts | 16 +- frontend/src/composables/useDirectEmail.ts | 9 +- frontend/src/dto/speakers.ts | 3 + frontend/src/lib/templates.ts | 94 +- .../views/Dashboard/ResponsibilitiesView.vue | 4 +- 12 files changed, 662 insertions(+), 744 deletions(-) diff --git a/backend/src/mongodb/speaker.go b/backend/src/mongodb/speaker.go index f7c6e77b..667fa2f6 100644 --- a/backend/src/mongodb/speaker.go +++ b/backend/src/mongodb/speaker.go @@ -127,7 +127,9 @@ func (s *SpeakersType) CreateSpeaker(data CreateSpeakerData) (*models.Speaker, e ctx := context.Background() contact := bson.M{ - "phones": []models.ContactPhone{}, + "gender": data.Contact.Gender, + "language": data.Contact.Language, + "phones": []models.ContactPhone{}, "socials": bson.M{ "facebook": "", "skype": "", diff --git a/frontend/public/templates/speakers/33-pt.html b/frontend/public/templates/speakers/33-pt.html index 6a195f66..fdf85e8b 100644 --- a/frontend/public/templates/speakers/33-pt.html +++ b/frontend/public/templates/speakers/33-pt.html @@ -1,169 +1,164 @@ - - - - - - - - SINFO {{.Edition}} - Convite para participação como orador! - - - - - - + + + - - - - - - - - - + +
-
- -
+ + + + +
+
+ +
- Em nome da equipa que organiza a SINFO, ficaríamos muito felizes - se aceitasse o nosso convite para fazer uma palestra. A SINFO é - uma organização de estudantes universitários sem fins lucrativos - responsável pelo planeamento de um dos maiores eventos de - tecnologia em Portugal. Trata-se de uma conferência anual que - ocorre em Lisboa. -
- - - - - - - - - - + + +
+
+ + + + \ No newline at end of file diff --git a/frontend/src/components/BulkEmailDialogTrigger.vue b/frontend/src/components/BulkEmailDialogTrigger.vue index 31adcccb..d02edcff 100644 --- a/frontend/src/components/BulkEmailDialogTrigger.vue +++ b/frontend/src/components/BulkEmailDialogTrigger.vue @@ -450,7 +450,7 @@ import { import { humanReadableParticipationStatus } from "@/dto/index"; import type { ParticipationStatus } from "@/dto/index"; import type { CompanyWithParticipation } from "@/dto/companies"; -import type { SpeakerWithParticipation } from "@/dto/speakers"; +import type { SpeakerWithContactAndParticipation } from "@/dto/speakers"; import { useBulkCompanyEmails, useBulkSpeakerEmails, @@ -462,7 +462,7 @@ interface Props { size?: "sm" | "default" | "lg" | "icon"; buttonClass?: string; companies?: CompanyWithParticipation[]; - speakers?: SpeakerWithParticipation[]; + speakers?: SpeakerWithContactAndParticipation[]; entityType: "companies" | "speakers"; } @@ -499,7 +499,7 @@ const speakerBulk = useBulkSpeakerEmails(); const processBulkEmails = async ( templateCategory: EmailTemplateCategory, statuses: ParticipationStatus[], - entities: CompanyWithParticipation[] | SpeakerWithParticipation[], + entities: CompanyWithParticipation[] | SpeakerWithContactAndParticipation[], ) => { if (props.entityType === "companies") { return companyBulk.processBulkEmails( @@ -511,7 +511,7 @@ const processBulkEmails = async ( return speakerBulk.processBulkEmails( templateCategory, statuses, - entities as SpeakerWithParticipation[], + entities as SpeakerWithContactAndParticipation[], ); }; diff --git a/frontend/src/components/Communications.vue b/frontend/src/components/Communications.vue index e238268f..91ec5706 100644 --- a/frontend/src/components/Communications.vue +++ b/frontend/src/components/Communications.vue @@ -154,7 +154,8 @@ {{ getKindLabel(thread.kind) }}
-
+ + {{ formatDate(thread.posted) }}
@@ -350,7 +351,7 @@ import { ref, computed, watch, nextTick } from "vue"; import { useQuery } from "@pinia/colada"; import { getAllEvents } from "@/api/events"; import { getAllMembers } from "@/api/members"; -import { ThreadKind, ThreadStatus } from "@/dto/threads"; +import { ThreadKind } from "@/dto/threads"; import type { ParticipationCommunications, ThreadWithEntry, @@ -704,7 +705,7 @@ const getKindColor = (kind: ThreadKind): string => { } }; -const getStatusLabel = (status: ThreadStatus): string => { +/*const getStatusLabel = (status: ThreadStatus): string => { switch (status) { case ThreadStatus.ThreadStatusApproved: return "Approved"; @@ -728,7 +729,7 @@ const getStatusColor = (status: ThreadStatus): string => { default: return "bg-gray-400"; } -}; +};*/ const formatDate = (dateString: string): string => { const date = new Date(dateString); diff --git a/frontend/src/components/companies/ContactForm.vue b/frontend/src/components/companies/ContactForm.vue index 44311468..a90a8555 100644 --- a/frontend/src/components/companies/ContactForm.vue +++ b/frontend/src/components/companies/ContactForm.vue @@ -16,7 +16,7 @@
- +
- +
-
@@ -266,6 +269,13 @@ const isStep1Valid = computed(() => { ); }); +const isStep3Valid = computed(() => { + return ( + contactData.value.gender != undefined && + contactData.value.language != undefined + ); +}); + // Step navigation const nextStep = () => { if (currentStep.value === 1 && validateStep1()) { @@ -352,6 +362,8 @@ const createSpeakerAndFinish = async () => { (phone) => phone.phone && phone.phone.trim().length > 0, ), socials: contactData.value.socials || {}, + gender: contactData.value.gender, + language: contactData.value.language, }; const createData: CreateSpeakerData = { diff --git a/frontend/src/components/speakers/SpeakerCommunications.vue b/frontend/src/components/speakers/SpeakerCommunications.vue index 1d8fb89d..4737af5c 100644 --- a/frontend/src/components/speakers/SpeakerCommunications.vue +++ b/frontend/src/components/speakers/SpeakerCommunications.vue @@ -13,7 +13,7 @@ - - - \ No newline at end of file + " + class="center-on-narrow" + > + João Rosário
+ Apple
+
+
+ + + + + + + + + + + + + + + + + + + + +
+
+ + +