Compare commits
174 Commits
feature/IO
...
feature/IO
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85497eb815 | ||
|
|
5724d0129c | ||
|
|
fd579fc509 | ||
|
|
6e21b1bdf6 | ||
|
|
a7ad18fae2 | ||
|
|
8bfa879485 | ||
|
|
ea774ff22b | ||
|
|
88101b0252 | ||
|
|
60ec76701d | ||
|
|
6b52723ba9 | ||
|
|
910c2a0f9b | ||
|
|
6c93e600c4 | ||
|
|
e70edaec7c | ||
|
|
acaba96e3b | ||
|
|
12d1613b04 | ||
|
|
df878672fc | ||
|
|
076115253f | ||
|
|
6f58528de2 | ||
|
|
3defe7201f | ||
|
|
4ce75ead52 | ||
|
|
6de7ec00fe | ||
|
|
90ea2cd699 | ||
|
|
800552210b | ||
|
|
80abea56b4 | ||
|
|
480f081c40 | ||
|
|
9529335c96 | ||
|
|
4334b3f419 | ||
|
|
94353bb342 | ||
|
|
5aad7acdd5 | ||
|
|
cd4f7ffb9c | ||
|
|
400dc79ed6 | ||
|
|
1dfb309223 | ||
|
|
29c9fb37a1 | ||
|
|
41d6f0a4bc | ||
|
|
af70c80e09 | ||
|
|
b02d4e0fdd | ||
|
|
27bf8d9ed6 | ||
|
|
582ad03e05 | ||
|
|
babdfe4cc5 | ||
|
|
8a7a94dd70 | ||
|
|
2654519277 | ||
|
|
02eddcbbf4 | ||
|
|
b967bb6d4e | ||
|
|
f60870a087 | ||
|
|
39aa21d985 | ||
|
|
512bb5e013 | ||
|
|
7581b8634e | ||
|
|
78f041a34f | ||
|
|
2c456cbf03 | ||
|
|
da76021802 | ||
|
|
6de06e084b | ||
|
|
cb49c91983 | ||
|
|
b0df5fa91c | ||
|
|
0652404334 | ||
|
|
bd7d8068df | ||
|
|
4dd868130c | ||
|
|
71860cf899 | ||
|
|
3512905264 | ||
|
|
2c072a9e7a | ||
|
|
fee5bee569 | ||
|
|
0a1cdbdfe3 | ||
|
|
8af79989ff | ||
|
|
5d2bdc7ee1 | ||
|
|
255d65e47d | ||
|
|
f0805e0a79 | ||
|
|
c875ade35c | ||
|
|
31b4f4e561 | ||
|
|
9b485bfe45 | ||
|
|
91279c27fe | ||
|
|
2c1844fb13 | ||
|
|
3812a0650e | ||
|
|
b1c5bbb01f | ||
|
|
bd59e40761 | ||
|
|
f440a2b022 | ||
|
|
6262b3ff83 | ||
|
|
0652114013 | ||
|
|
307c77b30c | ||
|
|
3150647ff6 | ||
|
|
f1d7a98fe8 | ||
|
|
be259317f9 | ||
|
|
046d104bfa | ||
|
|
e2258bb91f | ||
|
|
9c693a2b74 | ||
|
|
2be0f3de09 | ||
|
|
3dd4b3dd77 | ||
|
|
de8c2cd5a2 | ||
|
|
b791f9846f | ||
|
|
daa7631056 | ||
|
|
d2f7585ea5 | ||
|
|
14b8a2daef | ||
|
|
90b38d817d | ||
|
|
ace48e2890 | ||
|
|
fb810be5d5 | ||
|
|
50230e9f50 | ||
|
|
86e14967ca | ||
|
|
c45c3b4037 | ||
|
|
c4c11528b9 | ||
|
|
1f9c4e92f1 | ||
|
|
371e148e09 | ||
|
|
33af544ded | ||
|
|
6b8d0ec91c | ||
|
|
5a3ddfad0f | ||
|
|
043c44ed51 | ||
|
|
6d5dbf3145 | ||
|
|
6d8463265c | ||
|
|
0669282432 | ||
|
|
1af511be2f | ||
|
|
bf4dc7e158 | ||
|
|
14b38604a3 | ||
|
|
5de2036fdb | ||
|
|
1629663e15 | ||
|
|
e25f2db2b1 | ||
|
|
cbf5d268ea | ||
|
|
a92a95a9fa | ||
|
|
0be7bf2c8e | ||
|
|
56b810dd40 | ||
|
|
33cfa531b8 | ||
|
|
40c7b706aa | ||
|
|
000ded6649 | ||
|
|
72181e1ff7 | ||
|
|
d73b1d2220 | ||
|
|
88c03ce655 | ||
|
|
8645b434c8 | ||
|
|
38a13bd082 | ||
|
|
3bc5f5d626 | ||
|
|
86a2351316 | ||
|
|
de62e994bd | ||
|
|
d5b1496898 | ||
|
|
d0d8354395 | ||
|
|
6d2c3c81c7 | ||
|
|
3486e16d4e | ||
|
|
e2e02945cc | ||
|
|
404efcaf05 | ||
|
|
9b96460e4f | ||
|
|
618eff4973 | ||
|
|
109c34bebd | ||
|
|
1aab5aa740 | ||
|
|
484cb8e39e | ||
|
|
1ca483d4b0 | ||
|
|
3641363d3d | ||
|
|
094160ebf3 | ||
|
|
fde13436c9 | ||
|
|
e7be4c6e61 | ||
|
|
708fe63852 | ||
|
|
3f579f49b9 | ||
|
|
c15e69f079 | ||
|
|
ddb919e2cc | ||
|
|
27e0f497bb | ||
|
|
b9a9f07d7b | ||
|
|
3a06e813a8 | ||
|
|
c2aaf8844f | ||
|
|
488f79ddc8 | ||
|
|
5704e54e48 | ||
|
|
3c4902f71f | ||
|
|
5fb62aa16b | ||
|
|
f4473d11a8 | ||
|
|
dd469bad12 | ||
|
|
a716535795 | ||
|
|
c2ec476324 | ||
|
|
3ecd29c640 | ||
|
|
01443c478d | ||
|
|
209245187f | ||
|
|
3a9e989d70 | ||
|
|
8839fc0293 | ||
|
|
028bf3c7a0 | ||
|
|
ed05754368 | ||
|
|
7c3043988b | ||
|
|
a16f0df7de | ||
|
|
2562151f6e | ||
|
|
5e96ccdd99 | ||
|
|
965af6da5f | ||
|
|
c5c47e9bfc | ||
|
|
d66fdfb2e0 | ||
|
|
4bc8ff26d2 |
@@ -1,4 +1,4 @@
|
|||||||
<babeledit_project be_version="2.7.1" version="1.2">
|
<babeledit_project version="1.2" be_version="2.7.1">
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
BabelEdit project file
|
BabelEdit project file
|
||||||
@@ -4318,6 +4318,48 @@
|
|||||||
<folder_node>
|
<folder_node>
|
||||||
<name>dms</name>
|
<name>dms</name>
|
||||||
<children>
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>apcontrol</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>appostingaccount</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>cashierid</name>
|
<name>cashierid</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -6622,6 +6664,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>void</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>
|
||||||
@@ -14004,6 +14067,48 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>scheduledintoday</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>scheduledouttoday</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>
|
||||||
</children>
|
</children>
|
||||||
@@ -23844,6 +23949,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>dms_unsold</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>dms_wip_acctnumber</name>
|
<name>dms_wip_acctnumber</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -37411,6 +37537,48 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>markexported</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>markforreexport</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>new</name>
|
<name>new</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -37542,6 +37710,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>markreexported</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>payment</name>
|
<name>payment</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -39355,6 +39544,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>mpi_final_repair_acct_sheet</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>paint_grid</name>
|
<name>paint_grid</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -40433,6 +40643,27 @@
|
|||||||
<folder_node>
|
<folder_node>
|
||||||
<name>jobs</name>
|
<name>jobs</name>
|
||||||
<children>
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>individual_job_note</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>parts_order</name>
|
<name>parts_order</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -43276,6 +43507,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>jobs_scheduled_completion</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>lag_time</name>
|
<name>lag_time</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -44378,6 +44630,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>estimators</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>ins_co_nm_filter</name>
|
<name>ins_co_nm_filter</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
"react-i18next": "^12.2.0",
|
"react-i18next": "^12.2.0",
|
||||||
"react-icons": "^4.7.1",
|
"react-icons": "^4.7.1",
|
||||||
"react-image-lightbox": "^5.1.4",
|
"react-image-lightbox": "^5.1.4",
|
||||||
|
"react-intersection-observer": "^9.4.3",
|
||||||
"react-number-format": "^5.1.3",
|
"react-number-format": "^5.1.3",
|
||||||
"react-redux": "^8.0.5",
|
"react-redux": "^8.0.5",
|
||||||
"react-resizable": "^3.0.4",
|
"react-resizable": "^3.0.4",
|
||||||
|
|||||||
@@ -145,7 +145,11 @@
|
|||||||
|
|
||||||
//Update row highlighting on production board.
|
//Update row highlighting on production board.
|
||||||
.ant-table-tbody > tr.ant-table-row:hover > td {
|
.ant-table-tbody > tr.ant-table-row:hover > td {
|
||||||
background: #eaeaea !important;
|
background: #e7f3ff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-table-tbody > tr.ant-table-row-selected > td {
|
||||||
|
background: #e6f7ff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.job-line-manual {
|
.job-line-manual {
|
||||||
@@ -156,3 +160,11 @@
|
|||||||
td.ant-table-column-sort {
|
td.ant-table-column-sort {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ant-table-tbody > tr.ant-table-row:nth-child(2n) > td {
|
||||||
|
background-color: #f4f4f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rowWithColor > td {
|
||||||
|
background-color: var(--bgColor) !important;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
import { useApolloClient, useMutation } from "@apollo/client";
|
import { useApolloClient, useMutation } from "@apollo/client";
|
||||||
import { Button, Checkbox, Form, Modal, notification, Space } from "antd";
|
import { Button, Checkbox, Form, Modal, Space, notification } from "antd";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import React, { useEffect, useState, useMemo } from "react";
|
import React, { 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 { INSERT_NEW_BILL } from "../../graphql/bills.queries";
|
import { INSERT_NEW_BILL } from "../../graphql/bills.queries";
|
||||||
|
import { UPDATE_INVENTORY_LINES } from "../../graphql/inventory.queries";
|
||||||
import { UPDATE_JOB_LINE } from "../../graphql/jobs-lines.queries";
|
import { UPDATE_JOB_LINE } from "../../graphql/jobs-lines.queries";
|
||||||
import {
|
import {
|
||||||
QUERY_JOB_LBR_ADJUSTMENTS,
|
QUERY_JOB_LBR_ADJUSTMENTS,
|
||||||
UPDATE_JOB,
|
UPDATE_JOB,
|
||||||
} from "../../graphql/jobs.queries";
|
} from "../../graphql/jobs.queries";
|
||||||
import { MUTATION_MARK_RETURN_RECEIVED } from "../../graphql/parts-orders.queries";
|
import { MUTATION_MARK_RETURN_RECEIVED } from "../../graphql/parts-orders.queries";
|
||||||
import { UPDATE_INVENTORY_LINES } from "../../graphql/inventory.queries";
|
|
||||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||||
import { toggleModalVisible } from "../../redux/modals/modals.actions";
|
import { toggleModalVisible } from "../../redux/modals/modals.actions";
|
||||||
import { selectBillEnterModal } from "../../redux/modals/modals.selectors";
|
import { selectBillEnterModal } from "../../redux/modals/modals.selectors";
|
||||||
@@ -20,15 +20,15 @@ import {
|
|||||||
selectBodyshop,
|
selectBodyshop,
|
||||||
selectCurrentUser,
|
selectCurrentUser,
|
||||||
} from "../../redux/user/user.selectors";
|
} from "../../redux/user/user.selectors";
|
||||||
import confirmDialog from "../../utils/asyncConfirm";
|
|
||||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||||
import BillFormContainer from "../bill-form/bill-form.container";
|
|
||||||
import { CalculateBillTotal } from "../bill-form/bill-form.totals.utility";
|
|
||||||
import { handleUpload } from "../documents-upload/documents-upload.utility";
|
|
||||||
import { handleUpload as handleLocalUpload } from "../documents-local-upload/documents-local-upload.utility";
|
|
||||||
import useLocalStorage from "../../utils/useLocalStorage";
|
|
||||||
import { GenerateDocument } from "../../utils/RenderTemplate";
|
import { GenerateDocument } from "../../utils/RenderTemplate";
|
||||||
import { TemplateList } from "../../utils/TemplateConstants";
|
import { TemplateList } from "../../utils/TemplateConstants";
|
||||||
|
import confirmDialog from "../../utils/asyncConfirm";
|
||||||
|
import useLocalStorage from "../../utils/useLocalStorage";
|
||||||
|
import BillFormContainer from "../bill-form/bill-form.container";
|
||||||
|
import { CalculateBillTotal } from "../bill-form/bill-form.totals.utility";
|
||||||
|
import { handleUpload as handleLocalUpload } from "../documents-local-upload/documents-local-upload.utility";
|
||||||
|
import { handleUpload } from "../documents-upload/documents-upload.utility";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
billEnterModal: selectBillEnterModal,
|
billEnterModal: selectBillEnterModal,
|
||||||
@@ -126,6 +126,17 @@ function BillEnterModalContainer({
|
|||||||
deductedfromlbr: deductedfromlbr,
|
deductedfromlbr: deductedfromlbr,
|
||||||
lbr_adjustment,
|
lbr_adjustment,
|
||||||
joblineid: i.joblineid === "noline" ? null : i.joblineid,
|
joblineid: i.joblineid === "noline" ? null : i.joblineid,
|
||||||
|
applicable_taxes: {
|
||||||
|
federal:
|
||||||
|
(i.applicable_taxes && i.applicable_taxes.federal) ||
|
||||||
|
false,
|
||||||
|
state:
|
||||||
|
(i.applicable_taxes && i.applicable_taxes.state) ||
|
||||||
|
false,
|
||||||
|
local:
|
||||||
|
(i.applicable_taxes && i.applicable_taxes.local) ||
|
||||||
|
false,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,12 +1,19 @@
|
|||||||
import { Badge, List, Tag } from "antd";
|
import { Badge, List, Tag } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
|
import {
|
||||||
|
AutoSizer,
|
||||||
|
CellMeasurer,
|
||||||
|
CellMeasurerCache,
|
||||||
|
List as VirtualizedList,
|
||||||
|
} from "react-virtualized";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { setSelectedConversation } from "../../redux/messaging/messaging.actions";
|
import { setSelectedConversation } from "../../redux/messaging/messaging.actions";
|
||||||
import { selectSelectedConversation } from "../../redux/messaging/messaging.selectors";
|
import { selectSelectedConversation } from "../../redux/messaging/messaging.selectors";
|
||||||
import { TimeAgoFormatter } from "../../utils/DateFormatter";
|
import { TimeAgoFormatter } from "../../utils/DateFormatter";
|
||||||
import PhoneFormatter from "../../utils/PhoneFormatter";
|
import PhoneFormatter from "../../utils/PhoneFormatter";
|
||||||
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
|
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
|
||||||
|
|
||||||
import "./chat-conversation-list.styles.scss";
|
import "./chat-conversation-list.styles.scss";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
@@ -18,59 +25,95 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
dispatch(setSelectedConversation(conversationId)),
|
dispatch(setSelectedConversation(conversationId)),
|
||||||
});
|
});
|
||||||
|
|
||||||
export function ChatConversationListComponent({
|
function ChatConversationListComponent({
|
||||||
conversationList,
|
conversationList,
|
||||||
selectedConversation,
|
selectedConversation,
|
||||||
setSelectedConversation,
|
setSelectedConversation,
|
||||||
|
loadMoreConversations,
|
||||||
}) {
|
}) {
|
||||||
|
const cache = new CellMeasurerCache({
|
||||||
|
fixedWidth: true,
|
||||||
|
defaultHeight: 60,
|
||||||
|
});
|
||||||
|
|
||||||
|
const rowRenderer = ({ index, key, style, parent }) => {
|
||||||
|
const item = conversationList[index];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<CellMeasurer
|
||||||
|
key={key}
|
||||||
|
cache={cache}
|
||||||
|
parent={parent}
|
||||||
|
columnIndex={0}
|
||||||
|
rowIndex={index}
|
||||||
|
>
|
||||||
|
<List.Item
|
||||||
|
onClick={() => setSelectedConversation(item.id)}
|
||||||
|
className={`chat-list-item ${
|
||||||
|
item.id === selectedConversation
|
||||||
|
? "chat-list-selected-conversation"
|
||||||
|
: null
|
||||||
|
}`}
|
||||||
|
style={style}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "inline-block",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{item.label && <div className="chat-name">{item.label}</div>}
|
||||||
|
{item.job_conversations.length > 0 ? (
|
||||||
|
<div className="chat-name">
|
||||||
|
{item.job_conversations.map((j, idx) => (
|
||||||
|
<div key={idx}>
|
||||||
|
<OwnerNameDisplay ownerObject={j.job} />
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<PhoneFormatter>{item.phone_num}</PhoneFormatter>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div style={{ display: "inline-block" }}>
|
||||||
|
<div>
|
||||||
|
{item.job_conversations.length > 0
|
||||||
|
? item.job_conversations.map((j, idx) => (
|
||||||
|
<Tag key={idx} className="ro-number-tag">
|
||||||
|
{j.job.ro_number}
|
||||||
|
</Tag>
|
||||||
|
))
|
||||||
|
: null}
|
||||||
|
</div>
|
||||||
|
<TimeAgoFormatter>{item.updated_at}</TimeAgoFormatter>
|
||||||
|
</div>
|
||||||
|
<Badge count={item.messages_aggregate.aggregate.count || 0} />
|
||||||
|
</List.Item>
|
||||||
|
</CellMeasurer>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="chat-list-container">
|
<div className="chat-list-container">
|
||||||
<List
|
<AutoSizer>
|
||||||
bordered
|
{({ height, width }) => (
|
||||||
dataSource={conversationList}
|
<VirtualizedList
|
||||||
renderItem={(item) => (
|
height={height}
|
||||||
<List.Item
|
width={width}
|
||||||
key={item.id}
|
rowCount={conversationList.length}
|
||||||
onClick={() => setSelectedConversation(item.id)}
|
rowHeight={cache.rowHeight}
|
||||||
className={`chat-list-item ${
|
rowRenderer={rowRenderer}
|
||||||
item.id === selectedConversation
|
onScroll={({ scrollTop, scrollHeight, clientHeight }) => {
|
||||||
? "chat-list-selected-conversation"
|
if (scrollTop + clientHeight === scrollHeight) {
|
||||||
: null
|
loadMoreConversations();
|
||||||
}`}
|
}
|
||||||
>
|
}}
|
||||||
<div sryle={{ display: "inline-block" }}>
|
/>
|
||||||
{item.label && <div className="chat-name">{item.label}</div>}
|
|
||||||
{item.job_conversations.length > 0 ? (
|
|
||||||
<div className="chat-name">
|
|
||||||
{item.job_conversations.map((j, idx) => (
|
|
||||||
<div key={idx}>
|
|
||||||
<OwnerNameDisplay ownerObject={j.job} />
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<PhoneFormatter>{item.phone_num}</PhoneFormatter>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<div sryle={{ display: "inline-block" }}>
|
|
||||||
<div>
|
|
||||||
{item.job_conversations.length > 0
|
|
||||||
? item.job_conversations.map((j, idx) => (
|
|
||||||
<Tag key={idx} className="ro-number-tag">
|
|
||||||
{j.job.ro_number}
|
|
||||||
</Tag>
|
|
||||||
))
|
|
||||||
: null}
|
|
||||||
</div>
|
|
||||||
<TimeAgoFormatter>{item.updated_at}</TimeAgoFormatter>
|
|
||||||
</div>
|
|
||||||
<Badge count={item.messages_aggregate.aggregate.count || 0} />
|
|
||||||
</List.Item>
|
|
||||||
)}
|
)}
|
||||||
/>
|
</AutoSizer>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
mapStateToProps,
|
mapStateToProps,
|
||||||
mapDispatchToProps
|
mapDispatchToProps
|
||||||
|
|||||||
@@ -3,8 +3,9 @@
|
|||||||
}
|
}
|
||||||
.chat-list-container {
|
.chat-list-container {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: auto;
|
overflow: hidden;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
border: 1px solid gainsboro;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-list-item {
|
.chat-list-item {
|
||||||
@@ -21,4 +22,6 @@
|
|||||||
.ro-number-tag {
|
.ro-number-tag {
|
||||||
align-self: baseline;
|
align-self: baseline;
|
||||||
}
|
}
|
||||||
|
padding: 12px 24px;
|
||||||
|
border-bottom: 1px solid gainsboro;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import {
|
|||||||
ShrinkOutlined,
|
ShrinkOutlined,
|
||||||
SyncOutlined,
|
SyncOutlined,
|
||||||
} from "@ant-design/icons";
|
} from "@ant-design/icons";
|
||||||
import { useQuery } from "@apollo/client";
|
import { useLazyQuery, useQuery } from "@apollo/client";
|
||||||
import { Badge, Card, Col, Row, Space, Tag, Tooltip, Typography } from "antd";
|
import { Badge, Card, Col, Row, Space, Tag, Tooltip, Typography } from "antd";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useCallback, useEffect, 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";
|
||||||
@@ -47,12 +47,13 @@ export function ChatPopupComponent({
|
|||||||
...(pollInterval > 0 ? { pollInterval } : {}),
|
...(pollInterval > 0 ? { pollInterval } : {}),
|
||||||
});
|
});
|
||||||
|
|
||||||
const { loading, data, refetch, called } = useQuery(CONVERSATION_LIST_QUERY, {
|
const [getConversations, { loading, data, refetch, fetchMore }] =
|
||||||
fetchPolicy: "network-only",
|
useLazyQuery(CONVERSATION_LIST_QUERY, {
|
||||||
nextFetchPolicy: "network-only",
|
fetchPolicy: "network-only",
|
||||||
skip: !chatVisible,
|
nextFetchPolicy: "network-only",
|
||||||
...(pollInterval > 0 ? { pollInterval } : {}),
|
skip: !chatVisible,
|
||||||
});
|
...(pollInterval > 0 ? { pollInterval } : {}),
|
||||||
|
});
|
||||||
|
|
||||||
const fcmToken = sessionStorage.getItem("fcmtoken");
|
const fcmToken = sessionStorage.getItem("fcmtoken");
|
||||||
|
|
||||||
@@ -65,15 +66,22 @@ export function ChatPopupComponent({
|
|||||||
}, [fcmToken]);
|
}, [fcmToken]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (called && chatVisible) refetch();
|
if (chatVisible)
|
||||||
}, [chatVisible, called, refetch]);
|
getConversations({
|
||||||
|
variables: {
|
||||||
|
offset: 0,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}, [chatVisible, getConversations]);
|
||||||
|
|
||||||
// const unreadCount = data
|
const loadMoreConversations = useCallback(() => {
|
||||||
// ? data.conversations.reduce(
|
if (data)
|
||||||
// (acc, val) => val.messages_aggregate.aggregate.count + acc,
|
fetchMore({
|
||||||
// 0
|
variables: {
|
||||||
// )
|
offset: data.conversations.length,
|
||||||
// : 0;
|
},
|
||||||
|
});
|
||||||
|
}, [data, fetchMore]);
|
||||||
|
|
||||||
const unreadCount = unreadData?.messages_aggregate.aggregate.count || 0;
|
const unreadCount = unreadData?.messages_aggregate.aggregate.count || 0;
|
||||||
|
|
||||||
@@ -110,6 +118,7 @@ export function ChatPopupComponent({
|
|||||||
) : (
|
) : (
|
||||||
<ChatConversationListComponent
|
<ChatConversationListComponent
|
||||||
conversationList={data ? data.conversations : []}
|
conversationList={data ? data.conversations : []}
|
||||||
|
loadMoreConversations={loadMoreConversations}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Col>
|
</Col>
|
||||||
|
|||||||
@@ -59,6 +59,14 @@ export default function ContractsCarsComponent({
|
|||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "model" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "model" && state.sortedInfo.order,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: t("courtesycars.fields.color"),
|
||||||
|
dataIndex: "color",
|
||||||
|
key: "color",
|
||||||
|
sorter: (a, b) => alphaSort(a.color, b.color),
|
||||||
|
sortOrder:
|
||||||
|
state.sortedInfo.columnKey === "color" && state.sortedInfo.order,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: t("courtesycars.fields.plate"),
|
title: t("courtesycars.fields.plate"),
|
||||||
dataIndex: "plate",
|
dataIndex: "plate",
|
||||||
@@ -93,6 +101,9 @@ export default function ContractsCarsComponent({
|
|||||||
(cc.model || "")
|
(cc.model || "")
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(state.search.toLowerCase()) ||
|
.includes(state.search.toLowerCase()) ||
|
||||||
|
(cc.color || "")
|
||||||
|
.toLowerCase()
|
||||||
|
.includes(state.search.toLowerCase()) ||
|
||||||
(cc.plate || "").toLowerCase().includes(state.search.toLowerCase())
|
(cc.plate || "").toLowerCase().includes(state.search.toLowerCase())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,235 @@
|
|||||||
|
import {
|
||||||
|
BranchesOutlined,
|
||||||
|
ExclamationCircleFilled,
|
||||||
|
PauseCircleOutlined,
|
||||||
|
} from "@ant-design/icons";
|
||||||
|
import { Card, Space, Table, Tooltip } from "antd";
|
||||||
|
import moment from "moment";
|
||||||
|
import React, { useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { Link } from "react-router-dom";
|
||||||
|
import ChatOpenButton from "../../chat-open-button/chat-open-button.component";
|
||||||
|
import OwnerNameDisplay from "../../owner-name-display/owner-name-display.component";
|
||||||
|
import DashboardRefreshRequired from "../refresh-required.component";
|
||||||
|
|
||||||
|
export default function DashboardScheduledInToday({ data, ...cardProps }) {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const [state, setState] = useState({
|
||||||
|
sortedInfo: {},
|
||||||
|
});
|
||||||
|
if (!data) return null;
|
||||||
|
if (!data.scheduled_in_today)
|
||||||
|
return <DashboardRefreshRequired {...cardProps} />;
|
||||||
|
|
||||||
|
const appt = []; // Flatten Data
|
||||||
|
data.scheduled_in_today.forEach((item) => {
|
||||||
|
var i = {
|
||||||
|
canceled: item.canceled,
|
||||||
|
id: item.id,
|
||||||
|
alt_transport: item.job.alt_transport,
|
||||||
|
clm_no: item.job.clm_no,
|
||||||
|
jobid: item.job.jobid,
|
||||||
|
ins_co_nm: item.job.ins_co_nm,
|
||||||
|
iouparent: item.job.iouparent,
|
||||||
|
ownerid: item.job.ownerid,
|
||||||
|
ownr_co_nm: item.job.ownr_co_nm,
|
||||||
|
ownr_ea: item.job.ownr_ea,
|
||||||
|
ownr_fn: item.job.ownr_fn,
|
||||||
|
ownr_ln: item.job.ownr_ln,
|
||||||
|
ownr_ph1: item.job.ownr_ph1,
|
||||||
|
ownr_ph2: item.job.ownr_ph2,
|
||||||
|
production_vars: item.job.production_vars,
|
||||||
|
ro_number: item.job.ro_number,
|
||||||
|
suspended: item.job.suspended,
|
||||||
|
v_make_desc: item.job.v_make_desc,
|
||||||
|
v_model_desc: item.job.v_model_desc,
|
||||||
|
v_model_yr: item.job.v_model_yr,
|
||||||
|
v_vin: item.job.v_vin,
|
||||||
|
vehicleid: item.job.vehicleid,
|
||||||
|
note: item.note,
|
||||||
|
start: moment(item.start).format("hh:mm a"),
|
||||||
|
title: item.title,
|
||||||
|
};
|
||||||
|
appt.push(i);
|
||||||
|
});
|
||||||
|
appt.sort ( function (a, b) { return new Date(a.start) - new Date(b.start); });
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.ro_number"),
|
||||||
|
dataIndex: "ro_number",
|
||||||
|
key: "ro_number",
|
||||||
|
render: (text, record) => (
|
||||||
|
<Link
|
||||||
|
to={"/manage/jobs/" + record.jobid}
|
||||||
|
onClick={(e) => e.stopPropagation()}
|
||||||
|
>
|
||||||
|
<Space>
|
||||||
|
{record.ro_number || t("general.labels.na")}
|
||||||
|
{record.production_vars && record.production_vars.alert ? (
|
||||||
|
<ExclamationCircleFilled className="production-alert" />
|
||||||
|
) : null}
|
||||||
|
{record.suspended && (
|
||||||
|
<PauseCircleOutlined style={{ color: "orangered" }} />
|
||||||
|
)}
|
||||||
|
{record.iouparent && (
|
||||||
|
<Tooltip title={t("jobs.labels.iou")}>
|
||||||
|
<BranchesOutlined style={{ color: "orangered" }} />
|
||||||
|
</Tooltip>
|
||||||
|
)}
|
||||||
|
</Space>
|
||||||
|
</Link>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.owner"),
|
||||||
|
dataIndex: "owner",
|
||||||
|
key: "owner",
|
||||||
|
ellipsis: true,
|
||||||
|
responsive: ["md"],
|
||||||
|
render: (text, record) => {
|
||||||
|
return record.ownerid ? (
|
||||||
|
<Link
|
||||||
|
to={"/manage/owners/" + record.ownerid}
|
||||||
|
onClick={(e) => e.stopPropagation()}
|
||||||
|
>
|
||||||
|
<OwnerNameDisplay ownerObject={record} />
|
||||||
|
</Link>
|
||||||
|
) : (
|
||||||
|
<span>
|
||||||
|
<OwnerNameDisplay ownerObject={record} />
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.ownr_ph1"),
|
||||||
|
dataIndex: "ownr_ph1",
|
||||||
|
key: "ownr_ph1",
|
||||||
|
ellipsis: true,
|
||||||
|
responsive: ["md"],
|
||||||
|
render: (text, record) => (
|
||||||
|
<ChatOpenButton phone={record.ownr_ph1} jobid={record.jobid} />
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.ownr_ph2"),
|
||||||
|
dataIndex: "ownr_ph2",
|
||||||
|
key: "ownr_ph2",
|
||||||
|
ellipsis: true,
|
||||||
|
responsive: ["md"],
|
||||||
|
render: (text, record) => (
|
||||||
|
<ChatOpenButton phone={record.ownr_ph2} jobid={record.jobid} />
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.ownr_ea"),
|
||||||
|
dataIndex: "ownr_ea",
|
||||||
|
key: "ownr_ea",
|
||||||
|
ellipsis: true,
|
||||||
|
responsive: ["md"],
|
||||||
|
render: (text, record) => (
|
||||||
|
<ChatOpenButton phone={record.ownr_ea} jobid={record.jobid} />
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.vehicle"),
|
||||||
|
dataIndex: "vehicle",
|
||||||
|
key: "vehicle",
|
||||||
|
ellipsis: true,
|
||||||
|
render: (text, record) => {
|
||||||
|
return record.vehicleid ? (
|
||||||
|
<Link
|
||||||
|
to={"/manage/vehicles/" + record.vehicleid}
|
||||||
|
onClick={(e) => e.stopPropagation()}
|
||||||
|
>
|
||||||
|
{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${
|
||||||
|
record.v_model_desc || ""
|
||||||
|
}`}
|
||||||
|
</Link>
|
||||||
|
) : (
|
||||||
|
<span>{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${
|
||||||
|
record.v_model_desc || ""
|
||||||
|
}`}</span>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.ins_co_nm"),
|
||||||
|
dataIndex: "ins_co_nm",
|
||||||
|
key: "ins_co_nm",
|
||||||
|
ellipsis: true,
|
||||||
|
responsive: ["md"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("appointments.fields.time"),
|
||||||
|
dataIndex: "start",
|
||||||
|
key: "start",
|
||||||
|
ellipsis: true,
|
||||||
|
responsive: ["md"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("appointments.fields.alt_transport"),
|
||||||
|
dataIndex: "alt_transport",
|
||||||
|
key: "alt_transport",
|
||||||
|
ellipsis: true,
|
||||||
|
responsive: ["md"],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const handleTableChange = (sorter) => {
|
||||||
|
setState({ ...state, sortedInfo: sorter });
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Card title={t("dashboard.titles.scheduledintoday", {date: moment().startOf("day").format("MM/DD/YYYY")})} {...cardProps}>
|
||||||
|
<div style={{ height: "100%" }}>
|
||||||
|
<Table
|
||||||
|
onChange={handleTableChange}
|
||||||
|
pagination={{ position: "top", defaultPageSize: 50 }}
|
||||||
|
columns={columns}
|
||||||
|
scroll={{ x: true, y: "calc(100% - 2em)" }}
|
||||||
|
rowKey="id"
|
||||||
|
style={{ height: "85%" }}
|
||||||
|
dataSource={appt}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const DashboardScheduledInTodayGql = `
|
||||||
|
scheduled_in_today: appointments(where: {start: {_gte: "${moment()
|
||||||
|
.startOf("day")
|
||||||
|
.toISOString()}", _lte: "${moment()
|
||||||
|
.endOf("day")
|
||||||
|
.toISOString()}"}, canceled: {_eq: false}, block: {_neq: true}}) {
|
||||||
|
canceled
|
||||||
|
id
|
||||||
|
job {
|
||||||
|
alt_transport
|
||||||
|
clm_no
|
||||||
|
jobid: id
|
||||||
|
ins_co_nm
|
||||||
|
iouparent
|
||||||
|
ownerid
|
||||||
|
ownr_co_nm
|
||||||
|
ownr_ea
|
||||||
|
ownr_fn
|
||||||
|
ownr_ln
|
||||||
|
ownr_ph1
|
||||||
|
ownr_ph2
|
||||||
|
production_vars
|
||||||
|
ro_number
|
||||||
|
suspended
|
||||||
|
v_make_desc
|
||||||
|
v_model_desc
|
||||||
|
v_model_yr
|
||||||
|
v_vin
|
||||||
|
vehicleid
|
||||||
|
}
|
||||||
|
note
|
||||||
|
start
|
||||||
|
title
|
||||||
|
}
|
||||||
|
`;
|
||||||
@@ -0,0 +1,210 @@
|
|||||||
|
import {
|
||||||
|
BranchesOutlined,
|
||||||
|
ExclamationCircleFilled,
|
||||||
|
PauseCircleOutlined,
|
||||||
|
} from "@ant-design/icons";
|
||||||
|
import { Card, Space, Table, Tooltip } from "antd";
|
||||||
|
import moment from "moment";
|
||||||
|
import React, { useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { Link } from "react-router-dom";
|
||||||
|
import ChatOpenButton from "../../chat-open-button/chat-open-button.component";
|
||||||
|
import OwnerNameDisplay from "../../owner-name-display/owner-name-display.component";
|
||||||
|
import DashboardRefreshRequired from "../refresh-required.component";
|
||||||
|
|
||||||
|
export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const [state, setState] = useState({
|
||||||
|
sortedInfo: {},
|
||||||
|
});
|
||||||
|
if (!data) return null;
|
||||||
|
if (!data.scheduled_out_today)
|
||||||
|
return <DashboardRefreshRequired {...cardProps} />;
|
||||||
|
|
||||||
|
data.scheduled_out_today.forEach((item) => {
|
||||||
|
item.scheduled_completion= moment(item.scheduled_completion).format("hh:mm a")
|
||||||
|
});
|
||||||
|
data.scheduled_out_today.sort(function (a, b) {
|
||||||
|
return new Date(a.scheduled_completion) - new Date(b.scheduled_completion);
|
||||||
|
});
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.ro_number"),
|
||||||
|
dataIndex: "ro_number",
|
||||||
|
key: "ro_number",
|
||||||
|
render: (text, record) => (
|
||||||
|
<Link
|
||||||
|
to={"/manage/jobs/" + record.jobid}
|
||||||
|
onClick={(e) => e.stopPropagation()}
|
||||||
|
>
|
||||||
|
<Space>
|
||||||
|
{record.ro_number || t("general.labels.na")}
|
||||||
|
{record.production_vars && record.production_vars.alert ? (
|
||||||
|
<ExclamationCircleFilled className="production-alert" />
|
||||||
|
) : null}
|
||||||
|
{record.suspended && (
|
||||||
|
<PauseCircleOutlined style={{ color: "orangered" }} />
|
||||||
|
)}
|
||||||
|
{record.iouparent && (
|
||||||
|
<Tooltip title={t("jobs.labels.iou")}>
|
||||||
|
<BranchesOutlined style={{ color: "orangered" }} />
|
||||||
|
</Tooltip>
|
||||||
|
)}
|
||||||
|
</Space>
|
||||||
|
</Link>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.owner"),
|
||||||
|
dataIndex: "owner",
|
||||||
|
key: "owner",
|
||||||
|
ellipsis: true,
|
||||||
|
responsive: ["md"],
|
||||||
|
render: (text, record) => {
|
||||||
|
return record.ownerid ? (
|
||||||
|
<Link
|
||||||
|
to={"/manage/owners/" + record.ownerid}
|
||||||
|
onClick={(e) => e.stopPropagation()}
|
||||||
|
>
|
||||||
|
<OwnerNameDisplay ownerObject={record} />
|
||||||
|
</Link>
|
||||||
|
) : (
|
||||||
|
<span>
|
||||||
|
<OwnerNameDisplay ownerObject={record} />
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.ownr_ph1"),
|
||||||
|
dataIndex: "ownr_ph1",
|
||||||
|
key: "ownr_ph1",
|
||||||
|
ellipsis: true,
|
||||||
|
responsive: ["md"],
|
||||||
|
render: (text, record) => (
|
||||||
|
<ChatOpenButton phone={record.ownr_ph1} jobid={record.jobid} />
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.ownr_ph2"),
|
||||||
|
dataIndex: "ownr_ph2",
|
||||||
|
key: "ownr_ph2",
|
||||||
|
ellipsis: true,
|
||||||
|
responsive: ["md"],
|
||||||
|
render: (text, record) => (
|
||||||
|
<ChatOpenButton phone={record.ownr_ph2} jobid={record.jobid} />
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.ownr_ea"),
|
||||||
|
dataIndex: "ownr_ea",
|
||||||
|
key: "ownr_ea",
|
||||||
|
ellipsis: true,
|
||||||
|
responsive: ["md"],
|
||||||
|
render: (text, record) => (
|
||||||
|
<ChatOpenButton phone={record.ownr_ea} jobid={record.jobid} />
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.vehicle"),
|
||||||
|
dataIndex: "vehicle",
|
||||||
|
key: "vehicle",
|
||||||
|
ellipsis: true,
|
||||||
|
render: (text, record) => {
|
||||||
|
return record.vehicleid ? (
|
||||||
|
<Link
|
||||||
|
to={"/manage/vehicles/" + record.vehicleid}
|
||||||
|
onClick={(e) => e.stopPropagation()}
|
||||||
|
>
|
||||||
|
{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${
|
||||||
|
record.v_model_desc || ""
|
||||||
|
}`}
|
||||||
|
</Link>
|
||||||
|
) : (
|
||||||
|
<span>{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${
|
||||||
|
record.v_model_desc || ""
|
||||||
|
}`}</span>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.ins_co_nm"),
|
||||||
|
dataIndex: "ins_co_nm",
|
||||||
|
key: "ins_co_nm",
|
||||||
|
ellipsis: true,
|
||||||
|
responsive: ["md"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.scheduled_completion"),
|
||||||
|
dataIndex: "scheduled_completion",
|
||||||
|
key: "scheduled_completion",
|
||||||
|
ellipsis: true,
|
||||||
|
responsive: ["md"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("appointments.fields.alt_transport"),
|
||||||
|
dataIndex: "alt_transport",
|
||||||
|
key: "alt_transport",
|
||||||
|
ellipsis: true,
|
||||||
|
responsive: ["md"],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const handleTableChange = (sorter) => {
|
||||||
|
setState({ ...state, sortedInfo: sorter });
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Card
|
||||||
|
title={t("dashboard.titles.scheduledouttoday", {
|
||||||
|
date: moment().startOf("day").format("MM/DD/YYYY"),
|
||||||
|
})}
|
||||||
|
{...cardProps}
|
||||||
|
>
|
||||||
|
<div style={{ height: "100%" }}>
|
||||||
|
<Table
|
||||||
|
onChange={handleTableChange}
|
||||||
|
pagination={{ position: "top", defaultPageSize: 50 }}
|
||||||
|
columns={columns}
|
||||||
|
scroll={{ x: true, y: "calc(100% - 2em)" }}
|
||||||
|
rowKey="id"
|
||||||
|
style={{ height: "85%" }}
|
||||||
|
dataSource={data.scheduled_out_today}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const DashboardScheduledOutTodayGql = `
|
||||||
|
scheduled_out_today: jobs(where: {
|
||||||
|
date_invoiced: {_is_null: true},
|
||||||
|
ro_number: {_is_null: false},
|
||||||
|
voided: {_eq: false},
|
||||||
|
scheduled_completion: {_gte: "${moment().startOf("day").toISOString()}",
|
||||||
|
_lte: "${moment().endOf("day").toISOString()}"}}) {
|
||||||
|
alt_transport
|
||||||
|
clm_no
|
||||||
|
jobid: id
|
||||||
|
ins_co_nm
|
||||||
|
iouparent
|
||||||
|
ownerid
|
||||||
|
ownr_co_nm
|
||||||
|
ownr_ea
|
||||||
|
ownr_fn
|
||||||
|
ownr_ln
|
||||||
|
ownr_ph1
|
||||||
|
ownr_ph2
|
||||||
|
production_vars
|
||||||
|
ro_number
|
||||||
|
scheduled_completion
|
||||||
|
suspended
|
||||||
|
v_make_desc
|
||||||
|
v_model_desc
|
||||||
|
v_model_yr
|
||||||
|
v_vin
|
||||||
|
vehicleid
|
||||||
|
|
||||||
|
}
|
||||||
|
`;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import Icon, { SyncOutlined } from "@ant-design/icons";
|
import Icon, { SyncOutlined } from "@ant-design/icons";
|
||||||
import { gql, useMutation, useQuery } from "@apollo/client";
|
import { gql, useMutation, useQuery } from "@apollo/client";
|
||||||
import { Button, Dropdown, Menu, notification, PageHeader, Space } from "antd";
|
import { Button, Dropdown, Menu, PageHeader, Space, notification } from "antd";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
@@ -37,6 +37,12 @@ import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
|
|||||||
//Combination of the following:
|
//Combination of the following:
|
||||||
// /node_modules/react-grid-layout/css/styles.css
|
// /node_modules/react-grid-layout/css/styles.css
|
||||||
// /node_modules/react-resizable/css/styles.css
|
// /node_modules/react-resizable/css/styles.css
|
||||||
|
import DashboardScheduledInToday, {
|
||||||
|
DashboardScheduledInTodayGql,
|
||||||
|
} from "../dashboard-components/scheduled-in-today/scheduled-in-today.component";
|
||||||
|
import DashboardScheduledOutToday, {
|
||||||
|
DashboardScheduledOutTodayGql,
|
||||||
|
} from "../dashboard-components/scheduled-out-today/scheduled-out-today.component";
|
||||||
import "./dashboard-grid.styles.scss";
|
import "./dashboard-grid.styles.scss";
|
||||||
import { GenerateDashboardData } from "./dashboard-grid.utils";
|
import { GenerateDashboardData } from "./dashboard-grid.utils";
|
||||||
|
|
||||||
@@ -268,6 +274,28 @@ const componentList = {
|
|||||||
w: 2,
|
w: 2,
|
||||||
h: 2,
|
h: 2,
|
||||||
},
|
},
|
||||||
|
ScheduleInToday: {
|
||||||
|
label: i18next.t("dashboard.titles.scheduledintoday", {
|
||||||
|
date: moment().startOf("day").format("MM/DD/YYYY"),
|
||||||
|
}),
|
||||||
|
component: DashboardScheduledInToday,
|
||||||
|
gqlFragment: DashboardScheduledInTodayGql,
|
||||||
|
minW: 10,
|
||||||
|
minH: 2,
|
||||||
|
w: 10,
|
||||||
|
h: 2,
|
||||||
|
},
|
||||||
|
ScheduleOutToday: {
|
||||||
|
label: i18next.t("dashboard.titles.scheduledouttoday", {
|
||||||
|
date: moment().startOf("day").format("MM/DD/YYYY"),
|
||||||
|
}),
|
||||||
|
component: DashboardScheduledOutToday,
|
||||||
|
gqlFragment: DashboardScheduledOutTodayGql,
|
||||||
|
minW: 10,
|
||||||
|
minH: 2,
|
||||||
|
w: 10,
|
||||||
|
h: 2,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const createDashboardQuery = (state) => {
|
const createDashboardQuery = (state) => {
|
||||||
@@ -283,8 +311,12 @@ const createDashboardQuery = (state) => {
|
|||||||
monthly_sales: jobs(where: {_and: [
|
monthly_sales: jobs(where: {_and: [
|
||||||
{ voided: {_eq: false}},
|
{ voided: {_eq: false}},
|
||||||
{date_invoiced: {_gte: "${moment()
|
{date_invoiced: {_gte: "${moment()
|
||||||
.startOf("month").startOf('day').toISOString()}"}}, {date_invoiced: {_lte: "${moment()
|
.startOf("month")
|
||||||
.endOf("month").endOf('day').toISOString()}"}}]}) {
|
.startOf("day")
|
||||||
|
.toISOString()}"}}, {date_invoiced: {_lte: "${moment()
|
||||||
|
.endOf("month")
|
||||||
|
.endOf("day")
|
||||||
|
.toISOString()}"}}]}) {
|
||||||
id
|
id
|
||||||
ro_number
|
ro_number
|
||||||
date_invoiced
|
date_invoiced
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export function DmsAllocationsSummaryAp({ socket, bodyshop, billids, title }) {
|
|||||||
key: "status",
|
key: "status",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("jobs.fields.ro_number"),
|
title: t("bills.fields.invoice_number"),
|
||||||
dataIndex: ["Posting", "Reference"],
|
dataIndex: ["Posting", "Reference"],
|
||||||
key: "reference",
|
key: "reference",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import {
|
|||||||
Select,
|
Select,
|
||||||
Space,
|
Space,
|
||||||
Statistic,
|
Statistic,
|
||||||
|
Switch,
|
||||||
Typography,
|
Typography,
|
||||||
} from "antd";
|
} from "antd";
|
||||||
import Dinero from "dinero.js";
|
import Dinero from "dinero.js";
|
||||||
@@ -183,6 +184,13 @@ export function DmsPostForm({ bodyshop, socket, job, logsRef }) {
|
|||||||
<Space>
|
<Space>
|
||||||
<DmsCdkMakes form={form} socket={socket} job={job} />
|
<DmsCdkMakes form={form} socket={socket} job={job} />
|
||||||
<DmsCdkMakesRefetch />
|
<DmsCdkMakesRefetch />
|
||||||
|
<Form.Item
|
||||||
|
name="dms_unsold"
|
||||||
|
label={t("jobs.fields.dms.dms_unsold")}
|
||||||
|
initialValue={false}
|
||||||
|
>
|
||||||
|
<Switch />
|
||||||
|
</Form.Item>
|
||||||
</Space>
|
</Space>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -1,28 +1,28 @@
|
|||||||
import { UploadOutlined, UserAddOutlined } from "@ant-design/icons";
|
import { UploadOutlined, UserAddOutlined } from "@ant-design/icons";
|
||||||
import {
|
import {
|
||||||
|
Button,
|
||||||
Divider,
|
Divider,
|
||||||
|
Dropdown,
|
||||||
Form,
|
Form,
|
||||||
Input,
|
Input,
|
||||||
|
Menu,
|
||||||
Select,
|
Select,
|
||||||
|
Space,
|
||||||
Tabs,
|
Tabs,
|
||||||
Upload,
|
Upload,
|
||||||
Space,
|
|
||||||
Menu,
|
|
||||||
Dropdown,
|
|
||||||
Button,
|
|
||||||
} from "antd";
|
} from "antd";
|
||||||
|
import _ from "lodash";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import EmailDocumentsComponent from "../email-documents/email-documents.component";
|
|
||||||
import _ from "lodash";
|
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
|
import { selectEmailConfig } from "../../redux/email/email.selectors";
|
||||||
import {
|
import {
|
||||||
selectBodyshop,
|
selectBodyshop,
|
||||||
selectCurrentUser,
|
selectCurrentUser,
|
||||||
} from "../../redux/user/user.selectors";
|
} from "../../redux/user/user.selectors";
|
||||||
import { CreateExplorerLinkForJob } from "../../utils/localmedia";
|
import { CreateExplorerLinkForJob } from "../../utils/localmedia";
|
||||||
import { selectEmailConfig } from "../../redux/email/email.selectors";
|
import EmailDocumentsComponent from "../email-documents/email-documents.component";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -54,6 +54,15 @@ export function EmailOverlayComponent({
|
|||||||
]),
|
]),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const handle_CC_Click = ({ item, key, keyPath }) => {
|
||||||
|
const email = item.props.value;
|
||||||
|
form.setFieldsValue({
|
||||||
|
cc: _.uniq([
|
||||||
|
...(form.getFieldValue("cc") || ""),
|
||||||
|
...(typeof email === "string" ? [email] : email),
|
||||||
|
]),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const menu = (
|
const menu = (
|
||||||
<div>
|
<div>
|
||||||
@@ -74,6 +83,25 @@ export function EmailOverlayComponent({
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const menuCC = (
|
||||||
|
<div>
|
||||||
|
<Menu onClick={handle_CC_Click}>
|
||||||
|
{bodyshop.employees
|
||||||
|
.filter((e) => e.user_email)
|
||||||
|
.map((e, idx) => (
|
||||||
|
<Menu.Item value={e.user_email} key={idx}>
|
||||||
|
{`${e.first_name} ${e.last_name}`}
|
||||||
|
</Menu.Item>
|
||||||
|
))}
|
||||||
|
{bodyshop.md_to_emails.map((e, idx) => (
|
||||||
|
<Menu.Item value={e.emails} key={idx + "group"}>
|
||||||
|
{e.label}
|
||||||
|
</Menu.Item>
|
||||||
|
))}
|
||||||
|
</Menu>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
@@ -122,7 +150,23 @@ export function EmailOverlayComponent({
|
|||||||
>
|
>
|
||||||
<Select mode="tags" tokenSeparators={[",", ";"]} />
|
<Select mode="tags" tokenSeparators={[",", ";"]} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label={t("emails.fields.cc")} name="cc">
|
<Form.Item
|
||||||
|
label={
|
||||||
|
<Space>
|
||||||
|
{t("emails.fields.cc")}
|
||||||
|
<Dropdown overlay={menuCC}>
|
||||||
|
<a
|
||||||
|
className="ant-dropdown-link"
|
||||||
|
href=" #"
|
||||||
|
onClick={(e) => e.preventDefault()}
|
||||||
|
>
|
||||||
|
<UserAddOutlined />
|
||||||
|
</a>
|
||||||
|
</Dropdown>
|
||||||
|
</Space>
|
||||||
|
}
|
||||||
|
name="cc"
|
||||||
|
>
|
||||||
<Select mode="tags" tokenSeparators={[",", ";"]} />
|
<Select mode="tags" tokenSeparators={[",", ";"]} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
|||||||
@@ -311,7 +311,9 @@ function Header({
|
|||||||
icon={<SettingOutlined />}
|
icon={<SettingOutlined />}
|
||||||
>
|
>
|
||||||
<Menu.Item key="shop" icon={<Icon component={GiSettingsKnobs} />}>
|
<Menu.Item key="shop" icon={<Icon component={GiSettingsKnobs} />}>
|
||||||
<Link to="/manage/shop">{t("menus.header.shop_config")}</Link>
|
<Link to="/manage/shop?tab=info">
|
||||||
|
{t("menus.header.shop_config")}
|
||||||
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
<Menu.Item key="dashboard" icon={<DashboardFilled />}>
|
<Menu.Item key="dashboard" icon={<DashboardFilled />}>
|
||||||
<Link to="/manage/dashboard">{t("menus.header.dashboard")}</Link>
|
<Link to="/manage/dashboard">{t("menus.header.dashboard")}</Link>
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ export function JobPayments({
|
|||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
<Button
|
<Button
|
||||||
disabled={record.exportedat}
|
// disabled={record.exportedat}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setPaymentContext({
|
setPaymentContext({
|
||||||
actions: { refetch: refetch },
|
actions: { refetch: refetch },
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
|
|
||||||
import { useMutation } from "@apollo/client";
|
import { useMutation } from "@apollo/client";
|
||||||
import { Button, Form, notification } from "antd";
|
import { Button, Form, notification } from "antd";
|
||||||
|
import moment from "moment";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
||||||
import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component";
|
|
||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
|
||||||
import moment from "moment";
|
|
||||||
import FormDatePicker from "../form-date-picker/form-date-picker.component";
|
|
||||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||||
|
import FormDatePicker from "../form-date-picker/form-date-picker.component";
|
||||||
|
import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component";
|
||||||
|
import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
|
||||||
|
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";
|
||||||
@@ -38,8 +38,8 @@ export function JobsAdminDatesChange({ insertAuditTrail, job }) {
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
const result = await updateJob({
|
const result = await updateJob({
|
||||||
variables: { jobId: job.id, job: values },
|
variables: { jobId: job.id, job: values },
|
||||||
refetchQueries: ['GET_JOB_BY_PK'],
|
refetchQueries: ["GET_JOB_BY_PK"],
|
||||||
awaitRefetchQueries:true
|
awaitRefetchQueries: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
const changedAuditFields = form.getFieldsValue(
|
const changedAuditFields = form.getFieldsValue(
|
||||||
@@ -126,7 +126,10 @@ export function JobsAdminDatesChange({ insertAuditTrail, job }) {
|
|||||||
<Form.Item label={t("jobs.fields.actual_in")} name="actual_in">
|
<Form.Item label={t("jobs.fields.actual_in")} name="actual_in">
|
||||||
<DateTimePicker />
|
<DateTimePicker />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label={t("jobs.fields.date_repairstarted")} name="date_repairstarted">
|
<Form.Item
|
||||||
|
label={t("jobs.fields.date_repairstarted")}
|
||||||
|
name="date_repairstarted"
|
||||||
|
>
|
||||||
<DateTimePicker />
|
<DateTimePicker />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
@@ -173,6 +176,9 @@ export function JobsAdminDatesChange({ insertAuditTrail, job }) {
|
|||||||
>
|
>
|
||||||
<DateTimePicker />
|
<DateTimePicker />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item label={t("jobs.fields.date_void")} name="date_void">
|
||||||
|
<DateTimePicker />
|
||||||
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,18 @@
|
|||||||
import { useMutation } from "@apollo/client";
|
import { gql, useMutation } from "@apollo/client";
|
||||||
import { Button, notification } from "antd";
|
import { Button, notification } from "antd";
|
||||||
import { gql } from "@apollo/client";
|
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
import moment from "moment";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
|
import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
|
||||||
|
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||||
import {
|
import {
|
||||||
selectBodyshop,
|
selectBodyshop,
|
||||||
selectCurrentUser,
|
selectCurrentUser,
|
||||||
} from "../../redux/user/user.selectors";
|
} from "../../redux/user/user.selectors";
|
||||||
import moment from "moment";
|
|
||||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
|
||||||
import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
currentUser: selectCurrentUser,
|
currentUser: selectCurrentUser,
|
||||||
@@ -150,6 +149,10 @@ export function JobAdminMarkReexport({
|
|||||||
|
|
||||||
if (!result.errors) {
|
if (!result.errors) {
|
||||||
notification["success"]({ message: t("jobs.successes.save") });
|
notification["success"]({ message: t("jobs.successes.save") });
|
||||||
|
insertAuditTrail({
|
||||||
|
jobid: job.id,
|
||||||
|
operation: AuditTrailMapping.admin_jobuninvoice(),
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
notification["error"]({
|
notification["error"]({
|
||||||
message: t("jobs.errors.saving", {
|
message: t("jobs.errors.saving", {
|
||||||
|
|||||||
@@ -33,8 +33,9 @@ export function JobsAdminUnvoid({
|
|||||||
mutation UNVOID_JOB($jobId: uuid!) {
|
mutation UNVOID_JOB($jobId: uuid!) {
|
||||||
update_jobs_by_pk(pk_columns: {id: $jobId}, _set: {voided: false, status: "${
|
update_jobs_by_pk(pk_columns: {id: $jobId}, _set: {voided: false, status: "${
|
||||||
bodyshop.md_ro_statuses.default_imported
|
bodyshop.md_ro_statuses.default_imported
|
||||||
}"}) {
|
}", date_void: null}) {
|
||||||
id
|
id
|
||||||
|
date_void
|
||||||
voided
|
voided
|
||||||
status
|
status
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,6 +141,10 @@ export function JobsDetailDatesComponent({ jobRO, job, bodyshop }) {
|
|||||||
<Form.Item label={t("jobs.fields.date_exported")} name="date_exported">
|
<Form.Item label={t("jobs.fields.date_exported")} name="date_exported">
|
||||||
<DateTimePicker disabled={true || jobRO} />
|
<DateTimePicker disabled={true || jobRO} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
|
<Form.Item label={t("jobs.fields.date_void")} name="date_void">
|
||||||
|
<DateTimePicker disabled={true || jobRO} />
|
||||||
|
</Form.Item>
|
||||||
</FormRow>
|
</FormRow>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import {
|
|||||||
Dropdown,
|
Dropdown,
|
||||||
Form,
|
Form,
|
||||||
Menu,
|
Menu,
|
||||||
notification,
|
|
||||||
Popconfirm,
|
Popconfirm,
|
||||||
Popover,
|
Popover,
|
||||||
Select,
|
Select,
|
||||||
|
notification,
|
||||||
} from "antd";
|
} from "antd";
|
||||||
import React, { useMemo } from "react";
|
import React, { useMemo } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -24,6 +24,7 @@ import {
|
|||||||
selectBodyshop,
|
selectBodyshop,
|
||||||
selectCurrentUser,
|
selectCurrentUser,
|
||||||
} from "../../redux/user/user.selectors";
|
} from "../../redux/user/user.selectors";
|
||||||
|
import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component";
|
||||||
import JobsDetailHeaderActionsAddevent from "./jobs-detail-header-actions.addevent";
|
import JobsDetailHeaderActionsAddevent from "./jobs-detail-header-actions.addevent";
|
||||||
import AddToProduction from "./jobs-detail-header-actions.addtoproduction.util";
|
import AddToProduction from "./jobs-detail-header-actions.addtoproduction.util";
|
||||||
import JobsDetaiLheaderCsi from "./jobs-detail-header-actions.csi.component";
|
import JobsDetaiLheaderCsi from "./jobs-detail-header-actions.csi.component";
|
||||||
@@ -461,54 +462,57 @@ export function JobsDetailHeaderActions({
|
|||||||
)}
|
)}
|
||||||
<JobsDetailHeaderActionsAddevent jobid={job.id} />
|
<JobsDetailHeaderActionsAddevent jobid={job.id} />
|
||||||
{!jobRO && job.converted && (
|
{!jobRO && job.converted && (
|
||||||
<Menu.Item>
|
<RbacWrapper action="jobs:void" noauth>
|
||||||
<Popconfirm
|
<Menu.Item>
|
||||||
title={t("jobs.labels.voidjob")}
|
<Popconfirm
|
||||||
okText="Yes"
|
title={t("jobs.labels.voidjob")}
|
||||||
cancelText="No"
|
okText="Yes"
|
||||||
onClick={(e) => e.stopPropagation()}
|
cancelText="No"
|
||||||
onConfirm={async () => {
|
onClick={(e) => e.stopPropagation()}
|
||||||
//delete the job.
|
onConfirm={async () => {
|
||||||
const result = await voidJob({
|
//delete the job.
|
||||||
variables: {
|
const result = await voidJob({
|
||||||
jobId: job.id,
|
variables: {
|
||||||
job: {
|
jobId: job.id,
|
||||||
status: bodyshop.md_ro_statuses.default_void,
|
job: {
|
||||||
voided: true,
|
status: bodyshop.md_ro_statuses.default_void,
|
||||||
scheduled_in: null,
|
voided: true,
|
||||||
scheduled_completion: null,
|
scheduled_in: null,
|
||||||
inproduction: false,
|
scheduled_completion: null,
|
||||||
},
|
inproduction: false,
|
||||||
note: [
|
date_void: new Date(),
|
||||||
{
|
|
||||||
jobid: job.id,
|
|
||||||
created_by: currentUser.email,
|
|
||||||
audit: true,
|
|
||||||
text: t("jobs.labels.voidnote"),
|
|
||||||
},
|
},
|
||||||
],
|
note: [
|
||||||
},
|
{
|
||||||
});
|
jobid: job.id,
|
||||||
|
created_by: currentUser.email,
|
||||||
|
audit: true,
|
||||||
|
text: t("jobs.labels.voidnote"),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
if (!!!result.errors) {
|
if (!!!result.errors) {
|
||||||
notification["success"]({
|
notification["success"]({
|
||||||
message: t("jobs.successes.voided"),
|
message: t("jobs.successes.voided"),
|
||||||
});
|
});
|
||||||
//go back to jobs list.
|
//go back to jobs list.
|
||||||
history.push(`/manage/`);
|
history.push(`/manage/`);
|
||||||
} else {
|
} else {
|
||||||
notification["error"]({
|
notification["error"]({
|
||||||
message: t("jobs.errors.voiding", {
|
message: t("jobs.errors.voiding", {
|
||||||
error: JSON.stringify(result.errors),
|
error: JSON.stringify(result.errors),
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
getPopupContainer={(trigger) => trigger.parentNode}
|
getPopupContainer={(trigger) => trigger.parentNode}
|
||||||
>
|
>
|
||||||
{t("menus.jobsactions.void")}
|
{t("menus.jobsactions.void")}
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
|
</RbacWrapper>
|
||||||
)}
|
)}
|
||||||
</Menu>
|
</Menu>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -112,7 +112,9 @@ export function JobsList({ bodyshop }) {
|
|||||||
title: t("jobs.fields.ro_number"),
|
title: t("jobs.fields.ro_number"),
|
||||||
dataIndex: "ro_number",
|
dataIndex: "ro_number",
|
||||||
key: "ro_number",
|
key: "ro_number",
|
||||||
sorter: (a, b) => alphaSort(a.ro_number, b.ro_number),
|
sorter: (a, b) =>
|
||||||
|
parseInt((a.ro_number || "0").replace(/\D/g, "")) -
|
||||||
|
parseInt((b.ro_number || "0").replace(/\D/g, "")),
|
||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "ro_number" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "ro_number" && state.sortedInfo.order,
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,100 @@
|
|||||||
|
import React from "react";
|
||||||
|
import { Button, notification } from "antd";
|
||||||
|
import { useMutation } from "@apollo/client";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
|
||||||
|
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
import { UPDATE_PAYMENT } from "../../graphql/payments.queries";
|
||||||
|
import { selectCurrentUser } from "../../redux/user/user.selectors";
|
||||||
|
import { createStructuredSelector } from "reselect";
|
||||||
|
|
||||||
|
const mapStateToProps = createStructuredSelector({
|
||||||
|
currentUser: selectCurrentUser,
|
||||||
|
});
|
||||||
|
|
||||||
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
setPaymentContext: (context) =>
|
||||||
|
dispatch(setModalContext({ context: context, modal: "payment" })),
|
||||||
|
});
|
||||||
|
|
||||||
|
const PaymentMarkForExportButton = ({
|
||||||
|
bodyshop,
|
||||||
|
payment,
|
||||||
|
refetch,
|
||||||
|
setPaymentContext,
|
||||||
|
currentUser,
|
||||||
|
}) => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const [insertExportLog, { loading: exportLogLoading }] =
|
||||||
|
useMutation(INSERT_EXPORT_LOG);
|
||||||
|
const [updatePayment, { loading: updatePaymentLoading }] =
|
||||||
|
useMutation(UPDATE_PAYMENT);
|
||||||
|
|
||||||
|
const handleClick = async () => {
|
||||||
|
const today = new Date();
|
||||||
|
|
||||||
|
await insertExportLog({
|
||||||
|
variables: {
|
||||||
|
logs: [
|
||||||
|
{
|
||||||
|
bodyshopid: bodyshop.id,
|
||||||
|
paymentid: payment.id,
|
||||||
|
successful: true,
|
||||||
|
useremail: currentUser.email,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const paymentUpdateResponse = await updatePayment({
|
||||||
|
variables: {
|
||||||
|
paymentId: payment.id,
|
||||||
|
payment: {
|
||||||
|
exportedat: today,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!!!paymentUpdateResponse.errors) {
|
||||||
|
notification.open({
|
||||||
|
type: "success",
|
||||||
|
key: "paymentsuccessmarkforexport",
|
||||||
|
message: t("payments.successes.markexported"),
|
||||||
|
});
|
||||||
|
|
||||||
|
if (refetch) refetch();
|
||||||
|
|
||||||
|
setPaymentContext({
|
||||||
|
actions: {
|
||||||
|
refetch,
|
||||||
|
},
|
||||||
|
context: {
|
||||||
|
...payment,
|
||||||
|
exportedat: today,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
notification["error"]({
|
||||||
|
message: t("payments.errors.exporting", {
|
||||||
|
error: JSON.stringify(paymentUpdateResponse.error),
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Button
|
||||||
|
onClick={handleClick}
|
||||||
|
loading={exportLogLoading || updatePaymentLoading}
|
||||||
|
disabled={!!payment.exportedat}
|
||||||
|
>
|
||||||
|
{t("payments.labels.markexported")}
|
||||||
|
</Button>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default connect(
|
||||||
|
mapStateToProps,
|
||||||
|
mapDispatchToProps
|
||||||
|
)(PaymentMarkForExportButton);
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useMutation } from "@apollo/client";
|
import { useMutation } from "@apollo/client";
|
||||||
|
|
||||||
import { Button, Form, Modal, notification } from "antd";
|
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";
|
||||||
@@ -19,6 +19,8 @@ import {
|
|||||||
import { GenerateDocument } from "../../utils/RenderTemplate";
|
import { GenerateDocument } from "../../utils/RenderTemplate";
|
||||||
import { TemplateList } from "../../utils/TemplateConstants";
|
import { TemplateList } from "../../utils/TemplateConstants";
|
||||||
import PaymentForm from "../payment-form/payment-form.component";
|
import PaymentForm from "../payment-form/payment-form.component";
|
||||||
|
import PaymentReexportButton from "../payment-reexport-button/payment-reexport-button.component";
|
||||||
|
import PaymentMarkForExportButton from "../payment-mark-export-button/payment-mark-export-button-component";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
paymentModal: selectPayment,
|
paymentModal: selectPayment,
|
||||||
@@ -176,12 +178,24 @@ function PaymentModalContainer({
|
|||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
{!context || (context && !context.id) ? null : (
|
||||||
|
<Space>
|
||||||
|
<PaymentReexportButton payment={context} refetch={actions.refetch} />
|
||||||
|
<PaymentMarkForExportButton
|
||||||
|
bodyshop={bodyshop}
|
||||||
|
payment={context}
|
||||||
|
refetch={actions.refetch}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
|
|
||||||
<Form
|
<Form
|
||||||
onFinish={handleFinish}
|
onFinish={handleFinish}
|
||||||
autoComplete={"off"}
|
autoComplete={"off"}
|
||||||
form={form}
|
form={form}
|
||||||
layout="vertical"
|
layout="vertical"
|
||||||
initialValues={context || {}}
|
initialValues={context || {}}
|
||||||
|
disabled={context?.exportedat}
|
||||||
>
|
>
|
||||||
<PaymentForm form={form} />
|
<PaymentForm form={form} />
|
||||||
</Form>
|
</Form>
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
import React from "react";
|
||||||
|
import { Button, notification } from "antd";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { UPDATE_PAYMENT } from "../../graphql/payments.queries";
|
||||||
|
import { useMutation } from "@apollo/client";
|
||||||
|
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
|
||||||
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
setPaymentContext: (context) =>
|
||||||
|
dispatch(setModalContext({ context: context, modal: "payment" })),
|
||||||
|
});
|
||||||
|
|
||||||
|
const PaymentReexportButton = ({ payment, refetch, setPaymentContext }) => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const [updatePayment, { loading }] = useMutation(UPDATE_PAYMENT);
|
||||||
|
|
||||||
|
const handleClick = async () => {
|
||||||
|
const paymentUpdateResponse = await updatePayment({
|
||||||
|
variables: {
|
||||||
|
paymentId: payment.id,
|
||||||
|
payment: {
|
||||||
|
exportedat: null,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!!!paymentUpdateResponse.errors) {
|
||||||
|
notification.open({
|
||||||
|
type: "success",
|
||||||
|
key: "paymentsuccessexport",
|
||||||
|
message: t("payments.successes.markreexported"),
|
||||||
|
});
|
||||||
|
|
||||||
|
if (refetch) refetch();
|
||||||
|
|
||||||
|
setPaymentContext({
|
||||||
|
actions: {
|
||||||
|
refetch,
|
||||||
|
},
|
||||||
|
context: {
|
||||||
|
...payment,
|
||||||
|
exportedat: null,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
notification["error"]({
|
||||||
|
message: t("payments.errors.exporting", {
|
||||||
|
error: JSON.stringify(paymentUpdateResponse.error),
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Button
|
||||||
|
onClick={handleClick}
|
||||||
|
loading={loading}
|
||||||
|
disabled={!payment.exportedat}
|
||||||
|
>
|
||||||
|
{t("payments.labels.markforreexport")}
|
||||||
|
</Button>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default connect(null, mapDispatchToProps)(PaymentReexportButton);
|
||||||
@@ -156,7 +156,7 @@ export function PaymentsListPaginated({
|
|||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
<Button
|
<Button
|
||||||
disabled={record.exportedat}
|
// disabled={record.exportedat}
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
let apolloResults;
|
let apolloResults;
|
||||||
if (search.search) {
|
if (search.search) {
|
||||||
|
|||||||
@@ -23,17 +23,34 @@ export function PrintCenterJobsComponent({ printCenterModal, bodyshop }) {
|
|||||||
const { id: jobId, job } = printCenterModal.context;
|
const { id: jobId, job } = printCenterModal.context;
|
||||||
const tempList = TemplateList("job", {});
|
const tempList = TemplateList("job", {});
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const JobsReportsList = Object.keys(tempList)
|
|
||||||
.map((key) => {
|
const JobsReportsList =
|
||||||
return tempList[key];
|
bodyshop.cdk_dealerid === null && bodyshop.pbs_serialnumber === null
|
||||||
})
|
? Object.keys(tempList)
|
||||||
.filter(
|
.map((key) => {
|
||||||
(temp) =>
|
return tempList[key];
|
||||||
!temp.regions ||
|
})
|
||||||
(temp.regions && temp.regions[bodyshop.region_config]) ||
|
.filter(
|
||||||
(temp.regions &&
|
(temp) =>
|
||||||
bodyshop.region_config.includes(Object.keys(temp.regions)) === true)
|
(!temp.regions ||
|
||||||
);
|
(temp.regions && temp.regions[bodyshop.region_config]) ||
|
||||||
|
(temp.regions &&
|
||||||
|
bodyshop.region_config.includes(Object.keys(temp.regions)) ===
|
||||||
|
true)) &&
|
||||||
|
(!temp.dms || temp.dms === false)
|
||||||
|
)
|
||||||
|
: Object.keys(tempList)
|
||||||
|
.map((key) => {
|
||||||
|
return tempList[key];
|
||||||
|
})
|
||||||
|
.filter(
|
||||||
|
(temp) =>
|
||||||
|
!temp.regions ||
|
||||||
|
(temp.regions && temp.regions[bodyshop.region_config]) ||
|
||||||
|
(temp.regions &&
|
||||||
|
bodyshop.region_config.includes(Object.keys(temp.regions)) ===
|
||||||
|
true)
|
||||||
|
);
|
||||||
|
|
||||||
const filteredJobsReportsList =
|
const filteredJobsReportsList =
|
||||||
search !== ""
|
search !== ""
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ export default function ProductionListDate({
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
//e.stopPropagation();
|
//e.stopPropagation();
|
||||||
|
|
||||||
updateAlert({
|
updateAlert({
|
||||||
variables: {
|
variables: {
|
||||||
jobId: record.id,
|
jobId: record.id,
|
||||||
@@ -32,6 +33,11 @@ export default function ProductionListDate({
|
|||||||
[field]: date,
|
[field]: date,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
optimisticResponse: {
|
||||||
|
update_jobs: {
|
||||||
|
[field]: date,
|
||||||
|
},
|
||||||
|
},
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
if (record.refetch) record.refetch();
|
if (record.refetch) record.refetch();
|
||||||
if (!time) {
|
if (!time) {
|
||||||
@@ -49,9 +55,11 @@ export default function ProductionListDate({
|
|||||||
(moment().add(1, "day").isSame(moment(record[field]), "day") &&
|
(moment().add(1, "day").isSame(moment(record[field]), "day") &&
|
||||||
"production-completion-soon"));
|
"production-completion-soon"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dropdown
|
<Dropdown
|
||||||
//trigger={["click"]}
|
trigger={["click"]}
|
||||||
|
onVisibleChange={(v) => setVisible(v)}
|
||||||
visible={visible}
|
visible={visible}
|
||||||
style={{
|
style={{
|
||||||
height: "19px",
|
height: "19px",
|
||||||
|
|||||||
@@ -246,11 +246,21 @@ export function ProductionListTable({
|
|||||||
(x) => x.status === record.status
|
(x) => x.status === record.status
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!color) return null;
|
if (!color) {
|
||||||
|
if (index % 2 === 0)
|
||||||
|
return {
|
||||||
|
style: {
|
||||||
|
backgroundColor: `rgb(236, 236, 236)`,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
className: "rowWithColor",
|
||||||
style: {
|
style: {
|
||||||
backgroundColor: `rgb(${color.color.r},${color.color.g},${color.color.b},${color.color.a})`,
|
"--bgColor": `rgb(${color.color.r},${color.color.g},${color.color.b},${color.color.a})`,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ const ret = {
|
|||||||
"jobs:partsqueue": 4,
|
"jobs:partsqueue": 4,
|
||||||
"jobs:checklist-view": 2,
|
"jobs:checklist-view": 2,
|
||||||
"jobs:list-ready": 1,
|
"jobs:list-ready": 1,
|
||||||
|
"jobs:void": 5,
|
||||||
|
|
||||||
"bills:enter": 2,
|
"bills:enter": 2,
|
||||||
"bills:view": 2,
|
"bills:view": 2,
|
||||||
"bills:list": 2,
|
"bills:list": 2,
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ import "./schedule-calendar.styles.scss";
|
|||||||
import JobDetailCards from "../job-detail-cards/job-detail-cards.component";
|
import JobDetailCards from "../job-detail-cards/job-detail-cards.component";
|
||||||
import { selectProblemJobs } from "../../redux/application/application.selectors";
|
import { selectProblemJobs } from "../../redux/application/application.selectors";
|
||||||
import { Alert, Collapse } from "antd";
|
import { Alert, Collapse } from "antd";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation, Trans } from "react-i18next";
|
||||||
|
import { Link } from "react-router-dom";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -66,10 +67,21 @@ export function ScheduleCalendarWrapperComponent({
|
|||||||
<Alert
|
<Alert
|
||||||
key={problem.id}
|
key={problem.id}
|
||||||
type="error"
|
type="error"
|
||||||
message={t("appointments.labels.dataconsistency", {
|
message={
|
||||||
ro_number: problem.ro_number,
|
<Trans
|
||||||
code: problem.code,
|
i18nKey="appointments.labels.dataconsistency"
|
||||||
})}
|
components={[
|
||||||
|
<Link
|
||||||
|
to={`/manage/jobs/${problem.id}`}
|
||||||
|
target="_blank"
|
||||||
|
/>,
|
||||||
|
]}
|
||||||
|
values={{
|
||||||
|
ro_number: problem.ro_number,
|
||||||
|
code: problem.code,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</Collapse.Panel>
|
</Collapse.Panel>
|
||||||
@@ -79,10 +91,18 @@ export function ScheduleCalendarWrapperComponent({
|
|||||||
<Alert
|
<Alert
|
||||||
key={problem.id}
|
key={problem.id}
|
||||||
type="error"
|
type="error"
|
||||||
message={t("appointments.labels.dataconsistency", {
|
message={
|
||||||
ro_number: problem.ro_number,
|
<Trans
|
||||||
code: problem.code,
|
i18nKey="appointments.labels.dataconsistency"
|
||||||
})}
|
components={[
|
||||||
|
<Link to={`/manage/jobs/${problem.id}`} target="_blank" />,
|
||||||
|
]}
|
||||||
|
values={{
|
||||||
|
ro_number: problem.ro_number,
|
||||||
|
code: problem.code,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import ScheduleVerifyIntegrity from "../schedule-verify-integrity/schedule-verif
|
|||||||
import { connect } from "react-redux";
|
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 _ from "lodash";
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
});
|
});
|
||||||
@@ -39,9 +40,39 @@ export function ScheduleCalendarComponent({ data, refetch, bodyshop }) {
|
|||||||
employeevacation: true,
|
employeevacation: true,
|
||||||
ins_co_nm: null,
|
ins_co_nm: null,
|
||||||
});
|
});
|
||||||
|
const [estimatorsFilter, setEstimatiorsFilter] = useLocalStorage(
|
||||||
|
"estimators",
|
||||||
|
[]
|
||||||
|
);
|
||||||
|
|
||||||
|
const estimators = useMemo(() => {
|
||||||
|
return _.uniq([
|
||||||
|
...data
|
||||||
|
.filter((d) => d.__typename === "appointments")
|
||||||
|
.map((app) =>
|
||||||
|
`${app.job?.est_ct_fn || ""} ${app.job?.est_ct_ln || ""}`.trim()
|
||||||
|
)
|
||||||
|
.filter((e) => e.length > 0),
|
||||||
|
...bodyshop.md_estimators.map((e) =>
|
||||||
|
`${e.est_ct_fn || ""} ${e.est_ct_ln || ""}`.trim()
|
||||||
|
),
|
||||||
|
]);
|
||||||
|
}, [data, bodyshop.md_estimators]);
|
||||||
|
|
||||||
const filteredData = useMemo(() => {
|
const filteredData = useMemo(() => {
|
||||||
return data.filter(
|
return data.filter((d) => {
|
||||||
(d) =>
|
const estFilter =
|
||||||
|
d.__typename === "appointments"
|
||||||
|
? estimatorsFilter.length === 0
|
||||||
|
? true
|
||||||
|
: !!estimatorsFilter.find(
|
||||||
|
(e) =>
|
||||||
|
e ===
|
||||||
|
`${d.job?.est_ct_fn || ""} ${d.job?.est_ct_ln || ""}`.trim()
|
||||||
|
)
|
||||||
|
: true;
|
||||||
|
|
||||||
|
return (
|
||||||
(d.block ||
|
(d.block ||
|
||||||
(filter.intake && d.isintake) ||
|
(filter.intake && d.isintake) ||
|
||||||
(filter.manual && !d.isintake && d.block === false) ||
|
(filter.manual && !d.isintake && d.block === false) ||
|
||||||
@@ -50,9 +81,11 @@ export function ScheduleCalendarComponent({ data, refetch, bodyshop }) {
|
|||||||
!!d.employee)) &&
|
!!d.employee)) &&
|
||||||
(filter.ins_co_nm && filter.ins_co_nm.length > 0
|
(filter.ins_co_nm && filter.ins_co_nm.length > 0
|
||||||
? filter.ins_co_nm.includes(d.job?.ins_co_nm)
|
? filter.ins_co_nm.includes(d.job?.ins_co_nm)
|
||||||
: true)
|
: true) &&
|
||||||
);
|
estFilter
|
||||||
}, [data, filter]);
|
);
|
||||||
|
});
|
||||||
|
}, [data, filter, estimatorsFilter]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Row gutter={[16, 16]}>
|
<Row gutter={[16, 16]}>
|
||||||
@@ -63,6 +96,21 @@ export function ScheduleCalendarComponent({ data, refetch, bodyshop }) {
|
|||||||
extra={
|
extra={
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
<ScheduleAtsSummary appointments={filteredData} />
|
<ScheduleAtsSummary appointments={filteredData} />
|
||||||
|
<Select
|
||||||
|
style={{ minWidth: "15rem" }}
|
||||||
|
mode="multiple"
|
||||||
|
placeholder={t("schedule.labels.estimators")}
|
||||||
|
allowClear
|
||||||
|
onClear={() => setEstimatiorsFilter([])}
|
||||||
|
value={[...estimatorsFilter]}
|
||||||
|
onChange={(e) => {
|
||||||
|
setEstimatiorsFilter(e);
|
||||||
|
}}
|
||||||
|
options={estimators.map((e) => ({
|
||||||
|
label: e,
|
||||||
|
value: e,
|
||||||
|
}))}
|
||||||
|
/>
|
||||||
<Select
|
<Select
|
||||||
style={{ minWidth: "15rem" }}
|
style={{ minWidth: "15rem" }}
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
|
|||||||
@@ -47,9 +47,7 @@ export function ScoreboardChart({ sbEntriesByDate, bodyshop }) {
|
|||||||
bodyhrs: dayAcc.bodyhrs + dayVal.bodyhrs,
|
bodyhrs: dayAcc.bodyhrs + dayVal.bodyhrs,
|
||||||
painthrs: dayAcc.painthrs + dayVal.painthrs,
|
painthrs: dayAcc.painthrs + dayVal.painthrs,
|
||||||
sales:
|
sales:
|
||||||
dayAcc.painthrs +
|
dayAcc.sales + dayVal.job.job_totals.totals.subtotal.amount / 100,
|
||||||
dayVal.job.job_totals.totals.subtotal.amount / 100 +
|
|
||||||
2500,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
{ bodyhrs: 0, painthrs: 0, sales: 0 }
|
{ bodyhrs: 0, painthrs: 0, sales: 0 }
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ import ShopInfoResponsibilityCenterComponent from "./shop-info.responsibilitycen
|
|||||||
import ShopInfoROStatusComponent from "./shop-info.rostatus.component";
|
import ShopInfoROStatusComponent from "./shop-info.rostatus.component";
|
||||||
import ShopInfoSchedulingComponent from "./shop-info.scheduling.component";
|
import ShopInfoSchedulingComponent from "./shop-info.scheduling.component";
|
||||||
import ShopInfoSpeedPrint from "./shop-info.speedprint.component";
|
import ShopInfoSpeedPrint from "./shop-info.speedprint.component";
|
||||||
|
import { useHistory, useLocation } from "react-router-dom";
|
||||||
|
import queryString from "query-string";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -31,6 +33,10 @@ export function ShopInfoComponent({ bodyshop, form, saveLoading }) {
|
|||||||
bodyshop.imexshopid
|
bodyshop.imexshopid
|
||||||
);
|
);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const history = useHistory();
|
||||||
|
const location = useLocation();
|
||||||
|
const search = queryString.parse(location.search);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
extra={
|
extra={
|
||||||
@@ -43,7 +49,14 @@ export function ShopInfoComponent({ bodyshop, form, saveLoading }) {
|
|||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Tabs>
|
<Tabs
|
||||||
|
defaultActiveKey={search.subtab}
|
||||||
|
onChange={(key) =>
|
||||||
|
history.push({
|
||||||
|
search: `?tab=${search.tab}&subtab=${key}`,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
>
|
||||||
<Tabs.TabPane key="general" tab={t("bodyshop.labels.shopinfo")}>
|
<Tabs.TabPane key="general" tab={t("bodyshop.labels.shopinfo")}>
|
||||||
<ShopInfoGeneral form={form} />
|
<ShopInfoGeneral form={form} />
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
|
|||||||
@@ -24,9 +24,13 @@ const timeZonesList = momentTZ.tz.names();
|
|||||||
|
|
||||||
export default function ShopInfoGeneral({ form }) {
|
export default function ShopInfoGeneral({ form }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<LayoutFormRow header={t("bodyshop.labels.businessinformation")}>
|
<LayoutFormRow
|
||||||
|
header={t("bodyshop.labels.businessinformation")}
|
||||||
|
id="businessinformation"
|
||||||
|
>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.shopname")}
|
label={t("bodyshop.fields.shopname")}
|
||||||
name="shopname"
|
name="shopname"
|
||||||
@@ -155,7 +159,10 @@ export default function ShopInfoGeneral({ form }) {
|
|||||||
<InputNumber min={0} />
|
<InputNumber min={0} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow header={t("bodyshop.labels.accountingsetup")}>
|
<LayoutFormRow
|
||||||
|
header={t("bodyshop.labels.accountingsetup")}
|
||||||
|
id="accountingsetup"
|
||||||
|
>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.labels.qbo")}
|
label={t("bodyshop.labels.qbo")}
|
||||||
valuePropName="checked"
|
valuePropName="checked"
|
||||||
@@ -386,7 +393,10 @@ export default function ShopInfoGeneral({ form }) {
|
|||||||
<Select mode="tags" />
|
<Select mode="tags" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow header={t("bodyshop.labels.scoreboardsetup")}>
|
<LayoutFormRow
|
||||||
|
header={t("bodyshop.labels.scoreboardsetup")}
|
||||||
|
id="scoreboardsetup"
|
||||||
|
>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.dailypainttarget")}
|
label={t("bodyshop.fields.dailypainttarget")}
|
||||||
name={["scoreboard_target", "dailyPaintTarget"]}
|
name={["scoreboard_target", "dailyPaintTarget"]}
|
||||||
@@ -445,7 +455,10 @@ export default function ShopInfoGeneral({ form }) {
|
|||||||
<InputNumber min={1} precision={1} />
|
<InputNumber min={1} precision={1} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow header={t("bodyshop.labels.systemsettings")}>
|
<LayoutFormRow
|
||||||
|
header={t("bodyshop.labels.systemsettings")}
|
||||||
|
id="systemsettings"
|
||||||
|
>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name={["md_referral_sources"]}
|
name={["md_referral_sources"]}
|
||||||
label={t("bodyshop.fields.md_referral_sources")}
|
label={t("bodyshop.fields.md_referral_sources")}
|
||||||
@@ -589,6 +602,18 @@ export default function ShopInfoGeneral({ form }) {
|
|||||||
>
|
>
|
||||||
<Select mode="tags" />
|
<Select mode="tags" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
name={["md_email_cc", "parts_return_slip"]}
|
||||||
|
label={t("bodyshop.fields.md_email_cc", { template: "parts_return_slip" })}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
type: "array",
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<Select mode="tags" />
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name={["tt_allow_post_to_invoiced"]}
|
name={["tt_allow_post_to_invoiced"]}
|
||||||
label={t("bodyshop.fields.tt_allow_post_to_invoiced")}
|
label={t("bodyshop.fields.tt_allow_post_to_invoiced")}
|
||||||
@@ -655,7 +680,11 @@ export default function ShopInfoGeneral({ form }) {
|
|||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow grow header={t("bodyshop.labels.messagingpresets")}>
|
<LayoutFormRow
|
||||||
|
grow
|
||||||
|
header={t("bodyshop.labels.messagingpresets")}
|
||||||
|
id="messagingpresets"
|
||||||
|
>
|
||||||
<Form.List name={["md_messaging_presets"]}>
|
<Form.List name={["md_messaging_presets"]}>
|
||||||
{(fields, { add, remove, move }) => {
|
{(fields, { add, remove, move }) => {
|
||||||
return (
|
return (
|
||||||
@@ -720,7 +749,11 @@ export default function ShopInfoGeneral({ form }) {
|
|||||||
}}
|
}}
|
||||||
</Form.List>
|
</Form.List>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow grow header={t("bodyshop.labels.notespresets")}>
|
<LayoutFormRow
|
||||||
|
grow
|
||||||
|
header={t("bodyshop.labels.notespresets")}
|
||||||
|
id="notespresets"
|
||||||
|
>
|
||||||
<Form.List name={["md_notes_presets"]}>
|
<Form.List name={["md_notes_presets"]}>
|
||||||
{(fields, { add, remove, move }) => {
|
{(fields, { add, remove, move }) => {
|
||||||
return (
|
return (
|
||||||
@@ -785,7 +818,11 @@ export default function ShopInfoGeneral({ form }) {
|
|||||||
}}
|
}}
|
||||||
</Form.List>
|
</Form.List>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow grow header={t("bodyshop.labels.partslocations")}>
|
<LayoutFormRow
|
||||||
|
grow
|
||||||
|
header={t("bodyshop.labels.partslocations")}
|
||||||
|
id="partslocations"
|
||||||
|
>
|
||||||
<Form.List name={["md_parts_locations"]}>
|
<Form.List name={["md_parts_locations"]}>
|
||||||
{(fields, { add, remove, move }) => {
|
{(fields, { add, remove, move }) => {
|
||||||
return (
|
return (
|
||||||
@@ -839,7 +876,11 @@ export default function ShopInfoGeneral({ form }) {
|
|||||||
}}
|
}}
|
||||||
</Form.List>
|
</Form.List>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow grow header={t("bodyshop.labels.insurancecos")}>
|
<LayoutFormRow
|
||||||
|
grow
|
||||||
|
header={t("bodyshop.labels.insurancecos")}
|
||||||
|
id="insurancecos"
|
||||||
|
>
|
||||||
<Form.List name={["md_ins_cos"]}>
|
<Form.List name={["md_ins_cos"]}>
|
||||||
{(fields, { add, remove, move }) => {
|
{(fields, { add, remove, move }) => {
|
||||||
return (
|
return (
|
||||||
@@ -935,7 +976,11 @@ export default function ShopInfoGeneral({ form }) {
|
|||||||
}}
|
}}
|
||||||
</Form.List>
|
</Form.List>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow grow header={t("bodyshop.labels.estimators")}>
|
<LayoutFormRow
|
||||||
|
grow
|
||||||
|
header={t("bodyshop.labels.estimators")}
|
||||||
|
id="estimators"
|
||||||
|
>
|
||||||
<Form.List name={["md_estimators"]}>
|
<Form.List name={["md_estimators"]}>
|
||||||
{(fields, { add, remove, move }) => {
|
{(fields, { add, remove, move }) => {
|
||||||
return (
|
return (
|
||||||
@@ -1024,7 +1069,11 @@ export default function ShopInfoGeneral({ form }) {
|
|||||||
}}
|
}}
|
||||||
</Form.List>
|
</Form.List>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow grow header={t("bodyshop.labels.filehandlers")}>
|
<LayoutFormRow
|
||||||
|
grow
|
||||||
|
header={t("bodyshop.labels.filehandlers")}
|
||||||
|
id="filehandlers"
|
||||||
|
>
|
||||||
<Form.List name={["md_filehandlers"]}>
|
<Form.List name={["md_filehandlers"]}>
|
||||||
{(fields, { add, remove, move }) => {
|
{(fields, { add, remove, move }) => {
|
||||||
return (
|
return (
|
||||||
@@ -1106,7 +1155,11 @@ export default function ShopInfoGeneral({ form }) {
|
|||||||
}}
|
}}
|
||||||
</Form.List>
|
</Form.List>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow grow header={t("bodyshop.fields.md_ccc_rates")}>
|
<LayoutFormRow
|
||||||
|
grow
|
||||||
|
header={t("bodyshop.fields.md_ccc_rates")}
|
||||||
|
id="md_ccc_rates"
|
||||||
|
>
|
||||||
<Form.List name={["md_ccc_rates"]}>
|
<Form.List name={["md_ccc_rates"]}>
|
||||||
{(fields, { add, remove, move }) => {
|
{(fields, { add, remove, move }) => {
|
||||||
return (
|
return (
|
||||||
@@ -1223,7 +1276,11 @@ export default function ShopInfoGeneral({ form }) {
|
|||||||
}}
|
}}
|
||||||
</Form.List>
|
</Form.List>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow grow header={t("bodyshop.fields.md_jobline_presets")}>
|
<LayoutFormRow
|
||||||
|
grow
|
||||||
|
header={t("bodyshop.fields.md_jobline_presets")}
|
||||||
|
id="md_jobline_presets"
|
||||||
|
>
|
||||||
<Form.List name={["md_jobline_presets"]}>
|
<Form.List name={["md_jobline_presets"]}>
|
||||||
{(fields, { add, remove, move }) => {
|
{(fields, { add, remove, move }) => {
|
||||||
return (
|
return (
|
||||||
@@ -1404,7 +1461,11 @@ export default function ShopInfoGeneral({ form }) {
|
|||||||
}}
|
}}
|
||||||
</Form.List>
|
</Form.List>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow grow header={t("bodyshop.fields.md_parts_order_comment")}>
|
<LayoutFormRow
|
||||||
|
grow
|
||||||
|
header={t("bodyshop.fields.md_parts_order_comment")}
|
||||||
|
id="md_parts_order_comment"
|
||||||
|
>
|
||||||
<Form.List name={["md_parts_order_comment"]}>
|
<Form.List name={["md_parts_order_comment"]}>
|
||||||
{(fields, { add, remove, move }) => {
|
{(fields, { add, remove, move }) => {
|
||||||
return (
|
return (
|
||||||
@@ -1470,7 +1531,11 @@ export default function ShopInfoGeneral({ form }) {
|
|||||||
}}
|
}}
|
||||||
</Form.List>
|
</Form.List>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow grow header={t("bodyshop.labels.md_to_emails")}>
|
<LayoutFormRow
|
||||||
|
grow
|
||||||
|
header={t("bodyshop.labels.md_to_emails")}
|
||||||
|
id="md_to_emails"
|
||||||
|
>
|
||||||
<Form.List name={["md_to_emails"]}>
|
<Form.List name={["md_to_emails"]}>
|
||||||
{(fields, { add, remove, move }) => {
|
{(fields, { add, remove, move }) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -20,7 +20,10 @@ export default function ShopInfoIntakeChecklistComponent({ form }) {
|
|||||||
const TemplateListGenerated = TemplateList();
|
const TemplateListGenerated = TemplateList();
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<LayoutFormRow header={t("bodyshop.labels.intakechecklist")}>
|
<LayoutFormRow
|
||||||
|
header={t("bodyshop.labels.intakechecklist")}
|
||||||
|
id="intakechecklist"
|
||||||
|
>
|
||||||
<Form.List name={["intakechecklist", "form"]}>
|
<Form.List name={["intakechecklist", "form"]}>
|
||||||
{(fields, { add, remove, move }) => {
|
{(fields, { add, remove, move }) => {
|
||||||
return (
|
return (
|
||||||
@@ -188,7 +191,10 @@ export default function ShopInfoIntakeChecklistComponent({ form }) {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
</SelectorDiv>
|
</SelectorDiv>
|
||||||
|
|
||||||
<LayoutFormRow header={t("bodyshop.labels.deliverchecklist")}>
|
<LayoutFormRow
|
||||||
|
header={t("bodyshop.labels.deliverchecklist")}
|
||||||
|
id="deliverchecklist"
|
||||||
|
>
|
||||||
<Form.List name={["deliverchecklist", "form"]}>
|
<Form.List name={["deliverchecklist", "form"]}>
|
||||||
{(fields, { add, remove, move }) => {
|
{(fields, { add, remove, move }) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
|
import { useTreatments } from "@splitsoftware/splitio-react";
|
||||||
import { Form, InputNumber } from "antd";
|
import { Form, InputNumber } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
|
||||||
import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component";
|
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
|
||||||
import { connect } from "react-redux";
|
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 LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
|
import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component";
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
});
|
});
|
||||||
@@ -316,6 +316,18 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.rbac.jobs.void")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "jobs:void"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.bills.enter")}
|
label={t("bodyshop.fields.rbac.bills.enter")}
|
||||||
rules={[
|
rules={[
|
||||||
|
|||||||
@@ -95,7 +95,6 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
{form.getFieldValue("pbs_serialnumber")}
|
{form.getFieldValue("pbs_serialnumber")}
|
||||||
</DataLabel>
|
</DataLabel>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<LayoutFormRow>
|
<LayoutFormRow>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.dms.default_journal")}
|
label={t("bodyshop.fields.dms.default_journal")}
|
||||||
@@ -163,6 +162,32 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
<Switch />
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
|
{bodyshop.pbs_serialnumber && (
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.dms.appostingaccount")}
|
||||||
|
name={["pbs_configuration", "appostingaccount"]}
|
||||||
|
>
|
||||||
|
<Select
|
||||||
|
options={[
|
||||||
|
{ value: "wip", label: "WIP" },
|
||||||
|
{ value: "cogs", label: "COGS" },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
)}
|
||||||
|
{bodyshop.pbs_serialnumber && (
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.dms.apcontrol")}
|
||||||
|
name={["pbs_configuration", "apcontrol"]}
|
||||||
|
>
|
||||||
|
<Select
|
||||||
|
options={[
|
||||||
|
{ value: "ro", label: "RO Number" },
|
||||||
|
{ value: "vendordmsid", label: "Vendor DMS ID" },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
)}
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow header={t("bodyshop.labels.dms.cdk.payers")}>
|
<LayoutFormRow header={t("bodyshop.labels.dms.cdk.payers")}>
|
||||||
<Form.List name={["cdk_configuration", "payers"]}>
|
<Form.List name={["cdk_configuration", "payers"]}>
|
||||||
@@ -315,7 +340,10 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
</DataLabel>
|
</DataLabel>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<LayoutFormRow header={t("bodyshop.labels.responsibilitycenters.costs")}>
|
<LayoutFormRow
|
||||||
|
header={t("bodyshop.labels.responsibilitycenters.costs")}
|
||||||
|
id="costs"
|
||||||
|
>
|
||||||
<Form.List name={["md_responsibility_centers", "costs"]}>
|
<Form.List name={["md_responsibility_centers", "costs"]}>
|
||||||
{(fields, { add, remove }) => {
|
{(fields, { add, remove }) => {
|
||||||
return (
|
return (
|
||||||
@@ -462,6 +490,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
|
|
||||||
<LayoutFormRow
|
<LayoutFormRow
|
||||||
header={t("bodyshop.labels.responsibilitycenters.profits")}
|
header={t("bodyshop.labels.responsibilitycenters.profits")}
|
||||||
|
id="profits"
|
||||||
>
|
>
|
||||||
<Form.List name={["md_responsibility_centers", "profits"]}>
|
<Form.List name={["md_responsibility_centers", "profits"]}>
|
||||||
{(fields, { add, remove }) => {
|
{(fields, { add, remove }) => {
|
||||||
@@ -601,7 +630,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
{fields.map((field, index) => (
|
{fields.map((field, index) => (
|
||||||
<Form.Item key={field.key}>
|
<Form.Item key={field.key}>
|
||||||
<div>
|
<div>
|
||||||
<LayoutFormRow>
|
<LayoutFormRow id="mappingname">
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.dms.mappingname")}
|
label={t("bodyshop.fields.dms.mappingname")}
|
||||||
key={`${index}name`}
|
key={`${index}name`}
|
||||||
@@ -631,6 +660,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow
|
<LayoutFormRow
|
||||||
header={t("bodyshop.labels.defaultcostsmapping")}
|
header={t("bodyshop.labels.defaultcostsmapping")}
|
||||||
|
id="defaultcostsmapping"
|
||||||
>
|
>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t(
|
label={t(
|
||||||
@@ -4088,6 +4118,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
|
|
||||||
<LayoutFormRow
|
<LayoutFormRow
|
||||||
header={t("bodyshop.labels.responsibilitycenters.tax_accounts")}
|
header={t("bodyshop.labels.responsibilitycenters.tax_accounts")}
|
||||||
|
id="tax_accounts"
|
||||||
>
|
>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.responsibilitycenters.federal_tax")}
|
label={t("bodyshop.fields.responsibilitycenters.federal_tax")}
|
||||||
@@ -4202,7 +4233,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
{DmsAp.treatment === "on" && (
|
{DmsAp.treatment === "on" && (
|
||||||
<LayoutFormRow>
|
<LayoutFormRow id="federal_tax_itc">
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.responsibilitycenters.federal_tax_itc")}
|
label={t("bodyshop.fields.responsibilitycenters.federal_tax_itc")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -4316,7 +4347,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
)}
|
)}
|
||||||
<LayoutFormRow>
|
<LayoutFormRow id="state_tax">
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.responsibilitycenters.state_tax")}
|
label={t("bodyshop.fields.responsibilitycenters.state_tax")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -4414,7 +4445,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
<InputNumber precision={2} />
|
<InputNumber precision={2} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow>
|
<LayoutFormRow id="local_tax">
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.responsibilitycenters.local_tax")}
|
label={t("bodyshop.fields.responsibilitycenters.local_tax")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -4512,7 +4543,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
<InputNumber precision={2} />
|
<InputNumber precision={2} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow header={<div>AR</div>}>
|
<LayoutFormRow header={<div>AR</div>} id="AR">
|
||||||
{/* <Form.Item
|
{/* <Form.Item
|
||||||
label={t("bodyshop.fields.responsibilitycenters.ar")}
|
label={t("bodyshop.fields.responsibilitycenters.ar")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -4576,7 +4607,10 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
|
|
||||||
{DmsAp.treatment === "on" && (
|
{DmsAp.treatment === "on" && (
|
||||||
<LayoutFormRow header={t("bodyshop.fields.responsibilitycenters.ap")}>
|
<LayoutFormRow
|
||||||
|
header={t("bodyshop.fields.responsibilitycenters.ap")}
|
||||||
|
id="ap"
|
||||||
|
>
|
||||||
{/* <Form.Item
|
{/* <Form.Item
|
||||||
label={t("bodyshop.fields.responsibilitycenters.ap")}
|
label={t("bodyshop.fields.responsibilitycenters.ap")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -4639,7 +4673,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
)}
|
)}
|
||||||
<LayoutFormRow header={<div>Refund</div>}>
|
<LayoutFormRow header={<div>Refund</div>} id="refund">
|
||||||
{/* <Form.Item
|
{/* <Form.Item
|
||||||
label={t("bodyshop.fields.responsibilitycenters.refund")}
|
label={t("bodyshop.fields.responsibilitycenters.refund")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -4702,7 +4736,10 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
{Qb_Multi_Ar.treatment === "on" && (
|
{Qb_Multi_Ar.treatment === "on" && (
|
||||||
<LayoutFormRow header={<div>Multiple Payers Item</div>}>
|
<LayoutFormRow
|
||||||
|
header={<div>Multiple Payers Item</div>}
|
||||||
|
id="accountitem"
|
||||||
|
>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.responsibilitycenter_accountitem")}
|
label={t("bodyshop.fields.responsibilitycenter_accountitem")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -4730,7 +4767,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
<div>
|
<div>
|
||||||
{fields.map((field, index) => (
|
{fields.map((field, index) => (
|
||||||
<Form.Item key={field.key}>
|
<Form.Item key={field.key}>
|
||||||
<LayoutFormRow>
|
<LayoutFormRow id="sales_tax_codes">
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t(
|
label={t(
|
||||||
"bodyshop.fields.responsibilitycenters.sales_tax_codes.description"
|
"bodyshop.fields.responsibilitycenters.sales_tax_codes.description"
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SelectorDiv>
|
<SelectorDiv id="jobstatus">
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name={["md_ro_statuses", "statuses"]}
|
name={["md_ro_statuses", "statuses"]}
|
||||||
label={t("bodyshop.labels.alljobstatuses")}
|
label={t("bodyshop.labels.alljobstatuses")}
|
||||||
@@ -322,6 +322,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
|
|||||||
<LayoutFormRow
|
<LayoutFormRow
|
||||||
grow
|
grow
|
||||||
header={t("bodyshop.fields.statuses.production_colors")}
|
header={t("bodyshop.fields.statuses.production_colors")}
|
||||||
|
id="production_colors"
|
||||||
>
|
>
|
||||||
<Form.List name={["md_ro_statuses", "production_colors"]}>
|
<Form.List name={["md_ro_statuses", "production_colors"]}>
|
||||||
{(fields, { add, remove, move }) => {
|
{(fields, { add, remove, move }) => {
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ export default function ShopInfoSchedulingComponent({ form }) {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<Divider orientation="left">{t("bodyshop.labels.workingdays")}</Divider>
|
<Divider orientation="left">{t("bodyshop.labels.workingdays")}</Divider>
|
||||||
<Space wrap size="large">
|
<Space wrap size="large" id="workingdays">
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("general.labels.sunday")}
|
label={t("general.labels.sunday")}
|
||||||
name={["workingdays", "sunday"]}
|
name={["workingdays", "sunday"]}
|
||||||
@@ -143,7 +143,7 @@ export default function ShopInfoSchedulingComponent({ form }) {
|
|||||||
<Switch />
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Space>
|
</Space>
|
||||||
<LayoutFormRow header={t("bodyshop.labels.apptcolors")}>
|
<LayoutFormRow header={t("bodyshop.labels.apptcolors")} id="apptcolors">
|
||||||
<Form.List name={["appt_colors"]}>
|
<Form.List name={["appt_colors"]}>
|
||||||
{(fields, { add, remove, move }) => {
|
{(fields, { add, remove, move }) => {
|
||||||
return (
|
return (
|
||||||
@@ -208,7 +208,7 @@ export default function ShopInfoSchedulingComponent({ form }) {
|
|||||||
}}
|
}}
|
||||||
</Form.List>
|
</Form.List>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow header={t("bodyshop.labels.ssbuckets")}>
|
<LayoutFormRow header={t("bodyshop.labels.ssbuckets")} id="ssbuckets">
|
||||||
<Form.List name={["ssbuckets"]}>
|
<Form.List name={["ssbuckets"]}>
|
||||||
{(fields, { add, remove, move }) => {
|
{(fields, { add, remove, move }) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ export function TechClockInComponent({ form, bodyshop, technician }) {
|
|||||||
<JobSearchSelect
|
<JobSearchSelect
|
||||||
convertedOnly={!bodyshop.tt_allow_post_to_invoiced}
|
convertedOnly={!bodyshop.tt_allow_post_to_invoiced}
|
||||||
notExported={!bodyshop.tt_allow_post_to_invoiced}
|
notExported={!bodyshop.tt_allow_post_to_invoiced}
|
||||||
|
notInvoiced={!bodyshop.tt_allow_post_to_invoiced}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import {
|
|||||||
Col,
|
Col,
|
||||||
Form,
|
Form,
|
||||||
InputNumber,
|
InputNumber,
|
||||||
notification,
|
|
||||||
Popover,
|
Popover,
|
||||||
Row,
|
Row,
|
||||||
Select,
|
Select,
|
||||||
|
notification,
|
||||||
} from "antd";
|
} from "antd";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
@@ -16,13 +16,14 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||||
|
import { GET_LINE_TICKET_BY_PK } from "../../graphql/jobs-lines.queries";
|
||||||
|
import { UPDATE_JOB_STATUS } from "../../graphql/jobs.queries";
|
||||||
import { UPDATE_TIME_TICKET } from "../../graphql/timetickets.queries";
|
import { UPDATE_TIME_TICKET } from "../../graphql/timetickets.queries";
|
||||||
import { selectTechnician } from "../../redux/tech/tech.selectors";
|
import { selectTechnician } from "../../redux/tech/tech.selectors";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
|
import { CalculateAllocationsTotals } from "../labor-allocations-table/labor-allocations-table.utility";
|
||||||
import TechJobClockoutDelete from "../tech-job-clock-out-delete/tech-job-clock-out-delete.component";
|
import TechJobClockoutDelete from "../tech-job-clock-out-delete/tech-job-clock-out-delete.component";
|
||||||
import { LaborAllocationContainer } from "../time-ticket-modal/time-ticket-modal.component";
|
import { LaborAllocationContainer } from "../time-ticket-modal/time-ticket-modal.component";
|
||||||
import { GET_LINE_TICKET_BY_PK } from "../../graphql/jobs-lines.queries";
|
|
||||||
import { CalculateAllocationsTotals } from "../labor-allocations-table/labor-allocations-table.utility";
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -40,6 +41,7 @@ export function TechClockOffButton({
|
|||||||
}) {
|
}) {
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [updateTimeticket] = useMutation(UPDATE_TIME_TICKET);
|
const [updateTimeticket] = useMutation(UPDATE_TIME_TICKET);
|
||||||
|
const [updateJobStatus] = useMutation(UPDATE_JOB_STATUS);
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const { queryLoading, data: lineTicketData } = useQuery(
|
const { queryLoading, data: lineTicketData } = useQuery(
|
||||||
GET_LINE_TICKET_BY_PK,
|
GET_LINE_TICKET_BY_PK,
|
||||||
@@ -59,7 +61,8 @@ export function TechClockOffButton({
|
|||||||
|
|
||||||
const handleFinish = async (values) => {
|
const handleFinish = async (values) => {
|
||||||
logImEXEvent("tech_clock_out_job");
|
logImEXEvent("tech_clock_out_job");
|
||||||
|
const status = values.status;
|
||||||
|
delete values.status;
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const result = await updateTimeticket({
|
const result = await updateTimeticket({
|
||||||
variables: {
|
variables: {
|
||||||
@@ -98,6 +101,26 @@ export function TechClockOffButton({
|
|||||||
message: t("timetickets.successes.clockedout"),
|
message: t("timetickets.successes.clockedout"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (!isShiftTicket) {
|
||||||
|
const job_update_result = await updateJobStatus({
|
||||||
|
variables: {
|
||||||
|
jobId: jobId,
|
||||||
|
status: status,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!!job_update_result.errors) {
|
||||||
|
notification["error"]({
|
||||||
|
message: t("jobs.errors.updating", {
|
||||||
|
message: JSON.stringify(result.errors),
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
notification["success"]({
|
||||||
|
message: t("jobs.successes.updated"),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
if (completedCallback) completedCallback();
|
if (completedCallback) completedCallback();
|
||||||
};
|
};
|
||||||
@@ -195,7 +218,6 @@ export function TechClockOffButton({
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="cost_center"
|
name="cost_center"
|
||||||
label={t("timetickets.fields.cost_center")}
|
label={t("timetickets.fields.cost_center")}
|
||||||
@@ -228,6 +250,29 @@ export function TechClockOffButton({
|
|||||||
</Select>
|
</Select>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
|
{isShiftTicket ? (
|
||||||
|
<div></div>
|
||||||
|
) : (
|
||||||
|
<Form.Item
|
||||||
|
name="status"
|
||||||
|
label={t("jobs.fields.status")}
|
||||||
|
initialValue={
|
||||||
|
lineTicketData && lineTicketData.jobs_by_pk.status
|
||||||
|
}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<Select>
|
||||||
|
{bodyshop.md_ro_statuses.production_statuses.map((item) => (
|
||||||
|
<Select.Option key={item}></Select.Option>
|
||||||
|
))}
|
||||||
|
</Select>
|
||||||
|
</Form.Item>
|
||||||
|
)}
|
||||||
<Button type="primary" htmlType="submit" loading={loading}>
|
<Button type="primary" htmlType="submit" loading={loading}>
|
||||||
{t("general.actions.save")}
|
{t("general.actions.save")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -96,8 +96,9 @@ export function TimeTicketModalComponent({
|
|||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<JobSearchSelect
|
<JobSearchSelect
|
||||||
convertedOnly={!bodyshop.tt_allow_post_to_invoiced}
|
convertedOnly={true}
|
||||||
notExported={!bodyshop.tt_allow_post_to_invoiced}
|
notExported={!bodyshop.tt_allow_post_to_invoiced}
|
||||||
|
notInvoiced={!bodyshop.tt_allow_post_to_invoiced}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -0,0 +1,78 @@
|
|||||||
|
import { Alert, Button, Col, Row, Space } from "antd";
|
||||||
|
import i18n from "i18next";
|
||||||
|
import React from "react";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
import { createStructuredSelector } from "reselect";
|
||||||
|
import { selectUpdateAvailable } from "../../redux/application/application.selectors";
|
||||||
|
import { AlertOutlined } from "@ant-design/icons";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { setUpdateAvailable } from "../../redux/application/application.actions";
|
||||||
|
import { store } from "../../redux/store";
|
||||||
|
import * as serviceWorkerRegistration from "../../serviceWorkerRegistration";
|
||||||
|
|
||||||
|
let globalRegistration;
|
||||||
|
|
||||||
|
const mapStateToProps = createStructuredSelector({
|
||||||
|
updateAvailable: selectUpdateAvailable,
|
||||||
|
});
|
||||||
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||||
|
});
|
||||||
|
export default connect(mapStateToProps, mapDispatchToProps)(UpdateAlert);
|
||||||
|
|
||||||
|
export function UpdateAlert({ updateAvailable }) {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
if (!updateAvailable) return null;
|
||||||
|
return (
|
||||||
|
<Alert
|
||||||
|
message={t("general.messages.newversiontitle")}
|
||||||
|
showIcon
|
||||||
|
icon={<AlertOutlined />}
|
||||||
|
description={
|
||||||
|
<Row gutter={[16, 16]}>
|
||||||
|
<Col sm={24} md={16} lg={18}>
|
||||||
|
{t("general.messages.newversionmessage")}
|
||||||
|
</Col>
|
||||||
|
<Col sm={24} md={8} lg={6}>
|
||||||
|
<Space wrap>
|
||||||
|
<Button
|
||||||
|
onClick={async () => {
|
||||||
|
window.open("https://imex-online.noticeable.news/", "_blank");
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{i18n.t("general.actions.viewreleasenotes")}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
onClick={async () => {
|
||||||
|
if (globalRegistration && globalRegistration.waiting) {
|
||||||
|
await globalRegistration.unregister();
|
||||||
|
// Makes Workbox call skipWaiting()
|
||||||
|
globalRegistration.waiting.postMessage({
|
||||||
|
type: "SKIP_WAITING",
|
||||||
|
});
|
||||||
|
// Once the service worker is unregistered, we can reload the page to let
|
||||||
|
// the browser download a fresh copy of our app (invalidating the cache)
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{i18n.t("general.actions.refresh")}
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
}
|
||||||
|
closable={false}
|
||||||
|
type="warning"
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const onServiceWorkerUpdate = (registration) => {
|
||||||
|
console.log("onServiceWorkerUpdate", registration);
|
||||||
|
globalRegistration = registration;
|
||||||
|
store.dispatch(setUpdateAvailable(true));
|
||||||
|
};
|
||||||
|
|
||||||
|
serviceWorkerRegistration.register({ onUpdate: onServiceWorkerUpdate });
|
||||||
@@ -57,6 +57,8 @@ export const QUERY_ALL_ACTIVE_APPOINTMENTS = gql`
|
|||||||
v_model_yr
|
v_model_yr
|
||||||
v_make_desc
|
v_make_desc
|
||||||
v_model_desc
|
v_model_desc
|
||||||
|
est_ct_fn
|
||||||
|
est_ct_ln
|
||||||
labhrs: joblines_aggregate(
|
labhrs: joblines_aggregate(
|
||||||
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -1,36 +1,5 @@
|
|||||||
import { gql } from "@apollo/client";
|
import { gql } from "@apollo/client";
|
||||||
|
|
||||||
// export const CONVERSATION_LIST_SUBSCRIPTION = gql`
|
|
||||||
// subscription CONVERSATION_LIST_SUBSCRIPTION {
|
|
||||||
// conversations(
|
|
||||||
// order_by: { updated_at: desc }
|
|
||||||
// limit: 50
|
|
||||||
// where: { archived: { _eq: false } }
|
|
||||||
// ) {
|
|
||||||
// phone_num
|
|
||||||
// id
|
|
||||||
// updated_at
|
|
||||||
// unreadcnt
|
|
||||||
// messages_aggregate(
|
|
||||||
// where: { read: { _eq: false }, isoutbound: { _eq: false } }
|
|
||||||
// ) {
|
|
||||||
// aggregate {
|
|
||||||
// count
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// job_conversations {
|
|
||||||
// job {
|
|
||||||
// id
|
|
||||||
// ro_number
|
|
||||||
// ownr_fn
|
|
||||||
// ownr_ln
|
|
||||||
// ownr_co_nm
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// `;
|
|
||||||
|
|
||||||
export const UNREAD_CONVERSATION_COUNT = gql`
|
export const UNREAD_CONVERSATION_COUNT = gql`
|
||||||
query UNREAD_CONVERSATION_COUNT {
|
query UNREAD_CONVERSATION_COUNT {
|
||||||
messages_aggregate(
|
messages_aggregate(
|
||||||
@@ -44,10 +13,11 @@ export const UNREAD_CONVERSATION_COUNT = gql`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
export const CONVERSATION_LIST_QUERY = gql`
|
export const CONVERSATION_LIST_QUERY = gql`
|
||||||
query CONVERSATION_LIST_QUERY {
|
query CONVERSATION_LIST_QUERY($offset: Int!) {
|
||||||
conversations(
|
conversations(
|
||||||
order_by: { updated_at: desc }
|
order_by: { updated_at: desc }
|
||||||
limit: 50
|
limit: 50
|
||||||
|
offset: $offset
|
||||||
where: { archived: { _eq: false } }
|
where: { archived: { _eq: false } }
|
||||||
) {
|
) {
|
||||||
phone_num
|
phone_num
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ export const GET_LINE_TICKET_BY_PK = gql`
|
|||||||
id
|
id
|
||||||
lbr_adjustments
|
lbr_adjustments
|
||||||
converted
|
converted
|
||||||
|
status
|
||||||
}
|
}
|
||||||
joblines(where: { jobid: { _eq: $id }, removed: { _eq: false } }) {
|
joblines(where: { jobid: { _eq: $id }, removed: { _eq: false } }) {
|
||||||
id
|
id
|
||||||
|
|||||||
@@ -682,6 +682,7 @@ export const GET_JOB_BY_PK = gql`
|
|||||||
date_rentalresp
|
date_rentalresp
|
||||||
date_exported
|
date_exported
|
||||||
date_repairstarted
|
date_repairstarted
|
||||||
|
date_void
|
||||||
status
|
status
|
||||||
owner_owing
|
owner_owing
|
||||||
tax_registration_number
|
tax_registration_number
|
||||||
@@ -1075,6 +1076,10 @@ export const UPDATE_JOB = gql`
|
|||||||
lbr_adjustments
|
lbr_adjustments
|
||||||
suspended
|
suspended
|
||||||
queued_for_parts
|
queued_for_parts
|
||||||
|
scheduled_completion
|
||||||
|
actual_in
|
||||||
|
date_repairstarted
|
||||||
|
date_void
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1122,6 +1127,7 @@ export const VOID_JOB = gql`
|
|||||||
update_jobs_by_pk(_set: $job, pk_columns: { id: $jobId }) {
|
update_jobs_by_pk(_set: $job, pk_columns: { id: $jobId }) {
|
||||||
id
|
id
|
||||||
date_exported
|
date_exported
|
||||||
|
date_void
|
||||||
status
|
status
|
||||||
alt_transport
|
alt_transport
|
||||||
ro_number
|
ro_number
|
||||||
@@ -1216,10 +1222,10 @@ export const ACTIVE_JOBS_FOR_AUTOCOMPLETE = gql`
|
|||||||
query ACTIVE_JOBS_FOR_AUTOCOMPLETE($statuses: [String!]!) {
|
query ACTIVE_JOBS_FOR_AUTOCOMPLETE($statuses: [String!]!) {
|
||||||
jobs(where: { status: { _in: $statuses } }) {
|
jobs(where: { status: { _in: $statuses } }) {
|
||||||
id
|
id
|
||||||
|
ownr_co_nm
|
||||||
ownr_fn
|
ownr_fn
|
||||||
ownr_ln
|
ownr_ln
|
||||||
ro_number
|
ro_number
|
||||||
|
|
||||||
vehicleid
|
vehicleid
|
||||||
v_make_desc
|
v_make_desc
|
||||||
v_model_desc
|
v_model_desc
|
||||||
@@ -1247,6 +1253,7 @@ export const SEARCH_JOBS_FOR_AUTOCOMPLETE = gql`
|
|||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
id
|
id
|
||||||
|
ownr_co_nm
|
||||||
ownr_fn
|
ownr_fn
|
||||||
ownr_ln
|
ownr_ln
|
||||||
ro_number
|
ro_number
|
||||||
@@ -1263,6 +1270,7 @@ export const SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE = gql`
|
|||||||
query SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE($id: uuid!) {
|
query SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE($id: uuid!) {
|
||||||
jobs_by_pk(id: $id) {
|
jobs_by_pk(id: $id) {
|
||||||
id
|
id
|
||||||
|
ownr_co_nm
|
||||||
ownr_fn
|
ownr_fn
|
||||||
ownr_ln
|
ownr_ln
|
||||||
ro_number
|
ro_number
|
||||||
@@ -1281,6 +1289,7 @@ export const SEARCH_FOR_JOBS = gql`
|
|||||||
search_jobs(args: { search: $search }, limit: 25) {
|
search_jobs(args: { search: $search }, limit: 25) {
|
||||||
id
|
id
|
||||||
ro_number
|
ro_number
|
||||||
|
ownr_co_nm
|
||||||
ownr_fn
|
ownr_fn
|
||||||
ownr_ln
|
ownr_ln
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import queryString from "query-string";
|
|||||||
import React, { useEffect, useRef, useState } from "react";
|
import React, { useEffect, useRef, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { useHistory, useLocation, Link } from "react-router-dom";
|
import { Link, useHistory, useLocation } from "react-router-dom";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import SocketIO from "socket.io-client";
|
import SocketIO from "socket.io-client";
|
||||||
import AlertComponent from "../../components/alert/alert.component";
|
import AlertComponent from "../../components/alert/alert.component";
|
||||||
@@ -22,6 +22,7 @@ import DmsCustomerSelector from "../../components/dms-customer-selector/dms-cust
|
|||||||
import DmsLogEvents from "../../components/dms-log-events/dms-log-events.component";
|
import DmsLogEvents from "../../components/dms-log-events/dms-log-events.component";
|
||||||
import DmsPostForm from "../../components/dms-post-form/dms-post-form.component";
|
import DmsPostForm from "../../components/dms-post-form/dms-post-form.component";
|
||||||
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
||||||
|
import { OwnerNameDisplayFunction } from "../../components/owner-name-display/owner-name-display.component";
|
||||||
import { auth } from "../../firebase/firebase.utils";
|
import { auth } from "../../firebase/firebase.utils";
|
||||||
import { QUERY_JOB_EXPORT_DMS } from "../../graphql/jobs.queries";
|
import { QUERY_JOB_EXPORT_DMS } from "../../graphql/jobs.queries";
|
||||||
import {
|
import {
|
||||||
@@ -29,7 +30,6 @@ import {
|
|||||||
setSelectedHeader,
|
setSelectedHeader,
|
||||||
} from "../../redux/application/application.actions";
|
} from "../../redux/application/application.actions";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import { OwnerNameDisplayFunction } from "../../components/owner-name-display/owner-name-display.component";
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -46,6 +46,7 @@ export const socket = SocketIO(
|
|||||||
process.env.NODE_ENV === "production"
|
process.env.NODE_ENV === "production"
|
||||||
? process.env.REACT_APP_AXIOS_BASE_API_URL
|
? process.env.REACT_APP_AXIOS_BASE_API_URL
|
||||||
: window.location.origin,
|
: window.location.origin,
|
||||||
|
// "http://localhost:4000", // for dev testing,
|
||||||
{
|
{
|
||||||
path: "/ws",
|
path: "/ws",
|
||||||
withCredentials: true,
|
withCredentials: true,
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import {
|
|||||||
import * as Sentry from "@sentry/react";
|
import * as Sentry from "@sentry/react";
|
||||||
|
|
||||||
import "./manage.page.styles.scss";
|
import "./manage.page.styles.scss";
|
||||||
|
import UpdateAlert from "../../components/update-alert/update-alert.component";
|
||||||
|
|
||||||
const ManageRootPage = lazy(() =>
|
const ManageRootPage = lazy(() =>
|
||||||
import("../manage-root/manage-root.page.container")
|
import("../manage-root/manage-root.page.container")
|
||||||
@@ -394,6 +395,7 @@ export function Manage({ match, conflict, bodyshop }) {
|
|||||||
<>
|
<>
|
||||||
<ChatAffixContainer />
|
<ChatAffixContainer />
|
||||||
<Layout className="layout-container">
|
<Layout className="layout-container">
|
||||||
|
<UpdateAlert />
|
||||||
<HeaderContainer />
|
<HeaderContainer />
|
||||||
|
|
||||||
<Content className="content-container">
|
<Content className="content-container">
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import AlertComponent from "../../components/alert/alert.component";
|
|||||||
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
||||||
import { QUERY_BODYSHOP } from "../../graphql/bodyshop.queries";
|
import { QUERY_BODYSHOP } from "../../graphql/bodyshop.queries";
|
||||||
import { setBodyshop } from "../../redux/user/user.actions";
|
import { setBodyshop } from "../../redux/user/user.actions";
|
||||||
import "../../utils/RegisterSw";
|
//import "../../utils/RegisterSw";
|
||||||
import ManagePage from "./manage.page.component";
|
import ManagePage from "./manage.page.component";
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { Tabs } from "antd";
|
import { Tabs } from "antd";
|
||||||
import React, { useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
|
import { useHistory, useLocation } from "react-router-dom";
|
||||||
|
import queryString from "query-string";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import ShopEmployeesContainer from "../../components/shop-employees/shop-employees.container";
|
import ShopEmployeesContainer from "../../components/shop-employees/shop-employees.container";
|
||||||
import ShopInfoContainer from "../../components/shop-info/shop-info.container";
|
import ShopInfoContainer from "../../components/shop-info/shop-info.container";
|
||||||
@@ -24,6 +26,9 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
|
|
||||||
export function ShopPage({ bodyshop, setSelectedHeader, setBreadcrumbs }) {
|
export function ShopPage({ bodyshop, setSelectedHeader, setBreadcrumbs }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const history = useHistory();
|
||||||
|
const search = queryString.parse(useLocation().search);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
document.title = t("titles.shop");
|
document.title = t("titles.shop");
|
||||||
setSelectedHeader("shop");
|
setSelectedHeader("shop");
|
||||||
@@ -35,9 +40,16 @@ export function ShopPage({ bodyshop, setSelectedHeader, setBreadcrumbs }) {
|
|||||||
]);
|
]);
|
||||||
}, [t, setSelectedHeader, setBreadcrumbs, bodyshop.shopname]);
|
}, [t, setSelectedHeader, setBreadcrumbs, bodyshop.shopname]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!search.tab) history.push({ search: "?tab=info" });
|
||||||
|
}, [history, search]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<RbacWrapper action="shop:config">
|
<RbacWrapper action="shop:config">
|
||||||
<Tabs>
|
<Tabs
|
||||||
|
defaultActiveKey={search.tab}
|
||||||
|
onChange={(key) => history.push({ search: `?tab=${key}` })}
|
||||||
|
>
|
||||||
<Tabs.TabPane tab={t("bodyshop.labels.shopinfo")} key="info">
|
<Tabs.TabPane tab={t("bodyshop.labels.shopinfo")} key="info">
|
||||||
<ShopInfoContainer />
|
<ShopInfoContainer />
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import TechSider from "../../components/tech-sider/tech-sider.component";
|
|||||||
import { selectTechnician } from "../../redux/tech/tech.selectors";
|
import { selectTechnician } from "../../redux/tech/tech.selectors";
|
||||||
import FeatureWrapper from "../../components/feature-wrapper/feature-wrapper.component";
|
import FeatureWrapper from "../../components/feature-wrapper/feature-wrapper.component";
|
||||||
import "./tech.page.styles.scss";
|
import "./tech.page.styles.scss";
|
||||||
|
import UpdateAlert from "../../components/update-alert/update-alert.component";
|
||||||
const TimeTicketModalContainer = lazy(() =>
|
const TimeTicketModalContainer = lazy(() =>
|
||||||
import("../../components/time-ticket-modal/time-ticket-modal.container")
|
import("../../components/time-ticket-modal/time-ticket-modal.container")
|
||||||
);
|
);
|
||||||
@@ -56,7 +57,9 @@ export function TechPage({ technician, match }) {
|
|||||||
<TechSider />
|
<TechSider />
|
||||||
<Layout>
|
<Layout>
|
||||||
{technician ? null : <Redirect to={`${match.path}/login`} />}
|
{technician ? null : <Redirect to={`${match.path}/login`} />}
|
||||||
|
<UpdateAlert />
|
||||||
<TechHeader />
|
<TechHeader />
|
||||||
|
|
||||||
<Content className="tech-content-container">
|
<Content className="tech-content-container">
|
||||||
<ErrorBoundary>
|
<ErrorBoundary>
|
||||||
<Suspense
|
<Suspense
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import LoadingSpinner from "../../components/loading-spinner/loading-spinner.com
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import "../../utils/RegisterSw";
|
//import "../../utils/RegisterSw";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
|
|||||||
@@ -62,3 +62,8 @@ export const setProblemJobs = (problemJobs) => ({
|
|||||||
type: ApplicationActionTypes.SET_PROBLEM_JOBS,
|
type: ApplicationActionTypes.SET_PROBLEM_JOBS,
|
||||||
payload: problemJobs,
|
payload: problemJobs,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const setUpdateAvailable = (isUpdateAvailable) => ({
|
||||||
|
type: ApplicationActionTypes.SET_UPDATE_AVAILABLE,
|
||||||
|
payload: isUpdateAvailable,
|
||||||
|
});
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import ApplicationActionTypes from "./application.types";
|
|||||||
const INITIAL_STATE = {
|
const INITIAL_STATE = {
|
||||||
loading: false,
|
loading: false,
|
||||||
online: true,
|
online: true,
|
||||||
|
updateAvailable: false,
|
||||||
breadcrumbs: [],
|
breadcrumbs: [],
|
||||||
recentItems: [],
|
recentItems: [],
|
||||||
selectedHeader: "home",
|
selectedHeader: "home",
|
||||||
@@ -18,6 +19,11 @@ const INITIAL_STATE = {
|
|||||||
|
|
||||||
const applicationReducer = (state = INITIAL_STATE, action) => {
|
const applicationReducer = (state = INITIAL_STATE, action) => {
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
|
case ApplicationActionTypes.SET_UPDATE_AVAILABLE:
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
updateAvailable: action.payload,
|
||||||
|
};
|
||||||
case ApplicationActionTypes.SET_SELECTED_HEADER:
|
case ApplicationActionTypes.SET_SELECTED_HEADER:
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
|
|||||||
@@ -48,3 +48,7 @@ export const selectProblemJobs = createSelector(
|
|||||||
[selectApplication],
|
[selectApplication],
|
||||||
(application) => application.problemJobs
|
(application) => application.problemJobs
|
||||||
);
|
);
|
||||||
|
export const selectUpdateAvailable = createSelector(
|
||||||
|
[selectApplication],
|
||||||
|
(application) => application.updateAvailable
|
||||||
|
);
|
||||||
|
|||||||
@@ -12,5 +12,6 @@ const ApplicationActionTypes = {
|
|||||||
SET_ONLINE_STATUS: "SET_ONLINE_STATUS",
|
SET_ONLINE_STATUS: "SET_ONLINE_STATUS",
|
||||||
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"
|
||||||
};
|
};
|
||||||
export default ApplicationActionTypes;
|
export default ApplicationActionTypes;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
"blocked": "Blocked",
|
"blocked": "Blocked",
|
||||||
"cancelledappointment": "Canceled appointment for: ",
|
"cancelledappointment": "Canceled appointment for: ",
|
||||||
"completingjobs": "Completing Jobs",
|
"completingjobs": "Completing Jobs",
|
||||||
"dataconsistency": "{{ro_number}} has a data consistency issue. It may have been excluded for scheduling purposes. CODE: {{code}}.",
|
"dataconsistency": "<0>{{ro_number}}</0> has a data consistency issue. It may have been excluded for scheduling purposes. CODE: {{code}}.",
|
||||||
"expectedjobs": "Expected Jobs in Production: ",
|
"expectedjobs": "Expected Jobs in Production: ",
|
||||||
"expectedprodhrs": "Expected Production Hours:",
|
"expectedprodhrs": "Expected Production Hours:",
|
||||||
"history": "History",
|
"history": "History",
|
||||||
@@ -101,6 +101,7 @@
|
|||||||
"messages": {
|
"messages": {
|
||||||
"admin_jobmarkexported": "ADMIN: Job marked as exported.",
|
"admin_jobmarkexported": "ADMIN: Job marked as exported.",
|
||||||
"admin_jobmarkforreexport": "ADMIN: Job marked for re-export.",
|
"admin_jobmarkforreexport": "ADMIN: Job marked for re-export.",
|
||||||
|
"admin_jobuninvoice": "ADMIN: Job has been uninvoiced.",
|
||||||
"admin_jobunvoid": "ADMIN: Job has been unvoided.",
|
"admin_jobunvoid": "ADMIN: Job has been unvoided.",
|
||||||
"billposted": "Bill with invoice number {{invoice_number}} posted.",
|
"billposted": "Bill with invoice number {{invoice_number}} posted.",
|
||||||
"billupdated": "Bill with invoice number {{invoice_number}} updated.",
|
"billupdated": "Bill with invoice number {{invoice_number}} updated.",
|
||||||
@@ -269,6 +270,8 @@
|
|||||||
"templates": "Delivery Templates"
|
"templates": "Delivery Templates"
|
||||||
},
|
},
|
||||||
"dms": {
|
"dms": {
|
||||||
|
"apcontrol": "AP Control Number",
|
||||||
|
"appostingaccount": "AP Posting Account",
|
||||||
"cashierid": "Cashier ID",
|
"cashierid": "Cashier ID",
|
||||||
"default_journal": "Default Journal",
|
"default_journal": "Default Journal",
|
||||||
"disablebillwip": "Disable bill WIP for A/P Posting",
|
"disablebillwip": "Disable bill WIP for A/P Posting",
|
||||||
@@ -405,7 +408,8 @@
|
|||||||
"list-active": "Jobs -> List Active",
|
"list-active": "Jobs -> List Active",
|
||||||
"list-all": "Jobs -> List All",
|
"list-all": "Jobs -> List All",
|
||||||
"list-ready": "Jobs -> List Ready",
|
"list-ready": "Jobs -> List Ready",
|
||||||
"partsqueue": "Jobs -> Parts Queue"
|
"partsqueue": "Jobs -> Parts Queue",
|
||||||
|
"void": "Jobs -> Void"
|
||||||
},
|
},
|
||||||
"owners": {
|
"owners": {
|
||||||
"detail": "Owners -> Detail",
|
"detail": "Owners -> Detail",
|
||||||
@@ -857,7 +861,9 @@
|
|||||||
"prodhrssummary": "Production Hours Summary",
|
"prodhrssummary": "Production Hours Summary",
|
||||||
"productiondollars": "Total dollars in Production",
|
"productiondollars": "Total dollars in Production",
|
||||||
"productionhours": "Total hours in Production",
|
"productionhours": "Total hours in Production",
|
||||||
"projectedmonthlysales": "Projected Monthly Sales"
|
"projectedmonthlysales": "Projected Monthly Sales",
|
||||||
|
"scheduledintoday": "Sheduled In Today: {{date}}",
|
||||||
|
"scheduledouttoday": "Sheduled Out Today: {{date}}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dms": {
|
"dms": {
|
||||||
@@ -1117,7 +1123,7 @@
|
|||||||
},
|
},
|
||||||
"messages": {
|
"messages": {
|
||||||
"exception": "$t(titles.app) has encountered an error. Please try again. If the problem persists, please submit a support ticket or contact us.",
|
"exception": "$t(titles.app) has encountered an error. Please try again. If the problem persists, please submit a support ticket or contact us.",
|
||||||
"newversionmessage": "Click refresh below to update to the latest available version of ImEX Online. Please make sure all other tabs and windows are closed.",
|
"newversionmessage": "Click refresh to update to the latest available version of ImEX Online. Please make sure all other tabs and windows are closed.",
|
||||||
"newversiontitle": "New version of ImEX Online Available",
|
"newversiontitle": "New version of ImEX Online Available",
|
||||||
"noacctfilepath": "There is no accounting file path set. You will not be able to export any items.",
|
"noacctfilepath": "There is no accounting file path set. You will not be able to export any items.",
|
||||||
"nofeatureaccess": "You do not have access to this feature of ImEX Online. Please contact support to request a license for this feature.",
|
"nofeatureaccess": "You do not have access to this feature of ImEX Online. Please contact support to request a license for this feature.",
|
||||||
@@ -1434,6 +1440,7 @@
|
|||||||
"date_repairstarted": "Repairs Started",
|
"date_repairstarted": "Repairs Started",
|
||||||
"date_scheduled": "Scheduled",
|
"date_scheduled": "Scheduled",
|
||||||
"date_towin": "Towed In",
|
"date_towin": "Towed In",
|
||||||
|
"date_void": "Void",
|
||||||
"ded_amt": "Deductible",
|
"ded_amt": "Deductible",
|
||||||
"ded_note": "Deductible Note",
|
"ded_note": "Deductible Note",
|
||||||
"ded_status": "Deductible Status",
|
"ded_status": "Deductible Status",
|
||||||
@@ -1449,6 +1456,7 @@
|
|||||||
"cost_dms_acctnumber": "Cost DMS Acct #",
|
"cost_dms_acctnumber": "Cost DMS Acct #",
|
||||||
"dms_make": "DMS Make",
|
"dms_make": "DMS Make",
|
||||||
"dms_model": "DMS Model",
|
"dms_model": "DMS Model",
|
||||||
|
"dms_unsold": "New, Unsold Vehicle",
|
||||||
"dms_wip_acctnumber": "Cost WIP DMS Acct #",
|
"dms_wip_acctnumber": "Cost WIP DMS Acct #",
|
||||||
"id": "DMS ID",
|
"id": "DMS ID",
|
||||||
"inservicedate": "In Service Date",
|
"inservicedate": "In Service Date",
|
||||||
@@ -2214,6 +2222,8 @@
|
|||||||
"external": "External",
|
"external": "External",
|
||||||
"findermodal": "ICBC Payment Finder",
|
"findermodal": "ICBC Payment Finder",
|
||||||
"insurance": "Insurance",
|
"insurance": "Insurance",
|
||||||
|
"markexported": "Mark Exported",
|
||||||
|
"markforreexport": "Mark for Re-export",
|
||||||
"new": "New Payment",
|
"new": "New Payment",
|
||||||
"signup": "Please contact support to sign up for electronic payments.",
|
"signup": "Please contact support to sign up for electronic payments.",
|
||||||
"title": "Payments",
|
"title": "Payments",
|
||||||
@@ -2222,6 +2232,7 @@
|
|||||||
"successes": {
|
"successes": {
|
||||||
"exported": "Payment(s) exported successfully.",
|
"exported": "Payment(s) exported successfully.",
|
||||||
"markexported": "Payment(s) marked exported.",
|
"markexported": "Payment(s) marked exported.",
|
||||||
|
"markreexported": "Payment marked for re-export successfully",
|
||||||
"payment": "Payment created successfully. ",
|
"payment": "Payment created successfully. ",
|
||||||
"stripe": "Credit card transaction charged successfully."
|
"stripe": "Credit card transaction charged successfully."
|
||||||
}
|
}
|
||||||
@@ -2332,7 +2343,8 @@
|
|||||||
"mechanical_authorization": "Mechanical Authorization",
|
"mechanical_authorization": "Mechanical Authorization",
|
||||||
"mpi_animal_checklist": "MPI - Animal Checklist",
|
"mpi_animal_checklist": "MPI - Animal Checklist",
|
||||||
"mpi_eglass_auth": "MPI - eGlass Auth",
|
"mpi_eglass_auth": "MPI - eGlass Auth",
|
||||||
"mpi_final_acct_sheet": "MPI - Final Accounting Sheet",
|
"mpi_final_acct_sheet": "MPI - Final Accounting Sheet (Direct Repair)",
|
||||||
|
"mpi_final_repair_acct_sheet": "MPI - Final Accounting Sheet",
|
||||||
"paint_grid": "Paint Grid",
|
"paint_grid": "Paint Grid",
|
||||||
"parts_invoice_label_single": "Parts Label Single",
|
"parts_invoice_label_single": "Parts Label Single",
|
||||||
"parts_label_multiple": "Parts Label - Multi",
|
"parts_label_multiple": "Parts Label - Multi",
|
||||||
@@ -2396,6 +2408,7 @@
|
|||||||
"jobs": {
|
"jobs": {
|
||||||
"individual_job_note": "Job Note RO: {{ro_number}}",
|
"individual_job_note": "Job Note RO: {{ro_number}}",
|
||||||
"parts_order": "Parts Order PO: {{ro_number}} - {{name}}",
|
"parts_order": "Parts Order PO: {{ro_number}} - {{name}}",
|
||||||
|
"parts_return_slip":"Parts Return PO: {{ro_number}} - {{name}}",
|
||||||
"sublet_order": "Sublet Order PO: {{ro_number}} - {{name}}"
|
"sublet_order": "Sublet Order PO: {{ro_number}} - {{name}}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2563,6 +2576,7 @@
|
|||||||
"jobs_completed_not_invoiced": "Jobs Completed not Invoiced",
|
"jobs_completed_not_invoiced": "Jobs Completed not Invoiced",
|
||||||
"jobs_invoiced_not_exported": "Jobs Invoiced not Exported",
|
"jobs_invoiced_not_exported": "Jobs Invoiced not Exported",
|
||||||
"jobs_reconcile": "Parts/Sublet/Labor Reconciliation",
|
"jobs_reconcile": "Parts/Sublet/Labor Reconciliation",
|
||||||
|
"jobs_scheduled_completion": "Jobs Scheduled Completion",
|
||||||
"lag_time": "Lag Time",
|
"lag_time": "Lag Time",
|
||||||
"open_orders": "Open Orders by Date",
|
"open_orders": "Open Orders by Date",
|
||||||
"open_orders_csr": "Open Orders by CSR",
|
"open_orders_csr": "Open Orders by CSR",
|
||||||
@@ -2611,6 +2625,7 @@
|
|||||||
"timetickets_summary": "Time Tickets Summary",
|
"timetickets_summary": "Time Tickets Summary",
|
||||||
"unclaimed_hrs": "Unclaimed Hours",
|
"unclaimed_hrs": "Unclaimed Hours",
|
||||||
"void_ros": "Void ROs",
|
"void_ros": "Void ROs",
|
||||||
|
"work_in_progress_jobs": "Work in Progress - Jobs",
|
||||||
"work_in_progress_labour": "Work in Progress - Labor",
|
"work_in_progress_labour": "Work in Progress - Labor",
|
||||||
"work_in_progress_payables": "Work in Progress - Payables"
|
"work_in_progress_payables": "Work in Progress - Payables"
|
||||||
}
|
}
|
||||||
@@ -2619,6 +2634,7 @@
|
|||||||
"labels": {
|
"labels": {
|
||||||
"atssummary": "ATS Summary",
|
"atssummary": "ATS Summary",
|
||||||
"employeevacation": "Employee Vacations",
|
"employeevacation": "Employee Vacations",
|
||||||
|
"estimators": "Filter by Writer/Customer Rep.",
|
||||||
"ins_co_nm_filter": "Filter by Insurance Company",
|
"ins_co_nm_filter": "Filter by Insurance Company",
|
||||||
"intake": "Intake Events",
|
"intake": "Intake Events",
|
||||||
"manual": "Manual Events",
|
"manual": "Manual Events",
|
||||||
|
|||||||
@@ -101,6 +101,7 @@
|
|||||||
"messages": {
|
"messages": {
|
||||||
"admin_jobmarkexported": "",
|
"admin_jobmarkexported": "",
|
||||||
"admin_jobmarkforreexport": "",
|
"admin_jobmarkforreexport": "",
|
||||||
|
"admin_jobuninvoice": "",
|
||||||
"admin_jobunvoid": "",
|
"admin_jobunvoid": "",
|
||||||
"billposted": "",
|
"billposted": "",
|
||||||
"billupdated": "",
|
"billupdated": "",
|
||||||
@@ -269,6 +270,8 @@
|
|||||||
"templates": ""
|
"templates": ""
|
||||||
},
|
},
|
||||||
"dms": {
|
"dms": {
|
||||||
|
"apcontrol": "",
|
||||||
|
"appostingaccount": "",
|
||||||
"cashierid": "",
|
"cashierid": "",
|
||||||
"default_journal": "",
|
"default_journal": "",
|
||||||
"disablebillwip": "",
|
"disablebillwip": "",
|
||||||
@@ -405,7 +408,8 @@
|
|||||||
"list-active": "",
|
"list-active": "",
|
||||||
"list-all": "",
|
"list-all": "",
|
||||||
"list-ready": "",
|
"list-ready": "",
|
||||||
"partsqueue": ""
|
"partsqueue": "",
|
||||||
|
"void": ""
|
||||||
},
|
},
|
||||||
"owners": {
|
"owners": {
|
||||||
"detail": "",
|
"detail": "",
|
||||||
@@ -857,7 +861,9 @@
|
|||||||
"prodhrssummary": "",
|
"prodhrssummary": "",
|
||||||
"productiondollars": "",
|
"productiondollars": "",
|
||||||
"productionhours": "",
|
"productionhours": "",
|
||||||
"projectedmonthlysales": ""
|
"projectedmonthlysales": "",
|
||||||
|
"scheduledintoday": "",
|
||||||
|
"scheduledouttoday": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dms": {
|
"dms": {
|
||||||
@@ -1434,6 +1440,7 @@
|
|||||||
"date_repairstarted": "",
|
"date_repairstarted": "",
|
||||||
"date_scheduled": "Programado",
|
"date_scheduled": "Programado",
|
||||||
"date_towin": "",
|
"date_towin": "",
|
||||||
|
"date_void": "",
|
||||||
"ded_amt": "Deducible",
|
"ded_amt": "Deducible",
|
||||||
"ded_note": "",
|
"ded_note": "",
|
||||||
"ded_status": "Estado deducible",
|
"ded_status": "Estado deducible",
|
||||||
@@ -1449,6 +1456,7 @@
|
|||||||
"cost_dms_acctnumber": "",
|
"cost_dms_acctnumber": "",
|
||||||
"dms_make": "",
|
"dms_make": "",
|
||||||
"dms_model": "",
|
"dms_model": "",
|
||||||
|
"dms_unsold": "",
|
||||||
"dms_wip_acctnumber": "",
|
"dms_wip_acctnumber": "",
|
||||||
"id": "",
|
"id": "",
|
||||||
"inservicedate": "",
|
"inservicedate": "",
|
||||||
@@ -2214,6 +2222,8 @@
|
|||||||
"external": "",
|
"external": "",
|
||||||
"findermodal": "",
|
"findermodal": "",
|
||||||
"insurance": "",
|
"insurance": "",
|
||||||
|
"markexported": "",
|
||||||
|
"markforreexport": "",
|
||||||
"new": "",
|
"new": "",
|
||||||
"signup": "",
|
"signup": "",
|
||||||
"title": "",
|
"title": "",
|
||||||
@@ -2222,6 +2232,7 @@
|
|||||||
"successes": {
|
"successes": {
|
||||||
"exported": "",
|
"exported": "",
|
||||||
"markexported": "",
|
"markexported": "",
|
||||||
|
"markreexported": "",
|
||||||
"payment": "",
|
"payment": "",
|
||||||
"stripe": ""
|
"stripe": ""
|
||||||
}
|
}
|
||||||
@@ -2333,6 +2344,7 @@
|
|||||||
"mpi_animal_checklist": "",
|
"mpi_animal_checklist": "",
|
||||||
"mpi_eglass_auth": "",
|
"mpi_eglass_auth": "",
|
||||||
"mpi_final_acct_sheet": "",
|
"mpi_final_acct_sheet": "",
|
||||||
|
"mpi_final_repair_acct_sheet": "",
|
||||||
"paint_grid": "",
|
"paint_grid": "",
|
||||||
"parts_invoice_label_single": "",
|
"parts_invoice_label_single": "",
|
||||||
"parts_label_multiple": "",
|
"parts_label_multiple": "",
|
||||||
@@ -2396,6 +2408,7 @@
|
|||||||
"jobs": {
|
"jobs": {
|
||||||
"individual_job_note": "",
|
"individual_job_note": "",
|
||||||
"parts_order": "",
|
"parts_order": "",
|
||||||
|
"parts_return_slip": "",
|
||||||
"sublet_order": ""
|
"sublet_order": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2563,6 +2576,7 @@
|
|||||||
"jobs_completed_not_invoiced": "",
|
"jobs_completed_not_invoiced": "",
|
||||||
"jobs_invoiced_not_exported": "",
|
"jobs_invoiced_not_exported": "",
|
||||||
"jobs_reconcile": "",
|
"jobs_reconcile": "",
|
||||||
|
"jobs_scheduled_completion": "",
|
||||||
"lag_time": "",
|
"lag_time": "",
|
||||||
"open_orders": "",
|
"open_orders": "",
|
||||||
"open_orders_csr": "",
|
"open_orders_csr": "",
|
||||||
@@ -2611,6 +2625,7 @@
|
|||||||
"timetickets_summary": "",
|
"timetickets_summary": "",
|
||||||
"unclaimed_hrs": "",
|
"unclaimed_hrs": "",
|
||||||
"void_ros": "",
|
"void_ros": "",
|
||||||
|
"work_in_progress_jobs": "",
|
||||||
"work_in_progress_labour": "",
|
"work_in_progress_labour": "",
|
||||||
"work_in_progress_payables": ""
|
"work_in_progress_payables": ""
|
||||||
}
|
}
|
||||||
@@ -2619,6 +2634,7 @@
|
|||||||
"labels": {
|
"labels": {
|
||||||
"atssummary": "",
|
"atssummary": "",
|
||||||
"employeevacation": "",
|
"employeevacation": "",
|
||||||
|
"estimators": "",
|
||||||
"ins_co_nm_filter": "",
|
"ins_co_nm_filter": "",
|
||||||
"intake": "",
|
"intake": "",
|
||||||
"manual": "",
|
"manual": "",
|
||||||
|
|||||||
@@ -101,6 +101,7 @@
|
|||||||
"messages": {
|
"messages": {
|
||||||
"admin_jobmarkexported": "",
|
"admin_jobmarkexported": "",
|
||||||
"admin_jobmarkforreexport": "",
|
"admin_jobmarkforreexport": "",
|
||||||
|
"admin_jobuninvoice": "",
|
||||||
"admin_jobunvoid": "",
|
"admin_jobunvoid": "",
|
||||||
"billposted": "",
|
"billposted": "",
|
||||||
"billupdated": "",
|
"billupdated": "",
|
||||||
@@ -269,6 +270,8 @@
|
|||||||
"templates": ""
|
"templates": ""
|
||||||
},
|
},
|
||||||
"dms": {
|
"dms": {
|
||||||
|
"apcontrol": "",
|
||||||
|
"appostingaccount": "",
|
||||||
"cashierid": "",
|
"cashierid": "",
|
||||||
"default_journal": "",
|
"default_journal": "",
|
||||||
"disablebillwip": "",
|
"disablebillwip": "",
|
||||||
@@ -405,7 +408,8 @@
|
|||||||
"list-active": "",
|
"list-active": "",
|
||||||
"list-all": "",
|
"list-all": "",
|
||||||
"list-ready": "",
|
"list-ready": "",
|
||||||
"partsqueue": ""
|
"partsqueue": "",
|
||||||
|
"void": ""
|
||||||
},
|
},
|
||||||
"owners": {
|
"owners": {
|
||||||
"detail": "",
|
"detail": "",
|
||||||
@@ -857,7 +861,9 @@
|
|||||||
"prodhrssummary": "",
|
"prodhrssummary": "",
|
||||||
"productiondollars": "",
|
"productiondollars": "",
|
||||||
"productionhours": "",
|
"productionhours": "",
|
||||||
"projectedmonthlysales": ""
|
"projectedmonthlysales": "",
|
||||||
|
"scheduledintoday": "",
|
||||||
|
"scheduledouttoday": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dms": {
|
"dms": {
|
||||||
@@ -1434,6 +1440,7 @@
|
|||||||
"date_repairstarted": "",
|
"date_repairstarted": "",
|
||||||
"date_scheduled": "Prévu",
|
"date_scheduled": "Prévu",
|
||||||
"date_towin": "",
|
"date_towin": "",
|
||||||
|
"date_void": "",
|
||||||
"ded_amt": "Déductible",
|
"ded_amt": "Déductible",
|
||||||
"ded_note": "",
|
"ded_note": "",
|
||||||
"ded_status": "Statut de franchise",
|
"ded_status": "Statut de franchise",
|
||||||
@@ -1449,6 +1456,7 @@
|
|||||||
"cost_dms_acctnumber": "",
|
"cost_dms_acctnumber": "",
|
||||||
"dms_make": "",
|
"dms_make": "",
|
||||||
"dms_model": "",
|
"dms_model": "",
|
||||||
|
"dms_unsold": "",
|
||||||
"dms_wip_acctnumber": "",
|
"dms_wip_acctnumber": "",
|
||||||
"id": "",
|
"id": "",
|
||||||
"inservicedate": "",
|
"inservicedate": "",
|
||||||
@@ -2214,6 +2222,8 @@
|
|||||||
"external": "",
|
"external": "",
|
||||||
"findermodal": "",
|
"findermodal": "",
|
||||||
"insurance": "",
|
"insurance": "",
|
||||||
|
"markexported": "",
|
||||||
|
"markforreexport": "",
|
||||||
"new": "",
|
"new": "",
|
||||||
"signup": "",
|
"signup": "",
|
||||||
"title": "",
|
"title": "",
|
||||||
@@ -2222,6 +2232,7 @@
|
|||||||
"successes": {
|
"successes": {
|
||||||
"exported": "",
|
"exported": "",
|
||||||
"markexported": "",
|
"markexported": "",
|
||||||
|
"markreexported": "",
|
||||||
"payment": "",
|
"payment": "",
|
||||||
"stripe": ""
|
"stripe": ""
|
||||||
}
|
}
|
||||||
@@ -2333,6 +2344,7 @@
|
|||||||
"mpi_animal_checklist": "",
|
"mpi_animal_checklist": "",
|
||||||
"mpi_eglass_auth": "",
|
"mpi_eglass_auth": "",
|
||||||
"mpi_final_acct_sheet": "",
|
"mpi_final_acct_sheet": "",
|
||||||
|
"mpi_final_repair_acct_sheet": "",
|
||||||
"paint_grid": "",
|
"paint_grid": "",
|
||||||
"parts_invoice_label_single": "",
|
"parts_invoice_label_single": "",
|
||||||
"parts_label_multiple": "",
|
"parts_label_multiple": "",
|
||||||
@@ -2396,6 +2408,7 @@
|
|||||||
"jobs": {
|
"jobs": {
|
||||||
"individual_job_note": "",
|
"individual_job_note": "",
|
||||||
"parts_order": "",
|
"parts_order": "",
|
||||||
|
"parts_return_slip": "",
|
||||||
"sublet_order": ""
|
"sublet_order": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2563,6 +2576,7 @@
|
|||||||
"jobs_completed_not_invoiced": "",
|
"jobs_completed_not_invoiced": "",
|
||||||
"jobs_invoiced_not_exported": "",
|
"jobs_invoiced_not_exported": "",
|
||||||
"jobs_reconcile": "",
|
"jobs_reconcile": "",
|
||||||
|
"jobs_scheduled_completion": "",
|
||||||
"lag_time": "",
|
"lag_time": "",
|
||||||
"open_orders": "",
|
"open_orders": "",
|
||||||
"open_orders_csr": "",
|
"open_orders_csr": "",
|
||||||
@@ -2611,6 +2625,7 @@
|
|||||||
"timetickets_summary": "",
|
"timetickets_summary": "",
|
||||||
"unclaimed_hrs": "",
|
"unclaimed_hrs": "",
|
||||||
"void_ros": "",
|
"void_ros": "",
|
||||||
|
"work_in_progress_jobs": "",
|
||||||
"work_in_progress_labour": "",
|
"work_in_progress_labour": "",
|
||||||
"work_in_progress_payables": ""
|
"work_in_progress_payables": ""
|
||||||
}
|
}
|
||||||
@@ -2619,6 +2634,7 @@
|
|||||||
"labels": {
|
"labels": {
|
||||||
"atssummary": "",
|
"atssummary": "",
|
||||||
"employeevacation": "",
|
"employeevacation": "",
|
||||||
|
"estimators": "",
|
||||||
"ins_co_nm_filter": "",
|
"ins_co_nm_filter": "",
|
||||||
"intake": "",
|
"intake": "",
|
||||||
"manual": "",
|
"manual": "",
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ const AuditTrailMapping = {
|
|||||||
jobnoteupdated: () => i18n.t("audit_trail.messages.jobnoteupdated"),
|
jobnoteupdated: () => i18n.t("audit_trail.messages.jobnoteupdated"),
|
||||||
jobnotedeleted: () => i18n.t("audit_trail.messages.jobnotedeleted"),
|
jobnotedeleted: () => i18n.t("audit_trail.messages.jobnotedeleted"),
|
||||||
admin_jobunvoid: () => i18n.t("audit_trail.messages.admin_jobunvoid"),
|
admin_jobunvoid: () => i18n.t("audit_trail.messages.admin_jobunvoid"),
|
||||||
|
admin_jobuninvoice: () => i18n.t("audit_trail.messages.admin_jobuninvoice"),
|
||||||
admin_jobmarkforreexport: () =>
|
admin_jobmarkforreexport: () =>
|
||||||
i18n.t("audit_trail.messages.admin_jobmarkforreexport"),
|
i18n.t("audit_trail.messages.admin_jobmarkforreexport"),
|
||||||
admin_jobmarkexported: () =>
|
admin_jobmarkexported: () =>
|
||||||
|
|||||||
@@ -3,7 +3,10 @@ import { setContext } from "@apollo/client/link/context";
|
|||||||
import { HttpLink } from "@apollo/client/link/http"; //"apollo-link-http";
|
import { HttpLink } from "@apollo/client/link/http"; //"apollo-link-http";
|
||||||
import { RetryLink } from "@apollo/client/link/retry";
|
import { RetryLink } from "@apollo/client/link/retry";
|
||||||
import { WebSocketLink } from "@apollo/client/link/ws";
|
import { WebSocketLink } from "@apollo/client/link/ws";
|
||||||
import { getMainDefinition } from "@apollo/client/utilities";
|
import {
|
||||||
|
getMainDefinition,
|
||||||
|
offsetLimitPagination,
|
||||||
|
} from "@apollo/client/utilities";
|
||||||
//import { split } from "apollo-link";
|
//import { split } from "apollo-link";
|
||||||
import apolloLogger from "apollo-link-logger";
|
import apolloLogger from "apollo-link-logger";
|
||||||
//import axios from "axios";
|
//import axios from "axios";
|
||||||
@@ -140,7 +143,15 @@ middlewares.push(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
const cache = new InMemoryCache({});
|
const cache = new InMemoryCache({
|
||||||
|
typePolicies: {
|
||||||
|
Query: {
|
||||||
|
fields: {
|
||||||
|
conversations: offsetLimitPagination(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const client = new ApolloClient({
|
const client = new ApolloClient({
|
||||||
link: ApolloLink.from(middlewares),
|
link: ApolloLink.from(middlewares),
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { Button, notification, Space } from "antd";
|
|||||||
import i18n from "i18next";
|
import i18n from "i18next";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import * as serviceWorkerRegistration from "../serviceWorkerRegistration";
|
import * as serviceWorkerRegistration from "../serviceWorkerRegistration";
|
||||||
|
import { store } from "../redux/store";
|
||||||
|
|
||||||
const onServiceWorkerUpdate = (registration) => {
|
const onServiceWorkerUpdate = (registration) => {
|
||||||
console.log("onServiceWorkerUpdate", registration);
|
console.log("onServiceWorkerUpdate", registration);
|
||||||
@@ -33,6 +34,9 @@ const onServiceWorkerUpdate = (registration) => {
|
|||||||
</Button>
|
</Button>
|
||||||
</Space>
|
</Space>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
store.dispatch()
|
||||||
|
|
||||||
notification.open({
|
notification.open({
|
||||||
icon: <AlertOutlined />,
|
icon: <AlertOutlined />,
|
||||||
message: i18n.t("general.messages.newversiontitle"),
|
message: i18n.t("general.messages.newversiontitle"),
|
||||||
|
|||||||
@@ -421,6 +421,17 @@ export const TemplateList = (type, context) => {
|
|||||||
CA_MB: true,
|
CA_MB: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
mpi_final_repair_acct_sheet: {
|
||||||
|
title: i18n.t("printcenter.jobs.mpi_final_repair_acct_sheet"),
|
||||||
|
description: "",
|
||||||
|
key: "mpi_final_repair_acct_sheet",
|
||||||
|
subject: i18n.t("printcenter.jobs.mpi_final_repair_acct_sheet"),
|
||||||
|
disabled: false,
|
||||||
|
group: "post",
|
||||||
|
regions: {
|
||||||
|
CA_MB: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
mpi_eglass_auth: {
|
mpi_eglass_auth: {
|
||||||
title: i18n.t("printcenter.jobs.mpi_eglass_auth"),
|
title: i18n.t("printcenter.jobs.mpi_eglass_auth"),
|
||||||
description: "",
|
description: "",
|
||||||
@@ -501,6 +512,7 @@ export const TemplateList = (type, context) => {
|
|||||||
key: "dms_posting_sheet",
|
key: "dms_posting_sheet",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
group: "financial",
|
group: "financial",
|
||||||
|
dms: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
@@ -594,7 +606,14 @@ export const TemplateList = (type, context) => {
|
|||||||
},
|
},
|
||||||
parts_return_slip: {
|
parts_return_slip: {
|
||||||
title: i18n.t("printcenter.jobs.parts_return_slip"),
|
title: i18n.t("printcenter.jobs.parts_return_slip"),
|
||||||
subject: i18n.t("printcenter.jobs.parts_return_slip"),
|
subject: i18n.t("printcenter.subjects.jobs.parts_return_slip", {
|
||||||
|
ro_number: context && context.job && context.job.ro_number,
|
||||||
|
name: (
|
||||||
|
(context && context.job && context.job.ownr_ln) ||
|
||||||
|
(context && context.job && context.job.ownr_co_nm) ||
|
||||||
|
""
|
||||||
|
).trim(),
|
||||||
|
}),
|
||||||
description: "",
|
description: "",
|
||||||
key: "parts_return_slip",
|
key: "parts_return_slip",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
@@ -1225,7 +1244,7 @@ export const TemplateList = (type, context) => {
|
|||||||
disabled: false,
|
disabled: false,
|
||||||
rangeFilter: {
|
rangeFilter: {
|
||||||
object: i18n.t("reportcenter.labels.objects.jobs"),
|
object: i18n.t("reportcenter.labels.objects.jobs"),
|
||||||
field: i18n.t("jobs.fields.date_open"),
|
field: i18n.t("jobs.fields.date_void"),
|
||||||
},
|
},
|
||||||
group: "sales",
|
group: "sales",
|
||||||
},
|
},
|
||||||
@@ -1528,6 +1547,19 @@ export const TemplateList = (type, context) => {
|
|||||||
},
|
},
|
||||||
group: "payroll",
|
group: "payroll",
|
||||||
},
|
},
|
||||||
|
work_in_progress_jobs_excel: {
|
||||||
|
title: i18n.t("reportcenter.templates.work_in_progress_jobs"),
|
||||||
|
subject: i18n.t("reportcenter.templates.work_in_progress_jobs"),
|
||||||
|
key: "work_in_progress_jobs_excel",
|
||||||
|
//idtype: "vendor",
|
||||||
|
reporttype: "excel",
|
||||||
|
disabled: false,
|
||||||
|
rangeFilter: {
|
||||||
|
object: i18n.t("reportcenter.labels.objects.jobs"),
|
||||||
|
field: i18n.t("jobs.fields.date_open"),
|
||||||
|
},
|
||||||
|
group: "jobs",
|
||||||
|
},
|
||||||
work_in_progress_labour: {
|
work_in_progress_labour: {
|
||||||
title: i18n.t("reportcenter.templates.work_in_progress_labour"),
|
title: i18n.t("reportcenter.templates.work_in_progress_labour"),
|
||||||
description: "",
|
description: "",
|
||||||
@@ -1885,6 +1917,18 @@ export const TemplateList = (type, context) => {
|
|||||||
},
|
},
|
||||||
group: "sales",
|
group: "sales",
|
||||||
},
|
},
|
||||||
|
jobs_scheduled_completion: {
|
||||||
|
title: i18n.t("reportcenter.templates.jobs_scheduled_completion"),
|
||||||
|
subject: i18n.t("reportcenter.templates.jobs_scheduled_completion"),
|
||||||
|
key: "jobs_scheduled_completion",
|
||||||
|
//idtype: "vendor",
|
||||||
|
disabled: false,
|
||||||
|
rangeFilter: {
|
||||||
|
object: i18n.t("reportcenter.labels.objects.jobs"),
|
||||||
|
field: i18n.t("jobs.fields.scheduled_completion"),
|
||||||
|
},
|
||||||
|
group: "jobs",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
...(!type || type === "courtesycarcontract"
|
...(!type || type === "courtesycarcontract"
|
||||||
|
|||||||
@@ -11168,6 +11168,11 @@ react-image-lightbox@^5.1.4:
|
|||||||
prop-types "^15.7.2"
|
prop-types "^15.7.2"
|
||||||
react-modal "^3.11.1"
|
react-modal "^3.11.1"
|
||||||
|
|
||||||
|
react-intersection-observer@^9.4.3:
|
||||||
|
version "9.4.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/react-intersection-observer/-/react-intersection-observer-9.4.3.tgz#ec84ce0c25cad548075130ea045ac5c7adf908f3"
|
||||||
|
integrity sha512-WNRqMQvKpupr6MzecAQI0Pj0+JQong307knLP4g/nBex7kYfIaZsPpXaIhKHR+oV8z+goUbH9e10j6lGRnTzlQ==
|
||||||
|
|
||||||
react-is@^16.10.2, react-is@^16.12.0, react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0:
|
react-is@^16.10.2, react-is@^16.12.0, react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0:
|
||||||
version "16.13.1"
|
version "16.13.1"
|
||||||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
|
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
|
||||||
|
|||||||
@@ -2092,6 +2092,13 @@
|
|||||||
table:
|
table:
|
||||||
name: employee_team_members
|
name: employee_team_members
|
||||||
schema: public
|
schema: public
|
||||||
|
- name: joblines
|
||||||
|
using:
|
||||||
|
foreign_key_constraint_on:
|
||||||
|
column: assigned_team
|
||||||
|
table:
|
||||||
|
name: joblines
|
||||||
|
schema: public
|
||||||
insert_permissions:
|
insert_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
@@ -2665,6 +2672,9 @@
|
|||||||
name: joblines
|
name: joblines
|
||||||
schema: public
|
schema: public
|
||||||
object_relationships:
|
object_relationships:
|
||||||
|
- name: employee_team
|
||||||
|
using:
|
||||||
|
foreign_key_constraint_on: assigned_team
|
||||||
- name: job
|
- name: job
|
||||||
using:
|
using:
|
||||||
foreign_key_constraint_on: jobid
|
foreign_key_constraint_on: jobid
|
||||||
@@ -2690,6 +2700,13 @@
|
|||||||
table:
|
table:
|
||||||
name: inventory
|
name: inventory
|
||||||
schema: public
|
schema: public
|
||||||
|
- name: parts_dispatch_lines
|
||||||
|
using:
|
||||||
|
foreign_key_constraint_on:
|
||||||
|
column: joblineid
|
||||||
|
table:
|
||||||
|
name: parts_dispatch_lines
|
||||||
|
schema: public
|
||||||
- name: parts_order_lines
|
- name: parts_order_lines
|
||||||
using:
|
using:
|
||||||
foreign_key_constraint_on:
|
foreign_key_constraint_on:
|
||||||
@@ -2719,6 +2736,7 @@
|
|||||||
- alt_part_i
|
- alt_part_i
|
||||||
- alt_partm
|
- alt_partm
|
||||||
- alt_partno
|
- alt_partno
|
||||||
|
- assigned_team
|
||||||
- bett_amt
|
- bett_amt
|
||||||
- bett_pctg
|
- bett_pctg
|
||||||
- bett_tax
|
- bett_tax
|
||||||
@@ -2727,6 +2745,7 @@
|
|||||||
- convertedtolbr
|
- convertedtolbr
|
||||||
- convertedtolbr_data
|
- convertedtolbr_data
|
||||||
- created_at
|
- created_at
|
||||||
|
- critical
|
||||||
- db_hrs
|
- db_hrs
|
||||||
- db_price
|
- db_price
|
||||||
- db_ref
|
- db_ref
|
||||||
@@ -2786,6 +2805,7 @@
|
|||||||
- alt_part_i
|
- alt_part_i
|
||||||
- alt_partm
|
- alt_partm
|
||||||
- alt_partno
|
- alt_partno
|
||||||
|
- assigned_team
|
||||||
- bett_amt
|
- bett_amt
|
||||||
- bett_pctg
|
- bett_pctg
|
||||||
- bett_tax
|
- bett_tax
|
||||||
@@ -2865,6 +2885,7 @@
|
|||||||
- alt_part_i
|
- alt_part_i
|
||||||
- alt_partm
|
- alt_partm
|
||||||
- alt_partno
|
- alt_partno
|
||||||
|
- assigned_team
|
||||||
- bett_amt
|
- bett_amt
|
||||||
- bett_pctg
|
- bett_pctg
|
||||||
- bett_tax
|
- bett_tax
|
||||||
@@ -3131,6 +3152,13 @@
|
|||||||
table:
|
table:
|
||||||
name: notes
|
name: notes
|
||||||
schema: public
|
schema: public
|
||||||
|
- name: parts_dispatches
|
||||||
|
using:
|
||||||
|
foreign_key_constraint_on:
|
||||||
|
column: jobid
|
||||||
|
table:
|
||||||
|
name: parts_dispatch
|
||||||
|
schema: public
|
||||||
- name: parts_orders
|
- name: parts_orders
|
||||||
using:
|
using:
|
||||||
foreign_key_constraint_on:
|
foreign_key_constraint_on:
|
||||||
@@ -3272,6 +3300,7 @@
|
|||||||
- clm_total
|
- clm_total
|
||||||
- clm_zip
|
- clm_zip
|
||||||
- comment
|
- comment
|
||||||
|
- completed_tasks
|
||||||
- converted
|
- converted
|
||||||
- created_at
|
- created_at
|
||||||
- cust_pr
|
- cust_pr
|
||||||
@@ -3466,6 +3495,7 @@
|
|||||||
- v_model_yr
|
- v_model_yr
|
||||||
- v_vin
|
- v_vin
|
||||||
- vehicleid
|
- vehicleid
|
||||||
|
- date_void
|
||||||
- voided
|
- voided
|
||||||
select_permissions:
|
select_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
@@ -3536,6 +3566,7 @@
|
|||||||
- clm_total
|
- clm_total
|
||||||
- clm_zip
|
- clm_zip
|
||||||
- comment
|
- comment
|
||||||
|
- completed_tasks
|
||||||
- converted
|
- converted
|
||||||
- created_at
|
- created_at
|
||||||
- cust_pr
|
- cust_pr
|
||||||
@@ -3731,6 +3762,7 @@
|
|||||||
- v_model_yr
|
- v_model_yr
|
||||||
- v_vin
|
- v_vin
|
||||||
- vehicleid
|
- vehicleid
|
||||||
|
- date_void
|
||||||
- voided
|
- voided
|
||||||
filter:
|
filter:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
@@ -3811,6 +3843,7 @@
|
|||||||
- clm_total
|
- clm_total
|
||||||
- clm_zip
|
- clm_zip
|
||||||
- comment
|
- comment
|
||||||
|
- completed_tasks
|
||||||
- converted
|
- converted
|
||||||
- created_at
|
- created_at
|
||||||
- cust_pr
|
- cust_pr
|
||||||
@@ -4006,6 +4039,7 @@
|
|||||||
- v_model_yr
|
- v_model_yr
|
||||||
- v_vin
|
- v_vin
|
||||||
- vehicleid
|
- vehicleid
|
||||||
|
- date_void
|
||||||
- voided
|
- voided
|
||||||
filter:
|
filter:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
@@ -4556,6 +4590,165 @@
|
|||||||
template_engine: Kriti
|
template_engine: Kriti
|
||||||
url: '{{$base_url}}/opensearch'
|
url: '{{$base_url}}/opensearch'
|
||||||
version: 2
|
version: 2
|
||||||
|
- table:
|
||||||
|
name: parts_dispatch
|
||||||
|
schema: public
|
||||||
|
object_relationships:
|
||||||
|
- name: job
|
||||||
|
using:
|
||||||
|
foreign_key_constraint_on: jobid
|
||||||
|
array_relationships:
|
||||||
|
- name: parts_dispatch_lines
|
||||||
|
using:
|
||||||
|
foreign_key_constraint_on:
|
||||||
|
column: partsdispatchid
|
||||||
|
table:
|
||||||
|
name: parts_dispatch_lines
|
||||||
|
schema: public
|
||||||
|
insert_permissions:
|
||||||
|
- role: user
|
||||||
|
permission:
|
||||||
|
check:
|
||||||
|
job:
|
||||||
|
bodyshop:
|
||||||
|
associations:
|
||||||
|
_and:
|
||||||
|
- user:
|
||||||
|
authid:
|
||||||
|
_eq: X-Hasura-User-Id
|
||||||
|
- active:
|
||||||
|
_eq: true
|
||||||
|
columns:
|
||||||
|
- id
|
||||||
|
- created_at
|
||||||
|
- updated_at
|
||||||
|
- jobid
|
||||||
|
- number
|
||||||
|
- employeeid
|
||||||
|
- dispatched_at
|
||||||
|
- dispatched_by
|
||||||
|
select_permissions:
|
||||||
|
- role: user
|
||||||
|
permission:
|
||||||
|
columns:
|
||||||
|
- number
|
||||||
|
- dispatched_by
|
||||||
|
- created_at
|
||||||
|
- dispatched_at
|
||||||
|
- updated_at
|
||||||
|
- employeeid
|
||||||
|
- id
|
||||||
|
- jobid
|
||||||
|
filter:
|
||||||
|
job:
|
||||||
|
bodyshop:
|
||||||
|
associations:
|
||||||
|
_and:
|
||||||
|
- user:
|
||||||
|
authid:
|
||||||
|
_eq: X-Hasura-User-Id
|
||||||
|
- active:
|
||||||
|
_eq: true
|
||||||
|
update_permissions:
|
||||||
|
- role: user
|
||||||
|
permission:
|
||||||
|
columns:
|
||||||
|
- number
|
||||||
|
- dispatched_by
|
||||||
|
- created_at
|
||||||
|
- dispatched_at
|
||||||
|
- updated_at
|
||||||
|
- employeeid
|
||||||
|
- id
|
||||||
|
- jobid
|
||||||
|
filter:
|
||||||
|
job:
|
||||||
|
bodyshop:
|
||||||
|
associations:
|
||||||
|
_and:
|
||||||
|
- user:
|
||||||
|
authid:
|
||||||
|
_eq: X-Hasura-User-Id
|
||||||
|
- active:
|
||||||
|
_eq: true
|
||||||
|
check: null
|
||||||
|
- table:
|
||||||
|
name: parts_dispatch_lines
|
||||||
|
schema: public
|
||||||
|
object_relationships:
|
||||||
|
- name: jobline
|
||||||
|
using:
|
||||||
|
foreign_key_constraint_on: joblineid
|
||||||
|
- name: parts_dispatch
|
||||||
|
using:
|
||||||
|
foreign_key_constraint_on: partsdispatchid
|
||||||
|
insert_permissions:
|
||||||
|
- role: user
|
||||||
|
permission:
|
||||||
|
check:
|
||||||
|
parts_dispatch:
|
||||||
|
job:
|
||||||
|
bodyshop:
|
||||||
|
associations:
|
||||||
|
_and:
|
||||||
|
- user:
|
||||||
|
authid:
|
||||||
|
_eq: X-Hasura-User-Id
|
||||||
|
- active:
|
||||||
|
_eq: true
|
||||||
|
columns:
|
||||||
|
- id
|
||||||
|
- created_at
|
||||||
|
- updated_at
|
||||||
|
- partsdispatchid
|
||||||
|
- joblineid
|
||||||
|
- quantity
|
||||||
|
- accepted_at
|
||||||
|
select_permissions:
|
||||||
|
- role: user
|
||||||
|
permission:
|
||||||
|
columns:
|
||||||
|
- quantity
|
||||||
|
- accepted_at
|
||||||
|
- created_at
|
||||||
|
- updated_at
|
||||||
|
- id
|
||||||
|
- joblineid
|
||||||
|
- partsdispatchid
|
||||||
|
filter:
|
||||||
|
parts_dispatch:
|
||||||
|
job:
|
||||||
|
bodyshop:
|
||||||
|
associations:
|
||||||
|
_and:
|
||||||
|
- user:
|
||||||
|
authid:
|
||||||
|
_eq: X-Hasura-User-Id
|
||||||
|
- active:
|
||||||
|
_eq: true
|
||||||
|
update_permissions:
|
||||||
|
- role: user
|
||||||
|
permission:
|
||||||
|
columns:
|
||||||
|
- id
|
||||||
|
- created_at
|
||||||
|
- updated_at
|
||||||
|
- partsdispatchid
|
||||||
|
- joblineid
|
||||||
|
- quantity
|
||||||
|
- accepted_at
|
||||||
|
filter:
|
||||||
|
parts_dispatch:
|
||||||
|
job:
|
||||||
|
bodyshop:
|
||||||
|
associations:
|
||||||
|
_and:
|
||||||
|
- user:
|
||||||
|
authid:
|
||||||
|
_eq: X-Hasura-User-Id
|
||||||
|
- active:
|
||||||
|
_eq: true
|
||||||
|
check: null
|
||||||
- table:
|
- table:
|
||||||
name: parts_order_lines
|
name: parts_order_lines
|
||||||
schema: public
|
schema: public
|
||||||
@@ -5369,6 +5562,7 @@
|
|||||||
- memo
|
- memo
|
||||||
- productivehrs
|
- productivehrs
|
||||||
- rate
|
- rate
|
||||||
|
- task_name
|
||||||
- ttapprovalqueueid
|
- ttapprovalqueueid
|
||||||
- updated_at
|
- updated_at
|
||||||
select_permissions:
|
select_permissions:
|
||||||
@@ -5392,6 +5586,7 @@
|
|||||||
- memo
|
- memo
|
||||||
- productivehrs
|
- productivehrs
|
||||||
- rate
|
- rate
|
||||||
|
- task_name
|
||||||
- ttapprovalqueueid
|
- ttapprovalqueueid
|
||||||
- updated_at
|
- updated_at
|
||||||
filter:
|
filter:
|
||||||
@@ -5424,6 +5619,7 @@
|
|||||||
- memo
|
- memo
|
||||||
- productivehrs
|
- productivehrs
|
||||||
- rate
|
- rate
|
||||||
|
- task_name
|
||||||
- ttapprovalqueueid
|
- ttapprovalqueueid
|
||||||
- updated_at
|
- updated_at
|
||||||
filter:
|
filter:
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP TABLE "public"."parts_dispatch";
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
CREATE TABLE "public"."parts_dispatch" ("id" uuid NOT NULL DEFAULT gen_random_uuid(), "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), "jobid" uuid NOT NULL, "number" serial NOT NULL, "employeeid" uuid NOT NULL, "dispatched_at" timestamptz NOT NULL, "dispatched_by" text NOT NULL, PRIMARY KEY ("id") , FOREIGN KEY ("jobid") REFERENCES "public"."jobs"("id") ON UPDATE cascade ON DELETE cascade);
|
||||||
|
CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_updated_at"()
|
||||||
|
RETURNS TRIGGER AS $$
|
||||||
|
DECLARE
|
||||||
|
_new record;
|
||||||
|
BEGIN
|
||||||
|
_new := NEW;
|
||||||
|
_new."updated_at" = NOW();
|
||||||
|
RETURN _new;
|
||||||
|
END;
|
||||||
|
$$ LANGUAGE plpgsql;
|
||||||
|
CREATE TRIGGER "set_public_parts_dispatch_updated_at"
|
||||||
|
BEFORE UPDATE ON "public"."parts_dispatch"
|
||||||
|
FOR EACH ROW
|
||||||
|
EXECUTE PROCEDURE "public"."set_current_timestamp_updated_at"();
|
||||||
|
COMMENT ON TRIGGER "set_public_parts_dispatch_updated_at" ON "public"."parts_dispatch"
|
||||||
|
IS 'trigger to set value of column "updated_at" to current timestamp on row update';
|
||||||
|
CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP TABLE "public"."parts_dispatch_lines";
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
CREATE TABLE "public"."parts_dispatch_lines" ("id" uuid NOT NULL DEFAULT gen_random_uuid(), "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), "partsdispatchid" UUID NOT NULL, "joblineid" uuid NOT NULL, "quantity" numeric NOT NULL DEFAULT 1, "accepted_at" timestamptz NOT NULL, PRIMARY KEY ("id") , FOREIGN KEY ("joblineid") REFERENCES "public"."joblines"("id") ON UPDATE cascade ON DELETE cascade);
|
||||||
|
CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_updated_at"()
|
||||||
|
RETURNS TRIGGER AS $$
|
||||||
|
DECLARE
|
||||||
|
_new record;
|
||||||
|
BEGIN
|
||||||
|
_new := NEW;
|
||||||
|
_new."updated_at" = NOW();
|
||||||
|
RETURN _new;
|
||||||
|
END;
|
||||||
|
$$ LANGUAGE plpgsql;
|
||||||
|
CREATE TRIGGER "set_public_parts_dispatch_lines_updated_at"
|
||||||
|
BEFORE UPDATE ON "public"."parts_dispatch_lines"
|
||||||
|
FOR EACH ROW
|
||||||
|
EXECUTE PROCEDURE "public"."set_current_timestamp_updated_at"();
|
||||||
|
COMMENT ON TRIGGER "set_public_parts_dispatch_lines_updated_at" ON "public"."parts_dispatch_lines"
|
||||||
|
IS 'trigger to set value of column "updated_at" to current timestamp on row update';
|
||||||
|
CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
alter table "public"."parts_dispatch_lines" drop constraint "parts_dispatch_lines_partsdispatchid_fkey";
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
alter table "public"."parts_dispatch_lines"
|
||||||
|
add constraint "parts_dispatch_lines_partsdispatchid_fkey"
|
||||||
|
foreign key ("partsdispatchid")
|
||||||
|
references "public"."parts_dispatch"
|
||||||
|
("id") on update cascade on delete cascade;
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
alter table "public"."parts_dispatch_lines" alter column "accepted_at" set not null;
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
alter table "public"."parts_dispatch_lines" alter column "accepted_at" drop not null;
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
alter table "public"."job_conversations" drop constraint "job_conversations_conversationid_fkey",
|
||||||
|
add constraint "job_conversations_conversationid_fkey"
|
||||||
|
foreign key ("conversationid")
|
||||||
|
references "public"."conversations"
|
||||||
|
("id") on update restrict on delete restrict;
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
alter table "public"."job_conversations" drop constraint "job_conversations_conversationid_fkey",
|
||||||
|
add constraint "job_conversations_conversationid_fkey"
|
||||||
|
foreign key ("conversationid")
|
||||||
|
references "public"."conversations"
|
||||||
|
("id") on update cascade on delete cascade;
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- alter table "public"."joblines" add column "assigned_team" uuid
|
||||||
|
-- null;
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
alter table "public"."joblines" add column "assigned_team" uuid
|
||||||
|
null;
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
alter table "public"."joblines" drop constraint "joblines_assigned_team_fkey";
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
alter table "public"."joblines"
|
||||||
|
add constraint "joblines_assigned_team_fkey"
|
||||||
|
foreign key ("assigned_team")
|
||||||
|
references "public"."employee_teams"
|
||||||
|
("id") on update restrict on delete restrict;
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- alter table "public"."jobs" add column "completed_tasks" jsonb
|
||||||
|
-- null default jsonb_build_array();
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
alter table "public"."jobs" add column "completed_tasks" jsonb
|
||||||
|
null default jsonb_build_array();
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- alter table "public"."jobs" add column "void_date" Timestamp
|
||||||
|
-- null;
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
alter table "public"."jobs" add column "void_date" Timestamp
|
||||||
|
null;
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE "public"."jobs" ALTER COLUMN "void_date" TYPE timestamp without time zone;
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE "public"."jobs" ALTER COLUMN "void_date" TYPE timestamptz;
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
alter table "public"."jobs" rename column "date_void" to "void_date";
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
alter table "public"."jobs" rename column "void_date" to "date_void";
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- alter table "public"."timetickets" add column "task_name" text
|
||||||
|
-- null;
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
alter table "public"."timetickets" add column "task_name" text
|
||||||
|
null;
|
||||||
@@ -123,8 +123,14 @@ async function PbsCalculateAllocationsAp(socket, billids) {
|
|||||||
|
|
||||||
if (!billHash[cc.name]) {
|
if (!billHash[cc.name]) {
|
||||||
billHash[cc.name] = {
|
billHash[cc.name] = {
|
||||||
Account: cc.dms_acctnumber,
|
Account:
|
||||||
ControlNumber: bill.vendor.dmsid,
|
bodyshop.pbs_configuration.appostingaccount === "wip"
|
||||||
|
? cc.dms_wip_acctnumber
|
||||||
|
: cc.dms_acctnumber,
|
||||||
|
ControlNumber:
|
||||||
|
bodyshop.pbs_configuration.apcontrol === "ro"
|
||||||
|
? bill.job.ro_number
|
||||||
|
: bill.vendor.dmsid,
|
||||||
Amount: Dinero(),
|
Amount: Dinero(),
|
||||||
// Comment: "String",
|
// Comment: "String",
|
||||||
AdditionalInfo: bill.vendor.name,
|
AdditionalInfo: bill.vendor.name,
|
||||||
|
|||||||
@@ -133,7 +133,13 @@ const generateBillLine = (billLine, responsibilityCenters, jobClass) => {
|
|||||||
const findTaxCode = (billLine, taxcode) => {
|
const findTaxCode = (billLine, taxcode) => {
|
||||||
const {
|
const {
|
||||||
applicable_taxes: { local, state, federal },
|
applicable_taxes: { local, state, federal },
|
||||||
} = billLine;
|
} =
|
||||||
|
billLine.applicable_taxes === null
|
||||||
|
? {
|
||||||
|
...billLine,
|
||||||
|
applicable_taxes: { local: false, state: false, federal: false },
|
||||||
|
}
|
||||||
|
: billLine;
|
||||||
const t = taxcode.filter(
|
const t = taxcode.filter(
|
||||||
(t) =>
|
(t) =>
|
||||||
!!t.local === !!local &&
|
!!t.local === !!local &&
|
||||||
|
|||||||
@@ -262,10 +262,10 @@ const generateInvoiceQbxml = (
|
|||||||
RefNumber: jobs_by_pk.ro_number,
|
RefNumber: jobs_by_pk.ro_number,
|
||||||
BillAddress: {
|
BillAddress: {
|
||||||
Addr1: jobs_by_pk.ownr_co_nm
|
Addr1: jobs_by_pk.ownr_co_nm
|
||||||
? jobs_by_pk.ownr_co_nm.substring(0, 30)
|
? jobs_by_pk.ownr_co_nm.substring(0, 30).trim()
|
||||||
: `${`${jobs_by_pk.ownr_ln || ""} ${
|
: `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}`
|
||||||
jobs_by_pk.ownr_fn || ""
|
.substring(0, 30)
|
||||||
}`.substring(0, 30)}`,
|
.trim()}`,
|
||||||
Addr2: jobs_by_pk.ownr_addr1,
|
Addr2: jobs_by_pk.ownr_addr1,
|
||||||
Addr3: jobs_by_pk.ownr_addr2,
|
Addr3: jobs_by_pk.ownr_addr2,
|
||||||
City: jobs_by_pk.ownr_city,
|
City: jobs_by_pk.ownr_city,
|
||||||
@@ -274,10 +274,10 @@ const generateInvoiceQbxml = (
|
|||||||
},
|
},
|
||||||
ShipAddress: {
|
ShipAddress: {
|
||||||
Addr1: jobs_by_pk.ownr_co_nm
|
Addr1: jobs_by_pk.ownr_co_nm
|
||||||
? jobs_by_pk.ownr_co_nm.substring(0, 30)
|
? jobs_by_pk.ownr_co_nm.substring(0, 30).trim()
|
||||||
: `${`${jobs_by_pk.ownr_ln || ""} ${
|
: `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}`
|
||||||
jobs_by_pk.ownr_fn || ""
|
.substring(0, 30)
|
||||||
}`.substring(0, 30)}`,
|
.trim()}`,
|
||||||
Addr2: jobs_by_pk.ownr_addr1,
|
Addr2: jobs_by_pk.ownr_addr1,
|
||||||
Addr3: jobs_by_pk.ownr_addr2,
|
Addr3: jobs_by_pk.ownr_addr2,
|
||||||
City: jobs_by_pk.ownr_city,
|
City: jobs_by_pk.ownr_city,
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ exports.generateOwnerTier = (jobs_by_pk, isThreeTier, twotierpref) => {
|
|||||||
? `${jobs_by_pk.ownr_co_nm.substring(0, 30)} #${
|
? `${jobs_by_pk.ownr_co_nm.substring(0, 30)} #${
|
||||||
jobs_by_pk.owner.accountingid || ""
|
jobs_by_pk.owner.accountingid || ""
|
||||||
}`
|
}`
|
||||||
: `${`${jobs_by_pk.ownr_ln || ""} ${
|
: `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}`
|
||||||
jobs_by_pk.ownr_fn || ""
|
.substring(0, 30)
|
||||||
}`.substring(0, 30)} #${jobs_by_pk.owner.accountingid || ""}`
|
.trim()} #${jobs_by_pk.owner.accountingid || ""}`
|
||||||
)
|
)
|
||||||
.trim()
|
.trim()
|
||||||
.replace(":", " ");
|
.replace(":", " ");
|
||||||
@@ -39,9 +39,9 @@ exports.generateOwnerTier = (jobs_by_pk, isThreeTier, twotierpref) => {
|
|||||||
? `${jobs_by_pk.ownr_co_nm.substring(0, 30)} #${
|
? `${jobs_by_pk.ownr_co_nm.substring(0, 30)} #${
|
||||||
jobs_by_pk.owner.accountingid || ""
|
jobs_by_pk.owner.accountingid || ""
|
||||||
}`
|
}`
|
||||||
: `${`${jobs_by_pk.ownr_ln || ""} ${
|
: `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}`
|
||||||
jobs_by_pk.ownr_fn || ""
|
.substring(0, 30)
|
||||||
}`.substring(0, 30)} #${jobs_by_pk.owner.accountingid || ""}`
|
.trim()} #${jobs_by_pk.owner.accountingid || ""}`
|
||||||
)
|
)
|
||||||
.trim()
|
.trim()
|
||||||
.replace(":", " ");
|
.replace(":", " ");
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ async function CdkSelectedCustomer(socket, selectedCustomerId) {
|
|||||||
} finally {
|
} finally {
|
||||||
//Ensure we always insert logEvents
|
//Ensure we always insert logEvents
|
||||||
//GQL to insert logevents.
|
//GQL to insert logevents.
|
||||||
|
|
||||||
CdkBase.createLogEvent(
|
CdkBase.createLogEvent(
|
||||||
socket,
|
socket,
|
||||||
"DEBUG",
|
"DEBUG",
|
||||||
@@ -432,7 +432,7 @@ async function QueryDmsCustomerById(socket, JobData, CustomerId) {
|
|||||||
|
|
||||||
async function QueryDmsCustomerByName(socket, JobData) {
|
async function QueryDmsCustomerByName(socket, JobData) {
|
||||||
const ownerName = (
|
const ownerName = (
|
||||||
JobData.ownr_co_nm && JobData.ownr_co_nm !== ""
|
JobData.ownr_co_nm && JobData.ownr_co_nm.trim() !== ""
|
||||||
? JobData.ownr_co_nm
|
? JobData.ownr_co_nm
|
||||||
: `${JobData.ownr_ln},${JobData.ownr_fn}`
|
: `${JobData.ownr_ln},${JobData.ownr_fn}`
|
||||||
).replace(replaceSpecialRegex, "");
|
).replace(replaceSpecialRegex, "");
|
||||||
@@ -642,7 +642,8 @@ async function InsertDmsCustomer(socket, newCustomerNumber) {
|
|||||||
.toUpperCase(),
|
.toUpperCase(),
|
||||||
middleName: null,
|
middleName: null,
|
||||||
nameType:
|
nameType:
|
||||||
socket.JobData.ownr_co_nm && socket.JobData.ownr_co_nm
|
socket.JobData.ownr_co_nm &&
|
||||||
|
String(socket.JobData.ownr_co_nm).trim() !== ""
|
||||||
? "Business"
|
? "Business"
|
||||||
: "Person",
|
: "Person",
|
||||||
suffix: null,
|
suffix: null,
|
||||||
@@ -716,19 +717,33 @@ async function InsertDmsVehicle(socket) {
|
|||||||
dealer: {
|
dealer: {
|
||||||
dealerNumber: socket.JobData.bodyshop.cdk_dealerid,
|
dealerNumber: socket.JobData.bodyshop.cdk_dealerid,
|
||||||
...(socket.txEnvelope.inservicedate && {
|
...(socket.txEnvelope.inservicedate && {
|
||||||
inServiceDate: moment(socket.txEnvelope.inservicedate)
|
inServiceDate:
|
||||||
//.tz(socket.JobData.bodyshop.timezone)
|
socket.txEnvelope.dms_unsold === true
|
||||||
.startOf("day")
|
? ""
|
||||||
.toISOString(),
|
: moment(socket.txEnvelope.inservicedate)
|
||||||
|
//.tz(socket.JobData.bodyshop.timezone)
|
||||||
|
.startOf("day")
|
||||||
|
.toISOString(),
|
||||||
}),
|
}),
|
||||||
vehicleId: socket.DMSVid.vehiclesVehId,
|
vehicleId: socket.DMSVid.vehiclesVehId,
|
||||||
},
|
},
|
||||||
manufacturer: {},
|
manufacturer: {},
|
||||||
vehicle: {
|
vehicle: {
|
||||||
deliveryDate: moment()
|
deliveryDate:
|
||||||
// .tz(socket.JobData.bodyshop.timezone)
|
socket.txEnvelope.dms_unsold === true
|
||||||
.format("YYYYMMDD"),
|
? ""
|
||||||
licensePlateNo: socket.JobData.plate_no,
|
: moment()
|
||||||
|
// .tz(socket.JobData.bodyshop.timezone)
|
||||||
|
.format("YYYYMMDD"),
|
||||||
|
licensePlateNo:
|
||||||
|
socket.JobData.plate_no === null
|
||||||
|
? null
|
||||||
|
: String(socket.JobData.plate_no).replace(/([^\w]|_)/g, "")
|
||||||
|
.length === 0
|
||||||
|
? null
|
||||||
|
: String(socket.JobData.plate_no)
|
||||||
|
.replace(/([^\w]|_)/g, "")
|
||||||
|
.toUpperCase(),
|
||||||
make: socket.txEnvelope.dms_make,
|
make: socket.txEnvelope.dms_make,
|
||||||
modelAbrev: socket.txEnvelope.dms_model,
|
modelAbrev: socket.txEnvelope.dms_model,
|
||||||
modelYear: socket.JobData.v_model_yr,
|
modelYear: socket.JobData.v_model_yr,
|
||||||
@@ -851,19 +866,25 @@ async function UpdateDmsVehicle(socket) {
|
|||||||
...socket.DMSVeh.dealer,
|
...socket.DMSVeh.dealer,
|
||||||
...((socket.txEnvelope.inservicedate ||
|
...((socket.txEnvelope.inservicedate ||
|
||||||
socket.DMSVeh.dealer.inServiceDate) && {
|
socket.DMSVeh.dealer.inServiceDate) && {
|
||||||
inServiceDate: moment(
|
inServiceDate:
|
||||||
socket.DMSVeh.dealer.inServiceDate ||
|
socket.txEnvelope.dms_unsold === true
|
||||||
socket.txEnvelope.inservicedate
|
? ""
|
||||||
)
|
: moment(
|
||||||
// .tz(socket.JobData.bodyshop.timezone)
|
socket.DMSVeh.dealer.inServiceDate ||
|
||||||
.toISOString(),
|
socket.txEnvelope.inservicedate
|
||||||
|
)
|
||||||
|
// .tz(socket.JobData.bodyshop.timezone)
|
||||||
|
.toISOString(),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
vehicle: {
|
vehicle: {
|
||||||
...socket.DMSVeh.vehicle,
|
...socket.DMSVeh.vehicle,
|
||||||
deliveryDate: moment(socket.DMSVeh.vehicle.deliveryDate)
|
deliveryDate:
|
||||||
//.tz(socket.JobData.bodyshop.timezone)
|
socket.txEnvelope.dms_unsold === true
|
||||||
.toISOString(),
|
? ""
|
||||||
|
: moment(socket.DMSVeh.vehicle.deliveryDate)
|
||||||
|
//.tz(socket.JobData.bodyshop.timezone)
|
||||||
|
.toISOString(),
|
||||||
},
|
},
|
||||||
owners: ids,
|
owners: ids,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1697,6 +1697,7 @@ query GET_PBS_AP_ALLOCATIONS($billids: [uuid!]) {
|
|||||||
md_responsibility_centers
|
md_responsibility_centers
|
||||||
timezone
|
timezone
|
||||||
pbs_serialnumber
|
pbs_serialnumber
|
||||||
|
pbs_configuration
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
bills(where: {id: {_in: $billids}, exported:{_eq: false}}) {
|
bills(where: {id: {_in: $billids}, exported:{_eq: false}}) {
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ async function OpenSearchUpdateHandler(req, res) {
|
|||||||
"v_model_yr",
|
"v_model_yr",
|
||||||
"v_make_desc",
|
"v_make_desc",
|
||||||
"v_model_desc",
|
"v_model_desc",
|
||||||
|
"v_vin",
|
||||||
]);
|
]);
|
||||||
document.bodyshopid = req.body.event.data.new.shopid;
|
document.bodyshopid = req.body.event.data.new.shopid;
|
||||||
break;
|
break;
|
||||||
@@ -139,7 +140,7 @@ async function OpenSearchUpdateHandler(req, res) {
|
|||||||
"exported_at",
|
"exported_at",
|
||||||
"invoice_number",
|
"invoice_number",
|
||||||
"is_credit_memo",
|
"is_credit_memo",
|
||||||
"total"
|
"total",
|
||||||
]),
|
]),
|
||||||
...bill.bills_by_pk,
|
...bill.bills_by_pk,
|
||||||
bodyshopid: bill.bills_by_pk.job.shopid,
|
bodyshopid: bill.bills_by_pk.job.shopid,
|
||||||
@@ -244,17 +245,54 @@ async function OpensearchSearchHandler(req, res) {
|
|||||||
bool: {
|
bool: {
|
||||||
must: [
|
must: [
|
||||||
{
|
{
|
||||||
multi_match: {
|
match: {
|
||||||
query: search,
|
bodyshopid: assocs.associations[0].shopid,
|
||||||
type: "phrase_prefix",
|
|
||||||
//fields: ["*"],
|
|
||||||
// fuzziness: "5",
|
|
||||||
//prefix_length: 2,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
match: {
|
bool: {
|
||||||
bodyshopid: assocs.associations[0].shopid,
|
should: [
|
||||||
|
{
|
||||||
|
multi_match: {
|
||||||
|
query: search,
|
||||||
|
type: "cross_fields",
|
||||||
|
fields: ["*ownr_fn", "*ownr_ln"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
multi_match: {
|
||||||
|
query: search,
|
||||||
|
type: "most_fields",
|
||||||
|
fields: [
|
||||||
|
"*v_model_yr",
|
||||||
|
"*v_make_desc^2",
|
||||||
|
"*v_model_desc^3",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
query_string: {
|
||||||
|
query: `*${search}*`,
|
||||||
|
|
||||||
|
fields: [
|
||||||
|
"*ro_number^20",
|
||||||
|
"*clm_no^14",
|
||||||
|
"*v_vin^12",
|
||||||
|
"*plate_no^12",
|
||||||
|
"*ownr_ln^10",
|
||||||
|
"transactionid^10",
|
||||||
|
"paymentnum^10",
|
||||||
|
"invoice_number^10",
|
||||||
|
"*ownr_fn^8",
|
||||||
|
"*ownr_co_nm^8",
|
||||||
|
"*ownr_ph1^8",
|
||||||
|
"*ownr_ph2^8",
|
||||||
|
"*",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
minimum_should_match: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
11
yarn.lock
11
yarn.lock
@@ -4312,14 +4312,9 @@ tslib@^1.11.1:
|
|||||||
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
|
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
|
||||||
|
|
||||||
tslib@^2.0.1, tslib@^2.1.0:
|
tslib@^2.0.1, tslib@^2.1.0:
|
||||||
|
version "2.5.2"
|
||||||
tslib@^2.3.1, tslib@^2.5.0:
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.2.tgz#1b6f07185c881557b0ffa84b111a0106989e8338"
|
||||||
version "2.5.0"
|
integrity sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA==
|
||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf"
|
|
||||||
integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==
|
|
||||||
version "2.5.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf"
|
|
||||||
integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==
|
|
||||||
|
|
||||||
tslib@^2.3.1, tslib@^2.5.0:
|
tslib@^2.3.1, tslib@^2.5.0:
|
||||||
version "2.5.0"
|
version "2.5.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user