diff --git a/.dockerignore b/.dockerignore index 17605d357..98f226b22 100644 --- a/.dockerignore +++ b/.dockerignore @@ -11,7 +11,6 @@ node_modules # Files to exclude .ebignore .editorconfig -.eslintrc.json .gitignore .prettierrc.js Dockerfile @@ -19,6 +18,6 @@ README.MD bodyshop_translations.babel docker-compose.yml ecosystem.config.js - +eslint.config.mjs # Optional: Exclude logs and temporary files *.log diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index d2162827c..000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "env": { - "es6": true, - "node": true - }, - "extends": "eslint:recommended", - "globals": { - "Atomics": "readonly", - "SharedArrayBuffer": "readonly" - }, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "rules": { - "no-console": "off" - }, - "settings": {} -} diff --git a/client/.eslintrc b/client/.eslintrc deleted file mode 100644 index 25e7bdb80..000000000 --- a/client/.eslintrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": [ - "react-app" - ], - "rules": { - "no-useless-rename": "off" - } -} diff --git a/client/eslint.config.js b/client/eslint.config.js index 0ced5d379..3063ce3d8 100644 --- a/client/eslint.config.js +++ b/client/eslint.config.js @@ -2,9 +2,9 @@ import globals from "globals"; import pluginJs from "@eslint/js"; import pluginReact from "eslint-plugin-react"; -/** @type {import('eslint').Linter.Config[]} */ - +/** @type {import("eslint").Linter.Config[]} */ export default [ + { ignores: ["node_modules/**", "dist/**", "build/**", "dev-dist/**"] }, { files: ["**/*.{js,mjs,cjs,jsx}"] }, @@ -12,9 +12,13 @@ export default [ pluginJs.configs.recommended, { ...pluginReact.configs.flat.recommended, + settings: { + react: { version: "detect" } + }, rules: { ...pluginReact.configs.flat.recommended.rules, - "react/prop-types": 0 + "react/prop-types": 0, + "react/no-children-prop": 0 // Disable react/no-children-prop rule } }, pluginReact.configs.flat["jsx-runtime"] diff --git a/client/package-lock.json b/client/package-lock.json index 9e78d9b1b..b95636150 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -25,7 +25,7 @@ "@sentry/vite-plugin": "^4.1.1", "@splitsoftware/splitio-react": "^2.3.1", "@tanem/react-nprogress": "^5.0.53", - "antd": "^5.27.0", + "antd": "^5.27.1", "apollo-link-logger": "^2.0.1", "apollo-link-sentry": "^4.4.0", "autosize": "^6.0.1", @@ -91,7 +91,7 @@ "@ant-design/icons": "^6.0.0", "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@babel/preset-react": "^7.27.1", - "@dotenvx/dotenvx": "^1.48.4", + "@dotenvx/dotenvx": "^1.49.0", "@emotion/babel-plugin": "^11.13.5", "@emotion/react": "^11.14.0", "@eslint/js": "^9.33.0", @@ -101,21 +101,20 @@ "@testing-library/jest-dom": "^6.7.0", "@testing-library/react": "^16.3.0", "@vitejs/plugin-react": "^4.6.0", - "browserslist": "^4.25.2", + "browserslist": "^4.25.3", "browserslist-to-esbuild": "^2.1.1", - "chalk": "^5.5.0", - "eslint": "^8.57.1", - "eslint-config-react-app": "^7.0.1", + "chalk": "^5.6.0", + "eslint": "^9.33.0", "eslint-plugin-react": "^7.37.5", "globals": "^15.15.0", "jsdom": "^26.0.0", - "memfs": "^4.36.0", + "memfs": "^4.36.3", "os-browserify": "^0.3.0", "playwright": "^1.54.2", "react-error-overlay": "^6.1.0", "redux-logger": "^3.0.6", "source-map-explorer": "^2.5.3", - "vite": "^7.1.2", + "vite": "^7.1.3", "vite-plugin-babel": "^1.3.2", "vite-plugin-eslint": "^1.8.1", "vite-plugin-node-polyfills": "^0.24.0", @@ -539,35 +538,6 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "license": "MIT" }, - "node_modules/@babel/eslint-parser": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.27.0.tgz", - "integrity": "sha512-dtnzmSjXfgL/HDgMcmsLSzyGbEosi4DrGWoCNfuI+W4IkVJw6izpTe7LtOdwAXnkDqw5yweboYCTkM2rQizCng==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", - "eslint-visitor-keys": "^2.1.0", - "semver": "^6.3.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || >=14.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.11.0", - "eslint": "^7.5.0 || ^8.0.0 || ^9.0.0" - } - }, - "node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10" - } - }, "node_modules/@babel/generator": { "version": "7.28.0", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.0.tgz", @@ -950,115 +920,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/plugin-proposal-class-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", - "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-decorators": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.25.9.tgz", - "integrity": "sha512-smkNLL/O1ezy9Nhy4CNosc4Va+1wo5w4gzSZeLe6y6dM4mmHfYOCPolXQPHQxonZCF+ZyebxN9vqOolkYrSn5g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9", - "@babel/plugin-syntax-decorators": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", - "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-numeric-separator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", - "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-optional-chaining": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz", - "integrity": "sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-private-methods": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", - "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead.", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-proposal-private-property-in-object": { "version": "7.21.11", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.11.tgz", @@ -1079,38 +940,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-decorators": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.25.9.tgz", - "integrity": "sha512-ryzI0McXUPJnRCvMo4lumIKZUzhYUO/ScI+Mz4YVaTLt04DHNSjEUjKVvbzQjZFLuod/cYEc07mJWhzl6v4DPg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-flow": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.26.0.tgz", - "integrity": "sha512-B+O2DnPc0iG+YXFqOxv2WNuNU97ToWjOomUQ78DouOENWUaM5sVrmet9mcomUGQFwpJd//gvUagXBSdzO1fRKg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-import-assertions": { "version": "7.26.0", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.26.0.tgz", @@ -1159,45 +988,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-private-property-in-object": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", @@ -1214,22 +1004,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz", - "integrity": "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-unicode-sets-regex": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", @@ -1527,23 +1301,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-flow-strip-types": { - "version": "7.26.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.26.5.tgz", - "integrity": "sha512-eGK26RsbIkYUns3Y8qKl362juDDYK+wEdPGHGrhzUl6CewZFo55VZ7hg+CyMFU4dd5QQakBN86nBMpRsFpRvbQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.26.5", - "@babel/plugin-syntax-flow": "^7.26.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-transform-for-of": { "version": "7.26.9", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.26.9.tgz", @@ -2064,27 +1821,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-runtime": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.26.10.tgz", - "integrity": "sha512-NWaL2qG6HRpONTnj4JvDU6th4jYeZOJgu3QhmFTCihib0ermtOJqktA5BduGm3suhhVe9EMP9c9+mfJ/I9slqw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.25.9", - "@babel/helper-plugin-utils": "^7.26.5", - "babel-plugin-polyfill-corejs2": "^0.4.10", - "babel-plugin-polyfill-corejs3": "^0.11.0", - "babel-plugin-polyfill-regenerator": "^0.6.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-transform-shorthand-properties": { "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.25.9.tgz", @@ -2166,26 +1902,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-typescript": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.27.0.tgz", - "integrity": "sha512-fRGGjO2UEGPjvEcyAZXRXAS8AfdaQoq7HnxAbJoAoW10B9xOKesmmndJv+Sym2a+9FHWZ9KbyyLCe9s0Sn5jtg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.25.9", - "@babel/helper-create-class-features-plugin": "^7.27.0", - "@babel/helper-plugin-utils": "^7.26.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", - "@babel/plugin-syntax-typescript": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-transform-unicode-escapes": { "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.25.9.tgz", @@ -2386,26 +2102,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/preset-typescript": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.27.0.tgz", - "integrity": "sha512-vxaPFfJtHhgeOVXRKuHpHPAOgymmy8V8I65T1q53R7GCZlefKeCaTyDs3zOPHTTbmquvNlQYC5klEvWsBAtrBQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.26.5", - "@babel/helper-validator-option": "^7.25.9", - "@babel/plugin-syntax-jsx": "^7.25.9", - "@babel/plugin-transform-modules-commonjs": "^7.26.3", - "@babel/plugin-transform-typescript": "^7.27.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/runtime": { "version": "7.27.6", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.6.tgz", @@ -2585,9 +2281,9 @@ } }, "node_modules/@dotenvx/dotenvx": { - "version": "1.48.4", - "resolved": "https://registry.npmjs.org/@dotenvx/dotenvx/-/dotenvx-1.48.4.tgz", - "integrity": "sha512-GpJWpGVI5JGhNzFlWOjCD3KMiN3xU1US4oLKQ7SiiGru4LvR7sUf3pDMpfjtlgzHStL5ydq4ekfZcRxWpHaJkA==", + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/@dotenvx/dotenvx/-/dotenvx-1.49.0.tgz", + "integrity": "sha512-M1cyP6YstFQCjih54SAxCqHLMMi8QqV8tenpgGE48RTXWD7vfMYJiw/6xcCDpS2h28AcLpTsFCZA863Ge9yxzA==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -2835,17 +2531,55 @@ "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/config-array": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz", + "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz", + "integrity": "sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", + "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", "dev": true, "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -2853,7 +2587,7 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -2867,16 +2601,13 @@ "license": "Python-2.0" }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -2895,19 +2626,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/@eslint/eslintrc/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@eslint/js": { "version": "9.33.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.33.0.tgz", @@ -2921,6 +2639,30 @@ "url": "https://eslint.org/donate" } }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", + "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.15.2", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@fingerprintjs/fingerprintjs": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/@fingerprintjs/fingerprintjs/-/fingerprintjs-4.6.2.tgz", @@ -3129,20 +2871,42 @@ "node": ">=6" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", - "deprecated": "Use @eslint/config-array instead", + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" }, "engines": { - "node": ">=10.10.0" + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, "node_modules/@humanwhocodes/module-importer": { @@ -3159,13 +2923,19 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true, - "license": "BSD-3-Clause" + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@icons/material": { "version": "0.2.4", @@ -3245,17 +3015,74 @@ "tslib": "2" } }, + "node_modules/@jsonjoy.com/buffers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/buffers/-/buffers-1.0.0.tgz", + "integrity": "sha512-NDigYR3PHqCnQLXYyoLbnEdzMMvzeiCWo1KOut7Q0CoIqg9tUAPKJ1iq/2nFhc5kZtexzutNY0LFjdwWL3Dw3Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/codegen": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/codegen/-/codegen-1.0.0.tgz", + "integrity": "sha512-E8Oy+08cmCf0EK/NMxpaJZmOxPqM+6iSe2S4nlSBrPZOORoDJILxtbSUEDKQyTamm/BVAhIGllOBNU79/dwf0g==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, "node_modules/@jsonjoy.com/json-pack": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.2.0.tgz", - "integrity": "sha512-io1zEbbYcElht3tdlqEOFxZ0dMTYrHz9iMf0gqn1pPjZFTCgM5R4R5IMA20Chb2UPYYsxjzs8CgZ7Nb5n2K2rA==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.11.0.tgz", + "integrity": "sha512-nLqSTAYwpk+5ZQIoVp7pfd/oSKNWlEdvTq2LzVA4r2wtWZg6v+5u0VgBOaDJuUfNOuw/4Ysq6glN5QKSrOCgrA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@jsonjoy.com/base64": "^1.1.1", - "@jsonjoy.com/util": "^1.1.2", + "@jsonjoy.com/base64": "^1.1.2", + "@jsonjoy.com/buffers": "^1.0.0", + "@jsonjoy.com/codegen": "^1.0.0", + "@jsonjoy.com/json-pointer": "^1.0.1", + "@jsonjoy.com/util": "^1.9.0", "hyperdyperid": "^1.2.0", - "thingies": "^1.20.0" + "thingies": "^2.5.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/json-pointer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pointer/-/json-pointer-1.0.1.tgz", + "integrity": "sha512-tJpwQfuBuxqZlyoJOSZcqf7OUmiYQ6MiPNmOv4KbZdXE/DdvBSSAwhos0zIlJU/AXxC8XpuO8p08bh2fIl+RKA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/util": "^1.3.0" }, "engines": { "node": ">=10.0" @@ -3269,11 +3096,15 @@ } }, "node_modules/@jsonjoy.com/util": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-1.5.0.tgz", - "integrity": "sha512-ojoNsrIuPI9g6o8UxhraZQSyF2ByJanAY4cTFbc8Mf2AXEF4aQRGY1dJxyJpuyav8r9FGflEt/Ff3u5Nt6YMPA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-1.9.0.tgz", + "integrity": "sha512-pLuQo+VPRnN8hfPqUTLTHk126wuYdXVxE6aDmjSeV4NCAgyxWbiOIeNJVtID3h1Vzpoi9m4jXezf73I6LgabgQ==", "dev": true, "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/buffers": "^1.0.0", + "@jsonjoy.com/codegen": "^1.0.0" + }, "engines": { "node": ">=10.0" }, @@ -3291,40 +3122,6 @@ "integrity": "sha512-AAeTkqyVJGdWLCA60aHDrh3s8h9z8TokyoR1tCpNtYatfe2cdocVdB0AaNquWTmddRWgAklmOBrowsMFQFY8hg==", "license": "MIT" }, - "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { - "version": "5.1.1-v1", - "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz", - "integrity": "sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-scope": "5.1.1" - } - }, - "node_modules/@nicolo-ribaudo/eslint-scope-5-internals/node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@nicolo-ribaudo/eslint-scope-5-internals/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, "node_modules/@noble/ciphers": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-1.3.0.tgz", @@ -3367,44 +3164,6 @@ "url": "https://paulmillr.com/funding/" } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/@parcel/watcher": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", @@ -4437,20 +4196,6 @@ "win32" ] }, - "node_modules/@rtsao/scc": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", - "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", - "dev": true, - "license": "MIT" - }, - "node_modules/@rushstack/eslint-patch": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.11.0.tgz", - "integrity": "sha512-zxnHvoMQVqewTJr/W4pKjF0bMGiKJv1WX7bSrkl46Hg0QjESbzBROWK0Wg4RphzSOS5Jiy7eFimmM3UgMrMZbQ==", - "dev": true, - "license": "MIT" - }, "node_modules/@sentry-internal/browser-utils": { "version": "9.43.0", "resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-9.43.0.tgz", @@ -5189,13 +4934,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/mdast": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", @@ -5249,13 +4987,6 @@ "integrity": "sha512-TY1eezMU2zH2ozQoAFAQFOPpvP15g+ZgSfTZt31AUUH/Rxtnz3H+A/Sv1Snw2/amp//omibc+AEkTaA8KUeOLQ==", "license": "MIT" }, - "node_modules/@types/semver": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.0.tgz", - "integrity": "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/stylis": { "version": "4.2.5", "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.5.tgz", @@ -5287,285 +5018,6 @@ "integrity": "sha512-D1XC7WK8K+zZEveUPY+cf4+kgauk8N4eHr/XIHXGlGYkHLud6hK9lYfZk1ry1TNh798cZUCgb6MqGEG8DkJt6Q==", "license": "MIT" }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", - "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/type-utils": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/experimental-utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.62.0.tgz", - "integrity": "sha512-RTXpeB3eMkpoclG3ZHft6vG/Z30azNHuqY6wKPBHlVMZFuEvrtlEDe8gMqDb+SO+9hjC/pLekeSCryf9vMZlCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/utils": "5.62.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", - "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", - "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", - "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/types": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", - "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", - "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "node_modules/@umijs/route-utils": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@umijs/route-utils/-/route-utils-4.0.1.tgz", @@ -5816,9 +5268,9 @@ } }, "node_modules/acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -5889,9 +5341,9 @@ } }, "node_modules/antd": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/antd/-/antd-5.27.0.tgz", - "integrity": "sha512-o54dmpooLOc08RSGCkeEQBYAGPxUSmnhmYJKCNTHH46vzjOVxdteu+wPTRVkRbAkDTbs2VcNr5VL7Lu67rPIiA==", + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/antd/-/antd-5.27.1.tgz", + "integrity": "sha512-jGMSdBN7hAMvPV27B4RhzZfL6n6yu8yDbo7oXrlJasaOqB7bSDPcjdEy1kXy3JPsny/Qazb1ykzRI4EfcByAPQ==", "license": "MIT", "dependencies": { "@ant-design/colors": "^7.2.1", @@ -6106,16 +5558,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/array.prototype.findlast": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", @@ -6137,28 +5579,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array.prototype.findlastindex": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz", - "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "es-shim-unscopables": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/array.prototype.flat": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", @@ -6279,13 +5699,6 @@ "node": ">=12" } }, - "node_modules/ast-types-flow": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz", - "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==", - "dev": true, - "license": "MIT" - }, "node_modules/async": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", @@ -6340,16 +5753,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/axe-core": { - "version": "4.10.3", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.10.3.tgz", - "integrity": "sha512-Xm7bpRXnDSX2YE2YFfBk2FnF0ep6tmG7xPh8iHee8MIcrgq762Nkce856dYtJYLkuIoYZvGfTs/PbZhideTcEg==", - "dev": true, - "license": "MPL-2.0", - "engines": { - "node": ">=4" - } - }, "node_modules/axios": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/axios/-/axios-1.11.0.tgz", @@ -6361,16 +5764,6 @@ "proxy-from-env": "^1.1.0" } }, - "node_modules/axobject-query": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", - "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/babel-plugin-macros": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", @@ -6429,39 +5822,6 @@ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, - "node_modules/babel-plugin-transform-react-remove-prop-types": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-remove-prop-types/-/babel-plugin-transform-react-remove-prop-types-0.4.24.tgz", - "integrity": "sha512-eqj0hVcJUR57/Ug2zE1Yswsw4LhuqqHhD+8v120T1cl3kjg76QwtyBrdIk4WVwK+lAhBJVYCd/v+4nc4y+8JsA==", - "dev": true, - "license": "MIT" - }, - "node_modules/babel-preset-react-app": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/babel-preset-react-app/-/babel-preset-react-app-10.1.0.tgz", - "integrity": "sha512-f9B1xMdnkCIqe+2dHrJsoQFRz7reChaAHE/65SdaykPklQqhme2WaC08oD3is77x9ff98/9EazAKFDZv5rFEQg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.16.0", - "@babel/plugin-proposal-class-properties": "^7.16.0", - "@babel/plugin-proposal-decorators": "^7.16.4", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0", - "@babel/plugin-proposal-numeric-separator": "^7.16.0", - "@babel/plugin-proposal-optional-chaining": "^7.16.0", - "@babel/plugin-proposal-private-methods": "^7.16.0", - "@babel/plugin-proposal-private-property-in-object": "^7.16.7", - "@babel/plugin-transform-flow-strip-types": "^7.16.0", - "@babel/plugin-transform-react-display-name": "^7.16.0", - "@babel/plugin-transform-runtime": "^7.16.4", - "@babel/preset-env": "^7.16.4", - "@babel/preset-react": "^7.16.0", - "@babel/preset-typescript": "^7.16.0", - "@babel/runtime": "^7.16.3", - "babel-plugin-macros": "^3.1.0", - "babel-plugin-transform-react-remove-prop-types": "^0.4.24" - } - }, "node_modules/babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", @@ -6767,9 +6127,9 @@ } }, "node_modules/browserslist": { - "version": "4.25.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.2.tgz", - "integrity": "sha512-0si2SJK3ooGzIawRu61ZdPCO1IncZwS8IzuX73sPZsXW6EQ/w/DAfPyKI8l1ETTCr2MnvqWitmlCUxgdul45jA==", + "version": "4.25.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.3.tgz", + "integrity": "sha512-cDGv1kkDI4/0e5yON9yM5G/0A5u8sf5TnmdX5C9qHzI9PPu++sQ9zjm1k9NiOrf3riY4OkK0zSGqfvJyJsgCBQ==", "funding": [ { "type": "opencollective", @@ -6786,8 +6146,8 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001733", - "electron-to-chromium": "^1.5.199", + "caniuse-lite": "^1.0.30001735", + "electron-to-chromium": "^1.5.204", "node-releases": "^2.0.19", "update-browserslist-db": "^1.1.3" }, @@ -7025,9 +6385,9 @@ } }, "node_modules/chalk": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.5.0.tgz", - "integrity": "sha512-1tm8DTaJhPBG3bIkVeZt1iZM9GfSX2lzOeDVZH9R9ffRHpmHvxZ/QhgQH/aDTkswQVt+YHdXAdS/In/30OjCbg==", + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.0.tgz", + "integrity": "sha512-46QrSQFyVSEyYAgQ22hQ+zDa60YHA4fBstHmtSApj1Y5vKtG27fWowW03jCk5KcbXEWPZUIR894aARCA/G1kfQ==", "dev": true, "license": "MIT", "engines": { @@ -7247,13 +6607,6 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "license": "MIT" }, - "node_modules/confusing-browser-globals": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", - "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", - "dev": true, - "license": "MIT" - }, "node_modules/console": { "version": "0.7.2", "resolved": "https://registry.npmjs.org/console/-/console-0.7.2.tgz", @@ -7666,13 +7019,6 @@ "node": ">=12" } }, - "node_modules/damerau-levenshtein": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", - "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", - "dev": true, - "license": "BSD-2-Clause" - }, "node_modules/data-urls": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz", @@ -7981,32 +7327,6 @@ "node": "*" } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/dom-accessibility-api": { "version": "0.5.16", "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", @@ -8130,9 +7450,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.201", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.201.tgz", - "integrity": "sha512-ZG65vsrLClodGqywuigc+7m0gr4ISoTQttfVh7nfpLv0M7SIwF4WbFNEOywcqTiujs12AUeeXbFyQieDICAIxg==", + "version": "1.5.207", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.207.tgz", + "integrity": "sha512-mryFrrL/GXDTmAtIVMVf+eIXM09BBPlO5IQ7lUyKmK8d+A4VpRGG+M3ofoVef6qyF8s60rJei8ymlJxjUA8Faw==", "license": "ISC" }, "node_modules/elliptic": { @@ -8158,13 +7478,6 @@ "dev": true, "license": "MIT" }, - "node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" - }, "node_modules/engine.io-client": { "version": "6.6.3", "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.6.3.tgz", @@ -8521,282 +7834,66 @@ } }, "node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "version": "9.33.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.33.0.tgz", + "integrity": "sha512-TS9bTNIryDzStCpJN93aC5VRSW3uTx9sClUn4B87pwiCaJh220otoI0X8mJKr+VcPtniMdN8GKjlwgWGUv5ZKA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.0", + "@eslint/config-helpers": "^0.3.1", + "@eslint/core": "^0.15.2", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.33.0", + "@eslint/plugin-kit": "^0.3.5", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-config-react-app": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/eslint-config-react-app/-/eslint-config-react-app-7.0.1.tgz", - "integrity": "sha512-K6rNzvkIeHaTd8m/QEh1Zko0KI7BACWkkneSs6s9cKZC/J27X3eZR6Upt1jkmZ/4FK+XUOPPxMEN7+lbUXfSlA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.16.0", - "@babel/eslint-parser": "^7.16.3", - "@rushstack/eslint-patch": "^1.1.0", - "@typescript-eslint/eslint-plugin": "^5.5.0", - "@typescript-eslint/parser": "^5.5.0", - "babel-preset-react-app": "^10.0.1", - "confusing-browser-globals": "^1.0.11", - "eslint-plugin-flowtype": "^8.0.3", - "eslint-plugin-import": "^2.25.3", - "eslint-plugin-jest": "^25.3.0", - "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-react": "^7.27.1", - "eslint-plugin-react-hooks": "^4.3.0", - "eslint-plugin-testing-library": "^5.0.1" - }, - "engines": { - "node": ">=14.0.0" + "url": "https://eslint.org/donate" }, "peerDependencies": { - "eslint": "^8.0.0" - } - }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-module-utils": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", - "integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7" - }, - "engines": { - "node": ">=4" + "jiti": "*" }, "peerDependenciesMeta": { - "eslint": { + "jiti": { "optional": true } } }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-flowtype": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-8.0.3.tgz", - "integrity": "sha512-dX8l6qUL6O+fYPtpNRideCFSpmWOUVx5QcaGLVqe/vlDiBSe4vYljDWDETwnyFzpl7By/WVIu6rcrniCgH9BqQ==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "lodash": "^4.17.21", - "string-natural-compare": "^3.0.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "@babel/plugin-syntax-flow": "^7.14.5", - "@babel/plugin-transform-react-jsx": "^7.14.9", - "eslint": "^8.1.0" - } - }, - "node_modules/eslint-plugin-import": { - "version": "2.31.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", - "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rtsao/scc": "^1.1.0", - "array-includes": "^3.1.8", - "array.prototype.findlastindex": "^1.2.5", - "array.prototype.flat": "^1.3.2", - "array.prototype.flatmap": "^1.3.2", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.12.0", - "hasown": "^2.0.2", - "is-core-module": "^2.15.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "object.groupby": "^1.0.3", - "object.values": "^1.2.0", - "semver": "^6.3.1", - "string.prototype.trimend": "^1.0.8", - "tsconfig-paths": "^3.15.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" - } - }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-jest": { - "version": "25.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-25.7.0.tgz", - "integrity": "sha512-PWLUEXeeF7C9QGKqvdSbzLOiLTx+bno7/HC9eefePfEb257QFHg7ye3dh80AZVkaa/RQsBB1Q/ORQvg2X7F0NQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/experimental-utils": "^5.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - }, - "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^4.0.0 || ^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "@typescript-eslint/eslint-plugin": { - "optional": true - }, - "jest": { - "optional": true - } - } - }, - "node_modules/eslint-plugin-jsx-a11y": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz", - "integrity": "sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "aria-query": "^5.3.2", - "array-includes": "^3.1.8", - "array.prototype.flatmap": "^1.3.2", - "ast-types-flow": "^0.0.8", - "axe-core": "^4.10.0", - "axobject-query": "^4.1.0", - "damerau-levenshtein": "^1.0.8", - "emoji-regex": "^9.2.2", - "hasown": "^2.0.2", - "jsx-ast-utils": "^3.3.5", - "language-tags": "^1.0.9", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "safe-regex-test": "^1.0.3", - "string.prototype.includes": "^2.0.1" - }, - "engines": { - "node": ">=4.0" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9" - } - }, - "node_modules/eslint-plugin-jsx-a11y/node_modules/aria-query": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", - "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/eslint-plugin-react": { "version": "7.37.5", "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz", @@ -8830,19 +7927,6 @@ "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" } }, - "node_modules/eslint-plugin-react-hooks": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", - "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" - } - }, "node_modules/eslint-plugin-react/node_modules/doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", @@ -8874,27 +7958,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/eslint-plugin-testing-library": { - "version": "5.11.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.11.1.tgz", - "integrity": "sha512-5eX9e1Kc2PqVRed3taaLnAAqPZGEX75C+M/rXzUAI3wIg/ZxzUm1OVAwfe/O+vE+6YXOLetSe9g5GKD2ecXipw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/utils": "^5.58.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0", - "npm": ">=6" - }, - "peerDependencies": { - "eslint": "^7.5.0 || ^8.0.0" - } - }, "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -8902,7 +7969,7 @@ "estraverse": "^5.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -8921,16 +7988,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, "node_modules/eslint/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -8947,13 +8004,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, "node_modules/eslint/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -8971,61 +8021,45 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/eslint/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, + "license": "Apache-2.0", "engines": { - "node": ">=8" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/eslint/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://opencollective.com/eslint" } }, "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -9193,36 +8227,6 @@ "dev": true, "license": "MIT" }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -9254,22 +8258,15 @@ ], "license": "BSD-3-Clause" }, - "node_modules/fastq": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", - "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, "node_modules/fdir": { - "version": "6.4.6", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", - "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, "peerDependencies": { "picomatch": "^3 || ^4" }, @@ -9280,16 +8277,16 @@ } }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/filelist": { @@ -9370,18 +8367,17 @@ } }, "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { @@ -9701,27 +8697,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", @@ -9741,13 +8716,6 @@ "dev": true, "license": "ISC" }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "license": "MIT" - }, "node_modules/graphql": { "version": "16.11.0", "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.11.0.tgz", @@ -10699,16 +9667,6 @@ "node": ">=8" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-plain-obj": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", @@ -11221,26 +10179,6 @@ "json-buffer": "3.0.1" } }, - "node_modules/language-subtag-registry": { - "version": "0.3.23", - "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz", - "integrity": "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==", - "dev": true, - "license": "CC0-1.0" - }, - "node_modules/language-tags": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz", - "integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==", - "dev": true, - "license": "MIT", - "dependencies": { - "language-subtag-registry": "^0.3.20" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -11635,15 +10573,16 @@ } }, "node_modules/memfs": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.36.0.tgz", - "integrity": "sha512-mfBfzGUdoEw5AZwG8E965ej3BbvW2F9LxEWj4uLxF6BEh1dO2N9eS3AGu9S6vfenuQYrVjsbUOOZK7y3vz4vyQ==", + "version": "4.36.3", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.36.3.tgz", + "integrity": "sha512-rZIVsNPGdZDPls/ckWhIsod2zRNsI2f2kEru0gMldkrEve+fPn7CVBTvfKLNyHQ9rZDWwzVBF8tPsZivzDPiZQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@jsonjoy.com/json-pack": "^1.0.3", - "@jsonjoy.com/util": "^1.3.0", - "tree-dump": "^1.0.1", + "@jsonjoy.com/json-pack": "^1.11.0", + "@jsonjoy.com/util": "^1.9.0", + "thingies": "^2.5.0", + "tree-dump": "^1.0.3", "tslib": "^2.0.0" }, "engines": { @@ -11680,16 +10619,6 @@ "dev": true, "license": "MIT" }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, "node_modules/micromark": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz", @@ -12136,8 +11065,8 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "devOptional": true, "license": "MIT", + "optional": true, "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -12150,8 +11079,8 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "devOptional": true, "license": "MIT", + "optional": true, "engines": { "node": ">=8.6" }, @@ -12346,13 +11275,6 @@ "dev": true, "license": "MIT" }, - "node_modules/natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true, - "license": "MIT" - }, "node_modules/no-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", @@ -12630,21 +11552,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object.groupby": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", - "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/object.values": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", @@ -13405,27 +12312,6 @@ "node": ">=0.4.x" } }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, "node_modules/raf": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", @@ -14943,17 +13829,6 @@ "node": ">=4" } }, - "node_modules/reusify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -15063,30 +13938,6 @@ "dev": true, "license": "MIT" }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, "node_modules/safe-array-concat": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", @@ -15454,16 +14305,6 @@ "dev": true, "license": "ISC" }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/smob": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz", @@ -15814,13 +14655,6 @@ "integrity": "sha512-u/1tdPl4yQnPBjnVrmdLo9gtuLvELKsAoRapekWggdiQNvvvum+jYF329d84NAa660KQw7pB2n36KrIKVoXa3A==", "license": "MIT" }, - "node_modules/string-natural-compare": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-3.0.1.tgz", - "integrity": "sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==", - "dev": true, - "license": "MIT" - }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -15841,21 +14675,6 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "license": "MIT" }, - "node_modules/string.prototype.includes": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz", - "integrity": "sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/string.prototype.matchall": { "version": "4.0.12", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz", @@ -16005,16 +14824,6 @@ "node": ">=8" } }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/strip-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-comments/-/strip-comments-2.0.1.tgz", @@ -16378,22 +15187,19 @@ "dev": true, "license": "MIT" }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" - }, "node_modules/thingies": { - "version": "1.21.0", - "resolved": "https://registry.npmjs.org/thingies/-/thingies-1.21.0.tgz", - "integrity": "sha512-hsqsJsFMsV+aD4s3CWKk85ep/3I9XzYV/IXaSouJMYIoDlgyi11cBhsqYe9/geRfB0YIikBQg6raRaM+nIMP9g==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/thingies/-/thingies-2.5.0.tgz", + "integrity": "sha512-s+2Bwztg6PhWUD7XMfeYm5qliDdSiZm7M7n8KjTkIsm3l/2lgVRc2/Gx/v+ZX8lT4FMA+i8aQvhcWylldc+ZNw==", "dev": true, - "license": "Unlicense", + "license": "MIT", "engines": { "node": ">=10.18" }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, "peerDependencies": { "tslib": "^2" } @@ -16558,9 +15364,9 @@ } }, "node_modules/tree-dump": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/tree-dump/-/tree-dump-1.0.2.tgz", - "integrity": "sha512-dpev9ABuLWdEubk+cIaI9cHwRNNDjkBBLXTwI4UCUFdQ5xXKqNXoK4FEciw/vxf+NQ7Cb7sGUyeUtORvHIdRXQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tree-dump/-/tree-dump-1.0.3.tgz", + "integrity": "sha512-il+Cv80yVHFBwokQSfd4bldvr1Md951DpgAGfmhydt04L+YzHgubm2tQ7zueWDcGENKHq0ZvGFR/hjvNXilHEg==", "dev": true, "license": "Apache-2.0", "engines": { @@ -16606,61 +15412,12 @@ "node": ">=8" } }, - "node_modules/tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, - "node_modules/tsconfig-paths/node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "license": "0BSD" - }, "node_modules/tty-browserify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", @@ -17283,14 +16040,14 @@ } }, "node_modules/vite": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.2.tgz", - "integrity": "sha512-J0SQBPlQiEXAF7tajiH+rUooJPo0l8KQgyg4/aMunNtrOa7bwuZJsJbDWzeljqQpgftxuq5yNJxQ91O9ts29UQ==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.3.tgz", + "integrity": "sha512-OOUi5zjkDxYrKhTV3V7iKsoS37VUM7v40+HuwEmcrsf11Cdx9y3DIr2Px6liIcZFwt3XSRpQvFpL3WVy7ApkGw==", "dev": true, "license": "MIT", "dependencies": { "esbuild": "^0.25.0", - "fdir": "^6.4.6", + "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", "rollup": "^4.43.0", diff --git a/client/package.json b/client/package.json index 5468f2aa0..4c1953199 100644 --- a/client/package.json +++ b/client/package.json @@ -24,7 +24,7 @@ "@sentry/vite-plugin": "^4.1.1", "@splitsoftware/splitio-react": "^2.3.1", "@tanem/react-nprogress": "^5.0.53", - "antd": "^5.27.0", + "antd": "^5.27.1", "apollo-link-logger": "^2.0.1", "apollo-link-sentry": "^4.4.0", "autosize": "^6.0.1", @@ -107,7 +107,9 @@ "test:e2e:rome": "playwright test --config playwright.rome.config.js", "test:e2e:imex:headed": "playwright test --config playwright.config.js --headed", "test:e2e:rome:headed": "playwright test --config playwright.rome.config.js --headed", - "test:e2e:report": "playwright show-report" + "test:e2e:report": "playwright show-report", + "lint": "eslint .", + "lint:fix": "eslint . --fix" }, "browserslist": { "production": [ @@ -131,7 +133,7 @@ "@ant-design/icons": "^6.0.0", "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@babel/preset-react": "^7.27.1", - "@dotenvx/dotenvx": "^1.48.4", + "@dotenvx/dotenvx": "^1.49.0", "@emotion/babel-plugin": "^11.13.5", "@emotion/react": "^11.14.0", "@eslint/js": "^9.33.0", @@ -141,21 +143,20 @@ "@testing-library/jest-dom": "^6.7.0", "@testing-library/react": "^16.3.0", "@vitejs/plugin-react": "^4.6.0", - "browserslist": "^4.25.2", + "browserslist": "^4.25.3", "browserslist-to-esbuild": "^2.1.1", - "chalk": "^5.5.0", - "eslint": "^8.57.1", - "eslint-config-react-app": "^7.0.1", + "chalk": "^5.6.0", + "eslint": "^9.33.0", "eslint-plugin-react": "^7.37.5", "globals": "^15.15.0", "jsdom": "^26.0.0", - "memfs": "^4.36.0", + "memfs": "^4.36.3", "os-browserify": "^0.3.0", "playwright": "^1.54.2", "react-error-overlay": "^6.1.0", "redux-logger": "^3.0.6", "source-map-explorer": "^2.5.3", - "vite": "^7.1.2", + "vite": "^7.1.3", "vite-plugin-babel": "^1.3.2", "vite-plugin-eslint": "^1.8.1", "vite-plugin-node-polyfills": "^0.24.0", diff --git a/client/playwright.config.js b/client/playwright.config.js index 1ffc0d207..cb4629c4e 100644 --- a/client/playwright.config.js +++ b/client/playwright.config.js @@ -20,6 +20,7 @@ export default defineConfig({ command: "npm run start:imex", ignoreHTTPSErrors: true, url: "https://localhost:3000/health", // Health check endpoint will tell us when the server is ready + // eslint-disable-next-line no-undef reuseExistingServer: !process.env.CI // Reuse server locally, not in CI } }); diff --git a/client/playwright.rome.config.js b/client/playwright.rome.config.js index 8378df05c..6d4f86062 100644 --- a/client/playwright.rome.config.js +++ b/client/playwright.rome.config.js @@ -20,6 +20,7 @@ export default defineConfig({ command: "npm run start:rome", ignoreHTTPSErrors: true, url: "https://localhost:3000/health", // Health check endpoint will tell us when the server is ready + // eslint-disable-next-line no-undef reuseExistingServer: !process.env.CI // Reuse server locally, not in CI } }); diff --git a/client/public/firebase-messaging-sw.js b/client/public/firebase-messaging-sw.js index 1eb03072a..67fdd7c90 100644 --- a/client/public/firebase-messaging-sw.js +++ b/client/public/firebase-messaging-sw.js @@ -1,5 +1,7 @@ // Scripts for firebase and firebase messaging +// eslint-disable-next-line no-undef importScripts("https://www.gstatic.com/firebasejs/10.14.1/firebase-app-compat.js"); +// eslint-disable-next-line no-undef importScripts("https://www.gstatic.com/firebasejs/10.14.1/firebase-messaging-compat.js"); // Initialize the Firebase app in the service worker by passing the generated config @@ -42,13 +44,16 @@ switch (this.location.hostname) { }; } +// eslint-disable-next-line no-undef firebase.initializeApp(firebaseConfig); // Retrieve firebase messaging +// eslint-disable-next-line no-undef const messaging = firebase.messaging(); messaging.onBackgroundMessage(function (payload) { // Customize notification here console.log("[firebase-messaging-sw.js] Received background message ", payload); + // eslint-disable-next-line no-undef self.registration.showNotification(notificationTitle, notificationOptions); }); diff --git a/client/src/App/App.container.jsx b/client/src/App/App.container.jsx index 42212ca66..8c8275a0d 100644 --- a/client/src/App/App.container.jsx +++ b/client/src/App/App.container.jsx @@ -67,7 +67,6 @@ function AppContainer({ currentUser, setDarkMode }) { } else { setDarkMode(false); } - // eslint-disable-next-line }, [currentUser?.uid]); // Persist darkMode to localStorage when it or user changes diff --git a/client/src/App/ProductFruitsWrapper.jsx b/client/src/App/ProductFruitsWrapper.jsx index f22eb7a5e..30770087d 100644 --- a/client/src/App/ProductFruitsWrapper.jsx +++ b/client/src/App/ProductFruitsWrapper.jsx @@ -1,16 +1,16 @@ -import React from "react"; +import { memo } from "react"; import PropTypes from "prop-types"; import { ProductFruits } from "react-product-fruits"; import dayjs from "dayjs"; -const ProductFruitsWrapper = React.memo(({ currentUser, bodyshop, workspaceCode, isPartsEntry }) => { +const ProductFruitsWrapper = memo(({ currentUser, bodyshop, workspaceCode, isPartsEntry }) => { const featureProps = bodyshop?.features ? Object.entries(bodyshop.features).reduce((acc, [key, value]) => { acc[key] = value === true || (typeof value === "string" && dayjs(value).isAfter(dayjs())); return acc; }, {}) : {}; - + return ( !isPartsEntry && workspaceCode && diff --git a/client/src/components/PrivateRoute.jsx b/client/src/components/PrivateRoute.jsx index 9286ae2d6..eb175534b 100644 --- a/client/src/components/PrivateRoute.jsx +++ b/client/src/components/PrivateRoute.jsx @@ -1,7 +1,7 @@ -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { Outlet, useLocation, useNavigate } from "react-router-dom"; -function PrivateRoute({ component: Component, isAuthorized, ...rest }) { +function PrivateRoute({ isAuthorized }) { const location = useLocation(); const navigate = useNavigate(); diff --git a/client/src/components/_test/test.page.jsx b/client/src/components/_test/test.page.jsx index 10af3b10b..87ef90e95 100644 --- a/client/src/components/_test/test.page.jsx +++ b/client/src/components/_test/test.page.jsx @@ -1,5 +1,4 @@ import { Button } from "antd"; -import React from "react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { setModalContext } from "../../redux/modals/modals.actions"; diff --git a/client/src/components/alert/alert.component.jsx b/client/src/components/alert/alert.component.jsx index f02edd614..439822f68 100644 --- a/client/src/components/alert/alert.component.jsx +++ b/client/src/components/alert/alert.component.jsx @@ -1,5 +1,4 @@ import { Alert } from "antd"; -import React from "react"; export default function AlertComponent(props) { return ; diff --git a/client/src/components/allocations-assignment/allocations-assignment.component.jsx b/client/src/components/allocations-assignment/allocations-assignment.component.jsx index 929d9eb75..0009f1e4e 100644 --- a/client/src/components/allocations-assignment/allocations-assignment.component.jsx +++ b/client/src/components/allocations-assignment/allocations-assignment.component.jsx @@ -1,5 +1,4 @@ import { Button, InputNumber, Popover, Select } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; diff --git a/client/src/components/allocations-assignment/allocations-assignment.container.jsx b/client/src/components/allocations-assignment/allocations-assignment.container.jsx index 60a0f68dc..262a70226 100644 --- a/client/src/components/allocations-assignment/allocations-assignment.container.jsx +++ b/client/src/components/allocations-assignment/allocations-assignment.container.jsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import { useState } from "react"; import AllocationsAssignmentComponent from "./allocations-assignment.component"; import { useMutation } from "@apollo/client"; import { INSERT_ALLOCATION } from "../../graphql/allocations.queries"; @@ -18,7 +18,7 @@ export default function AllocationsAssignmentContainer({ jobLineId, hours, refet const handleAssignment = () => { insertAllocation({ variables: { alloc: { ...assignment } } }) - .then((r) => { + .then(() => { notification["success"]({ message: t("allocations.successes.save") }); diff --git a/client/src/components/allocations-bulk-assignment/allocations-bulk-assignment.component.jsx b/client/src/components/allocations-bulk-assignment/allocations-bulk-assignment.component.jsx index 301887fb7..9cad453cc 100644 --- a/client/src/components/allocations-bulk-assignment/allocations-bulk-assignment.component.jsx +++ b/client/src/components/allocations-bulk-assignment/allocations-bulk-assignment.component.jsx @@ -1,5 +1,4 @@ import { Button, Popover, Select } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; diff --git a/client/src/components/allocations-bulk-assignment/allocations-bulk-assignment.container.jsx b/client/src/components/allocations-bulk-assignment/allocations-bulk-assignment.container.jsx index fa298b7e8..a82058644 100644 --- a/client/src/components/allocations-bulk-assignment/allocations-bulk-assignment.container.jsx +++ b/client/src/components/allocations-bulk-assignment/allocations-bulk-assignment.container.jsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import { useState } from "react"; import AllocationsBulkAssignment from "./allocations-bulk-assignment.component"; import { useMutation } from "@apollo/client"; import { INSERT_ALLOCATION } from "../../graphql/allocations.queries"; @@ -24,7 +24,7 @@ export default function AllocationsBulkAssignmentContainer({ jobLines, refetch } return acc; }, []); - insertAllocation({ variables: { alloc: allocs } }).then((r) => { + insertAllocation({ variables: { alloc: allocs } }).then(() => { notification["success"]({ message: t("employees.successes.save") }); diff --git a/client/src/components/allocations-employee-label/allocations-employee-label.component.jsx b/client/src/components/allocations-employee-label/allocations-employee-label.component.jsx index 0adc01964..5df90f752 100644 --- a/client/src/components/allocations-employee-label/allocations-employee-label.component.jsx +++ b/client/src/components/allocations-employee-label/allocations-employee-label.component.jsx @@ -1,5 +1,4 @@ import Icon from "@ant-design/icons"; -import React from "react"; import { MdRemoveCircleOutline } from "react-icons/md"; export default function AllocationsLabelComponent({ allocation, handleClick }) { diff --git a/client/src/components/allocations-employee-label/allocations-employee-label.container.jsx b/client/src/components/allocations-employee-label/allocations-employee-label.container.jsx index af93f1798..0599d268d 100644 --- a/client/src/components/allocations-employee-label/allocations-employee-label.container.jsx +++ b/client/src/components/allocations-employee-label/allocations-employee-label.container.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { useMutation } from "@apollo/client"; import { DELETE_ALLOCATION } from "../../graphql/allocations.queries"; import AllocationsLabelComponent from "./allocations-employee-label.component"; @@ -13,13 +12,13 @@ export default function AllocationsLabelContainer({ allocation, refetch }) { const handleClick = (e) => { e.preventDefault(); deleteAllocation({ variables: { id: allocation.id } }) - .then((r) => { + .then(() => { notification["success"]({ message: t("allocations.successes.deleted") }); if (refetch) refetch(); }) - .catch((error) => { + .catch(() => { notification["error"]({ message: t("allocations.errors.deleting") }); }); }; diff --git a/client/src/components/audit-trail-list/audit-trail-list.component.jsx b/client/src/components/audit-trail-list/audit-trail-list.component.jsx index 9722005d6..493bcb1e6 100644 --- a/client/src/components/audit-trail-list/audit-trail-list.component.jsx +++ b/client/src/components/audit-trail-list/audit-trail-list.component.jsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import { useState } from "react"; import { Table } from "antd"; import { alphaSort } from "../../utils/sorters"; import { DateTimeFormatter } from "../../utils/DateFormatter"; diff --git a/client/src/components/audit-trail-list/audit-trail-list.container.jsx b/client/src/components/audit-trail-list/audit-trail-list.container.jsx index 6361bc240..eb60fd512 100644 --- a/client/src/components/audit-trail-list/audit-trail-list.container.jsx +++ b/client/src/components/audit-trail-list/audit-trail-list.container.jsx @@ -1,4 +1,3 @@ -import React from "react"; import AuditTrailListComponent from "./audit-trail-list.component"; import { useQuery } from "@apollo/client"; import { QUERY_AUDIT_TRAIL } from "../../graphql/audit_trail.queries"; diff --git a/client/src/components/audit-trail-list/email-audit-trail-list.component.jsx b/client/src/components/audit-trail-list/email-audit-trail-list.component.jsx index 5f462d500..e63af3af1 100644 --- a/client/src/components/audit-trail-list/email-audit-trail-list.component.jsx +++ b/client/src/components/audit-trail-list/email-audit-trail-list.component.jsx @@ -1,5 +1,5 @@ import { Table } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { DateTimeFormatter } from "../../utils/DateFormatter"; import { alphaSort } from "../../utils/sorters"; diff --git a/client/src/components/audit-trail-values/audit-trail-values.component.jsx b/client/src/components/audit-trail-values/audit-trail-values.component.jsx index b3c531927..8da394c20 100644 --- a/client/src/components/audit-trail-values/audit-trail-values.component.jsx +++ b/client/src/components/audit-trail-values/audit-trail-values.component.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { List } from "antd"; import Icon from "@ant-design/icons"; import { FaArrowRight } from "react-icons/fa"; diff --git a/client/src/components/barcode-popup/barcode-popup.component.jsx b/client/src/components/barcode-popup/barcode-popup.component.jsx index c6dbb4ee3..8dac738e2 100644 --- a/client/src/components/barcode-popup/barcode-popup.component.jsx +++ b/client/src/components/barcode-popup/barcode-popup.component.jsx @@ -1,5 +1,4 @@ import { Popover, Tag } from "antd"; -import React from "react"; import Barcode from "react-barcode"; import { useTranslation } from "react-i18next"; diff --git a/client/src/components/bill-cm-returns-table/bill-cm-returns-table.component.jsx b/client/src/components/bill-cm-returns-table/bill-cm-returns-table.component.jsx index 5eb8bb4fc..8a2263bda 100644 --- a/client/src/components/bill-cm-returns-table/bill-cm-returns-table.component.jsx +++ b/client/src/components/bill-cm-returns-table/bill-cm-returns-table.component.jsx @@ -1,5 +1,5 @@ import { Checkbox, Form, Skeleton, Typography } from "antd"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import ReadOnlyFormItemComponent from "../form-items-formatted/read-only-form-item.component"; import "./bill-cm-returns-table.styles.scss"; @@ -33,7 +33,7 @@ export default function BillCmdReturnsTableComponent({ form, returnLoading, retu return ( - {(fields, { add, remove, move }) => { + {(fields) => { return ( <> {t("bills.labels.creditsnotreceived")} diff --git a/client/src/components/bill-delete-button/bill-delete-button.component.jsx b/client/src/components/bill-delete-button/bill-delete-button.component.jsx index 5ab24d60f..c3403e935 100644 --- a/client/src/components/bill-delete-button/bill-delete-button.component.jsx +++ b/client/src/components/bill-delete-button/bill-delete-button.component.jsx @@ -1,7 +1,7 @@ import { DeleteFilled } from "@ant-design/icons"; import { useMutation } from "@apollo/client"; import { Button, Popconfirm } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { DELETE_BILL } from "../../graphql/bills.queries"; import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component"; @@ -43,7 +43,7 @@ export function BillDeleteButton({ bill, jobid, callback, insertAuditTrail }) { } }); - if (!!!result.errors) { + if (!result.errors) { notification["success"]({ message: t("bills.successes.deleted") }); insertAuditTrail({ jobid: jobid, diff --git a/client/src/components/bill-detail-edit/bill-detail-edit-component.jsx b/client/src/components/bill-detail-edit/bill-detail-edit-component.jsx index e37985222..e7dc13b1e 100644 --- a/client/src/components/bill-detail-edit/bill-detail-edit-component.jsx +++ b/client/src/components/bill-detail-edit/bill-detail-edit-component.jsx @@ -2,7 +2,7 @@ import { PageHeader } from "@ant-design/pro-layout"; import { useMutation, useQuery } from "@apollo/client"; import { Button, Divider, Form, Popconfirm, Space } from "antd"; import queryString from "query-string"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { useLocation } from "react-router-dom"; @@ -10,7 +10,6 @@ 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"; import { insertAuditTrail } from "../../redux/application/application.actions"; -import { setModalContext } from "../../redux/modals/modals.actions"; import { selectBodyshop } from "../../redux/user/user.selectors"; import AuditTrailMapping from "../../utils/AuditTrailMappings"; import dayjs from "../../utils/day"; @@ -28,13 +27,12 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); const mapDispatchToProps = (dispatch) => ({ - setPartsOrderContext: (context) => dispatch(setModalContext({ context: context, modal: "partsOrder" })), insertAuditTrail: ({ jobid, operation, type }) => dispatch(insertAuditTrail({ jobid, operation, type })) }); export default connect(mapStateToProps, mapDispatchToProps)(BillDetailEditcontainer); -export function BillDetailEditcontainer({ setPartsOrderContext, insertAuditTrail, bodyshop }) { +export function BillDetailEditcontainer({ insertAuditTrail, bodyshop }) { const search = queryString.parse(useLocation().search); const { t } = useTranslation(); @@ -48,7 +46,7 @@ export function BillDetailEditcontainer({ setPartsOrderContext, insertAuditTrail const { loading, error, data, refetch } = useQuery(QUERY_BILL_BY_PK, { variables: { billid: search.billid }, - skip: !!!search.billid, + skip: !search.billid, fetchPolicy: "network-only", nextFetchPolicy: "network-only" }); @@ -71,7 +69,7 @@ export function BillDetailEditcontainer({ setPartsOrderContext, insertAuditTrail setUpdateLoading(true); //let adjustmentsToInsert = {}; - const { billlines, upload, ...bill } = values; + const { billlines, ...bill } = values; const updates = []; updates.push( update_bill({ @@ -98,6 +96,7 @@ export function BillDetailEditcontainer({ setPartsOrderContext, insertAuditTrail }); billlines.forEach((billline) => { + // eslint-disable-next-line no-unused-vars const { deductedfromlbr, inventories, jobline, original_actual_price, create_ppc, ...il } = billline; delete il.__typename; @@ -152,8 +151,8 @@ export function BillDetailEditcontainer({ setPartsOrderContext, insertAuditTrail if (error) return ; if (!search.billid) return <>; //
{t("bills.labels.noneselected")}
; - const exported = data && data.bills_by_pk && data.bills_by_pk.exported; - const isinhouse = data && data.bills_by_pk && data.bills_by_pk.isinhouse; + const exported = data?.bills_by_pk && data.bills_by_pk.exported; + const isinhouse = data?.bills_by_pk && data.bills_by_pk.isinhouse; return ( <> @@ -183,8 +182,8 @@ export function BillDetailEditcontainer({ setPartsOrderContext, insertAuditTrail {t("general.actions.save")} - - + + } /> @@ -220,11 +219,11 @@ const transformData = (data) => { billlines: data.bills_by_pk.billlines.map((i) => { return { ...i, - joblineid: !!i.joblineid ? i.joblineid : "noline", + joblineid: i.joblineid ? i.joblineid : "noline", applicable_taxes: { - federal: (i.applicable_taxes && i.applicable_taxes.federal) || false, - state: (i.applicable_taxes && i.applicable_taxes.state) || false, - local: (i.applicable_taxes && i.applicable_taxes.local) || false + federal: i.applicable_taxes?.federal || false, + state: i.applicable_taxes?.state || false, + local: i.applicable_taxes?.local || false } }; }), diff --git a/client/src/components/bill-detail-edit/bill-detail-edit-return.component.jsx b/client/src/components/bill-detail-edit/bill-detail-edit-return.component.jsx index 3694780d0..775f4d32b 100644 --- a/client/src/components/bill-detail-edit/bill-detail-edit-return.component.jsx +++ b/client/src/components/bill-detail-edit/bill-detail-edit-return.component.jsx @@ -1,18 +1,15 @@ import { Button, Checkbox, Form, Modal } from "antd"; import queryString from "query-string"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; 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"; -import { selectBodyshop } from "../../redux/user/user.selectors"; import ReadOnlyFormItemComponent from "../form-items-formatted/read-only-form-item.component"; -const mapStateToProps = createStructuredSelector({ - bodyshop: selectBodyshop -}); +const mapStateToProps = createStructuredSelector({}); + const mapDispatchToProps = (dispatch) => ({ setPartsOrderContext: (context) => dispatch( @@ -20,20 +17,12 @@ const mapDispatchToProps = (dispatch) => ({ context: context, modal: "partsOrder" }) - ), - insertAuditTrail: ({ jobid, operation, type }) => - dispatch( - insertAuditTrail({ - jobid, - operation, - type - }) ) }); export default connect(mapStateToProps, mapDispatchToProps)(BillDetailEditReturn); -export function BillDetailEditReturn({ setPartsOrderContext, insertAuditTrail, bodyshop, data, disabled }) { +export function BillDetailEditReturn({ setPartsOrderContext, data, disabled }) { const search = queryString.parse(useLocation().search); const history = useNavigate(); const { t } = useTranslation(); @@ -86,9 +75,9 @@ export function BillDetailEditReturn({ setPartsOrderContext, insertAuditTrail, b title={t("bills.actions.return")} onOk={() => form.submit()} > -
+ - {(fields, { add, remove, move }) => { + {(fields) => { return ( diff --git a/client/src/components/bill-detail-edit/bill-detail-edit.container.jsx b/client/src/components/bill-detail-edit/bill-detail-edit.container.jsx index f2b4e9ddf..8a24df0b1 100644 --- a/client/src/components/bill-detail-edit/bill-detail-edit.container.jsx +++ b/client/src/components/bill-detail-edit/bill-detail-edit.container.jsx @@ -1,6 +1,5 @@ import { Drawer, Grid } from "antd"; import queryString from "query-string"; -import React from "react"; import { useLocation, useNavigate } from "react-router-dom"; import BillDetailEditComponent from "./bill-detail-edit-component"; diff --git a/client/src/components/bill-enter-modal/bill-enter-modal.container.jsx b/client/src/components/bill-enter-modal/bill-enter-modal.container.jsx index 27dc0a1b0..f18f1123a 100644 --- a/client/src/components/bill-enter-modal/bill-enter-modal.container.jsx +++ b/client/src/components/bill-enter-modal/bill-enter-modal.container.jsx @@ -85,6 +85,8 @@ function BillEnterModalContainer({ billEnterModal, toggleModalVisible, bodyshop, } setLoading(true); + + // eslint-disable-next-line no-unused-vars const { upload, location, outstanding_returns, inventory, federal_tax_exempt, ...remainingValues } = values; let adjustmentsToInsert = {}; @@ -102,9 +104,13 @@ function BillEnterModalContainer({ billEnterModal, toggleModalVisible, bodyshop, const { deductedfromlbr, lbr_adjustment, + // eslint-disable-next-line no-unused-vars location: lineLocation, + // eslint-disable-next-line no-unused-vars part_type, + // eslint-disable-next-line no-unused-vars create_ppc, + // eslint-disable-next-line no-unused-vars original_actual_price, ...restI } = i; diff --git a/client/src/components/bill-form-lines-extended/bill-form-lines-extended.component.jsx b/client/src/components/bill-form-lines-extended/bill-form-lines-extended.component.jsx index 2cb93f328..4ef00afb1 100644 --- a/client/src/components/bill-form-lines-extended/bill-form-lines-extended.component.jsx +++ b/client/src/components/bill-form-lines-extended/bill-form-lines-extended.component.jsx @@ -1,11 +1,11 @@ import { Form, Input, Table } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import CurrencyFormatter from "../../utils/CurrencyFormatter"; import { alphaSort } from "../../utils/sorters"; import BillFormItemsExtendedFormItem from "./bill-form-lines.extended.formitem.component"; -export default function BillFormLinesExtended({ lineData, discount, form, responsibilityCenters, disabled }) { +export default function BillFormLinesExtended({ lineData, discount, form, responsibilityCenters }) { const [search, setSearch] = useState(""); const { t } = useTranslation(); const columns = [ diff --git a/client/src/components/bill-form-lines-extended/bill-form-lines.extended.formitem.component.jsx b/client/src/components/bill-form-lines-extended/bill-form-lines.extended.formitem.component.jsx index 50dd3ab10..ac136cdce 100644 --- a/client/src/components/bill-form-lines-extended/bill-form-lines.extended.formitem.component.jsx +++ b/client/src/components/bill-form-lines-extended/bill-form-lines.extended.formitem.component.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { MinusCircleFilled, PlusCircleFilled, WarningOutlined } from "@ant-design/icons"; import { Button, Form, Input, InputNumber, Select, Space, Switch } from "antd"; import { useTranslation } from "react-i18next"; @@ -12,7 +11,7 @@ import CiecaSelect from "../../utils/Ciecaselect"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(BillFormItemsExtendedFormItem); @@ -22,7 +21,6 @@ export function BillFormItemsExtendedFormItem({ bodyshop, form, record, - index, disabled, responsibilityCenters, discount @@ -78,7 +76,7 @@ export function BillFormItemsExtendedFormItem({ ...billlineskeys, [record.id]: { ...billlineskeys[billlineskeys], - actual_cost: !!billlineskeys[billlineskeys].actual_cost + actual_cost: billlineskeys[billlineskeys].actual_cost ? billlineskeys[billlineskeys].actual_cost : Math.round((parseFloat(e.target.value) * (1 - discount) + Number.EPSILON) * 100) / 100 } @@ -93,7 +91,7 @@ export function BillFormItemsExtendedFormItem({ {() => { const line = value; - if (!!!line) return null; + if (!line) return null; const lineDiscount = (1 - Math.round((line.actual_cost / line.actual_price) * 100) / 100).toPrecision(2); if (lineDiscount - discount === 0) return
; diff --git a/client/src/components/bill-form/bill-form.component.jsx b/client/src/components/bill-form/bill-form.component.jsx index 143747f61..c0f209205 100644 --- a/client/src/components/bill-form/bill-form.component.jsx +++ b/client/src/components/bill-form/bill-form.component.jsx @@ -2,7 +2,7 @@ import Icon, { UploadOutlined } from "@ant-design/icons"; import { useApolloClient } from "@apollo/client"; import { useSplitTreatments } from "@splitsoftware/splitio-react"; import { Alert, Divider, Form, Input, Select, Space, Statistic, Switch, Upload } from "antd"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { MdOpenInNew } from "react-icons/md"; import { connect } from "react-redux"; @@ -26,7 +26,7 @@ import DateTimePicker from "../form-date-time-picker/form-date-time-picker.compo const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({}); +const mapDispatchToProps = () => ({}); export function BillFormComponent({ bodyshop, @@ -254,7 +254,7 @@ export function BillFormComponent({ required: true //message: t("general.validation.required"), }, - ({ getFieldValue }) => ({ + () => ({ validator(rule, value) { if (ClosingPeriod.treatment === "on" && bodyshop.accountingconfig.ClosingPeriod) { if ( @@ -374,8 +374,10 @@ export function BillFormComponent({ let totals; if (!!values.total && !!values.billlines && values.billlines.length > 0) totals = CalculateBillTotal(values); - if (!!totals) + if (totals) return ( + // TODO: Align is not correct + // eslint-disable-next-line react/no-unknown-property
@@ -458,7 +460,7 @@ export function BillFormComponent({ if (Array.isArray(e)) { return e; } - return e && e.fileList; + return e?.fileList; }} > false} listType="picture"> diff --git a/client/src/components/bill-form/bill-form.container.jsx b/client/src/components/bill-form/bill-form.container.jsx index 93af78498..6ba9bd39f 100644 --- a/client/src/components/bill-form/bill-form.container.jsx +++ b/client/src/components/bill-form/bill-form.container.jsx @@ -1,6 +1,5 @@ import { useLazyQuery, useQuery } from "@apollo/client"; import { useSplitTreatments } from "@splitsoftware/splitio-react"; -import React from "react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { QUERY_OUTSTANDING_INVENTORY } from "../../graphql/inventory.queries"; diff --git a/client/src/components/bill-form/bill-form.lines.component.jsx b/client/src/components/bill-form/bill-form.lines.component.jsx index 896c529eb..994169302 100644 --- a/client/src/components/bill-form/bill-form.lines.component.jsx +++ b/client/src/components/bill-form/bill-form.lines.component.jsx @@ -1,7 +1,6 @@ import { DeleteFilled, DollarCircleFilled } from "@ant-design/icons"; import { useSplitTreatments } from "@splitsoftware/splitio-react"; import { Button, Checkbox, Form, Input, InputNumber, Select, Space, Switch, Table, Tooltip } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -16,7 +15,7 @@ const mapStateToProps = createStructuredSelector({ //currentUser: selectCurrentUser bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); @@ -27,8 +26,7 @@ export function BillEnterModalLinesComponent({ discount, form, responsibilityCenters, - billEdit, - billid + billEdit }) { const { t } = useTranslation(); const { setFieldsValue, getFieldsValue, getFieldValue } = form; @@ -126,7 +124,7 @@ export function BillEnterModalLinesComponent({ ] }; }, - formInput: (record, index) => + formInput: () => }, { title: t("billlines.fields.quantity"), @@ -158,7 +156,7 @@ export function BillEnterModalLinesComponent({ ] }; }, - formInput: (record, index) => + formInput: () => }, { title: t("billlines.fields.actual_price"), @@ -188,7 +186,7 @@ export function BillEnterModalLinesComponent({ if (idx === index) { return { ...item, - actual_cost: !!item.actual_cost + actual_cost: item.actual_cost ? item.actual_cost : Math.round((parseFloat(e.target.value) * (1 - discount) + Number.EPSILON) * 100) / 100 }; @@ -258,7 +256,7 @@ export function BillEnterModalLinesComponent({ {() => { const line = getFieldsValue(["billlines"]).billlines[index]; - if (!!!line) return null; + if (!line) return null; let lineDiscount = 1 - line.actual_cost / line.actual_price; if (isNaN(lineDiscount)) lineDiscount = 0; return ( @@ -322,7 +320,7 @@ export function BillEnterModalLinesComponent({ ] }; }, - formInput: (record, index) => ( + formInput: () => ( {bodyshop.md_parts_locations.map((loc, idx) => ( @@ -366,7 +364,7 @@ export function BillEnterModalLinesComponent({ name: [field.name, "deductedfromlbr"] }; }, - formInput: (record, index) => , + formInput: () => , additional: (record, index) => ( {() => { @@ -478,7 +476,7 @@ export function BillEnterModalLinesComponent({ name: [field.name, "applicable_taxes", "federal"] }; }, - formInput: (record, index) => + formInput: () => } ] }), @@ -495,7 +493,7 @@ export function BillEnterModalLinesComponent({ name: [field.name, "applicable_taxes", "state"] }; }, - formInput: (record, index) => + formInput: () => }, ...InstanceRenderManager({ @@ -513,7 +511,7 @@ export function BillEnterModalLinesComponent({ name: [field.name, "applicable_taxes", "local"] }; }, - formInput: (record, index) => + formInput: () => } ] }), @@ -575,7 +573,7 @@ export function BillEnterModalLinesComponent({ } ]} > - {(fields, { add, remove, move }) => { + {(fields, { add, remove }) => { return ( <>
{ +const EditableCell = ({ dataIndex, record, children, formInput, formItemProps, additional, wrapper, ...restProps }) => { const propsFinal = formItemProps && formItemProps(record); if (propsFinal && "key" in propsFinal) { delete propsFinal.key; diff --git a/client/src/components/bill-form/bill-form.totals.utility.js b/client/src/components/bill-form/bill-form.totals.utility.js index cec5c9152..08ef9ba9e 100644 --- a/client/src/components/bill-form/bill-form.totals.utility.js +++ b/client/src/components/bill-form/bill-form.totals.utility.js @@ -9,10 +9,10 @@ export const CalculateBillTotal = (invoice) => { let stateTax = Dinero({ amount: 0 }); let localTax = Dinero({ amount: 0 }); - if (!!!billlines) return null; + if (!billlines) return null; billlines.forEach((i) => { - if (!!i) { + if (i) { const itemTotal = Dinero({ amount: Math.round((i.actual_cost || 0) * 100) }).multiply(i.quantity || 1); diff --git a/client/src/components/bill-inventory-table/bill-inventory-table.component.jsx b/client/src/components/bill-inventory-table/bill-inventory-table.component.jsx index 7cbdd27b9..bda477748 100644 --- a/client/src/components/bill-inventory-table/bill-inventory-table.component.jsx +++ b/client/src/components/bill-inventory-table/bill-inventory-table.component.jsx @@ -1,5 +1,5 @@ import { Checkbox, Form, Skeleton, Typography } from "antd"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import ReadOnlyFormItemComponent from "../form-items-formatted/read-only-form-item.component"; import "./bill-inventory-table.styles.scss"; @@ -13,7 +13,7 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, billEnterModal: selectBillEnterModal }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(BillInventoryTable); @@ -22,7 +22,7 @@ export function BillInventoryTable({ billEnterModal, bodyshop, form, billEdit, i const { t } = useTranslation(); useEffect(() => { - if (inventoryData && inventoryData.inventory) { + if (inventoryData?.inventory) { form.setFieldsValue({ inventory: billEnterModal.context.consumeinventoryid ? inventoryData.inventory.map((i) => { @@ -47,7 +47,7 @@ export function BillInventoryTable({ billEnterModal, bodyshop, form, billEdit, i return ( - {(fields, { add, remove, move }) => { + {(fields) => { return ( <> {t("inventory.labels.inventory")} diff --git a/client/src/components/bill-mark-exported-button/bill-mark-exported-button.component.jsx b/client/src/components/bill-mark-exported-button/bill-mark-exported-button.component.jsx index a3954a626..2acb47766 100644 --- a/client/src/components/bill-mark-exported-button/bill-mark-exported-button.component.jsx +++ b/client/src/components/bill-mark-exported-button/bill-mark-exported-button.component.jsx @@ -1,6 +1,6 @@ import { gql, useMutation } from "@apollo/client"; import { Button } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -15,7 +15,7 @@ const mapStateToProps = createStructuredSelector({ authLevel: selectAuthLevel, currentUser: selectCurrentUser }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); diff --git a/client/src/components/bill-print-button/bill-print-button.component.jsx b/client/src/components/bill-print-button/bill-print-button.component.jsx index 70449db3e..121579e40 100644 --- a/client/src/components/bill-print-button/bill-print-button.component.jsx +++ b/client/src/components/bill-print-button/bill-print-button.component.jsx @@ -1,5 +1,5 @@ import { Button, Space } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { GenerateDocument } from "../../utils/RenderTemplate"; import { TemplateList } from "../../utils/TemplateConstants"; @@ -26,7 +26,7 @@ export default function BillPrintButton({ billid }) { null, notification ); - } catch (e) { + } catch { console.warn("Warning: Error generating a document."); } setLoading(false); diff --git a/client/src/components/bill-reexport-button/bill-reexport-button.component.jsx b/client/src/components/bill-reexport-button/bill-reexport-button.component.jsx index 03c5e47e7..5db76ca62 100644 --- a/client/src/components/bill-reexport-button/bill-reexport-button.component.jsx +++ b/client/src/components/bill-reexport-button/bill-reexport-button.component.jsx @@ -1,6 +1,6 @@ import { gql, useMutation } from "@apollo/client"; import { Button } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -13,7 +13,7 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, authLevel: selectAuthLevel }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); diff --git a/client/src/components/billline-add-inventory/billline-add-inventory.component.jsx b/client/src/components/billline-add-inventory/billline-add-inventory.component.jsx index 81321bcbc..583da81b7 100644 --- a/client/src/components/billline-add-inventory/billline-add-inventory.component.jsx +++ b/client/src/components/billline-add-inventory/billline-add-inventory.component.jsx @@ -3,7 +3,7 @@ import { useMutation } from "@apollo/client"; import { Button, Tooltip } from "antd"; import { t } from "i18next"; import dayjs from "./../../utils/day"; -import React, { useState } from "react"; +import { useState } from "react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { INSERT_INVENTORY_AND_CREDIT } from "../../graphql/inventory.queries"; @@ -17,7 +17,7 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, currentUser: selectCurrentUser }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(BilllineAddInventory); diff --git a/client/src/components/bills-vendors-list/bills-vendors-list.component.jsx b/client/src/components/bills-vendors-list/bills-vendors-list.component.jsx index 433f18960..09c157ef0 100644 --- a/client/src/components/bills-vendors-list/bills-vendors-list.component.jsx +++ b/client/src/components/bills-vendors-list/bills-vendors-list.component.jsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import { useState } from "react"; import { QUERY_ALL_VENDORS } from "../../graphql/vendors.queries"; import { useQuery } from "@apollo/client"; import queryString from "query-string"; @@ -100,9 +100,9 @@ export default function BillsVendorsList() { selectedRowKeys: [search.vendorid], type: "radio" }} - onRow={(record, rowIndex) => { + onRow={(record) => { return { - onClick: (event) => { + onClick: () => { handleOnRowClick(record); } // click row }; diff --git a/client/src/components/ca-bc-etf-table-modal/ca-bc-etf-table-modal.container.jsx b/client/src/components/ca-bc-etf-table-modal/ca-bc-etf-table-modal.container.jsx index 563beac83..0cb61e85e 100644 --- a/client/src/components/ca-bc-etf-table-modal/ca-bc-etf-table-modal.container.jsx +++ b/client/src/components/ca-bc-etf-table-modal/ca-bc-etf-table-modal.container.jsx @@ -1,5 +1,5 @@ import { Button, Form, Modal } from "antd"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -32,12 +32,13 @@ export function ContractsFindModalContainer({ caBcEtfTableModal, toggleModalVisi logImEXEvent("ca_bc_etf_table_parse"); setLoading(true); const claimNumbers = []; - values.table.split("\n").forEach((row, idx, arr) => { + values.table.split("\n").forEach((row) => { const { 1: claim, 2: shortclaim, 4: amount } = row.split("\t"); if (!claim || !shortclaim) return; const trimmedShortClaim = shortclaim.trim(); // const trimmedClaim = claim.trim(); if (amount.slice(-1) === "-") { + // NO OP } claimNumbers.push({ diff --git a/client/src/components/ca-bc-etf-table-modal/ca-bc-etf-table.modal.component.jsx b/client/src/components/ca-bc-etf-table-modal/ca-bc-etf-table.modal.component.jsx index e9224ae6b..517ed9db2 100644 --- a/client/src/components/ca-bc-etf-table-modal/ca-bc-etf-table.modal.component.jsx +++ b/client/src/components/ca-bc-etf-table-modal/ca-bc-etf-table.modal.component.jsx @@ -1,17 +1,13 @@ import { Form, Input, Radio } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; -import { selectBodyshop } from "../../redux/user/user.selectors"; -const mapStateToProps = createStructuredSelector({ - bodyshop: selectBodyshop -}); +const mapStateToProps = createStructuredSelector({}); export default connect(mapStateToProps, null)(PartsReceiveModalComponent); -export function PartsReceiveModalComponent({ bodyshop, form }) { +export function PartsReceiveModalComponent() { const { t } = useTranslation(); return ( diff --git a/client/src/components/ca-bc-pvrt-calculator/ca-bc-pvrt-calculator.component.jsx b/client/src/components/ca-bc-pvrt-calculator/ca-bc-pvrt-calculator.component.jsx index c48875f4c..ee99c1c8b 100644 --- a/client/src/components/ca-bc-pvrt-calculator/ca-bc-pvrt-calculator.component.jsx +++ b/client/src/components/ca-bc-pvrt-calculator/ca-bc-pvrt-calculator.component.jsx @@ -1,6 +1,6 @@ import { CalculatorFilled } from "@ant-design/icons"; import { Button, Form, InputNumber, Popover, Space } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { logImEXEvent } from "../../firebase/firebase.utils"; diff --git a/client/src/components/card-payment-modal/card-payment-modal.component.jsx b/client/src/components/card-payment-modal/card-payment-modal.component.jsx index 7e82168a0..b69644789 100644 --- a/client/src/components/card-payment-modal/card-payment-modal.component.jsx +++ b/client/src/components/card-payment-modal/card-payment-modal.component.jsx @@ -2,7 +2,7 @@ import { CopyFilled, DeleteFilled } from "@ant-design/icons"; import { useLazyQuery, useMutation } from "@apollo/client"; import { Button, Card, Col, Form, Input, message, Row, Space, Spin, Statistic } from "antd"; import axios from "axios"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -133,7 +133,6 @@ const CardPaymentModalComponent = ({ }); if (window.intellipay) { - // eslint-disable-next-line no-eval eval(response.data); pollForIntelliPay(() => { SetIntellipayCallbackFunctions(); @@ -149,7 +148,7 @@ const CardPaymentModalComponent = ({ window.intellipay.initialize(); }); } - } catch (error) { + } catch { notification.open({ type: "error", message: t("job_payments.notifications.error.openingip") @@ -187,7 +186,7 @@ const CardPaymentModalComponent = ({ message.success(t("general.actions.copied")); } setLoading(false); - } catch (error) { + } catch { notification.open({ type: "error", message: t("job_payments.notifications.error.openingip") @@ -359,7 +358,7 @@ function pollForIntelliPay(callbackFunction) { const startTime = Date.now(); function checkFixAmount() { - if (window.intellipay && window.intellipay.fixAmount !== undefined) { + if (window.intellipay?.fixAmount) { callbackFunction(); return; } diff --git a/client/src/components/card-payment-modal/card-payment-modal.container.jsx b/client/src/components/card-payment-modal/card-payment-modal.container.jsx index 83210f06f..4aebc4e20 100644 --- a/client/src/components/card-payment-modal/card-payment-modal.container.jsx +++ b/client/src/components/card-payment-modal/card-payment-modal.container.jsx @@ -1,23 +1,20 @@ import { Button, Modal } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { toggleModalVisible } from "../../redux/modals/modals.actions"; import { selectCardPayment } from "../../redux/modals/modals.selectors"; -import { selectBodyshop } from "../../redux/user/user.selectors"; import CardPaymentModalComponent from "./card-payment-modal.component"; const mapStateToProps = createStructuredSelector({ - cardPaymentModal: selectCardPayment, - bodyshop: selectBodyshop + cardPaymentModal: selectCardPayment }); const mapDispatchToProps = (dispatch) => ({ toggleModalVisible: () => dispatch(toggleModalVisible("cardPayment")) }); -function CardPaymentModalContainer({ cardPaymentModal, toggleModalVisible, bodyshop }) { +function CardPaymentModalContainer({ cardPaymentModal, toggleModalVisible }) { const { open } = cardPaymentModal; const { t } = useTranslation(); diff --git a/client/src/components/chat-affix/registerMessagingSocketHandlers.js b/client/src/components/chat-affix/registerMessagingSocketHandlers.js index 88e0ac9df..14d7d4a0e 100644 --- a/client/src/components/chat-affix/registerMessagingSocketHandlers.js +++ b/client/src/components/chat-affix/registerMessagingSocketHandlers.js @@ -57,7 +57,7 @@ export const registerMessagingHandlers = ({ socket, client }) => { existingConversation: true }); } - } catch (error) { + } catch { logLocal("handleNewMessageSummary - Cache miss", { conversationId }); } } @@ -328,8 +328,7 @@ export const registerMessagingHandlers = ({ socket, client }) => { } break; - case "tag-added": - // Ensure `job_conversations` is properly formatted + case "tag-added": { // Ensure `job_conversations` is properly formatted const formattedJobConversations = job_conversations.map((jc) => ({ __typename: "job_conversations", jobid: jc.jobid || jc.job?.id, @@ -375,6 +374,7 @@ export const registerMessagingHandlers = ({ socket, client }) => { }); break; + } case "tag-removed": try { @@ -462,7 +462,7 @@ export const registerMessagingHandlers = ({ socket, client }) => { logLocal("handlePhoneNumberOptedOut - Error", { error: error.message }); } }; - + // New handler for phone number opt-in const handlePhoneNumberOptedIn = async (data) => { const { bodyshopid, phone_number } = data; diff --git a/client/src/components/chat-conversation-list/chat-conversation-list.component.jsx b/client/src/components/chat-conversation-list/chat-conversation-list.component.jsx index 72f8be33c..c971c118a 100644 --- a/client/src/components/chat-conversation-list/chat-conversation-list.component.jsx +++ b/client/src/components/chat-conversation-list/chat-conversation-list.component.jsx @@ -67,7 +67,7 @@ function ChatConversationListComponent({ conversationList, selectedConversation, item.job_conversations.length > 0 ? item.job_conversations.map((j, idx) => {j.job.ro_number}) : null; - const names = <>{_.uniq(item.job_conversations.map((j, idx) => OwnerNameDisplayFunction(j.job)))}; + const names = <>{_.uniq(item.job_conversations.map((j) => OwnerNameDisplayFunction(j.job)))}; const cardTitle = ( <> {item.label && {item.label}} diff --git a/client/src/components/chat-conversation-title-tags/chat-conversation-title-tags.component.jsx b/client/src/components/chat-conversation-title-tags/chat-conversation-title-tags.component.jsx index 32ca5cad0..2aeb16573 100644 --- a/client/src/components/chat-conversation-title-tags/chat-conversation-title-tags.component.jsx +++ b/client/src/components/chat-conversation-title-tags/chat-conversation-title-tags.component.jsx @@ -21,7 +21,7 @@ export function ChatConversationTitleTags({ jobConversations, bodyshop }) { const handleRemoveTag = async (jobId) => { const convId = jobConversations[0].conversationid; - if (!!convId) { + if (convId) { await removeJobConversation({ variables: { conversationId: convId, diff --git a/client/src/components/chat-conversation-title/chat-conversation-title.component.jsx b/client/src/components/chat-conversation-title/chat-conversation-title.component.jsx index 933617cde..86b8cca60 100644 --- a/client/src/components/chat-conversation-title/chat-conversation-title.component.jsx +++ b/client/src/components/chat-conversation-title/chat-conversation-title.component.jsx @@ -1,5 +1,4 @@ import { Space } from "antd"; -import React from "react"; import PhoneNumberFormatter from "../../utils/PhoneFormatter"; import ChatArchiveButton from "../chat-archive-button/chat-archive-button.component"; import ChatConversationTitleTags from "../chat-conversation-title-tags/chat-conversation-title-tags.component"; @@ -16,10 +15,10 @@ const mapDispatchToProps = () => ({}); export function ChatConversationTitle({ conversation }) { return ( - {conversation && conversation.phone_num} + {conversation?.phone_num} - + diff --git a/client/src/components/chat-conversation/chat-conversation.component.jsx b/client/src/components/chat-conversation/chat-conversation.component.jsx index 3334b5cbd..f5812e34f 100644 --- a/client/src/components/chat-conversation/chat-conversation.component.jsx +++ b/client/src/components/chat-conversation/chat-conversation.component.jsx @@ -1,4 +1,3 @@ -import React from "react"; import AlertComponent from "../alert/alert.component"; import ChatConversationTitle from "../chat-conversation-title/chat-conversation-title.component"; import ChatMessageListComponent from "../chat-messages-list/chat-message-list.component"; diff --git a/client/src/components/chat-label/chat-label.component.jsx b/client/src/components/chat-label/chat-label.component.jsx index 1152acf29..5fc4274d6 100644 --- a/client/src/components/chat-label/chat-label.component.jsx +++ b/client/src/components/chat-label/chat-label.component.jsx @@ -14,7 +14,7 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({}); +const mapDispatchToProps = () => ({}); export function ChatLabel({ conversation, bodyshop }) { const [loading, setLoading] = useState(false); diff --git a/client/src/components/chat-media-selector/chat-media-selector.component.jsx b/client/src/components/chat-media-selector/chat-media-selector.component.jsx index 75de2879a..85ea7aa93 100644 --- a/client/src/components/chat-media-selector/chat-media-selector.component.jsx +++ b/client/src/components/chat-media-selector/chat-media-selector.component.jsx @@ -19,7 +19,7 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({}); +const mapDispatchToProps = () => ({}); export default connect(mapStateToProps, mapDispatchToProps)(ChatMediaSelector); diff --git a/client/src/components/chat-messages-list/chat-message-list.component.jsx b/client/src/components/chat-messages-list/chat-message-list.component.jsx index 3f2bba2f0..18658ea4a 100644 --- a/client/src/components/chat-messages-list/chat-message-list.component.jsx +++ b/client/src/components/chat-messages-list/chat-message-list.component.jsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect, useRef, useState } from "react"; +import { useCallback, useEffect, useRef, useState } from "react"; import { Virtuoso } from "react-virtuoso"; import { renderMessage } from "./renderMessage"; import "./chat-message-list.styles.scss"; @@ -76,7 +76,7 @@ export default function ChatMessageListComponent({ messages }) { acc + (message.image_path?.length || 0), 0) ? messages.length : 0} + overscan={messages.reduce((acc, message) => acc + (message.image_path?.length || 0), 0) ? messages.length : 0} itemContent={(index) => renderMessage(messages, index)} followOutput={(isAtBottom) => handleScrollStateChange(isAtBottom)} initialTopMostItemIndex={messages.length - 1} diff --git a/client/src/components/chat-presets/chat-presets.component.jsx b/client/src/components/chat-presets/chat-presets.component.jsx index 63b79c373..be3a15e00 100644 --- a/client/src/components/chat-presets/chat-presets.component.jsx +++ b/client/src/components/chat-presets/chat-presets.component.jsx @@ -1,6 +1,5 @@ import { PlusCircleOutlined } from "@ant-design/icons"; import { Dropdown } from "antd"; -import React from "react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { setMessage } from "../../redux/messaging/messaging.actions"; diff --git a/client/src/components/chat-print-button/chat-print-button.component.jsx b/client/src/components/chat-print-button/chat-print-button.component.jsx index eb6491b33..b2c514226 100644 --- a/client/src/components/chat-print-button/chat-print-button.component.jsx +++ b/client/src/components/chat-print-button/chat-print-button.component.jsx @@ -1,6 +1,6 @@ import { MailOutlined, PrinterOutlined } from "@ant-design/icons"; import { Space, Spin } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { setEmailOptions } from "../../redux/email/email.actions"; @@ -31,7 +31,7 @@ export function ChatPrintButton({ conversation }) { type, conversation.id, notification - ).catch((e) => { + ).catch(() => { console.warn("Something went wrong generating a document."); }); setLoading(false); diff --git a/client/src/components/chat-tag-ro/chat-tag-ro.component.jsx b/client/src/components/chat-tag-ro/chat-tag-ro.component.jsx index f40c5c85e..3b4fb5c3d 100644 --- a/client/src/components/chat-tag-ro/chat-tag-ro.component.jsx +++ b/client/src/components/chat-tag-ro/chat-tag-ro.component.jsx @@ -1,6 +1,5 @@ import { CloseCircleOutlined, LoadingOutlined } from "@ant-design/icons"; import { Empty, Select, Space } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component"; diff --git a/client/src/components/config-form-components/checkbox/checkbox.component.jsx b/client/src/components/config-form-components/checkbox/checkbox.component.jsx index 7c5a6c4be..3cae823de 100644 --- a/client/src/components/config-form-components/checkbox/checkbox.component.jsx +++ b/client/src/components/config-form-components/checkbox/checkbox.component.jsx @@ -1,5 +1,4 @@ import { Checkbox, Form } from "antd"; -import React from "react"; export default function JobIntakeFormCheckboxComponent({ formItem, readOnly }) { const { name, label, required } = formItem; diff --git a/client/src/components/config-form-components/config-form-components.component.jsx b/client/src/components/config-form-components/config-form-components.component.jsx index abcd6a6b5..57873b3a8 100644 --- a/client/src/components/config-form-components/config-form-components.component.jsx +++ b/client/src/components/config-form-components/config-form-components.component.jsx @@ -1,4 +1,3 @@ -import React from "react"; import FormTypes from "./config-form-types"; export default function ConfirmFormComponents({ componentList, readOnly }) { @@ -7,7 +6,7 @@ export default function ConfirmFormComponents({ componentList, readOnly }) { {componentList.map((f, idx) => { const Comp = FormTypes[f.type]; - if (!!Comp) { + if (Comp) { return ; } else { return
Error
; diff --git a/client/src/components/config-form-components/rate/rate.component.jsx b/client/src/components/config-form-components/rate/rate.component.jsx index 9f7e0189f..6dd09a93a 100644 --- a/client/src/components/config-form-components/rate/rate.component.jsx +++ b/client/src/components/config-form-components/rate/rate.component.jsx @@ -1,5 +1,4 @@ import { Form, Rate } from "antd"; -import React from "react"; export default function JobIntakeFormCheckboxComponent({ formItem, readOnly }) { const { name, label, required } = formItem; diff --git a/client/src/components/config-form-components/slider/slider.component.jsx b/client/src/components/config-form-components/slider/slider.component.jsx index 1fde2bfa4..aff44968e 100644 --- a/client/src/components/config-form-components/slider/slider.component.jsx +++ b/client/src/components/config-form-components/slider/slider.component.jsx @@ -1,5 +1,4 @@ import { Form, Slider } from "antd"; -import React from "react"; export default function JobIntakeFormCheckboxComponent({ formItem, readOnly }) { const { name, label, required, min, max } = formItem; diff --git a/client/src/components/config-form-components/text/text.component.jsx b/client/src/components/config-form-components/text/text.component.jsx index 73394e0c0..cfaea3933 100644 --- a/client/src/components/config-form-components/text/text.component.jsx +++ b/client/src/components/config-form-components/text/text.component.jsx @@ -1,5 +1,4 @@ import { Form, Input } from "antd"; -import React from "react"; export default function JobIntakeFormCheckboxComponent({ formItem, readOnly }) { const { name, label, required } = formItem; diff --git a/client/src/components/config-form-components/textarea/textarea.component.jsx b/client/src/components/config-form-components/textarea/textarea.component.jsx index c9bb19781..b22e5fd96 100644 --- a/client/src/components/config-form-components/textarea/textarea.component.jsx +++ b/client/src/components/config-form-components/textarea/textarea.component.jsx @@ -1,5 +1,4 @@ import { Form, Input } from "antd"; -import React from "react"; export default function JobIntakeFormCheckboxComponent({ formItem, readOnly }) { const { name, label, required, rows } = formItem; diff --git a/client/src/components/conflict/conflict.component.jsx b/client/src/components/conflict/conflict.component.jsx index a14209f8b..5ca772d4a 100644 --- a/client/src/components/conflict/conflict.component.jsx +++ b/client/src/components/conflict/conflict.component.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Button, Result } from "antd"; import { useTranslation } from "react-i18next"; import InstanceRenderManager from "../../utils/instanceRenderMgr"; diff --git a/client/src/components/contract-cars/contract-cars.component.jsx b/client/src/components/contract-cars/contract-cars.component.jsx index 830dd5531..ad606af1f 100644 --- a/client/src/components/contract-cars/contract-cars.component.jsx +++ b/client/src/components/contract-cars/contract-cars.component.jsx @@ -1,5 +1,5 @@ import { Card, Input, Table } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { alphaSort } from "../../utils/sorters"; @@ -114,9 +114,9 @@ export default function ContractsCarsComponent({ loading, data, selectedCarId, h type: "radio", selectedRowKeys: [selectedCarId] }} - onRow={(record, rowIndex) => { + onRow={(record) => { return { - onClick: (event) => { + onClick: () => { handleSelect(record); } }; diff --git a/client/src/components/contract-cars/contract-cars.container.jsx b/client/src/components/contract-cars/contract-cars.container.jsx index 24364313d..21d91c058 100644 --- a/client/src/components/contract-cars/contract-cars.container.jsx +++ b/client/src/components/contract-cars/contract-cars.container.jsx @@ -1,6 +1,5 @@ import { useQuery } from "@apollo/client"; import dayjs from "../../utils/day"; -import React from "react"; import { QUERY_AVAILABLE_CC } from "../../graphql/courtesy-car.queries"; import AlertComponent from "../alert/alert.component"; import ContractCarsComponent from "./contract-cars.component"; diff --git a/client/src/components/contract-convert-to-ro/contract-convert-to-ro.component.jsx b/client/src/components/contract-convert-to-ro/contract-convert-to-ro.component.jsx index e4655c23b..36d7b977a 100644 --- a/client/src/components/contract-convert-to-ro/contract-convert-to-ro.component.jsx +++ b/client/src/components/contract-convert-to-ro/contract-convert-to-ro.component.jsx @@ -2,7 +2,7 @@ import { useMutation } from "@apollo/client"; import { Button, Form, InputNumber, Popover, Radio, Select, Space } from "antd"; import axios from "axios"; import dayjs from "../../utils/day"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { useNavigate } from "react-router-dom"; @@ -16,7 +16,7 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, currentUser: selectCurrentUser }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); @@ -270,7 +270,7 @@ export function ContractConvertToRo({ bodyshop, currentUser, contract, disabled // awaitRefetchQueries: true, }); - if (!!result.errors) { + if (result.errors) { notification["error"]({ message: t("jobs.errors.inserting", { message: JSON.stringify(result.errors) diff --git a/client/src/components/contract-courtesy-car-block/contract-courtesy-car-block.component.jsx b/client/src/components/contract-courtesy-car-block/contract-courtesy-car-block.component.jsx index 75aaa3c9f..75e190056 100644 --- a/client/src/components/contract-courtesy-car-block/contract-courtesy-car-block.component.jsx +++ b/client/src/components/contract-courtesy-car-block/contract-courtesy-car-block.component.jsx @@ -1,5 +1,4 @@ import { Card } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { Link } from "react-router-dom"; import DataLabel from "../data-label/data-label.component"; diff --git a/client/src/components/contract-form/contract-form-job-prefill.component.jsx b/client/src/components/contract-form/contract-form-job-prefill.component.jsx index 6d63f5b8a..68977a3d1 100644 --- a/client/src/components/contract-form/contract-form-job-prefill.component.jsx +++ b/client/src/components/contract-form/contract-form-job-prefill.component.jsx @@ -1,6 +1,6 @@ import { useLazyQuery } from "@apollo/client"; import { Button } from "antd"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { GET_JOB_FOR_CC_CONTRACT } from "../../graphql/jobs.queries"; import { useNotification } from "../../contexts/Notifications/notificationContext.jsx"; diff --git a/client/src/components/contract-form/contract-form.component.jsx b/client/src/components/contract-form/contract-form.component.jsx index b71d7f92f..2c868804d 100644 --- a/client/src/components/contract-form/contract-form.component.jsx +++ b/client/src/components/contract-form/contract-form.component.jsx @@ -1,6 +1,5 @@ import { WarningFilled } from "@ant-design/icons"; import { Form, Input, InputNumber, Space } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { DateFormatter } from "../../utils/DateFormatter"; import dayjs from "../../utils/day"; diff --git a/client/src/components/contract-job-block/contract-job-block.component.jsx b/client/src/components/contract-job-block/contract-job-block.component.jsx index 526860b6b..b85fb0745 100644 --- a/client/src/components/contract-job-block/contract-job-block.component.jsx +++ b/client/src/components/contract-job-block/contract-job-block.component.jsx @@ -1,5 +1,4 @@ import { Card } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { Link } from "react-router-dom"; import DataLabel from "../data-label/data-label.component"; diff --git a/client/src/components/contract-jobs/contract-jobs.component.jsx b/client/src/components/contract-jobs/contract-jobs.component.jsx index ea71c2538..f35e5ff99 100644 --- a/client/src/components/contract-jobs/contract-jobs.component.jsx +++ b/client/src/components/contract-jobs/contract-jobs.component.jsx @@ -1,5 +1,5 @@ import { Card, Input, Table } from "antd"; -import React, { useMemo, useState } from "react"; +import { useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; import { alphaSort } from "../../utils/sorters"; import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component"; @@ -142,9 +142,9 @@ export default function ContractsJobsComponent({ loading, data, selectedJob, han type: "radio", selectedRowKeys: [selectedJob] }} - onRow={(record, rowIndex) => { + onRow={(record) => { return { - onClick: (event) => { + onClick: () => { handleSelect(record); } }; diff --git a/client/src/components/contract-jobs/contract-jobs.container.jsx b/client/src/components/contract-jobs/contract-jobs.container.jsx index 1db612a03..08caa3b9d 100644 --- a/client/src/components/contract-jobs/contract-jobs.container.jsx +++ b/client/src/components/contract-jobs/contract-jobs.container.jsx @@ -1,5 +1,4 @@ import { useQuery } from "@apollo/client"; -import React from "react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { QUERY_ALL_ACTIVE_JOBS } from "../../graphql/jobs.queries"; diff --git a/client/src/components/contract-license-decode-button/contract-license-decode-button.component.jsx b/client/src/components/contract-license-decode-button/contract-license-decode-button.component.jsx index f6bbf7e02..86825f157 100644 --- a/client/src/components/contract-license-decode-button/contract-license-decode-button.component.jsx +++ b/client/src/components/contract-license-decode-button/contract-license-decode-button.component.jsx @@ -1,6 +1,6 @@ import { Button, Input, Modal, Typography } from "antd"; import dayjs from "../../utils/day"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import aamva from "../../utils/aamva"; import DataLabel from "../data-label/data-label.component"; @@ -54,7 +54,7 @@ export default function ContractLicenseDecodeButton({ form }) { open={modalVisible} okText={t("contracts.actions.senddltoform")} onOk={handleInsertForm} - okButtonProps={{ disabled: !!!decodedBarcode }} + okButtonProps={{ disabled: !decodedBarcode }} onCancel={handleCancel} >
@@ -62,7 +62,7 @@ export default function ContractLicenseDecodeButton({ form }) { { + onChange={() => { if (!loading) setLoading(true); }} onPressEnter={handleDecode} diff --git a/client/src/components/contracts-find-modal/contracts-find-modal.component.jsx b/client/src/components/contracts-find-modal/contracts-find-modal.component.jsx index 52a216e7d..088363b8e 100644 --- a/client/src/components/contracts-find-modal/contracts-find-modal.component.jsx +++ b/client/src/components/contracts-find-modal/contracts-find-modal.component.jsx @@ -1,18 +1,14 @@ import { Form, Input } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; -import { selectBodyshop } from "../../redux/user/user.selectors"; import FormDateTimePicker from "../form-date-time-picker/form-date-time-picker.component"; -const mapStateToProps = createStructuredSelector({ - bodyshop: selectBodyshop -}); +const mapStateToProps = createStructuredSelector({}); export default connect(mapStateToProps, null)(PartsReceiveModalComponent); -export function PartsReceiveModalComponent({ bodyshop, form }) { +export function PartsReceiveModalComponent() { const { t } = useTranslation(); return ( diff --git a/client/src/components/contracts-find-modal/contracts-find-modal.container.jsx b/client/src/components/contracts-find-modal/contracts-find-modal.container.jsx index 57200f471..c7678e18f 100644 --- a/client/src/components/contracts-find-modal/contracts-find-modal.container.jsx +++ b/client/src/components/contracts-find-modal/contracts-find-modal.container.jsx @@ -1,6 +1,6 @@ import { useLazyQuery } from "@apollo/client"; import { Button, Form, Modal, Table } from "antd"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { Link } from "react-router-dom"; @@ -9,13 +9,11 @@ import { logImEXEvent } from "../../firebase/firebase.utils"; import { FIND_CONTRACT } from "../../graphql/cccontracts.queries"; import { toggleModalVisible } from "../../redux/modals/modals.actions"; import { selectContractFinder } from "../../redux/modals/modals.selectors"; -import { selectBodyshop } from "../../redux/user/user.selectors"; import { DateTimeFormatter } from "../../utils/DateFormatter"; import ContractsFindModalComponent from "./contracts-find-modal.component"; import AlertComponent from "../alert/alert.component"; const mapStateToProps = createStructuredSelector({ - bodyshop: selectBodyshop, contractFinderModal: selectContractFinder }); @@ -23,12 +21,7 @@ const mapDispatchToProps = (dispatch) => ({ toggleModalVisible: () => dispatch(toggleModalVisible("contractFinder")) }); -export function ContractsFindModalContainer({ - contractFinderModal, - toggleModalVisible, - - bodyshop -}) { +export function ContractsFindModalContainer({ contractFinderModal, toggleModalVisible }) { const { t } = useTranslation(); const { open } = contractFinderModal; @@ -133,7 +126,7 @@ export function ContractsFindModalContainer({ } ]} rowKey="id" - dataSource={data && data.cccontracts} + dataSource={data?.cccontracts} /> diff --git a/client/src/components/contracts-list/contracts-list.component.jsx b/client/src/components/contracts-list/contracts-list.component.jsx index a42afe90a..4d9493492 100644 --- a/client/src/components/contracts-list/contracts-list.component.jsx +++ b/client/src/components/contracts-list/contracts-list.component.jsx @@ -1,7 +1,7 @@ import { SyncOutlined } from "@ant-design/icons"; import { Button, Card, Input, Space, Table, Typography } from "antd"; import queryString from "query-string"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { Link, useLocation, useNavigate } from "react-router-dom"; import { setModalContext } from "../../redux/modals/modals.actions"; @@ -175,7 +175,7 @@ export function ContractsList({ bodyshop, loading, contracts, refetch, total, se pagination={{ position: "top", pageSize: pageLimit, - current: parseInt(page || 1), + current: parseInt(page || 1, 10), total: total }} columns={columns} diff --git a/client/src/components/contracts-rates-change-button/contracts-rates-change-button.component.jsx b/client/src/components/contracts-rates-change-button/contracts-rates-change-button.component.jsx index 922636804..ee8cbc820 100644 --- a/client/src/components/contracts-rates-change-button/contracts-rates-change-button.component.jsx +++ b/client/src/components/contracts-rates-change-button/contracts-rates-change-button.component.jsx @@ -1,6 +1,5 @@ import { DownOutlined } from "@ant-design/icons"; import { Dropdown } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -13,8 +12,8 @@ const mapStateToProps = createStructuredSelector({ export function ContractsRatesChangeButton({ disabled, form, bodyshop }) { const { t } = useTranslation(); - const handleClick = ({ item, key, keyPath }) => { - const { label, ...rate } = item.props.value; + const handleClick = ({ item }) => { + const { ...rate } = item.props.value; form.setFieldsValue(rate); }; diff --git a/client/src/components/courtesy-car-contract-list/courtesy-car-contract-list.component.jsx b/client/src/components/courtesy-car-contract-list/courtesy-car-contract-list.component.jsx index 34c6e3bfc..b8f959e43 100644 --- a/client/src/components/courtesy-car-contract-list/courtesy-car-contract-list.component.jsx +++ b/client/src/components/courtesy-car-contract-list/courtesy-car-contract-list.component.jsx @@ -1,6 +1,5 @@ import { Card, Table } from "antd"; import queryString from "query-string"; -import React from "react"; import { useTranslation } from "react-i18next"; import { Link, useLocation, useNavigate } from "react-router-dom"; import { DateFormatter } from "../../utils/DateFormatter"; diff --git a/client/src/components/courtesy-car-form/courtesy-car-form.component.jsx b/client/src/components/courtesy-car-form/courtesy-car-form.component.jsx index cc3fcd310..cbbba8e85 100644 --- a/client/src/components/courtesy-car-form/courtesy-car-form.component.jsx +++ b/client/src/components/courtesy-car-form/courtesy-car-form.component.jsx @@ -3,7 +3,6 @@ import { useApolloClient } from "@apollo/client"; import { Button, Form, Input, InputNumber, Space } from "antd"; import { PageHeader } from "@ant-design/pro-layout"; import dayjs from "../../utils/day"; -import React from "react"; import { useTranslation } from "react-i18next"; import { CHECK_CC_FLEET_NUMBER } from "../../graphql/courtesy-car.queries"; import { DateFormatter } from "../../utils/DateFormatter"; @@ -128,7 +127,7 @@ export default function CourtesyCarCreateFormComponent({ form, saveLoading, newC required: true //message: t("general.validation.required"), }, - ({ getFieldValue }) => ({ + () => ({ async validator(rule, value) { if (value) { const response = await client.query({ diff --git a/client/src/components/courtesy-car-readiness-select/courtesy-car-readiness-select.component.jsx b/client/src/components/courtesy-car-readiness-select/courtesy-car-readiness-select.component.jsx index 553798328..c6ff8212d 100644 --- a/client/src/components/courtesy-car-readiness-select/courtesy-car-readiness-select.component.jsx +++ b/client/src/components/courtesy-car-readiness-select/courtesy-car-readiness-select.component.jsx @@ -1,5 +1,5 @@ import { Select } from "antd"; -import React, { forwardRef, useEffect, useState } from "react"; +import { forwardRef, useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; const { Option } = Select; diff --git a/client/src/components/courtesy-car-return-modal/courtesy-car-return-modal.component.jsx b/client/src/components/courtesy-car-return-modal/courtesy-car-return-modal.component.jsx index 3a7ec4c6b..abc6f9703 100644 --- a/client/src/components/courtesy-car-return-modal/courtesy-car-return-modal.component.jsx +++ b/client/src/components/courtesy-car-return-modal/courtesy-car-return-modal.component.jsx @@ -1,5 +1,4 @@ import { Form, InputNumber } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import CourtesyCarFuelSlider from "../courtesy-car-fuel-select/courtesy-car-fuel-select.component"; import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component.jsx"; diff --git a/client/src/components/courtesy-car-return-modal/courtesy-car-return-modal.container.jsx b/client/src/components/courtesy-car-return-modal/courtesy-car-return-modal.container.jsx index 210f7887a..98a8cbbf1 100644 --- a/client/src/components/courtesy-car-return-modal/courtesy-car-return-modal.container.jsx +++ b/client/src/components/courtesy-car-return-modal/courtesy-car-return-modal.container.jsx @@ -1,11 +1,10 @@ import { Form, Modal } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { toggleModalVisible } from "../../redux/modals/modals.actions"; import { selectCourtesyCarReturn } from "../../redux/modals/modals.selectors"; -import { selectBodyshop } from "../../redux/user/user.selectors"; import CourtesyCarReturnModalComponent from "./courtesy-car-return-modal.component"; import dayjs from "../../utils/day"; import { RETURN_CONTRACT } from "../../graphql/cccontracts.queries"; @@ -13,15 +12,14 @@ import { useMutation } from "@apollo/client"; import { useNotification } from "../../contexts/Notifications/notificationContext.jsx"; const mapStateToProps = createStructuredSelector({ - courtesyCarReturnModal: selectCourtesyCarReturn, - bodyshop: selectBodyshop + courtesyCarReturnModal: selectCourtesyCarReturn }); const mapDispatchToProps = (dispatch) => ({ toggleModalVisible: () => dispatch(toggleModalVisible("courtesyCarReturn")) }); -export function CCReturnModalContainer({ courtesyCarReturnModal, toggleModalVisible, bodyshop }) { +export function CCReturnModalContainer({ courtesyCarReturnModal, toggleModalVisible }) { const [loading, setLoading] = useState(false); const { open, context, actions } = courtesyCarReturnModal; const { t } = useTranslation(); @@ -48,7 +46,7 @@ export function CCReturnModalContainer({ courtesyCarReturnModal, toggleModalVisi } } }) - .then((r) => { + .then(() => { if (actions.refetch) actions.refetch(); toggleModalVisible(); }) diff --git a/client/src/components/courtesy-car-status-select/courtesy-car-status-select.component.jsx b/client/src/components/courtesy-car-status-select/courtesy-car-status-select.component.jsx index 84c346ce6..11dd09296 100644 --- a/client/src/components/courtesy-car-status-select/courtesy-car-status-select.component.jsx +++ b/client/src/components/courtesy-car-status-select/courtesy-car-status-select.component.jsx @@ -1,4 +1,4 @@ -import React, { forwardRef, useEffect, useState } from "react"; +import { forwardRef, useEffect, useState } from "react"; import { Select } from "antd"; import { useTranslation } from "react-i18next"; diff --git a/client/src/components/courtesy-cars-list/courtesy-cars-list.component.jsx b/client/src/components/courtesy-cars-list/courtesy-cars-list.component.jsx index eaf0efb45..aa64506da 100644 --- a/client/src/components/courtesy-cars-list/courtesy-cars-list.component.jsx +++ b/client/src/components/courtesy-cars-list/courtesy-cars-list.component.jsx @@ -1,7 +1,7 @@ import { SyncOutlined, WarningFilled } from "@ant-design/icons"; import { Button, Card, Dropdown, Input, Space, Table, Tooltip } from "antd"; import dayjs from "../../utils/day"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { Link } from "react-router-dom"; import { DateTimeFormatter } from "../../utils/DateFormatter"; diff --git a/client/src/components/csi-response-form/csi-response-form.container.jsx b/client/src/components/csi-response-form/csi-response-form.container.jsx index 137a25faf..43d4b796b 100644 --- a/client/src/components/csi-response-form/csi-response-form.container.jsx +++ b/client/src/components/csi-response-form/csi-response-form.container.jsx @@ -1,7 +1,7 @@ import { useQuery } from "@apollo/client"; import { Card, Form, Result } from "antd"; import queryString from "query-string"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { useLocation } from "react-router-dom"; import { QUERY_CSI_RESPONSE_BY_PK } from "../../graphql/csi.queries"; @@ -19,7 +19,7 @@ export default function CsiResponseFormContainer() { variables: { id: responseid }, - skip: !!!responseid, + skip: !responseid, fetchPolicy: "network-only", nextFetchPolicy: "network-only" }); @@ -28,7 +28,7 @@ export default function CsiResponseFormContainer() { form.resetFields(); }, [data, form]); - if (!!!responseid) + if (!responseid) return ( diff --git a/client/src/components/csi-response-list-paginated/csi-response-list-paginated.component.jsx b/client/src/components/csi-response-list-paginated/csi-response-list-paginated.component.jsx index d7b49df56..530ab86e1 100644 --- a/client/src/components/csi-response-list-paginated/csi-response-list-paginated.component.jsx +++ b/client/src/components/csi-response-list-paginated/csi-response-list-paginated.component.jsx @@ -1,7 +1,7 @@ import { SyncOutlined } from "@ant-design/icons"; import { Button, Card, Table } from "antd"; import queryString from "query-string"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { Link, useLocation, useNavigate } from "react-router-dom"; import { DateFormatter } from "../../utils/DateFormatter"; diff --git a/client/src/components/dashboard-components/monthly-employee-efficiency/monthly-employee-efficiency.component.jsx b/client/src/components/dashboard-components/monthly-employee-efficiency/monthly-employee-efficiency.component.jsx index 62370079b..5d3d154fb 100644 --- a/client/src/components/dashboard-components/monthly-employee-efficiency/monthly-employee-efficiency.component.jsx +++ b/client/src/components/dashboard-components/monthly-employee-efficiency/monthly-employee-efficiency.component.jsx @@ -1,7 +1,6 @@ import { Card } from "antd"; import _ from "lodash"; import dayjs from "../../../utils/day"; -import React from "react"; import { useTranslation } from "react-i18next"; import { Bar, CartesianGrid, ComposedChart, Legend, Line, ResponsiveContainer, Tooltip, XAxis, YAxis } from "recharts"; import * as Utils from "../../scoreboard-targets-table/scoreboard-targets-table.util"; @@ -19,7 +18,7 @@ export default function DashboardMonthlyEmployeeEfficiency({ data, ...cardProps const chartData = listOfDays.reduce((acc, val) => { //Sum up the current day. let dailyHrs; - if (!!ticketsByDate[val]) { + if (ticketsByDate[val]) { dailyHrs = ticketsByDate[val].reduce( (dayAcc, dayVal) => { return { diff --git a/client/src/components/dashboard-components/monthly-job-costing/monthly-job-costing.component.jsx b/client/src/components/dashboard-components/monthly-job-costing/monthly-job-costing.component.jsx index 3924ccb37..ca491fe8c 100644 --- a/client/src/components/dashboard-components/monthly-job-costing/monthly-job-costing.component.jsx +++ b/client/src/components/dashboard-components/monthly-job-costing/monthly-job-costing.component.jsx @@ -1,6 +1,6 @@ import { Card, Input, Space, Table, Typography } from "antd"; import axios from "axios"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { alphaSort } from "../../../utils/sorters"; import LoadingSkeleton from "../../loading-skeleton/loading-skeleton.component"; @@ -19,7 +19,7 @@ export default function DashboardMonthlyJobCosting({ data, ...cardProps }) { useEffect(() => { async function getCostingData() { - if (data && data.monthly_sales) { + if (data?.monthly_sales) { setLoading(true); const response = await axios.post("/job/costingmulti", { jobids: data.monthly_sales.map((x) => x.id) @@ -79,7 +79,7 @@ export default function DashboardMonthlyJobCosting({ data, ...cardProps }) { ]; const filteredData = searchText === "" - ? (costingData && costingData.allCostCenterData) || [] + ? costingData?.allCostCenterData || [] : costingData.allCostCenterData.filter((d) => (d.cost_center || "").toString().toLowerCase().includes(searchText.toLowerCase()) ); @@ -117,15 +117,13 @@ export default function DashboardMonthlyJobCosting({ data, ...cardProps }) { {t("general.labels.totals")} - {Dinero( - costingData && costingData.allSummaryData && costingData.allSummaryData.totalSales - ).toFormat()} + {Dinero(costingData?.allSummaryData && costingData.allSummaryData.totalSales).toFormat()} - {Dinero(costingData && costingData.allSummaryData && costingData.allSummaryData.totalCost).toFormat()} + {Dinero(costingData?.allSummaryData && costingData.allSummaryData.totalCost).toFormat()} - {Dinero(costingData && costingData.allSummaryData && costingData.allSummaryData.gpdollars).toFormat()} + {Dinero(costingData?.allSummaryData && costingData.allSummaryData.gpdollars).toFormat()} diff --git a/client/src/components/dashboard-components/monthly-labor-sales/monthly-labor-sales.component.jsx b/client/src/components/dashboard-components/monthly-labor-sales/monthly-labor-sales.component.jsx index ca719b891..4ce1e2cef 100644 --- a/client/src/components/dashboard-components/monthly-labor-sales/monthly-labor-sales.component.jsx +++ b/client/src/components/dashboard-components/monthly-labor-sales/monthly-labor-sales.component.jsx @@ -1,6 +1,6 @@ import { Card } from "antd"; import Dinero from "dinero.js"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { Cell, Pie, PieChart, ResponsiveContainer, Sector } from "recharts"; import DashboardRefreshRequired from "../refresh-required.component"; diff --git a/client/src/components/dashboard-components/monthly-parts-sales/monthly-parts-sales.component.jsx b/client/src/components/dashboard-components/monthly-parts-sales/monthly-parts-sales.component.jsx index a82134ae5..23ffa8a86 100644 --- a/client/src/components/dashboard-components/monthly-parts-sales/monthly-parts-sales.component.jsx +++ b/client/src/components/dashboard-components/monthly-parts-sales/monthly-parts-sales.component.jsx @@ -1,6 +1,6 @@ import { Card } from "antd"; import Dinero from "dinero.js"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { Cell, Pie, PieChart, ResponsiveContainer, Sector } from "recharts"; import DashboardRefreshRequired from "../refresh-required.component"; diff --git a/client/src/components/dashboard-components/monthly-revenue-graph/monthly-revenue-graph.component.jsx b/client/src/components/dashboard-components/monthly-revenue-graph/monthly-revenue-graph.component.jsx index 4f9f5ac4c..c91e6b098 100644 --- a/client/src/components/dashboard-components/monthly-revenue-graph/monthly-revenue-graph.component.jsx +++ b/client/src/components/dashboard-components/monthly-revenue-graph/monthly-revenue-graph.component.jsx @@ -1,6 +1,5 @@ import { Card } from "antd"; import dayjs from "../../../utils/day"; -import React from "react"; import { useTranslation } from "react-i18next"; import _ from "lodash"; import { Area, Bar, CartesianGrid, ComposedChart, Legend, ResponsiveContainer, Tooltip, XAxis, YAxis } from "recharts"; @@ -20,7 +19,7 @@ export default function DashboardMonthlyRevenueGraph({ data, ...cardProps }) { const chartData = listOfDays.reduce((acc, val) => { //Sum up the current day. let dailySales; - if (!!jobsByDate[val]) { + if (jobsByDate[val]) { dailySales = jobsByDate[val].reduce((dayAcc, dayVal) => { return dayAcc.add(Dinero((dayVal.job_totals && dayVal.job_totals.totals.subtotal) || 0)); }, Dinero()); @@ -46,7 +45,7 @@ export default function DashboardMonthlyRevenueGraph({ data, ...cardProps }) { - value && value.toFixed(2)} /> + value && value.toFixed(2)} /> ({}); +const mapDispatchToProps = () => ({}); export default connect(mapStateToProps, mapDispatchToProps)(DashboardTotalProductionHours); export function DashboardTotalProductionHours({ bodyshop, data, ...cardProps }) { diff --git a/client/src/components/dashboard-grid/createDashboardQuery.js b/client/src/components/dashboard-grid/createDashboardQuery.js index a37f4aa4a..1b0ce0a3f 100644 --- a/client/src/components/dashboard-grid/createDashboardQuery.js +++ b/client/src/components/dashboard-grid/createDashboardQuery.js @@ -6,7 +6,7 @@ const createDashboardQuery = (state) => { const componentBasedAdditions = state && Array.isArray(state.layout) && - state.layout.map((item, index) => componentList[item.i].gqlFragment || "").join(""); + state.layout.map((item) => componentList[item.i].gqlFragment || "").join(""); return gql` query QUERY_DASHBOARD_DETAILS { ${componentBasedAdditions || ""} monthly_sales: jobs(where: {_and: [ diff --git a/client/src/components/dashboard-grid/dashboard-grid.component.jsx b/client/src/components/dashboard-grid/dashboard-grid.component.jsx index 082e404ac..546481e2e 100644 --- a/client/src/components/dashboard-grid/dashboard-grid.component.jsx +++ b/client/src/components/dashboard-grid/dashboard-grid.component.jsx @@ -1,5 +1,5 @@ import Icon, { SyncOutlined } from "@ant-design/icons"; -import { isEmpty, cloneDeep } from "lodash"; +import { cloneDeep, isEmpty } from "lodash"; import { useMutation, useQuery } from "@apollo/client"; import { Button, Dropdown, Space } from "antd"; import { PageHeader } from "@ant-design/pro-layout"; @@ -28,7 +28,7 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); @@ -134,7 +134,7 @@ export function DashboardGridComponent({ currentUser, bodyshop }) { layouts={state.layouts} onLayoutChange={handleLayoutChange} > - {state.items.map((item, index) => { + {state.items.map((item) => { const TheComponent = componentList[item.i].component; return (
diff --git a/client/src/components/dms-allocations-summary-ap/dms-allocations-summary-ap.component.jsx b/client/src/components/dms-allocations-summary-ap/dms-allocations-summary-ap.component.jsx index b4fc66577..40d9fb3f4 100644 --- a/client/src/components/dms-allocations-summary-ap/dms-allocations-summary-ap.component.jsx +++ b/client/src/components/dms-allocations-summary-ap/dms-allocations-summary-ap.component.jsx @@ -1,6 +1,6 @@ import { SyncOutlined } from "@ant-design/icons"; import { Button, Card, Form, Input, Table } from "antd"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -12,7 +12,7 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); @@ -44,7 +44,6 @@ export function DmsAllocationsSummaryAp({ socket, bodyshop, billids, title }) { socket.removeListener("ap-export-failure"); //socket.disconnect(); }; - // eslint-disable-next-line react-hooks/exhaustive-deps }, []); useEffect(() => { diff --git a/client/src/components/dms-allocations-summary/dms-allocations-summary.component.jsx b/client/src/components/dms-allocations-summary/dms-allocations-summary.component.jsx index 3551cc6e3..966cadf13 100644 --- a/client/src/components/dms-allocations-summary/dms-allocations-summary.component.jsx +++ b/client/src/components/dms-allocations-summary/dms-allocations-summary.component.jsx @@ -1,5 +1,5 @@ import { Alert, Button, Card, Table, Typography } from "antd"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -13,7 +13,7 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); @@ -54,19 +54,19 @@ export function DmsAllocationsSummary({ socket, bodyshop, jobId, title }) { title: t("jobs.fields.dms.sale_dms_acctnumber"), dataIndex: "sale_dms_acctnumber", key: "sale_dms_acctnumber", - render: (text, record) => record.profitCenter && record.profitCenter.dms_acctnumber + render: (text, record) => record.profitCenter?.dms_acctnumber }, { title: t("jobs.fields.dms.cost_dms_acctnumber"), dataIndex: "cost_dms_acctnumber", key: "cost_dms_acctnumber", - render: (text, record) => record.costCenter && record.costCenter.dms_acctnumber + render: (text, record) => record.costCenter?.dms_acctnumber }, { title: t("jobs.fields.dms.dms_wip_acctnumber"), dataIndex: "dms_wip_acctnumber", key: "dms_wip_acctnumber", - render: (text, record) => record.costCenter && record.costCenter.dms_wip_acctnumber + render: (text, record) => record.costCenter?.dms_wip_acctnumber } ]; diff --git a/client/src/components/dms-cdk-makes/dms-cdk-makes.component.jsx b/client/src/components/dms-cdk-makes/dms-cdk-makes.component.jsx index 27a63c850..f64cd2216 100644 --- a/client/src/components/dms-cdk-makes/dms-cdk-makes.component.jsx +++ b/client/src/components/dms-cdk-makes/dms-cdk-makes.component.jsx @@ -1,23 +1,19 @@ import { useLazyQuery } from "@apollo/client"; import { Button, Input, Modal, Table } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { SEARCH_DMS_VEHICLES } from "../../graphql/dms.queries"; -import { selectBodyshop } from "../../redux/user/user.selectors"; import AlertComponent from "../alert/alert.component"; -const mapStateToProps = createStructuredSelector({ - //currentUser: selectCurrentUser - bodyshop: selectBodyshop -}); -const mapDispatchToProps = (dispatch) => ({ - //setUserLanguage: language => dispatch(setUserLanguage(language)) -}); +const mapStateToProps = createStructuredSelector({}); + +const mapDispatchToProps = () => ({}); + export default connect(mapStateToProps, mapDispatchToProps)(DmsCdkVehicles); -export function DmsCdkVehicles({ bodyshop, form, socket, job }) { +export function DmsCdkVehicles({ form, job }) { const [open, setOpen] = useState(false); const [selectedModel, setSelectedModel] = useState(null); const { t } = useTranslation(); @@ -83,7 +79,7 @@ export function DmsCdkVehicles({ bodyshop, form, socket, job }) { }, type: "radio", - selectedRowKeys: [selectedModel && selectedModel.id] + selectedRowKeys: [selectedModel?.id] }} /> @@ -92,7 +88,7 @@ export function DmsCdkVehicles({ bodyshop, form, socket, job }) { setOpen(true); callSearch({ variables: { - search: job && job.v_model_desc && job.v_model_desc.substr(0, 3) + search: job?.v_model_desc && job.v_model_desc.substr(0, 3) } }); }} diff --git a/client/src/components/dms-cdk-makes/dms-cdk-makes.refetch.component.jsx b/client/src/components/dms-cdk-makes/dms-cdk-makes.refetch.component.jsx index ad505f9c3..6d2908b65 100644 --- a/client/src/components/dms-cdk-makes/dms-cdk-makes.refetch.component.jsx +++ b/client/src/components/dms-cdk-makes/dms-cdk-makes.refetch.component.jsx @@ -1,20 +1,21 @@ import { Button } from "antd"; import axios from "axios"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors"; + const mapStateToProps = createStructuredSelector({ currentUser: selectCurrentUser, bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(DmsCdkMakesRefetch); -export function DmsCdkMakesRefetch({ currentUser, bodyshop, form, socket }) { +export function DmsCdkMakesRefetch({ currentUser, bodyshop }) { const [loading, setLoading] = useState(false); const { t } = useTranslation(); diff --git a/client/src/components/dms-customer-selector/dms-customer-selector.component.jsx b/client/src/components/dms-customer-selector/dms-customer-selector.component.jsx index ec82d36d3..12a9cfd80 100644 --- a/client/src/components/dms-customer-selector/dms-customer-selector.component.jsx +++ b/client/src/components/dms-customer-selector/dms-customer-selector.component.jsx @@ -1,5 +1,5 @@ import { Button, Checkbox, Col, Table } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -10,7 +10,7 @@ import { alphaSort } from "../../utils/sorters"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(DmsCustomerSelector); @@ -22,12 +22,12 @@ export function DmsCustomerSelector({ bodyshop }) { const [selectedCustomer, setSelectedCustomer] = useState(null); const [dmsType, setDmsType] = useState("cdk"); - socket.on("cdk-select-customer", (customerList, callback) => { + socket.on("cdk-select-customer", (customerList) => { setOpen(true); setDmsType("cdk"); setcustomerList(customerList); }); - socket.on("pbs-select-customer", (customerList, callback) => { + socket.on("pbs-select-customer", (customerList) => { setOpen(true); setDmsType("pbs"); setcustomerList(customerList); @@ -67,19 +67,17 @@ export function DmsCustomerSelector({ bodyshop }) { title: t("jobs.fields.dms.name1"), dataIndex: ["name1", "fullName"], key: "name1", - sorter: (a, b) => alphaSort(a.name1 && a.name1.fullName, b.name1 && b.name1.fullName) + sorter: (a, b) => alphaSort(a.name1?.fullName, b.name1?.fullName) }, { title: t("jobs.fields.dms.address"), //dataIndex: ["name2", "fullName"], key: "address", - render: (record, value) => - `${ - record.address && record.address.addressLine && record.address.addressLine[0] - }, ${record.address && record.address.city} ${ - record.address && record.address.stateOrProvince - } ${record.address && record.address.postalCode}` + render: (record) => + `${record.address?.addressLine && record.address.addressLine[0]}, ${record.address?.city} ${ + record.address?.stateOrProvince + } ${record.address?.postalCode}` } ]; @@ -99,7 +97,7 @@ export function DmsCustomerSelector({ bodyshop }) { { title: t("jobs.fields.dms.address"), key: "address", - render: (record, value) => `${record.Address}, ${record.City} ${record.State} ${record.ZipCode}` + render: (record) => `${record.Address}, ${record.City} ${record.State} ${record.ZipCode}` } ]; @@ -112,10 +110,7 @@ export function DmsCustomerSelector({ bodyshop }) { - diff --git a/client/src/components/dms-log-events/dms-log-events.component.jsx b/client/src/components/dms-log-events/dms-log-events.component.jsx index b73e5dbe7..5219ddd88 100644 --- a/client/src/components/dms-log-events/dms-log-events.component.jsx +++ b/client/src/components/dms-log-events/dms-log-events.component.jsx @@ -1,14 +1,10 @@ import { Divider, Space, Tag, Timeline } from "antd"; import dayjs from "../../utils/day"; -import React from "react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { setBreadcrumbs, setSelectedHeader } from "../../redux/application/application.actions"; -import { selectBodyshop } from "../../redux/user/user.selectors"; -const mapStateToProps = createStructuredSelector({ - bodyshop: selectBodyshop -}); +const mapStateToProps = createStructuredSelector({}); const mapDispatchToProps = (dispatch) => ({ setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)), @@ -17,7 +13,7 @@ const mapDispatchToProps = (dispatch) => ({ export default connect(mapStateToProps, mapDispatchToProps)(DmsLogEvents); -export function DmsLogEvents({ socket, logs, bodyshop }) { +export function DmsLogEvents({ logs }) { return ( ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); @@ -60,7 +60,9 @@ export function DocumentEditorComponent({ currentUser, bodyshop, document }) { markerArea.current = new markerjs2.MarkerArea(imgRef.current); // attach an event handler to assign annotated image back to our image element - markerArea.current.addEventListener("close", (closeEvent) => {}); + markerArea.current.addEventListener("close", () => { + // NO OP + }); markerArea.current.addEventListener("render", (event) => { const dataUrl = event.dataUrl; @@ -76,7 +78,6 @@ export function DocumentEditorComponent({ currentUser, bodyshop, document }) { //markerArea.current.settings.displayMode = "inline"; markerArea.current.show(); } - // eslint-disable-next-line react-hooks/exhaustive-deps }, [triggerUpload]); async function b64toBlob(url) { diff --git a/client/src/components/document-editor/document-editor.container.jsx b/client/src/components/document-editor/document-editor.container.jsx index b5868e076..d19fb9ce3 100644 --- a/client/src/components/document-editor/document-editor.container.jsx +++ b/client/src/components/document-editor/document-editor.container.jsx @@ -1,7 +1,7 @@ import { useQuery } from "@apollo/client"; import { Result } from "antd"; import queryString from "query-string"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { useLocation } from "react-router-dom"; diff --git a/client/src/components/documents-local-upload/documents-local-upload.component.jsx b/client/src/components/documents-local-upload/documents-local-upload.component.jsx index bd59c9cf4..e16195dc1 100644 --- a/client/src/components/documents-local-upload/documents-local-upload.component.jsx +++ b/client/src/components/documents-local-upload/documents-local-upload.component.jsx @@ -1,10 +1,10 @@ import { UploadOutlined } from "@ant-design/icons"; import { Upload } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; -import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors"; +import { selectBodyshop } from "../../redux/user/user.selectors"; import { handleUpload } from "./documents-local-upload.utility"; import { HasFeatureAccess } from "../feature-wrapper/feature-wrapper.component"; import LockWrapperComponent from "../lock-wrapper/lock-wrapper.component"; @@ -12,13 +12,11 @@ import { useTranslation } from "react-i18next"; import { useNotification } from "../../contexts/Notifications/notificationContext.jsx"; const mapStateToProps = createStructuredSelector({ - currentUser: selectCurrentUser, bodyshop: selectBodyshop }); export function DocumentsLocalUploadComponent({ children, - currentUser, bodyshop, job, vendorid, diff --git a/client/src/components/documents-local-upload/documents-local-upload.utility.js b/client/src/components/documents-local-upload/documents-local-upload.utility.js index 69b5f41ea..d568d83b9 100644 --- a/client/src/components/documents-local-upload/documents-local-upload.utility.js +++ b/client/src/components/documents-local-upload/documents-local-upload.utility.js @@ -15,7 +15,7 @@ export const handleUpload = async ({ ev, context, notification }) => { ims_token: bodyshop.localmediatoken }, onUploadProgress: (e) => { - if (!!onProgress) onProgress({ percent: (e.loaded / e.total) * 100 }); + if (onProgress) onProgress({ percent: (e.loaded / e.total) * 100 }); } }; @@ -37,7 +37,7 @@ export const handleUpload = async ({ ev, context, notification }) => { ); if (imexMediaServerResponse.status !== 200) { - if (!!onError) { + if (onError) { onError(imexMediaServerResponse.statusText); } } else { diff --git a/client/src/components/documents-upload/documents-upload.component.jsx b/client/src/components/documents-upload/documents-upload.component.jsx index bcadffc18..4189085cc 100644 --- a/client/src/components/documents-upload/documents-upload.component.jsx +++ b/client/src/components/documents-upload/documents-upload.component.jsx @@ -1,6 +1,6 @@ import { UploadOutlined } from "@ant-design/icons"; import { Progress, Result, Space, Upload } from "antd"; -import React, { useMemo, useState } from "react"; +import { useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -32,7 +32,7 @@ export function DocumentsUploadComponent({ const notification = useNotification(); const pct = useMemo(() => { - return parseInt((totalSize / ((bodyshop && bodyshop.jobsizelimit) || 1)) * 100); + return parseInt((totalSize / (bodyshop?.jobsizelimit || 1)) * 100, 10); }, [bodyshop, totalSize]); if (pct > 100 && !ignoreSizeLimit) @@ -63,7 +63,7 @@ export function DocumentsUploadComponent({ beforeUpload={(file, fileList) => { if (ignoreSizeLimit) return true; const newFiles = fileList.reduce((acc, val) => acc + val.size, 0); - const shouldStopUpload = (totalSize + newFiles) / ((bodyshop && bodyshop.jobsizelimit) || 1) >= 1; + const shouldStopUpload = (totalSize + newFiles) / (bodyshop?.jobsizelimit || 1) >= 1; //Check to see if old files plus newly uploaded ones will be too much. if (shouldStopUpload) { @@ -109,7 +109,7 @@ export function DocumentsUploadComponent({ {t("documents.labels.usage", { percent: pct, used: formatBytes(totalSize), - total: formatBytes(bodyshop && bodyshop.jobsizelimit) + total: formatBytes(bodyshop?.jobsizelimit) })} diff --git a/client/src/components/documents-upload/documents-upload.utility.js b/client/src/components/documents-upload/documents-upload.utility.js index ed8cb404f..0e725ae48 100644 --- a/client/src/components/documents-upload/documents-upload.utility.js +++ b/client/src/components/documents-upload/documents-upload.utility.js @@ -57,7 +57,7 @@ export const uploadToCloudinary = async ( }); if (signedURLResponse.status !== 200) { - if (!!onError) onError(signedURLResponse.statusText); + if (onError) onError(signedURLResponse.statusText); notification["error"]({ message: i18n.t("documents.errors.getpresignurl", { message: signedURLResponse.statusText @@ -71,7 +71,7 @@ export const uploadToCloudinary = async ( var options = { headers: { "X-Requested-With": "XMLHttpRequest" }, onUploadProgress: (e) => { - if (!!onProgress) onProgress({ percent: (e.loaded / e.total) * 100 }); + if (onProgress) onProgress({ percent: (e.loaded / e.total) * 100 }); } }; @@ -95,7 +95,7 @@ export const uploadToCloudinary = async ( ); if (cloudinaryUploadResponse.status !== 200) { - if (!!onError) { + if (onError) { onError(cloudinaryUploadResponse.statusText); } @@ -106,7 +106,9 @@ export const uploadToCloudinary = async ( user: store.getState().user.email, object: cloudinaryUploadResponse }); - } catch (error) {} + } catch { + // NO OP + } notification["error"]({ message: i18n.t("documents.errors.insert", { @@ -123,7 +125,7 @@ export const uploadToCloudinary = async ( const exif = await exifr.parse(file); takenat = exif && exif.DateTimeOriginal; - } catch (error) { + } catch { console.log("Unable to parse image file for EXIF Data"); } } @@ -146,7 +148,7 @@ export const uploadToCloudinary = async ( } }); if (!documentInsert.errors) { - if (!!onSuccess) + if (onSuccess) onSuccess({ uid: documentInsert.data.insert_documents.returning[0].id, name: documentInsert.data.insert_documents.returning[0].name, @@ -162,7 +164,7 @@ export const uploadToCloudinary = async ( callback(); } } else { - if (!!onError) onError(JSON.stringify(documentInsert.errors)); + if (onError) onError(JSON.stringify(documentInsert.errors)); notification["error"]({ message: i18n.t("documents.errors.insert", { message: JSON.stringify(documentInsert.errors) diff --git a/client/src/components/email-documents/email-documents.component.jsx b/client/src/components/email-documents/email-documents.component.jsx index 7e17d5565..8882bd2da 100644 --- a/client/src/components/email-documents/email-documents.component.jsx +++ b/client/src/components/email-documents/email-documents.component.jsx @@ -1,5 +1,4 @@ import { useQuery } from "@apollo/client"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -18,7 +17,7 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, emailConfig: selectEmailConfig }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(EmailDocumentsComponent); @@ -30,7 +29,7 @@ export function EmailDocumentsComponent({ emailConfig, form, selectedMediaState, } = useSplitTreatments({ attributes: {}, names: ["Imgproxy"], - splitKey: bodyshop && bodyshop.imexshopid + splitKey: bodyshop?.imexshopid }); const [selectedMedia, setSelectedMedia] = selectedMediaState; diff --git a/client/src/components/email-overlay/email-overlay.container.jsx b/client/src/components/email-overlay/email-overlay.container.jsx index af50261e6..610004e14 100644 --- a/client/src/components/email-overlay/email-overlay.container.jsx +++ b/client/src/components/email-overlay/email-overlay.container.jsx @@ -1,6 +1,6 @@ import { Button, Divider, Form, Modal, Space } from "antd"; import axios from "axios"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -149,7 +149,8 @@ export function EmailOverlayContainer({ emailConfig, modalVisible, toggleEmailOv useEffect(() => { if (modalVisible) render(); - }, [modalVisible]); // eslint-disable-line react-hooks/exhaustive-deps + }, [modalVisible]); + return ( ({ - setEmailOptions: (e) => dispatch(setEmailOptions(e)) -}); +const mapDispatchToProps = () => ({}); -export function EmailTestComponent({ currentUser, setEmailOptions }) { +export function EmailTestComponent() { const [form] = Form.useForm(); const notification = useNotification(); diff --git a/client/src/components/employee-search-select/employee-search-select-email.component.jsx b/client/src/components/employee-search-select/employee-search-select-email.component.jsx index c583db68c..744533b80 100644 --- a/client/src/components/employee-search-select/employee-search-select-email.component.jsx +++ b/client/src/components/employee-search-select/employee-search-select-email.component.jsx @@ -1,5 +1,4 @@ import { Select, Space, Tag } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; const { Option } = Select; diff --git a/client/src/components/employee-search-select/employee-search-select.component.jsx b/client/src/components/employee-search-select/employee-search-select.component.jsx index 5264c886a..7a825a164 100644 --- a/client/src/components/employee-search-select/employee-search-select.component.jsx +++ b/client/src/components/employee-search-select/employee-search-select.component.jsx @@ -1,5 +1,4 @@ import { Select, Space, Tag } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; const { Option } = Select; diff --git a/client/src/components/employee-team-search-select/employee-team-search-select.component.jsx b/client/src/components/employee-team-search-select/employee-team-search-select.component.jsx index b59589da1..2be5ea4b2 100644 --- a/client/src/components/employee-team-search-select/employee-team-search-select.component.jsx +++ b/client/src/components/employee-team-search-select/employee-team-search-select.component.jsx @@ -1,12 +1,12 @@ import { useQuery } from "@apollo/client"; import { Select } from "antd"; -import React, { forwardRef } from "react"; +import { forwardRef } from "react"; import { QUERY_TEAMS } from "../../graphql/employee_teams.queries"; import AlertComponent from "../alert/alert.component"; //To be used as a form element only. -const EmployeeTeamSearchSelect = ({ ...props }, ref) => { +const EmployeeTeamSearchSelect = ({ ...props }) => { const { loading, error, data } = useQuery(QUERY_TEAMS); if (error) return ; diff --git a/client/src/components/eula/eula.component.jsx b/client/src/components/eula/eula.component.jsx index ae503b09a..d915814eb 100644 --- a/client/src/components/eula/eula.component.jsx +++ b/client/src/components/eula/eula.component.jsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect, useRef, useState } from "react"; +import { useCallback, useEffect, useRef, useState } from "react"; import { Button, Card, Checkbox, Col, Form, Input, Modal, Row } from "antd"; import Markdown from "react-markdown"; import { createStructuredSelector } from "reselect"; @@ -50,12 +50,12 @@ const Eula = ({ currentEula, currentUser, acceptEula }) => { handleChange(); }, [handleChange, hasEverScrolledToBottom, form]); - const onFinish = async ({ acceptTerms, ...formValues }) => { + const onFinish = async ({ ...formValues }) => { const eulaId = currentEula.id; const useremail = currentUser.email; try { - const { accepted_terms, ...otherFormValues } = formValues; + const { ...otherFormValues } = formValues; // Trim the values of the fields before submitting const trimmedFormValues = Object.entries(otherFormValues).reduce((acc, [key, value]) => { @@ -89,40 +89,38 @@ const Eula = ({ currentEula, currentUser, acceptEula }) => { }; return ( - <> - ( -
- {entryData && entryData.scoreboard && entryData.scoreboard[0] && ( + {entryData?.scoreboard && entryData.scoreboard[0] && ( {t("jobs.labels.alreadyaddedtoscoreboard")} @@ -145,7 +145,7 @@ export function ScoreboardAddButton({ bodyshop, job, disabled, ...otherBtnProps
); - const handleClick = (e) => { + const handleClick = () => { setLoading(true); const v = job.joblines.reduce( (acc, val) => { diff --git a/client/src/components/job-search-select/job-search-select.component.jsx b/client/src/components/job-search-select/job-search-select.component.jsx index f704b9b93..2f241f5af 100644 --- a/client/src/components/job-search-select/job-search-select.component.jsx +++ b/client/src/components/job-search-select/job-search-select.component.jsx @@ -2,7 +2,7 @@ import { LoadingOutlined } from "@ant-design/icons"; import { useLazyQuery } from "@apollo/client"; import { Select, Space, Spin, Tag } from "antd"; import _ from "lodash"; -import React, { forwardRef, useEffect, useState } from "react"; +import { forwardRef, useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE, SEARCH_JOBS_FOR_AUTOCOMPLETE } from "../../graphql/jobs.queries"; import AlertComponent from "../alert/alert.component"; @@ -51,10 +51,7 @@ const JobSearchSelect = ( useEffect(() => { setTheOptions( _.uniqBy( - [ - ...(idData && idData.jobs_by_pk ? [idData.jobs_by_pk] : []), - ...(data && data.search_jobs ? data.search_jobs : []) - ], + [...(idData?.jobs_by_pk ? [idData.jobs_by_pk] : []), ...(data?.search_jobs ? data.search_jobs : [])], "id" ) ); diff --git a/client/src/components/job-send-parts-price-change/job-send-parts-price-change.component.jsx b/client/src/components/job-send-parts-price-change/job-send-parts-price-change.component.jsx index fcfb5076c..57280b614 100644 --- a/client/src/components/job-send-parts-price-change/job-send-parts-price-change.component.jsx +++ b/client/src/components/job-send-parts-price-change/job-send-parts-price-change.component.jsx @@ -1,6 +1,6 @@ import { Button } from "antd"; import axios from "axios"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { useNotification } from "../../contexts/Notifications/notificationContext.jsx"; diff --git a/client/src/components/job-sync-button/job-sync-button.component.jsx b/client/src/components/job-sync-button/job-sync-button.component.jsx index e69689340..31a90a46e 100644 --- a/client/src/components/job-sync-button/job-sync-button.component.jsx +++ b/client/src/components/job-sync-button/job-sync-button.component.jsx @@ -1,5 +1,4 @@ import { Button } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { SyncOutlined } from "@ant-design/icons"; import { useNavigate } from "react-router-dom"; @@ -10,7 +9,7 @@ export default function JobSyncButton({ job }) { const handleClick = () => { history(`/manage/available?availableJobId=${job.available_jobs[0].id}&clm_no=${job.clm_no}`); }; - if (job && job.available_jobs && job.available_jobs.length > 0) + if (job?.available_jobs && job.available_jobs.length > 0) return ( - - + + + ); } diff --git a/client/src/components/jobs-admin-class/jobs-admin-class.component.jsx b/client/src/components/jobs-admin-class/jobs-admin-class.component.jsx index 6ed008d81..ba6d115b3 100644 --- a/client/src/components/jobs-admin-class/jobs-admin-class.component.jsx +++ b/client/src/components/jobs-admin-class/jobs-admin-class.component.jsx @@ -1,6 +1,6 @@ import { useMutation } from "@apollo/client"; import { Button, Form, Popconfirm, Select } from "antd"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -11,7 +11,7 @@ import { useNotification } from "../../contexts/Notifications/notificationContex const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(JobsAdminClass); @@ -29,7 +29,7 @@ export function JobsAdminClass({ bodyshop, job }) { variables: { jobId: job.id, job: values } }); - if (!!!result.errors) { + if (!result.errors) { notification["success"]({ message: t("jobs.successes.save") }); } else { notification["error"]({ diff --git a/client/src/components/jobs-admin-dates/jobs-admin-dates.component.jsx b/client/src/components/jobs-admin-dates/jobs-admin-dates.component.jsx index 4f8efc2c9..7d2f40b41 100644 --- a/client/src/components/jobs-admin-dates/jobs-admin-dates.component.jsx +++ b/client/src/components/jobs-admin-dates/jobs-admin-dates.component.jsx @@ -1,7 +1,7 @@ import { useMutation } from "@apollo/client"; import { Button, Form } from "antd"; import dayjs from "../../utils/day"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { UPDATE_JOB } from "../../graphql/jobs.queries"; import AuditTrailMapping from "../../utils/AuditTrailMappings"; @@ -60,7 +60,7 @@ export function JobsAdminDatesChange({ insertAuditTrail, job }) { }); }); - if (!!!result.errors) { + if (!result.errors) { notification["success"]({ message: t("jobs.successes.save") }); } else { notification["error"]({ diff --git a/client/src/components/jobs-admin-delete-intake/jobs-admin-delete-intake.component.jsx b/client/src/components/jobs-admin-delete-intake/jobs-admin-delete-intake.component.jsx index 826c84737..74c6cd984 100644 --- a/client/src/components/jobs-admin-delete-intake/jobs-admin-delete-intake.component.jsx +++ b/client/src/components/jobs-admin-delete-intake/jobs-admin-delete-intake.component.jsx @@ -1,6 +1,6 @@ import { useMutation } from "@apollo/client"; import { Button, Space } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { DELETE_DELIVERY_CHECKLIST, DELETE_INTAKE_CHECKLIST } from "../../graphql/jobs.queries"; import InstanceRenderManager from "../../utils/instanceRenderMgr"; @@ -14,13 +14,13 @@ export default function JobAdminDeleteIntake({ job }) { const [deleteIntake] = useMutation(DELETE_INTAKE_CHECKLIST); const [deleteDelivery] = useMutation(DELETE_DELIVERY_CHECKLIST); - const handleDelete = async (values) => { + const handleDelete = async () => { setLoading(true); const result = await deleteIntake({ variables: { jobId: job.id } }); - if (!!!result.errors) { + if (!result.errors) { notification["success"]({ message: t("jobs.successes.save") }); } else { notification["error"]({ @@ -32,13 +32,13 @@ export default function JobAdminDeleteIntake({ job }) { setLoading(false); }; - const handleDeleteDelivery = async (values) => { + const handleDeleteDelivery = async () => { setLoading(true); const result = await deleteDelivery({ variables: { jobId: job.id } }); - if (!!!result.errors) { + if (!result.errors) { notification["success"]({ message: t("jobs.successes.save") }); } else { notification["error"]({ @@ -56,15 +56,13 @@ export default function JobAdminDeleteIntake({ job }) { }); return InstanceRender ? ( - <> - - - - - + + + + ) : null; } diff --git a/client/src/components/jobs-admin-mark-reexport/jobs-admin-mark-reexport.component.jsx b/client/src/components/jobs-admin-mark-reexport/jobs-admin-mark-reexport.component.jsx index 13c4541d8..52087ef74 100644 --- a/client/src/components/jobs-admin-mark-reexport/jobs-admin-mark-reexport.component.jsx +++ b/client/src/components/jobs-admin-mark-reexport/jobs-admin-mark-reexport.component.jsx @@ -1,6 +1,6 @@ import { useMutation } from "@apollo/client"; import { Button, Space } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import dayjs from "../../utils/day"; import { connect } from "react-redux"; @@ -125,18 +125,16 @@ export function JobAdminMarkReexport({ insertAuditTrail, bodyshop, currentUser, }; return ( - <> - - - - - - + + + + + ); } diff --git a/client/src/components/jobs-admin-owner-reassociate/jobs-admin-owner-reassociate.component.jsx b/client/src/components/jobs-admin-owner-reassociate/jobs-admin-owner-reassociate.component.jsx index b4869075d..813d7f45a 100644 --- a/client/src/components/jobs-admin-owner-reassociate/jobs-admin-owner-reassociate.component.jsx +++ b/client/src/components/jobs-admin-owner-reassociate/jobs-admin-owner-reassociate.component.jsx @@ -1,6 +1,6 @@ import { useMutation } from "@apollo/client"; import { Button, Form } from "antd"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { UPDATE_JOB } from "../../graphql/jobs.queries"; import OwnerSearchSelect from "../owner-search-select/owner-search-select.component"; @@ -19,7 +19,7 @@ export default function JobAdminOwnerReassociate({ job }) { variables: { jobId: job.id, job: { ownerid: values.ownerid } } }); - if (!!!result.errors) { + if (!result.errors) { notification["success"]({ message: t("jobs.successes.save") }); } else { notification["error"]({ diff --git a/client/src/components/jobs-admin-remove-ar/jobs-admin-remove-ar.component.jsx b/client/src/components/jobs-admin-remove-ar/jobs-admin-remove-ar.component.jsx index bdbae8a80..904972a87 100644 --- a/client/src/components/jobs-admin-remove-ar/jobs-admin-remove-ar.component.jsx +++ b/client/src/components/jobs-admin-remove-ar/jobs-admin-remove-ar.component.jsx @@ -1,6 +1,6 @@ import { useMutation } from "@apollo/client"; import { Switch } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -49,13 +49,11 @@ export function JobsAdminRemoveAR({ insertAuditTrail, job }) { }; return ( - <> -
-
{t("jobs.labels.remove_from_ar")}:
-
- -
+
+
{t("jobs.labels.remove_from_ar")}:
+
+
- +
); } diff --git a/client/src/components/jobs-admin-unvoid/jobs-admin-unvoid.component.jsx b/client/src/components/jobs-admin-unvoid/jobs-admin-unvoid.component.jsx index 47f0c5a5f..d722c6418 100644 --- a/client/src/components/jobs-admin-unvoid/jobs-admin-unvoid.component.jsx +++ b/client/src/components/jobs-admin-unvoid/jobs-admin-unvoid.component.jsx @@ -1,6 +1,6 @@ import { useMutation } from "@apollo/client"; import { Button } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -25,7 +25,7 @@ export function JobsAdminUnvoid({ insertAuditTrail, bodyshop, job, currentUser } const [mutationUnvoidJob] = useMutation(UNVOID_JOB); const notification = useNotification(); - const handleUpdate = async (values) => { + const handleUpdate = async () => { setLoading(true); const result = await mutationUnvoidJob({ variables: { @@ -56,10 +56,8 @@ export function JobsAdminUnvoid({ insertAuditTrail, bodyshop, job, currentUser } }; return ( - <> - - + ); } diff --git a/client/src/components/jobs-admin-vehicle-reassociate/jobs-admin-vehicle-reassociate.component.jsx b/client/src/components/jobs-admin-vehicle-reassociate/jobs-admin-vehicle-reassociate.component.jsx index 600578dbc..982ba49c0 100644 --- a/client/src/components/jobs-admin-vehicle-reassociate/jobs-admin-vehicle-reassociate.component.jsx +++ b/client/src/components/jobs-admin-vehicle-reassociate/jobs-admin-vehicle-reassociate.component.jsx @@ -1,6 +1,6 @@ import { useMutation } from "@apollo/client"; import { Button, Form } from "antd"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { UPDATE_JOB } from "../../graphql/jobs.queries"; import VehicleSearchSelect from "../vehicle-search-select/vehicle-search-select.component"; @@ -19,7 +19,7 @@ export default function JobAdminOwnerReassociate({ job }) { variables: { jobId: job.id, job: { vehicleid: values.vehicleid } } }); - if (!!!result.errors) { + if (!result.errors) { notification["success"]({ message: t("jobs.successes.save") }); } else { notification["error"]({ diff --git a/client/src/components/jobs-available-table/jobs-available-supplement.estlines.util.js b/client/src/components/jobs-available-table/jobs-available-supplement.estlines.util.js index a29a17de4..fb1ebbe96 100644 --- a/client/src/components/jobs-available-table/jobs-available-supplement.estlines.util.js +++ b/client/src/components/jobs-available-table/jobs-available-supplement.estlines.util.js @@ -71,17 +71,17 @@ export const GetSupplementDelta = async (client, jobId, newLines) => { //console.log(insertQueries, updateQueries, removeQueries); if ((insertQueries + updateQueries + removeQueries).trim() === "") { - return new Promise((resolve, reject) => { + return new Promise((resolve) => { resolve(null); }); } - return new Promise((resolve, reject) => { + return new Promise((resolve) => { resolve(gql` - mutation SUPPLEMENT_EST_LINES{ - ${insertQueries + updateQueries + removeQueries} - } - `); + mutation SUPPLEMENT_EST_LINES{ + ${insertQueries + updateQueries + removeQueries} + } + `); }); }; diff --git a/client/src/components/jobs-available-table/jobs-available-table.component.jsx b/client/src/components/jobs-available-table/jobs-available-table.component.jsx index 6aeb1cd63..72879ff07 100644 --- a/client/src/components/jobs-available-table/jobs-available-table.component.jsx +++ b/client/src/components/jobs-available-table/jobs-available-table.component.jsx @@ -1,7 +1,7 @@ import { DeleteFilled, DownloadOutlined, PlusCircleFilled, SyncOutlined } from "@ant-design/icons"; import { useMutation } from "@apollo/client"; import { Alert, Button, Card, Input, Space, Table } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { Link } from "react-router-dom"; @@ -16,7 +16,7 @@ import { useNotification } from "../../contexts/Notifications/notificationContex const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(JobsAvailableComponent); @@ -126,7 +126,7 @@ export function JobsAvailableComponent({ bodyshop, loading, data, refetch, addJo - + ); } diff --git a/client/src/components/jobs-documents-gallery/jobs-document-gallery.reassign.component.jsx b/client/src/components/jobs-documents-gallery/jobs-document-gallery.reassign.component.jsx index 51c889729..ee7c114ed 100644 --- a/client/src/components/jobs-documents-gallery/jobs-document-gallery.reassign.component.jsx +++ b/client/src/components/jobs-documents-gallery/jobs-document-gallery.reassign.component.jsx @@ -13,10 +13,11 @@ import JobSearchSelect from "../job-search-select/job-search-select.component"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(JobsDocumentsGalleryReassign); + /* ################################################################################################ Developer Note: diff --git a/client/src/components/jobs-documents-gallery/jobs-documents-gallery.component.jsx b/client/src/components/jobs-documents-gallery/jobs-documents-gallery.component.jsx index 58adaccad..ab72147b4 100644 --- a/client/src/components/jobs-documents-gallery/jobs-documents-gallery.component.jsx +++ b/client/src/components/jobs-documents-gallery/jobs-documents-gallery.component.jsx @@ -21,7 +21,8 @@ import JobsDocumentsGallerySelectAllComponent from "./jobs-documents-gallery.sel const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({}); +const mapDispatchToProps = () => ({}); + /* ################################################################################################ Developer Note: @@ -165,7 +166,7 @@ function JobsDocumentsComponent({ { + onClick={(index) => { setModalState({ open: true, index: index }); // window.open( // item.fullsize, @@ -173,7 +174,7 @@ function JobsDocumentsComponent({ // "toolbar=0,location=0,menubar=0" // ); }} - onSelect={(index, image) => { + onSelect={(index) => { setgalleryImages({ ...galleryImages, images: galleryImages.images.map((g, idx) => @@ -212,6 +213,7 @@ function JobsDocumentsComponent({ { const newWindow = window.open( `${window.location.protocol}//${window.location.host}/edit?documentId=${ diff --git a/client/src/components/jobs-documents-gallery/jobs-documents-gallery.container.jsx b/client/src/components/jobs-documents-gallery/jobs-documents-gallery.container.jsx index ea4489426..22dde88ed 100644 --- a/client/src/components/jobs-documents-gallery/jobs-documents-gallery.container.jsx +++ b/client/src/components/jobs-documents-gallery/jobs-documents-gallery.container.jsx @@ -1,5 +1,4 @@ import { useQuery } from "@apollo/client"; -import React from "react"; import { GET_DOCUMENTS_BY_JOB } from "../../graphql/documents.queries"; import AlertComponent from "../alert/alert.component"; import JobDocumentsImgProxy from "../jobs-documents-imgproxy-gallery/jobs-documents-imgproxy-gallery.component"; @@ -9,11 +8,14 @@ import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { selectBodyshop } from "../../redux/user/user.selectors"; import { useSplitTreatments } from "@splitsoftware/splitio-react"; + const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({}); +const mapDispatchToProps = () => ({}); + export default connect(mapStateToProps, mapDispatchToProps)(JobsDocumentsContainer); + /* ################################################################################################ Developer Note: @@ -35,7 +37,7 @@ export function JobsDocumentsContainer({ } = useSplitTreatments({ attributes: {}, names: ["Imgproxy"], - splitKey: bodyshop && bodyshop.imexshopid + splitKey: bodyshop?.imexshopid }); const { loading, error, data, refetch } = useQuery(GET_DOCUMENTS_BY_JOB, { @@ -51,7 +53,7 @@ export function JobsDocumentsContainer({ if (Imgproxy.treatment === "on") { return ( { + onSelect={(index) => { setgalleryImages(galleryImages.map((g, idx) => (index === idx ? { ...g, isSelected: !g.isSelected } : g))); }} /> diff --git a/client/src/components/jobs-documents-gallery/jobs-documents-gallery.selectall.component.jsx b/client/src/components/jobs-documents-gallery/jobs-documents-gallery.selectall.component.jsx index 157e04dca..989e5424f 100644 --- a/client/src/components/jobs-documents-gallery/jobs-documents-gallery.selectall.component.jsx +++ b/client/src/components/jobs-documents-gallery/jobs-documents-gallery.selectall.component.jsx @@ -1,12 +1,12 @@ import { Button, Space } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; /* ################################################################################################ Developer Note: Known Technical Debt Item - Modifications to this code requires complementary changes to the Imgproxy code. This code will be removed once the imgproxy migration is completed. + Modifications to this code requires complementary changes to the Imgproxy code. This code will be removed once + the imgproxy migration is completed. ################################################################################################ */ diff --git a/client/src/components/jobs-documents-imgproxy-gallery/jobs-document-imgproxy-gallery.download.component.jsx b/client/src/components/jobs-documents-imgproxy-gallery/jobs-document-imgproxy-gallery.download.component.jsx index 35b4a785c..b9f8266ff 100644 --- a/client/src/components/jobs-documents-imgproxy-gallery/jobs-document-imgproxy-gallery.download.component.jsx +++ b/client/src/components/jobs-documents-imgproxy-gallery/jobs-document-imgproxy-gallery.download.component.jsx @@ -51,7 +51,7 @@ export function JobsDocumentsImgproxyDownloadButton({ galleryImages, identifier, a.href = url; a.download = `${identifier || "documents"}.zip`; a.click(); - } catch (error) { + } catch { setLoading(false); setDownload(null); } @@ -74,7 +74,7 @@ export function JobsDocumentsImgproxyDownloadButton({ galleryImages, identifier, // Use the response data (Blob) to trigger download standardMediaDownload(response.data); - } catch (error) { + } catch { setLoading(false); setDownload(null); // handle error (optional) @@ -82,13 +82,11 @@ export function JobsDocumentsImgproxyDownloadButton({ galleryImages, identifier, }; return ( - <> - - + ); } diff --git a/client/src/components/jobs-documents-imgproxy-gallery/jobs-document-imgproxy-gallery.reassign.component.jsx b/client/src/components/jobs-documents-imgproxy-gallery/jobs-document-imgproxy-gallery.reassign.component.jsx index 2fcd55a9f..2b9fd681d 100644 --- a/client/src/components/jobs-documents-imgproxy-gallery/jobs-document-imgproxy-gallery.reassign.component.jsx +++ b/client/src/components/jobs-documents-imgproxy-gallery/jobs-document-imgproxy-gallery.reassign.component.jsx @@ -10,13 +10,15 @@ import { GET_DOC_SIZE_BY_JOB } from "../../graphql/documents.queries.js"; import { selectBodyshop } from "../../redux/user/user.selectors.js"; import JobSearchSelect from "../job-search-select/job-search-select.component.jsx"; import { isFunction } from "lodash"; + const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(JobsDocumentsImgproxyGalleryReassign); + /* ################################################################################################ Developer Note: diff --git a/client/src/components/jobs-documents-imgproxy-gallery/jobs-documents-imgproxy-gallery.component.jsx b/client/src/components/jobs-documents-imgproxy-gallery/jobs-documents-imgproxy-gallery.component.jsx index c7f7d46e4..803505436 100644 --- a/client/src/components/jobs-documents-imgproxy-gallery/jobs-documents-imgproxy-gallery.component.jsx +++ b/client/src/components/jobs-documents-imgproxy-gallery/jobs-documents-imgproxy-gallery.component.jsx @@ -22,7 +22,8 @@ import JobsDocumentsGallerySelectAllComponent from "./jobs-documents-imgproxy-ga const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({}); +const mapDispatchToProps = () => ({}); + /* ################################################################################################ Developer Note: @@ -120,7 +121,7 @@ function JobsDocumentsImgproxyComponent({ { + onClick={(index) => { setModalState({ open: true, index: index }); // window.open( // item.fullsize, @@ -128,7 +129,7 @@ function JobsDocumentsImgproxyComponent({ // "toolbar=0,location=0,menubar=0" // ); }} - onSelect={(index, image) => { + onSelect={(index) => { setGalleryImages({ ...galleryImages, images: galleryImages.images.map((g, idx) => diff --git a/client/src/components/jobs-documents-imgproxy-gallery/jobs-documents-imgproxy-gallery.external.component.jsx b/client/src/components/jobs-documents-imgproxy-gallery/jobs-documents-imgproxy-gallery.external.component.jsx index a970b01b7..0458d3aac 100644 --- a/client/src/components/jobs-documents-imgproxy-gallery/jobs-documents-imgproxy-gallery.external.component.jsx +++ b/client/src/components/jobs-documents-imgproxy-gallery/jobs-documents-imgproxy-gallery.external.component.jsx @@ -22,7 +22,7 @@ function JobsDocumentImgproxyGalleryExternal({ jobId, externalMediaState }) { { + onSelect={(index) => { setgalleryImages(galleryImages.map((g, idx) => (index === idx ? { ...g, isSelected: !g.isSelected } : g))); }} /> diff --git a/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.container.jsx b/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.container.jsx index 8c6991d94..d3176a19a 100644 --- a/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.container.jsx +++ b/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.container.jsx @@ -1,6 +1,6 @@ import { FileExcelFilled, SyncOutlined } from "@ant-design/icons"; import { Alert, Button, Card, Col, Row, Space } from "antd"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { Gallery } from "react-grid-gallery"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -57,35 +57,34 @@ export function JobsDocumentsLocalGallery({ } }, [job, invoice_number, getJobMedia, getBillMedia]); let optimized; - const jobMedia = - allMedia && allMedia[job.id] - ? allMedia[job.id].reduce( - (acc, val) => { - if (val.type && val.type.mime && val.type.mime.startsWith("image")) { - acc.images.push({ - ...val, - fullsize: val.src, - src: val.thumbnail, - height: val.thumbnailHeight, - width: val.thumbnailWidth, - ...(val.optimized && { src: val.optimized, fullsize: val.src }) - }); - if (val.optimized) optimized = true; - } else { - acc.other.push({ - ...val, - fullsize: val.src, - src: val.thumbnail, - height: val.thumbnailHeight, - width: val.thumbnailWidth, - tags: [{ value: val.filename, title: val.filename }] - }); - } - return acc; - }, - { images: [], other: [] } - ) - : { images: [], other: [] }; + const jobMedia = allMedia?.[job.id] + ? allMedia[job.id].reduce( + (acc, val) => { + if (val.type?.mime && val.type.mime.startsWith("image")) { + acc.images.push({ + ...val, + fullsize: val.src, + src: val.thumbnail, + height: val.thumbnailHeight, + width: val.thumbnailWidth, + ...(val.optimized && { src: val.optimized, fullsize: val.src }) + }); + if (val.optimized) optimized = true; + } else { + acc.other.push({ + ...val, + fullsize: val.src, + src: val.thumbnail, + height: val.thumbnailHeight, + width: val.thumbnailWidth, + tags: [{ value: val.filename, title: val.filename }] + }); + } + return acc; + }, + { images: [], other: [] } + ) + : { images: [], other: [] }; const hasMediaAccess = HasFeatureAccess({ bodyshop, featureName: "media" }); return (
@@ -140,7 +139,12 @@ export function JobsDocumentsLocalGallery({ }} {...(optimized && { customControls: [ - + ] })} onClick={(index) => { diff --git a/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.delete.component.jsx b/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.delete.component.jsx index 05624557c..c194cd57f 100644 --- a/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.delete.component.jsx +++ b/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.delete.component.jsx @@ -1,6 +1,6 @@ import { QuestionCircleOutlined } from "@ant-design/icons"; import { Button, Popconfirm } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { logImEXEvent } from "../../firebase/firebase.utils"; import cleanAxios from "../../utils/CleanAxios"; @@ -36,7 +36,7 @@ export function JobsDocumentsLocalDeleteButton({ bodyshop, getJobMedia, allMedia `${bodyshop.localmediaserverhttp}/jobs/delete`, { jobid: jobid, - files: ((allMedia && allMedia[jobid]) || []).filter((i) => i.isSelected).map((i) => i.filename) + files: (allMedia?.[jobid] || []).filter((i) => i.isSelected).map((i) => i.filename) }, { headers: { ims_token: bodyshop.localmediatoken } } ); diff --git a/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.download.jsx b/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.download.jsx index 04a95313f..c5ed07019 100644 --- a/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.download.jsx +++ b/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.download.jsx @@ -1,5 +1,5 @@ import { Button } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import cleanAxios from "../../utils/CleanAxios"; @@ -12,12 +12,12 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, allMedia: selectAllMedia }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(JobsLocalGalleryDownloadButton); -export function JobsLocalGalleryDownloadButton({ bodyshop, galleryImages, allMedia, job }) { +export function JobsLocalGalleryDownloadButton({ bodyshop, allMedia, job }) { const { t } = useTranslation(); const [download, setDownload] = useState(null); @@ -25,7 +25,7 @@ export function JobsLocalGalleryDownloadButton({ bodyshop, galleryImages, allMed setDownload((currentDownloadState) => { return { downloaded: progressEvent.loaded || 0, - speed: (progressEvent.loaded || 0) - ((currentDownloadState && currentDownloadState.downloaded) || 0) + speed: (progressEvent.loaded || 0) - (currentDownloadState?.downloaded || 0) }; }); } @@ -35,7 +35,7 @@ export function JobsLocalGalleryDownloadButton({ bodyshop, galleryImages, allMed `${bodyshop.localmediaserverhttp}/jobs/download`, { jobid: job.id, - files: ((allMedia && allMedia[job.id]) || []).filter((i) => i.isSelected).map((i) => i.filename) + files: (allMedia?.[job.id] || []).filter((i) => i.isSelected).map((i) => i.filename) }, { headers: { ims_token: bodyshop.localmediatoken }, diff --git a/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.external.component.jsx b/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.external.component.jsx index eeaea1e8f..47f1ebaa5 100644 --- a/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.external.component.jsx +++ b/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.external.component.jsx @@ -1,9 +1,9 @@ -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { Gallery } from "react-grid-gallery"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; -import { getJobMedia, toggleMediaSelected } from "../../redux/media/media.actions"; +import { getJobMedia } from "../../redux/media/media.actions"; import { selectAllMedia } from "../../redux/media/media.selectors"; import { selectBodyshop } from "../../redux/user/user.selectors"; @@ -13,14 +13,12 @@ const mapStateToProps = createStructuredSelector({ }); const mapDispatchToProps = (dispatch) => ({ - getJobMedia: (id) => dispatch(getJobMedia(id)), - - toggleMediaSelected: ({ jobid, filename }) => dispatch(toggleMediaSelected({ jobid, filename })) + getJobMedia: (id) => dispatch(getJobMedia(id)) }); export default connect(mapStateToProps, mapDispatchToProps)(JobDocumentsLocalGalleryExternal); -function JobDocumentsLocalGalleryExternal({ jobId, externalMediaState, getJobMedia, toggleMediaSelected, allMedia }) { +function JobDocumentsLocalGalleryExternal({ jobId, externalMediaState, getJobMedia, allMedia }) { const [galleryImages, setgalleryImages] = externalMediaState; const { t } = useTranslation(); @@ -31,15 +29,14 @@ function JobDocumentsLocalGalleryExternal({ jobId, externalMediaState, getJobMed }, [jobId, getJobMedia]); useEffect(() => { - let documents = - allMedia && allMedia[jobId] - ? allMedia[jobId].reduce((acc, val) => { - if (val.type && val.type.mime && val.type.mime.startsWith("image")) { - acc.push({ ...val, src: val.thumbnail, fullsize: val.src }); - } - return acc; - }, []) - : []; + let documents = allMedia?.[jobId] + ? allMedia[jobId].reduce((acc, val) => { + if (val.type?.mime && val.type.mime.startsWith("image")) { + acc.push({ ...val, src: val.thumbnail, fullsize: val.src }); + } + return acc; + }, []) + : []; console.log( "🚀 ~ file: jobs-documents-local-gallery.external.component.jsx:48 ~ useEffect ~ documents:", documents @@ -52,7 +49,7 @@ function JobDocumentsLocalGalleryExternal({ jobId, externalMediaState, getJobMed
{ + onSelect={(index) => { setgalleryImages(galleryImages.map((g, idx) => (index === idx ? { ...g, isSelected: !g.isSelected } : g))); }} /> diff --git a/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.selectall.component.jsx b/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.selectall.component.jsx index 6b9844436..787016c37 100644 --- a/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.selectall.component.jsx +++ b/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.selectall.component.jsx @@ -1,5 +1,4 @@ import { Button, Space } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; diff --git a/client/src/components/jobs-export-all-button/jobs-export-all-button.component.jsx b/client/src/components/jobs-export-all-button/jobs-export-all-button.component.jsx index 4103f4eb1..0ac960955 100644 --- a/client/src/components/jobs-export-all-button/jobs-export-all-button.component.jsx +++ b/client/src/components/jobs-export-all-button/jobs-export-all-button.component.jsx @@ -2,7 +2,7 @@ import { useMutation } from "@apollo/client"; import { Button } from "antd"; import axios from "axios"; import _ from "lodash"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -42,7 +42,6 @@ export function JobsExportAllButton({ disabled, loadingCallback, completedCallback, - refetch, insertAuditTrail }) { const { t } = useTranslation(); @@ -55,7 +54,7 @@ export function JobsExportAllButton({ logImEXEvent("jobs_export_all"); let PartnerResponse; setLoading(true); - if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) { + if (bodyshop.accountingconfig?.qbo) { PartnerResponse = await axios.post(`/qbo/receivables`, { jobIds: jobIds, elgen: true @@ -125,7 +124,7 @@ export function JobsExportAllButton({ //Call is not awaited as it is not critical to finish before proceeding. }); - if (!(bodyshop.accountingconfig && bodyshop.accountingconfig.qbo)) { + if (!bodyshop.accountingconfig?.qbo) { //QBO Logs are handled server side. await insertExportLog({ variables: { @@ -142,7 +141,7 @@ export function JobsExportAllButton({ }); } } else { - if (!(bodyshop.accountingconfig && bodyshop.accountingconfig.qbo)) { + if (!bodyshop.accountingconfig?.qbo) { //QBO Logs are handled server side. await insertExportLog({ variables: { @@ -189,18 +188,14 @@ export function JobsExportAllButton({ }); } } - if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo && successfulTransactions.length > 0) { + if (bodyshop.accountingconfig?.qbo && successfulTransactions.length > 0) { notification.open({ type: "success", key: "jobsuccessexport", message: t("jobs.successes.exported") }); const successfulTransactionsSet = [ - ...new Set( - successfulTransactions.map( - (st) => st[bodyshop.accountingconfig && bodyshop.accountingconfig.qbo ? "jobid" : "id"] - ) - ) + ...new Set(successfulTransactions.map((st) => st[bodyshop.accountingconfig?.qbo ? "jobid" : "id"])) ]; if (successfulTransactionsSet.length > 0) { insertAuditTrail({ diff --git a/client/src/components/jobs-list-paginated/jobs-list-paginated.component.jsx b/client/src/components/jobs-list-paginated/jobs-list-paginated.component.jsx index a515f682f..6d36d85f2 100644 --- a/client/src/components/jobs-list-paginated/jobs-list-paginated.component.jsx +++ b/client/src/components/jobs-list-paginated/jobs-list-paginated.component.jsx @@ -183,7 +183,6 @@ export function JobsList({ bodyshop, refetch, loading, jobs, total }) { if (search.search && search.search.trim() !== "") { searchJobs(); } - // eslint-disable-next-line react-hooks/exhaustive-deps }, []); async function searchJobs(value) { diff --git a/client/src/components/jobs-mark-pst-exempt/jobs-mark-pst-exempt.component.jsx b/client/src/components/jobs-mark-pst-exempt/jobs-mark-pst-exempt.component.jsx index 360d7c592..32fa1b584 100644 --- a/client/src/components/jobs-mark-pst-exempt/jobs-mark-pst-exempt.component.jsx +++ b/client/src/components/jobs-mark-pst-exempt/jobs-mark-pst-exempt.component.jsx @@ -1,5 +1,4 @@ import { Button, Popconfirm } from "antd"; -import React from "react"; import { createStructuredSelector } from "reselect"; import { selectJobReadOnly } from "../../redux/application/application.selectors"; import { selectBodyshop } from "../../redux/user/user.selectors"; diff --git a/client/src/components/jobs-mark-selected-exported/jobs-mark-selected-exported.jsx b/client/src/components/jobs-mark-selected-exported/jobs-mark-selected-exported.jsx index 0dcf63019..a36f8f1e5 100644 --- a/client/src/components/jobs-mark-selected-exported/jobs-mark-selected-exported.jsx +++ b/client/src/components/jobs-mark-selected-exported/jobs-mark-selected-exported.jsx @@ -1,6 +1,6 @@ import { useMutation } from "@apollo/client"; import { Button, Popconfirm } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -50,7 +50,9 @@ export function JobMarkSelectedExported({ date_exported: new Date() } }, - update(cache) {} + update() { + // NO OP + } }); await insertExportLog({ diff --git a/client/src/components/jobs-notes/jobs-notes.container.jsx b/client/src/components/jobs-notes/jobs-notes.container.jsx index fb3a50b5d..c58d905b7 100644 --- a/client/src/components/jobs-notes/jobs-notes.container.jsx +++ b/client/src/components/jobs-notes/jobs-notes.container.jsx @@ -1,6 +1,5 @@ import { useMutation, useQuery } from "@apollo/client"; -import React, { useState } from "react"; -//import SpinComponent from "../../components/loading-spinner/loading-spinner.component"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -39,7 +38,7 @@ export function JobNotesContainer({ jobId, insertAuditTrail }) { variables: { noteId: id } - }).then((r) => { + }).then(() => { refetch(); notification["success"]({ message: t("notes.successes.deleted") @@ -60,7 +59,7 @@ export function JobNotesContainer({ jobId, insertAuditTrail }) { jobId={jobId} loading={loading} data={data ? data.jobs_by_pk.notes : null} - relatedRos={data ? data.jobs_by_pk.vehicle && data.jobs_by_pk.vehicle.jobs : null} + relatedRos={data ? data.jobs_by_pk.vehicle?.jobs : null} refetch={refetch} deleteLoading={deleteLoading} handleNoteDelete={handleNoteDelete} diff --git a/client/src/components/jobs-notes/jobs.notes.component.jsx b/client/src/components/jobs-notes/jobs.notes.component.jsx index ec6e890fe..9ef671f56 100644 --- a/client/src/components/jobs-notes/jobs.notes.component.jsx +++ b/client/src/components/jobs-notes/jobs.notes.component.jsx @@ -1,6 +1,5 @@ import { AuditOutlined, DeleteFilled, EditFilled, EyeInvisibleFilled, WarningFilled } from "@ant-design/icons"; import { Button, Card, Form, Input, Space, Table } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -97,7 +96,7 @@ export function JobNotesComponent({ dataIndex: "text", key: "text", ellipsis: true, - render: (text, record) => {text} + render: (text) => {text} }, { @@ -156,7 +155,7 @@ export function JobNotesComponent({ } ]; - const handleTableChange = (pagination, filters, sorter) => { + const handleTableChange = (pagination, filters) => { setFilter(filters); }; diff --git a/client/src/components/jobs-ready-list/jobs-ready-list.component.jsx b/client/src/components/jobs-ready-list/jobs-ready-list.component.jsx index 6396dfaca..b88b713c2 100644 --- a/client/src/components/jobs-ready-list/jobs-ready-list.component.jsx +++ b/client/src/components/jobs-ready-list/jobs-ready-list.component.jsx @@ -2,7 +2,7 @@ import { BranchesOutlined, ExclamationCircleFilled, PauseCircleOutlined, SyncOut import { useQuery } from "@apollo/client"; import { Button, Card, Grid, Input, Space, Table, Tooltip } from "antd"; import queryString from "query-string"; -import React, { useMemo, useState } from "react"; +import { useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { Link, useLocation, useNavigate } from "react-router-dom"; @@ -103,9 +103,7 @@ export function JobsReadyList({ bodyshop }) { e.stopPropagation()}> {record.ro_number || t("general.labels.na")} - {record.production_vars && record.production_vars.alert ? ( - - ) : null} + {record.production_vars?.alert ? : null} {record.suspended && } {record.iouparent && ( @@ -330,9 +328,9 @@ export function JobsReadyList({ bodyshop }) { type: "radio" }} onChange={handleTableChange} - onRow={(record, rowIndex) => { + onRow={(record) => { return { - onClick: (event) => { + onClick: () => { handleOnRowClick(record); } }; diff --git a/client/src/components/jobs-related-ros/jobs-related-ros.component.jsx b/client/src/components/jobs-related-ros/jobs-related-ros.component.jsx index dc523dcb6..5fccd626b 100644 --- a/client/src/components/jobs-related-ros/jobs-related-ros.component.jsx +++ b/client/src/components/jobs-related-ros/jobs-related-ros.component.jsx @@ -1,9 +1,8 @@ import { Space, Tag } from "antd"; -import React from "react"; import { Link } from "react-router-dom"; -export default function JobsRelatedRos({ jobid, job, disabled }) { - if (!(job && job.vehicle && job.vehicle.jobs)) return null; +export default function JobsRelatedRos({ job, disabled }) { + if (!(job?.vehicle && job.vehicle.jobs)) return null; return ( {job.vehicle.jobs diff --git a/client/src/components/labor-allocations-adjustment-edit/labor-allocations-adjustment-edit.component.jsx b/client/src/components/labor-allocations-adjustment-edit/labor-allocations-adjustment-edit.component.jsx index a76baeb73..e87a459a0 100644 --- a/client/src/components/labor-allocations-adjustment-edit/labor-allocations-adjustment-edit.component.jsx +++ b/client/src/components/labor-allocations-adjustment-edit/labor-allocations-adjustment-edit.component.jsx @@ -1,6 +1,6 @@ import { useMutation } from "@apollo/client"; import { Button, Card, Form, InputNumber, Popover, Select } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { UPDATE_JOB } from "../../graphql/jobs.queries"; @@ -49,7 +49,7 @@ export function LaborAllocationsAdjustmentEdit({ ...(refetchQueryNames ? { refetchQueries: refetchQueryNames } : {}) }); - if (!!result.errors) { + if (result.errors) { notification["error"]({ message: t("jobs.errors.saving", { message: JSON.stringify(result.errors) @@ -81,7 +81,7 @@ export function LaborAllocationsAdjustmentEdit({ onFinish={handleFinish} initialValues={{ mod_lbr_ty: mod_lbr_ty, - hours: adjustments && adjustments[mod_lbr_ty] + hours: adjustments?.[mod_lbr_ty] }} > record.convertedtolbr_data && record.convertedtolbr_data.mod_lbr_ty + render: (text, record) => record.convertedtolbr_data?.mod_lbr_ty }, { title: t("joblines.fields.mod_lb_hrs"), dataIndex: "conv_mod_lb_hrs", key: "conv_mod_lb_hrs", render: (text, record) => - record.convertedtolbr_data && - record.convertedtolbr_data.mod_lb_hrs && - record.convertedtolbr_data.mod_lb_hrs.toFixed(1) + record.convertedtolbr_data?.mod_lb_hrs && record.convertedtolbr_data.mod_lb_hrs.toFixed(1) } ]; @@ -270,4 +269,5 @@ export function LaborAllocationsTable({ ); } + export default connect(mapStateToProps, null)(LaborAllocationsTable); diff --git a/client/src/components/labor-allocations-table/labor-allocations-table.payroll.component.jsx b/client/src/components/labor-allocations-table/labor-allocations-table.payroll.component.jsx index 5604c59d6..c1330ec87 100644 --- a/client/src/components/labor-allocations-table/labor-allocations-table.payroll.component.jsx +++ b/client/src/components/labor-allocations-table/labor-allocations-table.payroll.component.jsx @@ -2,7 +2,7 @@ import { Alert, Button, Card, Col, Row, Space, Table, Typography } from "antd"; import { SyncOutlined } from "@ant-design/icons"; import axios from "axios"; import _ from "lodash"; -import React, { useEffect, useMemo, useState } from "react"; +import { useEffect, useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -26,7 +26,6 @@ export function PayrollLaborAllocationsTable({ timetickets, bodyshop, adjustments, - technician, refetch, showWarning, warningCallback @@ -168,16 +167,14 @@ export function PayrollLaborAllocationsTable({ title: t("joblines.fields.mod_lbr_ty"), dataIndex: "conv_mod_lbr_ty", key: "conv_mod_lbr_ty", - render: (text, record) => record.convertedtolbr_data && record.convertedtolbr_data.mod_lbr_ty + render: (text, record) => record.convertedtolbr_data?.mod_lbr_ty }, { title: t("joblines.fields.mod_lb_hrs"), dataIndex: "conv_mod_lb_hrs", key: "conv_mod_lb_hrs", render: (text, record) => - record.convertedtolbr_data && - record.convertedtolbr_data.mod_lb_hrs && - record.convertedtolbr_data.mod_lb_hrs.toFixed(5) + record.convertedtolbr_data?.mod_lb_hrs && record.convertedtolbr_data.mod_lb_hrs.toFixed(5) } ]; diff --git a/client/src/components/layout-form-row/layout-form-row.component.jsx b/client/src/components/layout-form-row/layout-form-row.component.jsx index ae93a0fa5..52a99cd39 100644 --- a/client/src/components/layout-form-row/layout-form-row.component.jsx +++ b/client/src/components/layout-form-row/layout-form-row.component.jsx @@ -1,5 +1,4 @@ import { Col, Divider, Row } from "antd"; -import React from "react"; import "./layout-form-row.styles.scss"; export default function LayoutFormRow({ header, children, grow = false, noDivider = false, ...restProps }) { @@ -10,7 +9,7 @@ export default function LayoutFormRow({ header, children, grow = false, noDivide ); - if (!!!children.length) { + if (!children.length) { //We have only one element. It's going to get the whole thing. return (
diff --git a/client/src/components/loading-skeleton/loading-skeleton.component.jsx b/client/src/components/loading-skeleton/loading-skeleton.component.jsx index 6d9af741a..f23d38f6e 100644 --- a/client/src/components/loading-skeleton/loading-skeleton.component.jsx +++ b/client/src/components/loading-skeleton/loading-skeleton.component.jsx @@ -1,4 +1,3 @@ -import React from "react"; import "./loading-skeleton.styles.scss"; import { Skeleton } from "antd"; diff --git a/client/src/components/loading-spinner/loading-spinner.component.jsx b/client/src/components/loading-spinner/loading-spinner.component.jsx index e9e94bcb3..9943b0d21 100644 --- a/client/src/components/loading-spinner/loading-spinner.component.jsx +++ b/client/src/components/loading-spinner/loading-spinner.component.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Spin } from "antd"; import "./loading-spinner.styles.scss"; diff --git a/client/src/components/manage-sign-in-button/manage-sign-in-button.component.jsx b/client/src/components/manage-sign-in-button/manage-sign-in-button.component.jsx index 067450179..050a6ad18 100644 --- a/client/src/components/manage-sign-in-button/manage-sign-in-button.component.jsx +++ b/client/src/components/manage-sign-in-button/manage-sign-in-button.component.jsx @@ -1,5 +1,4 @@ import { BuildFilled, LoginOutlined } from "@ant-design/icons"; -import React from "react"; import { connect } from "react-redux"; import { Link } from "react-router-dom"; import { createStructuredSelector } from "reselect"; diff --git a/client/src/components/no-shop/no-shop.component.jsx b/client/src/components/no-shop/no-shop.component.jsx index 1847999e9..ce03d60da 100644 --- a/client/src/components/no-shop/no-shop.component.jsx +++ b/client/src/components/no-shop/no-shop.component.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Result } from "antd"; import { useTranslation } from "react-i18next"; diff --git a/client/src/components/not-found/not-found.component.jsx b/client/src/components/not-found/not-found.component.jsx index 20adf832f..c23eba7ee 100644 --- a/client/src/components/not-found/not-found.component.jsx +++ b/client/src/components/not-found/not-found.component.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Result } from "antd"; import { useTranslation } from "react-i18next"; diff --git a/client/src/components/note-upsert-modal/note-upsert-modal.component.jsx b/client/src/components/note-upsert-modal/note-upsert-modal.component.jsx index bdd6c713c..333d318b8 100644 --- a/client/src/components/note-upsert-modal/note-upsert-modal.component.jsx +++ b/client/src/components/note-upsert-modal/note-upsert-modal.component.jsx @@ -1,5 +1,4 @@ import { Checkbox, Col, Form, Input, Row, Select, Space, Switch, Tag } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -9,7 +8,7 @@ import NotesPresetButton from "../notes-preset-button/notes-preset-button.compon const mapStateToProps = createStructuredSelector({ noteUpsertModal: selectNoteUpsert }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(NoteUpsertModalComponent); @@ -77,7 +76,7 @@ export function NoteUpsertModalComponent({ form, noteUpsertModal }) {
{!existingNote && t("notes.labels.addtorelatedro")}
{!existingNote && - filteredRelatedRos.map((j, idx) => ( + filteredRelatedRos.map((j) => ( diff --git a/client/src/components/note-upsert-modal/note-upsert-modal.container.jsx b/client/src/components/note-upsert-modal/note-upsert-modal.container.jsx index d6d9c93db..6c8472667 100644 --- a/client/src/components/note-upsert-modal/note-upsert-modal.container.jsx +++ b/client/src/components/note-upsert-modal/note-upsert-modal.container.jsx @@ -109,7 +109,7 @@ export function NoteUpsertModalContainer({ currentUser, noteUpsertModal, toggleM } }); } - } catch (error) { + } catch { // Cache miss is okay, query hasn't been executed yet console.log("Cache miss for GET_JOB_BY_PK"); } diff --git a/client/src/components/notes-preset-button/notes-preset-button.component.jsx b/client/src/components/notes-preset-button/notes-preset-button.component.jsx index 10827711f..957707da1 100644 --- a/client/src/components/notes-preset-button/notes-preset-button.component.jsx +++ b/client/src/components/notes-preset-button/notes-preset-button.component.jsx @@ -1,6 +1,5 @@ import { DownOutlined } from "@ant-design/icons"; import { Dropdown } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -10,7 +9,7 @@ const mapStateToProps = createStructuredSelector({ //currentUser: selectCurrentUser bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); diff --git a/client/src/components/notification-center/notification-center.component.jsx b/client/src/components/notification-center/notification-center.component.jsx index a29e675fd..b3d61293e 100644 --- a/client/src/components/notification-center/notification-center.component.jsx +++ b/client/src/components/notification-center/notification-center.component.jsx @@ -18,7 +18,6 @@ const NotificationCenterComponent = forwardRef( ( { visible, - onClose, notifications, loading, showUnreadOnly, diff --git a/client/src/components/notification-settings/notification-settings-form.component.jsx b/client/src/components/notification-settings/notification-settings-form.component.jsx index a5b2a1d6f..c728943f8 100644 --- a/client/src/components/notification-settings/notification-settings-form.component.jsx +++ b/client/src/components/notification-settings/notification-settings-form.component.jsx @@ -82,7 +82,7 @@ const NotificationSettingsForm = ({ currentUser, bodyshop }) => { } else { throw new Error("Failed to update auto-add setting"); } - } catch (err) { + } catch { setAutoAddEnabled(!checked); // Revert on error notification.error({ message: t("notifications.labels.auto-add-failure") }); } @@ -102,7 +102,7 @@ const NotificationSettingsForm = ({ currentUser, bodyshop }) => { } else { throw new Error("Failed to update notification settings"); } - } catch (err) { + } catch { notification.error({ message: t("notifications.labels.notification-settings-failure") }); } } diff --git a/client/src/components/owner-detail-form/owner-detail-form.component.jsx b/client/src/components/owner-detail-form/owner-detail-form.component.jsx index 99bacd566..608d66fb1 100644 --- a/client/src/components/owner-detail-form/owner-detail-form.component.jsx +++ b/client/src/components/owner-detail-form/owner-detail-form.component.jsx @@ -6,7 +6,7 @@ import FormItemEmail from "../form-items-formatted/email-form-item.component"; import LayoutFormRow from "../layout-form-row/layout-form-row.component"; import { PhoneItemFormatterValidation } from "../form-items-formatted/phone-form-item.component"; -export default function OwnerDetailFormComponent({ form, loading, isPhone1OptedOut, isPhone2OptedOut }) { +export default function OwnerDetailFormComponent({ form, isPhone1OptedOut, isPhone2OptedOut }) { const { t } = useTranslation(); const { getFieldValue } = form; diff --git a/client/src/components/owner-detail-jobs/owner-detail-jobs.component.jsx b/client/src/components/owner-detail-jobs/owner-detail-jobs.component.jsx index 8fae096d1..a4b0941ae 100644 --- a/client/src/components/owner-detail-jobs/owner-detail-jobs.component.jsx +++ b/client/src/components/owner-detail-jobs/owner-detail-jobs.component.jsx @@ -120,7 +120,7 @@ function OwnerDetailJobsComponent({ bodyshop, owner, isPartsEntry }) { onSelect: (record, selected, selectedRows) => { setSelectedJobs(selectedRows ? selectedRows.map((i) => i.id) : []); }, - onSelectAll: (selected, selectedRows, changeRows) => { + onSelectAll: (selected, selectedRows) => { setSelectedJobs( selectedRows ? selectedRows diff --git a/client/src/components/owner-detail-update-jobs/owner-detail-update-jobs.component.jsx b/client/src/components/owner-detail-update-jobs/owner-detail-update-jobs.component.jsx index 6aad4613c..b021660ff 100644 --- a/client/src/components/owner-detail-update-jobs/owner-detail-update-jobs.component.jsx +++ b/client/src/components/owner-detail-update-jobs/owner-detail-update-jobs.component.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Button } from "antd"; import { useTranslation } from "react-i18next"; import { useMutation } from "@apollo/client"; @@ -11,7 +10,7 @@ export default function OwnerDetailUpdateJobsComponent({ owner, selectedJobs, di const [updateJobs] = useMutation(UPDATE_JOBS); const notification = useNotification(); - const handlecClick = (e) => { + const handlecClick = () => { logImEXEvent("owner_update_jobs", { count: selectedJobs.length }); updateJobs({ @@ -34,7 +33,7 @@ export default function OwnerDetailUpdateJobsComponent({ owner, selectedJobs, di } } }) - .then((response) => { + .then(() => { notification["success"]({ message: t("jobs.successes.updated") }); }) .catch((error) => { diff --git a/client/src/components/owner-find-modal/owner-find-modal.component.jsx b/client/src/components/owner-find-modal/owner-find-modal.component.jsx index ecaf882f1..7527de91f 100644 --- a/client/src/components/owner-find-modal/owner-find-modal.component.jsx +++ b/client/src/components/owner-find-modal/owner-find-modal.component.jsx @@ -1,5 +1,4 @@ import { Checkbox, Divider, Table } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import PhoneFormatter from "../../utils/PhoneFormatter"; @@ -89,16 +88,16 @@ export default function OwnerFindModalComponent({ type: "radio", selectedRowKeys: [selectedOwner] }} - onRow={(record, rowIndex) => { + onRow={(record) => { return { - onClick: (event) => { + onClick: () => { handleOnRowClick(record); } }; }} /> - setSelectedOwner(null)}> + setSelectedOwner(null)}> {t("owners.labels.create_new")} setPartsQueueToggle(e.target.checked)}> diff --git a/client/src/components/owner-name-display/owner-name-display.component.jsx b/client/src/components/owner-name-display/owner-name-display.component.jsx index 245259491..0b211fbf5 100644 --- a/client/src/components/owner-name-display/owner-name-display.component.jsx +++ b/client/src/components/owner-name-display/owner-name-display.component.jsx @@ -6,7 +6,7 @@ import { selectBodyshop } from "../../redux/user/user.selectors"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(OwnerNameDisplay); diff --git a/client/src/components/owner-search-select/owner-search-select.component.jsx b/client/src/components/owner-search-select/owner-search-select.component.jsx index 282230d67..75e6451ed 100644 --- a/client/src/components/owner-search-select/owner-search-select.component.jsx +++ b/client/src/components/owner-search-select/owner-search-select.component.jsx @@ -2,7 +2,7 @@ import { LoadingOutlined } from "@ant-design/icons"; import { useLazyQuery } from "@apollo/client"; import { Empty, Select } from "antd"; import _ from "lodash"; -import React, { forwardRef, useEffect, useState } from "react"; +import { forwardRef, useEffect, useState } from "react"; import { SEARCH_OWNERS_BY_ID_FOR_AUTOCOMPLETE, SEARCH_OWNERS_FOR_AUTOCOMPLETE } from "../../graphql/owners.queries"; import AlertComponent from "../alert/alert.component"; import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component"; @@ -47,8 +47,8 @@ const OwnerSearchSelect = ({ value, onChange, onBlur, disabled }, ref) => { }; const theOptions = [ - ...(idData && idData.owners_by_pk ? [idData.owners_by_pk] : []), - ...(data && data.search_owners ? data.search_owners : []) + ...(idData?.owners_by_pk ? [idData.owners_by_pk] : []), + ...(data?.search_owners ? data.search_owners : []) ]; return ( diff --git a/client/src/components/owner-tag-popover/owner-tag-popover.component.jsx b/client/src/components/owner-tag-popover/owner-tag-popover.component.jsx index 0a127d747..8d086e4fa 100644 --- a/client/src/components/owner-tag-popover/owner-tag-popover.component.jsx +++ b/client/src/components/owner-tag-popover/owner-tag-popover.component.jsx @@ -1,5 +1,4 @@ import { Button, Col, Descriptions, Popover, Row, Tag } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { Link } from "react-router-dom"; import PhoneFormatter from "../../utils/PhoneFormatter"; diff --git a/client/src/components/owners-list/owners-list.component.jsx b/client/src/components/owners-list/owners-list.component.jsx index 73991b009..cd30f7824 100644 --- a/client/src/components/owners-list/owners-list.component.jsx +++ b/client/src/components/owners-list/owners-list.component.jsx @@ -1,7 +1,7 @@ import { SyncOutlined } from "@ant-design/icons"; import { Button, Card, Input, Space, Table, Typography } from "antd"; import queryString from "query-string"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { Link, useLocation, useNavigate } from "react-router-dom"; import PhoneFormatter from "../../utils/PhoneFormatter"; @@ -119,7 +119,7 @@ export default function OwnersListComponent({ loading, owners, total, refetch }) pagination={{ position: "top", pageSize: pageLimit, - current: parseInt(page || 1), + current: parseInt(page || 1, 10), total: total }} columns={columns} diff --git a/client/src/components/owners-list/owners-list.container.jsx b/client/src/components/owners-list/owners-list.container.jsx index 44d089b11..45cd0c4f0 100644 --- a/client/src/components/owners-list/owners-list.container.jsx +++ b/client/src/components/owners-list/owners-list.container.jsx @@ -1,5 +1,4 @@ import { useQuery } from "@apollo/client"; -import React from "react"; import { QUERY_ALL_OWNERS_PAGINATED } from "../../graphql/owners.queries"; import AlertComponent from "../alert/alert.component"; import OwnersListComponent from "./owners-list.component"; diff --git a/client/src/components/partner-ping/partner-ping.component.jsx b/client/src/components/partner-ping/partner-ping.component.jsx index aa0366e5c..0c80bc55c 100644 --- a/client/src/components/partner-ping/partner-ping.component.jsx +++ b/client/src/components/partner-ping/partner-ping.component.jsx @@ -1,5 +1,5 @@ import axios from "axios"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { setPartnerVersion } from "../../redux/application/application.actions"; @@ -22,7 +22,6 @@ export function PartnerPingComponent({ bodyshop }) { // Execute the created function directly checkPartnerStatus(bodyshop); - // eslint-disable-next-line react-hooks/exhaustive-deps }, [bodyshop?.id]); return <>; diff --git a/client/src/components/parts-dispatch-expander/parts-dispatch-expander.component.jsx b/client/src/components/parts-dispatch-expander/parts-dispatch-expander.component.jsx index 90adb8284..091adb5ed 100644 --- a/client/src/components/parts-dispatch-expander/parts-dispatch-expander.component.jsx +++ b/client/src/components/parts-dispatch-expander/parts-dispatch-expander.component.jsx @@ -1,13 +1,12 @@ import { useMutation } from "@apollo/client"; import { Button, Card, Col, Row, Table } from "antd"; import dayjs from "../../utils/day"; -import React from "react"; import { useTranslation } from "react-i18next"; import { UPDATE_PARTS_DISPATCH_LINE } from "../../graphql/parts-dispatch.queries"; import { DateTimeFormatter } from "../../utils/DateFormatter"; import { useNotification } from "../../contexts/Notifications/notificationContext.jsx"; -export default function PartsDispatchExpander({ dispatch, job }) { +export default function PartsDispatchExpander({ dispatch }) { const { t } = useTranslation(); const [updateDispatchLine] = useMutation(UPDATE_PARTS_DISPATCH_LINE); const notification = useNotification(); diff --git a/client/src/components/parts-dispatch-table/parts-dispatch-table.component.jsx b/client/src/components/parts-dispatch-table/parts-dispatch-table.component.jsx index 6e35203a9..cb478429d 100644 --- a/client/src/components/parts-dispatch-table/parts-dispatch-table.component.jsx +++ b/client/src/components/parts-dispatch-table/parts-dispatch-table.component.jsx @@ -1,10 +1,9 @@ import { MinusCircleTwoTone, PlusCircleTwoTone, SyncOutlined } from "@ant-design/icons"; import { Button, Card, Input, Space, Table } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; -import { selectJobReadOnly } from "../../redux/application/application.selectors"; import { selectBodyshop } from "../../redux/user/user.selectors"; import { TemplateList } from "../../utils/TemplateConstants"; import { alphaSort } from "../../utils/sorters"; @@ -12,13 +11,12 @@ import PartsDispatchExpander from "../parts-dispatch-expander/parts-dispatch-exp import PrintWrapperComponent from "../print-wrapper/print-wrapper.component"; const mapStateToProps = createStructuredSelector({ - jobRO: selectJobReadOnly, bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({}); +const mapDispatchToProps = () => ({}); -export function PartDispatchTableComponent({ bodyshop, jobRO, job, billsQuery, handleOnRowClick }) { +export function PartDispatchTableComponent({ bodyshop, job, billsQuery }) { const { t } = useTranslation(); const [state, setState] = useState({ @@ -117,7 +115,7 @@ export function PartDispatchTableComponent({ bodyshop, jobRO, job, billsQuery, h }} expandable={{ expandedRowRender: (record) => , - rowExpandable: (record) => true, + rowExpandable: () => true, expandIcon: ({ expanded, onExpand, record }) => expanded ? ( diff --git a/client/src/components/parts-order-backorder-eta/parts-order-backorder-eta.component.jsx b/client/src/components/parts-order-backorder-eta/parts-order-backorder-eta.component.jsx index 7fd2cf2e4..1abf9e910 100644 --- a/client/src/components/parts-order-backorder-eta/parts-order-backorder-eta.component.jsx +++ b/client/src/components/parts-order-backorder-eta/parts-order-backorder-eta.component.jsx @@ -1,6 +1,6 @@ import { useMutation } from "@apollo/client"; import { Button, Form, Popover, Spin } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -16,14 +16,7 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -export function PartsOrderBackorderEta({ - backordered_eta, - partsOrderStatus, - partsLineId, - jobLineId, - disabled, - bodyshop -}) { +export function PartsOrderBackorderEta({ backordered_eta, partsOrderStatus, partsLineId, disabled, bodyshop }) { const [visibility, setVisibility] = useState(false); const [loading, setLoading] = useState(false); const [updateBoDate] = useMutation(MUTATION_UPDATE_BO_ETA); @@ -44,7 +37,7 @@ export function PartsOrderBackorderEta({ } }); - if (!!result.errors) { + if (result.errors) { notification["error"]({ message: t("parts_orders.errors.backordering", { message: JSON.stringify(result.errors) @@ -56,7 +49,7 @@ export function PartsOrderBackorderEta({ setLoading(false); }; - const handlePopover = (e) => { + const handlePopover = () => { setVisibility(true); }; diff --git a/client/src/components/parts-order-cm-received/parts-order-cm-received.component.jsx b/client/src/components/parts-order-cm-received/parts-order-cm-received.component.jsx index af7d52142..1bf9abb64 100644 --- a/client/src/components/parts-order-cm-received/parts-order-cm-received.component.jsx +++ b/client/src/components/parts-order-cm-received/parts-order-cm-received.component.jsx @@ -1,6 +1,6 @@ import { useMutation } from "@apollo/client"; import { Checkbox, Space, Spin } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { MUTATION_UPDATE_PO_CM_REECEIVED } from "../../graphql/parts-orders.queries"; import { useNotification } from "../../contexts/Notifications/notificationContext.jsx"; @@ -41,7 +41,7 @@ export default function PartsOrderCmReceived({ checked, orderLineId, partsOrderI } }); - if (!!!result.errors) { + if (!result.errors) { notification["success"]({ message: t("parts_orders.successes.line_updated") }); diff --git a/client/src/components/parts-order-delete-line/parts-order-delete-line.component.jsx b/client/src/components/parts-order-delete-line/parts-order-delete-line.component.jsx index a04270ab9..a1ae16bdf 100644 --- a/client/src/components/parts-order-delete-line/parts-order-delete-line.component.jsx +++ b/client/src/components/parts-order-delete-line/parts-order-delete-line.component.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Button, Popconfirm } from "antd"; import { DeleteFilled } from "@ant-design/icons"; import { useTranslation } from "react-i18next"; diff --git a/client/src/components/parts-order-line-backorder-button/parts-order-line-backorder-button.component.jsx b/client/src/components/parts-order-line-backorder-button/parts-order-line-backorder-button.component.jsx index e38b30ecb..4a4972e61 100644 --- a/client/src/components/parts-order-line-backorder-button/parts-order-line-backorder-button.component.jsx +++ b/client/src/components/parts-order-line-backorder-button/parts-order-line-backorder-button.component.jsx @@ -1,6 +1,6 @@ import { useMutation } from "@apollo/client"; import { Button, Form, Popover } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -47,7 +47,7 @@ export function PartsOrderLineBackorderButton({ partsOrderStatus, partsLineId, j } }); - if (!!result.errors) { + if (result.errors) { notification["error"]({ message: t("parts_orders.errors.backordering", { message: JSON.stringify(result.errors) @@ -59,7 +59,7 @@ export function PartsOrderLineBackorderButton({ partsOrderStatus, partsLineId, j setLoading(false); }; - const handlePopover = (e) => { + const handlePopover = () => { if (isAlreadyBackordered) { handleFinish(); //Receive the part. diff --git a/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx b/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx index 70aba6c3f..af0814429 100644 --- a/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx +++ b/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx @@ -1,7 +1,7 @@ import { DeleteFilled, EyeFilled, SyncOutlined } from "@ant-design/icons"; import { useMutation } from "@apollo/client"; import { Button, Card, Checkbox, Input, Popconfirm, Space, Table } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { FaTasks } from "react-icons/fa"; import { connect } from "react-redux"; @@ -109,20 +109,18 @@ export function PartsOrderListTableComponent({ {t("parts_orders.actions.receive")} {!isPartsEntry && ( - <> -
- {data && data.jobs + {data?.jobs ? data.jobs.map((j) => ( {t("jobs.labels.intakechecklist")} - {data.jobs_by_pk.intakechecklist && data.jobs_by_pk.intakechecklist.form && ( + {data.jobs_by_pk.intakechecklist?.form && ( <> {t("jobs.labels.deliverchecklist")} - {data.jobs_by_pk.deliverchecklist && data.jobs_by_pk.deliverchecklist.form && ( + {data.jobs_by_pk.deliverchecklist?.form && ( <> { - if (data && data.jobs_by_pk) { + if (data?.jobs_by_pk) { setJobReadOnly(IsJobReadOnly(data.jobs_by_pk)); } }, [data, setJobReadOnly]); @@ -41,7 +41,7 @@ export function JobsCloseContainer({ setBreadcrumbs, setSelectedHeader, setJobRe imex: "$t(titles.imexonline)", rome: "$t(titles.romeonline)" }), - number: data ? data.jobs_by_pk && data.jobs_by_pk.ro_number : null + number: data ? data.jobs_by_pk?.ro_number : null }); setBreadcrumbs([ @@ -52,7 +52,7 @@ export function JobsCloseContainer({ setBreadcrumbs, setSelectedHeader, setJobRe { link: `/manage/jobs/${jobId}/`, label: t("titles.bc.jobs-detail", { - number: data ? data.jobs_by_pk && data.jobs_by_pk.ro_number : null + number: data ? data.jobs_by_pk?.ro_number : null }) }, { @@ -64,7 +64,7 @@ export function JobsCloseContainer({ setBreadcrumbs, setSelectedHeader, setJobRe if (loading) return ; if (error) return ; - if (!!!data.jobs_by_pk) return ; + if (!data.jobs_by_pk) return ; if (!data.jobs_by_pk.job_totals) return } />; diff --git a/client/src/pages/jobs-create/jobs-create.component.jsx b/client/src/pages/jobs-create/jobs-create.component.jsx index ca00a3125..5acde3bbe 100644 --- a/client/src/pages/jobs-create/jobs-create.component.jsx +++ b/client/src/pages/jobs-create/jobs-create.component.jsx @@ -1,7 +1,7 @@ import { PageHeader } from "@ant-design/pro-layout"; import { Button, Result, Space, Steps } from "antd"; -import React, { useContext, useState } from "react"; +import { useContext, useState } from "react"; import { useTranslation } from "react-i18next"; import { Link } from "react-router-dom"; import AlertComponent from "../../components/alert/alert.component"; @@ -63,7 +63,7 @@ export default function JobsCreateComponent({ form }) { next(); form .validateFields() - .then((r) => { + .then(() => { if (steps[pageIndex].validation) { setErrorMessage(null); next(); @@ -83,7 +83,9 @@ export default function JobsCreateComponent({ form }) { onClick={() => { form .validateFields() - .then((r) => {}) + .then(() => { + // NO OP + }) .catch((error) => console.log("error", error)); form.submit(); }} @@ -108,7 +110,7 @@ export default function JobsCreateComponent({ form }) { setPageIndex(idx); form .validateFields() - .then((r) => { + .then(() => { if (steps[pageIndex].validation) { setErrorMessage(null); setPageIndex(idx); diff --git a/client/src/pages/jobs-create/jobs-create.container.jsx b/client/src/pages/jobs-create/jobs-create.container.jsx index 0ed5c9d70..8c63b550d 100644 --- a/client/src/pages/jobs-create/jobs-create.container.jsx +++ b/client/src/pages/jobs-create/jobs-create.container.jsx @@ -1,7 +1,7 @@ import { useLazyQuery, useMutation } from "@apollo/client"; import { Form } from "antd"; import _ from "lodash"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -48,7 +48,7 @@ function JobsCreateContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) { const [loadOwner, RemoteOwnerData] = useLazyQuery(QUERY_OWNER_FOR_JOB_CREATION); useEffect(() => { - if (!!state.owner.selectedid) { + if (state.owner.selectedid) { loadOwner({ variables: { id: state.owner.selectedid } }); @@ -111,7 +111,7 @@ function JobsCreateContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) { ); let ownerData; - if (!!!job.ownerid) { + if (!job.ownerid) { ownerData = job.owner.data; ownerData.shopid = bodyshop.id; delete ownerData.preferred_contact; @@ -122,7 +122,7 @@ function JobsCreateContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) { delete ownerData.__typename; } if (!state.vehicle.none) { - if (!!!job.vehicleid) { + if (!job.vehicleid) { delete job.vehicleid; job.vehicle.data.shopid = bodyshop.id; job.plate_no = job.vehicle.data.plate_no; diff --git a/client/src/pages/jobs-deliver/jobs-delivery.page.container.jsx b/client/src/pages/jobs-deliver/jobs-delivery.page.container.jsx index 077c83398..6f28d4a7d 100644 --- a/client/src/pages/jobs-deliver/jobs-delivery.page.container.jsx +++ b/client/src/pages/jobs-deliver/jobs-delivery.page.container.jsx @@ -1,5 +1,5 @@ import { useQuery } from "@apollo/client"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { useParams } from "react-router-dom"; @@ -59,7 +59,7 @@ export function JobsDeliverContainer({ bodyshop, setBreadcrumbs, setSelectedHead if (loading) return ; if (error) return ; - if (data && !!!data.bodyshops_by_pk.deliverchecklist) + if (data && !data.bodyshops_by_pk.deliverchecklist) return ; return ( ; if (error) return ; - if (!!!data.jobs_by_pk) return ; + if (!data.jobs_by_pk) return ; return data.jobs_by_pk ? ( diff --git a/client/src/pages/jobs-intake/jobs-intake.page.container.jsx b/client/src/pages/jobs-intake/jobs-intake.page.container.jsx index 54a8a561d..cc96438bf 100644 --- a/client/src/pages/jobs-intake/jobs-intake.page.container.jsx +++ b/client/src/pages/jobs-intake/jobs-intake.page.container.jsx @@ -1,5 +1,5 @@ import { useQuery } from "@apollo/client"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { useParams } from "react-router-dom"; @@ -48,7 +48,7 @@ export function JobsIntakeContainer({ bodyshop, setBreadcrumbs, setSelectedHeade { link: `/manage/jobs/${jobId}`, label: t("titles.bc.jobs-detail", { - number: data && ((data.jobs_by_pk && data.jobs_by_pk.ro_number) || t("general.labels.na")) + number: data && (data.jobs_by_pk?.ro_number || t("general.labels.na")) }) }, { @@ -61,7 +61,7 @@ export function JobsIntakeContainer({ bodyshop, setBreadcrumbs, setSelectedHeade if (loading) return ; if (error) return ; - if (data && !!!data.bodyshops_by_pk.intakechecklist) + if (data && !data.bodyshops_by_pk.intakechecklist) return ; return ( @@ -82,7 +82,7 @@ export function JobsIntakeContainer({ bodyshop, setBreadcrumbs, setSelectedHeade )} diff --git a/client/src/pages/jobs-ready/jobs-ready.page.jsx b/client/src/pages/jobs-ready/jobs-ready.page.jsx index ad8d1950c..e95eea187 100644 --- a/client/src/pages/jobs-ready/jobs-ready.page.jsx +++ b/client/src/pages/jobs-ready/jobs-ready.page.jsx @@ -1,4 +1,4 @@ -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import JobDetailCards from "../../components/job-detail-cards/job-detail-cards.component"; diff --git a/client/src/pages/jobs/jobs.page.jsx b/client/src/pages/jobs/jobs.page.jsx index 08dbb2985..86d600fd8 100644 --- a/client/src/pages/jobs/jobs.page.jsx +++ b/client/src/pages/jobs/jobs.page.jsx @@ -1,4 +1,4 @@ -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import JobDetailCards from "../../components/job-detail-cards/job-detail-cards.component"; diff --git a/client/src/pages/landing/landing.page.jsx b/client/src/pages/landing/landing.page.jsx index eccc9f6aa..2e2b85005 100644 --- a/client/src/pages/landing/landing.page.jsx +++ b/client/src/pages/landing/landing.page.jsx @@ -1,4 +1,4 @@ -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { connect } from "react-redux"; import { useNavigate } from "react-router-dom"; import { createStructuredSelector } from "reselect"; diff --git a/client/src/pages/manage-root/manage-root.page.component.jsx b/client/src/pages/manage-root/manage-root.page.component.jsx index c53ddc15f..803fa4d91 100644 --- a/client/src/pages/manage-root/manage-root.page.component.jsx +++ b/client/src/pages/manage-root/manage-root.page.component.jsx @@ -1,4 +1,4 @@ -import React, { useEffect } from "react"; +import { useEffect } from "react"; //import DashboardGridComponent from "../../components/dashboard-grid/dashboard-grid.component"; import { useNavigate } from "react-router-dom"; diff --git a/client/src/pages/manage-root/manage-root.page.container.jsx b/client/src/pages/manage-root/manage-root.page.container.jsx index c8b795618..6be670633 100644 --- a/client/src/pages/manage-root/manage-root.page.container.jsx +++ b/client/src/pages/manage-root/manage-root.page.container.jsx @@ -1,21 +1,18 @@ -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { setBreadcrumbs } from "../../redux/application/application.actions"; -import { selectBodyshop } from "../../redux/user/user.selectors"; import ManageRootPageComponent from "./manage-root.page.component"; import InstanceRenderManager from "../../utils/instanceRenderMgr"; -const mapStateToProps = createStructuredSelector({ - bodyshop: selectBodyshop -}); +const mapStateToProps = createStructuredSelector({}); const mapDispatchToProps = (dispatch) => ({ setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)) }); -export function ManageRootPageContainer({ setBreadcrumbs, bodyshop }) { +export function ManageRootPageContainer({ setBreadcrumbs }) { const { t } = useTranslation(); useEffect(() => { document.title = t("titles.manageroot", { diff --git a/client/src/pages/manage/manage.page.component.jsx b/client/src/pages/manage/manage.page.component.jsx index 469911b4b..5be9d70f3 100644 --- a/client/src/pages/manage/manage.page.component.jsx +++ b/client/src/pages/manage/manage.page.component.jsx @@ -1,5 +1,5 @@ import { FloatButton, Layout, Spin } from "antd"; -import { Route, Routes, useNavigate } from "react-router-dom"; +import { Route, Routes } from "react-router-dom"; // import preval from "preval.macro"; import { lazy, Suspense, useEffect, useState } from "react"; @@ -113,7 +113,6 @@ const mapStateToProps = createStructuredSelector({ export function Manage({ conflict, bodyshop, partsManagementOnly }) { const { t } = useTranslation(); const [chatVisible] = useState(false); - const navigate = useNavigate(); // Centralized alerts handling (fetch + dedupe + notifications) useAlertsNotifications(); diff --git a/client/src/pages/manage/manage.page.container.jsx b/client/src/pages/manage/manage.page.container.jsx index 5b56bc49a..8e2977dc9 100644 --- a/client/src/pages/manage/manage.page.container.jsx +++ b/client/src/pages/manage/manage.page.container.jsx @@ -1,5 +1,5 @@ import { useQuery } from "@apollo/client"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import AlertComponent from "../../components/alert/alert.component"; diff --git a/client/src/pages/owners-detail/owners-detail.page.component.jsx b/client/src/pages/owners-detail/owners-detail.page.component.jsx index 63d3d09e8..3f9da92d9 100644 --- a/client/src/pages/owners-detail/owners-detail.page.component.jsx +++ b/client/src/pages/owners-detail/owners-detail.page.component.jsx @@ -1,5 +1,4 @@ import { Col, Divider, Row } from "antd"; -import React from "react"; import OwnerDetailForm from "../../components/owner-detail-form/owner-detail-form.container"; import OwnerDetailJobsComponent from "../../components/owner-detail-jobs/owner-detail-jobs.component"; diff --git a/client/src/pages/owners-detail/owners-detail.page.container.jsx b/client/src/pages/owners-detail/owners-detail.page.container.jsx index f10792fba..431e06bd1 100644 --- a/client/src/pages/owners-detail/owners-detail.page.container.jsx +++ b/client/src/pages/owners-detail/owners-detail.page.container.jsx @@ -1,5 +1,5 @@ import { useQuery } from "@apollo/client"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { useParams } from "react-router-dom"; @@ -57,7 +57,7 @@ export function OwnersDetailContainer({ setBreadcrumbs, addRecentItem, setSelect if (loading) return ; if (error) return ; - if (!!!data.owners_by_pk) return ; + if (!data.owners_by_pk) return ; return ( diff --git a/client/src/pages/owners/owners.page.component.jsx b/client/src/pages/owners/owners.page.component.jsx index 2a975c373..cf04735fa 100644 --- a/client/src/pages/owners/owners.page.component.jsx +++ b/client/src/pages/owners/owners.page.component.jsx @@ -1,4 +1,3 @@ -import React from "react"; import OwnersListContainer from "../../components/owners-list/owners-list.container"; export default function OwnersPageComponent() { diff --git a/client/src/pages/owners/owners.page.container.jsx b/client/src/pages/owners/owners.page.container.jsx index ab380db42..1d0a9ce75 100644 --- a/client/src/pages/owners/owners.page.container.jsx +++ b/client/src/pages/owners/owners.page.container.jsx @@ -1,4 +1,4 @@ -import React, { useEffect } from "react"; +import { useEffect } from "react"; import OwnersPageComponent from "./owners.page.component"; import { useTranslation } from "react-i18next"; import { setBreadcrumbs, setSelectedHeader } from "../../redux/application/application.actions"; diff --git a/client/src/pages/parts-queue/parts-queue.page.container.jsx b/client/src/pages/parts-queue/parts-queue.page.container.jsx index a4ed6d442..3998b9409 100644 --- a/client/src/pages/parts-queue/parts-queue.page.container.jsx +++ b/client/src/pages/parts-queue/parts-queue.page.container.jsx @@ -1,4 +1,4 @@ -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import PartsQueueDetailCard from "../../components/parts-queue-card/parts-queue-card.component"; diff --git a/client/src/pages/phonebook/phonebook.page.component.jsx b/client/src/pages/phonebook/phonebook.page.component.jsx index c52283e1a..023d3ad5e 100644 --- a/client/src/pages/phonebook/phonebook.page.component.jsx +++ b/client/src/pages/phonebook/phonebook.page.component.jsx @@ -3,7 +3,6 @@ import { useQuery } from "@apollo/client"; import { Button, Card, Input, Space, Table, Typography } from "antd"; import _ from "lodash"; import queryString from "query-string"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { useLocation, useNavigate } from "react-router-dom"; @@ -95,13 +94,13 @@ export function PhonebookPageComponent({ bodyshop, authLevel }) { title: t("phonebook.fields.phone1"), dataIndex: "phone1", key: "phone1", - render: (text, record) => + render: (text) => }, { title: t("phonebook.fields.phone2"), dataIndex: "phone2", key: "phone2", - render: (text, record) => + render: (text) => }, { title: t("phonebook.fields.address1"), @@ -179,12 +178,12 @@ export function PhonebookPageComponent({ bodyshop, authLevel }) { pagination={{ position: "top", pageSize: pageLimit, - current: parseInt(page || 1), + current: parseInt(page || 1, 10), total: data && data.search_phonebook_aggregate.aggregate.count }} columns={columns} rowKey="id" - dataSource={data && data.search_phonebook} + dataSource={data?.search_phonebook} //scroll={{ x: true }} onChange={handleTableChange} rowSelection={{ @@ -192,9 +191,9 @@ export function PhonebookPageComponent({ bodyshop, authLevel }) { type: "radio", selectedRowKeys: [phonebookentry] }} - onRow={(record, rowIndex) => { + onRow={(record) => { return { - onClick: (event) => { + onClick: () => { handleOnRowClick(record); } }; diff --git a/client/src/pages/phonebook/phonebook.page.container.jsx b/client/src/pages/phonebook/phonebook.page.container.jsx index b71e06bf4..6fdb996d0 100644 --- a/client/src/pages/phonebook/phonebook.page.container.jsx +++ b/client/src/pages/phonebook/phonebook.page.container.jsx @@ -1,4 +1,4 @@ -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component"; diff --git a/client/src/pages/production-board/production-board.component.jsx b/client/src/pages/production-board/production-board.component.jsx index e5dfe7dff..6d4f7b806 100644 --- a/client/src/pages/production-board/production-board.component.jsx +++ b/client/src/pages/production-board/production-board.component.jsx @@ -1,14 +1,14 @@ -import React from "react"; import ProductionBoardKanbanContainer from "../../components/production-board-kanban/production-board-kanban.container"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { selectBodyshop } from "../../redux/user/user.selectors"; import { useSplitTreatments } from "@splitsoftware/splitio-react"; + const mapStateToProps = createStructuredSelector({ //currentUser: selectCurrentUser bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(ProductionBoardComponent); @@ -19,7 +19,7 @@ export function ProductionBoardComponent({ bodyshop }) { } = useSplitTreatments({ attributes: {}, names: ["Production_Use_View"], - splitKey: bodyshop && bodyshop.imexshopid + splitKey: bodyshop?.imexshopid }); return ; diff --git a/client/src/pages/production-board/production-board.container.jsx b/client/src/pages/production-board/production-board.container.jsx index 0e80a5dd4..d57802c6e 100644 --- a/client/src/pages/production-board/production-board.container.jsx +++ b/client/src/pages/production-board/production-board.container.jsx @@ -1,5 +1,5 @@ import { Card } from "antd"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -7,20 +7,17 @@ import FeatureWrapper from "../../components/feature-wrapper/feature-wrapper.com import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component"; import UpsellComponent, { upsellEnum } from "../../components/upsell/upsell.component"; import { setBreadcrumbs, setSelectedHeader } from "../../redux/application/application.actions"; -import { selectBodyshop } from "../../redux/user/user.selectors"; import InstanceRenderManager from "../../utils/instanceRenderMgr"; import ProductionBoardComponent from "./production-board.component"; -const mapStateToProps = createStructuredSelector({ - bodyshop: selectBodyshop -}); +const mapStateToProps = createStructuredSelector({}); const mapDispatchToProps = (dispatch) => ({ setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)), setSelectedHeader: (key) => dispatch(setSelectedHeader(key)) }); -export function ProductionBoardContainer({ setBreadcrumbs, bodyshop, setSelectedHeader }) { +export function ProductionBoardContainer({ setBreadcrumbs, setSelectedHeader }) { const { t } = useTranslation(); useEffect(() => { diff --git a/client/src/pages/production-list/production-list.component.jsx b/client/src/pages/production-list/production-list.component.jsx index aa6e4e1b1..9c924c647 100644 --- a/client/src/pages/production-list/production-list.component.jsx +++ b/client/src/pages/production-list/production-list.component.jsx @@ -1,4 +1,3 @@ -import React from "react"; import NoteUpsertModal from "../../components/note-upsert-modal/note-upsert-modal.container"; import ProductionListTable from "../../components/production-list-table/production-list-table.container"; @@ -6,10 +5,11 @@ import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { selectBodyshop } from "../../redux/user/user.selectors"; import { useSplitTreatments } from "@splitsoftware/splitio-react"; + const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(ProductionListComponent); @@ -20,7 +20,7 @@ export function ProductionListComponent({ bodyshop }) { } = useSplitTreatments({ attributes: {}, names: ["Production_Use_View"], - splitKey: bodyshop && bodyshop.imexshopid + splitKey: bodyshop?.imexshopid }); return ( diff --git a/client/src/pages/production-list/production-list.container.jsx b/client/src/pages/production-list/production-list.container.jsx index f87364e7d..cd804aae6 100644 --- a/client/src/pages/production-list/production-list.container.jsx +++ b/client/src/pages/production-list/production-list.container.jsx @@ -1,4 +1,4 @@ -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component"; diff --git a/client/src/pages/profile/profile.container.page.jsx b/client/src/pages/profile/profile.container.page.jsx index 05f4172ba..cb30bb8b7 100644 --- a/client/src/pages/profile/profile.container.page.jsx +++ b/client/src/pages/profile/profile.container.page.jsx @@ -1,4 +1,4 @@ -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { setBreadcrumbs, setSelectedHeader } from "../../redux/application/application.actions"; @@ -18,8 +18,7 @@ export function ProfileContainerPage({ setBreadcrumbs, setSelectedHeader }) { document.title = t("titles.profile", { app: InstanceRenderManager({ imex: "$t(titles.imexonline)", - rome: "$t(titles.romeonline)", - + rome: "$t(titles.romeonline)" }) }); }, [t, setBreadcrumbs, setSelectedHeader]); diff --git a/client/src/pages/profile/profile.page.jsx b/client/src/pages/profile/profile.page.jsx index 3d897eda8..03f201e44 100644 --- a/client/src/pages/profile/profile.page.jsx +++ b/client/src/pages/profile/profile.page.jsx @@ -1,5 +1,4 @@ import { Row } from "antd"; -import React from "react"; import ProfileMyComponent from "../../components/profile-my/profile-my.component"; import ProfileShopsContainer from "../../components/profile-shops/profile-shops.container"; diff --git a/client/src/pages/reset-password/reset-password.component.jsx b/client/src/pages/reset-password/reset-password.component.jsx index 74e07d2a5..fa78fec86 100644 --- a/client/src/pages/reset-password/reset-password.component.jsx +++ b/client/src/pages/reset-password/reset-password.component.jsx @@ -1,4 +1,3 @@ -import React from "react"; 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"; diff --git a/client/src/pages/shift-clock/shift-clock.page.jsx b/client/src/pages/shift-clock/shift-clock.page.jsx index 1e8ed0609..312e3a85f 100644 --- a/client/src/pages/shift-clock/shift-clock.page.jsx +++ b/client/src/pages/shift-clock/shift-clock.page.jsx @@ -1,4 +1,3 @@ -import React from "react"; import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component"; import TimeTicketShift from "../../components/time-ticket-shift/time-ticket-shift.container"; import FeatureWrapperComponent from "../../components/feature-wrapper/feature-wrapper.component"; diff --git a/client/src/pages/shop-csi/shop-csi.container.page.jsx b/client/src/pages/shop-csi/shop-csi.container.page.jsx index fe6e6cf02..abc6e51b4 100644 --- a/client/src/pages/shop-csi/shop-csi.container.page.jsx +++ b/client/src/pages/shop-csi/shop-csi.container.page.jsx @@ -1,6 +1,6 @@ import { useQuery } from "@apollo/client"; import { Card, Col, Row } from "antd"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; diff --git a/client/src/pages/shop-vendor/shop-vendor.page.component.jsx b/client/src/pages/shop-vendor/shop-vendor.page.component.jsx index a4d5f3186..278266eb6 100644 --- a/client/src/pages/shop-vendor/shop-vendor.page.component.jsx +++ b/client/src/pages/shop-vendor/shop-vendor.page.component.jsx @@ -1,5 +1,4 @@ import { Drawer, Grid } from "antd"; -import React from "react"; import { useNavigate, useSearchParams } from "react-router-dom"; import VendorsFormContainer from "../../components/vendors-form/vendors-form.container"; import VendorsListContainer from "../../components/vendors-list/vendors-list.container"; diff --git a/client/src/pages/shop-vendor/shop-vendor.page.container.jsx b/client/src/pages/shop-vendor/shop-vendor.page.container.jsx index 20c4da53c..2f725eb28 100644 --- a/client/src/pages/shop-vendor/shop-vendor.page.container.jsx +++ b/client/src/pages/shop-vendor/shop-vendor.page.container.jsx @@ -1,4 +1,4 @@ -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component"; import ShopVendorPageComponent from "./shop-vendor.page.component"; diff --git a/client/src/pages/shop/shop.page.component.jsx b/client/src/pages/shop/shop.page.component.jsx index f26f06d5a..123ad96e9 100644 --- a/client/src/pages/shop/shop.page.component.jsx +++ b/client/src/pages/shop/shop.page.component.jsx @@ -1,6 +1,6 @@ import { Tabs } from "antd"; import queryString from "query-string"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { useLocation, useNavigate } from "react-router-dom"; @@ -100,7 +100,7 @@ export function ShopPage({ bodyshop, setSelectedHeader, setBreadcrumbs }) { children: }); } - + return ( history({ search: `?tab=${key}` })} items={items} /> diff --git a/client/src/pages/sign-in/sign-in.page.jsx b/client/src/pages/sign-in/sign-in.page.jsx index 973b853d6..c42bf4c4b 100644 --- a/client/src/pages/sign-in/sign-in.page.jsx +++ b/client/src/pages/sign-in/sign-in.page.jsx @@ -1,4 +1,3 @@ -import React from "react"; import SignIn from "../../components/sign-in-form/sign-in-form.component"; export default function SignInPage() { diff --git a/client/src/pages/simplified-parts-jobs-detail/simplified-parts-jobs-detail.component.jsx b/client/src/pages/simplified-parts-jobs-detail/simplified-parts-jobs-detail.component.jsx index 750566a7a..997865209 100644 --- a/client/src/pages/simplified-parts-jobs-detail/simplified-parts-jobs-detail.component.jsx +++ b/client/src/pages/simplified-parts-jobs-detail/simplified-parts-jobs-detail.component.jsx @@ -17,13 +17,10 @@ import JobsDetailHeaderActions from "../../components/jobs-detail-header-actions import JobsDetailHeader from "../../components/jobs-detail-header/jobs-detail-header.component.jsx"; import JobsDetailPliContainer from "../../components/jobs-detail-pli/jobs-detail-pli.container.jsx"; import { QUERY_PARTS_BILLS_BY_JOBID } from "../../graphql/bills.queries.js"; -import { insertAuditTrail } from "../../redux/application/application.actions.js"; import { selectIsPartsEntry, selectJobReadOnly } from "../../redux/application/application.selectors.js"; import { setModalContext } from "../../redux/modals/modals.actions.js"; -import { selectBodyshop } from "../../redux/user/user.selectors.js"; const mapStateToProps = createStructuredSelector({ - bodyshop: selectBodyshop, jobRO: selectJobReadOnly, isPartsEntry: selectIsPartsEntry }); @@ -34,27 +31,10 @@ const mapDispatchToProps = (dispatch) => ({ context: context, modal: "printCenter" }) - ), - insertAuditTrail: ({ jobid, operation, type }) => - dispatch( - insertAuditTrail({ - jobid, - operation, - type - }) ) }); -export function SimplifiedPartsJobDetailComponent({ - bodyshop, - setPrintCenterContext, - jobRO, - job, - mutationUpdateJob, - insertAuditTrail, - refetch, - isPartsEntry -}) { +export function SimplifiedPartsJobDetailComponent({ setPrintCenterContext, jobRO, job, refetch, isPartsEntry }) { const { t } = useTranslation(); const [form] = Form.useForm(); const history = useNavigate(); diff --git a/client/src/pages/tech-assigned-prod-jobs/tech-assigned-prod-jobs.component.jsx b/client/src/pages/tech-assigned-prod-jobs/tech-assigned-prod-jobs.component.jsx index 26c01afb8..1849b9b63 100644 --- a/client/src/pages/tech-assigned-prod-jobs/tech-assigned-prod-jobs.component.jsx +++ b/client/src/pages/tech-assigned-prod-jobs/tech-assigned-prod-jobs.component.jsx @@ -1,5 +1,5 @@ import { useQuery } from "@apollo/client"; -import React, { useState } from "react"; +import { useState } from "react"; import { Button, Card, Input, Space, Table } from "antd"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; diff --git a/client/src/pages/tech-dispatched-parts/tech-dispatched-parts.page.jsx b/client/src/pages/tech-dispatched-parts/tech-dispatched-parts.page.jsx index ebf54a096..59aef669e 100644 --- a/client/src/pages/tech-dispatched-parts/tech-dispatched-parts.page.jsx +++ b/client/src/pages/tech-dispatched-parts/tech-dispatched-parts.page.jsx @@ -2,7 +2,6 @@ import { MinusCircleTwoTone, PlusCircleTwoTone, SyncOutlined } from "@ant-design import { useQuery } from "@apollo/client"; import { Button, Card, Space, Table } from "antd"; import queryString from "query-string"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { useLocation, useNavigate } from "react-router-dom"; @@ -20,7 +19,7 @@ const mapStateToProps = createStructuredSelector({ technician: selectTechnician, bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({}); +const mapDispatchToProps = () => ({}); export function TechDispatchedParts({ technician, bodyshop }) { const searchParams = queryString.parse(useLocation().search); @@ -83,12 +82,20 @@ export function TechDispatchedParts({ technician, bodyshop }) { title: t("general.labels.actions"), dataIndex: "actions", key: "actions", - render: (text, record) => + render: () => ( + + ) } ] : []) ]; - const handleTableChange = (pagination, filters, sorter) => { + const handleTableChange = (pagination) => { searchParams.page = pagination.current; history({ search: queryString.stringify(searchParams) }); }; @@ -107,7 +114,7 @@ export function TechDispatchedParts({ technician, bodyshop }) { loading={loading} pagination={{ pageSize: 25, - current: parseInt(page || 1), + current: parseInt(page || 1, 10), total: data ? data.parts_dispatch_aggregate.aggregate.count : 0, showSizeChanger: false }} @@ -118,7 +125,7 @@ export function TechDispatchedParts({ technician, bodyshop }) { onChange={handleTableChange} expandable={{ expandedRowRender: (record) => , - rowExpandable: (record) => true, + rowExpandable: () => true, //expandRowByClick: true, expandIcon: ({ expanded, onExpand, record }) => expanded ? ( diff --git a/client/src/pages/tech-job-clock/tech-job-clock.component.jsx b/client/src/pages/tech-job-clock/tech-job-clock.component.jsx index 98b4e9bf2..e68076438 100644 --- a/client/src/pages/tech-job-clock/tech-job-clock.component.jsx +++ b/client/src/pages/tech-job-clock/tech-job-clock.component.jsx @@ -1,5 +1,5 @@ import { Divider } from "antd"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import TechClockInFormContainer from "../../components/tech-job-clock-in-form/tech-job-clock-in-form.container"; import TechClockedInList from "../../components/tech-job-clocked-in-list/tech-job-clocked-in-list.component"; diff --git a/client/src/pages/tech-lookup/tech-lookup.container.jsx b/client/src/pages/tech-lookup/tech-lookup.container.jsx index 74cbd1300..c0ad94cb5 100644 --- a/client/src/pages/tech-lookup/tech-lookup.container.jsx +++ b/client/src/pages/tech-lookup/tech-lookup.container.jsx @@ -1,4 +1,4 @@ -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import RbacWrapperComponent from "../../components/rbac-wrapper/rbac-wrapper.component"; import TechLookupJobsList from "../../components/tech-lookup-jobs-list/tech-lookup-jobs-list.component"; diff --git a/client/src/pages/tech-shift-clock/tech-shift-clock.component.jsx b/client/src/pages/tech-shift-clock/tech-shift-clock.component.jsx index 85237280e..d1618053b 100644 --- a/client/src/pages/tech-shift-clock/tech-shift-clock.component.jsx +++ b/client/src/pages/tech-shift-clock/tech-shift-clock.component.jsx @@ -1,4 +1,4 @@ -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import TimeTicketShift from "../../components/time-ticket-shift/time-ticket-shift.container"; import InstanceRenderManager from "../../utils/instanceRenderMgr"; diff --git a/client/src/pages/tech/tech.page.container.jsx b/client/src/pages/tech/tech.page.container.jsx index 70c0e638b..c026e9270 100644 --- a/client/src/pages/tech/tech.page.container.jsx +++ b/client/src/pages/tech/tech.page.container.jsx @@ -1,5 +1,5 @@ import { useQuery } from "@apollo/client"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { connect } from "react-redux"; import AlertComponent from "../../components/alert/alert.component"; import { QUERY_BODYSHOP } from "../../graphql/bodyshop.queries"; diff --git a/client/src/pages/temporary-docs/temporary-docs.component.jsx b/client/src/pages/temporary-docs/temporary-docs.component.jsx index 26948d7a4..939cc7131 100644 --- a/client/src/pages/temporary-docs/temporary-docs.component.jsx +++ b/client/src/pages/temporary-docs/temporary-docs.component.jsx @@ -1,5 +1,4 @@ import { useQuery } from "@apollo/client"; -import React from "react"; import AlertComponent from "../../components/alert/alert.component"; import JobsDocumentsContainer from "../../components/jobs-documents-gallery/jobs-documents-gallery.container"; import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component"; @@ -14,7 +13,7 @@ import { selectBodyshop } from "../../redux/user/user.selectors"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(TemporaryDocsComponent); @@ -25,7 +24,7 @@ export function TemporaryDocsComponent({ bodyshop }) { } = useSplitTreatments({ attributes: {}, names: ["Imgproxy"], - splitKey: bodyshop && bodyshop.imexshopid + splitKey: bodyshop?.imexshopid }); const { loading, error, data, refetch } = useQuery(QUERY_TEMPORARY_DOCS, { @@ -41,14 +40,12 @@ export function TemporaryDocsComponent({ bodyshop }) { return ; } return ( - <> - - + ); } diff --git a/client/src/pages/temporary-docs/temporary-docs.container.jsx b/client/src/pages/temporary-docs/temporary-docs.container.jsx index 44d848230..a16c21d75 100644 --- a/client/src/pages/temporary-docs/temporary-docs.container.jsx +++ b/client/src/pages/temporary-docs/temporary-docs.container.jsx @@ -1,4 +1,4 @@ -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; diff --git a/client/src/pages/time-tickets/time-tickets.container.jsx b/client/src/pages/time-tickets/time-tickets.container.jsx index f1492a9d9..49d048f9c 100644 --- a/client/src/pages/time-tickets/time-tickets.container.jsx +++ b/client/src/pages/time-tickets/time-tickets.container.jsx @@ -1,7 +1,7 @@ import { useQuery } from "@apollo/client"; import { Card, Col, Row, Space } from "antd"; import dayjs from "../../utils/day"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { useSearchParams } from "react-router-dom"; diff --git a/client/src/pages/tt-approvals/tt-approvals.page.container.jsx b/client/src/pages/tt-approvals/tt-approvals.page.container.jsx index 530a04503..76681a88b 100644 --- a/client/src/pages/tt-approvals/tt-approvals.page.container.jsx +++ b/client/src/pages/tt-approvals/tt-approvals.page.container.jsx @@ -1,4 +1,4 @@ -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; diff --git a/client/src/pages/vehicles-detail/vehicles-detail.page.component.jsx b/client/src/pages/vehicles-detail/vehicles-detail.page.component.jsx index 6f8489f62..8379f2c95 100644 --- a/client/src/pages/vehicles-detail/vehicles-detail.page.component.jsx +++ b/client/src/pages/vehicles-detail/vehicles-detail.page.component.jsx @@ -1,5 +1,4 @@ import { Col, Divider, Row } from "antd"; -import React from "react"; import VehicleDetailFormContainer from "../../components/vehicle-detail-form/vehicle-detail-form.container"; import VehicleDetailJobsComponent from "../../components/vehicle-detail-jobs/vehicle-detail-jobs.component"; diff --git a/client/src/pages/vehicles/vehicles.page.component.jsx b/client/src/pages/vehicles/vehicles.page.component.jsx index 706a37a13..3d2c90719 100644 --- a/client/src/pages/vehicles/vehicles.page.component.jsx +++ b/client/src/pages/vehicles/vehicles.page.component.jsx @@ -1,4 +1,3 @@ -import React from "react"; import VehiclesListContainer from "../../components/vehicles-list/vehicles-list.container"; export default function VehiclesPageComponent() { diff --git a/client/src/redux/application/application.sagas.js b/client/src/redux/application/application.sagas.js index a37475325..c86fe3f35 100644 --- a/client/src/redux/application/application.sagas.js +++ b/client/src/redux/application/application.sagas.js @@ -261,7 +261,7 @@ export function* insertAuditTrailSaga({ payload: { jobid, billid, operation, typ update(cache, { data }) { cache.modify({ fields: { - audit_trail(existingAuditTrail, { readField }) { + audit_trail(existingAuditTrail) { const newAuditTrail = cache.writeQuery({ data: data, query: INSERT_AUDIT_TRAIL, diff --git a/client/src/redux/email/email.actions.js b/client/src/redux/email/email.actions.js index 174763bf6..8b1f846c4 100644 --- a/client/src/redux/email/email.actions.js +++ b/client/src/redux/email/email.actions.js @@ -14,7 +14,7 @@ export const sendEmail = (email) => ({ payload: email }); -export const sendEmailSuccess = (options) => ({ +export const sendEmailSuccess = () => ({ type: EmailActionTypes.SEND_EMAIL_SUCCESS }); diff --git a/client/src/redux/user/user.reducer.js b/client/src/redux/user/user.reducer.js index 89d489f3a..99e07db3e 100644 --- a/client/src/redux/user/user.reducer.js +++ b/client/src/redux/user/user.reducer.js @@ -72,7 +72,7 @@ const userReducer = (state = INITIAL_STATE, action) => { currentUser: { ...state.currentUser, eulaIsAccepted: true }, currentEula: null }; - case UserActionTypes.SIGN_IN_SUCCESS: + case UserActionTypes.SIGN_IN_SUCCESS: { const { currentEula, ...currentUser } = action.payload; return { ...state, @@ -81,6 +81,7 @@ const userReducer = (state = INITIAL_STATE, action) => { currentEula, error: null }; + } case UserActionTypes.SIGN_OUT_SUCCESS: return { ...state, diff --git a/client/src/redux/user/user.sagas.js b/client/src/redux/user/user.sagas.js index 8076105c3..330471757 100644 --- a/client/src/redux/user/user.sagas.js +++ b/client/src/redux/user/user.sagas.js @@ -137,7 +137,7 @@ export function* signOutStart() { imexshopid: state.user.bodyshop.imexshopid, type: "messaging" }); - } catch (error) { + } catch { console.log("No FCM token. Skipping unsubscribe."); } @@ -162,7 +162,7 @@ export function* updateUserDetails(userDetails) { type: "success", message: i18next.t("profile.successes.updated") }); - } catch (error) { + } catch { //yield put(signOutFailure(error.message)); } } @@ -277,7 +277,7 @@ export function* signInSuccessSaga({ payload }) { if (isParts) { window.$crisp.push(["do", "chat:hide"]); } - } catch (e) { + } catch { // no-op } } catch (error) { diff --git a/client/src/translations/i18n.js b/client/src/translations/i18n.js index db77ab567..6d4a54336 100644 --- a/client/src/translations/i18n.js +++ b/client/src/translations/i18n.js @@ -33,7 +33,7 @@ i18n skipOnVariables: false } }, - (error) => { + () => { GenerateTemplates(); } ); diff --git a/client/src/utils/Ciecaselect.jsx b/client/src/utils/Ciecaselect.jsx index 3d0bc454b..5d4bea6ef 100644 --- a/client/src/utils/Ciecaselect.jsx +++ b/client/src/utils/Ciecaselect.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Select } from "antd"; import i18n from "../translations/i18n"; diff --git a/client/src/utils/CurrencyFormatter.jsx b/client/src/utils/CurrencyFormatter.jsx index 5510b8789..06cad4146 100644 --- a/client/src/utils/CurrencyFormatter.jsx +++ b/client/src/utils/CurrencyFormatter.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { NumericFormat } from "react-number-format"; export default function CurrencyFormatter(props) { diff --git a/client/src/utils/GraphQLClient.js b/client/src/utils/GraphQLClient.js index ce1b6b436..53ed59a58 100644 --- a/client/src/utils/GraphQLClient.js +++ b/client/src/utils/GraphQLClient.js @@ -49,7 +49,7 @@ const roundTripLink = new ApolloLink((operation, forward) => { }); }); -const TrackExecutionTime = async (operationName, time) => { +const TrackExecutionTime = async () => { // if (process.env.NODE_ENV === "development") return; // const rdxStore = store.getState(); // try { @@ -130,7 +130,7 @@ const retryLink = new RetryLink({ }, attempts: { max: 5, - retryIf: (error, _operation) => !!error + retryIf: (error) => !!error } }); diff --git a/client/src/utils/PhoneFormatter.jsx b/client/src/utils/PhoneFormatter.jsx index c861951e6..0e99308cc 100644 --- a/client/src/utils/PhoneFormatter.jsx +++ b/client/src/utils/PhoneFormatter.jsx @@ -1,6 +1,5 @@ //import NumberFormat from "react-number-format"; import parsePhoneNumber from "libphonenumber-js"; -import React from "react"; export default function PhoneNumberFormatter(props) { const p = parsePhoneNumber(props.children || "", "CA"); diff --git a/client/src/utils/RegisterSw.js b/client/src/utils/RegisterSw.js index 8660f2721..6f31caf9e 100644 --- a/client/src/utils/RegisterSw.js +++ b/client/src/utils/RegisterSw.js @@ -1,7 +1,6 @@ import { AlertOutlined } from "@ant-design/icons"; import { Button, notification, Space } from "antd"; import i18n from "i18next"; -import React from "react"; import * as serviceWorkerRegistration from "../serviceWorkerRegistration"; import { store } from "../redux/store"; import InstanceRenderManager from "./instanceRenderMgr"; @@ -13,10 +12,7 @@ const onServiceWorkerUpdate = (registration) => {
diff --git a/client/src/components/schedule-verify-integrity/schedule-verify-integrity.component.jsx b/client/src/components/schedule-verify-integrity/schedule-verify-integrity.component.jsx index 83693df19..0ef5c7110 100644 --- a/client/src/components/schedule-verify-integrity/schedule-verify-integrity.component.jsx +++ b/client/src/components/schedule-verify-integrity/schedule-verify-integrity.component.jsx @@ -1,7 +1,7 @@ import { useApolloClient } from "@apollo/client"; import { Button } from "antd"; import dayjs from "../../utils/day"; -import React, { useState } from "react"; +import { useState } from "react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { QUERY_SCHEDULE_LOAD_DATA } from "../../graphql/appointments.queries"; @@ -10,7 +10,7 @@ import { selectCurrentUser } from "../../redux/user/user.selectors"; const mapStateToProps = createStructuredSelector({ currentUser: selectCurrentUser }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(ScheduleVerifyIntegrity); diff --git a/client/src/components/scoreboard-day-stats/scoreboard-day-stats.component.jsx b/client/src/components/scoreboard-day-stats/scoreboard-day-stats.component.jsx index 31d18a594..a1f8d9720 100644 --- a/client/src/components/scoreboard-day-stats/scoreboard-day-stats.component.jsx +++ b/client/src/components/scoreboard-day-stats/scoreboard-day-stats.component.jsx @@ -1,6 +1,5 @@ import { Card, Divider, Statistic } from "antd"; import dayjs from "../../utils/day"; -import React from "react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { selectBodyshop } from "../../redux/user/user.selectors"; @@ -8,7 +7,7 @@ import { selectBodyshop } from "../../redux/user/user.selectors"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); diff --git a/client/src/components/scoreboard-entry-edit/scoreboard-entry-edit.component.jsx b/client/src/components/scoreboard-entry-edit/scoreboard-entry-edit.component.jsx index d3fc83c6f..ebde42e0e 100644 --- a/client/src/components/scoreboard-entry-edit/scoreboard-entry-edit.component.jsx +++ b/client/src/components/scoreboard-entry-edit/scoreboard-entry-edit.component.jsx @@ -1,7 +1,7 @@ import { useMutation } from "@apollo/client"; import { Button, Card, Dropdown, Form, InputNumber, Space } from "antd"; import dayjs from "../../utils/day"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { UPDATE_SCOREBOARD_ENTRY } from "../../graphql/scoreboard.queries"; import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component.jsx"; @@ -21,7 +21,7 @@ export default function ScoreboardEntryEdit({ entry }) { variables: { sbId: entry.id, sbInput: values } }); - if (!!result.errors) { + if (result.errors) { notification["error"]({ message: t("scoreboard.errors.updating", { message: JSON.stringify(result.errors) diff --git a/client/src/components/scoreboard-jobs-list/scoreboard-jobs-list.component.jsx b/client/src/components/scoreboard-jobs-list/scoreboard-jobs-list.component.jsx index 59ba3feb3..d90a35b24 100644 --- a/client/src/components/scoreboard-jobs-list/scoreboard-jobs-list.component.jsx +++ b/client/src/components/scoreboard-jobs-list/scoreboard-jobs-list.component.jsx @@ -1,7 +1,7 @@ import { SyncOutlined } from "@ant-design/icons"; import { useQuery } from "@apollo/client"; import { Button, Card, Input, Modal, Space, Table, Typography } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { Link } from "react-router-dom"; import { QUERY_SCOREBOARD_PAGINATED } from "../../graphql/scoreboard.queries"; @@ -13,7 +13,7 @@ import OwnerNameDisplay, { OwnerNameDisplayFunction } from "../owner-name-displa import ScoreboardEntryEdit from "../scoreboard-entry-edit/scoreboard-entry-edit.component"; import ScoreboardRemoveButton from "../scoreboard-remove-button/scorebard-remove-button.component"; -export default function ScoreboardJobsList({ scoreBoardlist }) { +export default function ScoreboardJobsList() { const { t } = useTranslation(); const [state, setState] = useState({ open: false, diff --git a/client/src/components/scoreboard-remove-button/scorebard-remove-button.component.jsx b/client/src/components/scoreboard-remove-button/scorebard-remove-button.component.jsx index 3864ad57d..bc5dc660a 100644 --- a/client/src/components/scoreboard-remove-button/scorebard-remove-button.component.jsx +++ b/client/src/components/scoreboard-remove-button/scorebard-remove-button.component.jsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { Button } from "antd"; import { DeleteFilled } from "@ant-design/icons"; @@ -24,7 +24,7 @@ export default function ScoreboardRemoveButton({ scoreboardId }) { refetchQueries: ["QUERY_SCOREBOARD_PAGINATED"] }); - if (!!result.errors) { + if (result.errors) { notification["error"]({ message: t("scoreboard.errors.removing", { message: JSON.stringify(result.errors) diff --git a/client/src/components/scoreboard-timetickets-stats/scoreboard-timetickets.chart.component.jsx b/client/src/components/scoreboard-timetickets-stats/scoreboard-timetickets.chart.component.jsx index 45a43940d..9adca093b 100644 --- a/client/src/components/scoreboard-timetickets-stats/scoreboard-timetickets.chart.component.jsx +++ b/client/src/components/scoreboard-timetickets-stats/scoreboard-timetickets.chart.component.jsx @@ -1,5 +1,4 @@ import { Card } from "antd"; -import React from "react"; import { Area, CartesianGrid, ComposedChart, Legend, Line, ResponsiveContainer, Tooltip, XAxis, YAxis } from "recharts"; import CustomTooltip from "./chart-custom-tooltip"; diff --git a/client/src/components/scoreboard-timetickets-stats/scoreboard-timetickets.component.jsx b/client/src/components/scoreboard-timetickets-stats/scoreboard-timetickets.component.jsx index 07e77d479..ef5cc0b4a 100644 --- a/client/src/components/scoreboard-timetickets-stats/scoreboard-timetickets.component.jsx +++ b/client/src/components/scoreboard-timetickets-stats/scoreboard-timetickets.component.jsx @@ -1,7 +1,7 @@ import { useQuery } from "@apollo/client"; import { Col, Row } from "antd"; import _ from "lodash"; -import React, { useMemo } from "react"; +import { useMemo } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -19,7 +19,7 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(ScoreboardTimeTicketsStats); @@ -86,7 +86,7 @@ export function ScoreboardTimeTicketsStats({ bodyshop }) { }, fetchPolicy: "network-only", nextFetchPolicy: "network-only", - pollInterval: 60000*5, + pollInterval: 60000 * 5, skip: !fixedPeriods }); diff --git a/client/src/components/scoreboard-timetickets-stats/scoreboard-timetickets.stats.component.jsx b/client/src/components/scoreboard-timetickets-stats/scoreboard-timetickets.stats.component.jsx index 9a3682161..c7b623d04 100644 --- a/client/src/components/scoreboard-timetickets-stats/scoreboard-timetickets.stats.component.jsx +++ b/client/src/components/scoreboard-timetickets-stats/scoreboard-timetickets.stats.component.jsx @@ -1,6 +1,6 @@ import { Card, Col, Form, Row, Space, Statistic, Switch, Typography } from "antd"; import dayjs from "../../utils/day"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -11,7 +11,7 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(ScoreboardTicketsStats); diff --git a/client/src/components/scoreboard-timetickets-stats/scoreboard-timetickets.targets-table.component.jsx b/client/src/components/scoreboard-timetickets-stats/scoreboard-timetickets.targets-table.component.jsx index 7988e69b0..e34af3c44 100644 --- a/client/src/components/scoreboard-timetickets-stats/scoreboard-timetickets.targets-table.component.jsx +++ b/client/src/components/scoreboard-timetickets-stats/scoreboard-timetickets.targets-table.component.jsx @@ -10,7 +10,7 @@ import * as Util from "../scoreboard-targets-table/scoreboard-targets-table.util const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); diff --git a/client/src/components/scoreboard-timetickets/scoreboard-timetickets.bar.component.jsx b/client/src/components/scoreboard-timetickets/scoreboard-timetickets.bar.component.jsx index f68b779f9..545d73472 100644 --- a/client/src/components/scoreboard-timetickets/scoreboard-timetickets.bar.component.jsx +++ b/client/src/components/scoreboard-timetickets/scoreboard-timetickets.bar.component.jsx @@ -24,7 +24,7 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(ScoreboardTicketsBar); diff --git a/client/src/components/scoreboard-timetickets/scoreboard-timetickets.component.jsx b/client/src/components/scoreboard-timetickets/scoreboard-timetickets.component.jsx index fb970be5d..97fc13321 100644 --- a/client/src/components/scoreboard-timetickets/scoreboard-timetickets.component.jsx +++ b/client/src/components/scoreboard-timetickets/scoreboard-timetickets.component.jsx @@ -2,7 +2,7 @@ import { useQuery } from "@apollo/client"; import { Col, Row } from "antd"; import _ from "lodash"; import queryString from "query-string"; -import React, { useMemo } from "react"; +import { useMemo } from "react"; import { useLocation } from "react-router-dom"; import { QUERY_TIME_TICKETS_IN_RANGE_SB } from "../../graphql/timetickets.queries"; import dayjs from "../../utils/day"; @@ -68,7 +68,7 @@ export default function ScoreboardTimeTickets() { }, fetchPolicy: "network-only", nextFetchPolicy: "network-only", - pollInterval: 60000*5, + pollInterval: 60000 * 5, skip: !fixedPeriods }); @@ -240,7 +240,7 @@ export default function ScoreboardTimeTickets() { //Hours produced for time period by day //Hours produced by employee by day for time period. -function getColorArray(num) { +function getColorArray() { return [ "#3366cc", "#dc3912", diff --git a/client/src/components/scoreboard-timetickets/scoreboard-timetickets.stats.component.jsx b/client/src/components/scoreboard-timetickets/scoreboard-timetickets.stats.component.jsx index baa58f685..8cc03c880 100644 --- a/client/src/components/scoreboard-timetickets/scoreboard-timetickets.stats.component.jsx +++ b/client/src/components/scoreboard-timetickets/scoreboard-timetickets.stats.component.jsx @@ -1,20 +1,16 @@ import { Card, Col, Row, Statistic, Table, Typography } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; -import { selectBodyshop } from "../../redux/user/user.selectors"; -const mapStateToProps = createStructuredSelector({ - bodyshop: selectBodyshop -}); +const mapStateToProps = createStructuredSelector({}); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(ScoreboardTicketsStats); -export function ScoreboardTicketsStats({ data, bodyshop }) { +export function ScoreboardTicketsStats({ data }) { const { t } = useTranslation(); const columns = [ { diff --git a/client/src/components/shop-csi-config-form/shop-csi-config-form.component.jsx b/client/src/components/shop-csi-config-form/shop-csi-config-form.component.jsx index 25c590a78..3c4700bb2 100644 --- a/client/src/components/shop-csi-config-form/shop-csi-config-form.component.jsx +++ b/client/src/components/shop-csi-config-form/shop-csi-config-form.component.jsx @@ -1,11 +1,12 @@ import { Form } from "antd"; -import React from "react"; import ConfigFormComponents from "../config-form-components/config-form-components.component"; export default function ShopCsiConfigForm({ selectedCsi }) { const readOnly = !!selectedCsi; const [form] = Form.useForm(); - const handleFinish = (values) => {}; + const handleFinish = () => { + // NO OP + }; return (
diff --git a/client/src/components/shop-csi-config/shop-csi-config.component.jsx b/client/src/components/shop-csi-config/shop-csi-config.component.jsx index d714df6d3..ecb78de1c 100644 --- a/client/src/components/shop-csi-config/shop-csi-config.component.jsx +++ b/client/src/components/shop-csi-config/shop-csi-config.component.jsx @@ -1,7 +1,7 @@ import { CheckCircleFilled } from "@ant-design/icons"; import { useQuery } from "@apollo/client"; import { Button, Col, List, Row } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { GET_ALL_QUESTION_SETS } from "../../graphql/csi.queries"; diff --git a/client/src/components/shop-employees/shop-employees-add-vacation.component.jsx b/client/src/components/shop-employees/shop-employees-add-vacation.component.jsx index 87005fc5d..72b193196 100644 --- a/client/src/components/shop-employees/shop-employees-add-vacation.component.jsx +++ b/client/src/components/shop-employees/shop-employees-add-vacation.component.jsx @@ -1,7 +1,7 @@ import { useMutation } from "@apollo/client"; import { Button, Card, Form, Popover, Space } from "antd"; import dayjs from "../../utils/day"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { logImEXEvent } from "../../firebase/firebase.utils"; import { INSERT_VACATION } from "../../graphql/employees.queries"; @@ -37,7 +37,7 @@ export default function ShopEmployeeAddVacation({ employee }) { } }); - if (!!result.errors) { + if (result.errors) { notification["error"]({ message: t("employees.errors.adding", { message: JSON.stringify(result.errors) @@ -76,7 +76,7 @@ export default function ShopEmployeeAddVacation({ employee }) { required: true //message: t("general.validation.required"), }, - ({ getFieldValue }) => ({ + () => ({ async validator(rule, value) { if (value) { const { start } = form.getFieldsValue(); @@ -105,7 +105,7 @@ export default function ShopEmployeeAddVacation({ employee }) { ); - const handleClick = (e) => { + const handleClick = () => { setVisibility(true); }; diff --git a/client/src/components/shop-employees/shop-employees-list.component.jsx b/client/src/components/shop-employees/shop-employees-list.component.jsx index d6b41bad2..f666b899e 100644 --- a/client/src/components/shop-employees/shop-employees-list.component.jsx +++ b/client/src/components/shop-employees/shop-employees-list.component.jsx @@ -1,6 +1,6 @@ import { Button, Table } from "antd"; import queryString from "query-string"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { useLocation, useNavigate } from "react-router-dom"; import { alphaSort } from "../../utils/sorters"; @@ -117,9 +117,9 @@ export default function ShopEmployeesListComponent({ loading, employees }) { selectedRowKeys: [search.employeeId] }} onChange={handleTableChange} - onRow={(record, rowIndex) => { + onRow={(record) => { return { - onClick: (event) => { + onClick: () => { handleOnRowClick(record); } }; diff --git a/client/src/components/shop-employees/shop-employees.container.jsx b/client/src/components/shop-employees/shop-employees.container.jsx index 1a1bdd2de..dc5303f04 100644 --- a/client/src/components/shop-employees/shop-employees.container.jsx +++ b/client/src/components/shop-employees/shop-employees.container.jsx @@ -1,19 +1,15 @@ import { useQuery } from "@apollo/client"; -import React from "react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { QUERY_EMPLOYEES } from "../../graphql/employees.queries"; -import { selectBodyshop } from "../../redux/user/user.selectors"; import AlertComponent from "../alert/alert.component"; import ShopEmployeesFormComponent from "./shop-employees-form.component"; import ShopEmployeesListComponent from "./shop-employees-list.component"; import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component"; -const mapStateToProps = createStructuredSelector({ - bodyshop: selectBodyshop -}); +const mapStateToProps = createStructuredSelector({}); -function ShopEmployeesContainer({ bodyshop }) { +function ShopEmployeesContainer() { const { loading, error, data } = useQuery(QUERY_EMPLOYEES, { fetchPolicy: "network-only", nextFetchPolicy: "network-only" diff --git a/client/src/components/shop-info/shop-info.consent.component.jsx b/client/src/components/shop-info/shop-info.consent.component.jsx index 15754c4e6..c9b0ca34d 100644 --- a/client/src/components/shop-info/shop-info.consent.component.jsx +++ b/client/src/components/shop-info/shop-info.consent.component.jsx @@ -9,7 +9,7 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({}); +const mapDispatchToProps = () => ({}); function ShopInfoConsentComponent({ bodyshop }) { const { t } = useTranslation(); diff --git a/client/src/components/shop-info/shop-info.general.component.jsx b/client/src/components/shop-info/shop-info.general.component.jsx index 6803e53ae..7ac451774 100644 --- a/client/src/components/shop-info/shop-info.general.component.jsx +++ b/client/src/components/shop-info/shop-info.general.component.jsx @@ -14,7 +14,6 @@ import PhoneFormItem, { PhoneItemFormatterValidation } from "../form-items-forma import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component"; import LayoutFormRow from "../layout-form-row/layout-form-row.component"; -// eslint-disable-next-line no-undef const timeZonesList = Intl.supportedValuesOf("timeZone"); const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop @@ -32,7 +31,7 @@ export function ShopInfoGeneral({ form, bodyshop }) { } = useSplitTreatments({ attributes: {}, names: ["ClosingPeriod", "ADPPayroll"], - splitKey: bodyshop && bodyshop.imexshopid + splitKey: bodyshop?.imexshopid }); return ( @@ -543,7 +542,12 @@ export function ShopInfoGeneral({ form, bodyshop }) { > , - + , {t("bodyshop.labels.insurancecos")} + header={{t("bodyshop.labels.insurancecos")}} id="insurancecos" > diff --git a/client/src/components/shop-info/shop-info.intake.component.jsx b/client/src/components/shop-info/shop-info.intake.component.jsx index 2c19d1ffd..e71738af8 100644 --- a/client/src/components/shop-info/shop-info.intake.component.jsx +++ b/client/src/components/shop-info/shop-info.intake.component.jsx @@ -1,6 +1,5 @@ import { DeleteFilled } from "@ant-design/icons"; import { Button, Form, Input, InputNumber, Select, Space, Switch } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import styled from "styled-components"; import { TemplateList } from "../../utils/TemplateConstants"; @@ -53,7 +52,7 @@ export default function ShopInfoIntakeChecklistComponent({ form }) { ]} > - {Object.keys(ConfigFormTypes).map((i, idx) => ( + {Object.keys(ConfigFormTypes).map((i) => ( {i} diff --git a/client/src/components/shop-info/shop-info.laborrates.component.jsx b/client/src/components/shop-info/shop-info.laborrates.component.jsx index af8df9b34..e4ec950fe 100644 --- a/client/src/components/shop-info/shop-info.laborrates.component.jsx +++ b/client/src/components/shop-info/shop-info.laborrates.component.jsx @@ -5,7 +5,7 @@ import CurrencyInput from "../form-items-formatted/currency-form-item.component" import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component"; import LayoutFormRow from "../layout-form-row/layout-form-row.component"; -export default function ShopInfoLaborRates({ form }) { +export default function ShopInfoLaborRates() { const { t } = useTranslation(); return ( diff --git a/client/src/components/shop-info/shop-info.orderstatus.component.jsx b/client/src/components/shop-info/shop-info.orderstatus.component.jsx index 56c2442c7..b1925a756 100644 --- a/client/src/components/shop-info/shop-info.orderstatus.component.jsx +++ b/client/src/components/shop-info/shop-info.orderstatus.component.jsx @@ -1,5 +1,4 @@ import { Form, Input } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import LayoutFormRow from "../layout-form-row/layout-form-row.component"; import { connect } from "react-redux"; @@ -10,12 +9,12 @@ import { useSplitTreatments } from "@splitsoftware/splitio-react"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoOrderStatusComponent); -export function ShopInfoOrderStatusComponent({ bodyshop, form }) { +export function ShopInfoOrderStatusComponent({ bodyshop }) { const { t } = useTranslation(); const { diff --git a/client/src/components/shop-info/shop-info.responsibilitycenters.taxes.component.jsx b/client/src/components/shop-info/shop-info.responsibilitycenters.taxes.component.jsx index de3832311..260de44bd 100644 --- a/client/src/components/shop-info/shop-info.responsibilitycenters.taxes.component.jsx +++ b/client/src/components/shop-info/shop-info.responsibilitycenters.taxes.component.jsx @@ -1,5 +1,4 @@ import { Collapse, Divider, Form, Input, InputNumber, Space, Switch } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -11,7 +10,7 @@ const mapStateToProps = createStructuredSelector({ //currentUser: selectCurrentUser bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoResponsibilityCenters); diff --git a/client/src/components/shop-info/shop-info.roguard.component.jsx b/client/src/components/shop-info/shop-info.roguard.component.jsx index bdc661c6a..a8b6e983e 100644 --- a/client/src/components/shop-info/shop-info.roguard.component.jsx +++ b/client/src/components/shop-info/shop-info.roguard.component.jsx @@ -1,5 +1,4 @@ import { Form, Input, InputNumber, Switch } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import LayoutFormRow from "../layout-form-row/layout-form-row.component"; import InstanceRenderManager from "../../utils/instanceRenderMgr"; diff --git a/client/src/components/shop-info/shop-info.rostatus.component.jsx b/client/src/components/shop-info/shop-info.rostatus.component.jsx index 63862bc1f..75a84cb32 100644 --- a/client/src/components/shop-info/shop-info.rostatus.component.jsx +++ b/client/src/components/shop-info/shop-info.rostatus.component.jsx @@ -1,6 +1,6 @@ import { DeleteFilled } from "@ant-design/icons"; import { Button, Form, Select, Space } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { ChromePicker } from "react-color"; import { useTranslation } from "react-i18next"; import styled from "styled-components"; @@ -15,7 +15,7 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoROStatusComponent); @@ -40,9 +40,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) { const [options, setOptions] = useState(form.getFieldValue(["md_ro_statuses", "statuses"]) || []); const [productionStatus, setProductionStatus] = useState( - ( - form.getFieldValue(["md_ro_statuses", "production_statuses"]) || [] - ).concat( + (form.getFieldValue(["md_ro_statuses", "production_statuses"]) || []).concat( form.getFieldValue(["md_ro_statuses", "additional_board_statuses"]) || [] ) || [] ); @@ -52,9 +50,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) { setProductionStatus( form .getFieldValue(["md_ro_statuses", "production_statuses"]) - .concat( - form.getFieldValue(["md_ro_statuses", "additional_board_statuses"]) - ) + .concat(form.getFieldValue(["md_ro_statuses", "additional_board_statuses"])) ); }; @@ -336,10 +332,10 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) { {Production_List_Status_Colors.treatment === "on" && ( - {(fields, { add, remove, move }) => { + {(fields, { add, remove }) => { return (
- + {fields.map((field, index) => ( @@ -408,7 +404,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) { ); } -export const ColorPicker = ({ value, onChange, style, ...restProps }) => { +export const ColorPicker = ({ value, onChange, ...restProps }) => { const handleChange = (color) => { if (onChange) onChange(color.rgb); }; diff --git a/client/src/components/shop-info/shop-info.speedprint.component.jsx b/client/src/components/shop-info/shop-info.speedprint.component.jsx index 1654a39b0..639e59ad8 100644 --- a/client/src/components/shop-info/shop-info.speedprint.component.jsx +++ b/client/src/components/shop-info/shop-info.speedprint.component.jsx @@ -1,12 +1,11 @@ import { DeleteFilled } from "@ant-design/icons"; import { Button, Form, Input, Select, Space } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { TemplateList } from "../../utils/TemplateConstants"; import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component"; import LayoutFormRow from "../layout-form-row/layout-form-row.component"; -export default function ShopInfoSpeedPrint({ bodyshop, form }) { +export default function ShopInfoSpeedPrint() { const { t } = useTranslation(); const TemplateListGenerated = TemplateList("job"); return ( diff --git a/client/src/components/shop-info/shop-info.task-presets.component.jsx b/client/src/components/shop-info/shop-info.task-presets.component.jsx index 20b2b11a8..9cf2d3ff3 100644 --- a/client/src/components/shop-info/shop-info.task-presets.component.jsx +++ b/client/src/components/shop-info/shop-info.task-presets.component.jsx @@ -1,6 +1,5 @@ import { DeleteFilled } from "@ant-design/icons"; import { Button, Checkbox, Col, Form, Input, InputNumber, Row, Select, Space, Switch } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component"; import LayoutFormRow from "../layout-form-row/layout-form-row.component"; @@ -12,12 +11,12 @@ import { selectBodyshop } from "../../redux/user/user.selectors"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoTaskPresets); -export function ShopInfoTaskPresets({ bodyshop, form }) { +export function ShopInfoTaskPresets({ bodyshop }) { const { t } = useTranslation(); return ( diff --git a/client/src/components/shop-sub-status/shop-sub-status.component.jsx b/client/src/components/shop-sub-status/shop-sub-status.component.jsx index 16c1d3138..f6bfa2502 100644 --- a/client/src/components/shop-sub-status/shop-sub-status.component.jsx +++ b/client/src/components/shop-sub-status/shop-sub-status.component.jsx @@ -1,5 +1,4 @@ import { Result } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -8,7 +7,7 @@ import { selectBodyshop } from "../../redux/user/user.selectors"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(ShopSubStatus); diff --git a/client/src/components/shop-teams/shop-employee-teams-member.component.jsx b/client/src/components/shop-teams/shop-employee-teams-member.component.jsx index 3a3f6563b..fa51b2deb 100644 --- a/client/src/components/shop-teams/shop-employee-teams-member.component.jsx +++ b/client/src/components/shop-teams/shop-employee-teams-member.component.jsx @@ -1,5 +1,3 @@ -import React from "react"; - -export default function ShopEmployeeTeamMember({ teamMember }) { +export default function ShopEmployeeTeamMember() { return
ShopEmployeeTeamMember
; } diff --git a/client/src/components/shop-teams/shop-employee-teams.form.component.jsx b/client/src/components/shop-teams/shop-employee-teams.form.component.jsx index 8194767bd..03c83d29b 100644 --- a/client/src/components/shop-teams/shop-employee-teams.form.component.jsx +++ b/client/src/components/shop-teams/shop-employee-teams.form.component.jsx @@ -3,7 +3,7 @@ import { useMutation, useQuery } from "@apollo/client"; import { Button, Card, Form, Input, InputNumber, Space, Switch } from "antd"; import querystring from "query-string"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { useLocation, useNavigate } from "react-router-dom"; @@ -26,7 +26,7 @@ import { useNotification } from "../../contexts/Notifications/notificationContex const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); @@ -45,7 +45,7 @@ export function ShopEmployeeTeamsFormComponent({ bodyshop }) { }); useEffect(() => { - if (data && data.employee_teams_by_pk) form.setFieldsValue(data.employee_teams_by_pk); + if (data?.employee_teams_by_pk) form.setFieldsValue(data.employee_teams_by_pk); else { form.resetFields(); } diff --git a/client/src/components/shop-teams/shop-employee-teams.list.jsx b/client/src/components/shop-teams/shop-employee-teams.list.jsx index 1a4f0a2cf..c0c6f1175 100644 --- a/client/src/components/shop-teams/shop-employee-teams.list.jsx +++ b/client/src/components/shop-teams/shop-employee-teams.list.jsx @@ -1,6 +1,5 @@ import { Button, Table } from "antd"; import queryString from "query-string"; -import React from "react"; import { useTranslation } from "react-i18next"; import { useLocation, useNavigate } from "react-router-dom"; @@ -55,9 +54,9 @@ export default function ShopEmployeeTeamsListComponent({ loading, employee_teams type: "radio", selectedRowKeys: [search.employeeTeamId] }} - onRow={(record, rowIndex) => { + onRow={(record) => { return { - onClick: (event) => { + onClick: () => { handleOnRowClick(record); } }; diff --git a/client/src/components/shop-teams/shop-teams.container.jsx b/client/src/components/shop-teams/shop-teams.container.jsx index 8c9f277cf..7ea319990 100644 --- a/client/src/components/shop-teams/shop-teams.container.jsx +++ b/client/src/components/shop-teams/shop-teams.container.jsx @@ -1,20 +1,16 @@ import { useQuery } from "@apollo/client"; -import React from "react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { QUERY_TEAMS } from "../../graphql/employee_teams.queries"; -import { selectBodyshop } from "../../redux/user/user.selectors"; import AlertComponent from "../alert/alert.component"; import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component"; import ShopEmployeeTeamsListComponent from "./shop-employee-teams.list"; import ShopEmployeeTeamsFormComponent from "./shop-employee-teams.form.component"; import { Col, Row } from "antd"; -const mapStateToProps = createStructuredSelector({ - bodyshop: selectBodyshop -}); +const mapStateToProps = createStructuredSelector({}); -function ShopTeamsContainer({ bodyshop }) { +function ShopTeamsContainer() { const { loading, error, data } = useQuery(QUERY_TEAMS, { fetchPolicy: "network-only", nextFetchPolicy: "network-only" diff --git a/client/src/components/shop-template-add/shop-template-add.component.jsx b/client/src/components/shop-template-add/shop-template-add.component.jsx index a3aa6f87a..a5d2ec267 100644 --- a/client/src/components/shop-template-add/shop-template-add.component.jsx +++ b/client/src/components/shop-template-add/shop-template-add.component.jsx @@ -2,7 +2,6 @@ import { DownOutlined } from "@ant-design/icons"; import { useMutation } from "@apollo/client"; import { Dropdown } from "antd"; import queryString from "query-string"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { useLocation, useNavigate } from "react-router-dom"; @@ -12,6 +11,7 @@ import { INSERT_TEMPLATE, QUERY_TEMPLATES_BY_NAME_FOR_DUPE } from "../../graphql import { selectBodyshop } from "../../redux/user/user.selectors"; import client from "../../utils/GraphQLClient"; import { TemplateList } from "../../utils/TemplateConstants"; +import { isFunction } from "lodash"; const mapStateToProps = createStructuredSelector({ //currentUser: selectCurrentUser @@ -54,7 +54,7 @@ export function ShopTemplateAddComponent({ bodyshop, shopTemplateList, refetch } const returningId = result.data.insert_templates.returning[0].id; search.customTemplateId = returningId; history({ search: queryString.stringify(search) }); - if (!!refetch) refetch(); + if (refetch && isFunction(refetch)) refetch(); }; const TemplateListGenerated = TemplateList(); const menu = { diff --git a/client/src/components/shop-template-delete/shop-template-delete.component.jsx b/client/src/components/shop-template-delete/shop-template-delete.component.jsx index b40715c25..bc1889586 100644 --- a/client/src/components/shop-template-delete/shop-template-delete.component.jsx +++ b/client/src/components/shop-template-delete/shop-template-delete.component.jsx @@ -1,7 +1,6 @@ import { useMutation } from "@apollo/client"; import { Button, Popconfirm } from "antd"; import queryString from "query-string"; -import React from "react"; import { useTranslation } from "react-i18next"; import { useLocation, useNavigate } from "react-router-dom"; import { DELETE_TEMPLATE } from "../../graphql/templates.queries"; @@ -24,7 +23,7 @@ export default function ShopTemplateDeleteComponent({ templateId, refetch }) { } }); - if (!!result.errors) { + if (result.errors) { notification["error"]({ message: t("bodyshop.errors.deletingtemplate", { message: JSON.stringify(result.errors) @@ -33,7 +32,7 @@ export default function ShopTemplateDeleteComponent({ templateId, refetch }) { } else { delete search.customTemplateId; history({ search: queryString.stringify(search) }); - if (!!refetch) refetch(); + if (refetch) refetch(); } }; diff --git a/client/src/components/shop-template-editor-save-button/shop-template-editor-save-button.component.jsx b/client/src/components/shop-template-editor-save-button/shop-template-editor-save-button.component.jsx index cea0965e6..de60c9a56 100644 --- a/client/src/components/shop-template-editor-save-button/shop-template-editor-save-button.component.jsx +++ b/client/src/components/shop-template-editor-save-button/shop-template-editor-save-button.component.jsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import { useState } from "react"; import { Button } from "antd"; import { useMutation } from "@apollo/client"; import { useTranslation } from "react-i18next"; @@ -32,7 +32,7 @@ export default function ShopTemplateSaveButton({ templateId, gql, emailEditorRef } } }); - if (!!!result.errors) { + if (!result.errors) { notification["success"]({ message: t("templates.successes.updated") }); @@ -48,7 +48,7 @@ export default function ShopTemplateSaveButton({ templateId, gql, emailEditorRef }; return ( - ); diff --git a/client/src/components/shop-template-test-render/shop-template-test-render.component.jsx b/client/src/components/shop-template-test-render/shop-template-test-render.component.jsx index 192d802a0..684f45b96 100644 --- a/client/src/components/shop-template-test-render/shop-template-test-render.component.jsx +++ b/client/src/components/shop-template-test-render/shop-template-test-render.component.jsx @@ -1,20 +1,17 @@ import { Button } from "antd"; import { JsonEditor as Editor } from "jsoneditor-react"; import "jsoneditor-react/es/editor.min.css"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; -import { selectBodyshop } from "../../redux/user/user.selectors"; -const mapStateToProps = createStructuredSelector({ - bodyshop: selectBodyshop -}); -const mapDispatchToProps = (dispatch) => ({ +const mapStateToProps = createStructuredSelector({}); +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); -export function ShopTemplateTestRender({ bodyshop, query, emailEditorRef, style }) { +export function ShopTemplateTestRender({ emailEditorRef, style }) { const [variables, setVariables] = useState({ id: "uuid" }); const [loading, setLoading] = useState(false); const { t } = useTranslation(); @@ -23,7 +20,7 @@ export function ShopTemplateTestRender({ bodyshop, query, emailEditorRef, style try { setLoading(true); - emailEditorRef.current.exportHtml(async (data) => { + emailEditorRef.current.exportHtml(async () => { try { setLoading(false); } catch (error) { diff --git a/client/src/components/shop-templates-list/shop-templates-list.container.jsx b/client/src/components/shop-templates-list/shop-templates-list.container.jsx index 975a090f6..1c667d6b4 100644 --- a/client/src/components/shop-templates-list/shop-templates-list.container.jsx +++ b/client/src/components/shop-templates-list/shop-templates-list.container.jsx @@ -1,6 +1,5 @@ import { useQuery } from "@apollo/client"; import { Button, Drawer, List } from "antd"; -import React from "react"; import { QUERY_CUSTOM_TEMPLATES } from "../../graphql/templates.queries"; import AlertComponent from "../alert/alert.component"; import Skeleton from "../loading-skeleton/loading-skeleton.component"; @@ -46,12 +45,14 @@ export default function ShopTemplatesListContainer({ openState }) { renderItem={(item) => ( handleEdit(item)}>{t("general.actions.edit")}, - + , + ]} > -
+
{TemplateList()[item.name].title}
{TemplateList()[item.name].description}
{TemplateList()[item.name].drivingid}
diff --git a/client/src/components/shop-users-auth-edit/shop-users-auth-edit.component.jsx b/client/src/components/shop-users-auth-edit/shop-users-auth-edit.component.jsx index 3fe7adda5..cd6f47d25 100644 --- a/client/src/components/shop-users-auth-edit/shop-users-auth-edit.component.jsx +++ b/client/src/components/shop-users-auth-edit/shop-users-auth-edit.component.jsx @@ -1,5 +1,5 @@ import { InputNumber } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useMutation } from "@apollo/client"; import { useTranslation } from "react-i18next"; import { UPDATE_ASSOCIATION } from "../../graphql/user.queries"; @@ -21,7 +21,7 @@ export default function ShopUsersAuthEdit({ association }) { } }); - if (!!result.errors) { + if (result.errors) { notification["error"]({ message: t("user.errors.updating", { message: JSON.stringify(result.errors) diff --git a/client/src/components/shop-users/shop-users.component.jsx b/client/src/components/shop-users/shop-users.component.jsx index 6e3343b3e..e025010b6 100644 --- a/client/src/components/shop-users/shop-users.component.jsx +++ b/client/src/components/shop-users/shop-users.component.jsx @@ -1,6 +1,5 @@ import { useQuery } from "@apollo/client"; import { Button, Table } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -14,7 +13,7 @@ const mapStateToProps = createStructuredSelector({ //currentUser: selectCurrentUser bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoUsersComponent); @@ -47,9 +46,14 @@ export function ShopInfoUsersComponent({ bodyshop }) { title: t("user.labels.actions"), dataIndex: "actions", key: "actions", - render: (text, record) => ( + render: () => (
-
diff --git a/client/src/components/task-list/task-list.container.jsx b/client/src/components/task-list/task-list.container.jsx index e34b9c199..7c2058814 100644 --- a/client/src/components/task-list/task-list.container.jsx +++ b/client/src/components/task-list/task-list.container.jsx @@ -111,7 +111,7 @@ export function TaskListContainer({ notification["success"]({ message: t("tasks.successes.completed") }); - } catch (err) { + } catch { notification["error"]({ message: t("tasks.failures.completed") }); @@ -163,7 +163,7 @@ export function TaskListContainer({ notification["success"]({ message: t("tasks.successes.deleted") }); - } catch (err) { + } catch { notification["error"]({ message: t("tasks.failures.deleted") }); diff --git a/client/src/components/task-upsert-modal/task-upsert-modal.container.jsx b/client/src/components/task-upsert-modal/task-upsert-modal.container.jsx index f0011e993..9275c3b2e 100644 --- a/client/src/components/task-upsert-modal/task-upsert-modal.container.jsx +++ b/client/src/components/task-upsert-modal/task-upsert-modal.container.jsx @@ -239,7 +239,7 @@ export function TaskUpsertModalContainer({ bodyshop, currentUser, taskUpsert, to }, {}); try { await handleExistingTask(taskSource.id, taskSource.jobid, dirtyValues); - } catch (e) { + } catch { notification["error"]({ message: t("tasks.failures.updated") }); @@ -247,7 +247,7 @@ export function TaskUpsertModalContainer({ bodyshop, currentUser, taskUpsert, to } else { try { await handleNewTask(formValues); - } catch (e) { + } catch { notification["error"]({ message: t("tasks.failures.created") }); diff --git a/client/src/components/tech-header/tech-header.component.jsx b/client/src/components/tech-header/tech-header.component.jsx index 7b9929059..72d085c12 100644 --- a/client/src/components/tech-header/tech-header.component.jsx +++ b/client/src/components/tech-header/tech-header.component.jsx @@ -1,5 +1,4 @@ import { Layout, Typography } from "antd"; -import React from "react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { selectTechnician } from "../../redux/tech/tech.selectors"; @@ -10,7 +9,7 @@ const { Header } = Layout; const mapStateToProps = createStructuredSelector({ technician: selectTechnician }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); @@ -19,7 +18,7 @@ export function TechHeader({ technician }) { return (
- {!!technician + {technician ? t("tech.labels.loggedin", { name: `${technician.first_name} ${technician.last_name}` }) diff --git a/client/src/components/tech-job-clock-in-form/tech-job-clock-in-form.component.jsx b/client/src/components/tech-job-clock-in-form/tech-job-clock-in-form.component.jsx index f6eeeb487..c3d0b43d8 100644 --- a/client/src/components/tech-job-clock-in-form/tech-job-clock-in-form.component.jsx +++ b/client/src/components/tech-job-clock-in-form/tech-job-clock-in-form.component.jsx @@ -1,5 +1,4 @@ import { Divider, Form, Select } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; diff --git a/client/src/components/tech-job-clock-in-form/tech-job-clock-in-form.container.jsx b/client/src/components/tech-job-clock-in-form/tech-job-clock-in-form.container.jsx index 3dd5d88b2..f1915c6bd 100644 --- a/client/src/components/tech-job-clock-in-form/tech-job-clock-in-form.container.jsx +++ b/client/src/components/tech-job-clock-in-form/tech-job-clock-in-form.container.jsx @@ -2,7 +2,7 @@ import { useMutation } from "@apollo/client"; import { Button, Card, Form, Space } from "antd"; import axios from "axios"; import dayjs from "../../utils/day"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -41,7 +41,7 @@ export function TechClockInContainer({ setTimeTicketContext, technician, bodysho const { t } = useTranslation(); const notification = useNotification(); - const emps = bodyshop.employees.filter((e) => e.id === (technician && technician.id))[0]; + const emps = bodyshop.employees.filter((e) => e.id === technician?.id)[0]; const TechForm = () => { if (technician) { @@ -89,7 +89,7 @@ export function TechClockInContainer({ setTimeTicketContext, technician, bodysho } }); - if (!!result.errors) { + if (result.errors) { notification["error"]({ message: t("timetickets.errors.clockingin", { message: JSON.stringify(result.errors) diff --git a/client/src/components/tech-job-clock-out-button/tech-job-clock-out-button.component.jsx b/client/src/components/tech-job-clock-out-button/tech-job-clock-out-button.component.jsx index 4e2dbbecd..ed48ecff5 100644 --- a/client/src/components/tech-job-clock-out-button/tech-job-clock-out-button.component.jsx +++ b/client/src/components/tech-job-clock-out-button/tech-job-clock-out-button.component.jsx @@ -1,7 +1,7 @@ import { useMutation, useQuery } from "@apollo/client"; import { Button, Card, Col, Form, InputNumber, Popover, Row, Select } from "antd"; import axios from "axios"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -78,7 +78,7 @@ export function TechClockOffButton({ } }); - if (!!result.errors) { + if (result.errors) { notification["error"]({ message: t("timetickets.errors.clockingout", { message: JSON.stringify(result.errors) @@ -97,7 +97,7 @@ export function TechClockOffButton({ } }); - if (!!job_update_result.errors) { + if (job_update_result.errors) { notification["error"]({ message: t("jobs.errors.updating", { message: JSON.stringify(result.errors) diff --git a/client/src/components/tech-job-clock-out-delete/tech-job-clock-out-delete.component.jsx b/client/src/components/tech-job-clock-out-delete/tech-job-clock-out-delete.component.jsx index 03fb01fb2..f8316ae2a 100644 --- a/client/src/components/tech-job-clock-out-delete/tech-job-clock-out-delete.component.jsx +++ b/client/src/components/tech-job-clock-out-delete/tech-job-clock-out-delete.component.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Popconfirm } from "antd"; import { DeleteFilled } from "@ant-design/icons"; import { DELETE_TIME_TICKET } from "../../graphql/timetickets.queries"; @@ -20,7 +19,7 @@ export default function TechJobClockoutDelete({ timeTicketId, completedCallback refetchQueries: ["QUERY_ACTIVE_TIME_TICKETS"] }); - if (!!result.errors) { + if (result.errors) { notification["error"]({ message: t("timetickets.errors.deleting", { message: JSON.stringify(result.errors) diff --git a/client/src/components/tech-job-clocked-in-list/tech-job-clocked-in-list.component.jsx b/client/src/components/tech-job-clocked-in-list/tech-job-clocked-in-list.component.jsx index 19317bb34..3f4848e2e 100644 --- a/client/src/components/tech-job-clocked-in-list/tech-job-clocked-in-list.component.jsx +++ b/client/src/components/tech-job-clocked-in-list/tech-job-clocked-in-list.component.jsx @@ -1,5 +1,4 @@ import { Card, List, Typography } from "antd"; -import React from "react"; import { useQuery } from "@apollo/client"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -17,7 +16,7 @@ import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-displ const mapStateToProps = createStructuredSelector({ technician: selectTechnician }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); @@ -60,7 +59,12 @@ export function TechClockedInList({ technician }) { } actions={[ - + ]} >
diff --git a/client/src/components/tech-job-print-tickets/tech-job-print-tickets.component.jsx b/client/src/components/tech-job-print-tickets/tech-job-print-tickets.component.jsx index a01fd7420..a65ee7178 100644 --- a/client/src/components/tech-job-print-tickets/tech-job-print-tickets.component.jsx +++ b/client/src/components/tech-job-print-tickets/tech-job-print-tickets.component.jsx @@ -1,5 +1,5 @@ import { Button, Card, DatePicker, Form, Popover, Radio, Space } from "antd"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -15,7 +15,7 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectTechnician, technician: selectTechnician }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(TechJobPrintTickets); @@ -119,7 +119,7 @@ export function TechJobPrintTickets({ bodyshop, technician, event, attendacePrin ); - const handleClick = (e) => { + const handleClick = () => { setVisibility(true); }; diff --git a/client/src/components/tech-job-statistics/tech-job-statistics.component.jsx b/client/src/components/tech-job-statistics/tech-job-statistics.component.jsx index 33f997e02..c7e98af68 100644 --- a/client/src/components/tech-job-statistics/tech-job-statistics.component.jsx +++ b/client/src/components/tech-job-statistics/tech-job-statistics.component.jsx @@ -15,7 +15,7 @@ const { Title } = Typography; const mapStateToProps = createStructuredSelector({ technician: selectTechnician }); -const mapDispatchToProps = (dispatch) => ({}); +const mapDispatchToProps = () => ({}); const TechJobStatistics = ({ technician }) => { const { t } = useTranslation(); diff --git a/client/src/components/tech-login/tech-login.component.jsx b/client/src/components/tech-login/tech-login.component.jsx index da3ad7b32..4a2df0772 100644 --- a/client/src/components/tech-login/tech-login.component.jsx +++ b/client/src/components/tech-login/tech-login.component.jsx @@ -1,5 +1,5 @@ import { Button, Form, Input } from "antd"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { useNavigate } from "react-router-dom"; diff --git a/client/src/components/tech-lookup-jobs-drawer/tech-lookup-jobs-drawer.component.jsx b/client/src/components/tech-lookup-jobs-drawer/tech-lookup-jobs-drawer.component.jsx index 9ade69b1a..4a2ec4bae 100644 --- a/client/src/components/tech-lookup-jobs-drawer/tech-lookup-jobs-drawer.component.jsx +++ b/client/src/components/tech-lookup-jobs-drawer/tech-lookup-jobs-drawer.component.jsx @@ -3,7 +3,6 @@ import { useQuery } from "@apollo/client"; import { Button, Divider, Drawer, Grid, Tabs } from "antd"; import { PageHeader } from "@ant-design/pro-layout"; import queryString from "query-string"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { useLocation, useNavigate } from "react-router-dom"; diff --git a/client/src/components/tech-lookup-jobs-list/tech-lookup-jobs-list.component.jsx b/client/src/components/tech-lookup-jobs-list/tech-lookup-jobs-list.component.jsx index 0a8ef4acf..0febbb24d 100644 --- a/client/src/components/tech-lookup-jobs-list/tech-lookup-jobs-list.component.jsx +++ b/client/src/components/tech-lookup-jobs-list/tech-lookup-jobs-list.component.jsx @@ -2,7 +2,7 @@ import { SyncOutlined } from "@ant-design/icons"; import { useQuery } from "@apollo/client"; import { Button, Card, Input, Space, Table } from "antd"; import queryString from "query-string"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { useLocation, useNavigate } from "react-router-dom"; @@ -187,9 +187,9 @@ export function TechLookupJobsList({ bodyshop }) { type: "radio" }} onChange={handleTableChange} - onRow={(record, rowIndex) => { + onRow={(record) => { return { - onClick: (event) => { + onClick: () => { handleOnRowClick(record); } }; diff --git a/client/src/components/tech-sider/tech-sider.component.jsx b/client/src/components/tech-sider/tech-sider.component.jsx index 56f87ffbf..3a3dcfb09 100644 --- a/client/src/components/tech-sider/tech-sider.component.jsx +++ b/client/src/components/tech-sider/tech-sider.component.jsx @@ -1,6 +1,6 @@ import Icon, { CarOutlined, ScheduleOutlined, SearchOutlined, UserAddOutlined } from "@ant-design/icons"; import { Layout, Menu } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { FaBusinessTime } from "react-icons/fa"; import { FiLogIn, FiLogOut } from "react-icons/fi"; @@ -51,7 +51,7 @@ export function TechSider({ technician, techLogout, bodyshop, setTimeTicketTaskC { key: "2", icon: , - disabled: !!!technician, + disabled: !technician, label: {t("menus.tech.joblookup")} } ]; @@ -60,13 +60,13 @@ export function TechSider({ technician, techLogout, bodyshop, setTimeTicketTaskC items.push( { key: "TechAssignedProdJobs", - disabled: !!!technician, + disabled: !technician, icon: , label: {t("menus.tech.assignedjobs")} }, { key: "3", - disabled: !!!technician, + disabled: !technician, icon: , onClick: () => { setTimeTicketTaskContext({ @@ -80,7 +80,7 @@ export function TechSider({ technician, techLogout, bodyshop, setTimeTicketTaskC } else { items.push({ key: "3", - disabled: !!!technician, + disabled: !technician, icon: , label: {t("menus.tech.jobclockin")} }); @@ -90,31 +90,31 @@ export function TechSider({ technician, techLogout, bodyshop, setTimeTicketTaskC { key: "4", icon: , - disabled: !!!technician, + disabled: !technician, label: {t("menus.tech.shiftclockin")} }, { key: "dispatchedparts", - disabled: !!!technician, + disabled: !technician, icon: , label: {t("menus.tech.dispatchedparts")} }, { key: "5", icon: , - disabled: !!!technician, + disabled: !technician, label: {t("menus.tech.productionlist")} }, { key: "6", icon: , - disabled: !!!technician, + disabled: !technician, label: {t("menus.tech.productionboard")} }, { key: "7", icon: , - disabled: !!!technician, + disabled: !technician, label: t("menus.tech.logout") } ); diff --git a/client/src/components/ticket-tickets-dates-selector/time-tickets-dates-selector.component.jsx b/client/src/components/ticket-tickets-dates-selector/time-tickets-dates-selector.component.jsx index 0c1bcec16..ff0e19e53 100644 --- a/client/src/components/ticket-tickets-dates-selector/time-tickets-dates-selector.component.jsx +++ b/client/src/components/ticket-tickets-dates-selector/time-tickets-dates-selector.component.jsx @@ -2,7 +2,6 @@ import DatePickerRanges from "../../utils/DatePickerRanges"; import { DatePicker } from "antd"; import dayjs from "../../utils/day"; import queryString from "query-string"; -import React from "react"; import { useLocation, useNavigate } from "react-router-dom"; export default function TimeTicketsDatesSelector() { diff --git a/client/src/components/time-ticket-calculator/time-ticket-calculator.component.jsx b/client/src/components/time-ticket-calculator/time-ticket-calculator.component.jsx index be74b1f99..0e96dd796 100644 --- a/client/src/components/time-ticket-calculator/time-ticket-calculator.component.jsx +++ b/client/src/components/time-ticket-calculator/time-ticket-calculator.component.jsx @@ -1,6 +1,6 @@ import { DownOutlined } from "@ant-design/icons"; import { Button, Checkbox, Col, Form, InputNumber, Popover, Radio, Row, Space, Spin } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { GET_JOB_INFO_DRAW_CALCULATIONS } from "../../graphql/jobs-lines.queries"; import { useQuery } from "@apollo/client"; diff --git a/client/src/components/time-ticket-enter-button/time-ticket-enter-button.component.jsx b/client/src/components/time-ticket-enter-button/time-ticket-enter-button.component.jsx index 96f64d99b..f8bc70d05 100644 --- a/client/src/components/time-ticket-enter-button/time-ticket-enter-button.component.jsx +++ b/client/src/components/time-ticket-enter-button/time-ticket-enter-button.component.jsx @@ -1,5 +1,4 @@ import { Button } from "antd"; -import React from "react"; import { connect } from "react-redux"; import { setModalContext } from "../../redux/modals/modals.actions"; diff --git a/client/src/components/time-ticket-list/time-ticket-list-team-pay.component.jsx b/client/src/components/time-ticket-list/time-ticket-list-team-pay.component.jsx index 59d5b4739..19de9356a 100644 --- a/client/src/components/time-ticket-list/time-ticket-list-team-pay.component.jsx +++ b/client/src/components/time-ticket-list/time-ticket-list-team-pay.component.jsx @@ -1,7 +1,7 @@ import { useQuery } from "@apollo/client"; import { Button, Form, InputNumber, Modal, Radio, Select, Space, Table, Typography } from "antd"; import Dinero from "dinero.js"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -14,10 +14,10 @@ import DateTimePicker from "../form-date-time-picker/form-date-time-picker.compo const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({}); +const mapDispatchToProps = () => ({}); export default connect(mapStateToProps, mapDispatchToProps)(TimeTicketListTeamPay); -export function TimeTicketListTeamPay({ bodyshop, context, actions }) { +export function TimeTicketListTeamPay({ bodyshop, context }) { //const { refetch } = actions; const { jobId } = context; const [visible, setVisible] = useState(false); diff --git a/client/src/components/time-ticket-list/time-ticket-list.component.jsx b/client/src/components/time-ticket-list/time-ticket-list.component.jsx index c29648f17..a8ffd2248 100644 --- a/client/src/components/time-ticket-list/time-ticket-list.component.jsx +++ b/client/src/components/time-ticket-list/time-ticket-list.component.jsx @@ -1,7 +1,7 @@ import { EditFilled, SyncOutlined } from "@ant-design/icons"; import { useSplitTreatments } from "@splitsoftware/splitio-react"; import { Button, Card, Checkbox, Space, Table } from "antd"; -import React, { useMemo, useState } from "react"; +import { useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { Link } from "react-router-dom"; diff --git a/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx b/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx index 84dbe8caa..2b5b2273e 100644 --- a/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx +++ b/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx @@ -24,7 +24,7 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, authLevel: selectAuthLevel }); -const mapDispatchToProps = (dispatch) => ({}); +const mapDispatchToProps = () => ({}); export default connect(mapStateToProps, mapDispatchToProps)(TimeTicketModalComponent); export function TimeTicketModalComponent({ @@ -32,7 +32,6 @@ export function TimeTicketModalComponent({ bodyshop, authLevel, employeeAutoCompleteOptions, - isEdit, disabled, employeeSelectDisabled }) { diff --git a/client/src/components/time-ticket-shift-active/time-ticket-shift-active.component.jsx b/client/src/components/time-ticket-shift-active/time-ticket-shift-active.component.jsx index 3401aa7a1..33c915f3c 100644 --- a/client/src/components/time-ticket-shift-active/time-ticket-shift-active.component.jsx +++ b/client/src/components/time-ticket-shift-active/time-ticket-shift-active.component.jsx @@ -1,5 +1,4 @@ import { Card, List, Typography } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { DateTimeFormatter } from "../../utils/DateFormatter"; import DataLabel from "../data-label/data-label.component"; @@ -42,6 +41,7 @@ export default function TimeTicketShiftActive({ timetickets, refetch, isTechCons title={ticket.memo?.startsWith("timetickets.labels") ? t(ticket.memo) : ticket.memo} actions={[ ({ - //setUserLanguage: language => dispatch(setUserLanguage(language)) -}); +const mapStateToProps = createStructuredSelector({}); +const mapDispatchToProps = () => ({}); -export function TimeTicketShiftFormComponent({ bodyshop, form }) { +export function TimeTicketShiftFormComponent() { const { t } = useTranslation(); return (
diff --git a/client/src/components/time-ticket-shift-form/time-ticket-shift-form.container.jsx b/client/src/components/time-ticket-shift-form/time-ticket-shift-form.container.jsx index 5edbeb1de..0287b668d 100644 --- a/client/src/components/time-ticket-shift-form/time-ticket-shift-form.container.jsx +++ b/client/src/components/time-ticket-shift-form/time-ticket-shift-form.container.jsx @@ -2,7 +2,7 @@ import { useMutation } from "@apollo/client"; import { Button, Form, Space } from "antd"; import axios from "axios"; import dayjs from "../../utils/day"; -import React, { useMemo, useState } from "react"; +import { useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -18,7 +18,7 @@ const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, technician: selectTechnician }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); @@ -33,7 +33,7 @@ export function TimeTicektShiftContainer({ bodyshop, technician, currentUser, is const employeeId = useMemo(() => { const assoc = bodyshop.associations.filter((a) => a.useremail === currentUser.email)[0]; - return assoc && assoc.user && assoc.user.employee && assoc.user.employee.id; + return assoc?.user && assoc.user.employee && assoc.user.employee.id; }, [bodyshop, currentUser.email]); const handleFinish = async (values) => { @@ -80,7 +80,7 @@ export function TimeTicektShiftContainer({ bodyshop, technician, currentUser, is refetchQueries: ["QUERY_ACTIVE_SHIFT_TIME_TICKETS"] }); - if (!!result.errors) { + if (result.errors) { notification["error"]({ message: t("timetickets.errors.clockingin", { message: JSON.stringify(result.errors) diff --git a/client/src/components/time-ticket-shift/time-ticket-shift.container.jsx b/client/src/components/time-ticket-shift/time-ticket-shift.container.jsx index 9319f9595..4f713425a 100644 --- a/client/src/components/time-ticket-shift/time-ticket-shift.container.jsx +++ b/client/src/components/time-ticket-shift/time-ticket-shift.container.jsx @@ -1,6 +1,6 @@ import { useQuery } from "@apollo/client"; import { Result } from "antd"; -import React, { useMemo } from "react"; +import { useMemo } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -17,7 +17,7 @@ const mapStateToProps = createStructuredSelector({ technician: selectTechnician, currentUser: selectCurrentUser }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); @@ -26,12 +26,12 @@ export function TimeTicketShiftContainer({ bodyshop, technician, currentUser, is const employeeId = useMemo(() => { const assoc = bodyshop.associations.filter((a) => a.useremail === currentUser.email)[0]; - return assoc && assoc.user && assoc.user.employee && assoc.user.employee.id; + return assoc?.user && assoc.user.employee && assoc.user.employee.id; }, [bodyshop, currentUser.email]); const { loading, error, data, refetch } = useQuery(QUERY_ACTIVE_SHIFT_TIME_TICKETS, { variables: { - employeeId: isTechConsole ? technician && technician.id : employeeId + employeeId: isTechConsole ? technician?.id : employeeId }, fetchPolicy: "network-only", nextFetchPolicy: "network-only" @@ -40,7 +40,7 @@ export function TimeTicketShiftContainer({ bodyshop, technician, currentUser, is if (loading) return ; if (error) return ; - if (!employeeId && !(technician && technician.id)) + if (!employeeId && !technician?.id) return (
({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(TimeTicketTaskModalComponent); @@ -83,7 +82,7 @@ export function TimeTicketTaskModalComponent({ bodyshop, form, loading, complete ) : ( - {(fields, { add, remove, move }) => { + {(fields) => { return ( <> {t("timetickets.labels.claimtaskpreview")} diff --git a/client/src/components/time-ticket-task-modal/time-ticket-task-modal.container.jsx b/client/src/components/time-ticket-task-modal/time-ticket-task-modal.container.jsx index e59e4017b..30eb0364d 100644 --- a/client/src/components/time-ticket-task-modal/time-ticket-task-modal.container.jsx +++ b/client/src/components/time-ticket-task-modal/time-ticket-task-modal.container.jsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect, useState } from "react"; +import { useCallback, useEffect, useState } from "react"; import { Form, Modal } from "antd"; import axios from "axios"; @@ -7,7 +7,7 @@ import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { toggleModalVisible } from "../../redux/modals/modals.actions"; import { selectTimeTicketTasks } from "../../redux/modals/modals.selectors"; -import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors"; +import { selectCurrentUser } from "../../redux/user/user.selectors"; import TimeTicketTaskModalComponent from "./time-ticket-task-modal.component"; import { useApolloClient } from "@apollo/client"; import { QUERY_COMPLETED_TASKS } from "../../graphql/jobs.queries"; @@ -17,7 +17,6 @@ import { useNotification } from "../../contexts/Notifications/notificationContex const mapStateToProps = createStructuredSelector({ timeTicketTasksModal: selectTimeTicketTasks, - bodyshop: selectBodyshop, currentUser: selectCurrentUser, technician: selectTechnician }); @@ -26,13 +25,7 @@ const mapDispatchToProps = (dispatch) => ({ }); export default connect(mapStateToProps, mapDispatchToProps)(TimeTickeTaskModalContainer); -export function TimeTickeTaskModalContainer({ - bodyshop, - currentUser, - technician, - timeTicketTasksModal, - toggleModalVisible -}) { +export function TimeTickeTaskModalContainer({ currentUser, technician, timeTicketTasksModal, toggleModalVisible }) { const [form] = Form.useForm(); const { context, open, actions } = timeTicketTasksModal; const [completedTasks, setCompletedTasks] = useState([]); diff --git a/client/src/components/time-tickets-attendance-table/time-tickets-attendance-table.component.jsx b/client/src/components/time-tickets-attendance-table/time-tickets-attendance-table.component.jsx index eeb40c155..87cd03b32 100644 --- a/client/src/components/time-tickets-attendance-table/time-tickets-attendance-table.component.jsx +++ b/client/src/components/time-tickets-attendance-table/time-tickets-attendance-table.component.jsx @@ -1,6 +1,6 @@ import { Button } from "antd"; import queryString from "query-string"; -import React, { useState } from "react"; +import { useState } from "react"; import { useLocation } from "react-router-dom"; import { GenerateDocument } from "../../utils/RenderTemplate"; import { TemplateList } from "../../utils/TemplateConstants"; diff --git a/client/src/components/time-tickets-commit-toggle/time-tickets-commit-toggle.component.jsx b/client/src/components/time-tickets-commit-toggle/time-tickets-commit-toggle.component.jsx index 0cb5741f1..3ccf82cc5 100644 --- a/client/src/components/time-tickets-commit-toggle/time-tickets-commit-toggle.component.jsx +++ b/client/src/components/time-tickets-commit-toggle/time-tickets-commit-toggle.component.jsx @@ -1,24 +1,23 @@ import { useMutation } from "@apollo/client"; import { Button } from "antd"; import dayjs from "../../utils/day"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { UPDATE_TIME_TICKET } from "../../graphql/timetickets.queries"; import { setModalContext } from "../../redux/modals/modals.actions"; -import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors"; +import { selectCurrentUser } from "../../redux/user/user.selectors"; import { useNotification } from "../../contexts/Notifications/notificationContext.jsx"; const mapStateToProps = createStructuredSelector({ - bodyshop: selectBodyshop, currentUser: selectCurrentUser }); const mapDispatchToProps = (dispatch) => ({ setTimeTicketContext: (context) => dispatch(setModalContext({ context: context, modal: "timeTicket" })) }); -export function TimeTicketsCommit({ bodyshop, currentUser, timeticket, disabled, refetch, setTimeTicketContext }) { +export function TimeTicketsCommit({ currentUser, timeticket, setTimeTicketContext }) { const { t } = useTranslation(); const [updateTimeTicket] = useMutation(UPDATE_TIME_TICKET); const notification = useNotification(); @@ -76,7 +75,8 @@ export function TimeTicketsCommit({ bodyshop, currentUser, timeticket, disabled, message: t("timetickets.successes.committed") }); } - } catch (error) { + } catch { + // NO OP } finally { setLoading(false); } diff --git a/client/src/components/time-tickets-commit/time-tickets-commit.component.jsx b/client/src/components/time-tickets-commit/time-tickets-commit.component.jsx index 82cbbb99e..b926547e7 100644 --- a/client/src/components/time-tickets-commit/time-tickets-commit.component.jsx +++ b/client/src/components/time-tickets-commit/time-tickets-commit.component.jsx @@ -1,28 +1,19 @@ import { useMutation } from "@apollo/client"; import { Button } from "antd"; import dayjs from "../../utils/day"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { UPDATE_TIME_TICKETS } from "../../graphql/timetickets.queries"; -import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors"; +import { selectCurrentUser } from "../../redux/user/user.selectors"; import { useNotification } from "../../contexts/Notifications/notificationContext.jsx"; const mapStateToProps = createStructuredSelector({ - bodyshop: selectBodyshop, currentUser: selectCurrentUser }); -export function TimeTicketsCommit({ - bodyshop, - currentUser, - timetickets, - disabled, - loadingCallback, - completedCallback, - refetch -}) { +export function TimeTicketsCommit({ currentUser, timetickets, disabled, loadingCallback, completedCallback }) { const { t } = useTranslation(); const [updateTimeTickets] = useMutation(UPDATE_TIME_TICKETS); const notification = useNotification(); @@ -71,10 +62,11 @@ export function TimeTicketsCommit({ type: "success", message: t("timetickets.successes.committed") }); - if (!!completedCallback) completedCallback([]); - if (!!loadingCallback) loadingCallback(false); + if (completedCallback) completedCallback([]); + if (loadingCallback) loadingCallback(false); } - } catch (error) { + } catch { + // NOP OP } finally { setLoading(false); } diff --git a/client/src/components/time-tickets-payroll-table/time-tickets-payroll-table.component.jsx b/client/src/components/time-tickets-payroll-table/time-tickets-payroll-table.component.jsx index 0c8d44eca..290fce538 100644 --- a/client/src/components/time-tickets-payroll-table/time-tickets-payroll-table.component.jsx +++ b/client/src/components/time-tickets-payroll-table/time-tickets-payroll-table.component.jsx @@ -1,6 +1,6 @@ import { Button } from "antd"; import queryString from "query-string"; -import React, { useState } from "react"; +import { useState } from "react"; import { useLocation } from "react-router-dom"; import { GenerateDocument } from "../../utils/RenderTemplate"; import { TemplateList } from "../../utils/TemplateConstants"; diff --git a/client/src/components/time-tickets-summary-employees/time-tickets-summary-employees.component.jsx b/client/src/components/time-tickets-summary-employees/time-tickets-summary-employees.component.jsx index 9b45ea36c..0cef49897 100644 --- a/client/src/components/time-tickets-summary-employees/time-tickets-summary-employees.component.jsx +++ b/client/src/components/time-tickets-summary-employees/time-tickets-summary-employees.component.jsx @@ -1,11 +1,10 @@ import { Card, Col, Row, Table } from "antd"; import _ from "lodash"; import dayjs from "../../utils/day"; -import React, { useMemo, useState } from "react"; +import { useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; -import { selectBodyshop } from "../../redux/user/user.selectors"; import { onlyUnique } from "../../utils/arrayHelper"; import { alphaSort } from "../../utils/sorters"; import { TemplateList } from "../../utils/TemplateConstants"; @@ -13,14 +12,12 @@ import PrintWrapperComponent from "../print-wrapper/print-wrapper.component"; import Dinero from "dinero.js"; import InstanceRenderManager from "../../utils/instanceRenderMgr"; -const mapStateToProps = createStructuredSelector({ - bodyshop: selectBodyshop -}); -const mapDispatchToProps = (dispatch) => ({ +const mapStateToProps = createStructuredSelector({}); +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); -export function TimeTicketsSummaryEmployees({ bodyshop, loading, timetickets, startDate, endDate }) { +export function TimeTicketsSummaryEmployees({ loading, timetickets, startDate, endDate }) { //Group everything by employee //Then sum the individual time TimeTicketsSummary. @@ -29,7 +26,7 @@ export function TimeTicketsSummaryEmployees({ bodyshop, loading, timetickets, st timetickets .filter((i) => i.cost_center !== "timetickets.labels.shift") .map((tt) => { - if (!!!jobTicketsByEmployee[tt.employeeid]) { + if (!jobTicketsByEmployee[tt.employeeid]) { jobTicketsByEmployee[tt.employeeid] = []; } jobTicketsByEmployee[tt.employeeid].push(tt); @@ -48,7 +45,7 @@ export function TimeTicketsSummaryEmployees({ bodyshop, loading, timetickets, st timetickets .filter((i) => i.cost_center === "timetickets.labels.shift") .map((tt) => { - if (!!!shiftTicketsByEmployee[tt.employeeid]) { + if (!shiftTicketsByEmployee[tt.employeeid]) { shiftTicketsByEmployee[tt.employeeid] = []; } shiftTicketsByEmployee[tt.employeeid].push(tt); @@ -88,7 +85,7 @@ const JobRelatedTicketsTable = ({ loading, jobTickets, startDate, endDate }) => }); const data = useMemo(() => { return _.flatten( - jobTickets.map((item, idx) => { + jobTickets.map((item) => { const employeeCostCenters = item.tickets.map((i) => i.cost_center).filter(onlyUnique); return employeeCostCenters.map((costCenter) => { diff --git a/client/src/components/tt-approvals-list/tt-approvals-list.component.jsx b/client/src/components/tt-approvals-list/tt-approvals-list.component.jsx index 755415824..bb3b11e07 100644 --- a/client/src/components/tt-approvals-list/tt-approvals-list.component.jsx +++ b/client/src/components/tt-approvals-list/tt-approvals-list.component.jsx @@ -2,12 +2,11 @@ import { SyncOutlined } from "@ant-design/icons"; import { Button, Card, Space, Table, Tag } from "antd"; import Dinero from "dinero.js"; import queryString from "query-string"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { Link, useLocation, useNavigate } from "react-router-dom"; import { createStructuredSelector } from "reselect"; -import { setModalContext } from "../../redux/modals/modals.actions"; import { selectAuthLevel, selectBodyshop } from "../../redux/user/user.selectors"; import { DateFormatter, DateTimeFormatter } from "../../utils/DateFormatter"; import { onlyUnique } from "../../utils/arrayHelper"; @@ -19,22 +18,16 @@ const mapStateToProps = createStructuredSelector({ authLevel: selectAuthLevel }); -const mapDispatchToProps = (dispatch) => ({ - setTimeTicketTaskContext: (context) => dispatch(setModalContext({ context: context, modal: "timeTicketTask" })) -}); +const mapDispatchToProps = () => ({}); export default connect(mapStateToProps, mapDispatchToProps)(TtApprovalsListComponent); export function TtApprovalsListComponent({ bodyshop, - setTimeTicketTaskContext, - authLevel, - disabled, + loading, tt_approval_queue, total, refetch, - techConsole, - jobId, extra }) { const [state, setState] = useState({ @@ -206,7 +199,7 @@ export function TtApprovalsListComponent({ onChange={handleTableChange} rowSelection={{ onSelectAll: (selected, selectedRows) => setSelectedTickets(selectedRows.map((i) => i.id)), - onSelect: (record, selected, selectedRows, nativeEvent) => { + onSelect: (record, selected, selectedRows) => { setSelectedTickets(selectedRows.map((i) => i.id)); }, selectedRowKeys: selectedTickets, diff --git a/client/src/components/tt-approvals-list/tt-approvals-list.container.jsx b/client/src/components/tt-approvals-list/tt-approvals-list.container.jsx index b6a7e31b1..a8564da3b 100644 --- a/client/src/components/tt-approvals-list/tt-approvals-list.container.jsx +++ b/client/src/components/tt-approvals-list/tt-approvals-list.container.jsx @@ -1,22 +1,17 @@ import { useQuery } from "@apollo/client"; import queryString from "query-string"; -import React from "react"; import { connect } from "react-redux"; import { useLocation } from "react-router-dom"; import { createStructuredSelector } from "reselect"; import { QUERY_ALL_TT_APPROVALS_PAGINATED } from "../../graphql/tt-approvals.queries"; -import { setBreadcrumbs, setSelectedHeader } from "../../redux/application/application.actions"; import AlertComponent from "../alert/alert.component"; import TtApprovalsListComponent from "./tt-approvals-list.component"; const mapStateToProps = createStructuredSelector({}); -const mapDispatchToProps = (dispatch) => ({ - setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)), - setSelectedHeader: (key) => dispatch(setSelectedHeader(key)) -}); +const mapDispatchToProps = () => ({}); -export function TimeTicketsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) { +export function TimeTicketsContainer() { const searchParams = queryString.parse(useLocation().search); const { page, sortcolumn, sortorder, search, searchObj } = searchParams; diff --git a/client/src/components/tt-approve-button/tt-approve-button.component.jsx b/client/src/components/tt-approve-button/tt-approve-button.component.jsx index 6028a8ca7..997860943 100644 --- a/client/src/components/tt-approve-button/tt-approve-button.component.jsx +++ b/client/src/components/tt-approve-button/tt-approve-button.component.jsx @@ -2,7 +2,7 @@ import { useApolloClient } from "@apollo/client"; import { Button } from "antd"; import _ from "lodash"; import dayjs from "../../utils/day"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -18,16 +18,7 @@ const mapStateToProps = createStructuredSelector({ authLevel: selectAuthLevel }); -export function TtApproveButton({ - bodyshop, - currentUser, - selectedTickets, - disabled, - authLevel, - loadingCallback, - completedCallback, - refetch -}) { +export function TtApproveButton({ bodyshop, currentUser, selectedTickets, disabled, authLevel }) { const { t } = useTranslation(); const client = useApolloClient(); const notification = useNotification(); diff --git a/client/src/components/update-alert/update-alert.component.jsx b/client/src/components/update-alert/update-alert.component.jsx index 31671a4b5..8c4b22b3f 100644 --- a/client/src/components/update-alert/update-alert.component.jsx +++ b/client/src/components/update-alert/update-alert.component.jsx @@ -15,11 +15,11 @@ const mapStateToProps = createStructuredSelector({ updateAvailable: selectUpdateAvailable }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ // setUserLanguage: language => dispatch(setUserLanguage(language)) }); -export function UpdateAlert({ updateAvailable }) { +export function UpdateAlert() { const { t } = useTranslation(); const [timerStarted, setTimerStarted] = useState(false); const [loading, setLoading] = useState(false); diff --git a/client/src/components/user-request-pw-reset/user-request-reset-pw.component.jsx b/client/src/components/user-request-pw-reset/user-request-reset-pw.component.jsx index 38abe4936..f025e7449 100644 --- a/client/src/components/user-request-pw-reset/user-request-reset-pw.component.jsx +++ b/client/src/components/user-request-pw-reset/user-request-reset-pw.component.jsx @@ -1,5 +1,4 @@ import { Button, Form, Input, Result, Typography } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; diff --git a/client/src/components/user-validate-pw-reset/user-validate-pw-reset.component.jsx b/client/src/components/user-validate-pw-reset/user-validate-pw-reset.component.jsx index 9512a5668..bf678ad35 100644 --- a/client/src/components/user-validate-pw-reset/user-validate-pw-reset.component.jsx +++ b/client/src/components/user-validate-pw-reset/user-validate-pw-reset.component.jsx @@ -1,6 +1,6 @@ import { LockOutlined } from "@ant-design/icons"; import { Button, Form, Input, Result, Typography } from "antd"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { Link } from "react-router-dom"; @@ -60,7 +60,7 @@ export function UserValidatePwReset({ passwordReset, validatePasswordReset, oobC title={t("general.labels.passwordresetvalidatesuccess")} subTitle={t("general.labels.passwordresetvalidatesuccess_sub")} extra={[ - + ]} diff --git a/client/src/components/vehicle-detail-form/vehicle-detail-form.component.jsx b/client/src/components/vehicle-detail-form/vehicle-detail-form.component.jsx index 96e9cca19..b012a13ac 100644 --- a/client/src/components/vehicle-detail-form/vehicle-detail-form.component.jsx +++ b/client/src/components/vehicle-detail-form/vehicle-detail-form.component.jsx @@ -1,11 +1,10 @@ import { Form, Input } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component"; import LayoutFormRow from "../layout-form-row/layout-form-row.component"; import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component.jsx"; -export default function VehicleDetailFormComponent({ form, loading }) { +export default function VehicleDetailFormComponent({ form }) { const { t } = useTranslation(); return ( diff --git a/client/src/components/vehicle-detail-form/vehicle-detail-form.container.jsx b/client/src/components/vehicle-detail-form/vehicle-detail-form.container.jsx index c4530c4fc..98e868798 100644 --- a/client/src/components/vehicle-detail-form/vehicle-detail-form.container.jsx +++ b/client/src/components/vehicle-detail-form/vehicle-detail-form.container.jsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import { useState } from "react"; import { Button, Form, Popconfirm } from "antd"; import { PageHeader } from "@ant-design/pro-layout"; import { useMutation } from "@apollo/client"; @@ -46,7 +46,7 @@ function VehicleDetailFormContainer({ vehicle, refetch }) { variables: { vehId: vehicle.id, vehicle: values } }); - if (!!result.errors) { + if (result.errors) { notification["error"]({ message: t("vehicles.errors.saving", { message: JSON.stringify(result.errors) diff --git a/client/src/components/vehicle-detail-jobs/vehicle-detail-jobs.component.jsx b/client/src/components/vehicle-detail-jobs/vehicle-detail-jobs.component.jsx index 2c15743ee..b3cb1c5c7 100644 --- a/client/src/components/vehicle-detail-jobs/vehicle-detail-jobs.component.jsx +++ b/client/src/components/vehicle-detail-jobs/vehicle-detail-jobs.component.jsx @@ -117,7 +117,7 @@ export function VehicleDetailJobsComponent({ vehicle, bodyshop, isPartsEntry }) onSelect: (record, selected, selectedRows) => { setSelectedJobs(selectedRows ? selectedRows.map((i) => i.id) : []); }, - onSelectAll: (selected, selectedRows, changeRows) => { + onSelectAll: (selected, selectedRows) => { setSelectedJobs( selectedRows ? selectedRows diff --git a/client/src/components/vehicle-detail-update-jobs/vehicle-detail-update-jobs.component.jsx b/client/src/components/vehicle-detail-update-jobs/vehicle-detail-update-jobs.component.jsx index 55f67e240..f0460bfa2 100644 --- a/client/src/components/vehicle-detail-update-jobs/vehicle-detail-update-jobs.component.jsx +++ b/client/src/components/vehicle-detail-update-jobs/vehicle-detail-update-jobs.component.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Button } from "antd"; import { useTranslation } from "react-i18next"; import { useMutation } from "@apollo/client"; @@ -11,7 +10,7 @@ export default function VehicleDetailUpdateJobsComponent({ vehicle, selectedJobs const [updateJobs] = useMutation(UPDATE_JOBS); const notification = useNotification(); - const handlecClick = (e) => { + const handlecClick = () => { logImEXEvent("vehicle_update_jobs"); updateJobs({ @@ -28,7 +27,7 @@ export default function VehicleDetailUpdateJobsComponent({ vehicle, selectedJobs } } }) - .then((response) => { + .then(() => { notification["success"]({ message: t("jobs.successes.updated") }); }) .catch((error) => { diff --git a/client/src/components/vehicle-search-select/vehicle-search-select.component.jsx b/client/src/components/vehicle-search-select/vehicle-search-select.component.jsx index 3dc2d4555..90083b960 100644 --- a/client/src/components/vehicle-search-select/vehicle-search-select.component.jsx +++ b/client/src/components/vehicle-search-select/vehicle-search-select.component.jsx @@ -2,7 +2,7 @@ import { LoadingOutlined } from "@ant-design/icons"; import { useLazyQuery } from "@apollo/client"; import { Empty, Select } from "antd"; import _ from "lodash"; -import React, { forwardRef, useEffect, useState } from "react"; +import { forwardRef, useEffect, useState } from "react"; import { SEARCH_VEHICLES_BY_ID_FOR_AUTOCOMPLETE, SEARCH_VEHICLES_FOR_AUTOCOMPLETE @@ -49,8 +49,8 @@ const VehicleSearchSelect = ({ value, onChange, onBlur, disabled }, ref) => { }; const theOptions = [ - ...(idData && idData.vehicles_by_pk ? [idData.vehicles_by_pk] : []), - ...(data && data.search_vehicles ? data.search_vehicles : []) + ...(idData?.vehicles_by_pk ? [idData.vehicles_by_pk] : []), + ...(data?.search_vehicles ? data.search_vehicles : []) ]; return ( diff --git a/client/src/components/vehicle-vin-display/vehicle-vin-display.component.jsx b/client/src/components/vehicle-vin-display/vehicle-vin-display.component.jsx index 141ed899c..ebe2fd21e 100644 --- a/client/src/components/vehicle-vin-display/vehicle-vin-display.component.jsx +++ b/client/src/components/vehicle-vin-display/vehicle-vin-display.component.jsx @@ -1,5 +1,3 @@ -import React from "react"; - export default function VehicleVinDisplay({ children }) { if (!children) return null; diff --git a/client/src/components/vendor-search-select/vendor-search-select.component.jsx b/client/src/components/vendor-search-select/vendor-search-select.component.jsx index 35b042b73..cc366b7cd 100644 --- a/client/src/components/vendor-search-select/vendor-search-select.component.jsx +++ b/client/src/components/vendor-search-select/vendor-search-select.component.jsx @@ -1,6 +1,6 @@ import { HeartOutlined } from "@ant-design/icons"; import { Select, Space, Tag } from "antd"; -import React, { forwardRef, useEffect, useState } from "react"; +import { forwardRef, useEffect, useState } from "react"; import PhoneNumberFormatter from "../../utils/PhoneFormatter"; const { Option } = Select; @@ -29,7 +29,7 @@ const VendorSearchSelect = ({ value, onChange, options, onSelect, disabled, pref style={{ width: "100%" }} - labelRender={({ label, value, ...rest }) => { + labelRender={({ label, value }) => { if (!value || !options) return label; const discount = options?.find((o) => o.id === value)?.discount; return ( diff --git a/client/src/components/vendors-form/vendors-form.component.jsx b/client/src/components/vendors-form/vendors-form.component.jsx index 3d0853cfa..20aa07d9c 100644 --- a/client/src/components/vendors-form/vendors-form.component.jsx +++ b/client/src/components/vendors-form/vendors-form.component.jsx @@ -3,7 +3,6 @@ import { useApolloClient } from "@apollo/client"; import { useSplitTreatments } from "@splitsoftware/splitio-react"; import { Button, Divider, Form, Input, InputNumber, Select, Space, Switch } from "antd"; import { PageHeader } from "@ant-design/pro-layout"; -import React from "react"; import { useTranslation } from "react-i18next"; import { CHECK_VENDOR_NAME } from "../../graphql/vendors.queries"; import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component"; @@ -19,19 +18,12 @@ import { selectBodyshop } from "../../redux/user/user.selectors"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(VendorsFormComponent); -export function VendorsFormComponent({ - bodyshop, - form, - formLoading, - handleDelete, - responsibilityCenters, - selectedvendor -}) { +export function VendorsFormComponent({ bodyshop, form, formLoading, handleDelete, selectedvendor }) { const { t } = useTranslation(); const client = useApolloClient(); @@ -40,7 +32,7 @@ export function VendorsFormComponent({ } = useSplitTreatments({ attributes: {}, names: ["DmsAp"], - splitKey: bodyshop && bodyshop.imexshopid + splitKey: bodyshop?.imexshopid }); const { getFieldValue } = form; @@ -82,7 +74,7 @@ export function VendorsFormComponent({ required: true //message: t("general.validation.required"), }, - ({ getFieldValue }) => ({ + () => ({ async validator(rule, value) { if (value) { const response = await client.query({ diff --git a/client/src/components/vendors-form/vendors-form.container.jsx b/client/src/components/vendors-form/vendors-form.container.jsx index faeb8d75c..05c249bff 100644 --- a/client/src/components/vendors-form/vendors-form.container.jsx +++ b/client/src/components/vendors-form/vendors-form.container.jsx @@ -1,7 +1,7 @@ import { useMutation, useQuery } from "@apollo/client"; import { Form } from "antd"; import queryString from "query-string"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { useLocation, useNavigate } from "react-router-dom"; @@ -28,7 +28,7 @@ function VendorsFormContainer({ refetch, bodyshop }) { variables: { id: selectedvendor }, fetchPolicy: "network-only", nextFetchPolicy: "network-only", - skip: !!!selectedvendor || selectedvendor === "new" + skip: !selectedvendor || selectedvendor === "new" }); const notification = useNotification(); @@ -54,7 +54,7 @@ function VendorsFormContainer({ refetch, bodyshop }) { delete search.selectedvendor; history({ search: queryString.stringify(search) }); if (refetch) - refetch().then((r) => { + refetch().then(() => { form.resetFields(); }); } diff --git a/client/src/components/vendors-list/vendors-list.component.jsx b/client/src/components/vendors-list/vendors-list.component.jsx index cda137e58..b822d0d4f 100644 --- a/client/src/components/vendors-list/vendors-list.component.jsx +++ b/client/src/components/vendors-list/vendors-list.component.jsx @@ -1,7 +1,7 @@ import { SyncOutlined } from "@ant-design/icons"; import { Button, Card, Input, Space, Table, Tag } from "antd"; import queryString from "query-string"; -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { useLocation } from "react-router-dom"; import { alphaSort } from "../../utils/sorters"; @@ -99,9 +99,9 @@ export default function VendorsListComponent({ handleNewVendor, loading, handleO type: "radio", selectedRowKeys: [selectedvendor] }} - onRow={(record, rowIndex) => { + onRow={(record) => { return { - onClick: (event) => { + onClick: () => { handleOnRowClick(record); } }; diff --git a/client/src/components/vendors-list/vendors-list.container.jsx b/client/src/components/vendors-list/vendors-list.container.jsx index 60f7aa1ba..e9f4bea8c 100644 --- a/client/src/components/vendors-list/vendors-list.container.jsx +++ b/client/src/components/vendors-list/vendors-list.container.jsx @@ -1,6 +1,5 @@ import { useQuery } from "@apollo/client"; import queryString from "query-string"; -import React from "react"; import { useLocation, useNavigate } from "react-router-dom"; import AlertComponent from "../../components/alert/alert.component"; import { QUERY_ALL_VENDORS } from "../../graphql/vendors.queries"; diff --git a/client/src/components/vendors-phonebook-add/vendors-phonebook-add.component.jsx b/client/src/components/vendors-phonebook-add/vendors-phonebook-add.component.jsx index 0f3d0db66..62921985e 100644 --- a/client/src/components/vendors-phonebook-add/vendors-phonebook-add.component.jsx +++ b/client/src/components/vendors-phonebook-add/vendors-phonebook-add.component.jsx @@ -1,5 +1,5 @@ import { Button } from "antd"; -import React, { useState } from "react"; +import { useState } from "react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { selectBodyshop } from "../../redux/user/user.selectors"; @@ -11,7 +11,7 @@ import { useNotification } from "../../contexts/Notifications/notificationContex const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(VendorsPhonebookAdd); diff --git a/client/src/components/wss-status-display/wss-status-display.component.jsx b/client/src/components/wss-status-display/wss-status-display.component.jsx index 6eb2c9223..ecd3fe3cd 100644 --- a/client/src/components/wss-status-display/wss-status-display.component.jsx +++ b/client/src/components/wss-status-display/wss-status-display.component.jsx @@ -1,14 +1,13 @@ import { connect } from "react-redux"; import { GlobalOutlined, WarningOutlined } from "@ant-design/icons"; import { createStructuredSelector } from "reselect"; -import React from "react"; import { selectWssStatus } from "../../redux/application/application.selectors"; const mapStateToProps = createStructuredSelector({ wssStatus: selectWssStatus }); -const mapDispatchToProps = (dispatch) => ({}); +const mapDispatchToProps = () => ({}); export function WssStatusDisplay({ wssStatus }) { console.log("🚀 ~ WssStatusDisplay ~ wssStatus:", wssStatus); diff --git a/client/src/contexts/SocketIO/socketProvider.jsx b/client/src/contexts/SocketIO/socketProvider.jsx index 3b9dc90fa..b5119aed8 100644 --- a/client/src/contexts/SocketIO/socketProvider.jsx +++ b/client/src/contexts/SocketIO/socketProvider.jsx @@ -174,7 +174,7 @@ const SocketProvider = ({ children, bodyshop, navigate, currentUser }) => { break; case "task-created": case "task-updated": - case "task-deleted": + case "task-deleted": { const payload = message.payload; const assignedToId = bodyshop?.employees?.find((e) => e.user_email === currentUser?.email)?.id; if (!assignedToId || payload.assigned_to !== assignedToId) return; @@ -248,6 +248,7 @@ const SocketProvider = ({ children, bodyshop, navigate, currentUser }) => { client.cache.gc(); break; + } default: break; } diff --git a/client/src/firebase/firebase.utils.js b/client/src/firebase/firebase.utils.js index 9a09c8c73..935016afb 100644 --- a/client/src/firebase/firebase.utils.js +++ b/client/src/firebase/firebase.utils.js @@ -25,7 +25,7 @@ export const getCurrentUser = () => { export const updateCurrentUser = (userDetails) => { return new Promise((resolve, reject) => { const unsubscribe = auth.onAuthStateChanged((userAuth) => { - updateProfile(userAuth, userDetails).then((r) => { + updateProfile(userAuth, userDetails).then(() => { unsubscribe(); resolve(userAuth); }); diff --git a/client/src/pages/accounting-payables/accounting-payables.container.jsx b/client/src/pages/accounting-payables/accounting-payables.container.jsx index 4e9b0dcfd..a1b044e9f 100644 --- a/client/src/pages/accounting-payables/accounting-payables.container.jsx +++ b/client/src/pages/accounting-payables/accounting-payables.container.jsx @@ -1,5 +1,5 @@ import { useQuery } from "@apollo/client"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; diff --git a/client/src/pages/accounting-payments/accounting-payments.container.jsx b/client/src/pages/accounting-payments/accounting-payments.container.jsx index e3c01885d..ef9991025 100644 --- a/client/src/pages/accounting-payments/accounting-payments.container.jsx +++ b/client/src/pages/accounting-payments/accounting-payments.container.jsx @@ -1,5 +1,5 @@ import { useQuery } from "@apollo/client"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; diff --git a/client/src/pages/accounting-qbo/accounting-qbo.page.jsx b/client/src/pages/accounting-qbo/accounting-qbo.page.jsx index 136d41b11..dd32bd904 100644 --- a/client/src/pages/accounting-qbo/accounting-qbo.page.jsx +++ b/client/src/pages/accounting-qbo/accounting-qbo.page.jsx @@ -1,21 +1,18 @@ -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import QboAuthorizeComponent from "../../components/qbo-authorize/qbo-authorize.component"; import { setBreadcrumbs, setSelectedHeader } from "../../redux/application/application.actions"; -import { selectBodyshop } from "../../redux/user/user.selectors"; -const mapStateToProps = createStructuredSelector({ - bodyshop: selectBodyshop -}); +const mapStateToProps = createStructuredSelector({}); const mapDispatchToProps = (dispatch) => ({ setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)), setSelectedHeader: (key) => dispatch(setSelectedHeader(key)) }); -export function AccountingReceivablesContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) { +export function AccountingReceivablesContainer({ setBreadcrumbs, setSelectedHeader }) { const { t } = useTranslation(); useEffect(() => { diff --git a/client/src/pages/accounting-receivables/accounting-receivables.container.jsx b/client/src/pages/accounting-receivables/accounting-receivables.container.jsx index 830eb6cfa..a832eeed1 100644 --- a/client/src/pages/accounting-receivables/accounting-receivables.container.jsx +++ b/client/src/pages/accounting-receivables/accounting-receivables.container.jsx @@ -1,5 +1,5 @@ import { useQuery } from "@apollo/client"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; diff --git a/client/src/pages/bills/bills.page.component.jsx b/client/src/pages/bills/bills.page.component.jsx index 5fed28b3c..292cdd9dc 100644 --- a/client/src/pages/bills/bills.page.component.jsx +++ b/client/src/pages/bills/bills.page.component.jsx @@ -18,11 +18,10 @@ import { alphaSort, dateSort } from "../../utils/sorters"; import useLocalStorage from "../../utils/useLocalStorage"; const mapDispatchToProps = (dispatch) => ({ - setPartsOrderContext: (context) => dispatch(setModalContext({ context: context, modal: "partsOrder" })), setBillEnterContext: (context) => dispatch(setModalContext({ context: context, modal: "billEnter" })) }); -export function BillsListPage({ loading, data, refetch, total, setPartsOrderContext, setBillEnterContext }) { +export function BillsListPage({ loading, data, refetch, total, setBillEnterContext }) { const search = queryString.parse(useLocation().search); const [openSearchResults, setOpenSearchResults] = useState([]); const [searchLoading, setSearchLoading] = useState(false); @@ -193,7 +192,6 @@ export function BillsListPage({ loading, data, refetch, total, setPartsOrderCont if (search.search && search.search.trim() !== "") { searchBills(); } - // eslint-disable-next-line react-hooks/exhaustive-deps }, []); async function searchBills(value) { diff --git a/client/src/pages/bills/bills.page.container.jsx b/client/src/pages/bills/bills.page.container.jsx index 5398cb87b..8ea150322 100644 --- a/client/src/pages/bills/bills.page.container.jsx +++ b/client/src/pages/bills/bills.page.container.jsx @@ -1,6 +1,6 @@ import { useQuery } from "@apollo/client"; import queryString from "query-string"; -import React, { useEffect } from "react"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { useLocation } from "react-router-dom"; diff --git a/client/src/pages/contract-create/contract-create.page.component.jsx b/client/src/pages/contract-create/contract-create.page.component.jsx index f4aa406f3..e08894556 100644 --- a/client/src/pages/contract-create/contract-create.page.component.jsx +++ b/client/src/pages/contract-create/contract-create.page.component.jsx @@ -1,7 +1,5 @@ import { Button, Col, Form, Row, Space, Switch } from "antd"; import { PageHeader } from "@ant-design/pro-layout"; - -import React from "react"; import { useTranslation } from "react-i18next"; import ContractCarsContainer from "../../components/contract-cars/contract-cars.container"; import ContractFormComponent from "../../components/contract-form/contract-form.component"; diff --git a/client/src/pages/contract-create/contract-create.page.container.jsx b/client/src/pages/contract-create/contract-create.page.container.jsx index bdbe8a057..e9b86ac4b 100644 --- a/client/src/pages/contract-create/contract-create.page.container.jsx +++ b/client/src/pages/contract-create/contract-create.page.container.jsx @@ -1,6 +1,6 @@ import { useMutation } from "@apollo/client"; import { Card, Form } from "antd"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { useLocation, useNavigate } from "react-router-dom"; diff --git a/client/src/pages/contract-detail/contract-detail.page.component.jsx b/client/src/pages/contract-detail/contract-detail.page.component.jsx index d24f12110..497a3b846 100644 --- a/client/src/pages/contract-detail/contract-detail.page.component.jsx +++ b/client/src/pages/contract-detail/contract-detail.page.component.jsx @@ -1,7 +1,5 @@ import { Button, Col, Dropdown, Form, Row, Space, Typography } from "antd"; import { PageHeader } from "@ant-design/pro-layout"; - -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import ContractConvertToRo from "../../components/contract-convert-to-ro/contract-convert-to-ro.component"; @@ -37,8 +35,8 @@ export function ContractDetailPage({ @@ -78,7 +76,7 @@ export function ContractDetailPage({ {t("general.actions.save")}