@@ -1,4 +1,4 @@
|
||||
<babeledit_project version="1.2" be_version="2.7.1">
|
||||
<babeledit_project be_version="2.7.1" version="1.2">
|
||||
<!--
|
||||
|
||||
BabelEdit project file
|
||||
@@ -500,6 +500,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>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>
|
||||
<name>time</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -1111,6 +1132,310 @@
|
||||
</folder_node>
|
||||
</children>
|
||||
</folder_node>
|
||||
<folder_node>
|
||||
<name>audit_trail</name>
|
||||
<children>
|
||||
<folder_node>
|
||||
<name>messages</name>
|
||||
<children>
|
||||
<concept_node>
|
||||
<name>billposted</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>billupdated</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>jobassignmentchange</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>jobassignmentremoved</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>jobchecklist</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>jobconverted</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<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>jobfieldchanged</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>jobimported</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>jobinproductionchange</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>jobmodifylbradj</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>jobspartsorder</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>jobspartsreturn</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>jobstatuschange</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>jobsupplement</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>
|
||||
</folder_node>
|
||||
</children>
|
||||
</folder_node>
|
||||
<folder_node>
|
||||
<name>billlines</name>
|
||||
<children>
|
||||
@@ -13539,6 +13864,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>newpassword</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>no</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -20384,6 +20730,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>special_coverage_policy</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>specialcoveragepolicy</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -32393,6 +32760,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>parts_orders</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>payments</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -32414,6 +32802,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>scoreboard</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>timetickets</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -32463,6 +32872,27 @@
|
||||
<folder_node>
|
||||
<name>templates</name>
|
||||
<children>
|
||||
<concept_node>
|
||||
<name>anticipated_revenue</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>attendance_detail</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -33198,6 +33628,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>lag_time</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>open_orders</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -33303,6 +33754,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>parts_not_recieved</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>payments_by_date</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -33639,6 +34111,48 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>scoreboard_detail</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>scoreboard_summary</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>supplement_ratio_ins_co</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -37151,6 +37665,27 @@
|
||||
<folder_node>
|
||||
<name>actions</name>
|
||||
<children>
|
||||
<concept_node>
|
||||
<name>changepassword</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>signout</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -37336,6 +37871,32 @@
|
||||
</concept_node>
|
||||
</children>
|
||||
</folder_node>
|
||||
<folder_node>
|
||||
<name>successess</name>
|
||||
<children>
|
||||
<concept_node>
|
||||
<name>passwordchanged</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>
|
||||
</folder_node>
|
||||
</children>
|
||||
</folder_node>
|
||||
<folder_node>
|
||||
|
||||
@@ -4,39 +4,39 @@
|
||||
"private": true,
|
||||
"proxy": "http://localhost:5000",
|
||||
"dependencies": {
|
||||
"@apollo/client": "^3.3.17",
|
||||
"@craco/craco": "^5.9.0",
|
||||
"@fingerprintjs/fingerprintjs": "^3.1.2",
|
||||
"@apollo/client": "^3.3.21",
|
||||
"@craco/craco": "^6.2.0",
|
||||
"@fingerprintjs/fingerprintjs": "^3.2.0",
|
||||
"@lourenci/react-kanban": "^2.1.0",
|
||||
"@sentry/react": "^6.3.6",
|
||||
"@sentry/tracing": "^6.3.6",
|
||||
"@sentry/react": "^6.10.0",
|
||||
"@sentry/tracing": "^6.10.0",
|
||||
"@stripe/react-stripe-js": "^1.4.0",
|
||||
"@stripe/stripe-js": "^1.14.0",
|
||||
"@tanem/react-nprogress": "^3.0.65",
|
||||
"antd": "^4.15.5",
|
||||
"@stripe/stripe-js": "^1.16.0",
|
||||
"@tanem/react-nprogress": "^3.0.74",
|
||||
"antd": "^4.16.8",
|
||||
"apollo-link-logger": "^2.0.0",
|
||||
"axios": "^0.21.1",
|
||||
"craco-less": "^1.17.1",
|
||||
"dinero.js": "^1.8.1",
|
||||
"dotenv": "^9.0.2",
|
||||
"craco-less": "^1.18.0",
|
||||
"dinero.js": "^1.9.0",
|
||||
"dotenv": "^10.0.0",
|
||||
"enquire-js": "^0.2.1",
|
||||
"env-cmd": "^10.1.0",
|
||||
"exifr": "^7.0.0",
|
||||
"firebase": "^8.6.0",
|
||||
"graphql": "^15.5.0",
|
||||
"i18next": "^20.2.2",
|
||||
"i18next-browser-languagedetector": "^6.1.1",
|
||||
"jsoneditor": "^9.4.1",
|
||||
"exifr": "^7.1.2",
|
||||
"firebase": "^8.7.1",
|
||||
"graphql": "^15.5.1",
|
||||
"i18next": "^20.3.4",
|
||||
"i18next-browser-languagedetector": "^6.1.2",
|
||||
"jsoneditor": "^9.5.2",
|
||||
"jsreport-browser-client-dist": "^1.3.0",
|
||||
"libphonenumber-js": "^1.9.17",
|
||||
"libphonenumber-js": "^1.9.22",
|
||||
"logrocket": "^1.2.0",
|
||||
"markerjs2": "^2.8.1",
|
||||
"markerjs2": "^2.9.0",
|
||||
"moment-business-days": "^1.2.0",
|
||||
"phone": "^2.4.21",
|
||||
"phone": "^3.1.2",
|
||||
"preval.macro": "^5.0.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"query-string": "^7.0.0",
|
||||
"rc-queue-anim": "^1.8.5",
|
||||
"query-string": "^7.0.1",
|
||||
"rc-queue-anim": "^2.0.0",
|
||||
"rc-scroll-anim": "^2.7.6",
|
||||
"react": "^17.0.1",
|
||||
"react-big-calendar": "^0.33.2",
|
||||
@@ -45,26 +45,26 @@
|
||||
"react-drag-listview": "^0.1.8",
|
||||
"react-grid-gallery": "^0.5.5",
|
||||
"react-grid-layout": "^1.2.5",
|
||||
"react-i18next": "^11.8.15",
|
||||
"react-i18next": "^11.11.3",
|
||||
"react-icons": "^4.2.0",
|
||||
"react-number-format": "^4.5.5",
|
||||
"react-number-format": "^4.6.4",
|
||||
"react-redux": "^7.2.4",
|
||||
"react-resizable": "^3.0.1",
|
||||
"react-resizable": "^3.0.4",
|
||||
"react-router-dom": "^5.2.0",
|
||||
"react-scripts": "^4.0.3",
|
||||
"react-sublime-video": "^0.2.5",
|
||||
"react-virtualized": "^9.22.3",
|
||||
"recharts": "^2.0.7",
|
||||
"recharts": "^2.0.10",
|
||||
"redux": "^4.1.0",
|
||||
"redux-persist": "^6.0.0",
|
||||
"redux-saga": "^1.1.3",
|
||||
"redux-state-sync": "^3.1.2",
|
||||
"reselect": "^4.0.0",
|
||||
"sass": "^1.32.13",
|
||||
"socket.io-client": "^4.1.2",
|
||||
"sass": "^1.35.2",
|
||||
"socket.io-client": "^4.1.3",
|
||||
"styled-components": "^5.3.0",
|
||||
"subscriptions-transport-ws": "^0.9.18",
|
||||
"web-vitals": "^1.1.2",
|
||||
"web-vitals": "^2.1.0",
|
||||
"workbox-background-sync": "^6.1.5",
|
||||
"workbox-broadcast-update": "^6.1.5",
|
||||
"workbox-cacheable-response": "^6.1.5",
|
||||
|
||||
@@ -26,6 +26,8 @@ import BillReeportButtonComponent from "../bill-reexport-button/bill-reexport-bu
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//currentUser: selectCurrentUser
|
||||
@@ -33,6 +35,8 @@ const mapStateToProps = createStructuredSelector({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
setPartsOrderContext: (context) =>
|
||||
dispatch(setModalContext({ context: context, modal: "partsOrder" })),
|
||||
insertAuditTrail: ({ jobid, operation }) =>
|
||||
dispatch(insertAuditTrail({ jobid, operation })),
|
||||
});
|
||||
|
||||
export default connect(
|
||||
@@ -40,7 +44,10 @@ export default connect(
|
||||
mapDispatchToProps
|
||||
)(BillDetailEditcontainer);
|
||||
|
||||
export function BillDetailEditcontainer({ setPartsOrderContext }) {
|
||||
export function BillDetailEditcontainer({
|
||||
setPartsOrderContext,
|
||||
insertAuditTrail,
|
||||
}) {
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const history = useHistory();
|
||||
const { t } = useTranslation();
|
||||
@@ -134,6 +141,12 @@ export function BillDetailEditcontainer({ setPartsOrderContext }) {
|
||||
});
|
||||
await Promise.all(updates);
|
||||
|
||||
insertAuditTrail({
|
||||
jobid: bill.jobid,
|
||||
billid: search.billid,
|
||||
operation: AuditTrailMapping.billupdated(bill.invoice_number),
|
||||
});
|
||||
|
||||
await refetch();
|
||||
form.setFieldsValue(transformData(data));
|
||||
form.resetFields();
|
||||
|
||||
@@ -11,12 +11,14 @@ import {
|
||||
QUERY_JOB_LBR_ADJUSTMENTS,
|
||||
UPDATE_JOB,
|
||||
} from "../../graphql/jobs.queries";
|
||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||
import { toggleModalVisible } from "../../redux/modals/modals.actions";
|
||||
import { selectBillEnterModal } from "../../redux/modals/modals.selectors";
|
||||
import {
|
||||
selectBodyshop,
|
||||
selectCurrentUser,
|
||||
} from "../../redux/user/user.selectors";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||
import BillFormContainer from "../bill-form/bill-form.container";
|
||||
import { handleUpload } from "../documents-upload/documents-upload.utility";
|
||||
|
||||
@@ -27,6 +29,8 @@ const mapStateToProps = createStructuredSelector({
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
toggleModalVisible: () => dispatch(toggleModalVisible("billEnter")),
|
||||
insertAuditTrail: ({ jobid, operation }) =>
|
||||
dispatch(insertAuditTrail({ jobid, operation })),
|
||||
});
|
||||
|
||||
function BillEnterModalContainer({
|
||||
@@ -34,6 +38,7 @@ function BillEnterModalContainer({
|
||||
toggleModalVisible,
|
||||
bodyshop,
|
||||
currentUser,
|
||||
insertAuditTrail,
|
||||
}) {
|
||||
const [form] = Form.useForm();
|
||||
const { t } = useTranslation();
|
||||
@@ -83,7 +88,7 @@ function BillEnterModalContainer({
|
||||
},
|
||||
refetchQueries: ["QUERY_PARTS_BILLS_BY_JOBID"],
|
||||
});
|
||||
console.log("adjustmentsToInsert", adjustmentsToInsert);
|
||||
|
||||
const adjKeys = Object.keys(adjustmentsToInsert);
|
||||
if (adjKeys.length > 0) {
|
||||
//Query the adjustments, merge, and update them.
|
||||
@@ -116,7 +121,12 @@ function BillEnterModalContainer({
|
||||
message: JSON.stringify(jobUpdate.errors),
|
||||
}),
|
||||
});
|
||||
return;
|
||||
}
|
||||
insertAuditTrail({
|
||||
jobid: values.jobid,
|
||||
operation: AuditTrailMapping.jobmodifylbradj(),
|
||||
});
|
||||
}
|
||||
|
||||
if (!!r1.errors) {
|
||||
@@ -172,6 +182,12 @@ function BillEnterModalContainer({
|
||||
});
|
||||
if (billEnterModal.actions.refetch) billEnterModal.actions.refetch();
|
||||
|
||||
insertAuditTrail({
|
||||
jobid: values.jobid,
|
||||
billid: billId,
|
||||
operation: AuditTrailMapping.billposted(remainingValues.invoice_number),
|
||||
});
|
||||
|
||||
if (enterAgain) {
|
||||
form.resetFields();
|
||||
form.setFieldsValue({ billlines: [] });
|
||||
|
||||
@@ -5,6 +5,7 @@ import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
||||
import { DateFormatter } from "../../utils/DateFormatter";
|
||||
import { alphaSort, dateSort } from "../../utils/sorters";
|
||||
@@ -14,6 +15,7 @@ import PrintWrapperComponent from "../print-wrapper/print-wrapper.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//jobRO: selectJobReadOnly,
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
@@ -26,6 +28,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
});
|
||||
|
||||
export function BillsListTableComponent({
|
||||
bodyshop,
|
||||
job,
|
||||
billsQuery,
|
||||
handleOnRowClick,
|
||||
@@ -52,7 +55,9 @@ export function BillsListTableComponent({
|
||||
)}
|
||||
<BillDeleteButton bill={record} />
|
||||
<Button
|
||||
disabled={record.is_credit_memo}
|
||||
disabled={
|
||||
record.is_credit_memo || record.vendorid === bodyshop.inhousevendorid
|
||||
}
|
||||
onClick={() =>
|
||||
setPartsOrderContext({
|
||||
actions: {},
|
||||
|
||||
@@ -34,7 +34,9 @@ export default function DashboardMonthlyRevenueGraph({ data, ...cardProps }) {
|
||||
let dailySales;
|
||||
if (!!jobsByDate[val]) {
|
||||
dailySales = jobsByDate[val].reduce((dayAcc, dayVal) => {
|
||||
return dayAcc.add(Dinero(dayVal.job_totals.totals.subtotal));
|
||||
return dayAcc.add(
|
||||
Dinero((dayVal.job_totals && dayVal.job_totals.totals.subtotal) || 0)
|
||||
);
|
||||
}, Dinero());
|
||||
} else {
|
||||
dailySales = Dinero();
|
||||
|
||||
@@ -13,7 +13,14 @@ export default function DashboardProjectedMonthlySales({ data, ...cardProps }) {
|
||||
const dollars =
|
||||
data.projected_monthly_sales &&
|
||||
data.projected_monthly_sales.reduce(
|
||||
(acc, val) => acc.add(Dinero(val.job_totals.totals.subtotal)),
|
||||
(acc, val) =>
|
||||
acc.add(
|
||||
Dinero(
|
||||
val.job_totals &&
|
||||
val.job_totals.totals &&
|
||||
val.job_totals.totals.subtotal
|
||||
)
|
||||
),
|
||||
Dinero()
|
||||
);
|
||||
return (
|
||||
|
||||
@@ -14,7 +14,8 @@ export default function DashboardTotalProductionDollars({
|
||||
const dollars =
|
||||
data.production_jobs &&
|
||||
data.production_jobs.reduce(
|
||||
(acc, val) => acc.add(Dinero(val.job_totals.totals.subtotal)),
|
||||
(acc, val) =>
|
||||
acc.add(Dinero(val.job_totals && val.job_totals.totals.subtotal)),
|
||||
Dinero()
|
||||
);
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Button, Popover, Space } from "antd";
|
||||
import { Button, Divider, Popover, Space } from "antd";
|
||||
import { AlertFilled } from "@ant-design/icons";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
@@ -12,6 +13,7 @@ import DataLabel from "../data-label/data-label.component";
|
||||
import ScheduleAtChange from "./job-at-change.component";
|
||||
import ScheduleEventColor from "./schedule-event.color.component";
|
||||
import queryString from "query-string";
|
||||
import ScheduleEventNote from "./schedule-event.note.component";
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
setScheduleContext: (context) =>
|
||||
@@ -38,7 +40,7 @@ export function ScheduleEventComponent({
|
||||
);
|
||||
|
||||
const popoverContent = (
|
||||
<div>
|
||||
<div style={{ maxWidth: "40vw" }}>
|
||||
{!event.isintake ? (
|
||||
<strong>{event.title}</strong>
|
||||
) : (
|
||||
@@ -83,9 +85,10 @@ export function ScheduleEventComponent({
|
||||
{(event.job && event.job.alt_transport) || ""}
|
||||
<ScheduleAtChange job={event && event.job} />
|
||||
</DataLabel>
|
||||
<ScheduleEventNote event={event} />
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
<Divider />
|
||||
<Space wrap>
|
||||
{event.job ? (
|
||||
<Link to={`/manage/jobs/${event.job && event.job.id}`}>
|
||||
@@ -161,6 +164,7 @@ export function ScheduleEventComponent({
|
||||
const RegularEvent = event.isintake ? (
|
||||
<div style={{ display: "flex", flexWrap: "wrap" }}>
|
||||
<Space>
|
||||
{event.note && <AlertFilled className="production-alert" />}
|
||||
<strong>{`${event.job.ro_number || t("general.labels.na")}`}</strong>
|
||||
<span>{`${(event.job && event.job.ownr_fn) || ""} ${
|
||||
(event.job && event.job.ownr_ln) || ""
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
import { EditFilled, SaveFilled } from "@ant-design/icons";
|
||||
import { useMutation } from "@apollo/client";
|
||||
import { Button, Input, notification, Space } from "antd";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { UPDATE_APPOINTMENT } from "../../graphql/appointments.queries";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import DataLabel from "../data-label/data-label.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
});
|
||||
|
||||
export function ScheduleEventNote({ event }) {
|
||||
const [editing, setEditing] = useState(false);
|
||||
const [note, setNote] = useState(event.note || "");
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [updateAppointment] = useMutation(UPDATE_APPOINTMENT);
|
||||
const { t } = useTranslation();
|
||||
|
||||
const toggleEdit = async () => {
|
||||
if (editing) {
|
||||
//Await the update
|
||||
setLoading(true);
|
||||
const result = await updateAppointment({
|
||||
variables: {
|
||||
appid: event.id,
|
||||
app: { note },
|
||||
},
|
||||
});
|
||||
|
||||
if (!!!result.errors) {
|
||||
// notification["success"]({ message: t("appointments.successes.saved") });
|
||||
} else {
|
||||
notification["error"]({
|
||||
message: t("jobs.errors.saving", {
|
||||
error: JSON.stringify(result.errors),
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
setEditing(false);
|
||||
} else {
|
||||
setEditing(true);
|
||||
}
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
return (
|
||||
<DataLabel label={t("appointments.fields.note")}>
|
||||
<Space flex>
|
||||
{!editing ? (
|
||||
event.note || ""
|
||||
) : (
|
||||
<Input.TextArea
|
||||
rows={3}
|
||||
value={note}
|
||||
onChange={(e) => setNote(e.target.value)}
|
||||
style={{ maxWidth: "8vw" }}
|
||||
/>
|
||||
)}
|
||||
<Button onClick={toggleEdit} loading={loading}>
|
||||
{editing ? <SaveFilled /> : <EditFilled />}
|
||||
</Button>
|
||||
</Space>
|
||||
</DataLabel>
|
||||
);
|
||||
}
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(ScheduleEventNote);
|
||||
@@ -0,0 +1,46 @@
|
||||
import { useQuery } from "@apollo/client";
|
||||
import { Card, Table } from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { QUERY_AUDIT_TRAIL } from "../../graphql/audit_trail.queries";
|
||||
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
||||
|
||||
export default function JobAuditTrail({ jobId }) {
|
||||
const { t } = useTranslation();
|
||||
const { loading, data } = useQuery(QUERY_AUDIT_TRAIL, {
|
||||
variables: { jobid: jobId },
|
||||
skip: !jobId,
|
||||
});
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: t("audit.fields.created"),
|
||||
dataIndex: "created",
|
||||
key: "created",
|
||||
render: (text, record) => (
|
||||
<DateTimeFormatter>{record.created}</DateTimeFormatter>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: t("audit.fields.useremail"),
|
||||
dataIndex: "useremail",
|
||||
key: "useremail",
|
||||
},
|
||||
{
|
||||
title: t("audit.fields.operation"),
|
||||
dataIndex: "operation",
|
||||
key: "operation",
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<Card title={t("jobs.labels.audit")}>
|
||||
<Table
|
||||
loading={loading}
|
||||
columns={columns}
|
||||
rowKey="id"
|
||||
dataSource={data ? data.audit_trail : []}
|
||||
/>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
@@ -16,16 +16,20 @@ import {
|
||||
import ConfigFormComponents from "../../../config-form-components/config-form-components.component";
|
||||
import DateTimePicker from "../../../form-date-time-picker/form-date-time-picker.component";
|
||||
import moment from "moment-business-days";
|
||||
import { insertAuditTrail } from "../../../../redux/application/application.actions";
|
||||
import AuditTrailMapping from "../../../../utils/AuditTrailMappings";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
currentUser: selectCurrentUser,
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
insertAuditTrail: ({ jobid, operation }) =>
|
||||
dispatch(insertAuditTrail({ jobid, operation })),
|
||||
});
|
||||
|
||||
export function JobChecklistForm({
|
||||
insertAuditTrail,
|
||||
formItems,
|
||||
bodyshop,
|
||||
currentUser,
|
||||
@@ -59,6 +63,12 @@ export function JobChecklistForm({
|
||||
production_vars: {
|
||||
...job.production_vars,
|
||||
...values.production_vars,
|
||||
note:
|
||||
values.production_vars &&
|
||||
values.production_vars.note &&
|
||||
values.production_vars.note !== ""
|
||||
? job.production_vars && values.production_vars.note
|
||||
: job.production_vars && job.production_vars.note,
|
||||
},
|
||||
}),
|
||||
...(type === "intake" && {
|
||||
@@ -109,6 +119,17 @@ export function JobChecklistForm({
|
||||
if (!!!result.errors) {
|
||||
notification["success"]({ message: t("checklist.successes.completed") });
|
||||
history.push(`/manage/jobs/${jobId}`);
|
||||
|
||||
insertAuditTrail({
|
||||
jobid: jobId,
|
||||
operation: AuditTrailMapping.jobchecklist(
|
||||
type,
|
||||
(type === "deliver" && values.removeFromProduction && false) ||
|
||||
(type === "intake" && values.addToProduction),
|
||||
(type === "intake" && bodyshop.md_ro_statuses.default_arrived) ||
|
||||
(type === "deliver" && bodyshop.md_ro_statuses.default_delivered)
|
||||
),
|
||||
});
|
||||
} else {
|
||||
notification["error"]({
|
||||
message: t("checklist.errors.complete", {
|
||||
|
||||
@@ -37,8 +37,8 @@ export function JobEmployeeAssignments({
|
||||
});
|
||||
const [visibility, setVisibility] = useState(false);
|
||||
|
||||
const onChange = (e) => {
|
||||
setAssignment({ ...assignment, employeeid: e });
|
||||
const onChange = (value, option) => {
|
||||
setAssignment({ ...assignment, employeeid: value, name: option.name });
|
||||
};
|
||||
|
||||
const popContent = (
|
||||
@@ -56,7 +56,11 @@ export function JobEmployeeAssignments({
|
||||
}
|
||||
>
|
||||
{bodyshop.employees.map((emp) => (
|
||||
<Select.Option value={emp.id} key={emp.id}>
|
||||
<Select.Option
|
||||
value={emp.id}
|
||||
key={emp.id}
|
||||
name={`${emp.first_name} ${emp.last_name}`}
|
||||
>
|
||||
{`${emp.first_name} ${emp.last_name}`}
|
||||
</Select.Option>
|
||||
))}
|
||||
|
||||
@@ -6,14 +6,34 @@ import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import { UPDATE_JOB_ASSIGNMENTS } from "../../graphql/jobs.queries";
|
||||
import JobEmployeeAssignmentsComponent from "./job-employee-assignments.component";
|
||||
|
||||
export default function JobEmployeeAssignmentsContainer({ job, refetch }) {
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//currentUser: selectCurrentUser
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
insertAuditTrail: ({ jobid, operation }) =>
|
||||
dispatch(insertAuditTrail({ jobid, operation })),
|
||||
});
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(JobEmployeeAssignmentsContainer);
|
||||
|
||||
export function JobEmployeeAssignmentsContainer({
|
||||
job,
|
||||
refetch,
|
||||
insertAuditTrail,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const [updateJob] = useMutation(UPDATE_JOB_ASSIGNMENTS);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
const handleAdd = async (assignment) => {
|
||||
setLoading(true);
|
||||
const { operation, employeeid } = assignment;
|
||||
const { operation, employeeid, name } = assignment;
|
||||
logImEXEvent("job_assign_employee", { operation });
|
||||
|
||||
let empAssignment = determineFieldName(operation);
|
||||
@@ -23,6 +43,11 @@ export default function JobEmployeeAssignmentsContainer({ job, refetch }) {
|
||||
});
|
||||
if (refetch) refetch();
|
||||
|
||||
insertAuditTrail({
|
||||
jobid: job.id,
|
||||
operation: AuditTrailMapping.jobassignmentchange(operation, name),
|
||||
});
|
||||
|
||||
if (!!result.errors) {
|
||||
notification["error"]({
|
||||
message: t("jobs.errors.assigning", {
|
||||
@@ -48,6 +73,10 @@ export default function JobEmployeeAssignmentsContainer({ job, refetch }) {
|
||||
}),
|
||||
});
|
||||
}
|
||||
insertAuditTrail({
|
||||
jobid: job.id,
|
||||
operation: AuditTrailMapping.jobassignmentremoved(operation),
|
||||
});
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ export function JobsAvailableComponent({
|
||||
title: t("jobs.fields.cieca_id"),
|
||||
dataIndex: "cieca_id",
|
||||
key: "cieca_id",
|
||||
sorter: (a, b) => alphaSort(a, b),
|
||||
sorter: (a, b) => alphaSort(a.cieca_id, b.cieca_id),
|
||||
sortOrder:
|
||||
state.sortedInfo.columnKey === "cieca_id" && state.sortedInfo.order,
|
||||
},
|
||||
@@ -68,9 +68,10 @@ export function JobsAvailableComponent({
|
||||
//width: "8%",
|
||||
// onFilter: (value, record) => record.ro_number.includes(value),
|
||||
// filteredValue: state.filteredInfo.text || null,
|
||||
sorter: (a, b) => alphaSort(a, b),
|
||||
sorter: (a, b) =>
|
||||
alphaSort(a.job && a.job.ro_number, b.job && b.job.ro_number),
|
||||
sortOrder:
|
||||
state.sortedInfo.columnKey === "cieca_id" && state.sortedInfo.order,
|
||||
state.sortedInfo.columnKey === "job_id" && state.sortedInfo.order,
|
||||
render: (text, record) =>
|
||||
record.job ? (
|
||||
<Link to={`/manage/jobs/${record.job.id}`}>
|
||||
@@ -87,7 +88,7 @@ export function JobsAvailableComponent({
|
||||
dataIndex: "ownr_name",
|
||||
key: "ownr_name",
|
||||
ellipsis: true,
|
||||
sorter: (a, b) => alphaSort(a.ownr_ln, b.ownr_ln),
|
||||
sorter: (a, b) => alphaSort(a.ownr_name, b.ownr_name),
|
||||
sortOrder:
|
||||
state.sortedInfo.columnKey === "ownr_name" && state.sortedInfo.order,
|
||||
},
|
||||
|
||||
@@ -25,10 +25,12 @@ import {
|
||||
import { INSERT_NEW_JOB, UPDATE_JOB } from "../../graphql/jobs.queries";
|
||||
import { INSERT_NEW_NOTE } from "../../graphql/notes.queries";
|
||||
import { SEARCH_VEHICLE_BY_VIN } from "../../graphql/vehicles.queries";
|
||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||
import {
|
||||
selectBodyshop,
|
||||
selectCurrentUser,
|
||||
} from "../../redux/user/user.selectors";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
import JobsAvailableScan from "../jobs-available-scan/jobs-available-scan.component";
|
||||
import JobsFindModalContainer from "../jobs-find-modal/jobs-find-modal.container";
|
||||
@@ -42,8 +44,15 @@ const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
currentUser: selectCurrentUser,
|
||||
});
|
||||
|
||||
export function JobsAvailableContainer({ bodyshop, currentUser }) {
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
insertAuditTrail: ({ jobid, operation }) =>
|
||||
dispatch(insertAuditTrail({ jobid, operation })),
|
||||
});
|
||||
export function JobsAvailableContainer({
|
||||
bodyshop,
|
||||
currentUser,
|
||||
insertAuditTrail,
|
||||
}) {
|
||||
const { loading, error, data, refetch } = useQuery(QUERY_AVAILABLE_JOBS, {
|
||||
fetchPolicy: "network-only",
|
||||
});
|
||||
@@ -157,6 +166,11 @@ export function JobsAvailableContainer({ bodyshop, currentUser }) {
|
||||
});
|
||||
//Job has been inserted. Clean up the available jobs record.
|
||||
|
||||
insertAuditTrail({
|
||||
jobid: r.data.insert_jobs.returning[0].id,
|
||||
operation: AuditTrailMapping.jobimported(),
|
||||
});
|
||||
|
||||
deleteJob({
|
||||
variables: { id: estData.data.available_jobs_by_pk.id },
|
||||
}).then((r) => {
|
||||
@@ -283,6 +297,10 @@ export function JobsAvailableContainer({ bodyshop, currentUser }) {
|
||||
],
|
||||
},
|
||||
});
|
||||
insertAuditTrail({
|
||||
jobid: selectedJob,
|
||||
operation: AuditTrailMapping.jobsupplement(),
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -368,4 +386,7 @@ export function JobsAvailableContainer({ bodyshop, currentUser }) {
|
||||
</LoadingSpinner>
|
||||
);
|
||||
}
|
||||
export default connect(mapStateToProps, null)(JobsAvailableContainer);
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(JobsAvailableContainer);
|
||||
|
||||
@@ -6,18 +6,21 @@ import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { UPDATE_JOB_STATUS } from "../../graphql/jobs.queries";
|
||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
jobRO: selectJobReadOnly,
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
insertAuditTrail: ({ jobid, operation }) =>
|
||||
dispatch(insertAuditTrail({ jobid, operation })),
|
||||
});
|
||||
|
||||
export function JobsChangeStatus({ job, bodyshop, jobRO }) {
|
||||
export function JobsChangeStatus({ job, bodyshop, jobRO, insertAuditTrail }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const [availableStatuses, setAvailableStatuses] = useState([]);
|
||||
@@ -29,6 +32,10 @@ export function JobsChangeStatus({ job, bodyshop, jobRO }) {
|
||||
})
|
||||
.then((r) => {
|
||||
notification["success"]({ message: t("jobs.successes.save") });
|
||||
insertAuditTrail({
|
||||
jobid: job.id,
|
||||
operation: AuditTrailMapping.jobstatuschange(status),
|
||||
});
|
||||
// refetch();
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
@@ -13,8 +13,10 @@ import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { CONVERT_JOB_TO_RO } from "../../graphql/jobs.queries";
|
||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//currentUser: selectCurrentUser
|
||||
@@ -22,10 +24,17 @@ const mapStateToProps = createStructuredSelector({
|
||||
jobRO: selectJobReadOnly,
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
insertAuditTrail: ({ jobid, operation }) =>
|
||||
dispatch(insertAuditTrail({ jobid, operation })),
|
||||
});
|
||||
|
||||
export function JobsConvertButton({ bodyshop, job, refetch, jobRO }) {
|
||||
export function JobsConvertButton({
|
||||
bodyshop,
|
||||
job,
|
||||
refetch,
|
||||
jobRO,
|
||||
insertAuditTrail,
|
||||
}) {
|
||||
const [visible, setVisible] = useState(false);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [mutationConvertJob] = useMutation(CONVERT_JOB_TO_RO);
|
||||
@@ -43,6 +52,14 @@ export function JobsConvertButton({ bodyshop, job, refetch, jobRO }) {
|
||||
notification["success"]({
|
||||
message: t("jobs.successes.converted"),
|
||||
});
|
||||
|
||||
insertAuditTrail({
|
||||
jobid: job.id,
|
||||
operation: AuditTrailMapping.jobconverted(
|
||||
res.data.update_jobs.returning[0].ro_number
|
||||
),
|
||||
});
|
||||
|
||||
setVisible(false);
|
||||
}
|
||||
setLoading(false);
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import { notification } from "antd";
|
||||
import i18n from "i18next";
|
||||
import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||
import { store } from "../../redux/store";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||
|
||||
export default function AddToProduction(
|
||||
apolloClient,
|
||||
@@ -21,6 +24,13 @@ export default function AddToProduction(
|
||||
notification["success"]({
|
||||
message: i18n.t("jobs.successes.save"),
|
||||
});
|
||||
|
||||
store.dispatch(
|
||||
insertAuditTrail({
|
||||
jobid: jobId,
|
||||
operation: AuditTrailMapping.jobinproductionchange(!remove),
|
||||
})
|
||||
);
|
||||
if (completionCallback) completionCallback();
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
@@ -9,6 +9,7 @@ import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import { UPDATE_JOB_LINE_STATUS } from "../../graphql/jobs-lines.queries";
|
||||
import { INSERT_NEW_PARTS_ORDERS } from "../../graphql/parts-orders.queries";
|
||||
import { QUERY_ALL_VENDORS_FOR_ORDER } from "../../graphql/vendors.queries";
|
||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||
import { setEmailOptions } from "../../redux/email/email.actions";
|
||||
import {
|
||||
setModalContext,
|
||||
@@ -19,6 +20,7 @@ import {
|
||||
selectBodyshop,
|
||||
selectCurrentUser,
|
||||
} from "../../redux/user/user.selectors";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||
import { GenerateDocument } from "../../utils/RenderTemplate";
|
||||
import { TemplateList } from "../../utils/TemplateConstants";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
@@ -36,6 +38,8 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
toggleModalVisible: () => dispatch(toggleModalVisible("partsOrder")),
|
||||
setBillEnterContext: (context) =>
|
||||
dispatch(setModalContext({ context: context, modal: "billEnter" })),
|
||||
insertAuditTrail: ({ jobid, operation }) =>
|
||||
dispatch(insertAuditTrail({ jobid, operation })),
|
||||
});
|
||||
|
||||
export function PartsOrderModalContainer({
|
||||
@@ -45,6 +49,7 @@ export function PartsOrderModalContainer({
|
||||
bodyshop,
|
||||
setEmailOptions,
|
||||
setBillEnterContext,
|
||||
insertAuditTrail,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -109,6 +114,18 @@ export function PartsOrderModalContainer({
|
||||
: bodyshop.md_order_statuses.default_ordered || "Ordered*",
|
||||
},
|
||||
});
|
||||
|
||||
insertAuditTrail({
|
||||
jobid: jobId,
|
||||
operation: isReturn
|
||||
? AuditTrailMapping.jobspartsreturn(
|
||||
insertResult.data.insert_parts_orders.returning[0].order_number
|
||||
)
|
||||
: AuditTrailMapping.jobspartsorder(
|
||||
insertResult.data.insert_parts_orders.returning[0].order_number
|
||||
),
|
||||
});
|
||||
|
||||
if (!!jobLinesResult.errors) {
|
||||
notification["error"]({
|
||||
message: t("parts_orders.errors.creating"),
|
||||
|
||||
@@ -14,12 +14,25 @@ import IndefiniteLoading from "../indefinite-loading/indefinite-loading.componen
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import ProductionBoardFilters from "../production-board-filters/production-board-filters.component";
|
||||
import { selectTechnician } from "../../redux/tech/tech.selectors";
|
||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
technician: selectTechnician,
|
||||
});
|
||||
|
||||
export function ProductionBoardKanbanComponent({ data, bodyshop, technician }) {
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
insertAuditTrail: ({ jobid, operation }) =>
|
||||
dispatch(insertAuditTrail({ jobid, operation })),
|
||||
});
|
||||
|
||||
export function ProductionBoardKanbanComponent({
|
||||
data,
|
||||
bodyshop,
|
||||
technician,
|
||||
insertAuditTrail,
|
||||
}) {
|
||||
const [boardLanes, setBoardLanes] = useState({
|
||||
columns: [{ id: "Loading...", title: "Loading...", cards: [] }],
|
||||
});
|
||||
@@ -104,6 +117,11 @@ export function ProductionBoardKanbanComponent({ data, bodyshop, technician }) {
|
||||
newChildCardNewParent
|
||||
),
|
||||
});
|
||||
insertAuditTrail({
|
||||
jobid: card.id,
|
||||
operation: AuditTrailMapping.jobstatuschange(destination.toColumnId),
|
||||
});
|
||||
|
||||
if (update.errors) {
|
||||
notification["error"]({
|
||||
message: t("production.errors.boardupdate", {
|
||||
@@ -130,4 +148,7 @@ export function ProductionBoardKanbanComponent({ data, bodyshop, technician }) {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
export default connect(mapStateToProps, null)(ProductionBoardKanbanComponent);
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(ProductionBoardKanbanComponent);
|
||||
|
||||
@@ -16,24 +16,32 @@ import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||
|
||||
const iconStyle = { marginLeft: ".3rem" };
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
insertAuditTrail: ({ jobid, operation }) =>
|
||||
dispatch(insertAuditTrail({ jobid, operation })),
|
||||
});
|
||||
|
||||
export function ProductionListEmpAssignment({ bodyshop, record, type }) {
|
||||
export function ProductionListEmpAssignment({
|
||||
insertAuditTrail,
|
||||
bodyshop,
|
||||
record,
|
||||
type,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const [updateJob] = useMutation(UPDATE_JOB);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
const handleAdd = async (assignment) => {
|
||||
setLoading(true);
|
||||
const { operation, employeeid } = assignment;
|
||||
const { operation, employeeid, name } = assignment;
|
||||
logImEXEvent("job_assign_employee", { operation });
|
||||
|
||||
let empAssignment = determineFieldName(operation);
|
||||
@@ -44,6 +52,11 @@ export function ProductionListEmpAssignment({ bodyshop, record, type }) {
|
||||
awaitRefetchQueries: true,
|
||||
});
|
||||
|
||||
insertAuditTrail({
|
||||
jobid: record.id,
|
||||
operation: AuditTrailMapping.jobassignmentchange(empAssignment, name),
|
||||
});
|
||||
|
||||
if (!!result.errors) {
|
||||
notification["error"]({
|
||||
message: t("jobs.errors.assigning", {
|
||||
@@ -64,6 +77,11 @@ export function ProductionListEmpAssignment({ bodyshop, record, type }) {
|
||||
awaitRefetchQueries: true,
|
||||
});
|
||||
|
||||
insertAuditTrail({
|
||||
jobid: record.id,
|
||||
operation: AuditTrailMapping.jobassignmentremoved(empAssignment),
|
||||
});
|
||||
|
||||
if (!!result.errors) {
|
||||
notification["error"]({
|
||||
message: t("jobs.errors.assigning", {
|
||||
@@ -80,8 +98,8 @@ export function ProductionListEmpAssignment({ bodyshop, record, type }) {
|
||||
});
|
||||
|
||||
const [visibility, setVisibility] = useState(false);
|
||||
const onChange = (e) => {
|
||||
setAssignment({ ...assignment, employeeid: e });
|
||||
const onChange = (e, option) => {
|
||||
setAssignment({ ...assignment, employeeid: e, name: option.name });
|
||||
};
|
||||
|
||||
const popContent = (
|
||||
@@ -99,7 +117,11 @@ export function ProductionListEmpAssignment({ bodyshop, record, type }) {
|
||||
}
|
||||
>
|
||||
{bodyshop.employees.map((emp) => (
|
||||
<Select.Option value={emp.id} key={emp.id}>
|
||||
<Select.Option
|
||||
value={emp.id}
|
||||
key={emp.id}
|
||||
name={`${emp.first_name} ${emp.last_name}`}
|
||||
>
|
||||
{`${emp.first_name} ${emp.last_name}`}
|
||||
</Select.Option>
|
||||
))}
|
||||
|
||||
@@ -6,12 +6,21 @@ import { createStructuredSelector } from "reselect";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
|
||||
export function ProductionListColumnStatus({ record, bodyshop }) {
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
insertAuditTrail: ({ jobid, operation }) =>
|
||||
dispatch(insertAuditTrail({ jobid, operation })),
|
||||
});
|
||||
export function ProductionListColumnStatus({
|
||||
record,
|
||||
bodyshop,
|
||||
insertAuditTrail,
|
||||
}) {
|
||||
const [updateJob] = useMutation(UPDATE_JOB);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
@@ -28,6 +37,11 @@ export function ProductionListColumnStatus({ record, bodyshop }) {
|
||||
},
|
||||
},
|
||||
});
|
||||
insertAuditTrail({
|
||||
jobid: record.id,
|
||||
operation: AuditTrailMapping.jobstatuschange(key),
|
||||
});
|
||||
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
@@ -52,4 +66,7 @@ export function ProductionListColumnStatus({ record, bodyshop }) {
|
||||
</Dropdown>
|
||||
);
|
||||
}
|
||||
export default connect(mapStateToProps, null)(ProductionListColumnStatus);
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(ProductionListColumnStatus);
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
import { Button, Form, Input } from "antd";
|
||||
import { Button, Form, Input, notification } from "antd";
|
||||
import { LockOutlined } from "@ant-design/icons";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { updateUserDetails } from "../../redux/user/user.actions";
|
||||
import { selectCurrentUser } from "../../redux/user/user.selectors";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import {
|
||||
logImEXEvent,
|
||||
updateCurrentPassword,
|
||||
} from "../../firebase/firebase.utils";
|
||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
currentUser: selectCurrentUser,
|
||||
@@ -28,33 +33,96 @@ export default connect(
|
||||
});
|
||||
};
|
||||
|
||||
const handleChangePassword = async ({ password }) => {
|
||||
logImEXEvent("password_update");
|
||||
try {
|
||||
await updateCurrentPassword(password);
|
||||
notification.success({
|
||||
message: t("user.successess.passwordchanged"),
|
||||
});
|
||||
} catch (error) {
|
||||
notification.error({
|
||||
message: error.message,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Form
|
||||
onFinish={handleFinish}
|
||||
autoComplete={"no"}
|
||||
initialValues={currentUser}
|
||||
layout="vertical"
|
||||
>
|
||||
<Form.Item
|
||||
label={t("user.fields.displayname")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
//message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
name="displayName"
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("user.fields.photourl")} name="photoURL">
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<LayoutFormRow>
|
||||
<Form.Item
|
||||
label={t("user.fields.displayname")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
//message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
name="displayName"
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("user.fields.photourl")} name="photoURL">
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
|
||||
<Button type="primary" key="submit" htmlType="submit">
|
||||
{t("user.actions.updateprofile")}
|
||||
</Button>
|
||||
</Form>
|
||||
<Form
|
||||
onFinish={handleChangePassword}
|
||||
autoComplete={"no"}
|
||||
initialValues={currentUser}
|
||||
layout="vertical"
|
||||
>
|
||||
<LayoutFormRow>
|
||||
<Form.Item label={t("general.labels.newpassword")} name="password">
|
||||
<Input
|
||||
prefix={<LockOutlined />}
|
||||
type="password"
|
||||
placeholder={t("general.labels.password")}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("general.labels.confirmpassword")}
|
||||
name="password-confirm"
|
||||
dependencies={["password"]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
//message: t("general.validation.required"),
|
||||
},
|
||||
({ getFieldValue }) => ({
|
||||
validator(rule, value) {
|
||||
if (!value || getFieldValue("password") === value) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
return Promise.reject(
|
||||
t("general.labels.passwordsdonotmatch")
|
||||
);
|
||||
},
|
||||
}),
|
||||
]}
|
||||
>
|
||||
<Input
|
||||
prefix={<LockOutlined />}
|
||||
type="password"
|
||||
placeholder={t("general.labels.password")}
|
||||
/>
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
<Button type="primary" key="submit" htmlType="submit">
|
||||
{t("user.actions.changepassword")}
|
||||
</Button>
|
||||
</Form>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -61,8 +61,12 @@ export function ReportCenterModalComponent({ reportCenterModal }) {
|
||||
{
|
||||
name: values.key,
|
||||
variables: {
|
||||
...(start ? { start: moment(start).format("YYYY-MM-DD") } : {}),
|
||||
...(end ? { end: moment(end).format("YYYY-MM-DD") } : {}),
|
||||
...(start
|
||||
? { start: moment(start).startOf("day").format("YYYY-MM-DD") }
|
||||
: {}),
|
||||
...(end
|
||||
? { end: moment(end).endOf("day").format("YYYY-MM-DD") }
|
||||
: {}),
|
||||
...(id ? { id: id } : {}),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
import { Button, Card, Col, Form, Row, Select, Switch } from "antd";
|
||||
import {
|
||||
Button,
|
||||
Col,
|
||||
Form,
|
||||
Input,
|
||||
Row,
|
||||
Select,
|
||||
Space,
|
||||
Switch,
|
||||
Typography,
|
||||
} from "antd";
|
||||
import axios from "axios";
|
||||
import moment from "moment";
|
||||
import React, { useState } from "react";
|
||||
@@ -91,31 +101,34 @@ export function ScheduleJobModalComponent({
|
||||
<DateTimePicker onlyFuture />
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
<Card title={t("appointments.labels.smartscheduling")}>
|
||||
|
||||
<Typography.Title level={4}>
|
||||
{t("appointments.labels.smartscheduling")}
|
||||
</Typography.Title>
|
||||
|
||||
{
|
||||
// smartOptions.length > 0 && (
|
||||
// <div>{t("appointments.labels.suggesteddates")}</div>
|
||||
// )
|
||||
}
|
||||
<Space wrap>
|
||||
<Button onClick={handleSmartScheduling} loading={loading}>
|
||||
{t("appointments.actions.calculate")}
|
||||
</Button>
|
||||
{smartOptions.length > 0 && (
|
||||
<div>{t("appointments.labels.suggesteddates")}</div>
|
||||
)}
|
||||
<div
|
||||
className="imex-flex-row imex-flex-row__flex-space-around"
|
||||
style={{ flexWrap: "wrap" }}
|
||||
>
|
||||
{smartOptions.map((d, idx) => (
|
||||
<Button
|
||||
className="imex-flex-row__margin"
|
||||
key={idx}
|
||||
onClick={() => {
|
||||
form.setFieldsValue({ start: new moment(d).add(8, "hours") });
|
||||
handleDateBlur();
|
||||
}}
|
||||
>
|
||||
<DateFormatter>{d}</DateFormatter>
|
||||
</Button>
|
||||
))}
|
||||
</div>
|
||||
</Card>
|
||||
{smartOptions.map((d, idx) => (
|
||||
<Button
|
||||
className="imex-flex-row__margin"
|
||||
key={idx}
|
||||
onClick={() => {
|
||||
form.setFieldsValue({ start: new moment(d).add(8, "hours") });
|
||||
handleDateBlur();
|
||||
}}
|
||||
>
|
||||
<DateFormatter>{d}</DateFormatter>
|
||||
</Button>
|
||||
))}
|
||||
</Space>
|
||||
|
||||
<LayoutFormRow grow>
|
||||
<Form.Item
|
||||
name="notifyCustomer"
|
||||
@@ -124,12 +137,9 @@ export function ScheduleJobModalComponent({
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<Form.Item shouldUpdate>
|
||||
{() => (
|
||||
<Form.Item name="email" label={t("jobs.fields.ownr_ea")}>
|
||||
<EmailInput disabled={!form.getFieldValue("notifyCustomer")} />
|
||||
</Form.Item>
|
||||
)}
|
||||
|
||||
<Form.Item name="email" label={t("jobs.fields.ownr_ea")}>
|
||||
<EmailInput disabled={!form.getFieldValue("notifyCustomer")} />
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
<LayoutFormRow grow>
|
||||
@@ -158,6 +168,9 @@ export function ScheduleJobModalComponent({
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
<Form.Item name={"note"} label={t("appointments.fields.note")}>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
{t("appointments.labels.history")}
|
||||
<ScheduleExistingAppointmentsList
|
||||
|
||||
@@ -105,6 +105,7 @@ export function ScheduleJobModalContainer({
|
||||
start: moment(values.start),
|
||||
end: moment(values.start).add(bodyshop.appt_length || 60, "minutes"),
|
||||
color: values.color,
|
||||
note:values.note
|
||||
},
|
||||
jobId: jobId,
|
||||
altTransport: values.alt_transport,
|
||||
|
||||
@@ -35,6 +35,24 @@ export const updateCurrentUser = (userDetails) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const updateCurrentPassword = async (password) => {
|
||||
const currentUser = await getCurrentUser();
|
||||
|
||||
return currentUser.updatePassword(password);
|
||||
|
||||
// return new Promise((resolve, reject) => {
|
||||
// const unsubscribe = auth.onAuthStateChanged(
|
||||
// (userAuth) => {
|
||||
// userAuth.updatePassword(password).then((r) => {
|
||||
// unsubscribe();
|
||||
// resolve(userAuth);
|
||||
// });
|
||||
// },
|
||||
// (error) => reject(error)
|
||||
// );
|
||||
// });
|
||||
};
|
||||
|
||||
let messaging;
|
||||
try {
|
||||
messaging = firebase.messaging();
|
||||
|
||||
@@ -20,6 +20,7 @@ export const QUERY_ALL_ACTIVE_APPOINTMENTS = gql`
|
||||
isintake
|
||||
block
|
||||
color
|
||||
note
|
||||
job {
|
||||
alt_transport
|
||||
ro_number
|
||||
@@ -69,6 +70,7 @@ export const INSERT_APPOINTMENT_BLOCK = gql`
|
||||
title
|
||||
isintake
|
||||
block
|
||||
note
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -90,6 +92,7 @@ export const INSERT_APPOINTMENT = gql`
|
||||
isintake
|
||||
block
|
||||
color
|
||||
note
|
||||
}
|
||||
}
|
||||
update_jobs(
|
||||
@@ -116,6 +119,7 @@ export const QUERY_APPOINTMENT_BY_DATE = gql`
|
||||
isintake
|
||||
block
|
||||
color
|
||||
note
|
||||
job {
|
||||
alt_transport
|
||||
ro_number
|
||||
@@ -168,6 +172,7 @@ export const UPDATE_APPOINTMENT = gql`
|
||||
isintake
|
||||
block
|
||||
color
|
||||
note
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -198,6 +203,7 @@ export const QUERY_APPOINTMENTS_BY_JOBID = gql`
|
||||
canceled
|
||||
created_at
|
||||
block
|
||||
note
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,18 +1,31 @@
|
||||
import { gql } from "@apollo/client";
|
||||
|
||||
export const QUERY_AUDIT_TRAIL = gql`
|
||||
query QUERY_AUDIT_TRAIL($id: uuid!) {
|
||||
audit_trail(where: { recordid: { _eq: $id } }) {
|
||||
query QUERY_AUDIT_TRAIL($jobid: uuid!) {
|
||||
audit_trail(
|
||||
where: { jobid: { _eq: $jobid } }
|
||||
order_by: { created: desc }
|
||||
) {
|
||||
useremail
|
||||
tabname
|
||||
schemaname
|
||||
recordid
|
||||
jobid
|
||||
operation
|
||||
old_val
|
||||
new_val
|
||||
id
|
||||
created
|
||||
bodyshopid
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_AUDIT_TRAIL = gql`
|
||||
mutation INSERT_AUDIT_TRAIL($auditObj: audit_trail_insert_input!) {
|
||||
insert_audit_trail_one(object: $auditObj) {
|
||||
id
|
||||
jobid
|
||||
billid
|
||||
bodyshopid
|
||||
created
|
||||
operation
|
||||
useremail
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -5,6 +5,7 @@ export const INSERT_NEW_PARTS_ORDERS = gql`
|
||||
insert_parts_orders(objects: $po) {
|
||||
returning {
|
||||
id
|
||||
order_number
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import Icon, {
|
||||
FileImageFilled,
|
||||
PrinterFilled,
|
||||
ToolFilled,
|
||||
HistoryOutlined,
|
||||
} from "@ant-design/icons";
|
||||
import {
|
||||
Button,
|
||||
@@ -45,6 +46,9 @@ import ScheduleJobModalContainer from "../../components/schedule-job-modal/sched
|
||||
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import JobAuditTrail from "../../components/job-audit-trail/job-audit-trail.component";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
@@ -53,6 +57,8 @@ const mapStateToProps = createStructuredSelector({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
setPrintCenterContext: (context) =>
|
||||
dispatch(setModalContext({ context: context, modal: "printCenter" })),
|
||||
insertAuditTrail: ({ jobid, operation }) =>
|
||||
dispatch(insertAuditTrail({ jobid, operation })),
|
||||
});
|
||||
export function JobsDetailPage({
|
||||
setPrintCenterContext,
|
||||
@@ -60,6 +66,7 @@ export function JobsDetailPage({
|
||||
job,
|
||||
mutationUpdateJob,
|
||||
handleSubmit,
|
||||
insertAuditTrail,
|
||||
refetch,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
@@ -81,6 +88,7 @@ export function JobsDetailPage({
|
||||
|
||||
const handleFinish = async (values) => {
|
||||
setLoading(true);
|
||||
|
||||
const result = await mutationUpdateJob({
|
||||
variables: {
|
||||
jobId: job.id,
|
||||
@@ -105,6 +113,62 @@ export function JobsDetailPage({
|
||||
notification["success"]({
|
||||
message: t("jobs.successes.savetitle"),
|
||||
});
|
||||
const changedAuditFields = form.getFieldsValue(
|
||||
[
|
||||
"scheduled_in",
|
||||
"actual_in",
|
||||
"scheduled_completion",
|
||||
"actual_completion",
|
||||
"scheduled_delivery",
|
||||
"actual_delivery",
|
||||
"date_invoiced",
|
||||
"ins_co_nm",
|
||||
"ded_amt",
|
||||
"ded_status",
|
||||
"date_exported",
|
||||
"special_coverage_policy",
|
||||
"ca_gst_registrant",
|
||||
"ca_bc_pvrt",
|
||||
"scheduled_in",
|
||||
"rate_la1",
|
||||
"rate_la2",
|
||||
"rate_la3",
|
||||
"rate_la4",
|
||||
"rate_laa",
|
||||
"rate_lab",
|
||||
"rate_lad",
|
||||
"rate_lae",
|
||||
"rate_laf",
|
||||
"rate_lag",
|
||||
"rate_lam",
|
||||
"rate_lar",
|
||||
"rate_las",
|
||||
"rate_lau",
|
||||
"rate_ma2s",
|
||||
"rate_ma2t",
|
||||
"rate_ma3s",
|
||||
"rate_mabl",
|
||||
"rate_macs",
|
||||
"rate_mapa",
|
||||
"rate_mahw",
|
||||
"rate_mash",
|
||||
"rate_matd",
|
||||
],
|
||||
(meta) => meta && meta.touched
|
||||
);
|
||||
|
||||
Object.keys(changedAuditFields).forEach((key) => {
|
||||
insertAuditTrail({
|
||||
jobid: job.id,
|
||||
operation: AuditTrailMapping.jobfieldchange(
|
||||
key,
|
||||
changedAuditFields[key] instanceof moment
|
||||
? moment(changedAuditFields[key]).format("MM/DD/YYYY hh:mm a")
|
||||
: changedAuditFields[key]
|
||||
),
|
||||
});
|
||||
});
|
||||
|
||||
await refetch();
|
||||
form.setFieldsValue(transormJobToForm(job));
|
||||
form.resetFields();
|
||||
@@ -279,6 +343,17 @@ export function JobsDetailPage({
|
||||
>
|
||||
<JobNotesContainer jobId={job.id} />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane
|
||||
tab={
|
||||
<span>
|
||||
<HistoryOutlined />
|
||||
{t("jobs.labels.audit")}
|
||||
</span>
|
||||
}
|
||||
key="audit"
|
||||
>
|
||||
<JobAuditTrail jobId={job.id} />
|
||||
</Tabs.TabPane>
|
||||
</Tabs>
|
||||
</Form>
|
||||
</div>
|
||||
|
||||
@@ -53,3 +53,8 @@ export const setOnline = (isOnline) => ({
|
||||
type: ApplicationActionTypes.SET_ONLINE_STATUS,
|
||||
payload: isOnline,
|
||||
});
|
||||
|
||||
export const insertAuditTrail = ({ jobid, billid, operation }) => ({
|
||||
type: ApplicationActionTypes.INSERT_AUDIT_TRAIL,
|
||||
payload: { jobid, billid, operation },
|
||||
});
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import moment from "moment";
|
||||
import { all, call, put, select, takeLatest } from "redux-saga/effects";
|
||||
import { QUERY_SCHEDULE_LOAD_DATA } from "../../graphql/appointments.queries";
|
||||
import { INSERT_AUDIT_TRAIL } from "../../graphql/audit_trail.queries";
|
||||
import client from "../../utils/GraphQLClient";
|
||||
import { CalculateLoad, CheckJobBucket } from "../../utils/SSSUtils";
|
||||
import {
|
||||
@@ -125,6 +126,56 @@ export function* calculateScheduleLoad({ payload: end }) {
|
||||
}
|
||||
}
|
||||
|
||||
export function* applicationSagas() {
|
||||
yield all([call(onCalculateScheduleLoad)]);
|
||||
export function* onInsertAuditTrail() {
|
||||
yield takeLatest(
|
||||
ApplicationActionTypes.INSERT_AUDIT_TRAIL,
|
||||
insertAuditTrailSaga
|
||||
);
|
||||
}
|
||||
|
||||
export function* insertAuditTrailSaga({
|
||||
payload: { jobid, billid, operation },
|
||||
}) {
|
||||
const state = yield select();
|
||||
const bodyshop = state.user.bodyshop;
|
||||
const currentUser = state.user.currentUser;
|
||||
console.log(
|
||||
"Inserting audit trail for",
|
||||
bodyshop.shopname,
|
||||
currentUser.email,
|
||||
jobid,
|
||||
billid,
|
||||
operation
|
||||
);
|
||||
const variables = {
|
||||
auditObj: {
|
||||
bodyshopid: bodyshop.id,
|
||||
jobid,
|
||||
billid,
|
||||
operation,
|
||||
useremail: currentUser.email,
|
||||
},
|
||||
};
|
||||
yield client.mutate({
|
||||
mutation: INSERT_AUDIT_TRAIL,
|
||||
variables,
|
||||
update(cache, { data }) {
|
||||
cache.modify({
|
||||
fields: {
|
||||
audit_trail(existingAuditTrail, { readField }) {
|
||||
const newAuditTrail = cache.writeQuery({
|
||||
data: data.insert_audit_trail_one,
|
||||
query: INSERT_AUDIT_TRAIL,
|
||||
variables,
|
||||
});
|
||||
return [...existingAuditTrail, newAuditTrail];
|
||||
},
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export function* applicationSagas() {
|
||||
yield all([call(onCalculateScheduleLoad), call(onInsertAuditTrail)]);
|
||||
}
|
||||
|
||||
@@ -10,5 +10,6 @@ const ApplicationActionTypes = {
|
||||
SET_JOB_READONLY: "SET_JOB_READONLY",
|
||||
SET_PARTNER_VERSION: "SET_PARTNER_VERSION",
|
||||
SET_ONLINE_STATUS: "SET_ONLINE_STATUS",
|
||||
INSERT_AUDIT_TRAIL: "INSERT_AUDIT_TRAIL",
|
||||
};
|
||||
export default ApplicationActionTypes;
|
||||
|
||||
@@ -39,7 +39,7 @@ export function* openChatByPhone({ payload }) {
|
||||
data: { conversations },
|
||||
} = yield client.query({
|
||||
query: CONVERSATION_ID_BY_PHONE,
|
||||
variables: { phone: phone(phone_num)[0] },
|
||||
variables: { phone: phone(phone_num).phoneNumber },
|
||||
fetchPolicy: "network-only",
|
||||
});
|
||||
|
||||
@@ -53,7 +53,7 @@ export function* openChatByPhone({ payload }) {
|
||||
variables: {
|
||||
conversation: [
|
||||
{
|
||||
phone_num: phone(phone_num)[0],
|
||||
phone_num: phone(phone_num).phoneNumber,
|
||||
bodyshopid: bodyshop.id,
|
||||
job_conversations: jobid ? { data: { jobid: jobid } } : null,
|
||||
},
|
||||
|
||||
@@ -100,8 +100,12 @@ export function* onUpdateUserDetails() {
|
||||
}
|
||||
export function* updateUserDetails(userDetails) {
|
||||
try {
|
||||
yield updateCurrentUser(userDetails.payload);
|
||||
yield put(updateUserDetailsSuccess(userDetails.payload));
|
||||
const updatedDetails = yield updateCurrentUser(userDetails.payload);
|
||||
console.log(
|
||||
"🚀 ~ file: user.sagas.js ~ line 104 ~ updatedDetails",
|
||||
updatedDetails
|
||||
);
|
||||
yield put(updateUserDetailsSuccess(updatedDetails));
|
||||
notification.open({
|
||||
type: "success",
|
||||
message: i18next.t("profile.successes.updated"),
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"fields": {
|
||||
"alt_transport": "Alt. Trans.",
|
||||
"color": "Appointment Color",
|
||||
"note": "Appt. Note",
|
||||
"time": "Appointment Time",
|
||||
"title": "Title"
|
||||
},
|
||||
@@ -82,6 +83,24 @@
|
||||
"values": "Values"
|
||||
}
|
||||
},
|
||||
"audit_trail": {
|
||||
"messages": {
|
||||
"billposted": "Bill with invoice number {{invoice_number}} posted.",
|
||||
"billupdated": "Bill with invoice number {{invoice_number}} updated.",
|
||||
"jobassignmentchange": "Employee {{name}} assigned to {{operation}}",
|
||||
"jobassignmentremoved": "Employee assignment removed for {{operation}}",
|
||||
"jobchecklist": "Checklist type \"{{type}}\" completed. In production set to {{inproduction}}. Status set to {{status}}.",
|
||||
"jobconverted": "Job converted and assigned number {{ro_number}}.",
|
||||
"jobfieldchanged": "Job field $t(jobs.fields.{{field}}) changed to {{value}}.",
|
||||
"jobimported": "Job imported.",
|
||||
"jobinproductionchange": "Job production status set to {{inproduction}}",
|
||||
"jobmodifylbradj": "Labor adjustments modified.",
|
||||
"jobspartsorder": "Parts order {{order_number}} added to job.",
|
||||
"jobspartsreturn": "Parts return {{order_number}} added to job.",
|
||||
"jobstatuschange": "Job status changed to {{status}}.",
|
||||
"jobsupplement": "Job supplement imported."
|
||||
}
|
||||
},
|
||||
"billlines": {
|
||||
"actions": {
|
||||
"newline": "New Line"
|
||||
@@ -857,6 +876,7 @@
|
||||
"message": "Message",
|
||||
"monday": "Monday",
|
||||
"na": "N/A",
|
||||
"newpassword": "New Password",
|
||||
"no": "No",
|
||||
"nointernet": "It looks like you're not connected to the internet.",
|
||||
"nointernet_sub": "Please check your connection and try again. ",
|
||||
@@ -1227,6 +1247,7 @@
|
||||
"servicecar": "Service Car",
|
||||
"servicing_dealer": "Servicing Dealer",
|
||||
"servicing_dealer_contact": "Servicing Dealer Contact",
|
||||
"special_coverage_policy": "Special Coverage Policy",
|
||||
"specialcoveragepolicy": "Special Coverage Policy",
|
||||
"state_tax_rate": "Provincial/State Tax Rate",
|
||||
"status": "Job Status",
|
||||
@@ -1953,12 +1974,15 @@
|
||||
"bills": "Bills",
|
||||
"exportlogs": "Export Logs",
|
||||
"jobs": "Jobs",
|
||||
"parts_orders": "Parts Orders",
|
||||
"payments": "Payments",
|
||||
"scoreboard": "Scoreboard",
|
||||
"timetickets": "Timetickets"
|
||||
},
|
||||
"vendor": "Vendor"
|
||||
},
|
||||
"templates": {
|
||||
"anticipated_revenue": "Anticipated Revenue",
|
||||
"attendance_detail": "Attendance (All Employees)",
|
||||
"attendance_employee": "Employee Attendance",
|
||||
"attendance_summary": "Attendance Summary (All Employees)",
|
||||
@@ -1994,11 +2018,13 @@
|
||||
"job_costing_ro_date_summary": "Job Costing by RO - Summary",
|
||||
"job_costing_ro_estimator": "Job Costing by Estimator",
|
||||
"job_costing_ro_ins_co": "Job Costing by RO Source",
|
||||
"lag_time": "Lag Time",
|
||||
"open_orders": "Open Orders by Date",
|
||||
"open_orders_csr": "Open Orders by CSR",
|
||||
"open_orders_estimator": "Open Orders by Estimator",
|
||||
"open_orders_ins_co": "Open Orders by Insurance Company",
|
||||
"parts_backorder": "Backordered Parts",
|
||||
"parts_not_recieved": "Parts Not Received",
|
||||
"payments_by_date": "Payments by Date",
|
||||
"payments_by_date_type": "Payments by Date and Type",
|
||||
"production_by_csr": "Production by CSR",
|
||||
@@ -2015,6 +2041,8 @@
|
||||
"purchases_grouped_by_vendor_detailed": "Purchases Grouped by Vendor - Detailed",
|
||||
"purchases_grouped_by_vendor_summary": "Purchases Grouped by Vendor - Summary",
|
||||
"schedule": "Appointment Schedule",
|
||||
"scoreboard_detail": "Scoreboard Detail",
|
||||
"scoreboard_summary": "Scoreboard Summary",
|
||||
"supplement_ratio_ins_co": "Supplement Ratio by Source",
|
||||
"thank_you_date": "Thank You Letters",
|
||||
"timetickets": "Time Tickets",
|
||||
@@ -2221,6 +2249,7 @@
|
||||
},
|
||||
"user": {
|
||||
"actions": {
|
||||
"changepassword": "Change Password",
|
||||
"signout": "Sign Out",
|
||||
"updateprofile": "Update Profile"
|
||||
},
|
||||
@@ -2235,6 +2264,9 @@
|
||||
},
|
||||
"labels": {
|
||||
"actions": "Actions"
|
||||
},
|
||||
"successess": {
|
||||
"passwordchanged": "Password changed successfully. "
|
||||
}
|
||||
},
|
||||
"vehicles": {
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"fields": {
|
||||
"alt_transport": "",
|
||||
"color": "",
|
||||
"note": "",
|
||||
"time": "",
|
||||
"title": "Título"
|
||||
},
|
||||
@@ -82,6 +83,24 @@
|
||||
"values": ""
|
||||
}
|
||||
},
|
||||
"audit_trail": {
|
||||
"messages": {
|
||||
"billposted": "",
|
||||
"billupdated": "",
|
||||
"jobassignmentchange": "",
|
||||
"jobassignmentremoved": "",
|
||||
"jobchecklist": "",
|
||||
"jobconverted": "",
|
||||
"jobfieldchanged": "",
|
||||
"jobimported": "",
|
||||
"jobinproductionchange": "",
|
||||
"jobmodifylbradj": "",
|
||||
"jobspartsorder": "",
|
||||
"jobspartsreturn": "",
|
||||
"jobstatuschange": "",
|
||||
"jobsupplement": ""
|
||||
}
|
||||
},
|
||||
"billlines": {
|
||||
"actions": {
|
||||
"newline": ""
|
||||
@@ -857,6 +876,7 @@
|
||||
"message": "",
|
||||
"monday": "",
|
||||
"na": "N / A",
|
||||
"newpassword": "",
|
||||
"no": "",
|
||||
"nointernet": "",
|
||||
"nointernet_sub": "",
|
||||
@@ -1227,6 +1247,7 @@
|
||||
"servicecar": "Auto de servicio",
|
||||
"servicing_dealer": "Distribuidor de servicio",
|
||||
"servicing_dealer_contact": "Servicio Contacto con el concesionario",
|
||||
"special_coverage_policy": "Política de cobertura especial",
|
||||
"specialcoveragepolicy": "Política de cobertura especial",
|
||||
"state_tax_rate": "",
|
||||
"status": "Estado del trabajo",
|
||||
@@ -1953,12 +1974,15 @@
|
||||
"bills": "",
|
||||
"exportlogs": "",
|
||||
"jobs": "",
|
||||
"parts_orders": "",
|
||||
"payments": "",
|
||||
"scoreboard": "",
|
||||
"timetickets": ""
|
||||
},
|
||||
"vendor": ""
|
||||
},
|
||||
"templates": {
|
||||
"anticipated_revenue": "",
|
||||
"attendance_detail": "",
|
||||
"attendance_employee": "",
|
||||
"attendance_summary": "",
|
||||
@@ -1994,11 +2018,13 @@
|
||||
"job_costing_ro_date_summary": "",
|
||||
"job_costing_ro_estimator": "",
|
||||
"job_costing_ro_ins_co": "",
|
||||
"lag_time": "",
|
||||
"open_orders": "",
|
||||
"open_orders_csr": "",
|
||||
"open_orders_estimator": "",
|
||||
"open_orders_ins_co": "",
|
||||
"parts_backorder": "",
|
||||
"parts_not_recieved": "",
|
||||
"payments_by_date": "",
|
||||
"payments_by_date_type": "",
|
||||
"production_by_csr": "",
|
||||
@@ -2015,6 +2041,8 @@
|
||||
"purchases_grouped_by_vendor_detailed": "",
|
||||
"purchases_grouped_by_vendor_summary": "",
|
||||
"schedule": "",
|
||||
"scoreboard_detail": "",
|
||||
"scoreboard_summary": "",
|
||||
"supplement_ratio_ins_co": "",
|
||||
"thank_you_date": "",
|
||||
"timetickets": "",
|
||||
@@ -2221,6 +2249,7 @@
|
||||
},
|
||||
"user": {
|
||||
"actions": {
|
||||
"changepassword": "",
|
||||
"signout": "desconectar",
|
||||
"updateprofile": "Actualización del perfil"
|
||||
},
|
||||
@@ -2235,6 +2264,9 @@
|
||||
},
|
||||
"labels": {
|
||||
"actions": ""
|
||||
},
|
||||
"successess": {
|
||||
"passwordchanged": ""
|
||||
}
|
||||
},
|
||||
"vehicles": {
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"fields": {
|
||||
"alt_transport": "",
|
||||
"color": "",
|
||||
"note": "",
|
||||
"time": "",
|
||||
"title": "Titre"
|
||||
},
|
||||
@@ -82,6 +83,24 @@
|
||||
"values": ""
|
||||
}
|
||||
},
|
||||
"audit_trail": {
|
||||
"messages": {
|
||||
"billposted": "",
|
||||
"billupdated": "",
|
||||
"jobassignmentchange": "",
|
||||
"jobassignmentremoved": "",
|
||||
"jobchecklist": "",
|
||||
"jobconverted": "",
|
||||
"jobfieldchanged": "",
|
||||
"jobimported": "",
|
||||
"jobinproductionchange": "",
|
||||
"jobmodifylbradj": "",
|
||||
"jobspartsorder": "",
|
||||
"jobspartsreturn": "",
|
||||
"jobstatuschange": "",
|
||||
"jobsupplement": ""
|
||||
}
|
||||
},
|
||||
"billlines": {
|
||||
"actions": {
|
||||
"newline": ""
|
||||
@@ -857,6 +876,7 @@
|
||||
"message": "",
|
||||
"monday": "",
|
||||
"na": "N / A",
|
||||
"newpassword": "",
|
||||
"no": "",
|
||||
"nointernet": "",
|
||||
"nointernet_sub": "",
|
||||
@@ -1227,6 +1247,7 @@
|
||||
"servicecar": "Voiture de service",
|
||||
"servicing_dealer": "Concessionnaire",
|
||||
"servicing_dealer_contact": "Contacter le concessionnaire",
|
||||
"special_coverage_policy": "Politique de couverture spéciale",
|
||||
"specialcoveragepolicy": "Politique de couverture spéciale",
|
||||
"state_tax_rate": "",
|
||||
"status": "Statut de l'emploi",
|
||||
@@ -1953,12 +1974,15 @@
|
||||
"bills": "",
|
||||
"exportlogs": "",
|
||||
"jobs": "",
|
||||
"parts_orders": "",
|
||||
"payments": "",
|
||||
"scoreboard": "",
|
||||
"timetickets": ""
|
||||
},
|
||||
"vendor": ""
|
||||
},
|
||||
"templates": {
|
||||
"anticipated_revenue": "",
|
||||
"attendance_detail": "",
|
||||
"attendance_employee": "",
|
||||
"attendance_summary": "",
|
||||
@@ -1994,11 +2018,13 @@
|
||||
"job_costing_ro_date_summary": "",
|
||||
"job_costing_ro_estimator": "",
|
||||
"job_costing_ro_ins_co": "",
|
||||
"lag_time": "",
|
||||
"open_orders": "",
|
||||
"open_orders_csr": "",
|
||||
"open_orders_estimator": "",
|
||||
"open_orders_ins_co": "",
|
||||
"parts_backorder": "",
|
||||
"parts_not_recieved": "",
|
||||
"payments_by_date": "",
|
||||
"payments_by_date_type": "",
|
||||
"production_by_csr": "",
|
||||
@@ -2015,6 +2041,8 @@
|
||||
"purchases_grouped_by_vendor_detailed": "",
|
||||
"purchases_grouped_by_vendor_summary": "",
|
||||
"schedule": "",
|
||||
"scoreboard_detail": "",
|
||||
"scoreboard_summary": "",
|
||||
"supplement_ratio_ins_co": "",
|
||||
"thank_you_date": "",
|
||||
"timetickets": "",
|
||||
@@ -2221,6 +2249,7 @@
|
||||
},
|
||||
"user": {
|
||||
"actions": {
|
||||
"changepassword": "",
|
||||
"signout": "Déconnexion",
|
||||
"updateprofile": "Mettre à jour le profil"
|
||||
},
|
||||
@@ -2235,6 +2264,9 @@
|
||||
},
|
||||
"labels": {
|
||||
"actions": ""
|
||||
},
|
||||
"successess": {
|
||||
"passwordchanged": ""
|
||||
}
|
||||
},
|
||||
"vehicles": {
|
||||
|
||||
31
client/src/utils/AuditTrailMappings.js
Normal file
31
client/src/utils/AuditTrailMappings.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import i18n from "i18next";
|
||||
|
||||
const AuditTrailMapping = {
|
||||
jobstatuschange: (status) =>
|
||||
i18n.t("audit_trail.messages.jobstatuschange", { status }),
|
||||
jobsupplement: () => i18n.t("audit_trail.messages.jobsupplement"),
|
||||
jobimported: () => i18n.t("audit_trail.messages.jobimported"),
|
||||
jobconverted: (ro_number) =>
|
||||
i18n.t("audit_trail.messages.jobconverted", { ro_number }),
|
||||
jobfieldchange: (field, value) =>
|
||||
i18n.t("audit_trail.messages.jobfieldchanged", { field, value }),
|
||||
jobspartsorder: (order_number) =>
|
||||
i18n.t("audit_trail.messages.jobspartsorder", { order_number }),
|
||||
jobspartsreturn: (order_number) =>
|
||||
i18n.t("audit_trail.messages.jobspartsreturn", { order_number }),
|
||||
jobmodifylbradj: () => i18n.t("audit_trail.messages.jobmodifylbradj", {}),
|
||||
billposted: (invoice_number) =>
|
||||
i18n.t("audit_trail.messages.billposted", { invoice_number }),
|
||||
billupdated: (invoice_number) =>
|
||||
i18n.t("audit_trail.messages.billupdated", { invoice_number }),
|
||||
jobassignmentchange: (operation, name) =>
|
||||
i18n.t("audit_trail.messages.jobassignmentchange", { operation, name }),
|
||||
jobassignmentremoved: (operation) =>
|
||||
i18n.t("audit_trail.messages.jobassignmentremoved", { operation }),
|
||||
jobinproductionchange: (inproduction) =>
|
||||
i18n.t("audit_trail.messages.jobinproductionchange", { inproduction }),
|
||||
jobchecklist: (type, inproduction, status) =>
|
||||
i18n.t("audit_trail.messages.jobchecklist", { type, inproduction, status }),
|
||||
};
|
||||
|
||||
export default AuditTrailMapping;
|
||||
@@ -1190,6 +1190,66 @@ export const TemplateList = (type, context) => {
|
||||
field: i18n.t("jobs.fields.date_open"),
|
||||
},
|
||||
},
|
||||
lag_time: {
|
||||
title: i18n.t("reportcenter.templates.lag_time"),
|
||||
description: "",
|
||||
subject: i18n.t("reportcenter.templates.lag_time"),
|
||||
key: "lag_time",
|
||||
//idtype: "vendor",
|
||||
disabled: false,
|
||||
rangeFilter: {
|
||||
object: i18n.t("reportcenter.labels.objects.jobs"),
|
||||
field: i18n.t("jobs.fields.date_invoiced"),
|
||||
},
|
||||
},
|
||||
parts_not_recieved: {
|
||||
title: i18n.t("reportcenter.templates.parts_not_recieved"),
|
||||
description: "",
|
||||
subject: i18n.t("reportcenter.templates.parts_not_recieved"),
|
||||
key: "parts_not_recieved",
|
||||
//idtype: "vendor",
|
||||
disabled: false,
|
||||
rangeFilter: {
|
||||
object: i18n.t("reportcenter.labels.objects.parts_orders"),
|
||||
field: i18n.t("parts_orders.fields.order_date"),
|
||||
},
|
||||
},
|
||||
scoreboard_detail: {
|
||||
title: i18n.t("reportcenter.templates.scoreboard_detail"),
|
||||
description: "",
|
||||
subject: i18n.t("reportcenter.templates.scoreboard_detail"),
|
||||
key: "scoreboard_detail",
|
||||
//idtype: "vendor",
|
||||
disabled: false,
|
||||
rangeFilter: {
|
||||
object: i18n.t("reportcenter.labels.objects.scoreboard"),
|
||||
field: i18n.t("scoreboard.fields.date"),
|
||||
},
|
||||
},
|
||||
scoreboard_summary: {
|
||||
title: i18n.t("reportcenter.templates.scoreboard_summary"),
|
||||
description: "",
|
||||
subject: i18n.t("reportcenter.templates.scoreboard_summary"),
|
||||
key: "scoreboard_summary",
|
||||
//idtype: "vendor",
|
||||
disabled: false,
|
||||
rangeFilter: {
|
||||
object: i18n.t("reportcenter.labels.objects.scoreboard"),
|
||||
field: i18n.t("scoreboard.fields.date"),
|
||||
},
|
||||
},
|
||||
anticipated_revenue: {
|
||||
title: i18n.t("reportcenter.templates.anticipated_revenue"),
|
||||
description: "",
|
||||
subject: i18n.t("reportcenter.templates.anticipated_revenue"),
|
||||
key: "anticipated_revenue",
|
||||
//idtype: "vendor",
|
||||
disabled: false,
|
||||
rangeFilter: {
|
||||
object: i18n.t("reportcenter.labels.objects.jobs"),
|
||||
field: i18n.t("jobs.fields.scheduled_completion"), // Also date invoice.
|
||||
},
|
||||
},
|
||||
}
|
||||
: {}),
|
||||
...(!type || type === "courtesycarcontract"
|
||||
|
||||
724
client/yarn.lock
724
client/yarn.lock
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- id
|
||||
- new_val
|
||||
- old_val
|
||||
- operation
|
||||
- schemaname
|
||||
- tabname
|
||||
- useremail
|
||||
- created
|
||||
- bodyshopid
|
||||
- recordid
|
||||
computed_fields: []
|
||||
filter:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
role: user
|
||||
table:
|
||||
name: audit_trail
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: audit_trail
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
@@ -0,0 +1,10 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."audit_trail" ADD COLUMN "schemaname" text;
|
||||
type: run_sql
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."audit_trail" ALTER COLUMN "schemaname" DROP NOT NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."audit_trail" DROP COLUMN "schemaname" CASCADE;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,10 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."audit_trail" ADD COLUMN "tabname" text;
|
||||
type: run_sql
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."audit_trail" ALTER COLUMN "tabname" DROP NOT NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."audit_trail" DROP COLUMN "tabname" CASCADE;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,10 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."audit_trail" ADD COLUMN "recordid" uuid;
|
||||
type: run_sql
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."audit_trail" ALTER COLUMN "recordid" DROP NOT NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."audit_trail" DROP COLUMN "recordid" CASCADE;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."audit_trail" DROP COLUMN "jobid";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."audit_trail" ADD COLUMN "jobid" uuid NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."audit_trail" DROP COLUMN "billid";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."audit_trail" ADD COLUMN "billid" uuid NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: alter table "public"."audit_trail" drop constraint "audit_trail_billid_fkey";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,10 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: |-
|
||||
alter table "public"."audit_trail"
|
||||
add constraint "audit_trail_billid_fkey"
|
||||
foreign key ("billid")
|
||||
references "public"."bills"
|
||||
("id") on update cascade on delete cascade;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,12 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: |-
|
||||
alter table "public"."audit_trail" drop constraint "audit_trail_billid_fkey",
|
||||
add constraint "audit_trail_billid_fkey"
|
||||
foreign key ("billid")
|
||||
references "public"."bills"
|
||||
("id")
|
||||
on update cascade
|
||||
on delete cascade;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,10 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: |-
|
||||
alter table "public"."audit_trail" drop constraint "audit_trail_billid_fkey",
|
||||
add constraint "audit_trail_billid_fkey"
|
||||
foreign key ("billid")
|
||||
references "public"."bills"
|
||||
("id") on update cascade on delete set null;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,12 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: |-
|
||||
alter table "public"."audit_trail" drop constraint "audit_trail_billid_fkey",
|
||||
add constraint "audit_trail_billid_fkey"
|
||||
foreign key ("billid")
|
||||
references "public"."bills"
|
||||
("id")
|
||||
on update cascade
|
||||
on delete set null;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,10 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: |-
|
||||
alter table "public"."audit_trail" drop constraint "audit_trail_billid_fkey",
|
||||
add constraint "audit_trail_billid_fkey"
|
||||
foreign key ("billid")
|
||||
references "public"."bills"
|
||||
("id") on update cascade on delete set null;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: alter table "public"."audit_trail" drop constraint "audit_trail_jobid_fkey";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,10 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: |-
|
||||
alter table "public"."audit_trail"
|
||||
add constraint "audit_trail_jobid_fkey"
|
||||
foreign key ("jobid")
|
||||
references "public"."jobs"
|
||||
("id") on update cascade on delete set null;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,12 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: |-
|
||||
alter table "public"."audit_trail" drop constraint "audit_trail_useremail_fkey",
|
||||
add constraint "audit_trail_useremail_fkey"
|
||||
foreign key ("useremail")
|
||||
references "public"."users"
|
||||
("email")
|
||||
on update restrict
|
||||
on delete restrict;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,10 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: |-
|
||||
alter table "public"."audit_trail" drop constraint "audit_trail_useremail_fkey",
|
||||
add constraint "audit_trail_useremail_fkey"
|
||||
foreign key ("useremail")
|
||||
references "public"."users"
|
||||
("email") on update cascade on delete set null;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,24 @@
|
||||
- args:
|
||||
relationship: audit_trails
|
||||
table:
|
||||
name: jobs
|
||||
schema: public
|
||||
type: drop_relationship
|
||||
- args:
|
||||
relationship: audit_trails
|
||||
table:
|
||||
name: bills
|
||||
schema: public
|
||||
type: drop_relationship
|
||||
- args:
|
||||
relationship: job
|
||||
table:
|
||||
name: audit_trail
|
||||
schema: public
|
||||
type: drop_relationship
|
||||
- args:
|
||||
relationship: bill
|
||||
table:
|
||||
name: audit_trail
|
||||
schema: public
|
||||
type: drop_relationship
|
||||
@@ -0,0 +1,40 @@
|
||||
- args:
|
||||
name: audit_trails
|
||||
table:
|
||||
name: jobs
|
||||
schema: public
|
||||
using:
|
||||
foreign_key_constraint_on:
|
||||
column: jobid
|
||||
table:
|
||||
name: audit_trail
|
||||
schema: public
|
||||
type: create_array_relationship
|
||||
- args:
|
||||
name: audit_trails
|
||||
table:
|
||||
name: bills
|
||||
schema: public
|
||||
using:
|
||||
foreign_key_constraint_on:
|
||||
column: billid
|
||||
table:
|
||||
name: audit_trail
|
||||
schema: public
|
||||
type: create_array_relationship
|
||||
- args:
|
||||
name: job
|
||||
table:
|
||||
name: audit_trail
|
||||
schema: public
|
||||
using:
|
||||
foreign_key_constraint_on: jobid
|
||||
type: create_object_relationship
|
||||
- args:
|
||||
name: bill
|
||||
table:
|
||||
name: audit_trail
|
||||
schema: public
|
||||
using:
|
||||
foreign_key_constraint_on: billid
|
||||
type: create_object_relationship
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: audit_trail
|
||||
schema: public
|
||||
type: drop_insert_permission
|
||||
@@ -0,0 +1,29 @@
|
||||
- args:
|
||||
permission:
|
||||
allow_upsert: true
|
||||
backend_only: false
|
||||
check:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
columns:
|
||||
- id
|
||||
- created
|
||||
- operation
|
||||
- new_val
|
||||
- old_val
|
||||
- useremail
|
||||
- bodyshopid
|
||||
- jobid
|
||||
- billid
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: audit_trail
|
||||
schema: public
|
||||
type: create_insert_permission
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: audit_trail
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
@@ -0,0 +1,30 @@
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
backend_only: false
|
||||
columns:
|
||||
- id
|
||||
- new_val
|
||||
- old_val
|
||||
- operation
|
||||
- useremail
|
||||
- created
|
||||
- billid
|
||||
- bodyshopid
|
||||
- jobid
|
||||
computed_fields: []
|
||||
filter:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
limit: null
|
||||
role: user
|
||||
table:
|
||||
name: audit_trail
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."appointments" DROP COLUMN "note";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."appointments" ADD COLUMN "note" text NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,37 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: drop_insert_permission
|
||||
- args:
|
||||
permission:
|
||||
check:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
columns:
|
||||
- arrived
|
||||
- block
|
||||
- bodyshopid
|
||||
- canceled
|
||||
- color
|
||||
- created_at
|
||||
- end
|
||||
- id
|
||||
- isintake
|
||||
- jobid
|
||||
- start
|
||||
- title
|
||||
- updated_at
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: create_insert_permission
|
||||
@@ -0,0 +1,38 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: drop_insert_permission
|
||||
- args:
|
||||
permission:
|
||||
check:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
columns:
|
||||
- arrived
|
||||
- block
|
||||
- bodyshopid
|
||||
- canceled
|
||||
- color
|
||||
- created_at
|
||||
- end
|
||||
- id
|
||||
- isintake
|
||||
- jobid
|
||||
- note
|
||||
- start
|
||||
- title
|
||||
- updated_at
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: create_insert_permission
|
||||
@@ -0,0 +1,38 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: true
|
||||
columns:
|
||||
- arrived
|
||||
- block
|
||||
- bodyshopid
|
||||
- canceled
|
||||
- color
|
||||
- created_at
|
||||
- end
|
||||
- id
|
||||
- isintake
|
||||
- jobid
|
||||
- start
|
||||
- title
|
||||
- updated_at
|
||||
computed_fields: []
|
||||
filter:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,39 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: true
|
||||
columns:
|
||||
- arrived
|
||||
- block
|
||||
- bodyshopid
|
||||
- canceled
|
||||
- color
|
||||
- created_at
|
||||
- end
|
||||
- id
|
||||
- isintake
|
||||
- jobid
|
||||
- note
|
||||
- start
|
||||
- title
|
||||
- updated_at
|
||||
computed_fields: []
|
||||
filter:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,37 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- arrived
|
||||
- block
|
||||
- bodyshopid
|
||||
- canceled
|
||||
- color
|
||||
- created_at
|
||||
- end
|
||||
- id
|
||||
- isintake
|
||||
- jobid
|
||||
- start
|
||||
- title
|
||||
- updated_at
|
||||
filter:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,38 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- arrived
|
||||
- block
|
||||
- bodyshopid
|
||||
- canceled
|
||||
- color
|
||||
- created_at
|
||||
- end
|
||||
- id
|
||||
- isintake
|
||||
- jobid
|
||||
- note
|
||||
- start
|
||||
- title
|
||||
- updated_at
|
||||
filter:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: appointments
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."audit_trail" ALTER COLUMN "created" TYPE timestamp
|
||||
without time zone;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."audit_trail" ALTER COLUMN "created" TYPE timestamptz;
|
||||
type: run_sql
|
||||
@@ -115,6 +115,7 @@ tables:
|
||||
- id
|
||||
- isintake
|
||||
- jobid
|
||||
- note
|
||||
- start
|
||||
- title
|
||||
- updated_at
|
||||
@@ -132,6 +133,7 @@ tables:
|
||||
- id
|
||||
- isintake
|
||||
- jobid
|
||||
- note
|
||||
- start
|
||||
- title
|
||||
- updated_at
|
||||
@@ -159,6 +161,7 @@ tables:
|
||||
- id
|
||||
- isintake
|
||||
- jobid
|
||||
- note
|
||||
- start
|
||||
- title
|
||||
- updated_at
|
||||
@@ -226,12 +229,41 @@ tables:
|
||||
schema: public
|
||||
name: audit_trail
|
||||
object_relationships:
|
||||
- name: bill
|
||||
using:
|
||||
foreign_key_constraint_on: billid
|
||||
- name: bodyshop
|
||||
using:
|
||||
foreign_key_constraint_on: bodyshopid
|
||||
- name: job
|
||||
using:
|
||||
foreign_key_constraint_on: jobid
|
||||
- name: user
|
||||
using:
|
||||
foreign_key_constraint_on: useremail
|
||||
insert_permissions:
|
||||
- role: user
|
||||
permission:
|
||||
check:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
columns:
|
||||
- id
|
||||
- created
|
||||
- operation
|
||||
- new_val
|
||||
- old_val
|
||||
- useremail
|
||||
- bodyshopid
|
||||
- jobid
|
||||
- billid
|
||||
backend_only: false
|
||||
select_permissions:
|
||||
- role: user
|
||||
permission:
|
||||
@@ -240,12 +272,11 @@ tables:
|
||||
- new_val
|
||||
- old_val
|
||||
- operation
|
||||
- schemaname
|
||||
- tabname
|
||||
- useremail
|
||||
- created
|
||||
- billid
|
||||
- bodyshopid
|
||||
- recordid
|
||||
- jobid
|
||||
filter:
|
||||
bodyshop:
|
||||
associations:
|
||||
@@ -480,6 +511,13 @@ tables:
|
||||
using:
|
||||
foreign_key_constraint_on: vendorid
|
||||
array_relationships:
|
||||
- name: audit_trails
|
||||
using:
|
||||
foreign_key_constraint_on:
|
||||
column: billid
|
||||
table:
|
||||
schema: public
|
||||
name: audit_trail
|
||||
- name: billlines
|
||||
using:
|
||||
foreign_key_constraint_on:
|
||||
@@ -2248,6 +2286,13 @@ tables:
|
||||
table:
|
||||
schema: public
|
||||
name: appointments
|
||||
- name: audit_trails
|
||||
using:
|
||||
foreign_key_constraint_on:
|
||||
column: jobid
|
||||
table:
|
||||
schema: public
|
||||
name: audit_trail
|
||||
- name: available_jobs
|
||||
using:
|
||||
foreign_key_constraint_on:
|
||||
|
||||
4781
package-lock.json
generated
4781
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
34
package.json
34
package.json
@@ -17,37 +17,37 @@
|
||||
"start": "node server.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"aws-sdk": "^2.906.0",
|
||||
"aws-sdk": "^2.951.0",
|
||||
"body-parser": "^1.18.3",
|
||||
"cloudinary": "^1.25.0",
|
||||
"cloudinary": "^1.26.2",
|
||||
"compression": "^1.7.4",
|
||||
"cors": "2.8.5",
|
||||
"csrf": "^3.1.0",
|
||||
"dinero.js": "^1.8.1",
|
||||
"dotenv": "9.0.2",
|
||||
"dinero.js": "^1.9.0",
|
||||
"dotenv": "10.0.0",
|
||||
"express": "^4.16.4",
|
||||
"firebase-admin": "^9.8.0",
|
||||
"graphql": "^15.5.0",
|
||||
"firebase-admin": "^9.11.0",
|
||||
"graphql": "^15.5.1",
|
||||
"graphql-request": "^3.4.0",
|
||||
"inline-css": "^3.0.0",
|
||||
"intuit-oauth": "^3.0.2",
|
||||
"intuit-oauth": "^4.0.0",
|
||||
"lodash": "^4.17.21",
|
||||
"moment": "^2.29.1",
|
||||
"node-fetch": "^2.6.1",
|
||||
"node-mailjet": "^3.3.1",
|
||||
"nodemailer": "^6.6.0",
|
||||
"phone": "^2.4.20",
|
||||
"soap": "^0.39.0",
|
||||
"socket.io": "^4.1.2",
|
||||
"node-mailjet": "^3.3.4",
|
||||
"nodemailer": "^6.6.3",
|
||||
"phone": "^3.1.2",
|
||||
"soap": "^0.40.0",
|
||||
"socket.io": "^4.1.3",
|
||||
"ssh2-sftp-client": "^7.0.0",
|
||||
"stripe": "^8.148.0",
|
||||
"twilio": "^3.62.0",
|
||||
"stripe": "^8.164.0",
|
||||
"twilio": "^3.66.0",
|
||||
"xmlbuilder2": "^2.4.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "^6.0.2",
|
||||
"eslint": "^7.24.0",
|
||||
"eslint-plugin-promise": "^4.3.1",
|
||||
"concurrently": "^6.2.0",
|
||||
"eslint": "^7.31.0",
|
||||
"eslint-plugin-promise": "^5.1.0",
|
||||
"source-map-explorer": "^2.5.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,6 +117,7 @@ app.post(
|
||||
fb.validateFirebaseIdToken,
|
||||
fb.sendNotification
|
||||
);
|
||||
app.post("/adm/updateuser", fb.validateFirebaseIdToken, fb.updateUser);
|
||||
|
||||
//Stripe Processing
|
||||
var stripe = require("./server/stripe/payment");
|
||||
|
||||
@@ -25,7 +25,10 @@ const ftpSetup = {
|
||||
port: process.env.AUTOHOUSE_PORT,
|
||||
username: process.env.AUTOHOUSE_USER,
|
||||
password: process.env.AUTOHOUSE_PASSWORD,
|
||||
//debug: console.log,
|
||||
debug: console.log,
|
||||
algorithms: {
|
||||
serverHostKey: ["ssh-rsa", "ssh-dss"],
|
||||
},
|
||||
};
|
||||
|
||||
exports.default = async (req, res) => {
|
||||
@@ -127,7 +130,7 @@ exports.default = async (req, res) => {
|
||||
|
||||
res.sendStatus(200);
|
||||
} catch (error) {
|
||||
res.JSON(error).sendStatus(500);
|
||||
res.status(200).json(error);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -17,6 +17,46 @@ admin.initializeApp({
|
||||
|
||||
exports.admin = admin;
|
||||
|
||||
const adminEmail = [
|
||||
"patrick@imex.dev",
|
||||
"patrick@imex.text",
|
||||
"patrick@imex.prod",
|
||||
"patrick@imexsystems.ca",
|
||||
"patrick@thinkimex.com",
|
||||
];
|
||||
|
||||
exports.updateUser = (req, res) => {
|
||||
console.log("USer Requesting", req.user);
|
||||
if (!adminEmail.includes(req.user.email)) {
|
||||
res.sendStatus(404);
|
||||
}
|
||||
|
||||
admin
|
||||
.auth()
|
||||
.updateUser(
|
||||
req.body.uid,
|
||||
req.body.user
|
||||
// {
|
||||
// email: "modifiedUser@example.com",
|
||||
// phoneNumber: "+11234567890",
|
||||
// emailVerified: true,
|
||||
// password: "newPassword",
|
||||
// displayName: "Jane Doe",
|
||||
// photoURL: "http://www.example.com/12345678/photo.png",
|
||||
// disabled: true,
|
||||
// }
|
||||
)
|
||||
.then((userRecord) => {
|
||||
// See the UserRecord reference doc for the contents of userRecord.
|
||||
console.log("Successfully updated user", userRecord.toJSON());
|
||||
res.json(userRecord);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("Error updating user:", error);
|
||||
res.status(500).json(error);
|
||||
});
|
||||
};
|
||||
|
||||
exports.sendNotification = (req, res) => {
|
||||
var registrationToken =
|
||||
"fqIWg8ENDFyrRrMWJ1sItR:APA91bHirdZ05Zo66flMlvala97SMXoiQGwP4oCvMwd-vVrSauD_WoNim3kXHGqyP-bzENjkXwA5icyUAReFbeHn6dIaPcbpcsXuY73-eJAXvZiu1gIsrd1BOsnj3dEMT7Q4F6mTPth1";
|
||||
|
||||
@@ -8,7 +8,7 @@ require("dotenv").config({
|
||||
|
||||
const client = require("../graphql-client/graphql-client").client;
|
||||
const queries = require("../graphql-client/queries");
|
||||
const phone = require("phone");
|
||||
const { phone } = require("phone");
|
||||
const admin = require("../firebase/firebase-handler").admin;
|
||||
|
||||
exports.receive = (req, res) => {
|
||||
@@ -26,7 +26,7 @@ exports.receive = (req, res) => {
|
||||
client
|
||||
.request(queries.FIND_BODYSHOP_BY_MESSAGING_SERVICE_SID, {
|
||||
mssid: req.body.MessagingServiceSid,
|
||||
phone: phone(req.body.From)[0],
|
||||
phone: phone(req.body.From).phoneNumber,
|
||||
})
|
||||
.then((response) => {
|
||||
console.log("re", req.body);
|
||||
@@ -45,7 +45,7 @@ exports.receive = (req, res) => {
|
||||
newMessage.conversation = {
|
||||
data: {
|
||||
bodyshopid: response.bodyshops[0].id,
|
||||
phone_num: phone(req.body.From)[0],
|
||||
phone_num: phone(req.body.From).phoneNumber,
|
||||
},
|
||||
};
|
||||
} else if (response.bodyshops[0].conversations.length === 1) {
|
||||
@@ -80,13 +80,13 @@ exports.receive = (req, res) => {
|
||||
const uniqueTokens = [...new Set(allTokens)];
|
||||
var message = {
|
||||
notification: {
|
||||
title: `SMS - ${phone(req.body.From)[0]}`,
|
||||
title: `SMS - ${phone(req.body.From).phoneNumber}`,
|
||||
body: req.body.Body,
|
||||
click_action: "TEST CLICK ACTION",
|
||||
},
|
||||
data: {
|
||||
jobid: "1234",
|
||||
title: `New SMS From ${phone(req.body.From)[0]}`,
|
||||
title: `New SMS From ${phone(req.body.From).phoneNumber}`,
|
||||
body: req.body.Body,
|
||||
},
|
||||
tokens: uniqueTokens,
|
||||
@@ -94,19 +94,19 @@ exports.receive = (req, res) => {
|
||||
|
||||
// Send a message to the device corresponding to the provided
|
||||
// registration token.
|
||||
admin
|
||||
.messaging()
|
||||
.sendMulticast(message)
|
||||
.then((response) => {
|
||||
// Response is a message ID string.
|
||||
console.log(
|
||||
"[SMS Receive] Successfully sent FCM Broadcast.:"
|
||||
//JSON.stringify(response)
|
||||
);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("Error sending message:", error);
|
||||
});
|
||||
// admin
|
||||
// .messaging()
|
||||
// .sendMulticast(message)
|
||||
// .then((response) => {
|
||||
// // Response is a message ID string.
|
||||
// console.log(
|
||||
// "[SMS Receive] Successfully sent FCM Broadcast.:"
|
||||
// //JSON.stringify(response)
|
||||
// );
|
||||
// })
|
||||
// .catch((error) => {
|
||||
// console.log("Error sending message:", error);
|
||||
// });
|
||||
})
|
||||
.catch((e2) => {
|
||||
console.log("e2", e2);
|
||||
|
||||
@@ -7,7 +7,7 @@ require("dotenv").config({
|
||||
});
|
||||
|
||||
const twilio = require("twilio");
|
||||
const phone = require("phone");
|
||||
const { phone } = require("phone");
|
||||
const queries = require("../graphql-client/queries");
|
||||
|
||||
const client = twilio(
|
||||
@@ -17,20 +17,16 @@ const client = twilio(
|
||||
const gqlClient = require("../graphql-client/graphql-client").client;
|
||||
|
||||
exports.send = (req, res) => {
|
||||
const {
|
||||
to,
|
||||
messagingServiceSid,
|
||||
body,
|
||||
conversationid,
|
||||
selectedMedia,
|
||||
} = req.body;
|
||||
const { to, messagingServiceSid, body, conversationid, selectedMedia } =
|
||||
req.body;
|
||||
console.log("[Sending Sms] " + conversationid + " | " + body);
|
||||
if (!!to && !!messagingServiceSid && !!body && !!conversationid) {
|
||||
console.log(phone(to));
|
||||
client.messages
|
||||
.create({
|
||||
body: body,
|
||||
messagingServiceSid: messagingServiceSid,
|
||||
to: phone(to)[0],
|
||||
to: phone(to).phoneNumber,
|
||||
mediaUrl: selectedMedia.map((i) => i.src),
|
||||
})
|
||||
.then((message) => {
|
||||
|
||||
@@ -8,7 +8,7 @@ require("dotenv").config({
|
||||
|
||||
const client = require("../graphql-client/graphql-client").client;
|
||||
const queries = require("../graphql-client/queries");
|
||||
const phone = require("phone");
|
||||
const { phone } = require("phone");
|
||||
|
||||
exports.status = (req, res) => {
|
||||
const { SmsSid, SmsStatus } = req.body;
|
||||
|
||||
Reference in New Issue
Block a user