Compare commits

..

63 Commits

Author SHA1 Message Date
Dave Richer
c98a48ea14 - Add Additional tags (prettier also fixed some double spaced imports)
Signed-off-by: Dave Richer <dave@imexsystems.ca>
2024-04-19 12:57:45 -04:00
Patrick Fic
cdf02a8eac Merged in release/AIO/2024-04-19 (pull request #1420)
Resolve CCC supplement with UNQ_SEQ.
2024-04-18 20:49:45 +00:00
Dave Richer
7822e3f90e Merged in feature/IO-2760-IDS-for-headers (pull request #1424)
Add Header IDS

Approved-by: Patrick Fic
2024-04-18 17:25:15 +00:00
Dave Richer
a4a612fbe4 - adjust moment import
Signed-off-by: Dave Richer <dave@imexsystems.ca>
2024-04-18 13:17:13 -04:00
Patrick Fic
2d9412e4e8 Merge branch 'release/2024-04-19' into release/AIO/2024-04-19 2024-04-16 16:10:33 -07:00
Patrick Fic
069d508528 Update cron trigger timing. 2024-04-16 16:09:54 -07:00
Patrick Fic
a9d38e743f Merge branch 'release/2024-04-19' into release/AIO/2024-04-19 2024-04-16 16:03:06 -07:00
Patrick Fic
878e81dc8f Hasura schema changes for tasks. 2024-04-16 16:02:25 -07:00
Patrick Fic
de35155ffe Resolve CCC supplement with UNQ_SEQ. 2024-04-16 15:15:25 -07:00
Dave Richer
a1f7e7b755 Merged in feature/IO-2667-Migrations-For-Remind-At-Sent (pull request #1416)
- Migrations for remind_at_sent
2024-04-16 19:52:13 +00:00
Dave Richer
c8f8a86a98 - Migrations for remind_at_sent
Signed-off-by: Dave Richer <dave@imexsystems.ca>
2024-04-16 15:45:56 -04:00
Patrick Fic
443c6046f9 Merged in release/2024-04-19 (pull request #1415)
Resolve schedule header display.
2024-04-15 21:02:39 +00:00
Patrick Fic
1620b94a7b Merged in release/2024-04-19 (pull request #1414)
Resolve schedule header display.
2024-04-15 20:47:48 +00:00
Patrick Fic
81f94eac6c Resolve schedule header display. 2024-04-15 13:47:19 -07:00
Patrick Fic
ffada75d9e Merged in test-AIO (pull request #1412)
Test AIO

Approved-by: Dave Richer
2024-04-12 18:05:35 +00:00
Allan Carr
ec7509670d Merged in release/2024-04-12 (pull request #1413)
Release/2024 04 12

Approved-by: Dave Richer
2024-04-12 17:08:21 +00:00
Patrick Fic
25a49473f9 Merge branch 'release/AIO/2024-04-12' into test-AIO 2024-04-11 15:22:26 -07:00
Patrick Fic
8e86e7fba5 Resolve linting errors from merge. 2024-04-11 15:22:05 -07:00
Patrick Fic
f9b380a0d4 Merged in release/AIO/2024-04-12 (pull request #1411)
Release/AIO/2024 04 12
2024-04-11 22:16:32 +00:00
Patrick Fic
f664a56b16 Merge branch 'release/2024-04-12' into release/AIO/2024-04-12 2024-04-11 15:15:54 -07:00
Allan Carr
0acfd3c4b1 Merged in feature/IO-2609-Calendar-BPT-HRS (pull request #1409)
IO-2609 Fix Spelling Mistake in object name
2024-04-11 21:39:06 +00:00
Allan Carr
bfc4cb1ad9 IO-2609 Fix Spelling Mistake in object name
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-04-11 14:38:08 -07:00
Patrick Fic
66dd1a9a2b Merge branch 'feature/AIO/promanager' into test-AIO 2024-04-11 14:29:09 -07:00
Allan Carr
1f42be2e54 Merged in feature/IO-2753-Qty-Parts-Order-Modal (pull request #1405)
IO-2753 Parts Order/Return Quantity restrict to above 0
2024-04-11 21:22:37 +00:00
Allan Carr
30d344af6b Merged in feature/IO-2752-BO-ETA-Jobline-Expander (pull request #1404)
IO-2752 BO ETA Jobline Expander
2024-04-11 21:22:19 +00:00
Allan Carr
3ca989fd8c Merged in release/2024-04-05 (pull request #1401)
Release/2024 04 05

Approved-by: Dave Richer
2024-04-11 21:22:03 +00:00
Patrick Fic
73c38b3ae4 Merged in feature/IO-2458-RO-Closer (pull request #1406)
Feature/IO-2458 RO Closer
2024-04-11 20:25:25 +00:00
Patrick Fic
08749b0c92 Add audit log to job close with bypass. 2024-04-11 13:24:45 -07:00
Patrick Fic
ea73af371e Minor bug fixes. 2024-04-11 13:07:43 -07:00
Allan Carr
ce2086a480 IO-2753 Parts Order/Return Quantity restrict to above 0
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-04-11 12:43:14 -07:00
Allan Carr
63f7106d2b IO-2752 BO ETA Jobline Expander
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-04-11 11:55:55 -07:00
Patrick Fic
e991586254 Merged in feature/IO-2458-RO-Closer (pull request #1403)
Bug fixes and formatting for RO guard.
2024-04-11 16:54:35 +00:00
Patrick Fic
453236cf3a Bug fixes and formatting for RO guard. 2024-04-11 09:49:00 -07:00
Allan Carr
e75d8d1874 Merged in feature/IO-2609-Calendar-BPT-HRS (pull request #1402)
IO-2609 Body & Refinish Times included in Calendar View

Approved-by: Dave Richer
2024-04-11 16:27:02 +00:00
Patrick Fic
719fa6a67d ProMan totals changes. 2024-04-11 09:23:20 -07:00
Patrick Fic
512cd70d13 Merge branch 'feature/IO-2458-RO-Closer' into test-AIO 2024-04-09 12:23:49 -07:00
Patrick Fic
e5599ff4c4 Update prettier config and add as dev dependency. 2024-04-09 12:23:10 -07:00
Allan Carr
07bf84ed69 IO-2609 Body & Refinish Times included in Calendar View
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-04-09 11:55:20 -07:00
Patrick Fic
f5b8bf1d74 Resolve unnecessary import. 2024-04-08 14:32:02 -07:00
Patrick Fic
61766017ea Resolve supplement import for CCC. 2024-04-08 14:28:58 -07:00
Patrick Fic
706984a53b Resolve CCC supplement import. 2024-04-08 14:27:33 -07:00
Patrick Fic
e137feca20 Resolve ESLint Warnings 2024-04-08 14:20:34 -07:00
Patrick Fic
9e66d7c929 Merge branch 'release/AIO/2024-04-05' into test-AIO 2024-04-08 13:56:10 -07:00
Patrick Fic
9605bf5c21 Merge branch 'release/2024-04-05' into release/AIO/2024-04-05 2024-04-08 13:55:43 -07:00
Allan Carr
c2cc7b1e9e Merged in feature/IO-2731-Payment-Edit (pull request #1399)
IO-2731 Payment Edit
2024-04-08 19:56:43 +00:00
Allan Carr
fe55eccbf9 Merged in feature/IO-2749-Parts-Return-Pass-Jobs-Data (pull request #1398)
IO-2749 Pass Jobs data from Parts Return to Parts Order Modal
2024-04-08 19:55:49 +00:00
Patrick Fic
47e17dc78a Merge branch 'feature/IO-2727-resolve-payment-refetch' into release/AIO/2024-04-05 2024-04-08 12:43:15 -07:00
Allan Carr
88a71dd647 IO-2731 Payment Edit
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-04-08 12:23:04 -07:00
Patrick Fic
ce0b3a8635 Merge branch 'feature/IO-2727-resolve-payment-refetch' into test-AIO 2024-04-08 11:08:57 -07:00
Allan Carr
c3b395c99e IO-2749 Pass Jobs data from Parts Return to Parts Order Modal
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-04-08 09:53:20 -07:00
Allan Carr
19a03ec080 Merge branch 'release/2024-04-05' into test-AIO
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>

# Conflicts:
#	client/src/components/print-center-jobs-labels/print-center-jobs-labels.component.jsx
2024-04-05 12:21:35 -07:00
Allan Carr
33d5d9b462 Merged in feature/IO-2568-Payment-Modal-Button-Spacing (pull request #1396)
IO-2568 Button Padding in Print Center Label Modal
2024-04-05 19:03:09 +00:00
Allan Carr
b5a371d0cf IO-2568 Button Padding in Print Center Label Modal
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-04-05 12:01:26 -07:00
Dave Richer
b61fd17879 - add smart refetch to mark-export and reexport
Signed-off-by: Dave Richer <dave@imexsystems.ca>
2024-04-05 14:54:16 -04:00
Dave Richer
6722f8b1e5 - reversion
Signed-off-by: Dave Richer <dave@imexsystems.ca>
2024-04-05 13:41:37 -04:00
Dave Richer
69ff75157d - reversion
Signed-off-by: Dave Richer <dave@imexsystems.ca>
2024-04-05 13:35:44 -04:00
Allan Carr
7c619f5439 Merged in release/2024-04-05 (pull request #1395)
IO-2750 Missing Mutation return fields
2024-04-05 16:00:52 +00:00
Allan Carr
3b35f38ad5 Merged in feature/IO-2750-Missing-Jobline-Fields (pull request #1393)
IO-2750 Missing Mutation return fields
2024-04-05 15:55:13 +00:00
Dave Richer
4ff2ab1bc8 - Remove actions params in Payment modal, which was causing issues.
Signed-off-by: Dave Richer <dave@imexsystems.ca>
2024-04-05 11:20:16 -04:00
Dave Richer
83a976e98f - Add ESLint back to Vite
Signed-off-by: Dave Richer <dave@imexsystems.ca>
2024-04-05 09:59:30 -04:00
Allan Carr
1f5c1b9658 IO-2750 Missing Mutation return fields
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-04-04 17:00:30 -07:00
Patrick Fic
56dfd174dd Merge branch 'hotfix/AIO/2024-04-04' into master-AIO 2024-04-04 11:32:09 -07:00
Patrick Fic
532cd4937b Merge branch 'hotfix/AIO/2024-04-04' into master-AIO 2024-04-04 10:51:57 -07:00
45 changed files with 707 additions and 401 deletions

View File

@@ -9,10 +9,10 @@ const config = {
arrowParens: "always",
jsxSingleQuote: false,
bracketSameLine: false,
endOfLine: "lf",
importOrder: ["^@core/(.*)$", "^@server/(.*)$", "^@ui/(.*)$", "^[./]"],
importOrderSeparation: true,
importOrderSortSpecifiers: true
endOfLine: "lf"
// importOrder: ["^@core/(.*)$", "^@server/(.*)$", "^@ui/(.*)$", "^[./]"],
// importOrderSeparation: true,
// importOrderSortSpecifiers: true
};
module.exports = config;

View File

@@ -1,4 +1,4 @@
<babeledit_project be_version="2.7.1" version="1.2">
<babeledit_project version="1.2" be_version="2.7.1">
<!--
BabelEdit project file
@@ -1789,6 +1789,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>jobclosedwithbypass</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node>
<name>jobconverted</name>
<definition_loaded>false</definition_loaded>
@@ -34201,6 +34222,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>profitbypassrequired</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node>
<name>profits</name>
<definition_loaded>false</definition_loaded>
@@ -34587,27 +34629,6 @@
<folder_node>
<name>ro_guard</name>
<children>
<concept_node>
<name>eforce_profit</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node>
<name>enforce_ar</name>
<definition_loaded>false</definition_loaded>
@@ -34713,6 +34734,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>enforce_profit</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node>
<name>enforce_sublet</name>
<definition_loaded>false</definition_loaded>

5
client/.eslintrc Normal file
View File

@@ -0,0 +1,5 @@
{
"extends": [
"react-app"
]
}

View File

@@ -96,6 +96,8 @@
"browserslist-to-esbuild": "^2.1.1",
"cross-env": "^7.0.3",
"cypress": "^13.6.6",
"eslint": "^8.57.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-cypress": "^2.15.1",
"memfs": "^4.6.0",
"os-browserify": "^0.3.0",
@@ -104,6 +106,7 @@
"source-map-explorer": "^2.5.3",
"vite": "^5.0.11",
"vite-plugin-babel": "^1.2.0",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-legacy": "^2.1.0",
"vite-plugin-node-polyfills": "^0.19.0",
"vite-plugin-pwa": "^0.19.0",
@@ -11934,7 +11937,8 @@
},
"node_modules/eslint": {
"version": "8.57.0",
"license": "MIT",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz",
"integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==",
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
@@ -11987,7 +11991,8 @@
},
"node_modules/eslint-config-react-app": {
"version": "7.0.1",
"license": "MIT",
"resolved": "https://registry.npmjs.org/eslint-config-react-app/-/eslint-config-react-app-7.0.1.tgz",
"integrity": "sha512-K6rNzvkIeHaTd8m/QEh1Zko0KI7BACWkkneSs6s9cKZC/J27X3eZR6Upt1jkmZ/4FK+XUOPPxMEN7+lbUXfSlA==",
"dependencies": {
"@babel/core": "^7.16.0",
"@babel/eslint-parser": "^7.16.3",
@@ -26439,6 +26444,36 @@
"vite": ">=5.0.0"
}
},
"node_modules/vite-plugin-eslint": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/vite-plugin-eslint/-/vite-plugin-eslint-1.8.1.tgz",
"integrity": "sha512-PqdMf3Y2fLO9FsNPmMX+//2BF5SF8nEWspZdgl4kSt7UvHDRHVVfHvxsD7ULYzZrJDGRxR81Nq7TOFgwMnUang==",
"dev": true,
"dependencies": {
"@rollup/pluginutils": "^4.2.1",
"@types/eslint": "^8.4.5",
"rollup": "^2.77.2"
},
"peerDependencies": {
"eslint": ">=7",
"vite": ">=2"
}
},
"node_modules/vite-plugin-eslint/node_modules/rollup": {
"version": "2.79.1",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz",
"integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==",
"dev": true,
"bin": {
"rollup": "dist/bin/rollup"
},
"engines": {
"node": ">=10.0.0"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
}
},
"node_modules/vite-plugin-legacy": {
"version": "2.1.0",
"dev": true,

View File

@@ -140,6 +140,8 @@
"browserslist-to-esbuild": "^2.1.1",
"cross-env": "^7.0.3",
"cypress": "^13.6.6",
"eslint": "^8.57.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-cypress": "^2.15.1",
"memfs": "^4.6.0",
"os-browserify": "^0.3.0",
@@ -148,6 +150,7 @@
"source-map-explorer": "^2.5.3",
"vite": "^5.0.11",
"vite-plugin-babel": "^1.2.0",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-legacy": "^2.1.0",
"vite-plugin-node-polyfills": "^0.19.0",
"vite-plugin-pwa": "^0.19.0",

View File

@@ -34,6 +34,7 @@ export function BillDetailEditReturn({ setPartsOrderContext, insertAuditTrail, b
actions: {},
context: {
jobId: data.bills_by_pk.jobid,
job: data.bills_by_pk.job,
vendorId: data.bills_by_pk.vendorid,
returnFromBill: data.bills_by_pk.id,
invoiceNumber: data.bills_by_pk.invoice_number,

View File

@@ -57,7 +57,7 @@ export function BillsListTableComponent({
)}
<BillDeleteButton bill={record} jobid={job.id} />
<BillDetailEditReturnComponent
data={{ bills_by_pk: { ...record, jobid: job.id } }}
data={{ bills_by_pk: { ...record, jobid: job.id, job: job } }}
disabled={record.is_credit_memo || record.vendorid === bodyshop.inhousevendorid || jobRO}
/>

View File

@@ -278,10 +278,12 @@ function Header({
{
key: "home",
icon: <HomeFilled />,
id: "header-home",
label: <Link to="/manage/">{t("menus.header.home")}</Link>
},
{
key: "schedule",
id: "header-schedule",
icon: <Icon component={FaCalendarAlt} />,
label: <Link to="/manage/schedule">{t("menus.header.schedule")}</Link>
},
@@ -293,16 +295,19 @@ function Header({
children: [
{
key: "activejobs",
id: "header-active-jobs",
icon: <FileFilled />,
label: <Link to="/manage/jobs">{t("menus.header.activejobs")}</Link>
},
{
key: "readyjobs",
id: "header-ready-jobs",
icon: <CheckCircleOutlined />,
label: <Link to="/manage/jobs/ready">{t("menus.header.readyjobs")}</Link>
},
{
key: "parts-queue",
id: "header-parts-queue",
icon: <ToolFilled />,
label: <Link to="/manage/partsqueue">{t("menus.header.parts-queue")}</Link>
},
@@ -314,6 +319,7 @@ function Header({
},
{
key: "newjob",
id: "header-new-job",
icon: <FileAddOutlined />,
label: <Link to="/manage/jobs/new">{t("menus.header.newjob")}</Link>
},
@@ -322,6 +328,7 @@ function Header({
},
{
key: "alljobs",
id: "header-all-jobs",
icon: <UnorderedListOutlined />,
label: <Link to="/manage/jobs/all">{t("menus.header.alljobs")}</Link>
},
@@ -330,6 +337,7 @@ function Header({
},
{
key: "productionlist",
id: "header-production-list",
icon: <ScheduleOutlined />,
label: <Link to="/manage/production/list">{t("menus.header.productionlist")}</Link>
},
@@ -341,6 +349,7 @@ function Header({
? [
{
key: "productionboard",
id: "header-production-board",
icon: <Icon component={BsKanban} />,
label: <Link to="/manage/production/board">{t("menus.header.productionboard")}</Link>
}
@@ -358,6 +367,7 @@ function Header({
},
{
key: "scoreboard",
id: "header-scoreboard",
icon: <LineChartOutlined />,
label: <Link to="/manage/scoreboard">{t("menus.header.scoreboard")}</Link>
}
@@ -368,15 +378,18 @@ function Header({
{
key: "customers",
icon: <UserOutlined />,
id: "header-customers",
label: t("menus.header.customers"),
children: [
{
key: "owners",
id: "header-owners",
icon: <TeamOutlined />,
label: <Link to="/manage/owners">{t("menus.header.owners")}</Link>
},
{
key: "vehicles",
id: "header-vehicles",
icon: <CarFilled />,
label: <Link to="/manage/vehicles">{t("menus.header.vehicles")}</Link>
}
@@ -390,21 +403,25 @@ function Header({
? [
{
key: "ccs",
id: "header-css",
icon: <CarFilled />,
label: t("menus.header.courtesycars"),
children: [
{
key: "courtesycarsall",
id: "header-courtesycars-all",
icon: <CarFilled />,
label: <Link to="/manage/courtesycars">{t("menus.header.courtesycars-all")}</Link>
},
{
key: "contracts",
id: "header-contracts",
icon: <FileFilled />,
label: <Link to="/manage/courtesycars/contracts">{t("menus.header.courtesycars-contracts")}</Link>
},
{
key: "newcontract",
id: "header-newcontract",
icon: <FileAddFilled />,
label: <Link to="/manage/courtesycars/contracts/new">{t("menus.header.courtesycars-newcontract")}</Link>
}
@@ -417,6 +434,7 @@ function Header({
? [
{
key: "accounting",
id: "header-accounting",
icon: <DollarCircleFilled />,
label: t("menus.header.accounting"),
children: accountingChildren
@@ -425,6 +443,7 @@ function Header({
: []),
{
key: "phonebook",
id: "header-phonebook",
icon: <PhoneOutlined />,
label: <Link to="/manage/phonebook">{t("menus.header.phonebook")}</Link>
},
@@ -436,6 +455,7 @@ function Header({
? [
{
key: "temporarydocs",
id: "header-temporarydocs",
icon: <PaperClipOutlined />,
label: <Link to="/manage/temporarydocs">{t("menus.header.temporarydocs")}</Link>
}
@@ -443,21 +463,25 @@ function Header({
: []),
{
key: "shopsubmenu",
id: "header-shopsubmenu",
icon: <SettingOutlined />,
label: t("menus.header.shop"),
children: [
{
key: "shop",
id: "header-shop",
icon: <Icon component={GiSettingsKnobs} />,
label: <Link to="/manage/shop?tab=info">{t("menus.header.shop_config")}</Link>
},
{
key: "dashboard",
id: "header-dashboard",
icon: <DashboardFilled />,
label: <Link to="/manage/dashboard">{t("menus.header.dashboard")}</Link>
},
{
key: "reportcenter",
id: "header-reportcenter",
icon: <BarChartOutlined />,
label: t("menus.header.reportcenter"),
onClick: () => {
@@ -469,6 +493,7 @@ function Header({
},
{
key: "shop-vendors",
id: "header-shop-vendors",
icon: <Icon component={IoBusinessOutline} />,
label: <Link to="/manage/shop/vendors">{t("menus.header.shop_vendors")}</Link>
},
@@ -480,6 +505,7 @@ function Header({
? [
{
key: "shop-csi",
id: "header-shop-csi",
icon: <Icon component={RiSurveyLine} />,
label: <Link to="/manage/shop/csi">{t("menus.header.shop_csi")}</Link>
}
@@ -493,6 +519,7 @@ function Header({
children: [
{
key: "signout",
id: "header-signout",
icon: <Icon component={FiLogOut} />,
danger: true,
label: t("user.actions.signout"),
@@ -500,6 +527,7 @@ function Header({
},
{
key: "help",
id: "header-help",
icon: <Icon component={QuestionCircleFilled} />,
label: t("menus.header.help"),
onClick: () => {
@@ -531,6 +559,7 @@ function Header({
? [
{
key: "shiftclock",
id: "header-shiftclock",
icon: <Icon component={GiPlayerTime} />,
label: <Link to="/manage/shiftclock">{t("menus.header.shiftclock")}</Link>
}
@@ -538,6 +567,7 @@ function Header({
: []),
{
key: "profile",
id: "header-profile",
icon: <UserOutlined />,
label: <Link to="/manage/profile">{t("menus.currentuser.profile")}</Link>
}
@@ -573,6 +603,7 @@ function Header({
{
key: "recent",
icon: <ClockCircleFilled />,
id: "header-recent",
children: recentItems.map((i, idx) => ({
key: idx,
label: <Link to={i.url}>{i.label}</Link>
@@ -586,6 +617,7 @@ function Header({
imex: () => {
menuItems.push({
key: "beta-switch",
id: "header-beta-switch",
style: { marginLeft: "auto" },
label: (
<Tooltip

View File

@@ -1,11 +1,11 @@
import { Alert, Card, Col, Row, Space, Statistic, Tooltip, Typography } from 'antd';
import Dinero from 'dinero.js';
import React from 'react';
import { useTranslation } from 'react-i18next';
import InstanceRenderManager from '../../utils/instanceRenderMgr';
import AlertComponent from '../alert/alert.component';
import LoadingSkeleton from '../loading-skeleton/loading-skeleton.component';
import './job-bills-total.styles.scss';
import { Alert, Card, Col, Row, Space, Statistic, Tooltip, Typography } from "antd";
import Dinero from "dinero.js";
import React from "react";
import { useTranslation } from "react-i18next";
import InstanceRenderManager from "../../utils/instanceRenderMgr";
import AlertComponent from "../alert/alert.component";
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
import "./job-bills-total.styles.scss";
export default function JobBillsTotalComponent({
loading,
@@ -13,16 +13,16 @@ export default function JobBillsTotalComponent({
partsOrders,
jobTotals,
showWarning,
warningCallback,
warningCallback
}) {
const { t } = useTranslation();
if (loading) return <LoadingSkeleton />;
if (!!!jobTotals) {
if (showWarning && warningCallback && typeof warningCallback === 'function') {
warningCallback({ key: 'bills', warning: t('jobs.errors.nofinancial') });
if (showWarning && warningCallback && typeof warningCallback === "function") {
warningCallback({ key: "bills", warning: t("jobs.errors.nofinancial") });
}
return <AlertComponent type="error" message={t('jobs.errors.nofinancial')} />;
return <AlertComponent type="error" message={t("jobs.errors.nofinancial")} />;
}
const totals = jobTotals;
@@ -109,64 +109,60 @@ export default function JobBillsTotalComponent({
const discrepWithCms = discrepWithLbrAdj.add(totalReturns);
const calculatedCreditsNotReceived = totalReturns.subtract(billCms); //billCms is tracked as a negative number.
if (showWarning && warningCallback && typeof warningCallback === 'function') {
if (
discrepWithCms.getAmount() !== 0 ||
discrepWithLbrAdj.getAmount() !== 0 ||
discrepancy.getAmount() !== 0
) {
if (showWarning && warningCallback && typeof warningCallback === "function") {
if (discrepWithCms.getAmount() !== 0) {
warningCallback({
key: 'bills',
warning: t('jobs.labels.outstanding_reconciliation_discrep'),
key: "bills",
warning: t("jobs.labels.outstanding_reconciliation_discrep")
});
}
if (calculatedCreditsNotReceived.getAmount() > 0) {
warningCallback({ key: 'cm', warning: t('jobs.labels.outstanding_credit_memos') });
warningCallback({ key: "cm", warning: t("jobs.labels.outstanding_credit_memos") });
}
}
return (
<Row gutter={[16, 16]}>
<Col md={24} lg={18}>
<Card title={t('jobs.labels.jobtotals')} style={{ height: '100%' }}>
<Card title={t("jobs.labels.jobtotals")} style={{ height: "100%" }}>
<Space wrap size="large">
<Tooltip
title={
<div
dangerouslySetInnerHTML={{
__html: t('jobs.labels.plitooltips.partstotal'),
__html: t("jobs.labels.plitooltips.partstotal")
}}
/>
}
>
<Statistic title={t('jobs.labels.rosaletotal')} value={totalPartsSublet.toFormat()} />
<Statistic title={t("jobs.labels.rosaletotal")} value={totalPartsSublet.toFormat()} />
</Tooltip>
<Typography.Title>-</Typography.Title>
<Tooltip
title={
<div
dangerouslySetInnerHTML={{
__html: t('jobs.labels.plitooltips.billtotal'),
__html: t("jobs.labels.plitooltips.billtotal")
}}
/>
}
>
<Statistic title={t('bills.labels.retailtotal')} value={billTotals.toFormat()} />
<Statistic title={t("bills.labels.retailtotal")} value={billTotals.toFormat()} />
</Tooltip>
<Typography.Title>=</Typography.Title>
<Tooltip
title={
<div
dangerouslySetInnerHTML={{
__html: t('jobs.labels.plitooltips.discrep1'),
__html: t("jobs.labels.plitooltips.discrep1")
}}
/>
}
>
<Statistic
title={t('bills.labels.discrepancy')}
title={t("bills.labels.discrepancy")}
valueStyle={{
color: discrepancy.getAmount() === 0 ? 'green' : 'red',
color: discrepancy.getAmount() === 0 ? "green" : "red"
}}
value={discrepancy.toFormat()}
/>
@@ -176,27 +172,27 @@ export default function JobBillsTotalComponent({
title={
<div
dangerouslySetInnerHTML={{
__html: t('jobs.labels.plitooltips.laboradj'),
__html: t("jobs.labels.plitooltips.laboradj")
}}
/>
}
>
<Statistic title={t('bills.labels.dedfromlbr')} value={lbrAdjustments.toFormat()} />
<Statistic title={t("bills.labels.dedfromlbr")} value={lbrAdjustments.toFormat()} />
</Tooltip>
<Typography.Title>=</Typography.Title>
<Tooltip
title={
<div
dangerouslySetInnerHTML={{
__html: t('jobs.labels.plitooltips.discrep2'),
__html: t("jobs.labels.plitooltips.discrep2")
}}
/>
}
>
<Statistic
title={t('bills.labels.discrepancy')}
title={t("bills.labels.discrepancy")}
valueStyle={{
color: discrepWithLbrAdj.getAmount() === 0 ? 'green' : 'red',
color: discrepWithLbrAdj.getAmount() === 0 ? "green" : "red"
}}
value={discrepWithLbrAdj.toFormat()}
/>
@@ -206,27 +202,27 @@ export default function JobBillsTotalComponent({
title={
<div
dangerouslySetInnerHTML={{
__html: t('jobs.labels.plitooltips.creditmemos'),
__html: t("jobs.labels.plitooltips.creditmemos")
}}
/>
}
>
<Statistic title={t('bills.labels.totalreturns')} value={totalReturns.toFormat()} />
<Statistic title={t("bills.labels.totalreturns")} value={totalReturns.toFormat()} />
</Tooltip>
<Typography.Title>=</Typography.Title>
<Tooltip
title={
<div
dangerouslySetInnerHTML={{
__html: t('jobs.labels.plitooltips.discrep3'),
__html: t("jobs.labels.plitooltips.discrep3")
}}
/>
}
>
<Statistic
title={t('bills.labels.discrepancy')}
title={t("bills.labels.discrepancy")}
valueStyle={{
color: discrepWithCms.getAmount() === 0 ? 'green' : 'red',
color: discrepWithCms.getAmount() === 0 ? "green" : "red"
}}
value={discrepWithCms.toFormat()}
/>
@@ -238,40 +234,40 @@ export default function JobBillsTotalComponent({
discrepWithLbrAdj.getAmount() !== 0 ||
discrepancy.getAmount() !== 0) && (
<Alert
style={{ margin: '8px 0px' }}
style={{ margin: "8px 0px" }}
type="warning"
message={t('jobs.labels.outstanding_reconciliation_discrep')}
message={t("jobs.labels.outstanding_reconciliation_discrep")}
/>
)}
</Card>
</Col>
<Col md={24} lg={6}>
<Card title={t('jobs.labels.returntotals')} style={{ height: '100%' }}>
<Card title={t("jobs.labels.returntotals")} style={{ height: "100%" }}>
<Space wrap>
<Tooltip
title={
<div
dangerouslySetInnerHTML={{
__html: t('jobs.labels.plitooltips.totalreturns'),
__html: t("jobs.labels.plitooltips.totalreturns")
}}
/>
}
>
<Statistic title={t('bills.labels.totalreturns')} value={totalReturns.toFormat()} />
<Statistic title={t("bills.labels.totalreturns")} value={totalReturns.toFormat()} />
</Tooltip>
<Tooltip
title={
<div
dangerouslySetInnerHTML={{
__html: t('jobs.labels.plitooltips.calculatedcreditsnotreceived'),
__html: t("jobs.labels.plitooltips.calculatedcreditsnotreceived")
}}
/>
}
>
<Statistic
title={t('bills.labels.calculatedcreditsnotreceived')}
title={t("bills.labels.calculatedcreditsnotreceived")}
valueStyle={{
color: calculatedCreditsNotReceived.getAmount() <= 0 ? 'green' : 'red',
color: calculatedCreditsNotReceived.getAmount() <= 0 ? "green" : "red"
}}
value={
calculatedCreditsNotReceived.getAmount() >= 0
@@ -284,15 +280,15 @@ export default function JobBillsTotalComponent({
title={
<div
dangerouslySetInnerHTML={{
__html: t('jobs.labels.plitooltips.creditsnotreceived'),
__html: t("jobs.labels.plitooltips.creditsnotreceived")
}}
/>
}
>
<Statistic
title={t('bills.labels.creditsnotreceived')}
title={t("bills.labels.creditsnotreceived")}
valueStyle={{
color: totalReturnsMarkedNotReceived.getAmount() <= 0 ? 'green' : 'red',
color: totalReturnsMarkedNotReceived.getAmount() <= 0 ? "green" : "red"
}}
value={
totalReturnsMarkedNotReceived.getAmount() >= 0
@@ -303,11 +299,7 @@ export default function JobBillsTotalComponent({
</Tooltip>
</Space>
{showWarning && calculatedCreditsNotReceived.getAmount() > 0 && (
<Alert
style={{ margin: '8px 0px' }}
type="warning"
message={t('jobs.labels.outstanding_credit_memos')}
/>
<Alert style={{ margin: "8px 0px" }} type="warning" message={t("jobs.labels.outstanding_credit_memos")} />
)}
</Card>
</Col>

View File

@@ -1,20 +1,20 @@
import React from 'react';
import React from "react";
import { useQuery } from '@apollo/client';
import { useSplitTreatments } from '@splitsoftware/splitio-react';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { GET_LINE_TICKET_BY_PK } from '../../graphql/jobs-lines.queries';
import { selectJobReadOnly } from '../../redux/application/application.selectors';
import { selectBodyshop } from '../../redux/user/user.selectors';
import AlertComponent from '../alert/alert.component';
import LaborAllocationsTableComponent from '../labor-allocations-table/labor-allocations-table.component';
import PayrollLaborAllocationsTable from '../labor-allocations-table/labor-allocations-table.payroll.component';
import LoadingSkeleton from '../loading-skeleton/loading-skeleton.component';
import { useQuery } from "@apollo/client";
import { useSplitTreatments } from "@splitsoftware/splitio-react";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { GET_LINE_TICKET_BY_PK } from "../../graphql/jobs-lines.queries";
import { selectJobReadOnly } from "../../redux/application/application.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import AlertComponent from "../alert/alert.component";
import LaborAllocationsTableComponent from "../labor-allocations-table/labor-allocations-table.component";
import PayrollLaborAllocationsTable from "../labor-allocations-table/labor-allocations-table.payroll.component";
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
bodyshop: selectBodyshop,
jobRO: selectJobReadOnly,
jobRO: selectJobReadOnly
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
@@ -24,21 +24,21 @@ export default connect(mapStateToProps, mapDispatchToProps)(JobCloseRoGuardLabor
export function JobCloseRoGuardLabor({ job, jobRO, bodyshop, form, warningCallback }) {
const { loading, error, data, refetch } = useQuery(GET_LINE_TICKET_BY_PK, {
variables: { id: job.id },
fetchPolicy: 'network-only',
nextFetchPolicy: 'network-only',
fetchPolicy: "network-only",
nextFetchPolicy: "network-only"
});
const {
treatments: { Enhanced_Payroll },
treatments: { Enhanced_Payroll }
} = useSplitTreatments({
attributes: {},
names: ['Enhanced_Payroll'],
splitKey: bodyshop.imexshopid,
names: ["Enhanced_Payroll"],
splitKey: bodyshop.imexshopid
});
if (loading) return <LoadingSkeleton />;
if (error) return <AlertComponent message={error.message} type="error" />;
return Enhanced_Payroll.treatment === 'on' ? (
return Enhanced_Payroll.treatment === "on" ? (
<PayrollLaborAllocationsTable
jobId={job.id}
timetickets={data ? data.timetickets : []}

View File

@@ -1,19 +1,19 @@
import React, { useEffect } from 'react';
import React, { useEffect } from "react";
import { Alert, Card } from 'antd';
import { useTranslation } from 'react-i18next';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { selectJobReadOnly } from '../../redux/application/application.selectors';
import { selectBodyshop } from '../../redux/user/user.selectors';
import { useMemo } from 'react';
import Dinero from 'dinero.js';
import DataLabel from '../data-label/data-label.component';
import { Alert, Card } from "antd";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectJobReadOnly } from "../../redux/application/application.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import { useMemo } from "react";
import Dinero from "dinero.js";
import DataLabel from "../data-label/data-label.component";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
bodyshop: selectBodyshop,
jobRO: selectJobReadOnly,
jobRO: selectJobReadOnly
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
@@ -41,25 +41,21 @@ export function JobCloseRoGuardProfit({ job, jobRO, bodyshop, form, warningCallb
useEffect(() => {
if (balance.getAmount() !== 0) {
warningCallback({ key: 'ar', warning: t('jobs.labels.outstanding_ar') });
warningCallback({ key: "ar", warning: t("jobs.labels.outstanding_ar") });
}
}, [balance, t, warningCallback]);
return (
<Card title={t('jobs.labels.accountsreceivable')} style={{ height: '100%' }}>
<DataLabel label={t('payments.labels.totalpayments')}>{total.toFormat()}</DataLabel>
<Card title={t("jobs.labels.accountsreceivable")} style={{ height: "100%" }}>
<DataLabel label={t("payments.labels.totalpayments")}>{total.toFormat()}</DataLabel>
<DataLabel
valueStyle={{ color: balance.getAmount() !== 0 ? 'red' : 'green' }}
label={t('payments.labels.balance')}
valueStyle={{ color: balance.getAmount() !== 0 ? "red" : "green" }}
label={t("payments.labels.balance")}
>
{balance.toFormat()}
</DataLabel>
{balance.getAmount() !== 0 && (
<Alert
style={{ margin: '8px 0px' }}
type="warning"
message={t('jobs.labels.outstanding_ar')}
/>
<Alert style={{ margin: "8px 0px" }} type="warning" message={t("jobs.labels.outstanding_ar")} />
)}
</Card>
);

View File

@@ -1,17 +1,17 @@
import React from 'react';
import React from "react";
import { useQuery } from '@apollo/client';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { QUERY_BILLS_BY_JOBID } from '../../graphql/bills.queries';
import { selectJobReadOnly } from '../../redux/application/application.selectors';
import { selectBodyshop } from '../../redux/user/user.selectors';
import AlertComponent from '../alert/alert.component';
import JobBillsTotalComponent from '../job-bills-total/job-bills-total.component';
import { useQuery } from "@apollo/client";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { QUERY_BILLS_BY_JOBID } from "../../graphql/bills.queries";
import { selectJobReadOnly } from "../../redux/application/application.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import AlertComponent from "../alert/alert.component";
import JobBillsTotalComponent from "../job-bills-total/job-bills-total.component";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
bodyshop: selectBodyshop,
jobRO: selectJobReadOnly,
jobRO: selectJobReadOnly
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
@@ -21,8 +21,8 @@ export default connect(mapStateToProps, mapDispatchToProps)(JobCloseRoGuardBills
export function JobCloseRoGuardBills({ job, jobRO, bodyshop, form, warningCallback }) {
const { loading, error, data } = useQuery(QUERY_BILLS_BY_JOBID, {
variables: { jobid: job.id },
fetchPolicy: 'network-only',
nextFetchPolicy: 'network-only',
fetchPolicy: "network-only",
nextFetchPolicy: "network-only"
});
if (error) return <AlertComponent message={error.message} type="error" />;

View File

@@ -76,20 +76,21 @@ export function JobCloseRoGuardContainer({ job, jobRO, bodyshop, form }) {
<Col className="ro-guard-col-multiple" md={24} lg={6}>
<Row gutter={[32, 32]} style={{ height: "100%" }}>
<Col span={24}>
<JobCloseRoGuardProfit
job={job}
form={form} //warningCallback={warningCallback}
/>
<JobCloseRoGuardProfit job={job} form={form} warningCallback={warningCallback} />
</Col>
<Col span={24}>
<JobCloseRoGuardAr job={job} form={form} warningCallback={warningCallback} />
</Col>
</Row>
</Col>
<Col className="ro-guard-col-50" md={24} lg={8}>
<JobCloseRoGuardSublet job={job} warningCallback={warningCallback} />
{InstanceRenderManager({ rome: <JobCloseRoGuardPpd job={job} warningCallback={warningCallback} /> })}
</Col>
{InstanceRenderManager({
rome: (
<Col md={24} lg={8}>
{/* <JobCloseRoGuardSublet job={job} warningCallback={warningCallback} /> */}
<JobCloseRoGuardPpd job={job} warningCallback={warningCallback} />
</Col>
)
})}
<Col className="ro-guard-col" md={24} lg={10}>
<JobCloseRoGuardLabor job={job} form={form} warningCallback={warningCallback} />
</Col>

View File

@@ -1,20 +1,19 @@
import React, { useEffect, useState } from 'react';
import React, { useEffect, useState } from "react";
import { LockOutlined } from '@ant-design/icons';
import { Card, Form, Input } from 'antd';
import axios from 'axios';
import { useTranslation } from 'react-i18next';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { selectJobReadOnly } from '../../redux/application/application.selectors';
import { selectBodyshop } from '../../redux/user/user.selectors';
import JobCostingStatistics from '../job-costing-statistics/job-costing-statistics.component';
import LoadingSkeleton from '../loading-skeleton/loading-skeleton.component';
import { Alert, Card } from "antd";
import axios from "axios";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectJobReadOnly } from "../../redux/application/application.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import JobCostingStatistics from "../job-costing-statistics/job-costing-statistics.component";
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
bodyshop: selectBodyshop,
jobRO: selectJobReadOnly,
jobRO: selectJobReadOnly
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
@@ -31,7 +30,7 @@ export function JobCloseRoGuardProfit({ job, jobRO, bodyshop, form, warningCallb
try {
if (job.id) {
setLoading(true);
const { data } = await axios.post('/job/costing', { jobid: job.id });
const { data } = await axios.post("/job/costing", { jobid: job.id });
setCostingData(data);
}
} catch (error) {}
@@ -45,16 +44,19 @@ export function JobCloseRoGuardProfit({ job, jobRO, bodyshop, form, warningCallb
parseFloat(costingData?.summaryData.gppercent) < bodyshop?.md_ro_guard?.totalgppercent_minimum;
useEffect(() => {
if (enforceProfitPassword && typeof warningCallback === 'function') {
warningCallback({ key: 'profit', warning: t('jobs.labels.profitbypassrequired') });
if (enforceProfitPassword && typeof warningCallback === "function") {
warningCallback({ key: "profit", warning: t("jobs.labels.profitbypassrequired") });
}
}, [enforceProfitPassword, t, warningCallback]);
if (loading || !costingData) return <LoadingSkeleton />;
return (
<Card title={t('jobs.labels.profits')} style={{ height: '100%' }}>
<Card title={t("jobs.labels.profits")} style={{ height: "100%" }}>
<JobCostingStatistics summaryData={costingData?.summaryData} onlyGP />
{enforceProfitPassword && (
<Alert style={{ margin: "8px 0px" }} type="warning" message={t("jobs.labels.profitbypassrequired")} />
)}
</Card>
);
}

View File

@@ -1,17 +1,17 @@
import React, { useEffect } from 'react';
import React, { useEffect } from "react";
import { Alert, Card, Table } from 'antd';
import { t } from 'i18next';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { selectJobReadOnly } from '../../redux/application/application.selectors';
import { selectBodyshop } from '../../redux/user/user.selectors';
import CurrencyFormatter from '../../utils/CurrencyFormatter';
import { alphaSort } from '../../utils/sorters';
import { Alert, Card, Table } from "antd";
import { t } from "i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectJobReadOnly } from "../../redux/application/application.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
import { alphaSort } from "../../utils/sorters";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
bodyshop: selectBodyshop,
jobRO: selectJobReadOnly,
jobRO: selectJobReadOnly
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
@@ -20,69 +20,56 @@ export default connect(mapStateToProps, mapDispatchToProps)(JobCloseRGuardSublet
export function JobCloseRGuardSublet({ job, jobRO, bodyshop, form, warningCallback }) {
const subletsNotDone = job?.joblines.filter(
(j) =>
(j.part_type === 'PAS' || j.part_type === 'PASL') &&
(!j.sublet_completed || !j.sublet_ignored)
(j) => (j.part_type === "PAS" || j.part_type === "PASL") && (!j.sublet_completed || !j.sublet_ignored)
);
const columns = [
{
title: t('joblines.fields.line_desc'),
dataIndex: 'line_desc',
fixed: 'left',
key: 'line_desc',
title: t("joblines.fields.line_desc"),
dataIndex: "line_desc",
fixed: "left",
key: "line_desc",
sorter: (a, b) => alphaSort(a.line_desc, b.line_desc),
onCell: (record) => ({
className: record.manual_line && 'job-line-manual',
className: record.manual_line && "job-line-manual",
style: {
...(record.critical ? { boxShadow: ' -.5em 0 0 #FFC107' } : {}),
},
...(record.critical ? { boxShadow: " -.5em 0 0 #FFC107" } : {})
}
}),
ellipsis: true,
ellipsis: true
},
{
title: t('joblines.fields.act_price'),
dataIndex: 'act_price',
key: 'act_price',
title: t("joblines.fields.act_price"),
dataIndex: "act_price",
key: "act_price",
sorter: (a, b) => a.act_price - b.act_price,
ellipsis: true,
render: (text, record) => <CurrencyFormatter>{record.act_price}</CurrencyFormatter>,
render: (text, record) => <CurrencyFormatter>{record.act_price}</CurrencyFormatter>
},
{
title: t('joblines.fields.part_qty'),
dataIndex: 'part_qty',
key: 'part_qty',
title: t("joblines.fields.part_qty"),
dataIndex: "part_qty",
key: "part_qty"
},
{
title: t('joblines.fields.notes'),
dataIndex: 'notes',
key: 'notes',
},
title: t("joblines.fields.notes"),
dataIndex: "notes",
key: "notes"
}
];
useEffect(() => {
if (subletsNotDone.length > 0) {
warningCallback({ key: 'sublet', warning: t('jobs.labels.outstanding_sublets') });
warningCallback({ key: "sublet", warning: t("jobs.labels.outstanding_sublets") });
}
}, [subletsNotDone.length, warningCallback]);
return (
<Card title={t('jobs.labels.subletsnotcompleted')}>
<Table
dataSource={subletsNotDone}
columns={columns}
pagination={false}
rowKey="id"
bordered
size="small"
/>
<Card title={t("jobs.labels.subletsnotcompleted")}>
<Table dataSource={subletsNotDone} columns={columns} pagination={false} rowKey="id" bordered size="small" />
{subletsNotDone.length > 0 && (
<Alert
style={{ margin: '8px 0px' }}
type="warning"
message={t('jobs.labels.outstanding_sublets')}
/>
<Alert style={{ margin: "8px 0px" }} type="warning" message={t("jobs.labels.outstanding_sublets")} />
)}
</Card>
);

View File

@@ -1,14 +1,14 @@
import React from 'react';
import React from "react";
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { selectJobReadOnly } from '../../redux/application/application.selectors';
import { selectBodyshop } from '../../redux/user/user.selectors';
import JobLifecycleComponent from '../job-lifecycle/job-lifecycle.component';
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectJobReadOnly } from "../../redux/application/application.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import JobLifecycleComponent from "../job-lifecycle/job-lifecycle.component";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
bodyshop: selectBodyshop,
jobRO: selectJobReadOnly,
jobRO: selectJobReadOnly
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))

View File

@@ -1,5 +1,5 @@
import { useQuery } from "@apollo/client";
import { Col, Divider, Row, Skeleton, Space, Timeline, Typography } from "antd";
import { Col, Row, Skeleton, Space, Timeline, Typography } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
@@ -43,13 +43,25 @@ export function JobLinesExpander({ jobline, jobid, bodyshop }) {
? data.parts_order_lines.map((line) => ({
key: line.id,
children: (
<Space split={<Divider type="vertical" />} wrap>
<Link to={`/manage/jobs/${jobid}?partsorderid=${line.parts_order.id}`}>
{line.parts_order.order_number}
</Link>
<DateFormatter>{line.parts_order.order_date}</DateFormatter>
{line.parts_order.vendor.name}
</Space>
<Row wrap>
<Col span={4}>
<Link to={`/manage/jobs/${jobid}?partsorderid=${line.parts_order.id}`}>
{line.parts_order.order_number}
</Link>
</Col>
<Col span={4}>
<DateFormatter>{line.parts_order.order_date}</DateFormatter>
</Col>
<Col span={4}>{line.parts_order.vendor.name}</Col>
{line.backordered_eta ? (
<Col span={4}>
<span>
{`${t("parts_orders.fields.backordered_eta")}: `}
<DateFormatter>{line.backordered_eta}</DateFormatter>
</span>
</Col>
) : null}
</Row>
)
}))
: [
@@ -61,6 +73,37 @@ export function JobLinesExpander({ jobline, jobid, bodyshop }) {
}
/>{" "}
</Col>
<Col md={24} lg={8}>
<Typography.Title level={4}>{t("parts_dispatch.labels.parts_dispatch")}</Typography.Title>
<Timeline
items={
data.parts_dispatch_lines.length > 0
? data.parts_dispatch_lines.map((line) => ({
key: line.id,
children: (
<Row>
<Col span={8}>
<Link to={`/manage/jobs/${jobid}?partsorderid=${line.id}`}>{line.parts_dispatch.number}</Link>
</Col>
<Col span={8}>
{bodyshop.employees.find((e) => e.id === line.parts_dispatch.employeeid)?.first_name}
</Col>
<Col span={8}>
<Space>
{t("parts_dispatch_lines.fields.accepted_at")}
<DateFormatter>{line.accepted_at}</DateFormatter>
</Space>
</Col>
</Row>
)
}))
: {
key: "dispatch-lines",
children: t("parts_orders.labels.notyetordered")
}
}
/>
</Col>
<Col md={24} lg={8}>
<Typography.Title level={4}>{t("bills.labels.bills")}</Typography.Title>
<Timeline
@@ -103,31 +146,6 @@ export function JobLinesExpander({ jobline, jobid, bodyshop }) {
}
/>
</Col>
<Col md={24} lg={8}>
<Typography.Title level={4}>{t("parts_dispatch.labels.parts_dispatch")}</Typography.Title>
<Timeline
items={
data.parts_dispatch_lines.length > 0
? data.parts_dispatch_lines.map((line) => ({
key: line.id,
children: (
<Space split={<Divider type="vertical" />} wrap>
<Link to={`/manage/jobs/${jobid}?partsorderid=${line.id}`}>{line.parts_dispatch.number}</Link>
{bodyshop.employees.find((e) => e.id === line.parts_dispatch.employeeid)?.first_name}
<Space>
{t("parts_dispatch_lines.fields.accepted_at")}
<DateFormatter>{line.accepted_at}</DateFormatter>
</Space>
</Space>
)
}))
: {
key: "dispatch-lines",
children: t("parts_orders.labels.notyetordered")
}
}
/>
</Col>
</Row>
);
}

View File

@@ -1,3 +1,4 @@
import { LoadingOutlined } from "@ant-design/icons";
import { useLazyQuery } from "@apollo/client";
import { Select, Space, Spin, Tag } from "antd";
import _ from "lodash";
@@ -6,8 +7,6 @@ import { useTranslation } from "react-i18next";
import { SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE, SEARCH_JOBS_FOR_AUTOCOMPLETE } from "../../graphql/jobs.queries";
import AlertComponent from "../alert/alert.component";
import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component";
import { SearchOutlined } from "@ant-design/icons";
import { LoadingOutlined } from "@ant-design/icons";
const { Option } = Select;
@@ -19,9 +18,14 @@ const JobSearchSelect = (
const [theOptions, setTheOptions] = useState([]);
const [callSearch, { loading, error, data }] = useLazyQuery(SEARCH_JOBS_FOR_AUTOCOMPLETE, {});
const [callIdSearch, { loading: idLoading, error: idError, data: idData }] = useLazyQuery(
SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE
);
const [
callIdSearch,
{
//loading: idLoading,
error: idError,
data: idData
}
] = useLazyQuery(SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE);
const executeSearch = (v) => {
if (v && v.variables?.search !== "" && v.variables.search.length >= 2) callSearch(v);
@@ -86,9 +90,9 @@ const JobSearchSelect = (
<span>
{`${clm_no && o.clm_no ? `${o.clm_no} | ` : ""}${
o.ro_number || t("general.labels.na")
} | ${OwnerNameDisplayFunction(o)} | ${
o.v_model_yr || ""
} ${o.v_make_desc || ""} ${o.v_model_desc || ""}`}
} | ${OwnerNameDisplayFunction(o)} | ${o.v_model_yr || ""} ${o.v_make_desc || ""} ${
o.v_model_desc || ""
}`}
</span>
<Tag>
<strong>{o.status}</strong>

View File

@@ -15,23 +15,43 @@ export const GetSupplementDelta = async (client, jobId, newLines) => {
const linesToUpdate = [];
newLines.forEach((newLine) => {
const matchingIndex = existingLines.findIndex((eL) => eL.unq_seq === newLine.unq_seq);
const matchingIndexLines = [];
existingLines.forEach((eL, index) => {
if (eL.unq_seq === newLine.unq_seq) {
matchingIndexLines.push({ index, record: eL });
}
});
//Should do a check to make sure there is only 1 matching unq sequence number.
if (matchingIndex >= 0) {
//Found a relevant matching line. Add it to lines to update.
linesToUpdate.push({
id: existingLines[matchingIndex].id,
newData: { ...newLine, removed: false, act_price_before_ppc: null }
});
//Splice out item we found for performance.
existingLines.splice(matchingIndex, 1);
} else {
if (matchingIndexLines.length === 0) {
//Didn't find a match. Must be a new line.
linesToInsert.push(newLine);
}
//If we find only 1, we can use the old logic.
else if (matchingIndexLines.length === 1) {
//Found a relevant matching line. Add it to lines to update.
linesToUpdate.push({
id: matchingIndexLines[0].record.id,
newData: { ...newLine, removed: false, act_price_before_ppc: null }
});
//Splice out item we found for performance.
existingLines.splice(matchingIndexLines[0].index, 1);
} else if (matchingIndexLines.length === 2) {
//if we find 2, we need to separate it out by the non-refinish lines and splice one out.
//Find the mathcing one depending on whether this is the refiniish one or not.
const matchingLine = matchingIndexLines.find((i) =>
newLine.mod_lbr_ty === "LAR" ? i.record.mod_lbr_ty === "LAR" : i.record.mod_lbr_ty !== "LAR"
);
linesToUpdate.push({
id: matchingLine.record.id,
newData: { ...newLine, removed: false, act_price_before_ppc: null }
});
//Splice out item we found for performance.
existingLines.splice(matchingLine.index, 1);
} else {
//We found more than 2 matching lines. We should never get here. Throw a warning and back out!
throw new Error("Too many matching lines found. Ensure EMS file is valid.");
}
});
//Wahtever is left in the existing lines, are lines that should be removed.

View File

@@ -237,7 +237,7 @@ export function JobsAvailableContainer({ bodyshop, currentUser, insertAuditTrail
executeFunction: true,
rome: ResolveCCCLineIssues,
promanager: ResolveCCCLineIssues,
args: [(supp, bodyshop)]
args: [supp, bodyshop]
});
await InstanceRenderManager({
@@ -608,13 +608,12 @@ function ResolveCCCLineIssues(estData, bodyshop) {
//Web Est seems to have additional costs with UNQ_SEQ 0. Keep them all?
if (line.unq_seq === 0) return;
if (index0ActPrice !== line.act_price) {
line.notes += ` | Price override.`;
// line.notes += ` | Price override.`;
return;
}
const indexInEstData = estData.joblines.data.findIndex((l) => l.unq_seq === line.unq_seq);
estData.joblines.data[
indexInEstData
].notes += ` | Scrubbed due to the line_ref issue. (prev act price = ${estData.joblines.data[indexInEstData].act_price})`;
//estData.joblines.data[indexInEstData].notes +=
// ` | Act Price delete. (prev act price = ${estData.joblines.data[indexInEstData].act_price})`;
estData.joblines.data[indexInEstData].act_price = 0;
estData.joblines.data[indexInEstData].db_price = 0;
});

View File

@@ -182,7 +182,7 @@ export function PartsOrderModalComponent({ bodyshop, vendorList, sendTypeState,
}
]}
>
<InputNumber />
<InputNumber min={1} />
</Form.Item>
<Form.Item
label={t("parts_orders.fields.act_price")}

View File

@@ -7,8 +7,8 @@ import { createStructuredSelector } from "reselect";
import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
import { UPDATE_PAYMENT } from "../../graphql/payments.queries";
import { setModalContext } from "../../redux/modals/modals.actions";
import { selectCurrentUser } from "../../redux/user/user.selectors";
import { selectPayment } from "../../redux/modals/modals.selectors";
import { selectCurrentUser } from "../../redux/user/user.selectors";
const mapStateToProps = createStructuredSelector({
currentUser: selectCurrentUser,
@@ -58,8 +58,10 @@ const PaymentMarkForExportButton = ({ bodyshop, payment, refetch, setPaymentCont
refetch
},
context: {
...paymentModal.context,
...paymentModal.context,
...payment,
smartRefetch: true,
exportedat: today
}
});

View File

@@ -1,32 +1,30 @@
import { useMutation } from "@apollo/client";
import { Button, Form, Modal, notification, Space } from "antd";
import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { INSERT_NEW_PAYMENT, UPDATE_PAYMENT } from "../../graphql/payments.queries";
import { setEmailOptions } from "../../redux/email/email.actions";
import { toggleModalVisible } from "../../redux/modals/modals.actions";
import { selectPayment } from "../../redux/modals/modals.selectors";
import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors";
import { GenerateDocument } from "../../utils/RenderTemplate";
import { TemplateList } from "../../utils/TemplateConstants";
import {useMutation} from "@apollo/client";
import {Button, Form, Modal, notification, Space} from "antd";
import React, {useEffect, useState} from "react";
import {useTranslation} from "react-i18next";
import {connect} from "react-redux";
import {createStructuredSelector} from "reselect";
import {INSERT_NEW_PAYMENT, UPDATE_PAYMENT} from "../../graphql/payments.queries";
import {toggleModalVisible} from "../../redux/modals/modals.actions";
import {selectPayment} from "../../redux/modals/modals.selectors";
import {selectBodyshop} from "../../redux/user/user.selectors";
import {GenerateDocument} from "../../utils/RenderTemplate";
import {TemplateList} from "../../utils/TemplateConstants";
import PaymentForm from "../payment-form/payment-form.component";
import PaymentMarkForExportButton from "../payment-mark-export-button/payment-mark-export-button-component";
import PaymentMarkForExportButton
from "../payment-mark-export-button/payment-mark-export-button-component";
import PaymentReexportButton from "../payment-reexport-button/payment-reexport-button.component";
const mapStateToProps = createStructuredSelector({
paymentModal: selectPayment,
bodyshop: selectBodyshop,
currentUser: selectCurrentUser
});
const mapDispatchToProps = (dispatch) => ({
setEmailOptions: (e) => dispatch(setEmailOptions(e)),
toggleModalVisible: () => dispatch(toggleModalVisible("payment"))
});
function PaymentModalContainer({ paymentModal, toggleModalVisible, bodyshop, currentUser, setEmailOptions }) {
function PaymentModalContainer({paymentModal, toggleModalVisible, bodyshop }) {
const [form] = Form.useForm();
const [enterAgain, setEnterAgain] = useState(false);
const [insertPayment] = useMutation(INSERT_NEW_PAYMENT);
@@ -34,7 +32,6 @@ function PaymentModalContainer({ paymentModal, toggleModalVisible, bodyshop, cur
const { t } = useTranslation();
const { context, actions, open } = paymentModal;
const [loading, setLoading] = useState(false);
const handleFinish = async (values) => {
@@ -84,9 +81,9 @@ function PaymentModalContainer({ paymentModal, toggleModalVisible, bodyshop, cur
});
if (!!!updatedPayment.errors) {
notification["success"]({ message: t("payments.successes.payment") });
notification["success"]({ message: t("payments.successes.paymentupdate") });
} else {
notification["error"]({ message: t("payments.errors.payment") });
notification["error"]({ message: t("payments.errors.paymentupdate") });
}
}

View File

@@ -3,10 +3,10 @@ import { Button, notification } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { UPDATE_PAYMENT } from "../../graphql/payments.queries";
import { setModalContext } from "../../redux/modals/modals.actions";
import { selectPayment } from "../../redux/modals/modals.selectors";
import { createStructuredSelector } from "reselect";
const mapStateToProps = createStructuredSelector({
paymentModal: selectPayment
@@ -40,6 +40,7 @@ const PaymentReexportButton = ({ paymentModal, payment, refetch, setPaymentConte
refetch
},
context: {
...paymentModal.context,
...paymentModal.context,
...payment,
exportedat: null

View File

@@ -14,11 +14,11 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
import { DateFormatter, DateTimeFormatter } from "../../utils/DateFormatter";
import { TemplateList } from "../../utils/TemplateConstants";
import { pageLimit } from "../../utils/config";
import { alphaSort } from "../../utils/sorters";
import CaBcEtfTableModalContainer from "../ca-bc-etf-table-modal/ca-bc-etf-table-modal.container";
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
import PrintWrapperComponent from "../print-wrapper/print-wrapper.component";
import { pageLimit } from "../../utils/config";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser

View File

@@ -1,4 +1,13 @@
import { Button, Card, Form, InputNumber, notification, Popover, Radio } from "antd";
import {
Button,
Card,
Form,
InputNumber,
notification,
Popover,
Radio,
Space,
} from "antd";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
@@ -95,10 +104,16 @@ export function PrintCenterJobsLabels({ bodyshop, jobId }) {
>
<InputNumber min={1} precision={0} max={99} />
</Form.Item>
<Button type="primary" loading={loading} onClick={handleOk}>
{t("general.actions.print")}
</Button>
<Button onClick={handleCancel}>{t("general.actions.cancel")}</Button>
<div style={{ display: "flex", justifyContent: "flex-end" }}>
<Space>
<Button type="primary" loading={loading} onClick={handleOk}>
{t("general.actions.print")}
</Button>
<Button onClick={handleCancel}>
{t("general.actions.cancel")}
</Button>
</Space>
</div>
</Form>
</Card>
);

View File

@@ -59,25 +59,33 @@ export function ScheduleCalendarHeaderComponent({
{loadData && loadData.allJobsOut ? (
loadData.allJobsOut.map((j) => (
<tr key={j.id}>
<td>
<Link to={`/manage/jobs/${j.id}`}>{j.ro_number}</Link>
<td style={{ padding: "2.5px" }}>
<Link to={`/manage/jobs/${j.id}`}>{j.ro_number}</Link> (
{j.status})
</td>
<td>
<td style={{ padding: "2.5px" }}>
<OwnerNameDisplay ownerObject={j} />
</td>
<td>
{`(${(j.labhrs.aggregate.sum.mod_lb_hrs + j.larhrs.aggregate.sum.mod_lb_hrs).toFixed(
1
)} ${t("general.labels.hours")})`}
<td style={{ padding: "2.5px" }}>
{`(${j.labhrs?.aggregate?.sum?.mod_lb_hrs?.toFixed(1) || 0}/${
j.larhrs?.aggregate?.sum?.mod_lb_hrs?.toFixed(1) || 0
}/${(
j.labhrs.aggregate?.sum?.mod_lb_hrs +
j.larhrs.aggregate?.sum?.mod_lb_hrs
).toFixed(1)} ${t("general.labels.hours")})`}
</td>
<td>
<DateTimeFormatter>{j.scheduled_completion}</DateTimeFormatter>
<td style={{ padding: "2.5px" }}>
<DateTimeFormatter>
{j.scheduled_completion}
</DateTimeFormatter>
</td>
</tr>
))
) : (
<tr>
<td>{t("appointments.labels.nocompletingjobs")}</td>
<td style={{ padding: "2.5px" }}>
{t("appointments.labels.nocompletingjobs")}
</td>
</tr>
)}
</tbody>
@@ -92,26 +100,30 @@ export function ScheduleCalendarHeaderComponent({
{loadData && loadData.allJobsIn ? (
loadData.allJobsIn.map((j) => (
<tr key={j.id}>
<td>
<td style={{ padding: "2.5px" }}>
<Link to={`/manage/jobs/${j.id}`}>{j.ro_number}</Link>
{j.status}
</td>
<td>
<td style={{ padding: "2.5px" }}>
<OwnerNameDisplay ownerObject={j} />
</td>
<td>
{`(${(j.labhrs.aggregate.sum.mod_lb_hrs + j.larhrs.aggregate.sum.mod_lb_hrs).toFixed(
1
)} ${t("general.labels.hours")})`}
<td style={{ padding: "2.5px" }}>
{`(${j.labhrs?.aggregate?.sum.mod_lb_hrs?.toFixed(1) || 0}/${
j.larhrs?.aggregate?.sum?.mod_lb_hrs?.toFixed(1) || 0
}/${(
j.labhrs?.aggregate?.sum?.mod_lb_hrs +
j.larhrs?.aggregate?.sum?.mod_lb_hrs
).toFixed(1)} ${t("general.labels.hours")})`}
</td>
<td>
<td style={{ padding: "2.5px" }}>
<DateTimeFormatter>{j.scheduled_in}</DateTimeFormatter>
</td>
</tr>
))
) : (
<tr>
<td>{t("appointments.labels.noarrivingjobs")}</td>
<td style={{ padding: "2.5px" }}>
{t("appointments.labels.noarrivingjobs")}
</td>
</tr>
)}
</tbody>
@@ -121,27 +133,33 @@ export function ScheduleCalendarHeaderComponent({
const LoadComponent = loadData ? (
<div>
<Space align="center">
<Popover
placement={"bottom"}
content={jobsInPopup}
trigger="hover"
title={t("appointments.labels.arrivingjobs")}
>
<Icon component={MdFileDownload} style={{ color: "green" }} />
{(loadData.allHoursIn || 0) && loadData.allHoursIn.toFixed(2)}
</Popover>
<Popover
placement={"bottom"}
content={jobsOutPopup}
trigger="hover"
title={t("appointments.labels.completingjobs")}
>
<Icon component={MdFileUpload} style={{ color: "red" }} />
{(loadData.allHoursOut || 0) && loadData.allHoursOut.toFixed(2)}
</Popover>
<ScheduleCalendarHeaderGraph loadData={loadData} />
</Space>
<Space align="center">
<Popover
placement={"bottom"}
content={jobsInPopup}
trigger="hover"
title={t("appointments.labels.arrivingjobs")}
>
<Icon component={MdFileDownload} style={{ color: "green" }} />
{(loadData.allHoursInBody || 0) &&
loadData.allHoursInBody.toFixed(1)}
/
{(loadData.allHoursInRefinish || 0) &&
loadData.allHoursInRefinish.toFixed(1)}
/{(loadData.allHoursIn || 0) && loadData.allHoursIn.toFixed(1)}
</Popover>
<Popover
placement={"bottom"}
content={jobsOutPopup}
trigger="hover"
title={t("appointments.labels.completingjobs")}
>
<Icon component={MdFileUpload} style={{ color: "red" }} />
{(loadData.allHoursOut || 0) && loadData.allHoursOut.toFixed(1)}
</Popover>
<ScheduleCalendarHeaderGraph loadData={loadData} />
</Space>
<div>
<ul style={{ listStyleType: "none", columns: "2 auto", padding: 0 }}>
{Object.keys(ATSToday).map((key, idx) => (

View File

@@ -1,25 +1,25 @@
import { useSplitTreatments } from '@splitsoftware/splitio-react';
import { Button, Card, Tabs } from 'antd';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { selectBodyshop } from '../../redux/user/user.selectors';
import ShopInfoGeneral from './shop-info.general.component';
import ShopInfoIntakeChecklistComponent from './shop-info.intake.component';
import ShopInfoLaborRates from './shop-info.laborrates.component';
import ShopInfoOrderStatusComponent from './shop-info.orderstatus.component';
import ShopInfoPartsScan from './shop-info.parts-scan';
import ShopInfoRbacComponent from './shop-info.rbac.component';
import ShopInfoResponsibilityCenterComponent from './shop-info.responsibilitycenters.component';
import ShopInfoROStatusComponent from './shop-info.rostatus.component';
import ShopInfoSchedulingComponent from './shop-info.scheduling.component';
import ShopInfoSpeedPrint from './shop-info.speedprint.component';
import { useLocation, useNavigate } from 'react-router-dom';
import ShopInfoTaskPresets from './shop-info.task-presets.component';
import queryString from 'query-string';
import InstanceRenderManager from '../../utils/instanceRenderMgr';
import ShopInfoRoGuard from './shop-info.roguard.component';
import { useSplitTreatments } from "@splitsoftware/splitio-react";
import { Button, Card, Tabs } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import ShopInfoGeneral from "./shop-info.general.component";
import ShopInfoIntakeChecklistComponent from "./shop-info.intake.component";
import ShopInfoLaborRates from "./shop-info.laborrates.component";
import ShopInfoOrderStatusComponent from "./shop-info.orderstatus.component";
import ShopInfoPartsScan from "./shop-info.parts-scan";
import ShopInfoRbacComponent from "./shop-info.rbac.component";
import ShopInfoResponsibilityCenterComponent from "./shop-info.responsibilitycenters.component";
import ShopInfoROStatusComponent from "./shop-info.rostatus.component";
import ShopInfoSchedulingComponent from "./shop-info.scheduling.component";
import ShopInfoSpeedPrint from "./shop-info.speedprint.component";
import { useLocation, useNavigate } from "react-router-dom";
import ShopInfoTaskPresets from "./shop-info.task-presets.component";
import queryString from "query-string";
import InstanceRenderManager from "../../utils/instanceRenderMgr";
import ShopInfoRoGuard from "./shop-info.roguard.component";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop
@@ -47,44 +47,52 @@ export function ShopInfoComponent({ bodyshop, form, saveLoading }) {
{
key: "general",
label: t("bodyshop.labels.shopinfo"),
children: <ShopInfoGeneral form={form} />
children: <ShopInfoGeneral form={form} />,
id: "tab-shop-general"
},
{
key: "speedprint",
label: t("bodyshop.labels.speedprint"),
children: <ShopInfoSpeedPrint form={form} />
children: <ShopInfoSpeedPrint form={form} />,
id: "tab-shop-speedprint"
},
{
key: "rbac",
label: t("bodyshop.labels.rbac"),
children: <ShopInfoRbacComponent form={form} />
children: <ShopInfoRbacComponent form={form} />,
id: "tab-shop-rbac"
},
{
key: "roStatus",
label: t("bodyshop.labels.jobstatuses"),
children: <ShopInfoROStatusComponent form={form} />
children: <ShopInfoROStatusComponent form={form} />,
id: "tab-shop-rostatus"
},
{
key: "scheduling",
label: t("bodyshop.labels.scheduling"),
children: <ShopInfoSchedulingComponent form={form} />
children: <ShopInfoSchedulingComponent form={form} />,
id: "tab-shop-scheduling"
},
{
key: "orderStatus",
label: t("bodyshop.labels.orderstatuses"),
children: <ShopInfoOrderStatusComponent form={form} />
children: <ShopInfoOrderStatusComponent form={form} />,
id: "tab-shop-orderstatus"
},
{
key: "responsibilityCenters",
label: t("bodyshop.labels.responsibilitycenters.title"),
children: <ShopInfoResponsibilityCenterComponent form={form} />
children: <ShopInfoResponsibilityCenterComponent form={form} />,
id: "tab-shop-responsibilitycenters"
},
...InstanceRenderManager({
imex: [
{
key: "checklists",
label: t("bodyshop.labels.checklists"),
children: <ShopInfoIntakeChecklistComponent form={form} />
children: <ShopInfoIntakeChecklistComponent form={form} />,
id: "tab-shop-checklists"
}
],
rome: "USE_IMEX",
@@ -93,14 +101,16 @@ export function ShopInfoComponent({ bodyshop, form, saveLoading }) {
{
key: "laborrates",
label: t("bodyshop.labels.laborrates"),
children: <ShopInfoLaborRates form={form} />
children: <ShopInfoLaborRates form={form} />,
id: "tab-shop-laborrates"
},
...(CriticalPartsScanning.treatment === "on"
? [
{
key: "partsscan",
label: t("bodyshop.labels.partsscan"),
children: <ShopInfoPartsScan form={form} />
children: <ShopInfoPartsScan form={form} />,
id: "tab-shop-partsscan"
}
]
: []),
@@ -109,21 +119,23 @@ export function ShopInfoComponent({ bodyshop, form, saveLoading }) {
{
key: "task-presets",
label: t("bodyshop.labels.task-presets"),
children: <ShopInfoTaskPresets form={form} />
children: <ShopInfoTaskPresets form={form} />,
id: "tab-shop-task-presets"
}
]
: []),
...InstanceRenderManager({
imex: [
{
key: 'roguard',
label: t('bodyshop.labels.roguard.title'),
children: <ShopInfoRoGuard form={form} />,
},
],
rome: 'USE_IMEX',
promanager: [],
}),
...InstanceRenderManager({
imex: [
{
key: "roguard",
label: t("bodyshop.labels.roguard.title"),
children: <ShopInfoRoGuard form={form} />,
id: "tab-shop-roguard"
}
],
rome: "USE_IMEX",
promanager: []
})
];
return (
<Card

View File

@@ -219,6 +219,12 @@ export const UPDATE_JOB_LINE = gql`
id
notes
mod_lbr_ty
mod_lb_hrs
part_type
op_code_desc
prt_dsmk_m
prt_dsmk_p
tax_part
part_qty
db_price
act_price

View File

@@ -2238,6 +2238,8 @@ export const GET_JOB_LINE_ORDERS = gql`
parts_order_lines(where: { job_line_id: { _eq: $joblineid } }) {
id
act_price
backordered_eta
backordered_on
parts_order {
id
order_date

View File

@@ -41,7 +41,7 @@ import { insertAuditTrail } from "../../redux/application/application.actions";
import { selectJobReadOnly } from "../../redux/application/application.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import AuditTrailMapping from "../../utils/AuditTrailMappings";
import JobCloseRoGuardContainer from '../../components/job-close-ro-guard/job-close-ro-guard.container';
import JobCloseRoGuardContainer from "../../components/job-close-ro-guard/job-close-ro-guard.container";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -120,6 +120,13 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail }) {
operation: AuditTrailMapping.jobinvoiced(),
type: "jobinvoiced"
});
if (values.masterbypass) {
insertAuditTrail({
jobid: job.id,
operation: AuditTrailMapping.jobclosedwithbypass(),
type: "jobclosedwithbypass"
});
}
// history(`/manage/jobs/${job.id}`);
} else {
setLoading(false);
@@ -184,7 +191,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail }) {
</Space>
}
/>
<JobCloseRoGuardContainer form={form} job={job} />
<JobCloseRoGuardContainer form={form} job={job} />
<Space wrap direction="vertical" style={{ width: "100%" }}>
<FormsFieldChanged form={form} />
{!job.actual_in && job.scheduled_in && <Alert type="warning" message={t("jobs.labels.actual_in_inferred")} />}

View File

@@ -20,18 +20,21 @@ export default function JobsCreateComponent({ form }) {
const steps = [
{
title: t("jobs.labels.create.vehicleinfo"),
id: "step-job-vehicleinfo",
content: <JobsCreateVehicleInfoContainer form={form} />,
validation: !!state.vehicle.new || !!state.vehicle.selectedid || !!state.vehicle.none,
error: t("vehicles.errors.selectexistingornew")
},
{
title: t("jobs.labels.create.ownerinfo"),
id: "step-job-ownerinfo",
content: <JobsCreateOwnerInfoContainer />,
validation: !!state.owner.new || !!state.owner.selectedid,
error: t("owners.errors.selectexistingornew")
},
{
title: t("jobs.labels.create.jobinfo"),
id: "step-job-jobinfo",
content: <JobsCreateJobsInfo form={form} selected={pageIndex === 2} />
}
];

View File

@@ -111,7 +111,12 @@ export function* calculateScheduleLoad({ payload: end }) {
(load[itemDate].allHoursIn || 0) +
item.labhrs.aggregate.sum.mod_lb_hrs +
item.larhrs.aggregate.sum.mod_lb_hrs;
load[itemDate].allHoursInBody =
(load[itemDate].allHoursInBody || 0) +
item.labhrs.aggregate.sum.mod_lb_hrs;
load[itemDate].allHoursInRefinish =
(load[itemDate].allHoursInRefinish || 0) +
item.larhrs.aggregate.sum.mod_lb_hrs;
//If the job hasn't already arrived, add it to the jobs in list.
// Make sure it also hasn't already been completed, or isn't an in and out job.
//This prevents the duplicate counting.
@@ -119,7 +124,15 @@ export function* calculateScheduleLoad({ payload: end }) {
if (AddJobForSchedulingCalc) {
load[itemDate].jobsIn.push(item);
load[itemDate].hoursIn =
(load[itemDate].hoursIn || 0) + item.labhrs.aggregate.sum.mod_lb_hrs + item.larhrs.aggregate.sum.mod_lb_hrs;
(load[itemDate].hoursIn || 0) +
item.labhrs.aggregate.sum.mod_lb_hrs +
item.larhrs.aggregate.sum.mod_lb_hrs;
load[itemDate].hoursInBody =
(load[itemDate].hoursInBody || 0) +
item.labhrs.aggregate.sum.mod_lb_hrs;
load[itemDate].hoursInRefinish =
(load[itemDate].hoursInRefinish || 0) +
item.larhrs.aggregate.sum.mod_lb_hrs;
}
} else {
load[itemDate] = {
@@ -127,10 +140,21 @@ export function* calculateScheduleLoad({ payload: end }) {
jobsIn: AddJobForSchedulingCalc ? [item] : [], //Same as above, only add it if it isn't already in production.
jobsOut: [],
allJobsOut: [],
allHoursIn: item.labhrs.aggregate.sum.mod_lb_hrs + item.larhrs.aggregate.sum.mod_lb_hrs,
allHoursIn:
item.labhrs.aggregate.sum.mod_lb_hrs +
item.larhrs.aggregate.sum.mod_lb_hrs,
allHoursInBody: item.labhrs.aggregate.sum.mod_lb_hrs,
allHoursInRefinish: item.larhrs.aggregate.sum.mod_lb_hrs,
hoursIn: AddJobForSchedulingCalc
? item.labhrs.aggregate.sum.mod_lb_hrs + item.larhrs.aggregate.sum.mod_lb_hrs
: 0
? item.labhrs.aggregate.sum.mod_lb_hrs +
item.larhrs.aggregate.sum.mod_lb_hrs
: 0,
hoursInBody: AddJobForSchedulingCalc
? item.labhrs.aggregate.sum.mod_lb_hrs
: 0,
hoursInRefinish: AddJobForSchedulingCalc
? item.larhrs.aggregate.sum.mod_lb_hrs
: 0,
};
}
});
@@ -151,6 +175,12 @@ export function* calculateScheduleLoad({ payload: end }) {
(load[itemDate].allHoursOut || 0) +
item.labhrs.aggregate.sum.mod_lb_hrs +
item.larhrs.aggregate.sum.mod_lb_hrs;
load[itemDate].allHoursOutBody =
(load[itemDate].allHoursOutBody || 0) +
item.labhrs.aggregate.sum.mod_lb_hrs;
load[itemDate].allHoursOutRefinish =
(load[itemDate].allHoursOutRefinish || 0) +
item.larhrs.aggregate.sum.mod_lb_hrs;
//Add only the jobs that are still in production to get rid of.
//If it's not in production, we'd subtract unnecessarily.
load[itemDate].allJobsOut.push(item);
@@ -161,6 +191,12 @@ export function* calculateScheduleLoad({ payload: end }) {
(load[itemDate].hoursOut || 0) +
item.labhrs.aggregate.sum.mod_lb_hrs +
item.larhrs.aggregate.sum.mod_lb_hrs;
load[itemDate].hoursOutBody =
(load[itemDate].hoursOutBody || 0) +
item.labhrs.aggregate.sum.mod_lb_hrs;
load[itemDate].hoursOutRefinish =
(load[itemDate].hoursOutRefinish || 0) +
item.larhrs.aggregate.sum.mod_lb_hrs;
}
} else {
load[itemDate] = {
@@ -169,7 +205,11 @@ export function* calculateScheduleLoad({ payload: end }) {
hoursOut: AddJobForSchedulingCalc
? item.labhrs.aggregate.sum.mod_lb_hrs + item.larhrs.aggregate.sum.mod_lb_hrs
: 0,
allHoursOut: item.labhrs.aggregate.sum.mod_lb_hrs + item.larhrs.aggregate.sum.mod_lb_hrs
allHoursOut:
item.labhrs.aggregate.sum.mod_lb_hrs +
item.larhrs.aggregate.sum.mod_lb_hrs,
allHoursOutBody: item.labhrs.aggregate.sum.mod_lb_hrs,
allHoursOutRefinish: item.larhrs.aggregate.sum.mod_lb_hrs,
};
}
});

View File

@@ -116,6 +116,7 @@
"jobassignmentchange": "Employee {{name}} assigned to {{operation}}",
"jobassignmentremoved": "Employee assignment removed for {{operation}}",
"jobchecklist": "Checklist type \"{{type}}\" completed. In production set to {{inproduction}}. Status set to {{status}}.",
"jobclosedwithbypass": "Job was invoiced using the master bypass password. ",
"jobconverted": "Job converted and assigned number {{ro_number}}.",
"jobdelivery": "Job intake completed. Status set to {{status}}. Actual completion is {{actual_completion}}.",
"jobexported": "",
@@ -1975,7 +1976,7 @@
"outstanding_ar": "A balance is outstanding on this RO. Payments can still be entered when the job is closed. ",
"outstanding_credit_memos": "Outstanding credit memos have not been entered against this job. Credit Memos may still be posted once the job is closed.",
"outstanding_ppd": "There are outstanding PPDs that may not have been synced back to the estimate.",
"outstanding_reconciliation_discrep": "At least one discrepancy is not 0. This may indicate that this job is not properly reconciled and should not be closed.",
"outstanding_reconciliation_discrep": "At least one discrepancy is not $0. This may indicate that this job is not properly reconciled and should not be closed.",
"outstanding_sublets": "There are sublet lines on the job which have not been marked as completed. ",
"outstandinghours": "There are outstanding hours on the job that have not been paid or have been overpaid.",
"override_header": "Override estimate header on import?",
@@ -2004,6 +2005,7 @@
"ppc": "This line contains a part price change.",
"ppdnotexported": "PPDs not Exported",
"profileadjustments": "Profile Disc./Mkup",
"profitbypassrequired": "Minimum gross profit requirements have not been met.",
"profits": "Job Profits",
"prt_dsmk_total": "Line Item Adjustment",
"rates": "Rates",
@@ -2025,12 +2027,12 @@
"remove_from_ar": "Remove from AR",
"returntotals": "Return Totals",
"ro_guard": {
"eforce_profit": "Profit margins enforced.",
"enforce_ar": "AR collection enforced.",
"enforce_bills": "Bill discrepancy enforced.",
"enforce_cm": "Credit memo entry enforced.",
"enforce_labor": "Labor allocations enforced.",
"enforce_ppd": "PPD sync enforced.",
"enforce_profit": "Profit margins enforced.",
"enforce_sublet": "Sublet completion enforced.",
"enforce_validation": "Master Bypass Required: {{message}}",
"enforced": "This check has been enforced by your shop manager. Enter the master bypass password to close the Job."
@@ -2505,6 +2507,7 @@
"markexported": "Payment(s) marked exported.",
"markreexported": "Payment marked for re-export successfully",
"payment": "Payment created successfully. ",
"paymentupdate": "Payment updated successfully. ",
"stripe": "Credit card transaction charged successfully."
}
},

View File

@@ -116,6 +116,7 @@
"jobassignmentchange": "",
"jobassignmentremoved": "",
"jobchecklist": "",
"jobclosedwithbypass": "",
"jobconverted": "",
"jobdelivery": "",
"jobexported": "",
@@ -2003,6 +2004,7 @@
"ppc": "",
"ppdnotexported": "",
"profileadjustments": "",
"profitbypassrequired": "",
"profits": "",
"prt_dsmk_total": "",
"rates": "Tarifas",
@@ -2024,12 +2026,12 @@
"remove_from_ar": "",
"returntotals": "",
"ro_guard": {
"eforce_profit": "",
"enforce_ar": "",
"enforce_bills": "",
"enforce_cm": "",
"enforce_labor": "",
"enforce_ppd": "",
"enforce_profit": "",
"enforce_sublet": "",
"enforce_validation": "",
"enforced": ""
@@ -2504,6 +2506,7 @@
"markexported": "",
"markreexported": "",
"payment": "",
"paymentupdate": "",
"stripe": ""
}
},

View File

@@ -116,6 +116,7 @@
"jobassignmentchange": "",
"jobassignmentremoved": "",
"jobchecklist": "",
"jobclosedwithbypass": "",
"jobconverted": "",
"jobdelivery": "",
"jobexported": "",
@@ -2003,6 +2004,7 @@
"ppc": "",
"ppdnotexported": "",
"profileadjustments": "",
"profitbypassrequired": "",
"profits": "",
"prt_dsmk_total": "",
"rates": "Les taux",
@@ -2024,12 +2026,12 @@
"remove_from_ar": "",
"returntotals": "",
"ro_guard": {
"eforce_profit": "",
"enforce_ar": "",
"enforce_bills": "",
"enforce_cm": "",
"enforce_labor": "",
"enforce_ppd": "",
"enforce_profit": "",
"enforce_sublet": "",
"enforce_validation": "",
"enforced": ""
@@ -2504,6 +2506,7 @@
"markexported": "",
"markreexported": "",
"payment": "",
"paymentupdate": "",
"stripe": ""
}
},

View File

@@ -24,6 +24,7 @@ const AuditTrailMapping = {
jobimported: () => i18n.t("audit_trail.messages.jobimported"),
jobinproductionchange: (inproduction) => i18n.t("audit_trail.messages.jobinproductionchange", { inproduction }),
jobinvoiced: () => i18n.t("audit_trail.messages.jobinvoiced"),
jobclosedwithbypass: () => i18n.t("audit_trail.messages.jobclosedwithbypass"),
jobmodifylbradj: ({ mod_lbr_ty, hours }) => i18n.t("audit_trail.messages.jobmodifylbradj", { mod_lbr_ty, hours }),
jobnoteadded: () => i18n.t("audit_trail.messages.jobnoteadded"),
jobnoteupdated: () => i18n.t("audit_trail.messages.jobnoteupdated"),

View File

@@ -5,6 +5,8 @@ import * as path from "path";
import * as url from "url";
import { defineConfig } from "vite";
import { ViteEjsPlugin } from "vite-plugin-ejs";
import eslint from 'vite-plugin-eslint';
//import CompressionPlugin from 'vite-plugin-compression';
import { VitePWA } from "vite-plugin-pwa";
import InstanceRenderManager from "./src/utils/instanceRenderMgr";
@@ -100,7 +102,8 @@ export default defineConfig({
}
}),
reactVirtualized(),
react()
react(),
eslint(),
// CompressionPlugin(), //Cloudfront already compresses assets, so not needed.
],
define: {

View File

@@ -1 +1,8 @@
[ ]
- name: Task Reminders
webhook: '{{HASURA_API_URL}}/tasks-remind-handler'
schedule: '*/15 * * * *'
include_in_metadata: true
payload: {}
headers:
- name: event-secret
value_from_env: EVENT_SECRET

View File

@@ -5797,6 +5797,29 @@
- active:
_eq: true
check: null
event_triggers:
- name: tasks_assigned_changed
definition:
enable_manual: false
insert:
columns: '*'
update:
columns:
- assigned_to
retry_conf:
interval_sec: 10
num_retries: 3
timeout_sec: 60
webhook_from_env: HASURA_API_URL
headers:
- name: event-secret
value_from_env: EVENT_SECRET
request_transform:
method: POST
query_params: {}
template_engine: Kriti
url: '{{$base_url}}/tasks-assigned-handler'
version: 2
- table:
name: timetickets
schema: public

View File

@@ -0,0 +1,4 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."tasks" add column "remind_at_sent" timestamptz
-- null;

View File

@@ -0,0 +1,2 @@
alter table "public"."tasks" add column "remind_at_sent" timestamptz
null;

16
package-lock.json generated
View File

@@ -56,6 +56,7 @@
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"concurrently": "^8.2.2",
"prettier": "^3.2.5",
"source-map-explorer": "^2.5.2"
},
"engines": {
@@ -5900,6 +5901,21 @@
"node": ">= 0.8.0"
}
},
"node_modules/prettier": {
"version": "3.2.5",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz",
"integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==",
"dev": true,
"bin": {
"prettier": "bin/prettier.cjs"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",

View File

@@ -66,6 +66,7 @@
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"concurrently": "^8.2.2",
"prettier": "^3.2.5",
"source-map-explorer": "^2.5.2"
}
}

View File

@@ -925,7 +925,7 @@ function CalculateTaxesTotals(job, otherTotals) {
thresholdAmount === 9999.99 ||
InstanceMgr({
imex: false,
rome: false,
rome: thresholdAmount === 0 && parseInt(tyCounter) === 1,
promanager: thresholdAmount === 0 && parseInt(tyCounter) === 1
})
) {