diff --git a/client/src/components/shop-info/shop-info.task-presets.component.jsx b/client/src/components/shop-info/shop-info.task-presets.component.jsx
index 29863fcee..d5cf92cc2 100644
--- a/client/src/components/shop-info/shop-info.task-presets.component.jsx
+++ b/client/src/components/shop-info/shop-info.task-presets.component.jsx
@@ -46,7 +46,10 @@ const getTaskPresetAllocationErrors = (presets = [], t) => {
const laborTypeLabel =
translatedLaborType === `joblines.fields.lbr_types.${laborType}` ? laborType : translatedLaborType;
- return `${laborTypeLabel} task preset total is ${total}% and cannot exceed 100%.`;
+ return t("bodyshop.errors.task_preset_allocation_exceeded", {
+ laborType: laborTypeLabel,
+ total
+ });
});
};
diff --git a/client/src/components/shop-teams/shop-employee-teams.form.component.jsx b/client/src/components/shop-teams/shop-employee-teams.form.component.jsx
index 29543fc14..e18144979 100644
--- a/client/src/components/shop-teams/shop-employee-teams.form.component.jsx
+++ b/client/src/components/shop-teams/shop-employee-teams.form.component.jsx
@@ -31,8 +31,8 @@ const mapDispatchToProps = () => ({});
const LABOR_TYPES = ["LAA", "LAB", "LAD", "LAE", "LAF", "LAG", "LAM", "LAR", "LAS", "LAU", "LA1", "LA2", "LA3", "LA4"];
const PAYOUT_METHOD_OPTIONS = [
- { label: "Hourly", value: "hourly" },
- { label: "Commission %", value: "commission" }
+ { labelKey: "employee_teams.options.hourly", value: "hourly" },
+ { labelKey: "employee_teams.options.commission_percentage", value: "commission" }
];
const normalizeTeamMember = (teamMember = {}) => ({
@@ -76,6 +76,10 @@ export function ShopEmployeeTeamsFormComponent({ bodyshop }) {
const [updateEmployeeTeam] = useMutation(UPDATE_EMPLOYEE_TEAM);
const [insertEmployeeTeam] = useMutation(INSERT_EMPLOYEE_TEAM);
+ const payoutMethodOptions = PAYOUT_METHOD_OPTIONS.map(({ labelKey, value }) => ({
+ label: t(labelKey),
+ value
+ }));
const handleFinish = async ({ employee_team_members = [], ...values }) => {
const normalizedTeamMembers = employee_team_members.map((teamMember) => {
@@ -86,7 +90,7 @@ export function ShopEmployeeTeamsFormComponent({ bodyshop }) {
if (normalizedTeamMembers.length === 0) {
notification.error({
- title: "Add at least one team member."
+ title: t("employee_teams.errors.minimum_one_member")
});
return;
}
@@ -96,14 +100,14 @@ export function ShopEmployeeTeamsFormComponent({ bodyshop }) {
if (duplicateEmployeeIds.length > 0) {
notification.error({
- title: "Each employee can only appear once per team."
+ title: t("employee_teams.errors.duplicate_member")
});
return;
}
if (!hasExactSplitTotal(normalizedTeamMembers)) {
notification.error({
- title: "Team split must total exactly 100%."
+ title: t("employee_teams.errors.allocation_total_exact")
});
return;
}
@@ -225,7 +229,7 @@ export function ShopEmployeeTeamsFormComponent({ bodyshop }) {
-
+
{() => {
@@ -309,7 +313,9 @@ export function ShopEmployeeTeamsFormComponent({ bodyshop }) {
return (
- {`Split Total: ${splitTotal.toFixed(2)}%`}
+ {t("employee_teams.labels.allocation_total", {
+ total: splitTotal.toFixed(2)
+ })}
);
}}
diff --git a/client/src/components/tt-approvals-list/tt-approvals-list.component.jsx b/client/src/components/tt-approvals-list/tt-approvals-list.component.jsx
index 0f485c01d..63090257f 100644
--- a/client/src/components/tt-approvals-list/tt-approvals-list.component.jsx
+++ b/client/src/components/tt-approvals-list/tt-approvals-list.component.jsx
@@ -148,7 +148,7 @@ export function TtApprovalsListComponent({
render: (text, record) => {record.clockon}
},
{
- title: "Pay",
+ title: t("timetickets.fields.pay"),
dataIndex: "pay",
key: "pay",
render: (text, record) =>
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index e216b9cd5..cf86bb930 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -305,7 +305,8 @@
"creatingdefaultview": "Error creating default view.",
"duplicate_insurance_company": "Duplicate insurance company name. Each insurance company name must be unique",
"loading": "Unable to load shop details. Please call technical support.",
- "saving": "Error encountered while saving. {{message}}"
+ "saving": "Error encountered while saving. {{message}}",
+ "task_preset_allocation_exceeded": "{{laborType}} task preset total is {{total}}% and cannot exceed 100%."
},
"fields": {
"ReceivableCustomField": "QBO Receivable Custom Field {{number}}",
@@ -1175,12 +1176,26 @@
"new": "New Team",
"newmember": "New Team Member"
},
+ "errors": {
+ "allocation_total_exact": "Team allocation must total exactly 100%.",
+ "duplicate_member": "Each employee can only appear once per team.",
+ "minimum_one_member": "Add at least one team member."
+ },
"fields": {
"active": "Active",
+ "allocation_percentage": "Allocation %",
"employeeid": "Employee",
"max_load": "Max Load",
"name": "Team Name",
+ "payout_method": "Payout Method",
"percentage": "Percent"
+ },
+ "labels": {
+ "allocation_total": "Allocation Total: {{total}}%"
+ },
+ "options": {
+ "commission_percentage": "Commission %",
+ "hourly": "Hourly"
}
},
"employees": {
@@ -3608,6 +3623,7 @@
"employee_team": "Employee Team",
"flat_rate": "Flat Rate?",
"memo": "Memo",
+ "pay": "Pay",
"productivehrs": "Productive Hours",
"ro_number": "Job to Post Against",
"task_name": "Task"
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index 50b336d37..8ca6d3aea 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -305,7 +305,8 @@
"creatingdefaultview": "",
"duplicate_insurance_company": "",
"loading": "No se pueden cargar los detalles de la tienda. Por favor llame al soporte técnico.",
- "saving": ""
+ "saving": "",
+ "task_preset_allocation_exceeded": ""
},
"fields": {
"ReceivableCustomField": "",
@@ -1175,12 +1176,26 @@
"new": "",
"newmember": ""
},
+ "errors": {
+ "allocation_total_exact": "",
+ "duplicate_member": "",
+ "minimum_one_member": ""
+ },
"fields": {
"active": "",
+ "allocation_percentage": "",
"employeeid": "",
"max_load": "",
"name": "",
+ "payout_method": "",
"percentage": ""
+ },
+ "labels": {
+ "allocation_total": ""
+ },
+ "options": {
+ "commission_percentage": "",
+ "hourly": ""
}
},
"employees": {
@@ -3608,6 +3623,7 @@
"employee_team": "",
"flat_rate": "",
"memo": "",
+ "pay": "",
"productivehrs": "",
"ro_number": "",
"task_name": ""
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index 727d689f8..793f186ed 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -305,7 +305,8 @@
"creatingdefaultview": "",
"duplicate_insurance_company": "",
"loading": "Impossible de charger les détails de la boutique. Veuillez appeler le support technique.",
- "saving": ""
+ "saving": "",
+ "task_preset_allocation_exceeded": ""
},
"fields": {
"ReceivableCustomField": "",
@@ -1175,12 +1176,26 @@
"new": "",
"newmember": ""
},
+ "errors": {
+ "allocation_total_exact": "",
+ "duplicate_member": "",
+ "minimum_one_member": ""
+ },
"fields": {
"active": "",
+ "allocation_percentage": "",
"employeeid": "",
"max_load": "",
"name": "",
+ "payout_method": "",
"percentage": ""
+ },
+ "labels": {
+ "allocation_total": ""
+ },
+ "options": {
+ "commission_percentage": "",
+ "hourly": ""
}
},
"employees": {
@@ -3608,6 +3623,7 @@
"employee_team": "",
"flat_rate": "",
"memo": "",
+ "pay": "",
"productivehrs": "",
"ro_number": "",
"task_name": ""