Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

Fix note mobile labels and contact translate scope

Anibal Svarcas40b860a69711
diff --git a/src/components/atomic-crm/contacts/ContactPersonalInfo.tsx b/src/components/atomic-crm/contacts/ContactPersonalInfo.tsx
index 4896bfeb..32f05c17 100644
--- a/src/components/atomic-crm/contacts/ContactPersonalInfo.tsx
+++ b/src/components/atomic-crm/contacts/ContactPersonalInfo.tsx
@@ -92,22 +92,26 @@ const PersonalInfoRow = ({
icon: ReactNode;
primary: ReactNode;
showType?: boolean;
-}) => (
- <div className="flex flex-row items-center gap-x-2 py-1 min-h-6">
- {icon}
- <div className="flex flex-wrap gap-x-2 gap-y-0 text-sm">
- {primary}
- {showType ? (
- <WithRecord
- render={(row) =>
- row.type !== "Other" && (
- <span className="text-muted-foreground">
- {getTranslatedPersonalInfoTypeLabel(row.type, translate)}
- </span>
- )
- }
- />
- ) : null}
+}) => {
+ const translate = useTranslate();
+
+ return (
+ <div className="flex flex-row items-center gap-x-2 py-1 min-h-6">
+ {icon}
+ <div className="flex flex-wrap gap-x-2 gap-y-0 text-sm">
+ {primary}
+ {showType ? (
+ <WithRecord
+ render={(row) =>
+ row.type !== "Other" && (
+ <span className="text-muted-foreground">
+ {getTranslatedPersonalInfoTypeLabel(row.type, translate)}
+ </span>
+ )
+ }
+ />
+ ) : null}
+ </div>
</div>
- </div>
-);
+ );
+};
diff --git a/src/components/atomic-crm/notes/NoteInputs.tsx b/src/components/atomic-crm/notes/NoteInputs.tsx
index 0a19a3de..c556a7b9 100644
--- a/src/components/atomic-crm/notes/NoteInputs.tsx
+++ b/src/components/atomic-crm/notes/NoteInputs.tsx
@@ -104,6 +104,7 @@ export const NoteInputs = ({
{showStatus && (
<SelectInput
source="status"
+ label="crm.notes.inputs.status"
choices={noteStatuses.map((status) => ({
id: status.value,
name: status.label,
@@ -122,7 +123,11 @@ export const NoteInputs = ({
defaultValue={getCurrentDate()}
/>
</div>
- <FileInput source="attachments" multiple>
+ <FileInput
+ source="attachments"
+ label="crm.notes.inputs.attachments"
+ multiple
+ >
<AttachmentField source="src" title="title" target="_blank" />
</FileInput>
</div>
diff --git a/src/components/atomic-crm/root/englishCrmMessages.ts b/src/components/atomic-crm/root/englishCrmMessages.ts
index 6c2708cc..527ed897 100644
--- a/src/components/atomic-crm/root/englishCrmMessages.ts
+++ b/src/components/atomic-crm/root/englishCrmMessages.ts
@@ -364,10 +364,12 @@ export const englishCrmMessages = {
added: "Note added",
inputs: {
add_note: "Add a note",
+ attachments: "Attachments",
date: "Date",
options_hint: "(attach files, or change details)",
reference_contact: "Contact",
reference_deal: "Deal",
+ status: "Status",
show_options: "Show options",
},
},
diff --git a/src/components/atomic-crm/root/frenchCrmMessages.ts b/src/components/atomic-crm/root/frenchCrmMessages.ts
index 82af5884..94eee196 100644
--- a/src/components/atomic-crm/root/frenchCrmMessages.ts
+++ b/src/components/atomic-crm/root/frenchCrmMessages.ts
@@ -368,10 +368,12 @@ export const frenchCrmMessages = {
added: "Note ajoutée",
inputs: {
add_note: "Ajouter une note",
+ attachments: "Pièces jointes",
date: "Date",
options_hint: "(joindre des fichiers ou modifier les détails)",
reference_contact: "Contact",
reference_deal: "Affaire",
+ status: "Statut",
show_options: "Afficher les options",
},
},