Skip to content

Conversation

@JoaoVitorLobo
Copy link

  1. Create speaker with contact:
    - ContactForm.vue
    - CreateSpeakerForm.vue
    - speaker.go
  2. Remove pending status from communications:
    - Communications.vue
  3. Gender on templates:
    - 33-pt.html
    - BulkEmailDialogTrigger.vue
    - SpeakerCommunications.vue
    - useBulkEmails.ts
    - useDirectEmail.ts
    - speakers.ts
    - templates.ts
    - ResponsibilitiesView.vue

@Francisca105 Francisca105 changed the base branch from master to staging January 25, 2026 14:33
Copy link
Member

@Francisca105 Francisca105 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of thoughts on good practices: try to keep changes focused on a single issue, with one PR per issue, and mention the related issue in the PR description so reviewers have full context.

</div>

<div class="flex items-center gap-1">
<!-- Pending Status -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid leaving commented-out code, if it’s not needed, please remove it.

};
const getStatusLabel = (status: ThreadStatus): string => {
/*const getStatusLabel = (status: ThreadStatus): string => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid leaving commented-out code, if it’s not needed, please remove it.

<!-- Gender Field -->
<div class="space-y-2">
<Label class="text-sm font-medium">Gender</Label>
<Label class="text-sm font-medium">Gender *</Label>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The asterisk in the label 'Gender *' indicates this field should be required, but there is no validation or enforcement in the code to support that.

</Button>
<div class="flex gap-2">
<Button :disabled="isLoading" @click="createSpeakerAndFinish">
<Button
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Step 3 relies on ContactForm, adding the required validation there makes the step 3 validation redundant. These changes in this file can be removed.

const memberGender = authStore.member!.contactObject.gender;
const speakerGender = props.speaker.contactObject.gender;
// Use contactObject which contains the full Contact (including gender)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Use contactObject which contains the full Contact (including gender)

These comments are unnecessary and can be removed.

const speakerGender = props.speaker.contactObject.gender;
// Use contactObject which contains the full Contact (including gender)
// Fallback to empty string when gender is unavailable to avoid runtime errors
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Fallback to empty string when gender is unavailable to avoid runtime errors

These comments are unnecessary and can be removed.

export const templatePaths: Record<EmailTemplate, string> = {
[EmailTemplate.COMPANIES_EN]: "/companies/33-en.html",
[EmailTemplate.COMPANIES_PT]: "/companies/33-pt.html",
[EmailTemplate.COMPANIES_EN]: "/companies/32-en.html",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The templates were reverted to the previous edition, please undo it.

case "OTHER":
return { article: "e", suffix: "e" };
default:
return { article: "o/a/e", suffix: "(a)" };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better if the default case was equal to the "OTHER" case.

Copy link
Member

@Francisca105 Francisca105 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion for #552 (comment)

const isValid = computed(() => {
const hasName = props.withoutName || formData.name?.trim();
const hasEmail = formData.contact.mails.some((mail) => mail.mail.trim());
return hasName && hasEmail;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const hasGender = !!formData.contact.gender;
const hasLanguage = !!formData.contact.language;
return hasName && hasEmail && hasGender && hasLanguage;

});
const validationMessage = computed(() => {
if (!props.withoutName && !formData.name?.trim()) return "Name is required";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!props.withoutName && !formData.name?.trim()) return "Name is required";
if (!formData.contact.gender) return "Gender is required";
if (!formData.contact.language) return "Language is required";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants