Compare commits
162 Commits
feature/IO
...
release/20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8836c7ae1 | ||
|
|
eca31c5618 | ||
|
|
7140b8d585 | ||
|
|
5eed8d9809 | ||
|
|
f266ee1cfe | ||
|
|
9550de5131 | ||
|
|
1f76ff882c | ||
|
|
749f73a272 | ||
|
|
9c1774c417 | ||
|
|
26b3a43ce5 | ||
|
|
78678dd3dc | ||
|
|
9dc4546b2e | ||
|
|
95aa0e45a6 | ||
|
|
ce9a77efcf | ||
|
|
e9e1e820a7 | ||
|
|
b027a4e618 | ||
|
|
c7fc75aa5c | ||
|
|
98d2372daf | ||
|
|
bf51380167 | ||
|
|
1ec827097f | ||
|
|
89fabf85e1 | ||
|
|
ff7dd7d3ea | ||
|
|
8cc4f88fa7 | ||
|
|
2439755f9e | ||
|
|
7e6ab3a5ff | ||
|
|
763384f05f | ||
|
|
34f876f838 | ||
|
|
cba2da8da7 | ||
|
|
f3d8aa3438 | ||
|
|
2f3eccf3d8 | ||
|
|
2b3e64d607 | ||
|
|
05b20505bb | ||
|
|
bddeae945c | ||
|
|
5b267f03b9 | ||
|
|
357d916e0a | ||
|
|
6ed12ebe7d | ||
|
|
6703bc025d | ||
|
|
387dac6779 | ||
|
|
6f454dd4cb | ||
|
|
1440a60228 | ||
|
|
f2aa3960aa | ||
|
|
06508f3ad8 | ||
|
|
8d4195b596 | ||
|
|
9e190e7fb7 | ||
|
|
5cbf00b0c8 | ||
|
|
655aeb86fc | ||
|
|
225549275d | ||
|
|
f0717b8b36 | ||
|
|
78771ae750 | ||
|
|
0389908398 | ||
|
|
54bee763df | ||
|
|
1117a94930 | ||
|
|
5fbfb992c7 | ||
|
|
87b3b65f3e | ||
|
|
9970190909 | ||
|
|
8eee371a90 | ||
|
|
ba97b1efef | ||
|
|
8d8887c28e | ||
|
|
3b19432974 | ||
|
|
a14b2340b0 | ||
|
|
624f8e77cb | ||
|
|
fb624c817d | ||
|
|
c2b4b66ed1 | ||
|
|
ffec03ab6c | ||
|
|
552163d7b9 | ||
|
|
db1f59578c | ||
|
|
8ec5831ec5 | ||
|
|
0146ac5b7b | ||
|
|
a603e5c0b8 | ||
|
|
9aab47d8f8 | ||
|
|
f2f84e2da8 | ||
|
|
338906e288 | ||
|
|
542997b1a7 | ||
|
|
5fce548666 | ||
|
|
80322caad0 | ||
|
|
56472d24d9 | ||
|
|
db5dcc271d | ||
|
|
73ab02225e | ||
|
|
83a1b7690d | ||
|
|
c9e28b1ed2 | ||
|
|
c25c66d00f | ||
|
|
d319ab49d4 | ||
|
|
a069989ea7 | ||
|
|
8e3aa186cb | ||
|
|
01c55d6277 | ||
|
|
3438907d8d | ||
|
|
ae020b651e | ||
|
|
d22988df15 | ||
|
|
8136a56ad2 | ||
|
|
830f6c0eea | ||
|
|
4c1849289a | ||
|
|
c45a4780e3 | ||
|
|
d4adc4c1aa | ||
|
|
d9e71423f5 | ||
|
|
6cac0f9594 | ||
|
|
2ab4615642 | ||
|
|
dd5961d419 | ||
|
|
8190958ba3 | ||
|
|
77e009f316 | ||
|
|
2b2738a8d1 | ||
|
|
3d10c9da7f | ||
|
|
e82c77d119 | ||
|
|
855a78be05 | ||
|
|
a29e840797 | ||
|
|
1b30c1ab58 | ||
|
|
80f235f12e | ||
|
|
9b67148522 | ||
|
|
6b501e4619 | ||
|
|
42f1d6fa13 | ||
|
|
3f247a9227 | ||
|
|
63b914731b | ||
|
|
23f8f69bbe | ||
|
|
fc3ea2bdf8 | ||
|
|
96e970faf7 | ||
|
|
c133195607 | ||
|
|
d75ea2b1a6 | ||
|
|
ec0fd840e4 | ||
|
|
971a81fc27 | ||
|
|
19050d31f7 | ||
|
|
e605433379 | ||
|
|
b9ebb70b7a | ||
|
|
79ed6f2388 | ||
|
|
785449a986 | ||
|
|
0b7d469e0e | ||
|
|
a57156756e | ||
|
|
c4c30d98d4 | ||
|
|
d4e8803b13 | ||
|
|
1f2786ddec | ||
|
|
e90cda07e4 | ||
|
|
9793daa04c | ||
|
|
117ced8fe7 | ||
|
|
e7909205d1 | ||
|
|
18028a70ab | ||
|
|
eeb8d8d26f | ||
|
|
23659fc412 | ||
|
|
ba65057782 | ||
|
|
60a859cac8 | ||
|
|
0cfe26093c | ||
|
|
d085a9c7c9 | ||
|
|
ec518a0593 | ||
|
|
1cd64ab6f1 | ||
|
|
26836f662a | ||
|
|
111f280674 | ||
|
|
6e88faa9d8 | ||
|
|
1ca8b2a78d | ||
|
|
cd2a7cad7f | ||
|
|
ed16156957 | ||
|
|
8dc1f7e08f | ||
|
|
2d3c13c587 | ||
|
|
5486907639 | ||
|
|
9233cef23a | ||
|
|
c16eafe892 | ||
|
|
4201f61548 | ||
|
|
d04fc76840 | ||
|
|
0f84adc752 | ||
|
|
fbefd80959 | ||
|
|
6a691b54c8 | ||
|
|
fc75717d32 | ||
|
|
1459c6e993 | ||
|
|
f50292f9bf | ||
|
|
5b00ded5f6 | ||
|
|
c5b19d8f22 |
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
* text eol=lf
|
||||||
24
.platform/hooks/predeploy/00-install-fonts.sh
Normal file
24
.platform/hooks/predeploy/00-install-fonts.sh
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Install required packages
|
||||||
|
dnf install -y fontconfig freetype
|
||||||
|
|
||||||
|
# Move to the /tmp directory for temporary download and extraction
|
||||||
|
cd /tmp
|
||||||
|
|
||||||
|
# Download the Montserrat font zip file
|
||||||
|
wget https://images.imex.online/fonts/montserrat.zip -O montserrat.zip
|
||||||
|
|
||||||
|
# Unzip the downloaded font file
|
||||||
|
unzip montserrat.zip -d montserrat
|
||||||
|
|
||||||
|
# Move the font files to the system fonts directory
|
||||||
|
mv montserrat/montserrat/*.ttf /usr/share/fonts
|
||||||
|
|
||||||
|
# Rebuild the font cache
|
||||||
|
fc-cache -fv
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /tmp/montserrat /tmp/montserrat.zip
|
||||||
|
|
||||||
|
echo "Montserrat fonts installed and cached successfully."
|
||||||
@@ -1 +1,2 @@
|
|||||||
client_max_body_size 50M;
|
client_max_body_size 50M;
|
||||||
|
client_body_buffer_size 5M;
|
||||||
|
|||||||
30
.vscode/settings.json
vendored
30
.vscode/settings.json
vendored
@@ -8,5 +8,35 @@
|
|||||||
"pattern": "**/IMEX.xml",
|
"pattern": "**/IMEX.xml",
|
||||||
"systemId": "logs/IMEX.xsd"
|
"systemId": "logs/IMEX.xsd"
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"cSpell.words": [
|
||||||
|
"antd",
|
||||||
|
"appointmentconfirmation",
|
||||||
|
"appt",
|
||||||
|
"autohouse",
|
||||||
|
"autohouseid",
|
||||||
|
"billlines",
|
||||||
|
"bodyshop",
|
||||||
|
"bodyshopid",
|
||||||
|
"bodyshops",
|
||||||
|
"CIECA",
|
||||||
|
"claimscorp",
|
||||||
|
"claimscorpid",
|
||||||
|
"Dinero",
|
||||||
|
"driveable",
|
||||||
|
"IMEX",
|
||||||
|
"imexshopid",
|
||||||
|
"jobid",
|
||||||
|
"joblines",
|
||||||
|
"Kaizen",
|
||||||
|
"labhrs",
|
||||||
|
"larhrs",
|
||||||
|
"mixdata",
|
||||||
|
"ownr",
|
||||||
|
"promanager",
|
||||||
|
"shopname",
|
||||||
|
"smartscheduling",
|
||||||
|
"timetickets",
|
||||||
|
"touchtime"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
1
_reference/localEmailViewer/.gitignore
vendored
Normal file
1
_reference/localEmailViewer/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
node_modules
|
||||||
7
_reference/localEmailViewer/README.md
Normal file
7
_reference/localEmailViewer/README.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
This will connect to your dockers local stack session and render the email in HTML.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
node index.js
|
||||||
|
```
|
||||||
|
|
||||||
|
http://localhost:3334
|
||||||
116
_reference/localEmailViewer/index.js
Normal file
116
_reference/localEmailViewer/index.js
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
// index.js
|
||||||
|
|
||||||
|
import express from 'express';
|
||||||
|
import fetch from 'node-fetch';
|
||||||
|
import {simpleParser} from 'mailparser';
|
||||||
|
|
||||||
|
const app = express();
|
||||||
|
const PORT = 3334;
|
||||||
|
|
||||||
|
app.get('/', async (req, res) => {
|
||||||
|
try {
|
||||||
|
const response = await fetch('http://localhost:4566/_aws/ses');
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error('Network response was not ok');
|
||||||
|
}
|
||||||
|
const data = await response.json();
|
||||||
|
const messagesHtml = await parseMessages(data.messages);
|
||||||
|
res.send(renderHtml(messagesHtml));
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error fetching messages:', error);
|
||||||
|
res.status(500).send('Error fetching messages');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
async function parseMessages(messages) {
|
||||||
|
const parsedMessages = await Promise.all(
|
||||||
|
messages.map(async (message, index) => {
|
||||||
|
try {
|
||||||
|
const parsed = await simpleParser(message.RawData);
|
||||||
|
return `
|
||||||
|
<div class="shadow-md rounded-lg p-4 mb-6" style="background-color: lightgray">
|
||||||
|
<div class="shadow-md rounded-lg p-4 mb-6" style="background-color: white">
|
||||||
|
<div class="mb-2">
|
||||||
|
<span class="font-bold text-lg">Message ${index + 1}</span>
|
||||||
|
</div>
|
||||||
|
<div class="mb-2">
|
||||||
|
<span class="font-semibold">From:</span> ${message.Source}
|
||||||
|
</div>
|
||||||
|
<div class="mb-2">
|
||||||
|
<span class="font-semibold">Region:</span> ${message.Region}
|
||||||
|
</div>
|
||||||
|
<div class="mb-2">
|
||||||
|
<span class="font-semibold">Timestamp:</span> ${message.Timestamp}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="prose">
|
||||||
|
${parsed.html || parsed.textAsHtml || 'No HTML content available'}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error parsing email:', error);
|
||||||
|
return `
|
||||||
|
<div class="bg-white shadow-md rounded-lg p-4 mb-6">
|
||||||
|
<div class="mb-2">
|
||||||
|
<span class="font-bold text-lg">Message ${index + 1}</span>
|
||||||
|
</div>
|
||||||
|
<div class="mb-2">
|
||||||
|
<span class="font-semibold">From:</span> ${message.Source}
|
||||||
|
</div>
|
||||||
|
<div class="mb-2">
|
||||||
|
<span class="font-semibold">Region:</span> ${message.Region}
|
||||||
|
</div>
|
||||||
|
<div class="mb-2">
|
||||||
|
<span class="font-semibold">Timestamp:</span> ${message.Timestamp}
|
||||||
|
</div>
|
||||||
|
<div class="text-red-500">
|
||||||
|
Error parsing email content
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
return parsedMessages.join('');
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderHtml(messagesHtml) {
|
||||||
|
return `
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Email Messages Viewer</title>
|
||||||
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background-color: #f3f4f6;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
max-width: 800px;
|
||||||
|
margin: 50px auto;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
.prose {
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container bg-white shadow-lg rounded-lg p-6">
|
||||||
|
<h1 class="text-2xl font-bold text-center mb-6">Email Messages Viewer</h1>
|
||||||
|
<div id="messages-container">
|
||||||
|
${messagesHtml}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
app.listen(PORT, () => {
|
||||||
|
console.log(`Server is running on http://localhost:${PORT}`);
|
||||||
|
});
|
||||||
1214
_reference/localEmailViewer/package-lock.json
generated
Normal file
1214
_reference/localEmailViewer/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
18
_reference/localEmailViewer/package.json
Normal file
18
_reference/localEmailViewer/package.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"name": "localemailviewer",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"main": "index.js",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"description": "",
|
||||||
|
"dependencies": {
|
||||||
|
"express": "^4.21.1",
|
||||||
|
"mailparser": "^3.7.1",
|
||||||
|
"node-fetch": "^3.3.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11156,6 +11156,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>imexpay</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>
|
<concept_node>
|
||||||
<name>insurancecos</name>
|
<name>insurancecos</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -11198,27 +11219,6 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
<concept_node>
|
|
||||||
<name>intellipay</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>
|
<concept_node>
|
||||||
<name>intellipay_cash_discount</name>
|
<name>intellipay_cash_discount</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -11747,6 +11747,48 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>ttl_adjustment</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>ttl_tax_adjustment</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>
|
||||||
</children>
|
</children>
|
||||||
</folder_node>
|
</folder_node>
|
||||||
<folder_node>
|
<folder_node>
|
||||||
@@ -11775,6 +11817,27 @@
|
|||||||
</concept_node>
|
</concept_node>
|
||||||
</children>
|
</children>
|
||||||
</folder_node>
|
</folder_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>romepay</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>
|
<concept_node>
|
||||||
<name>scheduling</name>
|
<name>scheduling</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -36253,6 +36316,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>total_cust_payable_cash_discount</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>
|
<concept_node>
|
||||||
<name>total_repairs</name>
|
<name>total_repairs</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -48360,6 +48444,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>tasks_in_view</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>
|
<concept_node>
|
||||||
<name>tasks_on_board</name>
|
<name>tasks_on_board</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -48402,6 +48507,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>total_amount_in_view</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>
|
<concept_node>
|
||||||
<name>total_amount_on_board</name>
|
<name>total_amount_on_board</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -48444,6 +48570,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>total_hours_in_view</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>
|
<concept_node>
|
||||||
<name>total_hours_on_board</name>
|
<name>total_hours_on_board</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -48465,6 +48612,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>total_jobs_in_view</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>
|
<concept_node>
|
||||||
<name>total_jobs_on_board</name>
|
<name>total_jobs_on_board</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -48507,6 +48675,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>total_lab_in_view</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>
|
<concept_node>
|
||||||
<name>total_lab_on_board</name>
|
<name>total_lab_on_board</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -48549,6 +48738,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>total_lar_in_view</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>
|
<concept_node>
|
||||||
<name>total_lar_on_board</name>
|
<name>total_lar_on_board</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -48724,6 +48934,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>tasks_in_view</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>
|
<concept_node>
|
||||||
<name>tasks_on_board</name>
|
<name>tasks_on_board</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -48766,6 +48997,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>total_amount_in_view</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>
|
<concept_node>
|
||||||
<name>total_amount_on_board</name>
|
<name>total_amount_on_board</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -48808,6 +49060,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>total_hours_in_view</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>
|
<concept_node>
|
||||||
<name>total_hours_on_board</name>
|
<name>total_hours_on_board</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -48829,6 +49102,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>total_jobs_in_view</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>
|
<concept_node>
|
||||||
<name>total_jobs_on_board</name>
|
<name>total_jobs_on_board</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -48871,6 +49165,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>total_lab_in_view</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>
|
<concept_node>
|
||||||
<name>total_lab_on_board</name>
|
<name>total_lab_on_board</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -48913,6 +49228,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>total_lar_in_view</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>
|
<concept_node>
|
||||||
<name>total_lar_on_board</name>
|
<name>total_lar_on_board</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -51761,6 +52097,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>production_not_production_status</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>
|
<concept_node>
|
||||||
<name>production_over_time</name>
|
<name>production_over_time</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -54225,6 +54582,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>created_by</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>
|
<concept_node>
|
||||||
<name>description</name>
|
<name>description</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -54487,6 +54865,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>related_items</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>
|
<concept_node>
|
||||||
<name>remind_at</name>
|
<name>remind_at</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ import { ApolloProvider } from "@apollo/client";
|
|||||||
import { SplitFactoryProvider, SplitSdk } from "@splitsoftware/splitio-react";
|
import { SplitFactoryProvider, SplitSdk } from "@splitsoftware/splitio-react";
|
||||||
import { ConfigProvider } from "antd";
|
import { ConfigProvider } from "antd";
|
||||||
import enLocale from "antd/es/locale/en_US";
|
import enLocale from "antd/es/locale/en_US";
|
||||||
import dayjs from "../utils/day";
|
|
||||||
import "dayjs/locale/en";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import GlobalLoadingBar from "../components/global-loading-bar/global-loading-bar.component";
|
import GlobalLoadingBar from "../components/global-loading-bar/global-loading-bar.component";
|
||||||
@@ -19,8 +17,6 @@ if (import.meta.env.DEV) {
|
|||||||
Userpilot.initialize("NX-69145f08");
|
Userpilot.initialize("NX-69145f08");
|
||||||
}
|
}
|
||||||
|
|
||||||
dayjs.locale("en");
|
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
core: {
|
core: {
|
||||||
authorizationKey: import.meta.env.VITE_APP_SPLIT_API,
|
authorizationKey: import.meta.env.VITE_APP_SPLIT_API,
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import { connect } from "react-redux";
|
|||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import CiecaSelect from "../../utils/Ciecaselect";
|
import CiecaSelect from "../../utils/Ciecaselect";
|
||||||
|
import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
||||||
import BillLineSearchSelect from "../bill-line-search-select/bill-line-search-select.component";
|
import BillLineSearchSelect from "../bill-line-search-select/bill-line-search-select.component";
|
||||||
import BilllineAddInventory from "../billline-add-inventory/billline-add-inventory.component";
|
import BilllineAddInventory from "../billline-add-inventory/billline-add-inventory.component";
|
||||||
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
||||||
import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
//currentUser: selectCurrentUser
|
||||||
@@ -72,7 +72,14 @@ export function BillEnterModalLinesComponent({
|
|||||||
<BillLineSearchSelect
|
<BillLineSearchSelect
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
options={lineData}
|
options={lineData}
|
||||||
style={{ width: "100%", minWidth: "10rem" }}
|
style={{
|
||||||
|
width: "20rem",
|
||||||
|
maxWidth: "20rem",
|
||||||
|
minWidth: "10rem",
|
||||||
|
whiteSpace: "normal",
|
||||||
|
height: "auto",
|
||||||
|
minHeight: "32px" // default height of Ant Design inputs
|
||||||
|
}}
|
||||||
allowRemoved={form.getFieldValue("is_credit_memo") || false}
|
allowRemoved={form.getFieldValue("is_credit_memo") || false}
|
||||||
onSelect={(value, opt) => {
|
onSelect={(value, opt) => {
|
||||||
setFieldsValue({
|
setFieldsValue({
|
||||||
@@ -105,7 +112,7 @@ export function BillEnterModalLinesComponent({
|
|||||||
title: t("billlines.fields.line_desc"),
|
title: t("billlines.fields.line_desc"),
|
||||||
dataIndex: "line_desc",
|
dataIndex: "line_desc",
|
||||||
editable: true,
|
editable: true,
|
||||||
|
width: "20rem",
|
||||||
formItemProps: (field) => {
|
formItemProps: (field) => {
|
||||||
return {
|
return {
|
||||||
key: `${field.index}line_desc`,
|
key: `${field.index}line_desc`,
|
||||||
@@ -119,7 +126,7 @@ export function BillEnterModalLinesComponent({
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
formInput: (record, index) => <Input disabled={disabled} />
|
formInput: (record, index) => <Input.TextArea disabled={disabled} autoSize />
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("billlines.fields.quantity"),
|
title: t("billlines.fields.quantity"),
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const BillLineSearchSelect = ({ options, disabled, allowRemoved, ...restProps },
|
|||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
showSearch
|
showSearch
|
||||||
popupMatchSelectWidth={false}
|
popupMatchSelectWidth={true}
|
||||||
optionLabelProp={"name"}
|
optionLabelProp={"name"}
|
||||||
// optionFilterProp="line_desc"
|
// optionFilterProp="line_desc"
|
||||||
filterOption={(inputValue, option) => {
|
filterOption={(inputValue, option) => {
|
||||||
@@ -43,7 +43,7 @@ const BillLineSearchSelect = ({ options, disabled, allowRemoved, ...restProps },
|
|||||||
item.oem_partno ? ` - ${item.oem_partno}` : ""
|
item.oem_partno ? ` - ${item.oem_partno}` : ""
|
||||||
}${item.alt_partno ? ` (${item.alt_partno})` : ""}`.trim(),
|
}${item.alt_partno ? ` (${item.alt_partno})` : ""}`.trim(),
|
||||||
label: (
|
label: (
|
||||||
<>
|
<div style={{ whiteSpace: 'normal', wordBreak: 'break-word' }}>
|
||||||
<span>
|
<span>
|
||||||
{`${item.removed ? `(REMOVED) ` : ""}${item.line_desc}${
|
{`${item.removed ? `(REMOVED) ` : ""}${item.line_desc}${
|
||||||
item.oem_partno ? ` - ${item.oem_partno}` : ""
|
item.oem_partno ? ` - ${item.oem_partno}` : ""
|
||||||
@@ -57,7 +57,7 @@ const BillLineSearchSelect = ({ options, disabled, allowRemoved, ...restProps },
|
|||||||
<span style={{ float: "right", paddingleft: "1rem" }}>
|
<span style={{ float: "right", paddingleft: "1rem" }}>
|
||||||
{item.act_price ? `$${item.act_price && item.act_price.toFixed(2)}` : ``}
|
{item.act_price ? `$${item.act_price && item.act_price.toFixed(2)}` : ``}
|
||||||
</span>
|
</span>
|
||||||
</>
|
</div>
|
||||||
)
|
)
|
||||||
}))
|
}))
|
||||||
]}
|
]}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export function ChatPopupComponent({ chatVisible, selectedConversation, toggleCh
|
|||||||
if (fcmToken) {
|
if (fcmToken) {
|
||||||
setpollInterval(0);
|
setpollInterval(0);
|
||||||
} else {
|
} else {
|
||||||
setpollInterval(60000);
|
setpollInterval(90000);
|
||||||
}
|
}
|
||||||
}, [fcmToken]);
|
}, [fcmToken]);
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
import { WarningFilled } from "@ant-design/icons";
|
import { WarningFilled } from "@ant-design/icons";
|
||||||
import { Form, Input, InputNumber, Space } from "antd";
|
import { Form, Input, InputNumber, Space } from "antd";
|
||||||
import dayjs from "../../utils/day";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { DateFormatter } from "../../utils/DateFormatter";
|
import { DateFormatter } from "../../utils/DateFormatter";
|
||||||
|
import dayjs from "../../utils/day";
|
||||||
//import ContractLicenseDecodeButton from "../contract-license-decode-button/contract-license-decode-button.component";
|
//import ContractLicenseDecodeButton from "../contract-license-decode-button/contract-license-decode-button.component";
|
||||||
import ContractStatusSelector from "../contract-status-select/contract-status-select.component";
|
import ContractStatusSelector from "../contract-status-select/contract-status-select.component";
|
||||||
import ContractsRatesChangeButton from "../contracts-rates-change-button/contracts-rates-change-button.component";
|
import ContractsRatesChangeButton from "../contracts-rates-change-button/contracts-rates-change-button.component";
|
||||||
import CourtesyCarFuelSlider from "../courtesy-car-fuel-select/courtesy-car-fuel-select.component";
|
import CourtesyCarFuelSlider from "../courtesy-car-fuel-select/courtesy-car-fuel-select.component";
|
||||||
import FormDateTimePicker from "../form-date-time-picker/form-date-time-picker.component";
|
import {
|
||||||
import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component";
|
default as DateTimePicker,
|
||||||
|
default as FormDateTimePicker
|
||||||
|
} from "../form-date-time-picker/form-date-time-picker.component";
|
||||||
import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
|
import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
|
||||||
import InputPhone, { PhoneItemFormatterValidation } from "../form-items-formatted/phone-form-item.component";
|
import InputPhone, { PhoneItemFormatterValidation } from "../form-items-formatted/phone-form-item.component";
|
||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
@@ -18,10 +20,10 @@ import ContractFormJobPrefill from "./contract-form-job-prefill.component";
|
|||||||
export default function ContractFormComponent({ form, create = false, selectedJobState, selectedCar }) {
|
export default function ContractFormComponent({ form, create = false, selectedJobState, selectedCar }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
<div>
|
<>
|
||||||
<FormFieldsChanged form={form} />
|
{!create && <FormFieldsChanged form={form} />}
|
||||||
<LayoutFormRow>
|
<LayoutFormRow>
|
||||||
{create ? null : (
|
{!create && (
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("contracts.fields.status")}
|
label={t("contracts.fields.status")}
|
||||||
name="status"
|
name="status"
|
||||||
@@ -50,7 +52,7 @@ export default function ContractFormComponent({ form, create = false, selectedJo
|
|||||||
<Form.Item label={t("contracts.fields.scheduledreturn")} name="scheduledreturn">
|
<Form.Item label={t("contracts.fields.scheduledreturn")} name="scheduledreturn">
|
||||||
<FormDateTimePicker />
|
<FormDateTimePicker />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{create ? null : (
|
{!create && (
|
||||||
<Form.Item label={t("contracts.fields.actualreturn")} name="actualreturn">
|
<Form.Item label={t("contracts.fields.actualreturn")} name="actualreturn">
|
||||||
<FormDateTimePicker />
|
<FormDateTimePicker />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
@@ -122,7 +124,7 @@ export default function ContractFormComponent({ form, create = false, selectedJo
|
|||||||
}}
|
}}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
{create ? null : (
|
{!create && (
|
||||||
<Form.Item label={t("contracts.fields.kmend")} name="kmend">
|
<Form.Item label={t("contracts.fields.kmend")} name="kmend">
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
@@ -145,25 +147,21 @@ export default function ContractFormComponent({ form, create = false, selectedJo
|
|||||||
>
|
>
|
||||||
<CourtesyCarFuelSlider />
|
<CourtesyCarFuelSlider />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{create ? null : (
|
{!create && (
|
||||||
<Form.Item label={t("contracts.fields.fuelin")} name="fuelin" span={8}>
|
<Form.Item label={t("contracts.fields.fuelin")} name="fuelin" span={8}>
|
||||||
<CourtesyCarFuelSlider />
|
<CourtesyCarFuelSlider />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<div>
|
|
||||||
<Space wrap>
|
|
||||||
{selectedJobState && (
|
|
||||||
<div>
|
|
||||||
<ContractFormJobPrefill jobId={selectedJobState && selectedJobState[0]} form={form} />
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{
|
|
||||||
//<ContractLicenseDecodeButton form={form} />
|
|
||||||
}
|
|
||||||
</Space>
|
|
||||||
</div>
|
|
||||||
<LayoutFormRow header={t("contracts.labels.driverinformation")}>
|
<LayoutFormRow header={t("contracts.labels.driverinformation")}>
|
||||||
|
<Space wrap>
|
||||||
|
{create && selectedJobState && (
|
||||||
|
<ContractFormJobPrefill jobId={selectedJobState && selectedJobState[0]} form={form} />
|
||||||
|
)}
|
||||||
|
{/* {<ContractLicenseDecodeButton form={form} />} */}
|
||||||
|
</Space>
|
||||||
|
</LayoutFormRow>
|
||||||
|
<LayoutFormRow noDivider={true}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("contracts.fields.driver_dlnumber")}
|
label={t("contracts.fields.driver_dlnumber")}
|
||||||
name="driver_dlnumber"
|
name="driver_dlnumber"
|
||||||
@@ -183,9 +181,8 @@ export default function ContractFormComponent({ form, create = false, selectedJo
|
|||||||
const dlExpiresBeforeReturn = dayjs(form.getFieldValue("driver_dlexpiry")).isBefore(
|
const dlExpiresBeforeReturn = dayjs(form.getFieldValue("driver_dlexpiry")).isBefore(
|
||||||
dayjs(form.getFieldValue("scheduledreturn"))
|
dayjs(form.getFieldValue("scheduledreturn"))
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("contracts.fields.driver_dlexpiry")}
|
label={t("contracts.fields.driver_dlexpiry")}
|
||||||
name="driver_dlexpiry"
|
name="driver_dlexpiry"
|
||||||
@@ -204,11 +201,10 @@ export default function ContractFormComponent({ form, create = false, selectedJo
|
|||||||
<span>{t("contracts.labels.dlexpirebeforereturn")}</span>
|
<span>{t("contracts.labels.dlexpirebeforereturn")}</span>
|
||||||
</Space>
|
</Space>
|
||||||
)}
|
)}
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item label={t("contracts.fields.driver_dlst")} name="driver_dlst">
|
<Form.Item label={t("contracts.fields.driver_dlst")} name="driver_dlst">
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
@@ -315,6 +311,6 @@ export default function ContractFormComponent({ form, create = false, selectedJo
|
|||||||
<InputNumber precision={2} />
|
<InputNumber precision={2} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { Card, Table, Tag } from "antd";
|
import { Card, Table, Tag } from "antd";
|
||||||
import LoadingSkeleton from "../../loading-skeleton/loading-skeleton.component";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import React, { useEffect, useState } from "react";
|
|
||||||
import dayjs from "../../../utils/day";
|
|
||||||
import DashboardRefreshRequired from "../refresh-required.component";
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
import React, { useEffect, useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import dayjs from "../../../utils/day";
|
||||||
|
import LoadingSkeleton from "../../loading-skeleton/loading-skeleton.component";
|
||||||
|
import DashboardRefreshRequired from "../refresh-required.component";
|
||||||
|
|
||||||
const fortyFiveDaysAgo = () => dayjs().subtract(45, "day").toLocaleString();
|
const fortyFiveDaysAgo = () => dayjs().subtract(45, "day").toLocaleString();
|
||||||
|
|
||||||
@@ -46,6 +46,11 @@ export default function JobLifecycleDashboardComponent({ data, bodyshop, ...card
|
|||||||
dataIndex: "humanReadable",
|
dataIndex: "humanReadable",
|
||||||
key: "humanReadable"
|
key: "humanReadable"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: t("job_lifecycle.columns.average_human_readable"),
|
||||||
|
dataIndex: "averageHumanReadable",
|
||||||
|
key: "averageHumanReadable"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: t("job_lifecycle.columns.status_count"),
|
title: t("job_lifecycle.columns.status_count"),
|
||||||
key: "statusCount",
|
key: "statusCount",
|
||||||
|
|||||||
@@ -40,13 +40,11 @@ export function DmsLogEvents({ socket, logs, bodyshop }) {
|
|||||||
|
|
||||||
function LogLevelHierarchy(level) {
|
function LogLevelHierarchy(level) {
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case "TRACE":
|
|
||||||
return "pink";
|
|
||||||
case "DEBUG":
|
case "DEBUG":
|
||||||
return "orange";
|
return "orange";
|
||||||
case "INFO":
|
case "INFO":
|
||||||
return "blue";
|
return "blue";
|
||||||
case "WARNING":
|
case "WARN":
|
||||||
return "yellow";
|
return "yellow";
|
||||||
case "ERROR":
|
case "ERROR":
|
||||||
return "red";
|
return "red";
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { INSERT_EULA_ACCEPTANCE } from "../../graphql/user.queries";
|
|||||||
import { useMutation } from "@apollo/client";
|
import { useMutation } from "@apollo/client";
|
||||||
import { acceptEula } from "../../redux/user/user.actions";
|
import { acceptEula } from "../../redux/user/user.actions";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import day from "../../utils/day";
|
import dayjs from "../../utils/day";
|
||||||
|
|
||||||
import "./eula.styles.scss";
|
import "./eula.styles.scss";
|
||||||
import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component.jsx";
|
import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component.jsx";
|
||||||
@@ -208,7 +208,7 @@ const EulaFormComponent = ({ form, handleChange, onFinish, t }) => (
|
|||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
validator: (_, value) => {
|
validator: (_, value) => {
|
||||||
if (day(value).isSame(day(), "day")) {
|
if (dayjs(value).isSame(dayjs(), "day")) {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
return Promise.reject(new Error(t("eula.messages.date_accepted")));
|
return Promise.reject(new Error(t("eula.messages.date_accepted")));
|
||||||
|
|||||||
@@ -1,22 +1,40 @@
|
|||||||
import { DatePicker } from "antd";
|
import { DatePicker, Space, TimePicker } from "antd";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import React, { useCallback, useState } from "react";
|
import React, { useCallback, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
import { createStructuredSelector } from "reselect";
|
||||||
|
import { selectBodyshop } from "../../redux/user/user.selectors.js";
|
||||||
import dayjs from "../../utils/day";
|
import dayjs from "../../utils/day";
|
||||||
import { fuzzyMatchDate } from "./formats.js";
|
import { fuzzyMatchDate } from "./formats.js";
|
||||||
|
|
||||||
const DateTimePicker = ({ value, onChange, onBlur, id, onlyFuture, onlyToday, isDateOnly = false, ...restProps }) => {
|
const mapStateToProps = createStructuredSelector({
|
||||||
|
bodyshop: selectBodyshop
|
||||||
|
});
|
||||||
|
|
||||||
|
const DateTimePicker = ({
|
||||||
|
value,
|
||||||
|
onChange,
|
||||||
|
onBlur,
|
||||||
|
id,
|
||||||
|
onlyFuture,
|
||||||
|
onlyToday,
|
||||||
|
isDateOnly = false,
|
||||||
|
isSeparatedTime = false,
|
||||||
|
bodyshop,
|
||||||
|
...restProps
|
||||||
|
}) => {
|
||||||
const [isManualInput, setIsManualInput] = useState(false);
|
const [isManualInput, setIsManualInput] = useState(false);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const handleChange = useCallback(
|
const handleChange = useCallback(
|
||||||
(newDate) => {
|
(newDate) => {
|
||||||
if (onChange) {
|
if (onChange) {
|
||||||
onChange(newDate || null);
|
onChange(bodyshop?.timezone && newDate ? dayjs(newDate).tz(bodyshop.timezone, true) : newDate);
|
||||||
}
|
}
|
||||||
setIsManualInput(false);
|
setIsManualInput(false);
|
||||||
},
|
},
|
||||||
[onChange]
|
[onChange, bodyshop?.timezone]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleBlur = useCallback(
|
const handleBlur = useCallback(
|
||||||
@@ -70,24 +88,57 @@ const DateTimePicker = ({ value, onChange, onBlur, id, onlyFuture, onlyToday, is
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div onKeyDown={handleKeyDown} id={id} style={{ width: "100%" }}>
|
<div onKeyDown={handleKeyDown} id={id} style={{ width: "100%" }}>
|
||||||
<DatePicker
|
{isSeparatedTime && (
|
||||||
showTime={
|
<Space direction="vertical" style={{ width: "100%" }}>
|
||||||
isDateOnly
|
<DatePicker
|
||||||
? false
|
showTime={false}
|
||||||
: {
|
format="MM/DD/YYYY"
|
||||||
format: "hh:mm a",
|
value={value ? dayjs(value) : null}
|
||||||
minuteStep: 15,
|
onChange={handleChange}
|
||||||
defaultValue: dayjs(dayjs(), "HH:mm:ss")
|
placeholder={t("general.labels.date")}
|
||||||
}
|
onBlur={handleBlur}
|
||||||
}
|
disabledDate={handleDisabledDate}
|
||||||
format={isDateOnly ? "MM/DD/YYYY" : "MM/DD/YYYY hh:mm a"}
|
isDateOnly={true}
|
||||||
value={value ? dayjs(value) : null}
|
{...restProps}
|
||||||
onChange={handleChange}
|
/>
|
||||||
placeholder={isDateOnly ? t("general.labels.date") : t("general.labels.datetime")}
|
{value && (
|
||||||
onBlur={onBlur || handleBlur}
|
<TimePicker
|
||||||
disabledDate={handleDisabledDate}
|
format="hh:mm a"
|
||||||
{...restProps}
|
minuteStep={15}
|
||||||
/>
|
defaultOpenValue={dayjs(value)
|
||||||
|
.hour(dayjs().hour())
|
||||||
|
.minute(Math.floor(dayjs().minute() / 15) * 15)
|
||||||
|
.second(0)}
|
||||||
|
onChange={(value) => {
|
||||||
|
handleChange(value);
|
||||||
|
onBlur();
|
||||||
|
}}
|
||||||
|
placeholder={t("general.labels.time")}
|
||||||
|
{...restProps}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
|
{!isSeparatedTime && (
|
||||||
|
<DatePicker
|
||||||
|
showTime={
|
||||||
|
isDateOnly
|
||||||
|
? false
|
||||||
|
: {
|
||||||
|
format: "hh:mm a",
|
||||||
|
minuteStep: 15,
|
||||||
|
defaultValue: dayjs(dayjs(), "HH:mm:ss")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
format={isDateOnly ? "MM/DD/YYYY" : "MM/DD/YYYY hh:mm a"}
|
||||||
|
value={value ? dayjs(value) : null}
|
||||||
|
onChange={handleChange}
|
||||||
|
placeholder={isDateOnly ? t("general.labels.date") : t("general.labels.datetime")}
|
||||||
|
onBlur={onBlur || handleBlur}
|
||||||
|
disabledDate={handleDisabledDate}
|
||||||
|
{...restProps}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -99,7 +150,8 @@ DateTimePicker.propTypes = {
|
|||||||
id: PropTypes.string,
|
id: PropTypes.string,
|
||||||
onlyFuture: PropTypes.bool,
|
onlyFuture: PropTypes.bool,
|
||||||
onlyToday: PropTypes.bool,
|
onlyToday: PropTypes.bool,
|
||||||
isDateOnly: PropTypes.bool
|
isDateOnly: PropTypes.bool,
|
||||||
|
isSeparatedTime: PropTypes.bool
|
||||||
};
|
};
|
||||||
|
|
||||||
export default React.memo(DateTimePicker);
|
export default connect(mapStateToProps, null)(DateTimePicker);
|
||||||
|
|||||||
@@ -116,18 +116,15 @@ function Header({
|
|||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const deleteBetaCookie = () => {
|
// const deleteBetaCookie = () => {
|
||||||
const cookieExists = document.cookie.split("; ").some((row) => row.startsWith(`betaSwitchImex=`));
|
// const cookieExists = document.cookie.split("; ").some((row) => row.startsWith(`betaSwitchImex=`));
|
||||||
if (cookieExists) {
|
// if (cookieExists) {
|
||||||
const domain = window.location.hostname.split(".").slice(-2).join(".");
|
// const domain = window.location.hostname.split(".").slice(-2).join(".");
|
||||||
document.cookie = `betaSwitchImex=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=.${domain}`;
|
// document.cookie = `betaSwitchImex=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=.${domain}`;
|
||||||
console.log(`betaSwitchImex cookie deleted`);
|
// }
|
||||||
} else {
|
// };
|
||||||
console.log(`betaSwitchImex cookie does not exist`);
|
//
|
||||||
}
|
// deleteBetaCookie();
|
||||||
};
|
|
||||||
|
|
||||||
deleteBetaCookie();
|
|
||||||
|
|
||||||
const accountingChildren = [];
|
const accountingChildren = [];
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import ScheduleEventColor from "./schedule-event.color.component";
|
|||||||
import ScheduleEventNote from "./schedule-event.note.component";
|
import ScheduleEventNote from "./schedule-event.note.component";
|
||||||
import { useMutation } from "@apollo/client";
|
import { useMutation } from "@apollo/client";
|
||||||
import { UPDATE_APPOINTMENT } from "../../graphql/appointments.queries";
|
import { UPDATE_APPOINTMENT } from "../../graphql/appointments.queries";
|
||||||
|
import ProductionListColumnComment from "../production-list-columns/production-list-columns.comment.component";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop
|
bodyshop: selectBodyshop
|
||||||
@@ -127,6 +128,9 @@ export function ScheduleEventComponent({
|
|||||||
{(event.job && event.job.alt_transport) || ""}
|
{(event.job && event.job.alt_transport) || ""}
|
||||||
<ScheduleAtChange job={event && event.job} />
|
<ScheduleAtChange job={event && event.job} />
|
||||||
</DataLabel>
|
</DataLabel>
|
||||||
|
<DataLabel label={t("jobs.fields.comment")} valueStyle={{ overflow: "hidden", textOverflow: "ellipsis" }}>
|
||||||
|
<ProductionListColumnComment record={event && event.job} />
|
||||||
|
</DataLabel>
|
||||||
<ScheduleEventNote event={event} />
|
<ScheduleEventNote event={event} />
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
@@ -316,6 +320,7 @@ export function ScheduleEventComponent({
|
|||||||
})`}
|
})`}
|
||||||
|
|
||||||
{event.job && event.job.alt_transport && <div style={{ margin: ".1rem" }}>{event.job.alt_transport}</div>}
|
{event.job && event.job.alt_transport && <div style={{ margin: ".1rem" }}>{event.job.alt_transport}</div>}
|
||||||
|
{event?.job?.comment && `C: ${event.job.comment}`}
|
||||||
</Space>
|
</Space>
|
||||||
) : (
|
) : (
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -118,8 +118,7 @@ export function JobLinesComponent({
|
|||||||
...(record.critical ? { boxShadow: " -.5em 0 0 #FFC107" } : {})
|
...(record.critical ? { boxShadow: " -.5em 0 0 #FFC107" } : {})
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
sortOrder: state.sortedInfo.columnKey === "line_desc" && state.sortedInfo.order,
|
sortOrder: state.sortedInfo.columnKey === "line_desc" && state.sortedInfo.order
|
||||||
ellipsis: true
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("joblines.fields.oem_partno"),
|
title: t("joblines.fields.oem_partno"),
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { useCallback, useEffect, useState } from "react";
|
import React, { useCallback, useEffect, useState } from "react";
|
||||||
import day from "../../utils/day";
|
import dayjs from "../../utils/day";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { Badge, Card, Space, Table, Tag } from "antd";
|
import { Badge, Card, Space, Table, Tag } from "antd";
|
||||||
import { gql, useQuery } from "@apollo/client";
|
import { gql, useQuery } from "@apollo/client";
|
||||||
@@ -72,7 +72,7 @@ export function JobLifecycleComponent({ job, statuses, ...rest }) {
|
|||||||
dataIndex: "start",
|
dataIndex: "start",
|
||||||
key: "start",
|
key: "start",
|
||||||
render: (text) => DateTimeFormatterFunction(text),
|
render: (text) => DateTimeFormatterFunction(text),
|
||||||
sorter: (a, b) => day(a.start).unix() - day(b.start).unix()
|
sorter: (a, b) => dayjs(a.start).unix() - dayjs(b.start).unix()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("job_lifecycle.columns.relative_start"),
|
title: t("job_lifecycle.columns.relative_start"),
|
||||||
@@ -90,7 +90,7 @@ export function JobLifecycleComponent({ job, statuses, ...rest }) {
|
|||||||
}
|
}
|
||||||
return isEmpty(a.end) ? 1 : -1;
|
return isEmpty(a.end) ? 1 : -1;
|
||||||
}
|
}
|
||||||
return day(a.end).unix() - day(b.end).unix();
|
return dayjs(a.end).unix() - dayjs(b.end).unix();
|
||||||
},
|
},
|
||||||
render: (text) => (isEmpty(text) ? t("job_lifecycle.content.not_available") : DateTimeFormatterFunction(text))
|
render: (text) => (isEmpty(text) ? t("job_lifecycle.content.not_available") : DateTimeFormatterFunction(text))
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React, { useState } from "react";
|
|||||||
|
|
||||||
import { useMutation } from "@apollo/client";
|
import { useMutation } from "@apollo/client";
|
||||||
import { Button, Form, notification, Popover, Select, Space } from "antd";
|
import { Button, Form, notification, Popover, Select, Space } from "antd";
|
||||||
import day from "../../utils/day";
|
import dayjs from "../../utils/day";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
@@ -48,7 +48,7 @@ export function JobLineDispatchButton({
|
|||||||
const result = await dispatchLines({
|
const result = await dispatchLines({
|
||||||
variables: {
|
variables: {
|
||||||
partsDispatch: {
|
partsDispatch: {
|
||||||
dispatched_at: day(),
|
dispatched_at: dayjs(),
|
||||||
employeeid: values.employeeid,
|
employeeid: values.employeeid,
|
||||||
jobid: job.id,
|
jobid: job.id,
|
||||||
dispatched_by: currentUser.email,
|
dispatched_by: currentUser.email,
|
||||||
@@ -138,7 +138,11 @@ export function JobLineDispatchButton({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Popover open={visible} content={popMenu}>
|
<Popover open={visible} content={popMenu}>
|
||||||
<Button disabled={selectedLines.length === 0 || jobRO || disabled} loading={loading} onClick={() => setVisible(true)}>
|
<Button
|
||||||
|
disabled={selectedLines.length === 0 || jobRO || disabled}
|
||||||
|
loading={loading}
|
||||||
|
onClick={() => setVisible(true)}
|
||||||
|
>
|
||||||
{t("joblines.actions.dispatchparts", { count: selectedLines.length })}
|
{t("joblines.actions.dispatchparts", { count: selectedLines.length })}
|
||||||
</Button>
|
</Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
|
|||||||
@@ -45,7 +45,8 @@ export default function JobLineNotePopup({ jobline, disabled }) {
|
|||||||
if (editing)
|
if (editing)
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Input
|
<Input.TextArea
|
||||||
|
autoSize
|
||||||
autoFocus
|
autoFocus
|
||||||
suffix={loading ? <LoadingSpinner /> : null}
|
suffix={loading ? <LoadingSpinner /> : null}
|
||||||
value={note}
|
value={note}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
|
import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
||||||
import { Form, Input, InputNumber, Modal, Select, Switch } from "antd";
|
import { Form, Input, InputNumber, Modal, Select, Switch } from "antd";
|
||||||
import React, { useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import InputCurrency from "../form-items-formatted/currency-form-item.component";
|
import InputCurrency from "../form-items-formatted/currency-form-item.component";
|
||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
|
||||||
import JoblinesPreset from "../job-lines-preset-button/job-lines-preset-button.component";
|
import JoblinesPreset from "../job-lines-preset-button/job-lines-preset-button.component";
|
||||||
import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
|
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
@@ -61,7 +61,7 @@ export function JobLinesUpsertModalComponent({ bodyshop, open, jobLine, handleCa
|
|||||||
]}
|
]}
|
||||||
name="line_desc"
|
name="line_desc"
|
||||||
>
|
>
|
||||||
<Input />
|
<Input.TextArea autoSize />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<JoblinesPreset form={form} />
|
<JoblinesPreset form={form} />
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
|
|||||||
@@ -141,14 +141,16 @@ export function JobTotalsTableTotals({ bodyshop, job }) {
|
|||||||
key: t("jobs.fields.ded_amt"),
|
key: t("jobs.fields.ded_amt"),
|
||||||
total: job.job_totals.totals.custPayable.deductible
|
total: job.job_totals.totals.custPayable.deductible
|
||||||
},
|
},
|
||||||
...(InstanceRenderManager({
|
...InstanceRenderManager({
|
||||||
imex: [{
|
imex: [
|
||||||
key: t("jobs.fields.federal_tax_payable"),
|
{
|
||||||
total: job.job_totals.totals.custPayable.federal_tax
|
key: t("jobs.fields.federal_tax_payable"),
|
||||||
}],
|
total: job.job_totals.totals.custPayable.federal_tax
|
||||||
|
}
|
||||||
|
],
|
||||||
rome: [],
|
rome: [],
|
||||||
promanager: "USE_ROME"
|
promanager: "USE_ROME"
|
||||||
})),
|
}),
|
||||||
{
|
{
|
||||||
key: t("jobs.fields.other_amount_payable"),
|
key: t("jobs.fields.other_amount_payable"),
|
||||||
total: job.job_totals.totals.custPayable.other_customer_amount
|
total: job.job_totals.totals.custPayable.other_customer_amount
|
||||||
@@ -158,11 +160,32 @@ export function JobTotalsTableTotals({ bodyshop, job }) {
|
|||||||
total: job.job_totals.totals.custPayable.dep_taxes
|
total: job.job_totals.totals.custPayable.dep_taxes
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
...(bodyshop.intellipay_config?.enable_cash_discount
|
||||||
key: t("jobs.labels.total_cust_payable"),
|
? [
|
||||||
total: job.job_totals.totals.custPayable.total,
|
{
|
||||||
bold: true
|
key: t("jobs.labels.total_cust_payable_cash_discount"),
|
||||||
},
|
total: job.job_totals.totals.custPayable.total,
|
||||||
|
bold: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: t("jobs.labels.total_cust_payable"),
|
||||||
|
total: Dinero(job.job_totals.totals.custPayable.total)
|
||||||
|
.add(
|
||||||
|
Dinero(job.job_totals.totals.custPayable.total).percentage(
|
||||||
|
bodyshop.intellipay_config?.cash_discount_percentage || 0
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.toJSON(),
|
||||||
|
bold: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
: [
|
||||||
|
{
|
||||||
|
key: t("jobs.labels.total_cust_payable"),
|
||||||
|
total: job.job_totals.totals.custPayable.total,
|
||||||
|
bold: true
|
||||||
|
}
|
||||||
|
]),
|
||||||
{
|
{
|
||||||
key: t("jobs.labels.net_repairs"),
|
key: t("jobs.labels.net_repairs"),
|
||||||
total: job.job_totals.totals.net_repairs,
|
total: job.job_totals.totals.net_repairs,
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { connect } from "react-redux";
|
|||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
|
import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component.jsx";
|
||||||
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
||||||
import FormItemEmail from "../form-items-formatted/email-form-item.component";
|
import FormItemEmail from "../form-items-formatted/email-form-item.component";
|
||||||
import FormItemPhone, { PhoneItemFormatterValidation } from "../form-items-formatted/phone-form-item.component";
|
import FormItemPhone, { PhoneItemFormatterValidation } from "../form-items-formatted/phone-form-item.component";
|
||||||
@@ -12,7 +13,6 @@ import Car from "../job-damage-visual/job-damage-visual.component";
|
|||||||
import JobsDetailChangeEstimator from "../jobs-detail-change-estimator/jobs-detail-change-estimator.component";
|
import JobsDetailChangeEstimator from "../jobs-detail-change-estimator/jobs-detail-change-estimator.component";
|
||||||
import JobsDetailChangeFileHandler from "../jobs-detail-change-filehandler/jobs-detail-change-filehandler.component";
|
import JobsDetailChangeFileHandler from "../jobs-detail-change-filehandler/jobs-detail-change-filehandler.component";
|
||||||
import FormRow from "../layout-form-row/layout-form-row.component";
|
import FormRow from "../layout-form-row/layout-form-row.component";
|
||||||
import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component.jsx";
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
jobRO: selectJobReadOnly,
|
jobRO: selectJobReadOnly,
|
||||||
@@ -185,6 +185,9 @@ export function JobsDetailGeneral({ bodyshop, jobRO, job, form }) {
|
|||||||
<Form.Item label={t("jobs.fields.towin")} name="towin" valuePropName="checked">
|
<Form.Item label={t("jobs.fields.towin")} name="towin" valuePropName="checked">
|
||||||
<Switch disabled={jobRO} />
|
<Switch disabled={jobRO} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item label={t("jobs.fields.tlos_ind")} name="tlos_ind" valuePropName="checked">
|
||||||
|
<Switch disabled={jobRO} />
|
||||||
|
</Form.Item>
|
||||||
</FormRow>
|
</FormRow>
|
||||||
</Col>
|
</Col>
|
||||||
<Col {...lossColDamage}>
|
<Col {...lossColDamage}>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useMutation } from "@apollo/client";
|
import { useMutation } from "@apollo/client";
|
||||||
import { Button, Card, Col, notification, Row, Table } from "antd";
|
import { Button, Card, Col, notification, Row, Table } from "antd";
|
||||||
import day from "../../utils/day";
|
import dayjs from "../../utils/day";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { UPDATE_PARTS_DISPATCH_LINE } from "../../graphql/parts-dispatch.queries";
|
import { UPDATE_PARTS_DISPATCH_LINE } from "../../graphql/parts-dispatch.queries";
|
||||||
@@ -11,7 +11,7 @@ export default function PartsDispatchExpander({ dispatch, job }) {
|
|||||||
const [updateDispatchLine] = useMutation(UPDATE_PARTS_DISPATCH_LINE);
|
const [updateDispatchLine] = useMutation(UPDATE_PARTS_DISPATCH_LINE);
|
||||||
|
|
||||||
const handleAccept = async ({ partsDispatchLineId }) => {
|
const handleAccept = async ({ partsDispatchLineId }) => {
|
||||||
const accepted_at = day();
|
const accepted_at = dayjs();
|
||||||
const result = await updateDispatchLine({
|
const result = await updateDispatchLine({
|
||||||
variables: { id: partsDispatchLineId, line: { accepted_at } },
|
variables: { id: partsDispatchLineId, line: { accepted_at } },
|
||||||
optimisticResponse: {
|
optimisticResponse: {
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
import { SyncOutlined } from "@ant-design/icons";
|
import { SyncOutlined } from "@ant-design/icons";
|
||||||
import { useApolloClient } from "@apollo/client";
|
|
||||||
import Board from "./trello-board/index";
|
|
||||||
import { Button, notification, Skeleton, Space } from "antd";
|
|
||||||
import { PageHeader } from "@ant-design/pro-layout";
|
import { PageHeader } from "@ant-design/pro-layout";
|
||||||
|
import { useApolloClient } from "@apollo/client";
|
||||||
|
import { Button, notification, Skeleton, Space } from "antd";
|
||||||
|
import cloneDeep from "lodash/cloneDeep";
|
||||||
|
import isEqual from "lodash/isEqual";
|
||||||
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
|
import NoteUpsertModal from "../../components/note-upsert-modal/note-upsert-modal.container";
|
||||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||||
import { generate_UPDATE_JOB_KANBAN } from "../../graphql/jobs.queries";
|
import { generate_UPDATE_JOB_KANBAN } from "../../graphql/jobs.queries";
|
||||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||||
@@ -15,14 +17,13 @@ import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
|||||||
import IndefiniteLoading from "../indefinite-loading/indefinite-loading.component";
|
import IndefiniteLoading from "../indefinite-loading/indefinite-loading.component";
|
||||||
import ProductionBoardFilters from "../production-board-filters/production-board-filters.component";
|
import ProductionBoardFilters from "../production-board-filters/production-board-filters.component";
|
||||||
import ProductionListDetailComponent from "../production-list-detail/production-list-detail.component";
|
import ProductionListDetailComponent from "../production-list-detail/production-list-detail.component";
|
||||||
|
import ProductionListPrint from "../production-list-table/production-list-print.component.jsx";
|
||||||
import CardColorLegend from "./production-board-kanban-card-color-legend.component.jsx";
|
import CardColorLegend from "./production-board-kanban-card-color-legend.component.jsx";
|
||||||
import "./production-board-kanban.styles.scss";
|
import "./production-board-kanban.styles.scss";
|
||||||
import { createBoardData } from "./production-board-kanban.utils.js";
|
import { createBoardData } from "./production-board-kanban.utils.js";
|
||||||
import ProductionBoardKanbanSettings from "./settings/production-board-kanban.settings.component.jsx";
|
|
||||||
import cloneDeep from "lodash/cloneDeep";
|
|
||||||
import isEqual from "lodash/isEqual";
|
|
||||||
import { defaultFilters, mergeWithDefaults } from "./settings/defaultKanbanSettings.js";
|
import { defaultFilters, mergeWithDefaults } from "./settings/defaultKanbanSettings.js";
|
||||||
import NoteUpsertModal from "../../components/note-upsert-modal/note-upsert-modal.container";
|
import ProductionBoardKanbanSettings from "./settings/production-board-kanban.settings.component.jsx";
|
||||||
|
import Board from "./trello-board/index";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop
|
bodyshop: selectBodyshop
|
||||||
@@ -214,6 +215,7 @@ function ProductionBoardKanbanComponent({ data, bodyshop, refetch, insertAuditTr
|
|||||||
bodyshop={bodyshop}
|
bodyshop={bodyshop}
|
||||||
data={data}
|
data={data}
|
||||||
/>
|
/>
|
||||||
|
<ProductionListPrint />
|
||||||
</Space>
|
</Space>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ export function ProductionListTable({ loading, data, refetch, bodyshop, technici
|
|||||||
|
|
||||||
const matchingColumnConfig = useMemo(() => {
|
const matchingColumnConfig = useMemo(() => {
|
||||||
return bodyshop?.production_config?.find((p) => p.name === defaultView);
|
return bodyshop?.production_config?.find((p) => p.name === defaultView);
|
||||||
}, [bodyshop.production_config]);
|
}, [bodyshop.production_config, defaultView]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const newColumns =
|
const newColumns =
|
||||||
|
|||||||
@@ -120,14 +120,6 @@ var formats = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const localizer = (dayjsLib) => {
|
const localizer = (dayjsLib) => {
|
||||||
// load dayjs plugins
|
|
||||||
dayjsLib.extend(isBetween);
|
|
||||||
dayjsLib.extend(isSameOrAfter);
|
|
||||||
dayjsLib.extend(isSameOrBefore);
|
|
||||||
dayjsLib.extend(localeData);
|
|
||||||
dayjsLib.extend(localizedFormat);
|
|
||||||
dayjsLib.extend(minMax);
|
|
||||||
dayjsLib.extend(utc);
|
|
||||||
var locale = function locale(dj, c) {
|
var locale = function locale(dj, c) {
|
||||||
return c ? dj.locale(c) : dj;
|
return c ? dj.locale(c) : dj;
|
||||||
};
|
};
|
||||||
@@ -136,7 +128,8 @@ const localizer = (dayjsLib) => {
|
|||||||
// then use the timezone aware version
|
// then use the timezone aware version
|
||||||
|
|
||||||
//TODO This was the issue entirely...
|
//TODO This was the issue entirely...
|
||||||
// var dayjs = dayjsLib.tz ? dayjsLib.tz : dayjsLib;
|
// var dayjs = dayjsLib.tz ? dayjsLib.tz : dayjsLib;
|
||||||
|
|
||||||
var dayjs = dayjsLib;
|
var dayjs = dayjsLib;
|
||||||
|
|
||||||
function getTimezoneOffset(date) {
|
function getTimezoneOffset(date) {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ const mapStateToProps = createStructuredSelector({
|
|||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
problemJobs: selectProblemJobs
|
problemJobs: selectProblemJobs
|
||||||
});
|
});
|
||||||
|
|
||||||
const localizer = local(dayjs);
|
const localizer = local(dayjs);
|
||||||
|
|
||||||
export function ScheduleCalendarWrapperComponent({
|
export function ScheduleCalendarWrapperComponent({
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { Button, Col, Form, Input, Row, Select, Space, Switch, Typography } from "antd";
|
import { Button, Col, Form, Input, Row, Select, Space, Switch, Typography } from "antd";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import dayjs from "../../utils/day";
|
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -8,13 +7,14 @@ import { createStructuredSelector } from "reselect";
|
|||||||
import { calculateScheduleLoad } from "../../redux/application/application.actions";
|
import { calculateScheduleLoad } from "../../redux/application/application.actions";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import { DateFormatter } from "../../utils/DateFormatter";
|
import { DateFormatter } from "../../utils/DateFormatter";
|
||||||
|
import dayjs from "../../utils/day";
|
||||||
|
import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
||||||
import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component";
|
import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component";
|
||||||
import EmailInput from "../form-items-formatted/email-form-item.component";
|
import EmailInput from "../form-items-formatted/email-form-item.component";
|
||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
import ScheduleDayViewContainer from "../schedule-day-view/schedule-day-view.container";
|
import ScheduleDayViewContainer from "../schedule-day-view/schedule-day-view.container";
|
||||||
import ScheduleExistingAppointmentsList from "../schedule-existing-appointments-list/schedule-existing-appointments-list.component";
|
import ScheduleExistingAppointmentsList from "../schedule-existing-appointments-list/schedule-existing-appointments-list.component";
|
||||||
import "./schedule-job-modal.scss";
|
import "./schedule-job-modal.scss";
|
||||||
import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop
|
bodyshop: selectBodyshop
|
||||||
@@ -84,7 +84,7 @@ export function ScheduleJobModalComponent({
|
|||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<DateTimePicker onBlur={handleDateBlur} onlyFuture />
|
<DateTimePicker onBlur={handleDateBlur} onlyFuture isSeparatedTime />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="scheduled_completion"
|
name="scheduled_completion"
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ import ScoreboardChart from "../scoreboard-chart/scoreboard-chart.component";
|
|||||||
import ScoreboardLastDays from "../scoreboard-last-days/scoreboard-last-days.component";
|
import ScoreboardLastDays from "../scoreboard-last-days/scoreboard-last-days.component";
|
||||||
import ScoreboardTargetsTable from "../scoreboard-targets-table/scoreboard-targets-table.component";
|
import ScoreboardTargetsTable from "../scoreboard-targets-table/scoreboard-targets-table.component";
|
||||||
|
|
||||||
|
import { useApolloClient, useQuery } from "@apollo/client";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
|
import { GET_BLOCKED_DAYS, QUERY_SCOREBOARD } from "../../graphql/scoreboard.queries";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import dayjs from "../../utils/day";
|
import dayjs from "../../utils/day";
|
||||||
import { useApolloClient, useQuery } from "@apollo/client";
|
|
||||||
import { GET_BLOCKED_DAYS, QUERY_SCOREBOARD } from "../../graphql/scoreboard.queries";
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
//currentUser: selectCurrentUser
|
||||||
@@ -26,7 +26,7 @@ export function ScoreboardDisplayComponent({ bodyshop }) {
|
|||||||
start: dayjs().startOf("month"),
|
start: dayjs().startOf("month"),
|
||||||
end: dayjs().endOf("month")
|
end: dayjs().endOf("month")
|
||||||
},
|
},
|
||||||
pollInterval: 60000
|
pollInterval: 60000*5
|
||||||
});
|
});
|
||||||
|
|
||||||
const { data } = scoreboardSubscription;
|
const { data } = scoreboardSubscription;
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import { useQuery } from "@apollo/client";
|
import { useQuery } from "@apollo/client";
|
||||||
import { Col, Row } from "antd";
|
import { Col, Row } from "antd";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import dayjs from "../../utils/day";
|
|
||||||
import React, { useMemo } from "react";
|
import React, { useMemo } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { QUERY_TIME_TICKETS_IN_RANGE_SB } from "../../graphql/timetickets.queries";
|
import { QUERY_TIME_TICKETS_IN_RANGE_SB } from "../../graphql/timetickets.queries";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
|
import dayjs from "../../utils/day";
|
||||||
import AlertComponent from "../alert/alert.component";
|
import AlertComponent from "../alert/alert.component";
|
||||||
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
||||||
import * as Utils from "../scoreboard-targets-table/scoreboard-targets-table.util";
|
import * as Utils from "../scoreboard-targets-table/scoreboard-targets-table.util";
|
||||||
@@ -86,7 +86,7 @@ export function ScoreboardTimeTicketsStats({ bodyshop }) {
|
|||||||
},
|
},
|
||||||
fetchPolicy: "network-only",
|
fetchPolicy: "network-only",
|
||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
pollInterval: 60000,
|
pollInterval: 60000*5,
|
||||||
skip: !fixedPeriods
|
skip: !fixedPeriods
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { useQuery } from "@apollo/client";
|
import { useQuery } from "@apollo/client";
|
||||||
import { Col, Row } from "antd";
|
import { Col, Row } from "antd";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import dayjs from "../../utils/day";
|
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
import React, { useMemo } from "react";
|
import React, { useMemo } from "react";
|
||||||
import { useLocation } from "react-router-dom";
|
import { useLocation } from "react-router-dom";
|
||||||
import { QUERY_TIME_TICKETS_IN_RANGE_SB } from "../../graphql/timetickets.queries";
|
import { QUERY_TIME_TICKETS_IN_RANGE_SB } from "../../graphql/timetickets.queries";
|
||||||
|
import dayjs from "../../utils/day";
|
||||||
import AlertComponent from "../alert/alert.component";
|
import AlertComponent from "../alert/alert.component";
|
||||||
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
||||||
import * as Utils from "../scoreboard-targets-table/scoreboard-targets-table.util";
|
import * as Utils from "../scoreboard-targets-table/scoreboard-targets-table.util";
|
||||||
@@ -68,7 +68,7 @@ export default function ScoreboardTimeTickets() {
|
|||||||
},
|
},
|
||||||
fetchPolicy: "network-only",
|
fetchPolicy: "network-only",
|
||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
pollInterval: 60000,
|
pollInterval: 60000*5,
|
||||||
skip: !fixedPeriods
|
skip: !fixedPeriods
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ export function ShopInfoComponent({ bodyshop, form, saveLoading }) {
|
|||||||
rome: [
|
rome: [
|
||||||
{
|
{
|
||||||
key: "intellipay",
|
key: "intellipay",
|
||||||
label: t("bodyshop.labels.intellipay"),
|
label: InstanceRenderManager({ rome: t("bodyshop.labels.romepay"), imex: t("bodyshop.labels.imexpay") }),
|
||||||
children: <ShopInfoIntellipay form={form} />
|
children: <ShopInfoIntellipay form={form} />
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -676,7 +676,7 @@ export function ShopInfoGeneral({ form, bodyshop }) {
|
|||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Input.TextArea rows={3} />
|
<Input.TextArea autoSize />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
<DeleteFilled
|
<DeleteFilled
|
||||||
@@ -737,7 +737,7 @@ export function ShopInfoGeneral({ form, bodyshop }) {
|
|||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Input.TextArea rows={3} />
|
<Input.TextArea autoSize />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
<DeleteFilled
|
<DeleteFilled
|
||||||
@@ -1187,7 +1187,7 @@ export function ShopInfoGeneral({ form, bodyshop }) {
|
|||||||
key={`${index}line_desc`}
|
key={`${index}line_desc`}
|
||||||
name={[field.name, "line_desc"]}
|
name={[field.name, "line_desc"]}
|
||||||
>
|
>
|
||||||
<Input />
|
<Input.TextArea autoSize />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("joblines.fields.mod_lbr_ty")}
|
label={t("joblines.fields.mod_lbr_ty")}
|
||||||
@@ -1330,7 +1330,7 @@ export function ShopInfoGeneral({ form, bodyshop }) {
|
|||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Input />
|
<Input.TextArea autoSize />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
|
|||||||
@@ -39,14 +39,13 @@ export function ShopInfoIntellipay({ bodyshop, form }) {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.intellipay_config.cash_discount_percentage")}
|
label={t("bodyshop.fields.intellipay_config.cash_discount_percentage")}
|
||||||
valuePropName="checked"
|
|
||||||
dependencies={[["intellipay_config", "enable_cash_discount"]]}
|
dependencies={[["intellipay_config", "enable_cash_discount"]]}
|
||||||
name={["intellipay_config", "cash_discount_percentage"]}
|
name={["intellipay_config", "cash_discount_percentage"]}
|
||||||
rules={[
|
rules={[
|
||||||
({ getFieldsValue }) => ({ required: form.getFieldValue(["intellipay_config", "enable_cash_discount"]) })
|
({ getFieldsValue }) => ({ required: form.getFieldValue(["intellipay_config", "enable_cash_discount"]) })
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<InputNumber min={0} max={100} precision={1} suffix='%'/>
|
<InputNumber min={0} max={100} precision={1} suffix="%" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,10 +1,3 @@
|
|||||||
import { Button, Card, Space, Switch, Table } from "antd";
|
|
||||||
import queryString from "query-string";
|
|
||||||
import React, { useCallback, useEffect } from "react";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { Link, useLocation, useNavigate } from "react-router-dom";
|
|
||||||
import { pageLimit } from "../../utils/config";
|
|
||||||
import dayjs from "../../utils/day";
|
|
||||||
import {
|
import {
|
||||||
CheckCircleFilled,
|
CheckCircleFilled,
|
||||||
CheckCircleOutlined,
|
CheckCircleOutlined,
|
||||||
@@ -15,9 +8,16 @@ import {
|
|||||||
PlusCircleFilled,
|
PlusCircleFilled,
|
||||||
SyncOutlined
|
SyncOutlined
|
||||||
} from "@ant-design/icons";
|
} from "@ant-design/icons";
|
||||||
import { DateFormatter, DateTimeFormatter } from "../../utils/DateFormatter.jsx";
|
import { Button, Card, Space, Switch, Table } from "antd";
|
||||||
|
import queryString from "query-string";
|
||||||
|
import React, { useCallback, useEffect } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
|
import { Link, useLocation, useNavigate } from "react-router-dom";
|
||||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||||
|
import { pageLimit } from "../../utils/config";
|
||||||
|
import { DateFormatter, DateTimeFormatter } from "../../utils/DateFormatter.jsx";
|
||||||
|
import dayjs from "../../utils/day";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Task List Component
|
* Task List Component
|
||||||
@@ -140,6 +140,17 @@ function TaskListComponent({
|
|||||||
render: (text, record) => <DateTimeFormatter>{record.created_at}</DateTimeFormatter>
|
render: (text, record) => <DateTimeFormatter>{record.created_at}</DateTimeFormatter>
|
||||||
});
|
});
|
||||||
|
|
||||||
|
columns.push({
|
||||||
|
title: t("tasks.fields.created_by"),
|
||||||
|
dataIndex: "created_by",
|
||||||
|
key: "created_by",
|
||||||
|
width: "8%",
|
||||||
|
defaultSortOrder: "descend",
|
||||||
|
sorter: true,
|
||||||
|
sortOrder: sortcolumn === "created_by" && sortorder,
|
||||||
|
render: (text, record) => record.created_by
|
||||||
|
});
|
||||||
|
|
||||||
if (!onlyMine) {
|
if (!onlyMine) {
|
||||||
columns.push({
|
columns.push({
|
||||||
title: t("tasks.fields.assigned_to"),
|
title: t("tasks.fields.assigned_to"),
|
||||||
@@ -155,65 +166,70 @@ function TaskListComponent({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showRo) {
|
columns.push({
|
||||||
columns.push({
|
title: t("tasks.fields.related_items"),
|
||||||
title: t("tasks.fields.job.ro_number"),
|
key: "related_items",
|
||||||
dataIndex: ["job", "ro_number"],
|
width: "12%",
|
||||||
key: "job.ro_number",
|
render: (text, record) => {
|
||||||
width: "8%",
|
const items = [];
|
||||||
render: (text, record) =>
|
|
||||||
record.job ? (
|
// Job
|
||||||
<Link to={`/manage/jobs/${record.job.id}?tab=tasks`}>{record.job.ro_number || t("general.labels.na")}</Link>
|
if (showRo && record.job) {
|
||||||
) : (
|
items.push(
|
||||||
t("general.labels.na")
|
<Link key="job" to={`/manage/jobs/${record.job.id}?tab=tasks`}>
|
||||||
)
|
{t("tasks.fields.job.ro_number")}: {record.job.ro_number}
|
||||||
});
|
</Link>
|
||||||
}
|
);
|
||||||
|
}
|
||||||
|
if (showRo && !record.job) {
|
||||||
|
items.push(`${t("tasks.fields.job.ro_number")}: ${t("general.labels.na")}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Jobline
|
||||||
|
if (record.jobline?.line_desc) {
|
||||||
|
items.push(
|
||||||
|
<span key="jobline">
|
||||||
|
{t("tasks.fields.jobline")}: {record.jobline.line_desc}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parts Order
|
||||||
|
if (record.parts_order) {
|
||||||
|
const { order_number, vendor } = record.parts_order;
|
||||||
|
const partsOrderText =
|
||||||
|
order_number && vendor?.name ? `${order_number} - ${vendor.name}` : t("general.labels.na");
|
||||||
|
items.push(
|
||||||
|
<Link
|
||||||
|
key="parts_order"
|
||||||
|
to={`/manage/jobs/${record.job.id}?partsorderid=${record.parts_order.id}&tab=partssublet`}
|
||||||
|
>
|
||||||
|
{t("tasks.fields.parts_order")}: {partsOrderText}
|
||||||
|
</Link>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bill
|
||||||
|
if (record.bill) {
|
||||||
|
const { invoice_number, vendor } = record.bill;
|
||||||
|
const billText = invoice_number && vendor?.name ? `${invoice_number} - ${vendor.name}` : t("general.labels.na");
|
||||||
|
items.push(
|
||||||
|
<Link key="bill" to={`/manage/jobs/${record.job.id}?billid=${record.bill.id}&tab=partssublet`}>
|
||||||
|
{t("tasks.fields.bill")}: {billText}
|
||||||
|
</Link>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return items.length > 0 ? <Space direction="vertical">{items}</Space> : null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
columns.push(
|
columns.push(
|
||||||
{
|
|
||||||
title: t("tasks.fields.jobline"),
|
|
||||||
dataIndex: ["jobline", "id"],
|
|
||||||
key: "jobline.id",
|
|
||||||
width: "8%",
|
|
||||||
render: (text, record) => record?.jobline?.line_desc || ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("tasks.fields.parts_order"),
|
|
||||||
dataIndex: ["parts_order", "id"],
|
|
||||||
key: "part_order.id",
|
|
||||||
width: "8%",
|
|
||||||
render: (text, record) =>
|
|
||||||
record.parts_order ? (
|
|
||||||
<Link to={`/manage/jobs/${record.job.id}?partsorderid=${record.parts_order.id}&tab=partssublet`}>
|
|
||||||
{record.parts_order.order_number && record.parts_order.vendor && record.parts_order.vendor.name
|
|
||||||
? `${record.parts_order.order_number} - ${record.parts_order.vendor.name}`
|
|
||||||
: t("general.labels.na")}
|
|
||||||
</Link>
|
|
||||||
) : (
|
|
||||||
""
|
|
||||||
)
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("tasks.fields.bill"),
|
|
||||||
dataIndex: ["bill", "id"],
|
|
||||||
key: "bill.id",
|
|
||||||
width: "10%",
|
|
||||||
render: (text, record) =>
|
|
||||||
record.bill ? (
|
|
||||||
<Link to={`/manage/jobs/${record.job.id}?billid=${record.bill.id}&tab=partssublet`}>
|
|
||||||
{record.bill.invoice_number && record.bill.vendor && record.bill.vendor.name
|
|
||||||
? `${record.bill.invoice_number} - ${record.bill.vendor.name}`
|
|
||||||
: t("general.labels.na")}
|
|
||||||
</Link>
|
|
||||||
) : (
|
|
||||||
""
|
|
||||||
)
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: t("tasks.fields.title"),
|
title: t("tasks.fields.title"),
|
||||||
dataIndex: "title",
|
dataIndex: "title",
|
||||||
key: "title",
|
key: "title",
|
||||||
|
minWidth: "20%",
|
||||||
sorter: true,
|
sorter: true,
|
||||||
sortOrder: sortcolumn === "title" && sortorder
|
sortOrder: sortcolumn === "title" && sortorder
|
||||||
},
|
},
|
||||||
@@ -247,7 +263,7 @@ function TaskListComponent({
|
|||||||
{
|
{
|
||||||
title: t("tasks.fields.actions"),
|
title: t("tasks.fields.actions"),
|
||||||
key: "toggleCompleted",
|
key: "toggleCompleted",
|
||||||
width: "5%",
|
width: "8%",
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<Space direction="horizontal">
|
<Space direction="horizontal">
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export function TimeTicketList({
|
|||||||
extra
|
extra
|
||||||
}) {
|
}) {
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
sortedInfo: {},
|
sortedInfo: { columnKey: 'date', order: 'descend' },
|
||||||
filteredInfo: { text: "" }
|
filteredInfo: { text: "" }
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useMutation, useQuery } from "@apollo/client";
|
|
||||||
import { Button, Form, Modal, notification, Space } from "antd";
|
|
||||||
import { PageHeader } from "@ant-design/pro-layout";
|
import { PageHeader } from "@ant-design/pro-layout";
|
||||||
import dayjs from "../../utils/day";
|
import { useMutation, useQuery } from "@apollo/client";
|
||||||
|
import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
||||||
|
import { Button, Form, Modal, notification, Space } from "antd";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -11,9 +11,9 @@ import { INSERT_NEW_TIME_TICKET, UPDATE_TIME_TICKET } from "../../graphql/timeti
|
|||||||
import { toggleModalVisible } from "../../redux/modals/modals.actions";
|
import { toggleModalVisible } from "../../redux/modals/modals.actions";
|
||||||
import { selectTimeTicket } from "../../redux/modals/modals.selectors";
|
import { selectTimeTicket } from "../../redux/modals/modals.selectors";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import TimeTicketModalComponent from "./time-ticket-modal.component";
|
import dayjs from "../../utils/day";
|
||||||
import TimeTicketsCommitToggleComponent from "../time-tickets-commit-toggle/time-tickets-commit-toggle.component";
|
import TimeTicketsCommitToggleComponent from "../time-tickets-commit-toggle/time-tickets-commit-toggle.component";
|
||||||
import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
import TimeTicketModalComponent from "./time-ticket-modal.component";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
timeTicketModal: selectTimeTicket,
|
timeTicketModal: selectTimeTicket,
|
||||||
@@ -87,7 +87,7 @@ export function TimeTicketModalContainer({ timeTicketModal, toggleModalVisible,
|
|||||||
if (enterAgain) {
|
if (enterAgain) {
|
||||||
//Capture the existing information and repopulate it.
|
//Capture the existing information and repopulate it.
|
||||||
|
|
||||||
const prev = form.getFieldsValue(["date", "employeeid"]);
|
const prev = form.getFieldsValue(["date", "employeeid", "flat_rate"]);
|
||||||
|
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useMutation } from "@apollo/client";
|
import { useMutation } from "@apollo/client";
|
||||||
import { Button, notification } from "antd";
|
import { Button, notification } from "antd";
|
||||||
import day from "../../utils/day";
|
import dayjs from "../../utils/day";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -29,7 +29,7 @@ export function TimeTicketsCommit({ bodyshop, currentUser, timeticket, disabled,
|
|||||||
? { commited_by: null, committed_at: null }
|
? { commited_by: null, committed_at: null }
|
||||||
: {
|
: {
|
||||||
commited_by: currentUser.email,
|
commited_by: currentUser.email,
|
||||||
committed_at: day()
|
committed_at: dayjs()
|
||||||
};
|
};
|
||||||
|
|
||||||
const result = await updateTimeTicket({
|
const result = await updateTimeTicket({
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useMutation } from "@apollo/client";
|
import { useMutation } from "@apollo/client";
|
||||||
import { Button, notification } from "antd";
|
import { Button, notification } from "antd";
|
||||||
import day from "../../utils/day";
|
import dayjs from "../../utils/day";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -34,7 +34,7 @@ export function TimeTicketsCommit({
|
|||||||
timeticketIds: timetickets.map((ticket) => ticket.id),
|
timeticketIds: timetickets.map((ticket) => ticket.id),
|
||||||
timeticket: {
|
timeticket: {
|
||||||
commited_by: currentUser.email,
|
commited_by: currentUser.email,
|
||||||
committed_at: day()
|
committed_at: dayjs()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
update(cache) {
|
update(cache) {
|
||||||
@@ -47,7 +47,7 @@ export function TimeTicketsCommit({
|
|||||||
return {
|
return {
|
||||||
...ticket,
|
...ticket,
|
||||||
commited_by: currentUser.email,
|
commited_by: currentUser.email,
|
||||||
committed_at: day()
|
committed_at: dayjs()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return ticket;
|
return ticket;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useApolloClient } from "@apollo/client";
|
import { useApolloClient } from "@apollo/client";
|
||||||
import { Button, notification } from "antd";
|
import { Button, notification } from "antd";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import day from "../../utils/day";
|
import dayjs from "../../utils/day";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -49,7 +49,7 @@ export function TtApproveButton({
|
|||||||
})),
|
})),
|
||||||
approvalIds: selectedTickets,
|
approvalIds: selectedTickets,
|
||||||
approvalUpdate: {
|
approvalUpdate: {
|
||||||
approved_at: day(),
|
approved_at: dayjs(),
|
||||||
approved_by: currentUser.email
|
approved_by: currentUser.email
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import { useEffect, useState, useRef } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import SocketIO from "socket.io-client";
|
import SocketIO from "socket.io-client";
|
||||||
import { auth } from "../../firebase/firebase.utils";
|
import { auth } from "../../firebase/firebase.utils";
|
||||||
import { store } from "../../redux/store";
|
import { store } from "../../redux/store";
|
||||||
import { setWssStatus } from "../../redux/application/application.actions";
|
import { addAlerts, setWssStatus } from "../../redux/application/application.actions";
|
||||||
|
|
||||||
const useSocket = (bodyshop) => {
|
const useSocket = (bodyshop) => {
|
||||||
const socketRef = useRef(null);
|
const socketRef = useRef(null);
|
||||||
const [clientId, setClientId] = useState(null);
|
const [clientId, setClientId] = useState(null);
|
||||||
@@ -31,6 +32,14 @@ const useSocket = (bodyshop) => {
|
|||||||
socketRef.current = socketInstance;
|
socketRef.current = socketInstance;
|
||||||
|
|
||||||
const handleBodyshopMessage = (message) => {
|
const handleBodyshopMessage = (message) => {
|
||||||
|
if (!message || !message?.type) return;
|
||||||
|
|
||||||
|
switch (message.type) {
|
||||||
|
case "alert-update":
|
||||||
|
store.dispatch(addAlerts(message.payload));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (!import.meta.env.DEV) return;
|
if (!import.meta.env.DEV) return;
|
||||||
console.log(`Received message for bodyshop ${bodyshop.id}:`, message);
|
console.log(`Received message for bodyshop ${bodyshop.id}:`, message);
|
||||||
};
|
};
|
||||||
@@ -39,22 +48,22 @@ const useSocket = (bodyshop) => {
|
|||||||
console.log("Socket connected:", socketInstance.id);
|
console.log("Socket connected:", socketInstance.id);
|
||||||
socketInstance.emit("join-bodyshop-room", bodyshop.id);
|
socketInstance.emit("join-bodyshop-room", bodyshop.id);
|
||||||
setClientId(socketInstance.id);
|
setClientId(socketInstance.id);
|
||||||
store.dispatch(setWssStatus("connected"))
|
store.dispatch(setWssStatus("connected"));
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleReconnect = (attempt) => {
|
const handleReconnect = (attempt) => {
|
||||||
console.log(`Socket reconnected after ${attempt} attempts`);
|
console.log(`Socket reconnected after ${attempt} attempts`);
|
||||||
store.dispatch(setWssStatus("connected"))
|
store.dispatch(setWssStatus("connected"));
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleConnectionError = (err) => {
|
const handleConnectionError = (err) => {
|
||||||
console.error("Socket connection error:", err);
|
console.error("Socket connection error:", err);
|
||||||
store.dispatch(setWssStatus("error"))
|
store.dispatch(setWssStatus("error"));
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleDisconnect = () => {
|
const handleDisconnect = () => {
|
||||||
console.log("Socket disconnected");
|
console.log("Socket disconnected");
|
||||||
store.dispatch(setWssStatus("disconnected"))
|
store.dispatch(setWssStatus("disconnected"));
|
||||||
};
|
};
|
||||||
|
|
||||||
socketInstance.on("connect", handleConnect);
|
socketInstance.on("connect", handleConnect);
|
||||||
|
|||||||
@@ -81,14 +81,14 @@ export const logImEXEvent = (eventName, additionalParams, stateProp = null) => {
|
|||||||
user: (state.user && state.user.currentUser && state.user.currentUser.email) || null,
|
user: (state.user && state.user.currentUser && state.user.currentUser.email) || null,
|
||||||
...additionalParams
|
...additionalParams
|
||||||
};
|
};
|
||||||
axios.post("/ioevent", {
|
// axios.post("/ioevent", {
|
||||||
useremail: (state.user && state.user.currentUser && state.user.currentUser.email) || null,
|
// useremail: (state.user && state.user.currentUser && state.user.currentUser.email) || null,
|
||||||
bodyshopid: (state.user && state.user.bodyshop && state.user.bodyshop.id) || null,
|
// bodyshopid: (state.user && state.user.bodyshop && state.user.bodyshop.id) || null,
|
||||||
operationName: eventName,
|
// operationName: eventName,
|
||||||
variables: additionalParams,
|
// variables: additionalParams,
|
||||||
dbevent: false,
|
// dbevent: false,
|
||||||
env: `master-AIO|${import.meta.env.VITE_APP_GIT_SHA_DATE}`
|
// env: `master-AIO|${import.meta.env.VITE_APP_GIT_SHA_DATE}`
|
||||||
});
|
// });
|
||||||
// console.log(
|
// console.log(
|
||||||
// "%c[Analytics]",
|
// "%c[Analytics]",
|
||||||
// "background-color: green ;font-weight:bold;",
|
// "background-color: green ;font-weight:bold;",
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ export const QUERY_ALL_ACTIVE_APPOINTMENTS = gql`
|
|||||||
v_model_desc
|
v_model_desc
|
||||||
est_ct_fn
|
est_ct_fn
|
||||||
est_ct_ln
|
est_ct_ln
|
||||||
|
comment
|
||||||
labhrs: joblines_aggregate(where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }) {
|
labhrs: joblines_aggregate(where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }) {
|
||||||
aggregate {
|
aggregate {
|
||||||
sum {
|
sum {
|
||||||
|
|||||||
@@ -692,6 +692,7 @@ export const GET_JOB_BY_PK = gql`
|
|||||||
tax_str_rt
|
tax_str_rt
|
||||||
tax_sub_rt
|
tax_sub_rt
|
||||||
tax_tow_rt
|
tax_tow_rt
|
||||||
|
tlos_ind
|
||||||
towin
|
towin
|
||||||
towing_payable
|
towing_payable
|
||||||
unit_number
|
unit_number
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { gql } from "@apollo/client";
|
|||||||
|
|
||||||
export const QUERY_TICKETS_BY_JOBID = gql`
|
export const QUERY_TICKETS_BY_JOBID = gql`
|
||||||
query QUERY_TICKETS_BY_JOBID($jobid: uuid!) {
|
query QUERY_TICKETS_BY_JOBID($jobid: uuid!) {
|
||||||
timetickets(where: { jobid: { _eq: $jobid } }, order_by: { date: desc_nulls_first }) {
|
timetickets(where: { jobid: { _eq: $jobid } }) {
|
||||||
actualhrs
|
actualhrs
|
||||||
cost_center
|
cost_center
|
||||||
ciecacode
|
ciecacode
|
||||||
@@ -26,7 +26,7 @@ export const QUERY_TICKETS_BY_JOBID = gql`
|
|||||||
|
|
||||||
export const QUERY_TIME_TICKETS_IN_RANGE = gql`
|
export const QUERY_TIME_TICKETS_IN_RANGE = gql`
|
||||||
query QUERY_TIME_TICKETS_IN_RANGE($start: date!, $end: date!) {
|
query QUERY_TIME_TICKETS_IN_RANGE($start: date!, $end: date!) {
|
||||||
timetickets(where: { date: { _gte: $start, _lte: $end } }, order_by: { date: desc_nulls_first }) {
|
timetickets(where: { date: { _gte: $start, _lte: $end } }) {
|
||||||
actualhrs
|
actualhrs
|
||||||
ciecacode
|
ciecacode
|
||||||
clockoff
|
clockoff
|
||||||
@@ -69,7 +69,6 @@ export const QUERY_TIME_TICKETS_TECHNICIAN_IN_RANGE = gql`
|
|||||||
) {
|
) {
|
||||||
timetickets(
|
timetickets(
|
||||||
where: { date: { _gte: $start, _lte: $end }, employeeid: { _eq: $employeeid } }
|
where: { date: { _gte: $start, _lte: $end }, employeeid: { _eq: $employeeid } }
|
||||||
order_by: { date: desc_nulls_first }
|
|
||||||
) {
|
) {
|
||||||
actualhrs
|
actualhrs
|
||||||
ciecacode
|
ciecacode
|
||||||
@@ -101,7 +100,6 @@ export const QUERY_TIME_TICKETS_TECHNICIAN_IN_RANGE = gql`
|
|||||||
}
|
}
|
||||||
fixedperiod: timetickets(
|
fixedperiod: timetickets(
|
||||||
where: { date: { _gte: $fixedStart, _lte: $fixedEnd }, employeeid: { _eq: $employeeid } }
|
where: { date: { _gte: $fixedStart, _lte: $fixedEnd }, employeeid: { _eq: $employeeid } }
|
||||||
order_by: { date: desc_nulls_first }
|
|
||||||
) {
|
) {
|
||||||
actualhrs
|
actualhrs
|
||||||
ciecacode
|
ciecacode
|
||||||
@@ -145,7 +143,6 @@ export const QUERY_TIME_TICKETS_IN_RANGE_SB = gql`
|
|||||||
) {
|
) {
|
||||||
timetickets(
|
timetickets(
|
||||||
where: { date: { _gte: $start, _lte: $end }, cost_center: { _neq: "timetickets.labels.shift" } }
|
where: { date: { _gte: $start, _lte: $end }, cost_center: { _neq: "timetickets.labels.shift" } }
|
||||||
order_by: { date: desc_nulls_first }
|
|
||||||
) {
|
) {
|
||||||
actualhrs
|
actualhrs
|
||||||
ciecacode
|
ciecacode
|
||||||
@@ -180,7 +177,6 @@ export const QUERY_TIME_TICKETS_IN_RANGE_SB = gql`
|
|||||||
}
|
}
|
||||||
fixedperiod: timetickets(
|
fixedperiod: timetickets(
|
||||||
where: { date: { _gte: $fixedStart, _lte: $fixedEnd }, cost_center: { _neq: "timetickets.labels.shift" } }
|
where: { date: { _gte: $fixedStart, _lte: $fixedEnd }, cost_center: { _neq: "timetickets.labels.shift" } }
|
||||||
order_by: { date: desc_nulls_first }
|
|
||||||
) {
|
) {
|
||||||
actualhrs
|
actualhrs
|
||||||
ciecacode
|
ciecacode
|
||||||
@@ -335,7 +331,6 @@ export const UPDATE_TIME_TICKETS = gql`
|
|||||||
export const QUERY_ACTIVE_TIME_TICKETS = gql`
|
export const QUERY_ACTIVE_TIME_TICKETS = gql`
|
||||||
query QUERY_ACTIVE_TIME_TICKETS($employeeId: uuid) {
|
query QUERY_ACTIVE_TIME_TICKETS($employeeId: uuid) {
|
||||||
timetickets(
|
timetickets(
|
||||||
order_by: { date: desc_nulls_first }
|
|
||||||
where: {
|
where: {
|
||||||
_and: {
|
_and: {
|
||||||
clockoff: { _is_null: true }
|
clockoff: { _is_null: true }
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
|||||||
...logs,
|
...logs,
|
||||||
{
|
{
|
||||||
timestamp: new Date(),
|
timestamp: new Date(),
|
||||||
level: "WARNING",
|
level: "WARN",
|
||||||
message: "Reconnected to CDK Export Service"
|
message: "Reconnected to CDK Export Service"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -123,10 +123,9 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
|||||||
socket.emit("set-log-level", value);
|
socket.emit("set-log-level", value);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Select.Option key="TRACE">TRACE</Select.Option>
|
|
||||||
<Select.Option key="DEBUG">DEBUG</Select.Option>
|
<Select.Option key="DEBUG">DEBUG</Select.Option>
|
||||||
<Select.Option key="INFO">INFO</Select.Option>
|
<Select.Option key="INFO">INFO</Select.Option>
|
||||||
<Select.Option key="WARNING">WARNING</Select.Option>
|
<Select.Option key="WARN">WARN</Select.Option>
|
||||||
<Select.Option key="ERROR">ERROR</Select.Option>
|
<Select.Option key="ERROR">ERROR</Select.Option>
|
||||||
</Select>
|
</Select>
|
||||||
<Button onClick={() => setLogs([])}>Clear Logs</Button>
|
<Button onClick={() => setLogs([])}>Clear Logs</Button>
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader, inse
|
|||||||
...logs,
|
...logs,
|
||||||
{
|
{
|
||||||
timestamp: new Date(),
|
timestamp: new Date(),
|
||||||
level: "WARNING",
|
level: "warn",
|
||||||
message: "Reconnected to CDK Export Service"
|
message: "Reconnected to CDK Export Service"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -173,10 +173,9 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader, inse
|
|||||||
socket.emit("set-log-level", value);
|
socket.emit("set-log-level", value);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Select.Option key="TRACE">TRACE</Select.Option>
|
|
||||||
<Select.Option key="DEBUG">DEBUG</Select.Option>
|
<Select.Option key="DEBUG">DEBUG</Select.Option>
|
||||||
<Select.Option key="INFO">INFO</Select.Option>
|
<Select.Option key="INFO">INFO</Select.Option>
|
||||||
<Select.Option key="WARNING">WARNING</Select.Option>
|
<Select.Option key="WARN">WARN</Select.Option>
|
||||||
<Select.Option key="ERROR">ERROR</Select.Option>
|
<Select.Option key="ERROR">ERROR</Select.Option>
|
||||||
</Select>
|
</Select>
|
||||||
<Button onClick={() => setLogs([])}>Clear Logs</Button>
|
<Button onClick={() => setLogs([])}>Clear Logs</Button>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { FloatButton, Layout, Spin } from "antd";
|
import { FloatButton, Layout, notification, Spin } from "antd";
|
||||||
// import preval from "preval.macro";
|
// import preval from "preval.macro";
|
||||||
import React, { lazy, Suspense, useContext, useEffect, useState } from "react";
|
import React, { lazy, Suspense, useContext, useEffect, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -21,11 +21,12 @@ import ShopSubStatusComponent from "../../components/shop-sub-status/shop-sub-st
|
|||||||
import { requestForToken } from "../../firebase/firebase.utils";
|
import { requestForToken } from "../../firebase/firebase.utils";
|
||||||
import SocketContext from "../../contexts/SocketIO/socketContext.jsx";
|
import SocketContext from "../../contexts/SocketIO/socketContext.jsx";
|
||||||
import { selectBodyshop, selectInstanceConflict } from "../../redux/user/user.selectors";
|
import { selectBodyshop, selectInstanceConflict } from "../../redux/user/user.selectors";
|
||||||
|
|
||||||
import UpdateAlert from "../../components/update-alert/update-alert.component";
|
import UpdateAlert from "../../components/update-alert/update-alert.component";
|
||||||
import InstanceRenderManager from "../../utils/instanceRenderMgr.js";
|
import InstanceRenderManager from "../../utils/instanceRenderMgr.js";
|
||||||
import "./manage.page.styles.scss";
|
import "./manage.page.styles.scss";
|
||||||
import WssStatusDisplayComponent from "../../components/wss-status-display/wss-status-display.component.jsx";
|
import WssStatusDisplayComponent from "../../components/wss-status-display/wss-status-display.component.jsx";
|
||||||
|
import { selectAlerts } from "../../redux/application/application.selectors.js";
|
||||||
|
import { addAlerts } from "../../redux/application/application.actions.js";
|
||||||
|
|
||||||
const JobsPage = lazy(() => import("../jobs/jobs.page"));
|
const JobsPage = lazy(() => import("../jobs/jobs.page"));
|
||||||
|
|
||||||
@@ -104,16 +105,80 @@ const { Content, Footer } = Layout;
|
|||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
conflict: selectInstanceConflict,
|
conflict: selectInstanceConflict,
|
||||||
bodyshop: selectBodyshop
|
bodyshop: selectBodyshop,
|
||||||
|
alerts: selectAlerts
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({});
|
const ALERT_FILE_URL = InstanceRenderManager({
|
||||||
|
imex: "https://images.imex.online/alerts/alerts-imex.json",
|
||||||
|
rome: "https://images.imex.online/alerts/alerts-rome.json"
|
||||||
|
});
|
||||||
|
|
||||||
export function Manage({ conflict, bodyshop }) {
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
setAlerts: (alerts) => dispatch(addAlerts(alerts))
|
||||||
|
});
|
||||||
|
|
||||||
|
export function Manage({ conflict, bodyshop, alerts, setAlerts }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [chatVisible] = useState(false);
|
const [chatVisible] = useState(false);
|
||||||
const { socket, clientId } = useContext(SocketContext);
|
const { socket, clientId } = useContext(SocketContext);
|
||||||
|
|
||||||
|
// State to track displayed alerts
|
||||||
|
const [displayedAlertIds, setDisplayedAlertIds] = useState([]);
|
||||||
|
|
||||||
|
// Fetch displayed alerts from localStorage on mount
|
||||||
|
useEffect(() => {
|
||||||
|
const displayedAlerts = JSON.parse(localStorage.getItem("displayedAlerts") || "[]");
|
||||||
|
setDisplayedAlertIds(displayedAlerts);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// Fetch alerts from the JSON file and dispatch to Redux store
|
||||||
|
useEffect(() => {
|
||||||
|
const fetchAlerts = async () => {
|
||||||
|
try {
|
||||||
|
const response = await fetch(ALERT_FILE_URL);
|
||||||
|
const fetchedAlerts = await response.json();
|
||||||
|
setAlerts(fetchedAlerts);
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Error fetching alerts:", error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
fetchAlerts();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// Use useEffect to watch for new alerts
|
||||||
|
useEffect(() => {
|
||||||
|
if (alerts && Object.keys(alerts).length > 0) {
|
||||||
|
// Convert the alerts object into an array
|
||||||
|
const alertArray = Object.values(alerts);
|
||||||
|
|
||||||
|
// Filter out alerts that have already been dismissed
|
||||||
|
const newAlerts = alertArray.filter((alert) => !displayedAlertIds.includes(alert.id));
|
||||||
|
|
||||||
|
newAlerts.forEach((alert) => {
|
||||||
|
// Display the notification
|
||||||
|
notification.open({
|
||||||
|
key: "notification-alerts-" + alert.id,
|
||||||
|
message: alert.message,
|
||||||
|
description: alert.description,
|
||||||
|
type: alert.type || "info",
|
||||||
|
duration: 0,
|
||||||
|
placement: "bottomRight",
|
||||||
|
closable: true,
|
||||||
|
onClose: () => {
|
||||||
|
// When the notification is closed, update displayed alerts state and localStorage
|
||||||
|
setDisplayedAlertIds((prevIds) => {
|
||||||
|
const updatedIds = [...prevIds, alert.id];
|
||||||
|
localStorage.setItem("displayedAlerts", JSON.stringify(updatedIds));
|
||||||
|
return updatedIds;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, [alerts, displayedAlertIds]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const widgetId = InstanceRenderManager({
|
const widgetId = InstanceRenderManager({
|
||||||
imex: "IABVNO4scRKY11XBQkNr",
|
imex: "IABVNO4scRKY11XBQkNr",
|
||||||
|
|||||||
@@ -67,6 +67,12 @@ export const setUpdateAvailable = (isUpdateAvailable) => ({
|
|||||||
type: ApplicationActionTypes.SET_UPDATE_AVAILABLE,
|
type: ApplicationActionTypes.SET_UPDATE_AVAILABLE,
|
||||||
payload: isUpdateAvailable
|
payload: isUpdateAvailable
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const addAlerts = (alerts) => ({
|
||||||
|
type: ApplicationActionTypes.ADD_ALERTS,
|
||||||
|
payload: alerts
|
||||||
|
});
|
||||||
|
|
||||||
export const setWssStatus = (status) => ({
|
export const setWssStatus = (status) => ({
|
||||||
type: ApplicationActionTypes.SET_WSS_STATUS,
|
type: ApplicationActionTypes.SET_WSS_STATUS,
|
||||||
payload: status
|
payload: status
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ const INITIAL_STATE = {
|
|||||||
error: null
|
error: null
|
||||||
},
|
},
|
||||||
jobReadOnly: false,
|
jobReadOnly: false,
|
||||||
partnerVersion: null
|
partnerVersion: null,
|
||||||
|
alerts: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
const applicationReducer = (state = INITIAL_STATE, action) => {
|
const applicationReducer = (state = INITIAL_STATE, action) => {
|
||||||
@@ -91,6 +92,18 @@ const applicationReducer = (state = INITIAL_STATE, action) => {
|
|||||||
case ApplicationActionTypes.SET_WSS_STATUS: {
|
case ApplicationActionTypes.SET_WSS_STATUS: {
|
||||||
return { ...state, wssStatus: action.payload };
|
return { ...state, wssStatus: action.payload };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case ApplicationActionTypes.ADD_ALERTS: {
|
||||||
|
const newAlertsMap = { ...state.alerts };
|
||||||
|
|
||||||
|
action.payload.alerts.forEach((alert) => {
|
||||||
|
newAlertsMap[alert.id] = alert;
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
alerts: newAlertsMap
|
||||||
|
};
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,3 +23,4 @@ export const selectOnline = createSelector([selectApplication], (application) =>
|
|||||||
export const selectProblemJobs = createSelector([selectApplication], (application) => application.problemJobs);
|
export const selectProblemJobs = createSelector([selectApplication], (application) => application.problemJobs);
|
||||||
export const selectUpdateAvailable = createSelector([selectApplication], (application) => application.updateAvailable);
|
export const selectUpdateAvailable = createSelector([selectApplication], (application) => application.updateAvailable);
|
||||||
export const selectWssStatus = createSelector([selectApplication], (application) => application.wssStatus);
|
export const selectWssStatus = createSelector([selectApplication], (application) => application.wssStatus);
|
||||||
|
export const selectAlerts = createSelector([selectApplication], (application) => application.alerts);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ const ApplicationActionTypes = {
|
|||||||
INSERT_AUDIT_TRAIL: "INSERT_AUDIT_TRAIL",
|
INSERT_AUDIT_TRAIL: "INSERT_AUDIT_TRAIL",
|
||||||
SET_PROBLEM_JOBS: "SET_PROBLEM_JOBS",
|
SET_PROBLEM_JOBS: "SET_PROBLEM_JOBS",
|
||||||
SET_UPDATE_AVAILABLE: "SET_UPDATE_AVAILABLE",
|
SET_UPDATE_AVAILABLE: "SET_UPDATE_AVAILABLE",
|
||||||
SET_WSS_STATUS: "SET_WSS_STATUS"
|
SET_WSS_STATUS: "SET_WSS_STATUS",
|
||||||
|
ADD_ALERTS: "ADD_ALERTS"
|
||||||
};
|
};
|
||||||
export default ApplicationActionTypes;
|
export default ApplicationActionTypes;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import {
|
|||||||
} from "../../firebase/firebase.utils";
|
} from "../../firebase/firebase.utils";
|
||||||
import { QUERY_EULA } from "../../graphql/bodyshop.queries";
|
import { QUERY_EULA } from "../../graphql/bodyshop.queries";
|
||||||
import client from "../../utils/GraphQLClient";
|
import client from "../../utils/GraphQLClient";
|
||||||
import day from "../../utils/day";
|
import dayjs from "../../utils/day";
|
||||||
import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
||||||
import {
|
import {
|
||||||
checkInstanceId,
|
checkInstanceId,
|
||||||
@@ -96,7 +96,7 @@ export function* isUserAuthenticated() {
|
|||||||
const eulaQuery = yield client.query({
|
const eulaQuery = yield client.query({
|
||||||
query: QUERY_EULA,
|
query: QUERY_EULA,
|
||||||
variables: {
|
variables: {
|
||||||
now: day()
|
now: dayjs()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -314,8 +314,7 @@ export function* SetAuthLevelFromShopDetails({ payload }) {
|
|||||||
try {
|
try {
|
||||||
const userEmail = yield select((state) => state.user.currentUser.email);
|
const userEmail = yield select((state) => state.user.currentUser.email);
|
||||||
try {
|
try {
|
||||||
console.log("Setting shop timezone.");
|
dayjs.tz.setDefault(payload.timezone);
|
||||||
day.tz.setDefault(payload.timezone);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -665,9 +665,9 @@
|
|||||||
"employees": "",
|
"employees": "",
|
||||||
"estimators": "",
|
"estimators": "",
|
||||||
"filehandlers": "",
|
"filehandlers": "",
|
||||||
|
"imexpay": "",
|
||||||
"insurancecos": "",
|
"insurancecos": "",
|
||||||
"intakechecklist": "",
|
"intakechecklist": "",
|
||||||
"intellipay": "",
|
|
||||||
"intellipay_cash_discount": "",
|
"intellipay_cash_discount": "",
|
||||||
"jobstatuses": "",
|
"jobstatuses": "",
|
||||||
"laborrates": "",
|
"laborrates": "",
|
||||||
@@ -693,11 +693,14 @@
|
|||||||
"profits": "",
|
"profits": "",
|
||||||
"sales_tax_codes": "",
|
"sales_tax_codes": "",
|
||||||
"tax_accounts": "",
|
"tax_accounts": "",
|
||||||
"title": ""
|
"title": "",
|
||||||
|
"ttl_adjustment": "",
|
||||||
|
"ttl_tax_adjustment": ""
|
||||||
},
|
},
|
||||||
"roguard": {
|
"roguard": {
|
||||||
"title": ""
|
"title": ""
|
||||||
},
|
},
|
||||||
|
"romepay": "",
|
||||||
"scheduling": "",
|
"scheduling": "",
|
||||||
"scoreboardsetup": "",
|
"scoreboardsetup": "",
|
||||||
"shopinfo": "",
|
"shopinfo": "",
|
||||||
@@ -1254,6 +1257,7 @@
|
|||||||
"sunday": "",
|
"sunday": "",
|
||||||
"text": "",
|
"text": "",
|
||||||
"thursday": "",
|
"thursday": "",
|
||||||
|
"time": "",
|
||||||
"total": "",
|
"total": "",
|
||||||
"totals": "",
|
"totals": "",
|
||||||
"tuesday": "",
|
"tuesday": "",
|
||||||
@@ -1338,6 +1342,8 @@
|
|||||||
},
|
},
|
||||||
"job_lifecycle": {
|
"job_lifecycle": {
|
||||||
"columns": {
|
"columns": {
|
||||||
|
"average_human_readable": "",
|
||||||
|
"average_value": "",
|
||||||
"duration": "",
|
"duration": "",
|
||||||
"end": "",
|
"end": "",
|
||||||
"human_readable": "",
|
"human_readable": "",
|
||||||
@@ -1871,6 +1877,7 @@
|
|||||||
"tax_str_rt": "",
|
"tax_str_rt": "",
|
||||||
"tax_sub_rt": "",
|
"tax_sub_rt": "",
|
||||||
"tax_tow_rt": "",
|
"tax_tow_rt": "",
|
||||||
|
"tlos_ind": "",
|
||||||
"towin": "",
|
"towin": "",
|
||||||
"towing_payable": "Remorquage à payer",
|
"towing_payable": "Remorquage à payer",
|
||||||
"unitnumber": "Unité #",
|
"unitnumber": "Unité #",
|
||||||
@@ -2105,6 +2112,7 @@
|
|||||||
"threshhold": "",
|
"threshhold": "",
|
||||||
"total_cost": "",
|
"total_cost": "",
|
||||||
"total_cust_payable": "",
|
"total_cust_payable": "",
|
||||||
|
"total_cust_payable_cash_discount": "",
|
||||||
"total_repairs": "",
|
"total_repairs": "",
|
||||||
"total_sales": "",
|
"total_sales": "",
|
||||||
"total_sales_tax": "",
|
"total_sales_tax": "",
|
||||||
@@ -2845,52 +2853,52 @@
|
|||||||
"filters_title": "",
|
"filters_title": "",
|
||||||
"information": "",
|
"information": "",
|
||||||
"layout": "",
|
"layout": "",
|
||||||
"statistics": {
|
"statistics": {
|
||||||
"jobs_in_production": "",
|
"jobs_in_production": "",
|
||||||
"tasks_in_production": "",
|
"tasks_in_production": "",
|
||||||
"tasks_on_board": "",
|
"tasks_in_view": "",
|
||||||
"tasks_in_view": "",
|
"tasks_on_board": "",
|
||||||
"total_amount_in_production": "",
|
"total_amount_in_production": "",
|
||||||
"total_amount_on_board": "",
|
"total_amount_in_view": "",
|
||||||
"total_amount_in_view": "",
|
"total_amount_on_board": "",
|
||||||
"total_hours_in_production": "",
|
"total_hours_in_production": "",
|
||||||
"total_hours_on_board": "",
|
"total_hours_in_view": "",
|
||||||
"total_hours_in_view": "",
|
"total_hours_on_board": "",
|
||||||
"total_jobs_on_board": "",
|
"total_jobs_in_view": "",
|
||||||
"total_jobs_in_view": "",
|
"total_jobs_on_board": "",
|
||||||
"total_lab_in_production": "",
|
"total_lab_in_production": "",
|
||||||
"total_lab_on_board": "",
|
"total_lab_in_view": "",
|
||||||
"total_lab_in_view": "",
|
"total_lab_on_board": "",
|
||||||
"total_lar_in_production": "",
|
"total_lar_in_production": "",
|
||||||
"total_lar_on_board": "",
|
"total_lar_in_view": "",
|
||||||
"total_lar_in_view": ""
|
"total_lar_on_board": ""
|
||||||
},
|
},
|
||||||
"statistics_title": ""
|
"statistics_title": ""
|
||||||
},
|
},
|
||||||
"statistics": {
|
"statistics": {
|
||||||
"currency_symbol": "",
|
"currency_symbol": "",
|
||||||
"hours": "",
|
"hours": "",
|
||||||
"jobs": "",
|
"jobs": "",
|
||||||
"jobs_in_production": "",
|
"jobs_in_production": "",
|
||||||
"tasks": "",
|
"tasks": "",
|
||||||
"tasks_in_production": "",
|
"tasks_in_production": "",
|
||||||
"tasks_on_board": "",
|
"tasks_in_view": "",
|
||||||
"tasks_in_view": "",
|
"tasks_on_board": "",
|
||||||
"total_amount_in_production": "",
|
"total_amount_in_production": "",
|
||||||
"total_amount_on_board": "",
|
"total_amount_in_view": "",
|
||||||
"total_amount_in_view": "",
|
"total_amount_on_board": "",
|
||||||
"total_hours_in_production": "",
|
"total_hours_in_production": "",
|
||||||
"total_hours_on_board": "",
|
"total_hours_in_view": "",
|
||||||
"total_hours_in_view": "",
|
"total_hours_on_board": "",
|
||||||
"total_jobs_on_board": "",
|
"total_jobs_in_view": "",
|
||||||
"total_jobs_in_view": "",
|
"total_jobs_on_board": "",
|
||||||
"total_lab_in_production": "",
|
"total_lab_in_production": "",
|
||||||
"total_lab_on_board": "",
|
"total_lab_in_view": "",
|
||||||
"total_lab_in_view": "",
|
"total_lab_on_board": "",
|
||||||
"total_lar_in_production": "",
|
"total_lar_in_production": "",
|
||||||
"total_lar_on_board": "",
|
"total_lar_in_view": "",
|
||||||
"total_lar_in_view": ""
|
"total_lar_on_board": ""
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"removed": ""
|
"removed": ""
|
||||||
}
|
}
|
||||||
@@ -3044,6 +3052,7 @@
|
|||||||
"production_by_target_date": "",
|
"production_by_target_date": "",
|
||||||
"production_by_technician": "",
|
"production_by_technician": "",
|
||||||
"production_by_technician_one": "",
|
"production_by_technician_one": "",
|
||||||
|
"production_not_production_status": "",
|
||||||
"production_over_time": "",
|
"production_over_time": "",
|
||||||
"psr_by_make": "",
|
"psr_by_make": "",
|
||||||
"purchase_return_ratio_grouped_by_vendor_detail": "",
|
"purchase_return_ratio_grouped_by_vendor_detail": "",
|
||||||
@@ -3186,6 +3195,7 @@
|
|||||||
"billid": "",
|
"billid": "",
|
||||||
"completed": "",
|
"completed": "",
|
||||||
"created_at": "",
|
"created_at": "",
|
||||||
|
"created_by": "",
|
||||||
"description": "",
|
"description": "",
|
||||||
"due_date": "",
|
"due_date": "",
|
||||||
"job": {
|
"job": {
|
||||||
@@ -3202,6 +3212,7 @@
|
|||||||
"medium": ""
|
"medium": ""
|
||||||
},
|
},
|
||||||
"priority": "",
|
"priority": "",
|
||||||
|
"related_items": "",
|
||||||
"remind_at": "",
|
"remind_at": "",
|
||||||
"title": ""
|
"title": ""
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2333,6 +2333,14 @@ export const TemplateList = (type, context) => {
|
|||||||
key: "production_by_technician",
|
key: "production_by_technician",
|
||||||
//idtype: "vendor",
|
//idtype: "vendor",
|
||||||
disabled: false
|
disabled: false
|
||||||
|
},
|
||||||
|
production_not_production_status: {
|
||||||
|
title: i18n.t("reportcenter.templates.production_not_production_status"),
|
||||||
|
description: "",
|
||||||
|
subject: i18n.t("reportcenter.templates.production_not_production_status"),
|
||||||
|
key: "production_not_production_status",
|
||||||
|
//idtype: "vendor",
|
||||||
|
disabled: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
|
import "dayjs/locale/en";
|
||||||
import dayjsBusinessDays from "dayjs-business-days2";
|
import dayjsBusinessDays from "dayjs-business-days2";
|
||||||
import isSameOrAfter from "dayjs/plugin/isSameOrAfter";
|
import isSameOrAfter from "dayjs/plugin/isSameOrAfter";
|
||||||
import updateLocale from "dayjs/plugin/updateLocale";
|
import updateLocale from "dayjs/plugin/updateLocale";
|
||||||
@@ -64,4 +65,6 @@ dayjs.extend(minMax);
|
|||||||
dayjs.extend(isBetween);
|
dayjs.extend(isBetween);
|
||||||
dayjs.extend(dayjsBusinessDays);
|
dayjs.extend(dayjsBusinessDays);
|
||||||
|
|
||||||
|
dayjs.locale("en");
|
||||||
|
|
||||||
export default dayjs;
|
export default dayjs;
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
environment:
|
environment:
|
||||||
- SERVICES=ses,secretsmanager
|
- SERVICES=s3,ses,secretsmanager,cloudwatch,logs
|
||||||
- DEBUG=0
|
- DEBUG=0
|
||||||
- AWS_ACCESS_KEY_ID=test
|
- AWS_ACCESS_KEY_ID=test
|
||||||
- AWS_SECRET_ACCESS_KEY=test
|
- AWS_SECRET_ACCESS_KEY=test
|
||||||
@@ -115,6 +115,8 @@ services:
|
|||||||
aws --endpoint-url=http://localstack:4566 ses verify-domain-identity --domain imex.online --region ca-central-1
|
aws --endpoint-url=http://localstack:4566 ses verify-domain-identity --domain imex.online --region ca-central-1
|
||||||
aws --endpoint-url=http://localstack:4566 ses verify-email-identity --email-address noreply@imex.online --region ca-central-1
|
aws --endpoint-url=http://localstack:4566 ses verify-email-identity --email-address noreply@imex.online --region ca-central-1
|
||||||
aws --endpoint-url=http://localstack:4566 secretsmanager create-secret --name CHATTER_PRIVATE_KEY --secret-string file:///tmp/certs/id_rsa
|
aws --endpoint-url=http://localstack:4566 secretsmanager create-secret --name CHATTER_PRIVATE_KEY --secret-string file:///tmp/certs/id_rsa
|
||||||
|
aws --endpoint-url=http://localstack:4566 logs create-log-group --log-group-name development --region ca-central-1
|
||||||
|
aws --endpoint-url=http://localstack:4566 s3api create-bucket --bucket imex-large-log --create-bucket-configuration LocationConstraint=ca-central-1
|
||||||
"
|
"
|
||||||
# Node App: The Main IMEX API
|
# Node App: The Main IMEX API
|
||||||
node-app:
|
node-app:
|
||||||
@@ -166,6 +168,28 @@ services:
|
|||||||
# volumes:
|
# volumes:
|
||||||
# - redis-insight-data:/db
|
# - redis-insight-data:/db
|
||||||
|
|
||||||
|
# ##Optional Container for SFTP/SSH Server for testing
|
||||||
|
# ssh-sftp-server:
|
||||||
|
# image: atmoz/sftp:alpine # Using an image with SFTP support
|
||||||
|
# container_name: ssh-sftp-server
|
||||||
|
# hostname: ssh-sftp-server
|
||||||
|
# networks:
|
||||||
|
# - redis-cluster-net
|
||||||
|
# ports:
|
||||||
|
# - "2222:22" # Expose port 22 for SSH/SFTP (mapped to 2222 on the host)
|
||||||
|
# volumes:
|
||||||
|
# - ./certs/id_rsa.pub:/home/user/.ssh/keys/id_rsa.pub:ro # Mount the SSH public key
|
||||||
|
# - ./upload:/home/user/upload # Mount a local directory for SFTP uploads
|
||||||
|
# environment:
|
||||||
|
# - SFTP_USERS=user:password:1000::upload
|
||||||
|
# command: >
|
||||||
|
# /bin/sh -c "
|
||||||
|
# chmod -R 007 /home/user/upload &&
|
||||||
|
# echo 'Match User user' >> /etc/ssh/sshd_config &&
|
||||||
|
# sed -i -e 's#ForceCommand internal-sftp#ForceCommand internal-sftp -d /upload#' /etc/ssh/sshd_config &&
|
||||||
|
# /usr/sbin/sshd -D
|
||||||
|
# "
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
redis-cluster-net:
|
redis-cluster-net:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|||||||
@@ -69,7 +69,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
jobline:
|
jobline:
|
||||||
job:
|
job:
|
||||||
@@ -180,7 +179,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
associations:
|
associations:
|
||||||
@@ -387,7 +385,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
associations:
|
associations:
|
||||||
@@ -504,7 +501,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
bill:
|
bill:
|
||||||
job:
|
job:
|
||||||
@@ -671,7 +667,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
_and:
|
_and:
|
||||||
- job:
|
- job:
|
||||||
@@ -1285,7 +1280,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
courtesycar:
|
courtesycar:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
@@ -1526,7 +1520,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
associations:
|
associations:
|
||||||
@@ -1786,7 +1779,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
associations:
|
associations:
|
||||||
@@ -1920,7 +1912,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
_or:
|
_or:
|
||||||
- job:
|
- job:
|
||||||
@@ -2105,7 +2096,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
employee_team:
|
employee_team:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
@@ -2268,7 +2258,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
employee:
|
employee:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
@@ -2449,7 +2438,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
associations:
|
associations:
|
||||||
@@ -2696,7 +2684,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
associations:
|
associations:
|
||||||
@@ -2808,7 +2795,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
conversation:
|
conversation:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
@@ -3123,7 +3109,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
job:
|
job:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
@@ -4232,7 +4217,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
associations:
|
associations:
|
||||||
@@ -4248,41 +4232,41 @@
|
|||||||
enable_manual: false
|
enable_manual: false
|
||||||
update:
|
update:
|
||||||
columns:
|
columns:
|
||||||
- clm_no
|
|
||||||
- v_make_desc
|
|
||||||
- date_next_contact
|
|
||||||
- status
|
|
||||||
- employee_csr
|
|
||||||
- employee_prep
|
- employee_prep
|
||||||
- clm_total
|
- clm_total
|
||||||
- suspended
|
- suspended
|
||||||
- employee_body
|
- employee_body
|
||||||
- ro_number
|
- ro_number
|
||||||
- actual_in
|
|
||||||
- ownr_co_nm
|
- ownr_co_nm
|
||||||
- v_model_yr
|
|
||||||
- comment
|
|
||||||
- job_totals
|
|
||||||
- v_vin
|
- v_vin
|
||||||
- ownr_fn
|
|
||||||
- scheduled_completion
|
- scheduled_completion
|
||||||
- special_coverage_policy
|
- special_coverage_policy
|
||||||
- v_color
|
|
||||||
- ca_gst_registrant
|
|
||||||
- scheduled_delivery
|
- scheduled_delivery
|
||||||
- actual_delivery
|
- actual_delivery
|
||||||
- actual_completion
|
- actual_completion
|
||||||
- kanbanparent
|
- kanbanparent
|
||||||
- est_ct_fn
|
- est_ct_fn
|
||||||
|
- alt_transport
|
||||||
|
- v_model_desc
|
||||||
|
- clm_no
|
||||||
|
- v_make_desc
|
||||||
|
- date_next_contact
|
||||||
|
- status
|
||||||
|
- employee_csr
|
||||||
|
- actual_in
|
||||||
|
- v_model_yr
|
||||||
|
- comment
|
||||||
|
- job_totals
|
||||||
|
- ownr_fn
|
||||||
|
- v_color
|
||||||
|
- ca_gst_registrant
|
||||||
- employee_refinish
|
- employee_refinish
|
||||||
- ownr_ph1
|
- ownr_ph1
|
||||||
- date_last_contacted
|
- date_last_contacted
|
||||||
- alt_transport
|
|
||||||
- inproduction
|
- inproduction
|
||||||
- est_ct_ln
|
- est_ct_ln
|
||||||
- production_vars
|
- production_vars
|
||||||
- category
|
- category
|
||||||
- v_model_desc
|
|
||||||
- date_invoiced
|
- date_invoiced
|
||||||
- est_co_nm
|
- est_co_nm
|
||||||
- ownr_ln
|
- ownr_ln
|
||||||
@@ -4295,6 +4279,12 @@
|
|||||||
- name: event-secret
|
- name: event-secret
|
||||||
value_from_env: EVENT_SECRET
|
value_from_env: EVENT_SECRET
|
||||||
request_transform:
|
request_transform:
|
||||||
|
body:
|
||||||
|
action: transform
|
||||||
|
template: |-
|
||||||
|
{
|
||||||
|
"data": {{$body?.event?.data?.new}}
|
||||||
|
}
|
||||||
method: POST
|
method: POST
|
||||||
query_params: {}
|
query_params: {}
|
||||||
template_engine: Kriti
|
template_engine: Kriti
|
||||||
@@ -4496,7 +4486,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
conversation:
|
conversation:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
@@ -4670,7 +4659,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
job:
|
job:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
@@ -4805,7 +4793,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
associations:
|
associations:
|
||||||
@@ -5110,7 +5097,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
parts_order:
|
parts_order:
|
||||||
job:
|
job:
|
||||||
@@ -5243,7 +5229,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
job:
|
job:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
@@ -5419,7 +5404,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
job:
|
job:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
@@ -5559,7 +5543,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
associations:
|
associations:
|
||||||
@@ -5670,7 +5653,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
_or:
|
_or:
|
||||||
- parentjob_rel:
|
- parentjob_rel:
|
||||||
@@ -5760,7 +5742,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
job:
|
job:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
@@ -6045,7 +6026,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
associations:
|
associations:
|
||||||
@@ -6541,7 +6521,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
associations:
|
associations:
|
||||||
@@ -6698,7 +6677,6 @@
|
|||||||
delete_permissions:
|
delete_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
backend_only: false
|
|
||||||
filter:
|
filter:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
associations:
|
associations:
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- CREATE INDEX idx_timetickets_date ON timetickets (date );
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
CREATE INDEX idx_timetickets_date ON timetickets (date );
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- CREATE INDEX idx_jobs_ownr_fn ON jobs USING gin (ownr_fn gin_trgm_ops);
|
||||||
|
-- CREATE INDEX idx_jobs_ownr_ln ON jobs USING gin (ownr_ln gin_trgm_ops);
|
||||||
|
-- CREATE INDEX idx_jobs_ownr_co_nm ON jobs USING gin (ownr_co_nm gin_trgm_ops);
|
||||||
|
-- CREATE INDEX idx_jobs_clm_no ON jobs USING gin (clm_no gin_trgm_ops);
|
||||||
|
-- CREATE INDEX idx_jobs_v_make_desc ON jobs USING gin (v_make_desc gin_trgm_ops);
|
||||||
|
-- CREATE INDEX idx_jobs_v_model_desc ON jobs USING gin (v_model_desc gin_trgm_ops);
|
||||||
|
-- CREATE INDEX idx_jobs_plate_no ON jobs USING gin (plate_no gin_trgm_ops);
|
||||||
7
hasura/migrations/1730517308367_run_sql_migration/up.sql
Normal file
7
hasura/migrations/1730517308367_run_sql_migration/up.sql
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
CREATE INDEX idx_jobs_ownr_fn ON jobs USING gin (ownr_fn gin_trgm_ops);
|
||||||
|
CREATE INDEX idx_jobs_ownr_ln ON jobs USING gin (ownr_ln gin_trgm_ops);
|
||||||
|
CREATE INDEX idx_jobs_ownr_co_nm ON jobs USING gin (ownr_co_nm gin_trgm_ops);
|
||||||
|
CREATE INDEX idx_jobs_clm_no ON jobs USING gin (clm_no gin_trgm_ops);
|
||||||
|
CREATE INDEX idx_jobs_v_make_desc ON jobs USING gin (v_make_desc gin_trgm_ops);
|
||||||
|
CREATE INDEX idx_jobs_v_model_desc ON jobs USING gin (v_model_desc gin_trgm_ops);
|
||||||
|
CREATE INDEX idx_jobs_plate_no ON jobs USING gin (plate_no gin_trgm_ops);
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- CREATE INDEX idx_exportlog_createdat_desc ON exportlog (created_at desc);
|
||||||
1
hasura/migrations/1730518121867_run_sql_migration/up.sql
Normal file
1
hasura/migrations/1730518121867_run_sql_migration/up.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CREATE INDEX idx_exportlog_createdat_desc ON exportlog (created_at desc);
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- CREATE index idx_messages_unread_agg ON messages (read, isoutbound)
|
||||||
|
-- WHERE read = false AND isoutbound = false;
|
||||||
2
hasura/migrations/1730521661838_run_sql_migration/up.sql
Normal file
2
hasura/migrations/1730521661838_run_sql_migration/up.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE index idx_messages_unread_agg ON messages (read, isoutbound)
|
||||||
|
WHERE read = false AND isoutbound = false;
|
||||||
10
hasura/migrations/1731471670370_run_sql_migration/down.sql
Normal file
10
hasura/migrations/1731471670370_run_sql_migration/down.sql
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- CREATE INDEX jobs_search_gin_ro_number ON jobs USING GIN ((ro_number) gin_trgm_ops);
|
||||||
|
-- CREATE INDEX jobs_search_gin_ownrfn ON jobs USING GIN ((ownr_fn) gin_trgm_ops);
|
||||||
|
-- CREATE INDEX jobs_search_gin_clm_no ON jobs USING GIN ((clm_no) gin_trgm_ops);
|
||||||
|
-- CREATE INDEX jobs_search_gin_plate_no ON jobs USING GIN ((plate_no) gin_trgm_ops);
|
||||||
|
-- CREATE INDEX jobs_search_gin_v_make_desc ON jobs USING GIN (( v_make_desc) gin_trgm_ops);
|
||||||
|
-- CREATE INDEX jobs_search_gin_v_model_desc ON jobs USING GIN (( v_model_desc) gin_trgm_ops);
|
||||||
|
-- CREATE INDEX jobs_search_gin_ownr_ln ON jobs USING GIN (( ownr_ln) gin_trgm_ops);
|
||||||
|
-- CREATE INDEX jobs_search_gin_ownr_co_nm ON jobs USING GIN (( ownr_co_nm) gin_trgm_ops);
|
||||||
8
hasura/migrations/1731471670370_run_sql_migration/up.sql
Normal file
8
hasura/migrations/1731471670370_run_sql_migration/up.sql
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
CREATE INDEX jobs_search_gin_ro_number ON jobs USING GIN ((ro_number) gin_trgm_ops);
|
||||||
|
CREATE INDEX jobs_search_gin_ownrfn ON jobs USING GIN ((ownr_fn) gin_trgm_ops);
|
||||||
|
CREATE INDEX jobs_search_gin_clm_no ON jobs USING GIN ((clm_no) gin_trgm_ops);
|
||||||
|
CREATE INDEX jobs_search_gin_plate_no ON jobs USING GIN ((plate_no) gin_trgm_ops);
|
||||||
|
CREATE INDEX jobs_search_gin_v_make_desc ON jobs USING GIN (( v_make_desc) gin_trgm_ops);
|
||||||
|
CREATE INDEX jobs_search_gin_v_model_desc ON jobs USING GIN (( v_model_desc) gin_trgm_ops);
|
||||||
|
CREATE INDEX jobs_search_gin_ownr_ln ON jobs USING GIN (( ownr_ln) gin_trgm_ops);
|
||||||
|
CREATE INDEX jobs_search_gin_ownr_co_nm ON jobs USING GIN (( ownr_co_nm) gin_trgm_ops);
|
||||||
2102
package-lock.json
generated
2102
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,7 +19,9 @@
|
|||||||
"makeitpretty": "prettier --write \"**/*.{css,js,json,jsx,scss}\""
|
"makeitpretty": "prettier --write \"**/*.{css,js,json,jsx,scss}\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@aws-sdk/client-cloudwatch-logs": "^3.679.0",
|
||||||
"@aws-sdk/client-elasticache": "^3.675.0",
|
"@aws-sdk/client-elasticache": "^3.675.0",
|
||||||
|
"@aws-sdk/client-s3": "^3.689.0",
|
||||||
"@aws-sdk/client-secrets-manager": "^3.675.0",
|
"@aws-sdk/client-secrets-manager": "^3.675.0",
|
||||||
"@aws-sdk/client-ses": "^3.675.0",
|
"@aws-sdk/client-ses": "^3.675.0",
|
||||||
"@aws-sdk/credential-provider-node": "^3.675.0",
|
"@aws-sdk/credential-provider-node": "^3.675.0",
|
||||||
@@ -44,7 +46,6 @@
|
|||||||
"firebase-admin": "^12.6.0",
|
"firebase-admin": "^12.6.0",
|
||||||
"graphql": "^16.9.0",
|
"graphql": "^16.9.0",
|
||||||
"graphql-request": "^6.1.0",
|
"graphql-request": "^6.1.0",
|
||||||
"graylog2": "^0.2.1",
|
|
||||||
"inline-css": "^4.0.2",
|
"inline-css": "^4.0.2",
|
||||||
"intuit-oauth": "^4.1.2",
|
"intuit-oauth": "^4.1.2",
|
||||||
"ioredis": "^5.4.1",
|
"ioredis": "^5.4.1",
|
||||||
@@ -66,6 +67,8 @@
|
|||||||
"ssh2-sftp-client": "^10.0.3",
|
"ssh2-sftp-client": "^10.0.3",
|
||||||
"twilio": "^4.23.0",
|
"twilio": "^4.23.0",
|
||||||
"uuid": "^10.0.0",
|
"uuid": "^10.0.0",
|
||||||
|
"winston": "^3.15.0",
|
||||||
|
"winston-cloudwatch": "^6.3.0",
|
||||||
"xml2js": "^0.6.2",
|
"xml2js": "^0.6.2",
|
||||||
"xmlbuilder2": "^3.1.1"
|
"xmlbuilder2": "^3.1.1"
|
||||||
},
|
},
|
||||||
|
|||||||
47
server.js
47
server.js
@@ -1,5 +1,10 @@
|
|||||||
const cors = require("cors");
|
// Load environment variables THIS MUST BE AT THE TOP
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
require("dotenv").config({
|
||||||
|
path: path.resolve(process.cwd(), `.env.${process.env.NODE_ENV || "development"}`)
|
||||||
|
});
|
||||||
|
|
||||||
|
const cors = require("cors");
|
||||||
const http = require("http");
|
const http = require("http");
|
||||||
const Redis = require("ioredis");
|
const Redis = require("ioredis");
|
||||||
const express = require("express");
|
const express = require("express");
|
||||||
@@ -16,12 +21,7 @@ const { applyRedisHelpers } = require("./server/utils/redisHelpers");
|
|||||||
const { applyIOHelpers } = require("./server/utils/ioHelpers");
|
const { applyIOHelpers } = require("./server/utils/ioHelpers");
|
||||||
const { redisSocketEvents } = require("./server/web-sockets/redisSocketEvents");
|
const { redisSocketEvents } = require("./server/web-sockets/redisSocketEvents");
|
||||||
const { ElastiCacheClient, DescribeCacheClustersCommand } = require("@aws-sdk/client-elasticache");
|
const { ElastiCacheClient, DescribeCacheClustersCommand } = require("@aws-sdk/client-elasticache");
|
||||||
const { default: InstanceManager } = require("./server/utils/instanceMgr");
|
const { InstanceRegion } = require("./server/utils/instanceMgr");
|
||||||
|
|
||||||
// Load environment variables
|
|
||||||
require("dotenv").config({
|
|
||||||
path: path.resolve(process.cwd(), `.env.${process.env.NODE_ENV || "development"}`)
|
|
||||||
});
|
|
||||||
|
|
||||||
const CLUSTER_RETRY_BASE_DELAY = 100;
|
const CLUSTER_RETRY_BASE_DELAY = 100;
|
||||||
const CLUSTER_RETRY_MAX_DELAY = 5000;
|
const CLUSTER_RETRY_MAX_DELAY = 5000;
|
||||||
@@ -114,10 +114,7 @@ const applyRoutes = ({ app }) => {
|
|||||||
*/
|
*/
|
||||||
const getRedisNodesFromAWS = async () => {
|
const getRedisNodesFromAWS = async () => {
|
||||||
const client = new ElastiCacheClient({
|
const client = new ElastiCacheClient({
|
||||||
region: InstanceManager({
|
region: InstanceRegion()
|
||||||
imex: "ca-central-1",
|
|
||||||
rome: "us-east-2"
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
@@ -153,18 +150,13 @@ const connectToRedisCluster = async () => {
|
|||||||
} else {
|
} else {
|
||||||
// Use the Dockerized Redis cluster in development
|
// Use the Dockerized Redis cluster in development
|
||||||
if (isEmpty(process.env?.REDIS_URL) || !isString(process.env?.REDIS_URL)) {
|
if (isEmpty(process.env?.REDIS_URL) || !isString(process.env?.REDIS_URL)) {
|
||||||
logger.log(`[${process.env.NODE_ENV}] No or Malformed REDIS_URL present.`, "ERROR", "redis", "api");
|
logger.log(`No or Malformed REDIS_URL present.`, "ERROR", "redis", "api");
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
redisServers = JSON.parse(process.env.REDIS_URL);
|
redisServers = JSON.parse(process.env.REDIS_URL);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.log(
|
logger.log(`Failed to parse REDIS_URL: ${error.message}. Exiting...`, "ERROR", "redis", "api");
|
||||||
`[${process.env.NODE_ENV}] Failed to parse REDIS_URL: ${error.message}. Exiting...`,
|
|
||||||
"ERROR",
|
|
||||||
"redis",
|
|
||||||
"api"
|
|
||||||
);
|
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -172,12 +164,7 @@ const connectToRedisCluster = async () => {
|
|||||||
const clusterRetryStrategy = (times) => {
|
const clusterRetryStrategy = (times) => {
|
||||||
const delay =
|
const delay =
|
||||||
Math.min(CLUSTER_RETRY_BASE_DELAY + times * 50, CLUSTER_RETRY_MAX_DELAY) + Math.random() * CLUSTER_RETRY_JITTER;
|
Math.min(CLUSTER_RETRY_BASE_DELAY + times * 50, CLUSTER_RETRY_MAX_DELAY) + Math.random() * CLUSTER_RETRY_JITTER;
|
||||||
logger.log(
|
logger.log(`Redis cluster not yet ready. Retrying in ${delay.toFixed(2)}ms`, "WARN", "redis", "api");
|
||||||
`[${process.env.NODE_ENV}] Redis cluster not yet ready. Retrying in ${delay.toFixed(2)}ms`,
|
|
||||||
"ERROR",
|
|
||||||
"redis",
|
|
||||||
"api"
|
|
||||||
);
|
|
||||||
return delay;
|
return delay;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -194,12 +181,12 @@ const connectToRedisCluster = async () => {
|
|||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
redisCluster.on("ready", () => {
|
redisCluster.on("ready", () => {
|
||||||
logger.log(`[${process.env.NODE_ENV}] Redis cluster connection established.`, "INFO", "redis", "api");
|
logger.log(`Redis cluster connection established.`, "INFO", "redis", "api");
|
||||||
resolve(redisCluster);
|
resolve(redisCluster);
|
||||||
});
|
});
|
||||||
|
|
||||||
redisCluster.on("error", (err) => {
|
redisCluster.on("error", (err) => {
|
||||||
logger.log(`[${process.env.NODE_ENV}] Redis cluster connection failed: ${err.message}`, "ERROR", "redis", "api");
|
logger.log(`Redis cluster connection failed: ${err.message}`, "ERROR", "redis", "api");
|
||||||
reject(err);
|
reject(err);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -215,7 +202,7 @@ const applySocketIO = async ({ server, app }) => {
|
|||||||
|
|
||||||
// Handle errors
|
// Handle errors
|
||||||
redisCluster.on("error", (err) => {
|
redisCluster.on("error", (err) => {
|
||||||
logger.log(`[${process.env.NODE_ENV}] Redis ERROR`, "ERROR", "redis", "api");
|
logger.log(`Redis ERROR`, "ERROR", "redis", "api");
|
||||||
});
|
});
|
||||||
|
|
||||||
const pubClient = redisCluster;
|
const pubClient = redisCluster;
|
||||||
@@ -249,7 +236,7 @@ const applySocketIO = async ({ server, app }) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (isString(process.env.REDIS_ADMIN_PASS) && !isEmpty(process.env.REDIS_ADMIN_PASS)) {
|
if (isString(process.env.REDIS_ADMIN_PASS) && !isEmpty(process.env.REDIS_ADMIN_PASS)) {
|
||||||
logger.log(`[${process.env.NODE_ENV}] Initializing Redis Admin UI....`, "INFO", "redis", "api");
|
logger.log(`Initializing Redis Admin UI....`, "INFO", "redis", "api");
|
||||||
instrument(ioRedis, {
|
instrument(ioRedis, {
|
||||||
auth: {
|
auth: {
|
||||||
type: "basic",
|
type: "basic",
|
||||||
@@ -312,9 +299,9 @@ const main = async () => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
await server.listen(port);
|
await server.listen(port);
|
||||||
logger.log(`[${process.env.NODE_ENV}] Server started on port ${port}`, "INFO", "api");
|
logger.log(`Server started on port ${port}`, "INFO", "api");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.log(`[${process.env.NODE_ENV}] Server failed to start on port ${port}`, "ERROR", "api", error);
|
logger.log(`Server failed to start on port ${port}`, "ERROR", "api", error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ axios.interceptors.request.use((x) => {
|
|||||||
const printable = `${new Date()} | Request: ${x.method.toUpperCase()} | ${
|
const printable = `${new Date()} | Request: ${x.method.toUpperCase()} | ${
|
||||||
x.url
|
x.url
|
||||||
} | ${JSON.stringify(x.data)} | ${JSON.stringify(headers)}`;
|
} | ${JSON.stringify(x.data)} | ${JSON.stringify(headers)}`;
|
||||||
console.log(printable);
|
//console.log(printable);
|
||||||
|
|
||||||
CdkBase.createJsonEvent(socket, "TRACE", `Raw Request: ${printable}`, x.data);
|
CdkBase.createJsonEvent(socket, "SILLY", `Raw Request: ${printable}`, x.data);
|
||||||
|
|
||||||
return x;
|
return x;
|
||||||
});
|
});
|
||||||
@@ -35,8 +35,8 @@ axios.interceptors.response.use((x) => {
|
|||||||
const socket = x.config.socket;
|
const socket = x.config.socket;
|
||||||
|
|
||||||
const printable = `${new Date()} | Response: ${x.status} | ${JSON.stringify(x.data)}`;
|
const printable = `${new Date()} | Response: ${x.status} | ${JSON.stringify(x.data)}`;
|
||||||
console.log(printable);
|
//console.log(printable);
|
||||||
CdkBase.createJsonEvent(socket, "TRACE", `Raw Response: ${printable}`, x.data);
|
CdkBase.createJsonEvent(socket, "SILLY", `Raw Response: ${printable}`, x.data);
|
||||||
|
|
||||||
return x;
|
return x;
|
||||||
});
|
});
|
||||||
@@ -181,7 +181,7 @@ async function QueryBillData(socket, billids) {
|
|||||||
const result = await client
|
const result = await client
|
||||||
.setHeaders({ Authorization: `Bearer ${socket.handshake.auth.token}` })
|
.setHeaders({ Authorization: `Bearer ${socket.handshake.auth.token}` })
|
||||||
.request(queries.GET_PBS_AP_ALLOCATIONS, { billids: billids });
|
.request(queries.GET_PBS_AP_ALLOCATIONS, { billids: billids });
|
||||||
CdkBase.createLogEvent(socket, "TRACE", `Bill data query result ${JSON.stringify(result, null, 2)}`);
|
CdkBase.createLogEvent(socket, "SILLY", `Bill data query result ${JSON.stringify(result, null, 2)}`);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ axios.interceptors.request.use((x) => {
|
|||||||
const printable = `${new Date()} | Request: ${x.method.toUpperCase()} | ${
|
const printable = `${new Date()} | Request: ${x.method.toUpperCase()} | ${
|
||||||
x.url
|
x.url
|
||||||
} | ${JSON.stringify(x.data)} | ${JSON.stringify(headers)}`;
|
} | ${JSON.stringify(x.data)} | ${JSON.stringify(headers)}`;
|
||||||
console.log(printable);
|
//console.log(printable);
|
||||||
|
|
||||||
CdkBase.createJsonEvent(socket, "TRACE", `Raw Request: ${printable}`, x.data);
|
CdkBase.createJsonEvent(socket, "SILLY", `Raw Request: ${printable}`, x.data);
|
||||||
|
|
||||||
return x;
|
return x;
|
||||||
});
|
});
|
||||||
@@ -37,8 +37,8 @@ axios.interceptors.response.use((x) => {
|
|||||||
const socket = x.config.socket;
|
const socket = x.config.socket;
|
||||||
|
|
||||||
const printable = `${new Date()} | Response: ${x.status} | ${JSON.stringify(x.data)}`;
|
const printable = `${new Date()} | Response: ${x.status} | ${JSON.stringify(x.data)}`;
|
||||||
console.log(printable);
|
//console.log(printable);
|
||||||
CdkBase.createJsonEvent(socket, "TRACE", `Raw Response: ${printable}`, x.data);
|
CdkBase.createJsonEvent(socket, "SILLY", `Raw Response: ${printable}`, x.data);
|
||||||
|
|
||||||
return x;
|
return x;
|
||||||
});
|
});
|
||||||
@@ -118,7 +118,7 @@ async function CheckForErrors(socket, response) {
|
|||||||
CdkBase.createLogEvent(socket, "DEBUG", `Successful response from DMS. ${response.Message || ""}`);
|
CdkBase.createLogEvent(socket, "DEBUG", `Successful response from DMS. ${response.Message || ""}`);
|
||||||
} else {
|
} else {
|
||||||
CdkBase.createLogEvent(socket, "ERROR", `Error received from DMS: ${response.Message}`);
|
CdkBase.createLogEvent(socket, "ERROR", `Error received from DMS: ${response.Message}`);
|
||||||
CdkBase.createLogEvent(socket, "TRACE", `Error received from DMS: ${JSON.stringify(response)}`);
|
CdkBase.createLogEvent(socket, "SILLY", `Error received from DMS: ${JSON.stringify(response)}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ async function QueryJobData(socket, jobid) {
|
|||||||
const result = await client
|
const result = await client
|
||||||
.setHeaders({ Authorization: `Bearer ${socket.handshake.auth.token}` })
|
.setHeaders({ Authorization: `Bearer ${socket.handshake.auth.token}` })
|
||||||
.request(queries.QUERY_JOBS_FOR_PBS_EXPORT, { id: jobid });
|
.request(queries.QUERY_JOBS_FOR_PBS_EXPORT, { id: jobid });
|
||||||
CdkBase.createLogEvent(socket, "TRACE", `Job data query result ${JSON.stringify(result, null, 2)}`);
|
CdkBase.createLogEvent(socket, "SILLY", `Job data query result ${JSON.stringify(result, null, 2)}`);
|
||||||
return result.jobs_by_pk;
|
return result.jobs_by_pk;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -611,7 +611,7 @@ async function InsertFailedExportLog(socket, error) {
|
|||||||
bodyshopid: socket.JobData.bodyshop.id,
|
bodyshopid: socket.JobData.bodyshop.id,
|
||||||
jobid: socket.JobData.id,
|
jobid: socket.JobData.id,
|
||||||
successful: false,
|
successful: false,
|
||||||
message: [error],
|
message: JSON.stringify(error),
|
||||||
useremail: socket.user.email
|
useremail: socket.user.email
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (!account) {
|
if (!account) {
|
||||||
logger.log("qbxml-receivables-no-account", "warn", null, jobline.id, null);
|
logger.log("qbxml-receivables-no-account", "warn", null, jobline.id);
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`A matching account does not exist for the part allocation. Center: ${jobline.profitcenter_part}`
|
`A matching account does not exist for the part allocation. Center: ${jobline.profitcenter_part}`
|
||||||
);
|
);
|
||||||
@@ -207,7 +207,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (!hasMapaLine && jobs_by_pk.job_totals.rates.mapa.total.amount > 0) {
|
if (!hasMapaLine && jobs_by_pk.job_totals.rates.mapa.total.amount > 0) {
|
||||||
// console.log("Adding MAPA Line Manually.");
|
// //console.log("Adding MAPA Line Manually.");
|
||||||
const mapaAccountName = responsibilityCenters.defaults.profits.MAPA;
|
const mapaAccountName = responsibilityCenters.defaults.profits.MAPA;
|
||||||
|
|
||||||
const mapaAccount = responsibilityCenters.profits.find((c) => c.name === mapaAccountName);
|
const mapaAccount = responsibilityCenters.profits.find((c) => c.name === mapaAccountName);
|
||||||
@@ -272,12 +272,12 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//console.log("NO MAPA ACCOUNT FOUND!!");
|
////console.log("NO MAPA ACCOUNT FOUND!!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hasMashLine && jobs_by_pk.job_totals.rates.mash.total.amount > 0) {
|
if (!hasMashLine && jobs_by_pk.job_totals.rates.mash.total.amount > 0) {
|
||||||
// console.log("Adding MASH Line Manually.");
|
// //console.log("Adding MASH Line Manually.");
|
||||||
|
|
||||||
const mashAccountName = responsibilityCenters.defaults.profits.MASH;
|
const mashAccountName = responsibilityCenters.defaults.profits.MASH;
|
||||||
|
|
||||||
@@ -341,7 +341,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// console.log("NO MASH ACCOUNT FOUND!!");
|
// //console.log("NO MASH ACCOUNT FOUND!!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -795,7 +795,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes
|
|||||||
: taxCodes[taxAccountCode];
|
: taxCodes[taxAccountCode];
|
||||||
for (let tyCounter = 1; tyCounter <= 5; tyCounter++) {
|
for (let tyCounter = 1; tyCounter <= 5; tyCounter++) {
|
||||||
const taxAmount = Dinero(job_totals.totals.us_sales_tax_breakdown[`ty${tyCounter}Tax`]);
|
const taxAmount = Dinero(job_totals.totals.us_sales_tax_breakdown[`ty${tyCounter}Tax`]);
|
||||||
console.log(`Tax ${tyCounter}`, taxAmount.toFormat());
|
//console.log(`Tax ${tyCounter}`, taxAmount.toFormat());
|
||||||
if (taxAmount.getAmount() > 0) {
|
if (taxAmount.getAmount() > 0) {
|
||||||
if (qbo) {
|
if (qbo) {
|
||||||
InvoiceLineAdd.push({
|
InvoiceLineAdd.push({
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user