Big progress!
This commit is contained in:
294
client/package-lock.json
generated
294
client/package-lock.json
generated
@@ -13,8 +13,8 @@
|
||||
"@craco/craco": "^7.0.0",
|
||||
"@fingerprintjs/fingerprintjs": "^4.2.1",
|
||||
"@jsreport/browser-client": "^3.1.0",
|
||||
"@sentry/react": "^7.85.0",
|
||||
"@sentry/tracing": "^7.85.0",
|
||||
"@sentry/react": "^7.86.0",
|
||||
"@sentry/tracing": "^7.86.0",
|
||||
"@splitsoftware/splitio-react": "^1.8.1",
|
||||
"@tanem/react-nprogress": "^5.0.8",
|
||||
"antd": "^4.24.8",
|
||||
@@ -28,13 +28,13 @@
|
||||
"exifr": "^7.1.3",
|
||||
"firebase": "^10.7.1",
|
||||
"graphql": "^16.6.0",
|
||||
"i18next": "^23.7.7",
|
||||
"i18next": "^23.7.8",
|
||||
"i18next-browser-languagedetector": "^7.0.1",
|
||||
"jsoneditor": "^9.9.0",
|
||||
"jsreport-browser-client-dist": "^1.3.0",
|
||||
"libphonenumber-js": "^1.10.21",
|
||||
"logrocket": "^7.0.0",
|
||||
"markerjs2": "^2.28.1",
|
||||
"markerjs2": "^2.31.4",
|
||||
"moment-business-days": "^1.2.0",
|
||||
"moment-timezone": "^0.5.41",
|
||||
"normalize-url": "^8.0.0",
|
||||
@@ -57,7 +57,7 @@
|
||||
"react-image-lightbox": "^5.1.4",
|
||||
"react-intersection-observer": "^9.4.3",
|
||||
"react-number-format": "^5.1.3",
|
||||
"react-redux": "^9.0.2",
|
||||
"react-redux": "^9.0.4",
|
||||
"react-resizable": "^3.0.4",
|
||||
"react-router-dom": "^6.20.1",
|
||||
"react-scripts": "^5.0.1",
|
||||
@@ -4188,22 +4188,54 @@
|
||||
"integrity": "sha512-2/U3GXA6YiPYQDLGwtGlnNgKYBSwCFIHf8Y9LUY5VATHdtbLlU0Y1R3QoBnT0aB4qv/BEiVVsj7LJXoQCgJ2vA=="
|
||||
},
|
||||
"node_modules/@sentry-internal/feedback": {
|
||||
"version": "7.85.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-7.85.0.tgz",
|
||||
"integrity": "sha512-MlbIN+N8CWFJBjbqMmARe4+UPo9QRhRar0YoOfmNA2Xqk/EwXcjHWkealosHznXH7tqVbjB25QJpHtDystft/Q==",
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-7.86.0.tgz",
|
||||
"integrity": "sha512-6rl0JYjmAKnhm4/fuFaROh4Ht8oi9f6ZeIcViCuGJcrGICZJJY0s+R77XJI78rNa82PYFrSCcnWXcGji4T8E7g==",
|
||||
"dependencies": {
|
||||
"@sentry/core": "7.85.0",
|
||||
"@sentry/types": "7.85.0",
|
||||
"@sentry/utils": "7.85.0"
|
||||
"@sentry/core": "7.86.0",
|
||||
"@sentry/types": "7.86.0",
|
||||
"@sentry/utils": "7.86.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry-internal/feedback/node_modules/@sentry/core": {
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.86.0.tgz",
|
||||
"integrity": "sha512-SbLvqd1bRYzhDS42u7GMnmbDMfth/zRiLElQWbLK/shmuZzTcfQSwNNdF4Yj+VfjOkqPFgGmICHSHVUc9dh01g==",
|
||||
"dependencies": {
|
||||
"@sentry/types": "7.86.0",
|
||||
"@sentry/utils": "7.86.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry-internal/feedback/node_modules/@sentry/types": {
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.86.0.tgz",
|
||||
"integrity": "sha512-pGAt0+bMfWgo0KG2epthfNV4Wae03tURpoxNjGo5Fr4cXxvLTSijSAQ6rmmO4bXBJ7+rErEjX30g30o/eEdP9g==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry-internal/feedback/node_modules/@sentry/utils": {
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.86.0.tgz",
|
||||
"integrity": "sha512-6PejFtw9VTFFy5vu0ks+U7Ozkqz+eMt+HN8AZKBKErYzX5/xs0kpkOcSRpu3ETdTYcZf8VAmLVgFgE2BE+3WuQ==",
|
||||
"dependencies": {
|
||||
"@sentry/types": "7.86.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry-internal/tracing": {
|
||||
"version": "7.85.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.85.0.tgz",
|
||||
"integrity": "sha512-p3YMUwkPCy2su9cm/3+7QYR4RiMI0+07DU1BZtht9NLTzY2O87/yvUbn1v2yHR3vJQTy/+7N0ud9/mPBFznRQQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@sentry/core": "7.85.0",
|
||||
"@sentry/types": "7.85.0",
|
||||
@@ -4214,16 +4246,60 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/browser": {
|
||||
"version": "7.85.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.85.0.tgz",
|
||||
"integrity": "sha512-x4sH7vTQnZQgy1U7NuN8XwhleAw7YMQitccHeC5m+kpIKGUO7w4Mdvu8rD3dnjmVmZvASpnwocAxy57/vCU6Ww==",
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.86.0.tgz",
|
||||
"integrity": "sha512-nfYWpVOmug+W7KJO7/xhA1JScMZcYHcoOVHLsUFm4znx51U4qZEk+zZDM11Q2Nw6MuDyEYg6bsH1QCwaoC6nLw==",
|
||||
"dependencies": {
|
||||
"@sentry-internal/feedback": "7.85.0",
|
||||
"@sentry-internal/tracing": "7.85.0",
|
||||
"@sentry/core": "7.85.0",
|
||||
"@sentry/replay": "7.85.0",
|
||||
"@sentry/types": "7.85.0",
|
||||
"@sentry/utils": "7.85.0"
|
||||
"@sentry-internal/feedback": "7.86.0",
|
||||
"@sentry-internal/tracing": "7.86.0",
|
||||
"@sentry/core": "7.86.0",
|
||||
"@sentry/replay": "7.86.0",
|
||||
"@sentry/types": "7.86.0",
|
||||
"@sentry/utils": "7.86.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/browser/node_modules/@sentry-internal/tracing": {
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.86.0.tgz",
|
||||
"integrity": "sha512-b4dUsNWlPWRwakGwR7bhOkqiFlqQszH1hhVFwrm/8s3kqEBZ+E4CeIfCvuHBHQ1cM/fx55xpXX/BU163cy+3iQ==",
|
||||
"dependencies": {
|
||||
"@sentry/core": "7.86.0",
|
||||
"@sentry/types": "7.86.0",
|
||||
"@sentry/utils": "7.86.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/browser/node_modules/@sentry/core": {
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.86.0.tgz",
|
||||
"integrity": "sha512-SbLvqd1bRYzhDS42u7GMnmbDMfth/zRiLElQWbLK/shmuZzTcfQSwNNdF4Yj+VfjOkqPFgGmICHSHVUc9dh01g==",
|
||||
"dependencies": {
|
||||
"@sentry/types": "7.86.0",
|
||||
"@sentry/utils": "7.86.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/browser/node_modules/@sentry/types": {
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.86.0.tgz",
|
||||
"integrity": "sha512-pGAt0+bMfWgo0KG2epthfNV4Wae03tURpoxNjGo5Fr4cXxvLTSijSAQ6rmmO4bXBJ7+rErEjX30g30o/eEdP9g==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/browser/node_modules/@sentry/utils": {
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.86.0.tgz",
|
||||
"integrity": "sha512-6PejFtw9VTFFy5vu0ks+U7Ozkqz+eMt+HN8AZKBKErYzX5/xs0kpkOcSRpu3ETdTYcZf8VAmLVgFgE2BE+3WuQ==",
|
||||
"dependencies": {
|
||||
"@sentry/types": "7.86.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
@@ -4449,6 +4525,7 @@
|
||||
"version": "7.85.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.85.0.tgz",
|
||||
"integrity": "sha512-DFDAc4tWmHN5IWhr7XbHCiyF1Xgb95jz8Uj/JTX9atlgodId1UIbER77qpEmH3eQGid/QBdqrlR98zCixgSbwg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@sentry/types": "7.85.0",
|
||||
"@sentry/utils": "7.85.0"
|
||||
@@ -4474,13 +4551,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/react": {
|
||||
"version": "7.85.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/react/-/react-7.85.0.tgz",
|
||||
"integrity": "sha512-digw63l1A9n+74rW8uiG575Xh3qWTkmvwgTfNRFvDokDRMqRTP0iQEqZRBrBEzMZ5JUa6s+5NLc1/dbMh1QQgA==",
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/react/-/react-7.86.0.tgz",
|
||||
"integrity": "sha512-2bHi+YcG4cT+4xHXXzv+AZpU3pdPUlDBorSgHOpa9At4yxr17UWW2f8bP9wPYRgj+NEIM3YhDgR46FlBu9GSKg==",
|
||||
"dependencies": {
|
||||
"@sentry/browser": "7.85.0",
|
||||
"@sentry/types": "7.85.0",
|
||||
"@sentry/utils": "7.85.0",
|
||||
"@sentry/browser": "7.86.0",
|
||||
"@sentry/types": "7.86.0",
|
||||
"@sentry/utils": "7.86.0",
|
||||
"hoist-non-react-statics": "^3.3.2"
|
||||
},
|
||||
"engines": {
|
||||
@@ -4490,26 +4567,133 @@
|
||||
"react": "15.x || 16.x || 17.x || 18.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/replay": {
|
||||
"version": "7.85.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.85.0.tgz",
|
||||
"integrity": "sha512-zVtTKfO+lu5qTwHpETI/oGo8hU3rdKHr3CdI1vRLw+d60PcAa/pWVlXsQeLRTw8PFwE358gHcpFZezj/11afew==",
|
||||
"node_modules/@sentry/react/node_modules/@sentry/types": {
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.86.0.tgz",
|
||||
"integrity": "sha512-pGAt0+bMfWgo0KG2epthfNV4Wae03tURpoxNjGo5Fr4cXxvLTSijSAQ6rmmO4bXBJ7+rErEjX30g30o/eEdP9g==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/react/node_modules/@sentry/utils": {
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.86.0.tgz",
|
||||
"integrity": "sha512-6PejFtw9VTFFy5vu0ks+U7Ozkqz+eMt+HN8AZKBKErYzX5/xs0kpkOcSRpu3ETdTYcZf8VAmLVgFgE2BE+3WuQ==",
|
||||
"dependencies": {
|
||||
"@sentry-internal/tracing": "7.85.0",
|
||||
"@sentry/core": "7.85.0",
|
||||
"@sentry/types": "7.85.0",
|
||||
"@sentry/utils": "7.85.0"
|
||||
"@sentry/types": "7.86.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/replay": {
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.86.0.tgz",
|
||||
"integrity": "sha512-YYZO8bfQSx1H87Te/zzyHPLHvExWiYwUfMWW68yGX+PPZIIzxaM81/iCQHkoucxlvuPCOtxCgf7RSMbsnqEa8g==",
|
||||
"dependencies": {
|
||||
"@sentry-internal/tracing": "7.86.0",
|
||||
"@sentry/core": "7.86.0",
|
||||
"@sentry/types": "7.86.0",
|
||||
"@sentry/utils": "7.86.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/tracing": {
|
||||
"version": "7.85.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-7.85.0.tgz",
|
||||
"integrity": "sha512-L3bpqiM+zu5f3o6zh6hx3xEzVENyhrkuMlpUOyDo0mUytqp763HqF1xz+R+trzze7R5VWrxJaRPARsCKlXu4Ig==",
|
||||
"node_modules/@sentry/replay/node_modules/@sentry-internal/tracing": {
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.86.0.tgz",
|
||||
"integrity": "sha512-b4dUsNWlPWRwakGwR7bhOkqiFlqQszH1hhVFwrm/8s3kqEBZ+E4CeIfCvuHBHQ1cM/fx55xpXX/BU163cy+3iQ==",
|
||||
"dependencies": {
|
||||
"@sentry-internal/tracing": "7.85.0"
|
||||
"@sentry/core": "7.86.0",
|
||||
"@sentry/types": "7.86.0",
|
||||
"@sentry/utils": "7.86.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/replay/node_modules/@sentry/core": {
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.86.0.tgz",
|
||||
"integrity": "sha512-SbLvqd1bRYzhDS42u7GMnmbDMfth/zRiLElQWbLK/shmuZzTcfQSwNNdF4Yj+VfjOkqPFgGmICHSHVUc9dh01g==",
|
||||
"dependencies": {
|
||||
"@sentry/types": "7.86.0",
|
||||
"@sentry/utils": "7.86.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/replay/node_modules/@sentry/types": {
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.86.0.tgz",
|
||||
"integrity": "sha512-pGAt0+bMfWgo0KG2epthfNV4Wae03tURpoxNjGo5Fr4cXxvLTSijSAQ6rmmO4bXBJ7+rErEjX30g30o/eEdP9g==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/replay/node_modules/@sentry/utils": {
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.86.0.tgz",
|
||||
"integrity": "sha512-6PejFtw9VTFFy5vu0ks+U7Ozkqz+eMt+HN8AZKBKErYzX5/xs0kpkOcSRpu3ETdTYcZf8VAmLVgFgE2BE+3WuQ==",
|
||||
"dependencies": {
|
||||
"@sentry/types": "7.86.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/tracing": {
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-7.86.0.tgz",
|
||||
"integrity": "sha512-WPqgmbLm6ntpIoTZd1L/RHIVEDMmvVjIDxKeXGiJeXHZG2VMtgwoxuZAFluVFaD0Sr20Nhj+ZS7HvKOWTxrjjA==",
|
||||
"dependencies": {
|
||||
"@sentry-internal/tracing": "7.86.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/tracing/node_modules/@sentry-internal/tracing": {
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.86.0.tgz",
|
||||
"integrity": "sha512-b4dUsNWlPWRwakGwR7bhOkqiFlqQszH1hhVFwrm/8s3kqEBZ+E4CeIfCvuHBHQ1cM/fx55xpXX/BU163cy+3iQ==",
|
||||
"dependencies": {
|
||||
"@sentry/core": "7.86.0",
|
||||
"@sentry/types": "7.86.0",
|
||||
"@sentry/utils": "7.86.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/tracing/node_modules/@sentry/core": {
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.86.0.tgz",
|
||||
"integrity": "sha512-SbLvqd1bRYzhDS42u7GMnmbDMfth/zRiLElQWbLK/shmuZzTcfQSwNNdF4Yj+VfjOkqPFgGmICHSHVUc9dh01g==",
|
||||
"dependencies": {
|
||||
"@sentry/types": "7.86.0",
|
||||
"@sentry/utils": "7.86.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/tracing/node_modules/@sentry/types": {
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.86.0.tgz",
|
||||
"integrity": "sha512-pGAt0+bMfWgo0KG2epthfNV4Wae03tURpoxNjGo5Fr4cXxvLTSijSAQ6rmmO4bXBJ7+rErEjX30g30o/eEdP9g==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/tracing/node_modules/@sentry/utils": {
|
||||
"version": "7.86.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.86.0.tgz",
|
||||
"integrity": "sha512-6PejFtw9VTFFy5vu0ks+U7Ozkqz+eMt+HN8AZKBKErYzX5/xs0kpkOcSRpu3ETdTYcZf8VAmLVgFgE2BE+3WuQ==",
|
||||
"dependencies": {
|
||||
"@sentry/types": "7.86.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
@@ -4519,6 +4703,7 @@
|
||||
"version": "7.85.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.85.0.tgz",
|
||||
"integrity": "sha512-R5jR4XkK5tBU2jDiPdSVqzkmjYRr666bcGaFGUHB/xDQCjPsjk+pEmCCL+vpuWoaZmQJUE1hVU7rgnVX81w8zg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
@@ -4527,6 +4712,7 @@
|
||||
"version": "7.85.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.85.0.tgz",
|
||||
"integrity": "sha512-JZ7seNOLvhjAQ8GeB3GYknPQJkuhF88xAYOaESZP3xPOWBMFUN+IO4RqjMqMLFDniOwsVQS7GB/MfP+hxufieg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@sentry/types": "7.85.0"
|
||||
},
|
||||
@@ -11423,9 +11609,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/i18next": {
|
||||
"version": "23.7.7",
|
||||
"resolved": "https://registry.npmjs.org/i18next/-/i18next-23.7.7.tgz",
|
||||
"integrity": "sha512-peTvdT+Lma+o0LfLFD7IC2M37N9DJ04dH0IJYOyOHRhDfLo6nK36v7LkrQH35C2l8NHiiXZqGirhKESlEb/5PA==",
|
||||
"version": "23.7.8",
|
||||
"resolved": "https://registry.npmjs.org/i18next/-/i18next-23.7.8.tgz",
|
||||
"integrity": "sha512-yCe9964O+1abdIG01AOzk6P9mQi0HVJV1B57whYJQu6TjmrB9JHHDYonDI8amGt6M6b9bP3x3R0Zh7ROmvX7JQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
@@ -14009,9 +14195,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/markerjs2": {
|
||||
"version": "2.31.3",
|
||||
"resolved": "https://registry.npmjs.org/markerjs2/-/markerjs2-2.31.3.tgz",
|
||||
"integrity": "sha512-y7HQkHNllTpvws0dUJEp+5KKmAUINxiY6Yf5H8gPjDnFsxFerTgEgIAC11xezIgwp0Nfx5vzQqD7QKhyH2hCSg=="
|
||||
"version": "2.31.4",
|
||||
"resolved": "https://registry.npmjs.org/markerjs2/-/markerjs2-2.31.4.tgz",
|
||||
"integrity": "sha512-Xx/2969Uj1VdwFRMcvHlhMNqvFMwJwie8J6WQcj9NDEByD2CdLVxF/39w0rg4ILJbsafAVp0ZxywXiYG9wfI0Q=="
|
||||
},
|
||||
"node_modules/material-colors": {
|
||||
"version": "1.2.6",
|
||||
@@ -17656,31 +17842,23 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-redux": {
|
||||
"version": "9.0.2",
|
||||
"resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.0.2.tgz",
|
||||
"integrity": "sha512-34EI42cYZxJF59Iht6RDM5xDun5EdhV8CbJcTe+mYx97XMHLNYA6RrH9r/ZOZX3CetVCYfBEU9oAY9h3sZarsw==",
|
||||
"version": "9.0.4",
|
||||
"resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.0.4.tgz",
|
||||
"integrity": "sha512-9J1xh8sWO0vYq2sCxK2My/QO7MzUMRi3rpiILP/+tDr8krBHixC6JMM17fMK88+Oh3e4Ae6/sHIhNBgkUivwFA==",
|
||||
"dependencies": {
|
||||
"@types/use-sync-external-store": "^0.0.3",
|
||||
"use-sync-external-store": "^1.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^18.2.41",
|
||||
"@types/react-dom": "^18.2.17",
|
||||
"@types/react": "^18.2.25",
|
||||
"react": "^18.0",
|
||||
"react-dom": "^18.0",
|
||||
"react-native": ">=0.71",
|
||||
"react-native": ">=0.69",
|
||||
"redux": "^5.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"@types/react-dom": {
|
||||
"optional": true
|
||||
},
|
||||
"react-dom": {
|
||||
"optional": true
|
||||
},
|
||||
"react-native": {
|
||||
"optional": true
|
||||
},
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
"@craco/craco": "^7.0.0",
|
||||
"@fingerprintjs/fingerprintjs": "^4.2.1",
|
||||
"@jsreport/browser-client": "^3.1.0",
|
||||
"@sentry/react": "^7.85.0",
|
||||
"@sentry/tracing": "^7.85.0",
|
||||
"@sentry/react": "^7.86.0",
|
||||
"@sentry/tracing": "^7.86.0",
|
||||
"@splitsoftware/splitio-react": "^1.8.1",
|
||||
"@tanem/react-nprogress": "^5.0.8",
|
||||
"antd": "^4.24.8",
|
||||
@@ -24,13 +24,13 @@
|
||||
"exifr": "^7.1.3",
|
||||
"firebase": "^10.7.1",
|
||||
"graphql": "^16.6.0",
|
||||
"i18next": "^23.7.7",
|
||||
"i18next": "^23.7.8",
|
||||
"i18next-browser-languagedetector": "^7.0.1",
|
||||
"jsoneditor": "^9.9.0",
|
||||
"jsreport-browser-client-dist": "^1.3.0",
|
||||
"libphonenumber-js": "^1.10.21",
|
||||
"logrocket": "^7.0.0",
|
||||
"markerjs2": "^2.28.1",
|
||||
"markerjs2": "^2.31.4",
|
||||
"moment-business-days": "^1.2.0",
|
||||
"moment-timezone": "^0.5.41",
|
||||
"normalize-url": "^8.0.0",
|
||||
@@ -53,7 +53,7 @@
|
||||
"react-image-lightbox": "^5.1.4",
|
||||
"react-intersection-observer": "^9.4.3",
|
||||
"react-number-format": "^5.1.3",
|
||||
"react-redux": "^9.0.2",
|
||||
"react-redux": "^9.0.4",
|
||||
"react-resizable": "^3.0.4",
|
||||
"react-router-dom": "^6.20.1",
|
||||
"react-scripts": "^5.0.1",
|
||||
|
||||
@@ -22,6 +22,7 @@ import {
|
||||
} from "../redux/user/user.selectors";
|
||||
import PrivateRoute from "../utils/private-route";
|
||||
import "./App.styles.scss";
|
||||
import {JobsPage} from "../pages/jobs/jobs.page";
|
||||
|
||||
const ResetPassword = lazy(() =>
|
||||
import("../pages/reset-password/reset-password.component")
|
||||
@@ -168,13 +169,13 @@ export function App({
|
||||
<Route path="/disclaimer" element={<DisclaimerPage />} />
|
||||
<Route path="/mp/:paymentIs" element={<MobilePaymentContainer />} />
|
||||
<Route path="/manage" element={<PrivateRoute isAuthorized={currentUser.authorized} />}>
|
||||
<Route path="/manage" element={<ManagePage />} />
|
||||
<Route path="/manage/*" element={<ManagePage />} />
|
||||
</Route>
|
||||
<Route path="/tech" element={<PrivateRoute isAuthorized={currentUser.authorized} />}>
|
||||
<Route path="/tech" element={<TechPageContainer />} />
|
||||
<Route path="/tech/*" element={<TechPageContainer />} />
|
||||
</Route>
|
||||
<Route path="/edit" element={<PrivateRoute isAuthorized={currentUser.authorized} />}>
|
||||
<Route path="/edit" element={<DocumentEditorContainer />} />
|
||||
<Route path="/edit/*" element={<DocumentEditorContainer />} />
|
||||
</Route>
|
||||
</Routes>
|
||||
</ErrorBoundary>
|
||||
|
||||
@@ -5,7 +5,7 @@ import queryString from "query-string";
|
||||
import React, {useState} from "react";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import {connect} from "react-redux";
|
||||
import {useSearchParams} from "react-router-dom";
|
||||
import {useLocation} from "react-router-dom";
|
||||
import {createStructuredSelector} from "reselect";
|
||||
import {DELETE_BILL_LINE, INSERT_NEW_BILL_LINES, UPDATE_BILL_LINE} from "../../graphql/bill-lines.queries";
|
||||
import {QUERY_BILL_BY_PK, UPDATE_BILL} from "../../graphql/bills.queries";
|
||||
@@ -38,7 +38,7 @@ export default connect(
|
||||
)(BillDetailEditcontainer);
|
||||
|
||||
export function BillDetailEditcontainer({setPartsOrderContext, insertAuditTrail, bodyshop,}) {
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
|
||||
const {t} = useTranslation();
|
||||
const [form] = Form.useForm();
|
||||
|
||||
@@ -3,7 +3,7 @@ import queryString from "query-string";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useSearchParams, useNavigate } from "react-router-dom";
|
||||
import { useLocation, useNavigate } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||
@@ -32,7 +32,7 @@ export function BillDetailEditReturn({
|
||||
data,
|
||||
disabled,
|
||||
}) {
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const history = useNavigate();
|
||||
const { t } = useTranslation();
|
||||
const [form] = Form.useForm();
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Drawer, Grid } from "antd";
|
||||
import queryString from "query-string";
|
||||
import React from "react";
|
||||
import { useSearchParams, useNavigate } from "react-router-dom";
|
||||
import { useLocation, useNavigate } from "react-router-dom";
|
||||
import BillDetailEditComponent from "./bill-detail-edit-component";
|
||||
|
||||
export default function BillDetailEditcontainer() {
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const history = useNavigate();
|
||||
|
||||
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
} from "../../redux/user/user.selectors";
|
||||
import { CalculateBillTotal } from "../bill-form/bill-form.totals.utility";
|
||||
import queryString from "query-string";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import { useLocation } from "react-router-dom";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
@@ -35,8 +35,7 @@ export function BilllineAddInventory({
|
||||
jobid,
|
||||
}) {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const { billid } = queryString.parse(useSearchParams().toString());
|
||||
|
||||
const { billid } = queryString.parse(useLocation().search);
|
||||
const [insertInventoryLine] = useMutation(INSERT_INVENTORY_AND_CREDIT);
|
||||
|
||||
const addToInventory = async () => {
|
||||
|
||||
@@ -2,14 +2,14 @@ import React, { useState } from "react";
|
||||
import { QUERY_ALL_VENDORS } from "../../graphql/vendors.queries";
|
||||
import { useQuery } from "@apollo/client";
|
||||
import queryString from "query-string";
|
||||
import { useSearchParams, useNavigate } from "react-router-dom";
|
||||
import { useLocation, useNavigate } from "react-router-dom";
|
||||
import { Table, Input } from "antd";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { alphaSort } from "../../utils/sorters";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
|
||||
export default function BillsVendorsList() {
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const history = useNavigate();
|
||||
|
||||
const { loading, error, data } = useQuery(QUERY_ALL_VENDORS, {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Button, Card, Input, Space, Table, Typography } from "antd";
|
||||
import queryString from "query-string";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Link, useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { Link, useNavigate, useLocation } from "react-router-dom";
|
||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
||||
import { alphaSort } from "../../utils/sorters";
|
||||
@@ -40,7 +40,7 @@ export function ContractsList({
|
||||
filteredInfo: { text: "" },
|
||||
});
|
||||
const history = useNavigate();
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const { page } = search;
|
||||
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Card, Table } from "antd";
|
||||
import queryString from "query-string";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Link, useSearchParams, useNavigate } from "react-router-dom";
|
||||
import { Link, useLocation, useNavigate } from "react-router-dom";
|
||||
import { DateFormatter } from "../../utils/DateFormatter";
|
||||
import { alphaSort } from "../../utils/sorters";
|
||||
import {pageLimit} from "../../utils/config";
|
||||
@@ -11,7 +11,7 @@ export default function CourtesyCarContractListComponent({
|
||||
contracts,
|
||||
totalContracts,
|
||||
}) {
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search =queryString.parse(useLocation().search);
|
||||
const { page, sortcolumn, sortorder } = search;
|
||||
const history = useNavigate();
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { useQuery } from "@apollo/client";
|
||||
import { Card, Form, Result } from "antd";
|
||||
import queryString from "query-string";
|
||||
import React, { useEffect } from "react";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { QUERY_CSI_RESPONSE_BY_PK } from "../../graphql/csi.queries";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
import ConfigFormComponents from "../config-form-components/config-form-components.component";
|
||||
@@ -11,7 +12,7 @@ import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
||||
export default function CsiResponseFormContainer() {
|
||||
const { t } = useTranslation();
|
||||
const [form] = Form.useForm();
|
||||
const searchParams = Object.fromEntries(useSearchParams());
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { responseid } = searchParams;
|
||||
const { loading, error, data } = useQuery(QUERY_CSI_RESPONSE_BY_PK, {
|
||||
variables: {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Button, Card, Table } from "antd";
|
||||
import queryString from "query-string";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Link, useSearchParams, useNavigate } from "react-router-dom";
|
||||
import { Link, useNavigate, useLocation } from "react-router-dom";
|
||||
import { DateFormatter } from "../../utils/DateFormatter";
|
||||
import { alphaSort } from "../../utils/sorters";
|
||||
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
|
||||
@@ -15,7 +15,7 @@ export default function CsiResponseListPaginated({
|
||||
responses,
|
||||
total,
|
||||
}) {
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const { responseid, page, sortcolumn, sortorder } = search;
|
||||
const history = useNavigate();
|
||||
const [state, setState] = useState({
|
||||
@@ -128,7 +128,7 @@ export default function CsiResponseListPaginated({
|
||||
handleOnRowClick(record);
|
||||
}, // click row
|
||||
};
|
||||
}}q
|
||||
}}
|
||||
/>
|
||||
</Card>
|
||||
);
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from "react";
|
||||
import { Form, Space } from "antd";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
import {useSearchParams } from "react-router-dom";
|
||||
import {useLocation } from "react-router-dom";
|
||||
import "./form-fields-changed.styles.scss";
|
||||
import Prompt from "../../utils/prompt";
|
||||
|
||||
@@ -12,7 +12,7 @@ export default function FormsFieldChanged({ form, skipPrompt }) {
|
||||
const handleReset = () => {
|
||||
form.resetFields();
|
||||
};
|
||||
const loc = useSearchParams();
|
||||
const loc = useLocation();
|
||||
//if (!form.isFieldsTouched()) return <></>;
|
||||
return (
|
||||
<Form.Item
|
||||
|
||||
@@ -4,7 +4,7 @@ import queryString from "query-string";
|
||||
import React from "react";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import {connect} from "react-redux";
|
||||
import {Link, useNavigate, useSearchParams} from "react-router-dom";
|
||||
import {Link, useNavigate, useLocation} from "react-router-dom";
|
||||
import {createStructuredSelector} from "reselect";
|
||||
import {setModalContext} from "../../redux/modals/modals.actions";
|
||||
import {selectBodyshop} from "../../redux/user/user.selectors";
|
||||
@@ -23,7 +23,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
});
|
||||
|
||||
export function JobsList({bodyshop, refetch, loading, jobs, total, setInventoryUpsertContext,}) {
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const {page, sortcolumn, sortorder} = search;
|
||||
const history = useNavigate();
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useQuery } from "@apollo/client";
|
||||
import queryString from "query-string";
|
||||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { QUERY_INVENTORY_PAGINATED } from "../../graphql/inventory.queries";
|
||||
import {
|
||||
@@ -23,7 +23,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
});
|
||||
|
||||
export function InventoryList({ setBreadcrumbs, setSelectedHeader }) {
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { page, sortcolumn, sortorder, search, showall } = searchParams;
|
||||
|
||||
const { loading, error, data, refetch } = useQuery(
|
||||
|
||||
@@ -17,7 +17,7 @@ import queryString from "query-string";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { Link, useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { Link, useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import {
|
||||
openChatByPhone,
|
||||
@@ -60,7 +60,7 @@ export function ScheduleEventComponent({
|
||||
const { t } = useTranslation();
|
||||
const [visible, setVisible] = useState(false);
|
||||
const history = useNavigate();
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const [updateAppointment] = useMutation(UPDATE_APPOINTMENT);
|
||||
const [title, setTitle] = useState(event.title);
|
||||
const blockContent = (
|
||||
|
||||
@@ -5,7 +5,7 @@ import queryString from "query-string";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useSearchParams, useNavigate, useParams } from "react-router-dom";
|
||||
import { useLocation, useNavigate, useParams } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { logImEXEvent } from "../../../../firebase/firebase.utils";
|
||||
import {
|
||||
@@ -50,7 +50,7 @@ export function JobChecklistForm({
|
||||
|
||||
const { jobId } = useParams();
|
||||
const history = useNavigate();
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const handleFinish = async (values) => {
|
||||
|
||||
@@ -5,7 +5,7 @@ import queryString from "query-string";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { Link, useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { Link, useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { QUERY_JOB_CARD_DETAILS } from "../../graphql/jobs.queries";
|
||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||
@@ -54,7 +54,7 @@ export function JobDetailCards({ bodyshop, setPrintCenterContext }) {
|
||||
? bpoints[selectedBreakpoint[0]]
|
||||
: "100%";
|
||||
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { selected } = searchParams;
|
||||
const history = useNavigate();
|
||||
const { loading, error, data, refetch } = useQuery(QUERY_JOB_CARD_DETAILS, {
|
||||
|
||||
@@ -14,7 +14,7 @@ import queryString from "query-string";
|
||||
import React, { useCallback, useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import {
|
||||
@@ -64,7 +64,7 @@ export function JobsAvailableContainer({
|
||||
fetchPolicy: "network-only",
|
||||
nextFetchPolicy: "network-only",
|
||||
});
|
||||
const { clm_no, availableJobId } = queryString.parse(useSearchParams().toString());
|
||||
const { clm_no, availableJobId } = queryString.parse(useLocation().search);
|
||||
const history = useNavigate();
|
||||
const { t } = useTranslation();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useQuery } from "@apollo/client";
|
||||
import queryString from "query-string";
|
||||
import React from "react";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import { QUERY_BILLS_BY_JOBID } from "../../graphql/bills.queries";
|
||||
import JobsDetailPliComponent from "./jobs-detail-pli.component";
|
||||
|
||||
@@ -12,7 +12,7 @@ export default function JobsDetailPliContainer({ job }) {
|
||||
nextFetchPolicy: "network-only",
|
||||
});
|
||||
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search =queryString.parse(useLocation().search);
|
||||
const history = useNavigate();
|
||||
|
||||
const handleBillOnRowClick = (record) => {
|
||||
|
||||
@@ -6,7 +6,7 @@ import queryString from "query-string";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { Link, useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { Link, useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
||||
@@ -22,7 +22,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
});
|
||||
|
||||
export function JobsList({ bodyshop, refetch, loading, jobs, total }) {
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const [openSearchResults, setOpenSearchResults] = useState([]);
|
||||
const [searchLoading, setSearchLoading] = useState(false);
|
||||
const { page, sortcolumn, sortorder } = search;
|
||||
|
||||
@@ -10,7 +10,7 @@ import queryString from "query-string";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { Link, useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { Link, useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { QUERY_ALL_ACTIVE_JOBS } from "../../graphql/jobs.queries";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
@@ -26,7 +26,7 @@ const mapStateToProps = createStructuredSelector({
|
||||
});
|
||||
|
||||
export function JobsList({ bodyshop }) {
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { selected } = searchParams;
|
||||
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
||||
.filter((screen) => !!screen[1])
|
||||
|
||||
@@ -10,7 +10,7 @@ import queryString from "query-string";
|
||||
import React, { useMemo, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { Link, useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { Link, useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { QUERY_ALL_ACTIVE_JOBS } from "../../graphql/jobs.queries";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
@@ -27,7 +27,7 @@ const mapStateToProps = createStructuredSelector({
|
||||
});
|
||||
|
||||
export function JobsReadyList({ bodyshop }) {
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams =queryString.parse(useLocation().search);
|
||||
const { selected } = searchParams;
|
||||
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
||||
.filter((screen) => !!screen[1])
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Button, Card, Input, Space, Table, Typography } from "antd";
|
||||
import queryString from "query-string";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Link, useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { Link, useNavigate, useLocation } from "react-router-dom";
|
||||
import PhoneFormatter from "../../utils/PhoneFormatter";
|
||||
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
|
||||
import {pageLimit} from "../../utils/config";
|
||||
@@ -14,7 +14,7 @@ export default function OwnersListComponent({
|
||||
total,
|
||||
refetch,
|
||||
}) {
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const {
|
||||
page,
|
||||
// sortcolumn, sortorder
|
||||
|
||||
@@ -4,11 +4,11 @@ import { QUERY_ALL_OWNERS_PAGINATED } from "../../graphql/owners.queries";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
import OwnersListComponent from "./owners-list.component";
|
||||
import queryString from "query-string";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import {pageLimit} from "../../utils/config";
|
||||
|
||||
export default function OwnersListContainer() {
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { page, sortcolumn, sortorder, search } = searchParams;
|
||||
const { loading, error, data, refetch } = useQuery(
|
||||
QUERY_ALL_OWNERS_PAGINATED,
|
||||
|
||||
@@ -16,7 +16,7 @@ import queryString from "query-string";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import { DELETE_PARTS_ORDER } from "../../graphql/parts-orders.queries";
|
||||
@@ -78,7 +78,7 @@ export function PartsOrderListTableComponent({
|
||||
const [state, setState] = useState({
|
||||
sortedInfo: {},
|
||||
});
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const selectedpartsorder = search.partsorderid;
|
||||
const [searchText, setSearchText] = useState("");
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import queryString from "query-string";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { Link, useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { Link, useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { QUERY_PAYMENT_BY_ID } from "../../graphql/payments.queries";
|
||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||
@@ -42,7 +42,7 @@ export function PaymentsListPaginated({
|
||||
total,
|
||||
bodyshop,
|
||||
}) {
|
||||
const search =queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const [openSearchResults, setOpenSearchResults] = useState([]);
|
||||
const [searchLoading, setSearchLoading] = useState(false);
|
||||
const { page, sortcolumn, sortorder } = search;
|
||||
|
||||
@@ -4,7 +4,7 @@ import queryString from "query-string";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import {
|
||||
DELETE_PHONEBOOK,
|
||||
@@ -23,7 +23,7 @@ const mapStateToProps = createStructuredSelector({
|
||||
|
||||
function PhonebookFormContainer({ refetch, bodyshop }) {
|
||||
const history = useNavigate();
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const { phonebookentry } = search;
|
||||
const [formLoading, setFormLoading] = useState(false);
|
||||
const [form] = Form.useForm();
|
||||
|
||||
@@ -5,7 +5,7 @@ import queryString from "query-string";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { QUERY_JOB_CARD_DETAILS } from "../../graphql/jobs.queries";
|
||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||
@@ -44,7 +44,7 @@ export function ProductionListDetail({
|
||||
setPrintCenterContext,
|
||||
technician,
|
||||
}) {
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const history = useNavigate();
|
||||
const { selected } = search;
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@ import { useTranslation } from "react-i18next";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
||||
import queryString from "query-string";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
|
||||
export default function ProductionRemoveButton({ jobId }) {
|
||||
const [removeJobFromProduction] = useMutation(UPDATE_JOB);
|
||||
const { t } = useTranslation();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const history = useNavigate();
|
||||
|
||||
const handleRemoveFromProd = async () => {
|
||||
|
||||
@@ -3,11 +3,11 @@ import Axios from "axios";
|
||||
import queryString from "query-string";
|
||||
import React, { useEffect } from "react";
|
||||
import { useCookies } from "react-cookie";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import QboSignIn from "../../assets/qbo/C2QB_green_btn_med_default.svg";
|
||||
|
||||
export default function QboAuthorizeComponent() {
|
||||
const location = useSearchParams();
|
||||
const location = useLocation();
|
||||
const history = useNavigate();
|
||||
const [setCookie] = useCookies(["access_token", "refresh_token"]);
|
||||
|
||||
@@ -15,7 +15,7 @@ export default function QboAuthorizeComponent() {
|
||||
const result = await Axios.post("/qbo/authorize");
|
||||
window.location.href = result.data;
|
||||
};
|
||||
const qs = queryString.parse(location.toString());
|
||||
const qs = queryString.parse(location.search);
|
||||
|
||||
const { error } = qs;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import queryString from "query-string";
|
||||
import React from "react";
|
||||
import { Calendar, momentLocalizer } from "react-big-calendar";
|
||||
import { connect } from "react-redux";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import Event from "../job-at-change/schedule-event.container";
|
||||
@@ -30,7 +30,7 @@ export function ScheduleCalendarWrapperComponent({
|
||||
date,
|
||||
...otherProps
|
||||
}) {
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const history = useNavigate();
|
||||
const { t } = useTranslation();
|
||||
const handleEventPropStyles = (event, start, end, isSelected) => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useQuery } from "@apollo/client";
|
||||
import queryString from "query-string";
|
||||
import React, { useMemo, useEffect } from "react";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { QUERY_ALL_ACTIVE_APPOINTMENTS } from "../../graphql/appointments.queries";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
||||
@@ -19,7 +19,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
});
|
||||
|
||||
export function ScheduleCalendarContainer({ calculateScheduleLoad }) {
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
|
||||
const { date, view } = search;
|
||||
const range = useMemo(() => getRange(date, view), [date, view]);
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from "lodash";
|
||||
import moment from "moment";
|
||||
import queryString from "query-string";
|
||||
import React, { useMemo } from "react";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { QUERY_TIME_TICKETS_IN_RANGE_SB } from "../../graphql/timetickets.queries";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
||||
@@ -13,7 +13,7 @@ import ScoreboardTicketsBar from "./scoreboard-timetickets.bar.component";
|
||||
import ScoreboardTicketsStats from "./scoreboard-timetickets.stats.component";
|
||||
|
||||
export default function ScoreboardTimeTickets() {
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { start, end } = searchParams;
|
||||
const startDate = start
|
||||
? moment(start)
|
||||
|
||||
@@ -16,7 +16,7 @@ import moment from "moment";
|
||||
import React, { useEffect } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import {
|
||||
@@ -48,7 +48,7 @@ export function ShopEmployeesFormComponent({ bodyshop }) {
|
||||
const { t } = useTranslation();
|
||||
const [form] = useForm();
|
||||
const history = useNavigate();
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const [deleteVacation] = useMutation(DELETE_VACATION);
|
||||
const { error, data } = useQuery(QUERY_EMPLOYEE_BY_ID, {
|
||||
variables: { id: search.employeeId },
|
||||
|
||||
@@ -2,13 +2,12 @@ import { Button, Table } from "antd";
|
||||
import queryString from "query-string";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
|
||||
export default function ShopEmployeesListComponent({ loading, employees }) {
|
||||
const { t } = useTranslation();
|
||||
const history = useNavigate();
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const handleOnRowClick = (record) => {
|
||||
if (record) {
|
||||
search.employeeId = record.id;
|
||||
|
||||
@@ -15,7 +15,7 @@ import ShopInfoResponsibilityCenterComponent from "./shop-info.responsibilitycen
|
||||
import ShopInfoROStatusComponent from "./shop-info.rostatus.component";
|
||||
import ShopInfoSchedulingComponent from "./shop-info.scheduling.component";
|
||||
import ShopInfoSpeedPrint from "./shop-info.speedprint.component";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import queryString from "query-string";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
@@ -34,8 +34,8 @@ export function ShopInfoComponent({ bodyshop, form, saveLoading }) {
|
||||
);
|
||||
const { t } = useTranslation();
|
||||
const history = useNavigate();
|
||||
const location = useSearchParams();
|
||||
const search = queryString.parse(location.toString());
|
||||
const location = useLocation();
|
||||
const search = queryString.parse(location.search);
|
||||
|
||||
return (
|
||||
<Card
|
||||
|
||||
@@ -5,7 +5,7 @@ import queryString from "query-string";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import {
|
||||
@@ -29,7 +29,7 @@ export function ShopTemplateAddComponent({
|
||||
refetch,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const history = useNavigate();
|
||||
const [insertTemplate] = useMutation(INSERT_TEMPLATE);
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@ import { Button, notification, Popconfirm } from "antd";
|
||||
import queryString from "query-string";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import { DELETE_TEMPLATE } from "../../graphql/templates.queries";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
|
||||
export default function ShopTemplateDeleteComponent({ templateId, refetch }) {
|
||||
const { t } = useTranslation();
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const history = useNavigate();
|
||||
const [deleteTemplate] = useMutation(DELETE_TEMPLATE);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { QUERY_CUSTOM_TEMPLATES } from "../../graphql/templates.queries";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
import Skeleton from "../loading-skeleton/loading-skeleton.component";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import queryString from "query-string";
|
||||
import { TemplateList } from "../../utils/TemplateConstants";
|
||||
import ShopTemplateAdd from "../shop-template-add/shop-template-add.component";
|
||||
@@ -18,7 +18,7 @@ export default function ShopTemplatesListContainer({ visibleState }) {
|
||||
nextFetchPolicy: "network-only",
|
||||
});
|
||||
const { t } = useTranslation();
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const history = useNavigate();
|
||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import queryString from "query-string";
|
||||
import React, {useEffect} from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { Link, useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { Link, useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import ImEXOnlineLogo from "../../assets/logo192.png";
|
||||
import {
|
||||
@@ -38,8 +38,7 @@ export function SignInComponent({
|
||||
sendPasswordReset,
|
||||
loginLoading,
|
||||
}) {
|
||||
const [searchParams] = useSearchParams();
|
||||
const redirect = searchParams.get("redirect");
|
||||
const { redirect } = queryString.parse(useLocation().search);
|
||||
const navigate = useNavigate();
|
||||
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -5,7 +5,7 @@ import queryString from "query-string";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { GET_JOB_BY_PK } from "../../graphql/jobs.queries";
|
||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||
@@ -51,7 +51,7 @@ export function TechLookupJobsDrawer({ bodyshop, setPrintCenterContext }) {
|
||||
? bpoints[selectedBreakpoint[0]]
|
||||
: "100%";
|
||||
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams =queryString.parse(useLocation().search);
|
||||
const { selected } = searchParams;
|
||||
const history = useNavigate();
|
||||
const { loading, error, data, refetch } = useQuery(GET_JOB_BY_PK, {
|
||||
|
||||
@@ -5,7 +5,7 @@ import queryString from "query-string";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { QUERY_ALL_ACTIVE_JOBS } from "../../graphql/jobs.queries";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
@@ -19,7 +19,7 @@ const mapStateToProps = createStructuredSelector({
|
||||
});
|
||||
|
||||
export function TechLookupJobsList({ bodyshop }) {
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { selected } = searchParams;
|
||||
|
||||
const { loading, error, data, refetch } = useQuery(QUERY_ALL_ACTIVE_JOBS, {
|
||||
|
||||
@@ -3,10 +3,10 @@ import { DatePicker } from "antd";
|
||||
import moment from "moment";
|
||||
import queryString from "query-string";
|
||||
import React from "react";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
|
||||
export default function TimeTicketsDatesSelector() {
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { start, end } = searchParams;
|
||||
const history = useNavigate();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Button } from "antd";
|
||||
import queryString from "query-string";
|
||||
import React, { useState } from "react";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { GenerateDocument } from "../../utils/RenderTemplate";
|
||||
import { TemplateList } from "../../utils/TemplateConstants";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -9,7 +9,7 @@ import moment from "moment";
|
||||
const AttendanceCsv = TemplateList("special").attendance_detail_csv;
|
||||
|
||||
export default function TimeTicketsAttendanceTable() {
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { start, end } = searchParams;
|
||||
const { t } = useTranslation();
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { Button } from "antd";
|
||||
import queryString from "query-string";
|
||||
import React, { useState } from "react";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { GenerateDocument } from "../../utils/RenderTemplate";
|
||||
import { TemplateList } from "../../utils/TemplateConstants";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import moment from "moment";
|
||||
const PayrollTemplate = TemplateList("special").exported_payroll;
|
||||
export default function TimeTicketsPayrollTable() {
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { start, end } = searchParams;
|
||||
const { t } = useTranslation();
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Button, Card, Input, Space, Table, Typography } from "antd";
|
||||
import queryString from "query-string";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Link, useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { Link, useNavigate, useLocation } from "react-router-dom";
|
||||
import VehicleVinDisplay from "../vehicle-vin-display/vehicle-vin-display.component";
|
||||
import {pageLimit} from "../../utils/config";
|
||||
export default function VehiclesListComponent({
|
||||
@@ -12,7 +12,7 @@ export default function VehiclesListComponent({
|
||||
total,
|
||||
refetch,
|
||||
}) {
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const {
|
||||
page,
|
||||
//sortcolumn, sortorder,
|
||||
|
||||
@@ -4,11 +4,11 @@ import { useQuery } from "@apollo/client";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
import { QUERY_ALL_VEHICLES_PAGINATED } from "../../graphql/vehicles.queries";
|
||||
import queryString from "query-string";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import {pageLimit} from "../../utils/config";
|
||||
|
||||
export default function VehiclesListContainer() {
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { page, sortcolumn, sortorder, search } = searchParams;
|
||||
|
||||
const { loading, error, data, refetch } = useQuery(
|
||||
|
||||
@@ -4,7 +4,7 @@ import queryString from "query-string";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import {
|
||||
DELETE_VENDOR,
|
||||
@@ -23,7 +23,7 @@ const mapStateToProps = createStructuredSelector({
|
||||
|
||||
function VendorsFormContainer({ refetch, bodyshop }) {
|
||||
const history = useNavigate();
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const { selectedvendor } = search;
|
||||
const [formLoading, setFormLoading] = useState(false);
|
||||
const [form] = Form.useForm();
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Button, Card, Input, Space, Table } from "antd";
|
||||
import queryString from "query-string";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { alphaSort } from "../../utils/sorters";
|
||||
|
||||
export default function VendorsListComponent({
|
||||
@@ -13,7 +13,7 @@ export default function VendorsListComponent({
|
||||
vendors,
|
||||
refetch,
|
||||
}) {
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const { selectedvendor } = search;
|
||||
|
||||
const [state, setState] = useState({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useQuery } from "@apollo/client";
|
||||
import queryString from "query-string";
|
||||
import React from "react";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
import { QUERY_ALL_VENDORS } from "../../graphql/vendors.queries";
|
||||
import VendorsListComponent from "./vendors-list.component";
|
||||
@@ -11,7 +11,7 @@ export default function VendorsListContainer() {
|
||||
fetchPolicy: "network-only",
|
||||
nextFetchPolicy: "network-only",
|
||||
});
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const history = useNavigate();
|
||||
|
||||
const handleNewVendor = () => {
|
||||
|
||||
@@ -5,7 +5,7 @@ import queryString from "query-string";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { Link, useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { Link, useNavigate, useLocation } from "react-router-dom";
|
||||
import BillDeleteButton from "../../components/bill-delete-button/bill-delete-button.component";
|
||||
import PartsOrderModalContainer from "../../components/parts-order-modal/parts-order-modal.container";
|
||||
import PrintWrapperComponent from "../../components/print-wrapper/print-wrapper.component";
|
||||
@@ -31,7 +31,7 @@ export function BillsListPage({
|
||||
setPartsOrderContext,
|
||||
setBillEnterContext,
|
||||
}) {
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const [openSearchResults, setOpenSearchResults] = useState([]);
|
||||
const [searchLoading, setSearchLoading] = useState(false);
|
||||
const { page } = search;
|
||||
|
||||
@@ -3,7 +3,7 @@ import queryString from "query-string";
|
||||
import React, { useEffect } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
import BillDetailEditContainer from "../../components/bill-detail-edit/bill-detail-edit.container";
|
||||
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||
@@ -22,7 +22,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
export function BillsPageContainer({ setBreadcrumbs, setSelectedHeader }) {
|
||||
const { t } = useTranslation();
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { page, sortcolumn, sortorder, searchObj } = searchParams;
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Form, notification } from "antd";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useSearchParams, useNavigate } from "react-router-dom";
|
||||
import { useLocation, useNavigate } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||
import { INSERT_NEW_CONTRACT } from "../../graphql/cccontracts.queries";
|
||||
@@ -30,13 +30,15 @@ export function ContractCreatePageContainer({
|
||||
}) {
|
||||
const [form] = Form.useForm();
|
||||
const { t } = useTranslation();
|
||||
|
||||
const history = useNavigate();
|
||||
const searchParams = useSearchParams();
|
||||
const location = useLocation();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const selectedCarState = useState(null);
|
||||
const selectedJobState = useState(
|
||||
(searchParams.get('state') && searchParams.get('state').jobId) || null
|
||||
(location.state && location.state.jobId) || null
|
||||
);
|
||||
|
||||
const [insertContract] = useMutation(INSERT_NEW_CONTRACT);
|
||||
const [intakeJob] = useMutation(UPDATE_JOB);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import queryString from "query-string";
|
||||
import React, { useEffect } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||
import { QUERY_ACTIVE_CONTRACTS_PAGINATED } from "../../graphql/cccontracts.queries";
|
||||
@@ -20,7 +20,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
});
|
||||
|
||||
export function ContractsPageContainer({ setBreadcrumbs, setSelectedHeader }) {
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { search, page, sortcolumn, sortorder } = searchParams;
|
||||
|
||||
const { loading, error, data, refetch } = useQuery(
|
||||
|
||||
@@ -18,7 +18,7 @@ import CourtesyCarDetailPageComponent from "./courtesy-car-detail.page.component
|
||||
import NotFound from "../../components/not-found/not-found.component";
|
||||
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
||||
import queryString from "query-string";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import {pageLimit} from "../../utils/config";
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
@@ -31,7 +31,7 @@ export function CourtesyCarDetailPageContainer({
|
||||
addRecentItem,
|
||||
setSelectedHeader,
|
||||
}) {
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams =queryString.parse(useLocation().search);
|
||||
const { page, sortcolumn, sortorder } = searchParams;
|
||||
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Button, Card, Col, notification, Row, Select, Space } from "antd";
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import SocketIO from "socket.io-client";
|
||||
import DmsAllocationsSummaryApComponent from "../../components/dms-allocations-summary-ap/dms-allocations-summary-ap.component";
|
||||
@@ -45,8 +45,8 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
||||
const history = useNavigate();
|
||||
const [logs, setLogs] = useState([]);
|
||||
|
||||
const searchParams = useSearchParams();
|
||||
const state = Object.fromEntries(searchParams);
|
||||
const { state } = useLocation();
|
||||
|
||||
const logsRef = useRef(null);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -13,7 +13,7 @@ import queryString from "query-string";
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { Link, useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { Link, useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import SocketIO from "socket.io-client";
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
@@ -62,7 +62,7 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
||||
const [logLevel, setLogLevel] = useState("DEBUG");
|
||||
const history = useNavigate();
|
||||
const [logs, setLogs] = useState([]);
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const { jobId } = search;
|
||||
|
||||
const { loading, error, data } = useQuery(QUERY_JOB_EXPORT_DMS, {
|
||||
|
||||
@@ -6,7 +6,7 @@ import queryString from "query-string";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { Link, useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { Link, useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
import { QUERY_EXPORT_LOG_PAGINATED } from "../../graphql/accounting.queries";
|
||||
@@ -19,7 +19,7 @@ const mapStateToProps = createStructuredSelector({
|
||||
});
|
||||
|
||||
export function ExportLogsPageComponent({ bodyshop }) {
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { page, sortcolumn, sortorder, search } = searchParams;
|
||||
const history = useNavigate();
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import queryString from "query-string";
|
||||
import React, { useEffect } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
import JobsListPaginated from "../../components/jobs-list-paginated/jobs-list-paginated.component";
|
||||
@@ -25,7 +25,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
});
|
||||
|
||||
export function AllJobs({ setBreadcrumbs, setSelectedHeader }) {
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { page, sortcolumn, sortorder, statusFilters } = searchParams;
|
||||
|
||||
const { loading, error, data, refetch } = useQuery(
|
||||
|
||||
@@ -24,7 +24,7 @@ import React, { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { FaHardHat, FaRegStickyNote, FaShieldAlt } from "react-icons/fa";
|
||||
import { connect } from "react-redux";
|
||||
import {useNavigate, useSearchParams} from "react-router-dom";
|
||||
import {useNavigate, useLocation} from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import FormFieldsChanged from "../../components/form-fields-changed-alert/form-fields-changed-alert.component";
|
||||
import JobAuditTrail from "../../components/job-audit-trail/job-audit-trail.component";
|
||||
@@ -79,7 +79,7 @@ export function JobsDetailPage({
|
||||
const [form] = Form.useForm();
|
||||
const history = useNavigate();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const formItemLayout = {
|
||||
layout: "vertical",
|
||||
};
|
||||
|
||||
@@ -2,6 +2,7 @@ import { useMutation, useQuery } from "@apollo/client";
|
||||
import React, { useEffect } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import {useParams} from 'react-router-dom';
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
import SpinComponent from "../../components/loading-spinner/loading-spinner.component";
|
||||
@@ -32,14 +33,12 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
});
|
||||
|
||||
function JobsDetailPageContainer({
|
||||
bodyshop,
|
||||
match,
|
||||
setBreadcrumbs,
|
||||
addRecentItem,
|
||||
setSelectedHeader,
|
||||
setJobReadOnly,
|
||||
}) {
|
||||
const { jobId } = match.params;
|
||||
const { jobId } = useParams();
|
||||
const { t } = useTranslation();
|
||||
|
||||
const { loading, error, data, refetch } = useQuery(GET_JOB_BY_PK, {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { BackTop, Layout } from "antd";
|
||||
import {BackTop, Layout} from "antd";
|
||||
import preval from "preval.macro";
|
||||
import React, { lazy, Suspense, useEffect } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { Link, Route, Routes } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import React, {lazy, Suspense, useEffect} from "react";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import {connect} from "react-redux";
|
||||
import {Link, Route, Routes, useLocation, useParams} from "react-router-dom";
|
||||
import {createStructuredSelector} from "reselect";
|
||||
import BreadCrumbs from "../../components/breadcrumbs/breadcrumbs.component";
|
||||
import ChatAffixContainer from "../../components/chat-affix/chat-affix.container";
|
||||
import ConflictComponent from "../../components/conflict/conflict.component";
|
||||
@@ -17,400 +17,395 @@ import PartnerPingComponent from "../../components/partner-ping/partner-ping.com
|
||||
import PrintCenterModalContainer from "../../components/print-center-modal/print-center-modal.container";
|
||||
import ShopSubStatusComponent from "../../components/shop-sub-status/shop-sub-status.component";
|
||||
import TestComponent from "../../components/_test/test.page";
|
||||
import { requestForToken } from "../../firebase/firebase.utils";
|
||||
import {
|
||||
selectBodyshop,
|
||||
selectInstanceConflict,
|
||||
} from "../../redux/user/user.selectors";
|
||||
import {requestForToken} from "../../firebase/firebase.utils";
|
||||
import {selectBodyshop, selectInstanceConflict,} from "../../redux/user/user.selectors";
|
||||
import * as Sentry from "@sentry/react";
|
||||
|
||||
import "./manage.page.styles.scss";
|
||||
import UpdateAlert from "../../components/update-alert/update-alert.component";
|
||||
|
||||
const ManageRootPage = lazy(() =>
|
||||
import("../manage-root/manage-root.page.container")
|
||||
import("../manage-root/manage-root.page.container")
|
||||
);
|
||||
const JobsPage = lazy(() => import("../jobs/jobs.page"));
|
||||
|
||||
const CardPaymentModalContainer = lazy(() =>
|
||||
import("../../components/card-payment-modal/card-payment-modal.container.")
|
||||
import("../../components/card-payment-modal/card-payment-modal.container.")
|
||||
);
|
||||
|
||||
const JobsDetailPage = lazy(() =>
|
||||
import("../jobs-detail/jobs-detail.page.container")
|
||||
import("../jobs-detail/jobs-detail.page.container")
|
||||
);
|
||||
const InventoryListPage = lazy(() => import("../inventory/inventory.page"));
|
||||
const ProfilePage = lazy(() => import("../profile/profile.container.page"));
|
||||
const JobsAvailablePage = lazy(() =>
|
||||
import("../jobs-available/jobs-available.page.container")
|
||||
import("../jobs-available/jobs-available.page.container")
|
||||
);
|
||||
const ScheduleContainer = lazy(() =>
|
||||
import("../schedule/schedule.page.container")
|
||||
import("../schedule/schedule.page.container")
|
||||
);
|
||||
const VehiclesContainer = lazy(() =>
|
||||
import("../vehicles/vehicles.page.container")
|
||||
import("../vehicles/vehicles.page.container")
|
||||
);
|
||||
const VehiclesDetailContainer = lazy(() =>
|
||||
import("../vehicles-detail/vehicles-detail.page.container")
|
||||
import("../vehicles-detail/vehicles-detail.page.container")
|
||||
);
|
||||
const OwnersContainer = lazy(() => import("../owners/owners.page.container"));
|
||||
const OwnersDetailContainer = lazy(() =>
|
||||
import("../owners-detail/owners-detail.page.container")
|
||||
import("../owners-detail/owners-detail.page.container")
|
||||
);
|
||||
const ShopPage = lazy(() => import("../shop/shop.page.component"));
|
||||
const ShopVendorPageContainer = lazy(() =>
|
||||
import("../shop-vendor/shop-vendor.page.container")
|
||||
import("../shop-vendor/shop-vendor.page.container")
|
||||
);
|
||||
const EmailOverlayContainer = lazy(() =>
|
||||
import("../../components/email-overlay/email-overlay.container.jsx")
|
||||
import("../../components/email-overlay/email-overlay.container.jsx")
|
||||
);
|
||||
const JobsCreateContainerPage = lazy(() =>
|
||||
import("../jobs-create/jobs-create.container")
|
||||
import("../jobs-create/jobs-create.container")
|
||||
);
|
||||
const CourtesyCarCreateContainer = lazy(() =>
|
||||
import("../courtesy-car-create/courtesy-car-create.page.container")
|
||||
import("../courtesy-car-create/courtesy-car-create.page.container")
|
||||
);
|
||||
const CourtesyCarDetailContainer = lazy(() =>
|
||||
import("../courtesy-car-detail/courtesy-car-detail.page.container")
|
||||
import("../courtesy-car-detail/courtesy-car-detail.page.container")
|
||||
);
|
||||
const CourtesyCarsPage = lazy(() =>
|
||||
import("../courtesy-cars/courtesy-cars.page.container")
|
||||
import("../courtesy-cars/courtesy-cars.page.container")
|
||||
);
|
||||
const ContractCreatePage = lazy(() =>
|
||||
import("../contract-create/contract-create.page.container")
|
||||
import("../contract-create/contract-create.page.container")
|
||||
);
|
||||
const ContractDetailPage = lazy(() =>
|
||||
import("../contract-detail/contract-detail.page.container")
|
||||
import("../contract-detail/contract-detail.page.container")
|
||||
);
|
||||
const ContractsList = lazy(() =>
|
||||
import("../contracts/contracts.page.container")
|
||||
import("../contracts/contracts.page.container")
|
||||
);
|
||||
const BillsListPage = lazy(() => import("../bills/bills.page.container"));
|
||||
|
||||
const JobCostingModal = lazy(() =>
|
||||
import("../../components/job-costing-modal/job-costing-modal.container")
|
||||
import("../../components/job-costing-modal/job-costing-modal.container")
|
||||
);
|
||||
const ReportCenterModal = lazy(() =>
|
||||
import("../../components/report-center-modal/report-center-modal.container")
|
||||
import("../../components/report-center-modal/report-center-modal.container")
|
||||
);
|
||||
const BillEnterModalContainer = lazy(() =>
|
||||
import("../../components/bill-enter-modal/bill-enter-modal.container")
|
||||
import("../../components/bill-enter-modal/bill-enter-modal.container")
|
||||
);
|
||||
const TimeTicketModalContainer = lazy(() =>
|
||||
import("../../components/time-ticket-modal/time-ticket-modal.container")
|
||||
import("../../components/time-ticket-modal/time-ticket-modal.container")
|
||||
);
|
||||
const PaymentModalContainer = lazy(() =>
|
||||
import("../../components/payment-modal/payment-modal.container")
|
||||
import("../../components/payment-modal/payment-modal.container")
|
||||
);
|
||||
const ProductionListPage = lazy(() =>
|
||||
import("../production-list/production-list.container")
|
||||
import("../production-list/production-list.container")
|
||||
);
|
||||
const ProductionBoardPage = lazy(() =>
|
||||
import("../production-board/production-board.container")
|
||||
import("../production-board/production-board.container")
|
||||
);
|
||||
// const ShopTemplates = lazy(() =>
|
||||
// import("../shop-templates/shop-templates.container")
|
||||
// );
|
||||
const JobIntake = lazy(() =>
|
||||
import("../jobs-intake/jobs-intake.page.container")
|
||||
import("../jobs-intake/jobs-intake.page.container")
|
||||
);
|
||||
const JobChecklistView = lazy(() =>
|
||||
import("../jobs-checklist-view/jobs-checklist-view.page")
|
||||
import("../jobs-checklist-view/jobs-checklist-view.page")
|
||||
);
|
||||
const JobDeliver = lazy(() =>
|
||||
import("../jobs-deliver/jobs-delivery.page.container")
|
||||
import("../jobs-deliver/jobs-delivery.page.container")
|
||||
);
|
||||
const AccountingQboCallback = lazy(() =>
|
||||
import("../accounting-qbo/accounting-qbo.page")
|
||||
import("../accounting-qbo/accounting-qbo.page")
|
||||
);
|
||||
const AccountingReceivables = lazy(() =>
|
||||
import("../accounting-receivables/accounting-receivables.container")
|
||||
import("../accounting-receivables/accounting-receivables.container")
|
||||
);
|
||||
const AccountingPayables = lazy(() =>
|
||||
import("../accounting-payables/accounting-payables.container")
|
||||
import("../accounting-payables/accounting-payables.container")
|
||||
);
|
||||
const AccountingPayments = lazy(() =>
|
||||
import("../accounting-payments/accounting-payments.container")
|
||||
import("../accounting-payments/accounting-payments.container")
|
||||
);
|
||||
const AllJobs = lazy(() => import("../jobs-all/jobs-all.container"));
|
||||
const ReadyJobs = lazy(() => import("../jobs-ready/jobs-ready.page"));
|
||||
const JobsClose = lazy(() => import("../jobs-close/jobs-close.container"));
|
||||
const JobsAdmin = lazy(() => import("../jobs-admin/jobs-admin.page"));
|
||||
const TempDocs = lazy(() =>
|
||||
import("../temporary-docs/temporary-docs.container")
|
||||
import("../temporary-docs/temporary-docs.container")
|
||||
);
|
||||
|
||||
const ShopCsiPageContainer = lazy(() =>
|
||||
import("../shop-csi/shop-csi.container.page")
|
||||
import("../shop-csi/shop-csi.container.page")
|
||||
);
|
||||
const PaymentsAll = lazy(() =>
|
||||
import("../payments-all/payments-all.container.page")
|
||||
import("../payments-all/payments-all.container.page")
|
||||
);
|
||||
const ShiftClock = lazy(() => import("../shift-clock/shift-clock.page"));
|
||||
const Scoreboard = lazy(() =>
|
||||
import("../scoreboard/scoreboard.page.container")
|
||||
import("../scoreboard/scoreboard.page.container")
|
||||
);
|
||||
const TimeTicketsAll = lazy(() =>
|
||||
import("../time-tickets/time-tickets.container")
|
||||
import("../time-tickets/time-tickets.container")
|
||||
);
|
||||
const Help = lazy(() => import("../help/help.page"));
|
||||
const PartsQueue = lazy(() =>
|
||||
import("../parts-queue/parts-queue.page.container")
|
||||
import("../parts-queue/parts-queue.page.container")
|
||||
);
|
||||
const ExportLogs = lazy(() =>
|
||||
import("../export-logs/export-logs.page.container")
|
||||
import("../export-logs/export-logs.page.container")
|
||||
);
|
||||
const Phonebook = lazy(() => import("../phonebook/phonebook.page.container"));
|
||||
|
||||
const EmailTest = lazy(() =>
|
||||
import("../../components/email-test/email-test-component")
|
||||
import("../../components/email-test/email-test-component")
|
||||
);
|
||||
const Dashboard = lazy(() => import("../dashboard/dashboard.container"));
|
||||
const Dms = lazy(() => import("../dms/dms.container"));
|
||||
const DmsPayables = lazy(() =>
|
||||
import("../dms-payables/dms-payables.container")
|
||||
import("../dms-payables/dms-payables.container")
|
||||
);
|
||||
|
||||
const { Content, Footer } = Layout;
|
||||
const {Content, Footer} = Layout;
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
conflict: selectInstanceConflict,
|
||||
bodyshop: selectBodyshop,
|
||||
conflict: selectInstanceConflict,
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
|
||||
export function Manage({ match, conflict, bodyshop }) {
|
||||
export function Manage({conflict, bodyshop}) {
|
||||
|
||||
// TODO: Remove after client upgrade
|
||||
console.log('Manage Page :');
|
||||
console.dir({ match, conflict, bodyshop });
|
||||
const location = useLocation();
|
||||
const params = useParams();
|
||||
const currentPath = location.pathname
|
||||
console.dir(currentPath)
|
||||
const {t} = useTranslation();
|
||||
|
||||
const { t } = useTranslation();
|
||||
useEffect(() => {
|
||||
const widgetId = "IABVNO4scRKY11XBQkNr";
|
||||
window.noticeable.render("widget", widgetId);
|
||||
try {
|
||||
requestForToken();
|
||||
} catch (error) {
|
||||
console.log("Unable to request for token.", error);
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const widgetId = "IABVNO4scRKY11XBQkNr";
|
||||
window.noticeable.render("widget", widgetId);
|
||||
try {
|
||||
requestForToken();
|
||||
} catch (error) {
|
||||
console.log("Unable to request for token.", error);
|
||||
}
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
document.title = t("titles.app");
|
||||
}, [t]);
|
||||
const AppRouteTable = (
|
||||
<Suspense
|
||||
fallback={<LoadingSpinner message={t("general.labels.loadingapp")}/>}This
|
||||
>
|
||||
<PaymentModalContainer/>
|
||||
|
||||
useEffect(() => {
|
||||
document.title = t("titles.app");
|
||||
}, [t]);
|
||||
<CardPaymentModalContainer/>
|
||||
|
||||
const AppRouteTable = (
|
||||
<Suspense
|
||||
fallback={<LoadingSpinner message={t("general.labels.loadingapp")} />}
|
||||
>
|
||||
<PaymentModalContainer />
|
||||
<BreadCrumbs/>
|
||||
<BillEnterModalContainer/>
|
||||
<JobCostingModal/>
|
||||
<ReportCenterModal/>
|
||||
<EmailOverlayContainer/>
|
||||
<TimeTicketModalContainer/>
|
||||
<PrintCenterModalContainer/>
|
||||
<Routes>
|
||||
<Route path='/_test' element={<TestComponent/>}/>
|
||||
<Route path='/' element={<ManageRootPage/>}/>
|
||||
<Route path='/jobs' element={<JobsPage/>}/>
|
||||
<Route
|
||||
path='/jobs/:jobId/intake'
|
||||
element={<JobIntake/>}
|
||||
/>
|
||||
<Route
|
||||
path='/jobs/:jobId/deliver'
|
||||
element={<JobDeliver/>}
|
||||
/>
|
||||
<Route
|
||||
path='/jobs/:jobId/checklist'
|
||||
element={<JobChecklistView/>}
|
||||
/>
|
||||
<Route
|
||||
path='/jobs/:jobId/close'
|
||||
element={<JobsClose/>}
|
||||
/>
|
||||
<Route
|
||||
path='/jobs/:jobId/admin'
|
||||
element={<JobsAdmin/>}
|
||||
/>
|
||||
<Route path='/jobs/all' element={<AllJobs/>}/>
|
||||
<Route path='/jobs/ready' element={<ReadyJobs/>}/>
|
||||
<Route
|
||||
path='/jobs/new'
|
||||
element={<JobsCreateContainerPage/>}
|
||||
/>
|
||||
<Route path='/jobs/:jobId' element={<JobsDetailPage/>}/>
|
||||
<Route path='/temporarydocs/' element={<TempDocs/>}/>
|
||||
<Route
|
||||
path='/inventory/'
|
||||
element={<InventoryListPage/>}
|
||||
/>
|
||||
<Route
|
||||
path='/courtesycars/'
|
||||
element={<CourtesyCarsPage/>}
|
||||
/>
|
||||
<Route
|
||||
path='/courtesycars/new'
|
||||
element={<CourtesyCarCreateContainer/>}
|
||||
/>
|
||||
<Route
|
||||
path='/courtesycars/contracts'
|
||||
element={<ContractsList/>}
|
||||
/>
|
||||
<Route
|
||||
path='/courtesycars/contracts/new'
|
||||
element={<ContractCreatePage/>}
|
||||
/>
|
||||
<Route
|
||||
path='/courtesycars/contracts/:contractId'
|
||||
element={<ContractDetailPage/>}
|
||||
/>
|
||||
<Route
|
||||
path='/courtesycars/:ccId'
|
||||
element={<CourtesyCarDetailContainer/>}
|
||||
/>
|
||||
<Route path='/profile' element={<ProfilePage/>}/>
|
||||
<Route
|
||||
path='/vehicles'
|
||||
element={<VehiclesContainer/>}
|
||||
/>
|
||||
<Route
|
||||
path='/production/list'
|
||||
element={<ProductionListPage/>}
|
||||
/>
|
||||
<Route
|
||||
path='/production/board'
|
||||
element={<ProductionBoardPage/>}
|
||||
/>
|
||||
<Route
|
||||
path='/vehicles/:vehId'
|
||||
element={<VehiclesDetailContainer/>}
|
||||
/>
|
||||
<Route path='/bills' element={<BillsListPage/>}/>
|
||||
<Route path='/owners' element={<OwnersContainer/>}/>
|
||||
<Route
|
||||
path='/owners/:ownerId'
|
||||
element={<OwnersDetailContainer/>}
|
||||
/>
|
||||
<Route
|
||||
path='/schedule'
|
||||
element={<ScheduleContainer/>}
|
||||
/>
|
||||
<Route
|
||||
path='/available'
|
||||
element={<JobsAvailablePage/>}
|
||||
/>
|
||||
<Route path='/shop' element={<ShopPage/>}/>
|
||||
{
|
||||
// <Route
|
||||
// path={`${currentPath}/shop/templates`}
|
||||
// element={<ShopTemplates />}
|
||||
// />
|
||||
}
|
||||
<Route
|
||||
path='/shop/vendors'
|
||||
element={<ShopVendorPageContainer/>}
|
||||
/>
|
||||
<Route
|
||||
path='/shop/csi'
|
||||
element={<ShopCsiPageContainer/>}
|
||||
/>
|
||||
|
||||
<CardPaymentModalContainer />
|
||||
<Route
|
||||
path='/accounting/qbo'
|
||||
element={<AccountingQboCallback/>}
|
||||
/>
|
||||
|
||||
<BreadCrumbs />
|
||||
<BillEnterModalContainer />
|
||||
<JobCostingModal />
|
||||
<ReportCenterModal />
|
||||
<EmailOverlayContainer />
|
||||
<TimeTicketModalContainer />
|
||||
<PrintCenterModalContainer />
|
||||
<Route path={`${match.path}/_test`} element={<TestComponent />} />
|
||||
<Route path={`${match.path}`} element={<ManageRootPage />} />
|
||||
<Route path={`${match.path}/jobs`} element={<JobsPage />} />
|
||||
<Routes>
|
||||
<Route
|
||||
path={`${match.path}/jobs/:jobId/intake`}
|
||||
element={<JobIntake />}
|
||||
/>
|
||||
<Route
|
||||
path={`${match.path}/jobs/:jobId/deliver`}
|
||||
element={<JobDeliver />}
|
||||
/>
|
||||
<Route
|
||||
path={`${match.path}/jobs/:jobId/checklist`}
|
||||
element={<JobChecklistView />}
|
||||
/>
|
||||
<Route
|
||||
path={`${match.path}/jobs/:jobId/close`}
|
||||
element={<JobsClose />}
|
||||
/>
|
||||
<Route
|
||||
path={`${match.path}/jobs/:jobId/admin`}
|
||||
element={<JobsAdmin />}
|
||||
/>
|
||||
<Route path={`${match.path}/jobs/all`} element={<AllJobs />} />
|
||||
<Route path={`${match.path}/jobs/ready`} element={<ReadyJobs />} />
|
||||
<Route
|
||||
path={`${match.path}/jobs/new`}
|
||||
element={<JobsCreateContainerPage />}
|
||||
/>
|
||||
<Route path={`${match.path}/jobs/:jobId`} element={<JobsDetailPage />} />
|
||||
</Routes>
|
||||
<Route path={`${match.path}/temporarydocs/`} element={<TempDocs />} />
|
||||
<Route
|
||||
path={`${match.path}/inventory/`}
|
||||
element={<InventoryListPage />}
|
||||
/>
|
||||
<Route
|
||||
path={`${match.path}/courtesycars/`}
|
||||
element={<CourtesyCarsPage />}
|
||||
/>
|
||||
<Routes>
|
||||
<Route
|
||||
path={`${match.path}/courtesycars/new`}
|
||||
element={<CourtesyCarCreateContainer />}
|
||||
/>
|
||||
<Route
|
||||
path={`${match.path}/courtesycars/contracts`}
|
||||
element={<ContractsList />}
|
||||
/>
|
||||
<Route
|
||||
path={`${match.path}/courtesycars/contracts/new`}
|
||||
element={<ContractCreatePage />}
|
||||
/>
|
||||
<Route
|
||||
path={`${match.path}/courtesycars/contracts/:contractId`}
|
||||
element={<ContractDetailPage />}
|
||||
/>
|
||||
<Route
|
||||
path={`${match.path}/courtesycars/:ccId`}
|
||||
element={<CourtesyCarDetailContainer />}
|
||||
/>
|
||||
</Routes>
|
||||
<Route path={`${match.path}/profile`} element={<ProfilePage />} />
|
||||
<Route
|
||||
path={`${match.path}/vehicles`}
|
||||
element={<VehiclesContainer />}
|
||||
/>
|
||||
<Route
|
||||
path={`${match.path}/production/list`}
|
||||
element={<ProductionListPage />}
|
||||
/>
|
||||
<Route
|
||||
path={`${match.path}/production/board`}
|
||||
element={<ProductionBoardPage />}
|
||||
/>
|
||||
<Route
|
||||
path={`${match.path}/vehicles/:vehId`}
|
||||
element={<VehiclesDetailContainer />}
|
||||
/>
|
||||
<Route path={`${match.path}/bills`} element={<BillsListPage />} />
|
||||
<Route path={`${match.path}/owners`} element={<OwnersContainer />} />
|
||||
<Route
|
||||
path={`${match.path}/owners/:ownerId`}
|
||||
element={<OwnersDetailContainer />}
|
||||
/>
|
||||
<Route
|
||||
path={`${match.path}/schedule`}
|
||||
element={<ScheduleContainer />}
|
||||
/>
|
||||
<Route
|
||||
path={`${match.path}/available`}
|
||||
element={<JobsAvailablePage />}
|
||||
/>
|
||||
<Route path={`${match.path}/shop/`} element={<ShopPage />} />
|
||||
{
|
||||
// <Route
|
||||
// path={`${match.path}/shop/templates`}
|
||||
// element={<ShopTemplates />}
|
||||
// />
|
||||
}
|
||||
<Route
|
||||
path={`${match.path}/shop/vendors`}
|
||||
element={<ShopVendorPageContainer />}
|
||||
/>
|
||||
<Route
|
||||
path={`${match.path}/shop/csi`}
|
||||
element={<ShopCsiPageContainer />}
|
||||
/>
|
||||
<Route
|
||||
path='/accounting/receivables'
|
||||
element={<AccountingReceivables/>}
|
||||
/>
|
||||
<Route
|
||||
path='/accounting/payables'
|
||||
element={<AccountingPayables/>}
|
||||
/>
|
||||
<Route
|
||||
path='/accounting/payments'
|
||||
element={<AccountingPayments/>}
|
||||
/>
|
||||
<Route
|
||||
path='/accounting/exportlogs'
|
||||
element={<ExportLogs/>}
|
||||
/>
|
||||
<Route path='/partsqueue' element={<PartsQueue/>}/>
|
||||
<Route path='/phonebook' element={<Phonebook/>}/>
|
||||
|
||||
<Route
|
||||
path={`${match.path}/accounting/qbo`}
|
||||
element={<AccountingQboCallback />}
|
||||
/>
|
||||
<Route path='/payments' element={<PaymentsAll/>}/>
|
||||
<Route path='/shiftclock' element={<ShiftClock/>}/>
|
||||
<Route path='/scoreboard' element={<Scoreboard/>}/>
|
||||
<Route
|
||||
path='/timetickets'
|
||||
element={<TimeTicketsAll/>}
|
||||
/>
|
||||
<Route path='/help' element={<Help/>}/>
|
||||
<Route path='/emailtest' element={<EmailTest/>}/>
|
||||
<Route path='/dashboard' element={<Dashboard/>}/>
|
||||
<Route path='/dms' element={<Dms/>}/>
|
||||
<Route path='/dmsap' element={<DmsPayables/>}/>
|
||||
</Routes>
|
||||
</Suspense>
|
||||
);
|
||||
|
||||
<Route
|
||||
path={`${match.path}/accounting/receivables`}
|
||||
element={<AccountingReceivables />}
|
||||
/>
|
||||
<Route
|
||||
path={`${match.path}/accounting/payables`}
|
||||
element={<AccountingPayables />}
|
||||
/>
|
||||
<Route
|
||||
path={`${match.path}/accounting/payments`}
|
||||
element={<AccountingPayments />}
|
||||
/>
|
||||
<Route
|
||||
path={`${match.path}/accounting/exportlogs`}
|
||||
element={<ExportLogs />}
|
||||
/>
|
||||
<Route path={`${match.path}/partsqueue`} element={<PartsQueue />} />
|
||||
<Route path={`${match.path}/phonebook`} element={<Phonebook />} />
|
||||
let PageContent;
|
||||
|
||||
<Route path={`${match.path}/payments`} element={<PaymentsAll />} />
|
||||
<Route path={`${match.path}/shiftclock`} element={<ShiftClock />} />
|
||||
<Route path={`${match.path}/scoreboard`} element={<Scoreboard />} />
|
||||
<Route
|
||||
path={`${match.path}/timetickets`}
|
||||
element={<TimeTicketsAll />}
|
||||
/>
|
||||
<Route path={`${match.path}/help`} element={<Help />} />
|
||||
<Route path={`${match.path}/emailtest`} element={<EmailTest />} />
|
||||
<Route path={`${match.path}/dashboard`} element={<Dashboard />} />
|
||||
<Route path={`${match.path}/dms`} element={<Dms />} />
|
||||
<Route path={`${match.path}/dmsap`} element={<DmsPayables />} />
|
||||
</Suspense>
|
||||
);
|
||||
if (conflict) PageContent = <ConflictComponent/>;
|
||||
else if (bodyshop && bodyshop.sub_status !== "active")
|
||||
PageContent = <ShopSubStatusComponent/>;
|
||||
else PageContent = AppRouteTable;
|
||||
|
||||
let PageContent;
|
||||
return (
|
||||
<>
|
||||
<ChatAffixContainer/>
|
||||
<Layout className="layout-container">
|
||||
<UpdateAlert/>
|
||||
<HeaderContainer/>
|
||||
|
||||
if (conflict) PageContent = <ConflictComponent />;
|
||||
else if (bodyshop && bodyshop.sub_status !== "active")
|
||||
PageContent = <ShopSubStatusComponent />;
|
||||
else PageContent = AppRouteTable;
|
||||
<Content className="content-container">
|
||||
<PartnerPingComponent/>
|
||||
<Sentry.ErrorBoundary fallback={<ErrorBoundary/>} showDialog>
|
||||
{PageContent}
|
||||
</Sentry.ErrorBoundary>
|
||||
|
||||
return (
|
||||
<>
|
||||
<ChatAffixContainer />
|
||||
<Layout className="layout-container">
|
||||
<UpdateAlert />
|
||||
<HeaderContainer />
|
||||
|
||||
<Content className="content-container">
|
||||
<PartnerPingComponent />
|
||||
<Sentry.ErrorBoundary fallback={<ErrorBoundary />} showDialog>
|
||||
{PageContent}
|
||||
</Sentry.ErrorBoundary>
|
||||
|
||||
<BackTop />
|
||||
<Footer>
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
margin: "1rem 0rem",
|
||||
}}
|
||||
>
|
||||
<div style={{ display: "flex" }}>
|
||||
<div>
|
||||
{`ImEX Online ${
|
||||
process.env.REACT_APP_GIT_SHA
|
||||
} - ${preval`module.exports = new Date().toLocaleString("en-US", {timeZone: "America/Los_Angeles"});`}`}
|
||||
</div>
|
||||
<div id="noticeable-widget" style={{ marginLeft: "1rem" }} />
|
||||
</div>
|
||||
<Link to="/disclaimer" target="_blank" style={{ color: "#ccc" }}>
|
||||
Disclaimer & Notices
|
||||
</Link>
|
||||
</div>
|
||||
</Footer>
|
||||
</Content>
|
||||
</Layout>
|
||||
</>
|
||||
);
|
||||
<BackTop/>
|
||||
<Footer>
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
margin: "1rem 0rem",
|
||||
}}
|
||||
>
|
||||
<div style={{display: "flex"}}>
|
||||
<div>
|
||||
{`ImEX Online ${
|
||||
process.env.REACT_APP_GIT_SHA
|
||||
} - ${preval`module.exports = new Date().toLocaleString("en-US", {timeZone: "America/Los_Angeles"});`}`}
|
||||
</div>
|
||||
<div id="noticeable-widget" style={{marginLeft: "1rem"}}/>
|
||||
</div>
|
||||
<Link to="/disclaimer" target="_blank" style={{color: "#ccc"}}>
|
||||
Disclaimer & Notices
|
||||
</Link>
|
||||
</div>
|
||||
</Footer>
|
||||
</Content>
|
||||
</Layout>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, null)(Manage);
|
||||
|
||||
@@ -13,7 +13,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
setBodyshop: (bs) => dispatch(setBodyshop(bs)),
|
||||
});
|
||||
|
||||
function ManagePageContainer({ match, setBodyshop }) {
|
||||
function ManagePageContainer({ setBodyshop }) {
|
||||
const { loading, error, data } = useQuery(QUERY_BODYSHOP, {
|
||||
fetchPolicy: "network-only",
|
||||
nextFetchPolicy: "network-only",
|
||||
@@ -31,7 +31,7 @@ function ManagePageContainer({ match, setBodyshop }) {
|
||||
return <LoadingSpinner message={t("general.labels.loadingshop")} />;
|
||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||
|
||||
return <ManagePage match={match} />;
|
||||
return <ManagePage />;
|
||||
}
|
||||
|
||||
export default connect(null, mapDispatchToProps)(ManagePageContainer);
|
||||
|
||||
@@ -2,6 +2,7 @@ import { useQuery } from "@apollo/client";
|
||||
import React, { useEffect } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import {useParams} from 'react-router-dom';
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
||||
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||
@@ -23,12 +24,11 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
});
|
||||
|
||||
export function OwnersDetailContainer({
|
||||
match,
|
||||
setBreadcrumbs,
|
||||
addRecentItem,
|
||||
setSelectedHeader,
|
||||
}) {
|
||||
const { ownerId } = match.params;
|
||||
const { ownerId } = useParams();
|
||||
const { t } = useTranslation();
|
||||
|
||||
const { loading, data, error, refetch } = useQuery(QUERY_OWNER_BY_ID, {
|
||||
|
||||
@@ -6,7 +6,7 @@ import queryString from "query-string";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { Link, useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { Link, useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
import JobPartsQueueCount from "../../components/job-parts-queue-count/job-parts-queue-count.component";
|
||||
@@ -25,7 +25,7 @@ const mapStateToProps = createStructuredSelector({
|
||||
});
|
||||
|
||||
export function PartsQueuePageComponent({ bodyshop }) {
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const {
|
||||
//page,
|
||||
sortcolumn,
|
||||
|
||||
@@ -3,7 +3,7 @@ import queryString from "query-string";
|
||||
import React, { useEffect } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
import PaymentsListPaginated from "../../components/payments-list-paginated/payment-list-paginated.component";
|
||||
@@ -26,7 +26,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
});
|
||||
|
||||
export function AllJobs({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { page, sortcolumn, sortorder, searchObj } = searchParams;
|
||||
|
||||
const { loading, error, data, refetch } = useQuery(
|
||||
|
||||
@@ -6,7 +6,7 @@ import queryString from "query-string";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
import { QUERY_PHONEBOOK_PAGINATED } from "../../graphql/phonebook.queries";
|
||||
@@ -25,7 +25,7 @@ const mapStateToProps = createStructuredSelector({
|
||||
});
|
||||
|
||||
export function PhonebookPageComponent({ bodyshop, authLevel }) {
|
||||
const searchParams = queryString.parse(useSearchParams().toString());
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { page, sortcolumn, sortorder, search, phonebookentry } = searchParams;
|
||||
const history = useNavigate();
|
||||
|
||||
|
||||
@@ -8,8 +8,9 @@ import {
|
||||
} from "../../redux/application/application.actions";
|
||||
import PhonebookPage from "./phonebook.page.component";
|
||||
import { Drawer, Grid } from "antd";
|
||||
import { useSearchParams, useNavigate } from "react-router-dom";
|
||||
import { useLocation, useNavigate } from "react-router-dom";
|
||||
import PhonebookFormContainer from "../../components/phonebook-form/phonebook-form.container";
|
||||
import queryString from "query-string";
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)),
|
||||
@@ -30,8 +31,7 @@ export function PhonebookContainer({ setBreadcrumbs, setSelectedHeader }) {
|
||||
]);
|
||||
}, [setBreadcrumbs, t, setSelectedHeader]);
|
||||
|
||||
const [searchParams] = useSearchParams();
|
||||
const search = Object.fromEntries(searchParams);
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const { phonebookentry } = search;
|
||||
|
||||
const navigate = useNavigate();
|
||||
@@ -58,8 +58,8 @@ export function PhonebookContainer({ setBreadcrumbs, setSelectedHeader }) {
|
||||
<Drawer
|
||||
width={drawerPercentage}
|
||||
onClose={() => {
|
||||
searchParams.delete("phonebookentry");
|
||||
navigate({ search: searchParams.toString() });
|
||||
delete search.phonebookentry;
|
||||
navigate({ search: queryString.stringify(search) });
|
||||
}}
|
||||
visible={phonebookentry}
|
||||
>
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import React from "react";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import UserRequestResetPw from "../../components/user-request-pw-reset/user-request-reset-pw.component";
|
||||
import UserValidatePwReset from "../../components/user-validate-pw-reset/user-validate-pw-reset.component";
|
||||
import queryString from "query-string";
|
||||
|
||||
export default function ResetPassword() {
|
||||
const [searchParams] = useSearchParams();
|
||||
const { mode, oobCode } = Object.fromEntries(searchParams);
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { mode, oobCode } = searchParams;
|
||||
|
||||
if (mode === "resetPassword")
|
||||
return <UserValidatePwReset oobCode={oobCode} />;
|
||||
|
||||
@@ -14,8 +14,9 @@ import {
|
||||
setSelectedHeader,
|
||||
} from "../../redux/application/application.actions";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import {createStructuredSelector} from "reselect";
|
||||
import queryString from "query-string";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
@@ -28,8 +29,8 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
export function ScoreboardContainer({ setBreadcrumbs, setSelectedHeader }) {
|
||||
const { t } = useTranslation();
|
||||
const [searchParams] = useSearchParams();
|
||||
const { tab } = Object.fromEntries(searchParams);
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { tab } = searchParams;
|
||||
const navigate = useNavigate();
|
||||
useEffect(() => {
|
||||
document.title = t("titles.scoreboard");
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useQuery } from "@apollo/client";
|
||||
import React, { useEffect } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
import CsiResponseFormContainer from "../../components/csi-response-form/csi-response-form.container";
|
||||
@@ -13,6 +13,7 @@ import { setBreadcrumbs, setSelectedHeader } from "../../redux/application/appli
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||
import { pageLimit } from "../../utils/config";
|
||||
import queryString from "query-string";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
@@ -25,8 +26,8 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
export function ShopCsiContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
||||
const { t } = useTranslation();
|
||||
const [searchParams] = useSearchParams();
|
||||
const { page, sortcolumn, sortorder } = Object.fromEntries(searchParams);
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { page, sortcolumn, sortorder } = searchParams;
|
||||
|
||||
const { loading, error, data, refetch } = useQuery(
|
||||
QUERY_CSI_RESPONSE_PAGINATED,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Tabs } from "antd";
|
||||
import React, { useEffect } from "react";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import ShopEmployeesContainer from "../../components/shop-employees/shop-employees.container";
|
||||
import ShopInfoContainer from "../../components/shop-info/shop-info.container";
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
} from "../../redux/application/application.actions";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import ShopInfoUsersComponent from "../../components/shop-users/shop-users.component";
|
||||
import queryString from "query-string";
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
@@ -26,9 +27,8 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
export function ShopPage({ bodyshop, setSelectedHeader, setBreadcrumbs }) {
|
||||
const { t } = useTranslation();
|
||||
const navigate = useNavigate();
|
||||
const [searchParams] = useSearchParams();
|
||||
const { tab } = Object.fromEntries(searchParams);
|
||||
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { tab } = searchParams;
|
||||
useEffect(() => {
|
||||
document.title = t("titles.shop");
|
||||
setSelectedHeader("shop");
|
||||
|
||||
@@ -48,7 +48,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
});
|
||||
|
||||
export function TechPage({ technician, match }) {
|
||||
export function TechPage({ technician }) {
|
||||
const { t } = useTranslation();
|
||||
const navigate = useNavigate();
|
||||
|
||||
@@ -56,11 +56,16 @@ export function TechPage({ technician, match }) {
|
||||
document.title = t("titles.app");
|
||||
}, [t]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!technician) {
|
||||
navigate(`/tech/login`);
|
||||
}
|
||||
}, [technician, navigate]);
|
||||
|
||||
return (
|
||||
<Layout className="tech-layout-container">
|
||||
<TechSider />
|
||||
<Layout>
|
||||
{technician ? null : navigate(`${match.path}/login`)}
|
||||
<UpdateAlert />
|
||||
<TechHeader />
|
||||
|
||||
@@ -76,12 +81,12 @@ export function TechPage({ technician, match }) {
|
||||
<EmailOverlayContainer />
|
||||
<PrintCenterModalContainer />
|
||||
<Routes>
|
||||
<Route path={`${match.path}/login`} element={<TechLogin />} />
|
||||
<Route path={`${match.path}/joblookup`} element={<TechLookup />} />
|
||||
<Route path={`${match.path}/list`} element={<ProductionListPage />} />
|
||||
<Route path={`${match.path}/jobclock`} element={<TechJobClock />} />
|
||||
<Route path={`${match.path}/shiftclock`} element={<TechShiftClock />} />
|
||||
<Route path={`${match.path}/board`} element={<ProductionBoardPage />} />
|
||||
<Route path='/login' element={<TechLogin />} />
|
||||
<Route path='/joblokup' element={<TechLookup />} />
|
||||
<Route path='/list' element={<ProductionListPage />} />
|
||||
<Route path='/jobclock' element={<TechJobClock />} />
|
||||
<Route path='/shiftclock' element={<TechShiftClock />} />
|
||||
<Route path='/board' element={<ProductionBoardPage />} />
|
||||
</Routes>
|
||||
</FeatureWrapper>
|
||||
</Suspense>
|
||||
|
||||
@@ -19,7 +19,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
setBodyshop: (bs) => dispatch(setBodyshop(bs)),
|
||||
});
|
||||
|
||||
export function TechPageContainer({ bodyshop, setBodyshop, match }) {
|
||||
export function TechPageContainer({ bodyshop, setBodyshop }) {
|
||||
const { loading, error, data } = useQuery(QUERY_BODYSHOP, {
|
||||
fetchPolicy: "network-only",
|
||||
nextFetchPolicy: "network-only",
|
||||
@@ -32,7 +32,7 @@ export function TechPageContainer({ bodyshop, setBodyshop, match }) {
|
||||
if (loading || !bodyshop)
|
||||
return <LoadingSpinner message={t("general.labels.loadingshop")} />;
|
||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||
return <TechPage match={match} />;
|
||||
return <TechPage />;
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(TechPageContainer);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React, { useEffect } from "react";
|
||||
import VehicleDetailComponent from "./vehicles-detail.page.component";
|
||||
import { useQuery } from "@apollo/client";
|
||||
import {useParams} from 'react-router-dom';
|
||||
import { QUERY_VEHICLE_BY_ID } from "../../graphql/vehicles.queries";
|
||||
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
@@ -21,12 +22,11 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
});
|
||||
|
||||
export function VehicleDetailContainer({
|
||||
match,
|
||||
setBreadcrumbs,
|
||||
addRecentItem,
|
||||
setSelectedHeader,
|
||||
}) {
|
||||
const { vehId } = match.params;
|
||||
const { vehId } = useParams;
|
||||
const { t } = useTranslation();
|
||||
|
||||
const { loading, data, error, refetch } = useQuery(QUERY_VEHICLE_BY_ID, {
|
||||
|
||||
@@ -1,21 +1,40 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import { Outlet, useSearchParams, useNavigate } from 'react-router-dom';
|
||||
import React, {useEffect} from "react";
|
||||
import {useNavigate, useLocation, Outlet} from "react-router-dom";
|
||||
|
||||
const PrivateRoute = ({ isAuthorized }) => {
|
||||
const [searchParams] = useSearchParams();
|
||||
const navigate = useNavigate();
|
||||
function PrivateRoute({ component: Component, isAuthorized, ...rest }) {
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
|
||||
useEffect(() => {
|
||||
useEffect(() => {
|
||||
if (!isAuthorized) {
|
||||
console.log('is not authorized');
|
||||
searchParams.set("redirect", window.location.pathname);
|
||||
navigate(`/signin?${searchParams.toString()}`);
|
||||
} else {
|
||||
console.log('isAuthorized');
|
||||
navigate(`/signin?redirect=${location.pathname}`);
|
||||
}
|
||||
}, [isAuthorized, navigate, searchParams]);
|
||||
}, [isAuthorized, navigate]);
|
||||
|
||||
return <Outlet />;
|
||||
}
|
||||
|
||||
export default PrivateRoute;
|
||||
export default PrivateRoute;
|
||||
|
||||
|
||||
// import React, { useEffect } from 'react';
|
||||
// import { Outlet, useSearchParams, useNavigate } from 'react-router-dom';
|
||||
//
|
||||
// const PrivateRoute = ({ isAuthorized }) => {
|
||||
// const [searchParams] = useSearchParams();
|
||||
// const navigate = useNavigate();
|
||||
//
|
||||
// useEffect(() => {
|
||||
// if (!isAuthorized) {
|
||||
// console.log('is not authorized');
|
||||
// searchParams.set("redirect", window.location.pathname);
|
||||
// navigate(`/signin?${searchParams.toString()}`);
|
||||
// } else {
|
||||
// console.log('isAuthorized');
|
||||
// }
|
||||
// }, [isAuthorized, navigate, searchParams]);
|
||||
//
|
||||
// return <Outlet />;
|
||||
// }
|
||||
//
|
||||
// export default PrivateRoute;
|
||||
Reference in New Issue
Block a user