diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel
index c41c57d59..af0d662cb 100644
--- a/bodyshop_translations.babel
+++ b/bodyshop_translations.babel
@@ -46289,6 +46289,27 @@
+
+ payall
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
shiftalreadyclockedon
false
@@ -47249,6 +47270,27 @@
+
+ payall
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
diff --git a/client/src/components/labor-allocations-table/labor-allocations-table.payroll.component.jsx b/client/src/components/labor-allocations-table/labor-allocations-table.payroll.component.jsx
index 0aa62216e..504d0dce6 100644
--- a/client/src/components/labor-allocations-table/labor-allocations-table.payroll.component.jsx
+++ b/client/src/components/labor-allocations-table/labor-allocations-table.payroll.component.jsx
@@ -1,5 +1,14 @@
-import { Button, Card, Col, Row, Space, Table, Typography } from "antd";
-import { SyncOutlined } from '@ant-design/icons'
+import {
+ Button,
+ Card,
+ Col,
+ Row,
+ Space,
+ Table,
+ Typography,
+ notification,
+} from "antd";
+import { SyncOutlined } from "@ant-design/icons";
import axios from "axios";
import _ from "lodash";
import React, { useEffect, useMemo, useState } from "react";
@@ -225,10 +234,34 @@ export function PayrollLaborAllocationsTable({
}
diff --git a/client/src/components/tech-sider/tech-sider.component.jsx b/client/src/components/tech-sider/tech-sider.component.jsx
index aaac65512..c53eadee0 100644
--- a/client/src/components/tech-sider/tech-sider.component.jsx
+++ b/client/src/components/tech-sider/tech-sider.component.jsx
@@ -1,4 +1,8 @@
-import Icon, { SearchOutlined, ScheduleOutlined } from "@ant-design/icons";
+import Icon, {
+ SearchOutlined,
+ ScheduleOutlined,
+ UserAddOutlined,
+} from "@ant-design/icons";
import { Layout, Menu } from "antd";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
@@ -68,19 +72,28 @@ export function TechSider({
{t("menus.tech.joblookup")}
{Enhanced_Payroll.treatment === "on" ? (
- }
- onClick={() => {
- setTimeTicketTaskContext({
- actions: {},
- context: { jobid: null },
- });
- }}
- >
- {t("menus.tech.claimtask")}
-
+ <>
+ }
+ >
+ {t("menus.tech.assignedjobs")}
+
+ }
+ onClick={() => {
+ setTimeTicketTaskContext({
+ actions: {},
+ context: { jobid: null },
+ });
+ }}
+ >
+ {t("menus.tech.claimtask")}
+
+ >
) : (
{t("menus.tech.productionboard")}
- }
- >
- {t("menus.tech.assignedjobs")}
-
+
{() => {
const { task } = form.getFieldsValue();
- const theTaskPreset = bodyshop.md_tasks_presets.presets.find(
+ const theTaskPreset = bodyshop.md_tasks_presets?.presets?.find(
(tp) => tp.name === task
);
diff --git a/client/src/pages/tech-assigned-prod-jobs/tech-assigned-prod-jobs.component.jsx b/client/src/pages/tech-assigned-prod-jobs/tech-assigned-prod-jobs.component.jsx
index b971bd368..65b71f409 100644
--- a/client/src/pages/tech-assigned-prod-jobs/tech-assigned-prod-jobs.component.jsx
+++ b/client/src/pages/tech-assigned-prod-jobs/tech-assigned-prod-jobs.component.jsx
@@ -178,7 +178,7 @@ export function TechAssignedProdJobs({
},
},
{
- title: t("jobs.labels.actions"),
+ title: t("general.labels.actions"),
dataIndex: "actions",
key: "actions",
render: (text, record) => (
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index b2ce6edf4..73ee81162 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -2746,6 +2746,7 @@
"deleting": "Error deleting time ticket. {{message}}",
"noemployeeforuser": "Unable to use Shift Clock",
"noemployeeforuser_sub": "An employee record has not been created for this user. Please create one before using the shift clock. ",
+ "payall": "Error flagging hours. {{error}}",
"shiftalreadyclockedon": "You are already clocked onto a shift. Unable to create shift entry."
},
"fields": {
@@ -2796,7 +2797,8 @@
"clockedout": "Clocked out successfully.",
"committed": "Time Tickets Committed Successfully",
"created": "Time ticket entered successfully.",
- "deleted": "Time ticket deleted successfully."
+ "deleted": "Time ticket deleted successfully.",
+ "payall": "All hours paid out successfully."
},
"validation": {
"clockoffmustbeafterclockon": "Clock off time must be the same or after clock in time.",
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index 511517aeb..2f8e3997c 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -2746,6 +2746,7 @@
"deleting": "",
"noemployeeforuser": "",
"noemployeeforuser_sub": "",
+ "payall": "",
"shiftalreadyclockedon": ""
},
"fields": {
@@ -2796,7 +2797,8 @@
"clockedout": "",
"committed": "",
"created": "",
- "deleted": ""
+ "deleted": "",
+ "payall": ""
},
"validation": {
"clockoffmustbeafterclockon": "",
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index d134b4a6f..eba3149a7 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -2746,6 +2746,7 @@
"deleting": "",
"noemployeeforuser": "",
"noemployeeforuser_sub": "",
+ "payall": "",
"shiftalreadyclockedon": ""
},
"fields": {
@@ -2796,7 +2797,8 @@
"clockedout": "",
"committed": "",
"created": "",
- "deleted": ""
+ "deleted": "",
+ "payall": ""
},
"validation": {
"clockoffmustbeafterclockon": "",
diff --git a/server/payroll/pay-all.js b/server/payroll/pay-all.js
index 81f8ff9d5..935c7d566 100644
--- a/server/payroll/pay-all.js
+++ b/server/payroll/pay-all.js
@@ -32,7 +32,7 @@ exports.payall = async function (req, res) {
const { employeeHash, assignmentHash } = CalculateExpectedHoursForJob(job);
const ticketHash = CalculateTicketsHoursForJob(job);
if (assignmentHash.unassigned > 0) {
- res.json({ success: false, error: "Unassigned hours." });
+ res.json({ success: false, error: "Not all hours have been assigned." });
return;
}
@@ -65,7 +65,7 @@ exports.payall = async function (req, res) {
cost_center:
job.bodyshop.md_responsibility_centers.defaults.costs[key],
flat_rate: true,
- memo: `*SYS-PAY* Add unflagged hours. (${req.user.email})`,
+ memo: `Add unflagged hours. (${req.user.email})`,
});
});
} else {
@@ -83,7 +83,7 @@ exports.payall = async function (req, res) {
job.bodyshop.md_responsibility_centers.defaults.costs[
path.mod_lbr_ty
],
- memo: `*SYS-PAY* Add unflagged hours. (${req.user.email})`,
+ memo: `Add unflagged hours. (${req.user.email})`,
});
}
} else if (diff.op === "update") {
@@ -102,7 +102,7 @@ exports.payall = async function (req, res) {
job.bodyshop.md_responsibility_centers.defaults.costs[
path.mod_lbr_ty
],
- memo: `*SYS-PAY* Adjust flagged hours per assignment. (${req.user.email})`,
+ memo: `Adjust flagged hours per assignment. (${req.user.email})`,
});
} else {
//Has to be a delete
@@ -124,7 +124,7 @@ exports.payall = async function (req, res) {
cost_center:
job.bodyshop.md_responsibility_centers.defaults.costs[key],
flat_rate: true,
- memo: `*SYS-PAY* Remove flagged hours per assignment. (${req.user.email})`,
+ memo: `Remove flagged hours per assignment. (${req.user.email})`,
});
});
} else {
@@ -142,7 +142,7 @@ exports.payall = async function (req, res) {
path.mod_lbr_ty
],
flat_rate: true,
- memo: `*SYS-PAY* Remove flagged hours per assignment. (${req.user.email})`,
+ memo: `Remove flagged hours per assignment. (${req.user.email})`,
});
}
}
@@ -163,10 +163,10 @@ exports.payall = async function (req, res) {
jobid,
{
jobid: jobid,
- error,
+ error: JSON.stringify(error),
}
);
- res.status(503).send();
+ res.status(400).json({ error: error.message });
}
};