diff --git a/README.MD b/README.MD
index dcffca3fc..e0b562dfa 100644
--- a/README.MD
+++ b/README.MD
@@ -2,7 +2,7 @@ NGROK TEsting:
./ngrok.exe http http://localhost:4000 -host-header="localhost:4000"
Finding deadfiles - run from client directory
-npx deadfile ./src/index.js --exclude build templates
+npx deadfile ./src/index.jsx --exclude build templates
#Crushing all hasura migrations by creating a new initialization from the server.
hasura migrate create "Init" --from-server --endpoint https://db.imex.online/ --admin-secret 'Production-ImEXOnline!@#'
@@ -11,4 +11,4 @@ Production-ImEXOnline!@#'
hasura migrate status --endpoint https://db.imex.online/ --admin-secret 'Production-ImEXOnline!@#'
Generate the license file:
-$ generate-license-file --input package.json --output third-party-licenses.txt --overwrite
\ No newline at end of file
+$ generate-license-file --input package.json --output third-party-licenses.txt --overwrite
diff --git a/_reference/productionBoardNotes.md b/_reference/productionBoardNotes.md
new file mode 100644
index 000000000..31bf2b4dc
--- /dev/null
+++ b/_reference/productionBoardNotes.md
@@ -0,0 +1,33 @@
+# Production Board Notes:
+
+## General Notes
+
+- You can single click the lane footer to collapse/un-collapse the lane
+- You can double click the lane header to collapse/un-collapse the lane
+- If you need to scroll horizontally, you can hold shift and use the mouse scroll wheel, or press the mouse scroll wheel while scrolling
+
+## Board Settings
+
+#### Layout
+
+- Board Orientation (Vertical or Horizontal)
+ - This determines the orientation of the card layout on the board.
+ - Horizontal is the default setting, and how the prior board was set up.
+ - Vertical is the new setting and allows lanes to be displayed vertically, with a grid of cards
+- Card Size (Small, Medium, Large)
+ - This determines the size of the cards on the board.
+ - Small is the default setting, and how the prior board was set up.
+ - Medium and Large are new settings and allow for larger cards to be displayed on the board.
+- Compact Cards (Tall or Wide)
+ - Formally called 'Compact'
+ - When on, data is displayed on the card vertically
+ - when turned off, some fields may share horizontal space, tightening the card layout
+- Colored Cards (On or Off)
+ - When on, cards are colored based on the Status color
+- Kiosk Mode (On or Off)
+ - This should be turned on if the shop is using it on a tablet (Ipad)
+
+#### Information
+
+These allow users to turn fields on or off, turning them all off will show the card in the most minimal form
+
diff --git a/_reference/test api setup.md b/_reference/test api setup.md
index 791c5b571..813d4a3e9 100644
--- a/_reference/test api setup.md
+++ b/_reference/test api setup.md
@@ -4,7 +4,7 @@ Clone Repository for:
{
"name": "node-webhook-scripts",
"version": "1.0.0",
- "main": "index.js",
+ "main": "index.jsx",
"dependencies": {
"express": "^4.16.4"
},
diff --git a/_reference/test-ecoystem.config.js b/_reference/test-ecoystem.config.js
index 1bf66e16c..fdf2abe6f 100644
--- a/_reference/test-ecoystem.config.js
+++ b/_reference/test-ecoystem.config.js
@@ -11,7 +11,7 @@ module.exports = {
{
name: "Bitbucket Webhook",
- script: "./webhook/index.js",
+ script: "./webhook/index.jsx",
env: {
NODE_ENV: "production"
}
diff --git a/client/craco.config.js b/client/craco.config.js
deleted file mode 100644
index 87abf5bcf..000000000
--- a/client/craco.config.js
+++ /dev/null
@@ -1,53 +0,0 @@
-// craco.config.js
-const TerserPlugin = require("terser-webpack-plugin");
-const CracoLessPlugin = require("craco-less");
-const { convertLegacyToken } = require("@ant-design/compatible/lib");
-const { theme } = require("antd/lib");
-
-const { defaultAlgorithm, defaultSeed } = theme;
-
-const mapToken = defaultAlgorithm(defaultSeed);
-const v4Token = convertLegacyToken(mapToken);
-
-// TODO, At the moment we are using less in the Dashboard. Once we remove this we can remove the less processor entirely.
-
-module.exports = {
- plugins: [
- {
- plugin: CracoLessPlugin,
- options: {
- lessLoaderOptions: {
- lessOptions: {
- modifyVars: { ...v4Token },
- javascriptEnabled: true
- }
- }
- }
- }
- ],
- webpack: {
- configure: (webpackConfig) => {
- return {
- ...webpackConfig,
- // Required for Dev Server
- devServer: {
- ...webpackConfig.devServer,
- allowedHosts: "all"
- },
- optimization: {
- ...webpackConfig.optimization,
- // Workaround for CircleCI bug caused by the number of CPUs shown
- // https://github.com/facebook/create-react-app/issues/8320
- minimizer: webpackConfig.optimization.minimizer.map((item) => {
- if (item instanceof TerserPlugin) {
- item.options.parallel = 2;
- }
-
- return item;
- })
- }
- };
- }
- },
- devtool: "source-map"
-};
diff --git a/client/cypress/plugins/index.js b/client/cypress/plugins/index.js
index 8229063ad..e03c48d6e 100644
--- a/client/cypress/plugins/index.js
+++ b/client/cypress/plugins/index.js
@@ -1,6 +1,6 @@
///
// ***********************************************************
-// This example plugins/index.js can be used to load plugins
+// This example plugins/index.jsx can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
diff --git a/client/cypress/support/e2e.js b/client/cypress/support/e2e.js
index d076cec9f..e328a179b 100644
--- a/client/cypress/support/e2e.js
+++ b/client/cypress/support/e2e.js
@@ -1,5 +1,5 @@
// ***********************************************************
-// This example support/index.js is processed and
+// This example support/index.jsx is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
diff --git a/client/package-lock.json b/client/package-lock.json
index d6e6bbc06..9df62a494 100644
--- a/client/package-lock.json
+++ b/client/package-lock.json
@@ -11,7 +11,6 @@
"@ant-design/icons": "^5.4.0",
"@ant-design/pro-layout": "^7.19.11",
"@apollo/client": "^3.10.8",
- "@asseinfo/react-kanban": "^2.2.0",
"@emotion/is-prop-valid": "^1.3.0",
"@fingerprintjs/fingerprintjs": "^4.4.3",
"@jsreport/browser-client": "^3.1.0",
@@ -44,6 +43,7 @@
"markerjs2": "^2.32.1",
"memoize-one": "^6.0.0",
"normalize-url": "^8.0.1",
+ "object-hash": "^3.0.0",
"prop-types": "^15.8.1",
"query-string": "^9.1.0",
"raf-schd": "^4.0.3",
@@ -325,18 +325,6 @@
}
}
},
- "node_modules/@asseinfo/react-kanban": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/@asseinfo/react-kanban/-/react-kanban-2.2.0.tgz",
- "integrity": "sha512-/gCigrNXRHeP9VCo8RipTOrA0vAPRIOThJhR4ibVxe6BLkaWFUEuJ1RMT4fODpRRsE3XsdrfVGKkfpRBKgvxXg==",
- "dependencies": {
- "react-beautiful-dnd": "^13.0.0"
- },
- "peerDependencies": {
- "react": "^16.8.0 || ^17.0.0",
- "react-dom": "^16.8.0 || ^17.0.0"
- }
- },
"node_modules/@babel/code-frame": {
"version": "7.24.7",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz",
@@ -5779,25 +5767,6 @@
"csstype": "^3.0.2"
}
},
- "node_modules/@types/react-redux": {
- "version": "7.1.33",
- "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.33.tgz",
- "integrity": "sha512-NF8m5AjWCkert+fosDsN3hAlHzpjSiXlVy9EgQEmLoBhaNXbmyeGs/aj5dQzKuF+/q+S7JQagorGDW8pJ28Hmg==",
- "dependencies": {
- "@types/hoist-non-react-statics": "^3.3.0",
- "@types/react": "*",
- "hoist-non-react-statics": "^3.3.0",
- "redux": "^4.0.0"
- }
- },
- "node_modules/@types/react-redux/node_modules/redux": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz",
- "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==",
- "dependencies": {
- "@babel/runtime": "^7.9.2"
- }
- },
"node_modules/@types/resolve": {
"version": "1.20.2",
"resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz",
@@ -13292,6 +13261,15 @@
"node": ">=0.10.0"
}
},
+ "node_modules/object-hash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
+ "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
"node_modules/object-inspect": {
"version": "1.13.1",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz",
@@ -14802,66 +14780,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/react-beautiful-dnd": {
- "version": "13.1.1",
- "resolved": "https://registry.npmjs.org/react-beautiful-dnd/-/react-beautiful-dnd-13.1.1.tgz",
- "integrity": "sha512-0Lvs4tq2VcrEjEgDXHjT98r+63drkKEgqyxdA7qD3mvKwga6a5SscbdLPO2IExotU1jW8L0Ksdl0Cj2AF67nPQ==",
- "dependencies": {
- "@babel/runtime": "^7.9.2",
- "css-box-model": "^1.2.0",
- "memoize-one": "^5.1.1",
- "raf-schd": "^4.0.2",
- "react-redux": "^7.2.0",
- "redux": "^4.0.4",
- "use-memo-one": "^1.1.1"
- },
- "peerDependencies": {
- "react": "^16.8.5 || ^17.0.0 || ^18.0.0",
- "react-dom": "^16.8.5 || ^17.0.0 || ^18.0.0"
- }
- },
- "node_modules/react-beautiful-dnd/node_modules/memoize-one": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz",
- "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q=="
- },
- "node_modules/react-beautiful-dnd/node_modules/react-is": {
- "version": "17.0.2",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
- "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="
- },
- "node_modules/react-beautiful-dnd/node_modules/react-redux": {
- "version": "7.2.9",
- "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.9.tgz",
- "integrity": "sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==",
- "dependencies": {
- "@babel/runtime": "^7.15.4",
- "@types/react-redux": "^7.1.20",
- "hoist-non-react-statics": "^3.3.2",
- "loose-envify": "^1.4.0",
- "prop-types": "^15.7.2",
- "react-is": "^17.0.2"
- },
- "peerDependencies": {
- "react": "^16.8.3 || ^17 || ^18"
- },
- "peerDependenciesMeta": {
- "react-dom": {
- "optional": true
- },
- "react-native": {
- "optional": true
- }
- }
- },
- "node_modules/react-beautiful-dnd/node_modules/redux": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz",
- "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==",
- "dependencies": {
- "@babel/runtime": "^7.9.2"
- }
- },
"node_modules/react-big-calendar": {
"version": "1.13.1",
"resolved": "https://registry.npmjs.org/react-big-calendar/-/react-big-calendar-1.13.1.tgz",
diff --git a/client/package.json b/client/package.json
index bde17e04f..60dd24eef 100644
--- a/client/package.json
+++ b/client/package.json
@@ -11,7 +11,6 @@
"@ant-design/icons": "^5.4.0",
"@ant-design/pro-layout": "^7.19.11",
"@apollo/client": "^3.10.8",
- "@asseinfo/react-kanban": "^2.2.0",
"@emotion/is-prop-valid": "^1.3.0",
"@fingerprintjs/fingerprintjs": "^4.4.3",
"@jsreport/browser-client": "^3.1.0",
@@ -44,6 +43,7 @@
"markerjs2": "^2.32.1",
"memoize-one": "^6.0.0",
"normalize-url": "^8.0.1",
+ "object-hash": "^3.0.0",
"prop-types": "^15.8.1",
"query-string": "^9.1.0",
"raf-schd": "^4.0.3",
diff --git a/client/public/3rdparty-api.txt b/client/public/3rdparty-api.txt
index f5acd9569..69a07ab06 100644
--- a/client/public/3rdparty-api.txt
+++ b/client/public/3rdparty-api.txt
@@ -16422,7 +16422,7 @@ For when you don't want to write the same thing over and over to cache a method
$ npm install --save-dev stubs
```
```js
-var mylib = require('./lib/index.js')
+var mylib = require('./lib/index.jsx')
var stubs = require('stubs')
// make it a noop
diff --git a/client/public/3rdparty-app.txt b/client/public/3rdparty-app.txt
index 8fe9b97b2..20022a514 100644
--- a/client/public/3rdparty-app.txt
+++ b/client/public/3rdparty-app.txt
@@ -16567,7 +16567,7 @@ even more slower.
## Benchmarks
```bash
-$ node benchmarks/index.js
+$ node benchmarks/index.jsx
Benchmarking: sign
elliptic#sign x 262 ops/sec ±0.51% (177 runs sampled)
eccjs#sign x 55.91 ops/sec ±0.90% (144 runs sampled)
diff --git a/client/src/App/ProductFruitsWrapper.jsx b/client/src/App/ProductFruitsWrapper.jsx
index 2d3cfbac7..2686a161e 100644
--- a/client/src/App/ProductFruitsWrapper.jsx
+++ b/client/src/App/ProductFruitsWrapper.jsx
@@ -27,6 +27,6 @@ ProductFruitsWrapper.propTypes = {
currentUser: PropTypes.shape({
authorized: PropTypes.bool,
email: PropTypes.string
- }).isRequired,
- workspaceCode: PropTypes.string.isRequired
+ }),
+ workspaceCode: PropTypes.string
};
diff --git a/client/src/components/dashboard-components/job-lifecycle/job-lifecycle-dashboard.component.jsx b/client/src/components/dashboard-components/job-lifecycle/job-lifecycle-dashboard.component.jsx
index e2dee64f5..38d939c89 100644
--- a/client/src/components/dashboard-components/job-lifecycle/job-lifecycle-dashboard.component.jsx
+++ b/client/src/components/dashboard-components/job-lifecycle/job-lifecycle-dashboard.component.jsx
@@ -9,7 +9,6 @@ import axios from "axios";
const fortyFiveDaysAgo = () => dayjs().subtract(45, "day").toLocaleString();
export default function JobLifecycleDashboardComponent({ data, bodyshop, ...cardProps }) {
- console.log("🚀 ~ JobLifecycleDashboardComponent ~ bodyshop:", bodyshop);
const { t } = useTranslation();
const [loading, setLoading] = useState(false);
const [lifecycleData, setLifecycleData] = useState(null);
@@ -143,7 +142,7 @@ export default function JobLifecycleDashboardComponent({ data, bodyshop, ...card
>
{lifecycleData.summations.map((key) => (
-
+
record.status}
dataSource={lifecycleData.summations.sort((a, b) => b.value - a.value).slice(0, 3)}
/>
diff --git a/client/src/components/dashboard-components/scheduled-out-today/scheduled-out-today.component.jsx b/client/src/components/dashboard-components/scheduled-out-today/scheduled-out-today.component.jsx
index 55a783e8e..53291552b 100644
--- a/client/src/components/dashboard-components/scheduled-out-today/scheduled-out-today.component.jsx
+++ b/client/src/components/dashboard-components/scheduled-out-today/scheduled-out-today.component.jsx
@@ -89,8 +89,6 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
sorter: (a, b) => alphaSort(OwnerNameDisplayFunction(a), OwnerNameDisplayFunction(b)),
sortOrder: state.sortedInfo.columnKey === "owner" && state.sortedInfo.order,
render: (text, record) => {
- console.log("Render record out today");
- console.dir(record);
return record.ownerid ? (
e.stopPropagation()}>
diff --git a/client/src/components/job-close-ro-guard/job-close-ro-guard.bills.jsx b/client/src/components/job-close-ro-guard/job-close-ro-guard.bills.jsx
index 4bf03ea46..a6dcf7b35 100644
--- a/client/src/components/job-close-ro-guard/job-close-ro-guard.bills.jsx
+++ b/client/src/components/job-close-ro-guard/job-close-ro-guard.bills.jsx
@@ -3,7 +3,7 @@ import React from "react";
import { useQuery } from "@apollo/client";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
-import { QUERY_BILLS_BY_JOBID } from "../../graphql/bills.queries";
+import { QUERY_PARTS_BILLS_BY_JOBID } from "../../graphql/bills.queries";
import { selectJobReadOnly } from "../../redux/application/application.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import AlertComponent from "../alert/alert.component";
@@ -19,7 +19,7 @@ const mapDispatchToProps = (dispatch) => ({
export default connect(mapStateToProps, mapDispatchToProps)(JobCloseRoGuardBills);
export function JobCloseRoGuardBills({ job, jobRO, bodyshop, form, warningCallback }) {
- const { loading, error, data } = useQuery(QUERY_BILLS_BY_JOBID, {
+ const { loading, error, data } = useQuery(QUERY_PARTS_BILLS_BY_JOBID, {
variables: { jobid: job.id },
fetchPolicy: "network-only",
nextFetchPolicy: "network-only"
diff --git a/client/src/components/job-close-ro-guard/job-close-ro-guard.container.jsx b/client/src/components/job-close-ro-guard/job-close-ro-guard.container.jsx
index 3df37d3fa..6beffacb3 100644
--- a/client/src/components/job-close-ro-guard/job-close-ro-guard.container.jsx
+++ b/client/src/components/job-close-ro-guard/job-close-ro-guard.container.jsx
@@ -12,7 +12,6 @@ import JobCloseRoGuardBills from "./job-close-ro-guard.bills";
import JobCloseRoGuardPpd from "./job-close-ro-guard.ppd";
import JobCloseRoGuardProfit from "./job-close-ro-guard.profit";
import "./job-close-ro-guard.styles.scss";
-// import JobCloseRoGuardSublet from "./job-close-ro-guard.sublet";
import InstanceRenderManager from "../../utils/instanceRenderMgr";
import JobCloseRoGuardTtLifecycle from "./job-close-ro-guard.tt-lifecycle";
diff --git a/client/src/components/job-detail-lines/job-lines-expander.component.jsx b/client/src/components/job-detail-lines/job-lines-expander.component.jsx
index 22f0f8616..2d932bba5 100644
--- a/client/src/components/job-detail-lines/job-lines-expander.component.jsx
+++ b/client/src/components/job-detail-lines/job-lines-expander.component.jsx
@@ -2,27 +2,30 @@ import { useQuery } from "@apollo/client";
import { Col, Row, Skeleton, Space, Timeline, Typography } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
+import { connect } from "react-redux";
import { Link } from "react-router-dom";
+import { createStructuredSelector } from "reselect";
import { GET_JOB_LINE_ORDERS } from "../../graphql/jobs.queries";
+import { QUERY_JOBLINE_TASKS_PAGINATED } from "../../graphql/tasks.queries.js";
+import { selectTechnician } from "../../redux/tech/tech.selectors.js";
+import { selectBodyshop } from "../../redux/user/user.selectors";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
import { DateFormatter } from "../../utils/DateFormatter";
import AlertComponent from "../alert/alert.component";
-import { connect } from "react-redux";
-import { createStructuredSelector } from "reselect";
-import { selectBodyshop } from "../../redux/user/user.selectors";
-import { QUERY_JOBLINE_TASKS_PAGINATED } from "../../graphql/tasks.queries.js";
-import TaskListContainer from "../task-list/task-list.container.jsx";
+import BillDetailEditcontainer from "../bill-detail-edit/bill-detail-edit.container.jsx";
import FeatureWrapper from "../feature-wrapper/feature-wrapper.component.jsx";
+import TaskListContainer from "../task-list/task-list.container.jsx";
const mapStateToProps = createStructuredSelector({
- bodyshop: selectBodyshop
+ bodyshop: selectBodyshop,
+ technician: selectTechnician
});
const mapDispatchToProps = (dispatch) => ({});
export default connect(mapStateToProps, mapDispatchToProps)(JobLinesExpander);
-export function JobLinesExpander({ jobline, jobid, bodyshop }) {
+export function JobLinesExpander({ jobline, jobid, bodyshop, technician }) {
const { t } = useTranslation();
const { loading, error, data } = useQuery(GET_JOB_LINE_ORDERS, {
fetchPolicy: "network-only",
@@ -47,9 +50,15 @@ export function JobLinesExpander({ jobline, jobid, bodyshop }) {
children: (
-
- {line.parts_order.order_number}
-
+ {!technician ? (
+ <>
+
+ {line.parts_order.order_number}
+
+ >
+ ) : (
+ `${line.parts_order.order_number}`
+ )}
{line.parts_order.order_date}
@@ -84,17 +93,17 @@ export function JobLinesExpander({ jobline, jobid, bodyshop }) {
key: line.id,
children: (
-
- {line.parts_dispatch.number}
-
+ {line.parts_dispatch.number}
{bodyshop.employees.find((e) => e.id === line.parts_dispatch.employeeid)?.first_name}
-
- {t("parts_dispatch_lines.fields.accepted_at")}
- {line.accepted_at}
-
+ {line.accepted_at ? (
+
+ {t("parts_dispatch_lines.fields.accepted_at")}
+ {line.accepted_at}
+
+ ) : null}
)
@@ -111,6 +120,7 @@ export function JobLinesExpander({ jobline, jobid, bodyshop }) {
null}>
{t("bills.labels.bills")}
+
0
@@ -119,9 +129,15 @@ export function JobLinesExpander({ jobline, jobid, bodyshop }) {
children: (
-
- {line.bill.invoice_number}
-
+ {!technician ? (
+ <>
+
+ {line.bill.invoice_number}
+
+ >
+ ) : (
+ `${line.bill.invoice_number}`
+ )}
diff --git a/client/src/components/job-detail-lines/job-lines-part-price-change.component.jsx b/client/src/components/job-detail-lines/job-lines-part-price-change.component.jsx
index 9b394af71..a7548542c 100644
--- a/client/src/components/job-detail-lines/job-lines-part-price-change.component.jsx
+++ b/client/src/components/job-detail-lines/job-lines-part-price-change.component.jsx
@@ -3,13 +3,21 @@ import { Button, Form, notification, Popover, Tooltip } from "antd";
import axios from "axios";
import { t } from "i18next";
import React, { useState } from "react";
+import { connect } from "react-redux";
+import { createStructuredSelector } from "reselect";
import { UPDATE_LINE_PPC } from "../../graphql/jobs-lines.queries";
+import { selectTechnician } from "../../redux/tech/tech.selectors";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
import InstanceRenderManager from "../../utils/instanceRenderMgr";
import CurrencyFormItemComponent from "../form-items-formatted/currency-form-item.component";
import JobLineConvertToLabor from "../job-line-convert-to-labor/job-line-convert-to-labor.component";
-export default function JobLinesPartPriceChange({ job, line, refetch }) {
+const mapStateToProps = createStructuredSelector({
+ technician: selectTechnician
+});
+const mapDispatchToProps = (dispatch) => ({});
+
+export function JobLinesPartPriceChange({ job, line, refetch, technician }) {
const [loading, setLoading] = useState(false);
const [updatePartPrice] = useMutation(UPDATE_LINE_PPC);
@@ -52,7 +60,7 @@ export default function JobLinesPartPriceChange({ job, line, refetch }) {
}
};
- const popcontent = InstanceRenderManager({
+ const popcontent = !technician && InstanceRenderManager({
imex: null,
rome: (