diff --git a/package-lock.json b/package-lock.json
index 8e6d0e2a4..b53e7da72 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -72,13 +72,13 @@
"@typescript-eslint/eslint-plugin": "^8.18",
"@typescript-eslint/parser": "^8.8",
"babel-eslint": "^10.0.3",
- "babel-loader": "^9.1.2",
+ "babel-loader": "^10.0.0",
"babel-plugin-syntax-trailing-function-commas": "^6.22.0",
"babelify": "^10.0.0",
"browserify": "^17.0.0",
"classnames": "^2.5.1",
"compression-webpack-plugin": "^11.1.0",
- "copy-webpack-plugin": "^12.0.2",
+ "copy-webpack-plugin": "^13.0.0",
"css-loader": "^7.1.2",
"eslint": "^9.19.0",
"eslint-config-prettier": "^10.0.1",
@@ -88,7 +88,7 @@
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
- "eslint-webpack-plugin": "^4.2.0",
+ "eslint-webpack-plugin": "^5.0.0",
"html-loader": "^5.1.0",
"html-webpack-plugin": "^5.6.0",
"prettier": "3.3.3",
@@ -2658,18 +2658,6 @@
"integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==",
"dev": true
},
- "node_modules/@sindresorhus/merge-streams": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz",
- "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==",
- "dev": true,
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/@smithy/eventstream-codec": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-1.1.0.tgz",
@@ -3194,10 +3182,11 @@
"license": "MIT"
},
"node_modules/@types/eslint": {
- "version": "8.56.12",
- "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.12.tgz",
- "integrity": "sha512-03ruubjWyOHlmljCVoxSuNDdmfZDzsrrz0P2LeJsOXr+ZwFQ+0yQIwNCwt/GYhV7Z31fgtXJTAEs+FYlEL851g==",
+ "version": "9.6.1",
+ "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz",
+ "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/estree": "*",
"@types/json-schema": "*"
@@ -4654,20 +4643,20 @@
}
},
"node_modules/babel-loader": {
- "version": "9.1.3",
- "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.3.tgz",
- "integrity": "sha512-xG3ST4DglodGf8qSwv0MdeWLhrDsw/32QMdTO5T1ZIp9gQur0HkCyFs7Awskr10JKXFXwpAhiCuYX5oGXnRGbw==",
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-10.0.0.tgz",
+ "integrity": "sha512-z8jt+EdS61AMw22nSfoNJAZ0vrtmhPRVi6ghL3rCeRZI8cdNYFiV5xeV3HbE7rlZZNmGH8BVccwWt8/ED0QOHA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "find-cache-dir": "^4.0.0",
- "schema-utils": "^4.0.0"
+ "find-up": "^5.0.0"
},
"engines": {
- "node": ">= 14.15.0"
+ "node": "^18.20.0 || ^20.10.0 || >=22.0.0"
},
"peerDependencies": {
"@babel/core": "^7.12.0",
- "webpack": ">=5"
+ "webpack": ">=5.61.0"
}
},
"node_modules/babel-plugin-polyfill-corejs2": {
@@ -5419,12 +5408,6 @@
"node": ">=14"
}
},
- "node_modules/common-path-prefix": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz",
- "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==",
- "dev": true
- },
"node_modules/compressible": {
"version": "2.0.18",
"resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz",
@@ -5586,17 +5569,17 @@
"dev": true
},
"node_modules/copy-webpack-plugin": {
- "version": "12.0.2",
- "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-12.0.2.tgz",
- "integrity": "sha512-SNwdBeHyII+rWvee/bTnAYyO8vfVdcSTud4EIb6jcZ8inLeWucJE0DnxXQBjlQ5zlteuuvooGQy3LIyGxhvlOA==",
+ "version": "13.0.0",
+ "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-13.0.0.tgz",
+ "integrity": "sha512-FgR/h5a6hzJqATDGd9YG41SeDViH+0bkHn6WNXCi5zKAZkeESeSxLySSsFLHqLEVCh0E+rITmCf0dusXWYukeQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "fast-glob": "^3.3.2",
"glob-parent": "^6.0.1",
- "globby": "^14.0.0",
"normalize-path": "^3.0.0",
"schema-utils": "^4.2.0",
- "serialize-javascript": "^6.0.2"
+ "serialize-javascript": "^6.0.2",
+ "tinyglobby": "^0.2.12"
},
"engines": {
"node": ">= 18.12.0"
@@ -5609,50 +5592,6 @@
"webpack": "^5.1.0"
}
},
- "node_modules/copy-webpack-plugin/node_modules/globby": {
- "version": "14.0.2",
- "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.2.tgz",
- "integrity": "sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==",
- "dev": true,
- "dependencies": {
- "@sindresorhus/merge-streams": "^2.1.0",
- "fast-glob": "^3.3.2",
- "ignore": "^5.2.4",
- "path-type": "^5.0.0",
- "slash": "^5.1.0",
- "unicorn-magic": "^0.1.0"
- },
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/copy-webpack-plugin/node_modules/path-type": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz",
- "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/copy-webpack-plugin/node_modules/slash": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz",
- "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==",
- "dev": true,
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/core-js": {
"version": "2.6.12",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
@@ -6968,19 +6907,20 @@
}
},
"node_modules/eslint-webpack-plugin": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/eslint-webpack-plugin/-/eslint-webpack-plugin-4.2.0.tgz",
- "integrity": "sha512-rsfpFQ01AWQbqtjgPRr2usVRxhWDuG0YDYcG8DJOteD3EFnpeuYuOwk0PQiN7PRBTqS6ElNdtPZPggj8If9WnA==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/eslint-webpack-plugin/-/eslint-webpack-plugin-5.0.0.tgz",
+ "integrity": "sha512-iDhXf2r55KO1UhMfpus8oGp93wdNF+934q5kEkwa7qn3BH9f51QEC11xQidt+8jfqRnEYYZa2/8lhac7U/vqWw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@types/eslint": "^8.56.10",
+ "@types/eslint": "^9.6.1",
"jest-worker": "^29.7.0",
- "micromatch": "^4.0.5",
+ "micromatch": "^4.0.8",
"normalize-path": "^3.0.0",
- "schema-utils": "^4.2.0"
+ "schema-utils": "^4.3.0"
},
"engines": {
- "node": ">= 14.15.0"
+ "node": ">= 18.12.0"
},
"funding": {
"type": "opencollective",
@@ -7431,22 +7371,6 @@
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
"dev": true
},
- "node_modules/find-cache-dir": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-4.0.0.tgz",
- "integrity": "sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg==",
- "dev": true,
- "dependencies": {
- "common-path-prefix": "^3.0.0",
- "pkg-dir": "^7.0.0"
- },
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/find-up": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
@@ -10431,103 +10355,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/pkg-dir": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-7.0.0.tgz",
- "integrity": "sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA==",
- "dev": true,
- "dependencies": {
- "find-up": "^6.3.0"
- },
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/pkg-dir/node_modules/find-up": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz",
- "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==",
- "dev": true,
- "dependencies": {
- "locate-path": "^7.1.0",
- "path-exists": "^5.0.0"
- },
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/pkg-dir/node_modules/locate-path": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz",
- "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==",
- "dev": true,
- "dependencies": {
- "p-locate": "^6.0.0"
- },
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/pkg-dir/node_modules/p-limit": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz",
- "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==",
- "dev": true,
- "dependencies": {
- "yocto-queue": "^1.0.0"
- },
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/pkg-dir/node_modules/p-locate": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz",
- "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==",
- "dev": true,
- "dependencies": {
- "p-limit": "^4.0.0"
- },
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/pkg-dir/node_modules/path-exists": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz",
- "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==",
- "dev": true,
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- }
- },
- "node_modules/pkg-dir/node_modules/yocto-queue": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz",
- "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==",
- "dev": true,
- "engines": {
- "node": ">=12.20"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/possible-typed-array-names": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz",
@@ -11512,10 +11339,11 @@
}
},
"node_modules/schema-utils": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz",
- "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==",
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.0.tgz",
+ "integrity": "sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/json-schema": "^7.0.9",
"ajv": "^8.9.0",
@@ -11523,7 +11351,7 @@
"ajv-keywords": "^5.1.0"
},
"engines": {
- "node": ">= 12.13.0"
+ "node": ">= 10.13.0"
},
"funding": {
"type": "opencollective",
@@ -12661,6 +12489,51 @@
"node": ">=0.6.0"
}
},
+ "node_modules/tinyglobby": {
+ "version": "0.2.12",
+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.12.tgz",
+ "integrity": "sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fdir": "^6.4.3",
+ "picomatch": "^4.0.2"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/SuperchupuDev"
+ }
+ },
+ "node_modules/tinyglobby/node_modules/fdir": {
+ "version": "6.4.3",
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.3.tgz",
+ "integrity": "sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/tinyglobby/node_modules/picomatch": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
+ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
@@ -13073,18 +12946,6 @@
"node": ">=4"
}
},
- "node_modules/unicorn-magic": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz",
- "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==",
- "dev": true,
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
diff --git a/package.json b/package.json
index 28b02ab3b..3433d454c 100644
--- a/package.json
+++ b/package.json
@@ -46,13 +46,13 @@
"@typescript-eslint/eslint-plugin": "^8.18",
"@typescript-eslint/parser": "^8.8",
"babel-eslint": "^10.0.3",
- "babel-loader": "^9.1.2",
+ "babel-loader": "^10.0.0",
"babel-plugin-syntax-trailing-function-commas": "^6.22.0",
"babelify": "^10.0.0",
"browserify": "^17.0.0",
"classnames": "^2.5.1",
"compression-webpack-plugin": "^11.1.0",
- "copy-webpack-plugin": "^12.0.2",
+ "copy-webpack-plugin": "^13.0.0",
"css-loader": "^7.1.2",
"eslint": "^9.19.0",
"eslint-config-prettier": "^10.0.1",
@@ -62,7 +62,7 @@
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
- "eslint-webpack-plugin": "^4.2.0",
+ "eslint-webpack-plugin": "^5.0.0",
"html-loader": "^5.1.0",
"html-webpack-plugin": "^5.6.0",
"prettier": "3.3.3",
diff --git a/react/assets/forus-platform/scss/_common/dashboard.scss b/react/assets/forus-platform/scss/_common/dashboard.scss
index 7726510c4..d6410b501 100644
--- a/react/assets/forus-platform/scss/_common/dashboard.scss
+++ b/react/assets/forus-platform/scss/_common/dashboard.scss
@@ -904,9 +904,10 @@ body {
}
.mdi {
- margin-right: 5px;
+ margin-right: 7px;
font-size: 20px;
- line-height: inherit;
+ line-height: 30px;
+ height: 30px;
}
&.card-title-sm {
@@ -928,82 +929,75 @@ body {
.card-header {
padding: 15px 20px 14px;
position: relative;
- @include cf();
-
- &:not(.card-header-next) {
- .card-header-drown,
- .block.block-label-tabs,
- .form-control,
- .button {
- margin-top: -2px;
- margin-bottom: -2px;
- }
- }
+ display: flex;
+ flex-direction: row;
+ align-items: center;
- &.card-header-next {
+ .card-header-filters {
display: flex;
flex-direction: row;
+ gap: 10px;
+ align-items: center;
- .card-header-filters {
+ .block-inline-filters {
display: flex;
flex-direction: row;
gap: 10px;
align-items: center;
- .block-inline-filters {
- display: flex;
- flex-direction: row;
- gap: 10px;
- align-items: center;
+ .form-control:not(.select-control) {
+ min-height: auto !important;
- .form-control:not(.select-control) {
- &:not([type='radio']):not([type='checkbox']) {
- height: 30px;
- padding: 0 10px;
- line-height: 28px;
- }
+ &:not([type='radio']):not([type='checkbox']) {
+ height: 30px;
+ padding: 0 10px;
+ line-height: 28px;
}
+ }
- .form-group-inline > .form-label {
- padding-top: 5px;
- padding-bottom: 5px;
- }
+ .form-group-inline > .form-label {
+ padding-top: 5px;
+ padding-bottom: 5px;
+ }
- .select-control {
- height: auto;
+ .block-label-tabs {
+ .label-tab {
+ height: 30px;
+ line-height: 24px;
+ padding-top: 2px;
+ padding-bottom: 2px;
+ font-size: 12px;
- .form-control:not([type='radio']):not([type='checkbox']) {
- padding-right: 30px;
+ .mdi {
+ font-size: 1.36em;
+ line-height: 24px;
}
}
+ }
+
+ .select-control {
+ min-height: auto !important;
- & > * {
- margin: 0 0 0 0;
+ .form-control:not([type='radio']):not([type='checkbox']) {
+ padding-right: 30px;
}
}
- }
- .card-header-actions {
- margin: -1px 0;
- display: flex;
- flex-direction: column;
- gap: 5px;
+ & > * {
+ margin: 0 0 0 0;
+ }
}
+ }
- .block-label-tabs {
- margin-left: 0;
- }
+ .card-header-actions {
+ margin: -1px 0;
+ display: flex;
+ flex-direction: column;
+ gap: 5px;
}
- .card-header-drown {
- .block.block-label-tabs,
- .form-group,
- .block.block-inline-filters .form-group,
- .form-control,
- .button {
- margin-top: 0;
- margin-bottom: 0;
- }
+ .block-label-tabs {
+ margin-left: 0;
}
.button {
@@ -1035,13 +1029,12 @@ body {
}
&.card-header-md {
- padding: 15px 20px;
-
.card-title {
font: 600 14px / 21px var(--base-font);
.mdi {
margin-right: 0;
+ margin-left: -15px;
color: #646f79;
}
}
diff --git a/react/assets/forus-webshop/scss/_common/components/_form.scss b/react/assets/forus-webshop/scss/_common/components/_form.scss
index ef09e65ae..b3466aa33 100644
--- a/react/assets/forus-webshop/scss/_common/components/_form.scss
+++ b/react/assets/forus-webshop/scss/_common/components/_form.scss
@@ -1084,6 +1084,14 @@
&.has-info-btn {
.form-control:not([type='radio']):not([type='checkbox']) {
padding-right: 45px;
+
+ &.select-control {
+ .select-control-input {
+ .select-control-icon {
+ right: 45px;
+ }
+ }
+ }
}
}
}
diff --git a/react/src/dashboard/components/elements/block-card-emails/BlockCardEmails.tsx b/react/src/dashboard/components/elements/block-card-emails/BlockCardEmails.tsx
index 26642b61a..d2aea914c 100644
--- a/react/src/dashboard/components/elements/block-card-emails/BlockCardEmails.tsx
+++ b/react/src/dashboard/components/elements/block-card-emails/BlockCardEmails.tsx
@@ -86,25 +86,21 @@ export default function BlockCardEmails({
return (
-
-
-
- Berichten
- {emailLogs?.meta?.total}
-
-
-
-
-
-
- filterUpdate({ q: e.target.value })}
- />
-
+
+ Berichten
+ {emailLogs?.meta?.total}
+
+
+
diff --git a/react/src/dashboard/components/elements/block-card-notes/BlockCardNotes.tsx b/react/src/dashboard/components/elements/block-card-notes/BlockCardNotes.tsx
index b056a3cdd..c3281c64f 100644
--- a/react/src/dashboard/components/elements/block-card-notes/BlockCardNotes.tsx
+++ b/react/src/dashboard/components/elements/block-card-notes/BlockCardNotes.tsx
@@ -1,11 +1,10 @@
import FilterModel from '../../../types/FilterModel';
import FormValuesModel from '../../../types/FormValuesModel';
import { useCallback, useEffect, useState } from 'react';
-import { ApiResponse, ApiResponseSingle, PaginationData, ResponseError } from '../../../props/ApiResponses';
+import { ApiResponse, ApiResponseSingle, PaginationData } from '../../../props/ApiResponses';
import Paginator from '../../../modules/paginator/components/Paginator';
import useFilter from '../../../hooks/useFilter';
import React from 'react';
-import usePushDanger from '../../../hooks/usePushDanger';
import useOpenModal from '../../../hooks/useOpenModal';
import ModalDangerZone from '../../modals/ModalDangerZone';
import usePushSuccess from '../../../hooks/usePushSuccess';
@@ -18,6 +17,7 @@ import usePaginatorService from '../../../modules/paginator/services/usePaginato
import useTranslate from '../../../hooks/useTranslate';
import LoaderTableCard from '../loader-table-card/LoaderTableCard';
import TableRowActions from '../tables/TableRowActions';
+import usePushApiError from '../../../hooks/usePushApiError';
export default function BlockCardNotes({
isAssigned,
@@ -36,9 +36,9 @@ export default function BlockCardNotes({
const openModal = useOpenModal();
const translate = useTranslate();
- const pushDanger = usePushDanger();
const pushSuccess = usePushSuccess();
const setProgress = useSetProgress();
+ const pushApiError = usePushApiError();
const paginatorService = usePaginatorService();
@@ -79,7 +79,7 @@ export default function BlockCardNotes({
filter.touch();
pushSuccess('Gelukt!', 'Notitie verwijderd.');
})
- .catch((res: ResponseError) => pushDanger('Foutmelding!', res.data.message))
+ .catch(pushApiError)
.finally(() => setProgress(100));
},
text: translate('modals.danger_zone.remove_note.buttons.confirm'),
@@ -87,7 +87,7 @@ export default function BlockCardNotes({
/>
));
},
- [deleteNote, filter, openModal, pushDanger, pushSuccess, setProgress, translate],
+ [deleteNote, filter, openModal, pushApiError, pushSuccess, setProgress, translate],
);
const onAddNote = useCallback(() => {
@@ -120,7 +120,7 @@ export default function BlockCardNotes({
return (
-
+
{translate('notes.header.title')}({notes.meta.total})
diff --git a/react/src/dashboard/components/elements/block-reimbursement-categories/BlockReimbursementCategories.tsx b/react/src/dashboard/components/elements/block-reimbursement-categories/BlockReimbursementCategories.tsx
index 9d72752cc..605735fbd 100644
--- a/react/src/dashboard/components/elements/block-reimbursement-categories/BlockReimbursementCategories.tsx
+++ b/react/src/dashboard/components/elements/block-reimbursement-categories/BlockReimbursementCategories.tsx
@@ -122,25 +122,21 @@ export default function BlockReimbursementCategories({
{!compact && (
-
-
-
- {categories?.meta
- ? `Declaratie categorieën (${categories?.meta.total})`
- : `Declaratie categorieën`}
-
-
+
+ {categories?.meta
+ ? `Declaratie categorieën (${categories?.meta.total})`
+ : `Declaratie categorieën`}
+
-
diff --git a/react/src/dashboard/components/elements/card/Card.tsx b/react/src/dashboard/components/elements/card/Card.tsx
index 44f816d2a..6fedce4a7 100644
--- a/react/src/dashboard/components/elements/card/Card.tsx
+++ b/react/src/dashboard/components/elements/card/Card.tsx
@@ -18,7 +18,7 @@ export default function Card({
}) {
return (
-
+
{title}
{buttons && (
diff --git a/react/src/dashboard/components/elements/funds-provider-products-required-table/FundsProviderProductsRequiredTable.tsx b/react/src/dashboard/components/elements/funds-provider-products-required-table/FundsProviderProductsRequiredTable.tsx
index 1de27927d..f1636333a 100644
--- a/react/src/dashboard/components/elements/funds-provider-products-required-table/FundsProviderProductsRequiredTable.tsx
+++ b/react/src/dashboard/components/elements/funds-provider-products-required-table/FundsProviderProductsRequiredTable.tsx
@@ -18,13 +18,9 @@ export default function FundsProviderProductsRequiredTable({
return (
setShowFunds(!showFunds)}>
-
-
-
-
-
Fondsen die vereisen dat u een aanbod plaatst ({funds.length})
-
-
+
+
+
Fondsen die vereisen dat u een aanbod plaatst ({funds.length})
diff --git a/react/src/dashboard/components/elements/tables/EventLogsTable.tsx b/react/src/dashboard/components/elements/tables/EventLogsTable.tsx
index d1f2e6c05..aef82c1dc 100644
--- a/react/src/dashboard/components/elements/tables/EventLogsTable.tsx
+++ b/react/src/dashboard/components/elements/tables/EventLogsTable.tsx
@@ -135,7 +135,7 @@ export default function EventLogsTable({
return (
-
+
{title || 'Activiteitenlogboek'} ({logs.meta.total})
diff --git a/react/src/dashboard/components/modals/Modal2FADeactivate.tsx b/react/src/dashboard/components/modals/Modal2FADeactivate.tsx
index 1607dc5b2..688df6559 100644
--- a/react/src/dashboard/components/modals/Modal2FADeactivate.tsx
+++ b/react/src/dashboard/components/modals/Modal2FADeactivate.tsx
@@ -9,6 +9,8 @@ import PincodeControl from '../elements/forms/controls/PincodeControl';
import Auth2FAInfoBox from '../elements/auth2fa-info-box/Auth2FAInfoBox';
import useTimer from '../../hooks/useTimer';
import classNames from 'classnames';
+import usePushApiError from '../../hooks/usePushApiError';
+import { ResponseError } from '../../props/ApiResponses';
export default function Modal2FADeactivate({
modal,
@@ -31,6 +33,7 @@ export default function Modal2FADeactivate({
const pushDanger = usePushDanger();
const pushSuccess = usePushSuccess();
+ const pushApiError = usePushApiError();
const timer = useTimer();
const { setTimer } = timer;
@@ -50,13 +53,11 @@ export default function Modal2FADeactivate({
identity2FAService
.send(auth2FA.uuid)
- .then(
- () => (notify ? pushSuccess('Gelukt!', 'We hebben de code opnieuw verstuurd.') : false),
- (res) => pushDanger('Mislukt!', res?.data?.message),
- )
+ .then(() => (notify ? pushSuccess('Gelukt!', 'We hebben de code opnieuw verstuurd.') : false))
+ .catch(pushApiError)
.then(() => setSendingCode(false));
},
- [auth2FA?.uuid, blockResend, identity2FAService, pushDanger, pushSuccess],
+ [auth2FA?.uuid, blockResend, identity2FAService, pushApiError, pushSuccess],
);
const deactivateProvider = useCallback(() => {
@@ -75,16 +76,24 @@ export default function Modal2FADeactivate({
setStep('success');
setErrorCode(null);
})
- .catch((res) => {
- setErrorCode(res?.data?.errors?.code || null);
- pushDanger(
- res.status === 404
- ? 'Er is een fout opgetreden. Vernieuw de pagina.'
- : res.data?.message || 'Unknown error.',
- );
+ .catch((err: ResponseError) => {
+ setErrorCode(err?.data?.errors?.code || null);
+ if (err.status === 404) {
+ return pushDanger('Er is een fout opgetreden. Vernieuw de pagina.');
+ }
+
+ pushApiError(err);
})
.finally(() => window.setTimeout(() => setDeactivating(false), 1000));
- }, [auth2FA.provider_type.key, auth2FA.uuid, confirmationCode, deactivating, identity2FAService, pushDanger]);
+ }, [
+ auth2FA.provider_type.key,
+ auth2FA.uuid,
+ confirmationCode,
+ deactivating,
+ identity2FAService,
+ pushDanger,
+ pushApiError,
+ ]);
const cancel = useCallback(() => {
onCancel?.();
diff --git a/react/src/dashboard/components/modals/Modal2FASetup.tsx b/react/src/dashboard/components/modals/Modal2FASetup.tsx
index 556e5d50f..01766869a 100644
--- a/react/src/dashboard/components/modals/Modal2FASetup.tsx
+++ b/react/src/dashboard/components/modals/Modal2FASetup.tsx
@@ -2,7 +2,6 @@ import React, { useCallback, useEffect, useState } from 'react';
import { ModalState } from '../../modules/modals/context/ModalContext';
import { useIdentity2FAService } from '../../services/Identity2FAService';
import Identity2FA from '../../props/models/Identity2FA';
-import usePushDanger from '../../hooks/usePushDanger';
import usePushSuccess from '../../hooks/usePushSuccess';
import Identity2FAState from '../../props/models/Identity2FAState';
import SelectControl from '../elements/select-control/SelectControl';
@@ -16,6 +15,7 @@ import useTimer from '../../hooks/useTimer';
import { ResponseError } from '../../props/ApiResponses';
import Auth2FAInfoBox from '../elements/auth2fa-info-box/Auth2FAInfoBox';
import classNames from 'classnames';
+import usePushApiError from '../../hooks/usePushApiError';
export default function Modal2FASetup({
modal,
@@ -55,8 +55,8 @@ export default function Modal2FASetup({
const [step, setStep] = useState(null);
const identity2FAService = useIdentity2FAService();
- const pushDanger = usePushDanger();
const pushSuccess = usePushSuccess();
+ const pushApiError = usePushApiError();
const timer = useTimer();
const { setTimer } = timer;
@@ -106,34 +106,32 @@ export default function Modal2FASetup({
type: 'phone',
phone: parseInt(phoneNumber?.toString().replace(/\D/g, '') || 0),
})
- .then(
- (res) => {
- goToStep('provider_confirmation');
- setAuth2FA(res.data?.data);
- blockResend();
- },
- (res) => {
- setPhoneNumberError(res?.data?.errors?.phone);
- pushDanger('Mislukt!', res.data?.message || 'Unknown error.');
- },
- );
- }, [blockResend, goToStep, identity2FAService, phoneNumber, pushDanger]);
+ .then((res) => {
+ goToStep('provider_confirmation');
+ setAuth2FA(res.data?.data);
+ blockResend();
+ })
+ .catch((err: ResponseError) => {
+ setPhoneNumberError(err?.data?.errors?.phone);
+ pushApiError(err);
+ });
+ }, [blockResend, goToStep, identity2FAService, phoneNumber, pushApiError]);
const makeAuthenticator2FA = useCallback(() => {
- identity2FAService.store({ type: 'authenticator' }).then(
- (res) => {
+ identity2FAService
+ .store({ type: 'authenticator' })
+ .then((res) => {
setAuth2FA(res.data?.data);
goToStep('provider_select');
- },
- (res: ResponseError) => {
- pushDanger(res.data?.message || 'Unknown error.');
+ })
+ .catch((err: ResponseError) => {
+ pushApiError(err);
- if (res.status == 429) {
+ if (err.status == 429) {
cancel();
}
- },
- );
- }, [cancel, goToStep, identity2FAService, pushDanger]);
+ });
+ }, [cancel, goToStep, identity2FAService, pushApiError]);
const submitPhoneNumber = useCallback(() => {
makePhone2FA();
@@ -157,12 +155,12 @@ export default function Modal2FASetup({
setActivateAuthErrors(null);
goToStep('success');
})
- .catch((res) => {
- setActivateAuthErrors(res.data?.errors?.code);
- pushDanger(res.data?.message || 'Unknown error.');
+ .catch((err: ResponseError) => {
+ setActivateAuthErrors(err.data?.errors?.code);
+ pushApiError(err);
})
.finally(() => unlock());
- }, [auth2FA, confirmationCode, goToStep, identity2FAService, lock, provider, pushDanger, unlock]);
+ }, [auth2FA, confirmationCode, goToStep, identity2FAService, lock, provider, pushApiError, unlock]);
const verifyAuthProvider = useCallback(() => {
if (!auth2FA || lock()) {
@@ -175,12 +173,12 @@ export default function Modal2FASetup({
setVerifyAuthErrors(null);
goToStep('success');
})
- .catch((res) => {
- setVerifyAuthErrors(res.data?.errors?.code);
- pushDanger(res.data?.message || 'Unknown error.');
+ .catch((err: ResponseError) => {
+ setVerifyAuthErrors(err.data?.errors?.code);
+ pushApiError(err);
})
.finally(() => unlock());
- }, [auth2FA, confirmationCode, goToStep, identity2FAService, lock, pushDanger, unlock]);
+ }, [auth2FA, confirmationCode, goToStep, identity2FAService, lock, pushApiError, unlock]);
const resendCode = useCallback(
(notify = true) => {
@@ -193,13 +191,11 @@ export default function Modal2FASetup({
identity2FAService
.send(auth2FA.uuid)
- .then(
- () => (notify ? pushSuccess('Gelukt!', 'We hebben de code opnieuw verstuurd.') : false),
- (res) => pushDanger('Mislukt!', res?.data?.message),
- )
+ .then(() => (notify ? pushSuccess('Gelukt!', 'We hebben de code opnieuw verstuurd.') : false))
+ .catch(pushApiError)
.then(() => setSendingCode(false));
},
- [auth2FA?.uuid, blockResend, identity2FAService, pushDanger, pushSuccess],
+ [auth2FA?.uuid, blockResend, identity2FAService, pushApiError, pushSuccess],
);
const onKeyDown = useCallback(
diff --git a/react/src/dashboard/components/modals/ModalAddNote.tsx b/react/src/dashboard/components/modals/ModalAddNote.tsx
index ba06792e3..9705e5991 100644
--- a/react/src/dashboard/components/modals/ModalAddNote.tsx
+++ b/react/src/dashboard/components/modals/ModalAddNote.tsx
@@ -6,8 +6,8 @@ import FormValuesModel from '../../types/FormValuesModel';
import { ApiResponseSingle, ResponseError } from '../../props/ApiResponses';
import Note from '../../props/models/Note';
import useSetProgress from '../../hooks/useSetProgress';
-import usePushDanger from '../../hooks/usePushDanger';
import classNames from 'classnames';
+import usePushApiError from '../../hooks/usePushApiError';
export default function ModalAddNote({
modal,
@@ -24,7 +24,7 @@ export default function ModalAddNote({
storeNote: (values: FormValuesModel) => Promise
>;
onCreated: (note?: Note) => void;
}) {
- const pushDanger = usePushDanger();
+ const pushApiError = usePushApiError();
const setProgress = useSetProgress();
const form = useFormBuilder({ description: '' }, () => {
@@ -38,7 +38,7 @@ export default function ModalAddNote({
.catch((err: ResponseError) => {
form.setErrors(err?.data?.errors);
form.setIsLocked(false);
- pushDanger('Mislukt!', err?.data?.message);
+ pushApiError(err);
})
.finally(() => setProgress(100));
});
diff --git a/react/src/dashboard/components/modals/ModalAddPhysicalCard.tsx b/react/src/dashboard/components/modals/ModalAddPhysicalCard.tsx
index b4a667de7..02ade7909 100644
--- a/react/src/dashboard/components/modals/ModalAddPhysicalCard.tsx
+++ b/react/src/dashboard/components/modals/ModalAddPhysicalCard.tsx
@@ -11,7 +11,7 @@ import { usePhysicalCardService } from '../../services/PhysicalCardService';
import { ResponseError } from '../../props/ApiResponses';
import useTranslate from '../../hooks/useTranslate';
import TranslateHtml from '../elements/translate-html/TranslateHtml';
-import usePushDanger from '../../hooks/usePushDanger';
+import usePushApiError from '../../hooks/usePushApiError';
export default function ModalAddPhysicalCard({
modal,
@@ -27,7 +27,7 @@ export default function ModalAddPhysicalCard({
organization: Organization;
}) {
const translate = useTranslate();
- const pushDanger = usePushDanger();
+ const pushApiError = usePushApiError();
const setProgress = useSetProgress();
const physicalCardService = usePhysicalCardService();
@@ -48,7 +48,7 @@ export default function ModalAddPhysicalCard({
})
.catch((err: ResponseError) => {
form.setIsLocked(false);
- pushDanger('Mislukt!', err.data.message);
+ pushApiError(err);
if (err.status === 429) {
return form.setErrors({ code: [err.data.message] });
diff --git a/react/src/dashboard/components/modals/ModalCreatePrevalidation.tsx b/react/src/dashboard/components/modals/ModalCreatePrevalidation.tsx
index 74c9ae46b..07dc57934 100644
--- a/react/src/dashboard/components/modals/ModalCreatePrevalidation.tsx
+++ b/react/src/dashboard/components/modals/ModalCreatePrevalidation.tsx
@@ -13,8 +13,8 @@ import PrevalidationRecord from '../../props/models/PrevalidationRecord';
import { ResponseError } from '../../props/ApiResponses';
import { dateFormat, dateParse } from '../../helpers/dates';
import useSetProgress from '../../hooks/useSetProgress';
-import usePushDanger from '../../hooks/usePushDanger';
import TableEmptyValue from '../elements/table-empty-value/TableEmptyValue';
+import usePushApiError from '../../hooks/usePushApiError';
export default function ModalCreatePrevalidation({
fund,
@@ -29,7 +29,7 @@ export default function ModalCreatePrevalidation({
recordTypes: Array;
onCreated: () => void;
}) {
- const pushDanger = usePushDanger();
+ const pushApiError = usePushApiError();
const setProgress = useSetProgress();
const prevalidationService = usePrevalidationService();
@@ -120,7 +120,7 @@ export default function ModalCreatePrevalidation({
.catch((err: ResponseError) => {
form.setErrors(err.data.errors);
form.setIsLocked(false);
- pushDanger('Mislukt!', err.data.message);
+ pushApiError(err);
setVerificationRequested(false);
})
.finally(() => setProgress(100));
diff --git a/react/src/dashboard/components/modals/ModalFundProviderChatSponsor.tsx b/react/src/dashboard/components/modals/ModalFundProviderChatSponsor.tsx
index d8a7b79e9..5df7505ad 100644
--- a/react/src/dashboard/components/modals/ModalFundProviderChatSponsor.tsx
+++ b/react/src/dashboard/components/modals/ModalFundProviderChatSponsor.tsx
@@ -10,10 +10,9 @@ import FundProviderChatMessage from '../../props/models/FundProviderChatMessage'
import Fund from '../../props/models/Fund';
import FundProvider from '../../props/models/FundProvider';
import useFundProviderChatService from '../../services/FundProviderChatService';
-import { ResponseError } from '../../props/ApiResponses';
-import usePushDanger from '../../hooks/usePushDanger';
import useSetProgress from '../../hooks/useSetProgress';
import SponsorProduct from '../../props/models/Sponsor/SponsorProduct';
+import usePushApiError from '../../hooks/usePushApiError';
export default function ModalFundProviderChatSponsor({
modal,
@@ -34,7 +33,7 @@ export default function ModalFundProviderChatSponsor({
}) {
const envData = useEnvData();
- const pushDanger = usePushDanger();
+ const pushApiError = usePushApiError();
const setProgress = useSetProgress();
const fundProviderChatService = useFundProviderChatService();
@@ -70,12 +69,10 @@ export default function ModalFundProviderChatSponsor({
setMessages(Object.values(groupBy(res.data.data, 'date')));
setTimeoutValue(setTimeout(() => scrollTheChat(forceScroll), 50));
})
- .catch((res: ResponseError) => {
- pushDanger('Mislukt!', res.data.message);
- })
+ .catch(pushApiError)
.finally(() => setProgress(100));
},
- [fundProviderChatService, organization.id, fund.id, fundProvider.id, chat.id, pushDanger, setProgress],
+ [fundProviderChatService, organization.id, fund.id, fundProvider.id, chat.id, setProgress, pushApiError],
);
const form = useFormBuilder(
diff --git a/react/src/dashboard/components/modals/ModalFundTopUp.tsx b/react/src/dashboard/components/modals/ModalFundTopUp.tsx
index aa78e78b0..a90820767 100644
--- a/react/src/dashboard/components/modals/ModalFundTopUp.tsx
+++ b/react/src/dashboard/components/modals/ModalFundTopUp.tsx
@@ -1,13 +1,13 @@
import React, { useCallback, useEffect, useState } from 'react';
import { ModalState } from '../../modules/modals/context/ModalContext';
import { ResponseError } from '../../props/ApiResponses';
-import usePushDanger from '../../hooks/usePushDanger';
import Fund from '../../props/models/Fund';
import { useFundService } from '../../services/FundService';
import useActiveOrganization from '../../hooks/useActiveOrganization';
import { useClipboardService } from '../../services/ClipboardService';
import usePushSuccess from '../../hooks/usePushSuccess';
import useTranslate from '../../hooks/useTranslate';
+import usePushApiError from '../../hooks/usePushApiError';
export default function ModalFundTopUp({
fund,
@@ -21,8 +21,8 @@ export default function ModalFundTopUp({
className?: string;
}) {
const translate = useTranslate();
- const pushDanger = usePushDanger();
const pushSuccess = usePushSuccess();
+ const pushApiError = usePushApiError();
const activeOrganization = useActiveOrganization();
const fundService = useFundService();
@@ -53,10 +53,10 @@ export default function ModalFundTopUp({
setLoaded(true);
})
.catch((err: ResponseError) => {
- pushDanger(err.data.message);
+ pushApiError(err);
closeModal();
});
- }, [activeOrganization.id, closeModal, fund.id, fundService, modal, pushDanger]);
+ }, [activeOrganization.id, closeModal, fund.id, fundService, modal, pushApiError]);
return (
diff --git a/react/src/dashboard/components/modals/ModalFundUnsubscribe.tsx b/react/src/dashboard/components/modals/ModalFundUnsubscribe.tsx
index bde30e913..6a84afa35 100644
--- a/react/src/dashboard/components/modals/ModalFundUnsubscribe.tsx
+++ b/react/src/dashboard/components/modals/ModalFundUnsubscribe.tsx
@@ -5,7 +5,6 @@ import Organization from '../../props/models/Organization';
import { ResponseError } from '../../props/ApiResponses';
import useFormBuilder from '../../hooks/useFormBuilder';
import usePushSuccess from '../../hooks/usePushSuccess';
-import usePushDanger from '../../hooks/usePushDanger';
import FormError from '../elements/forms/errors/FormError';
import DatePickerControl from '../elements/forms/controls/DatePickerControl';
import { dateFormat, dateParse } from '../../helpers/dates';
@@ -15,6 +14,7 @@ import { addDays } from 'date-fns';
import { clickOnKeyEnter } from '../../helpers/wcag';
import useTranslate from '../../hooks/useTranslate';
import classNames from 'classnames';
+import usePushApiError from '../../hooks/usePushApiError';
export default function ModalFundUnsubscribe({
modal,
@@ -32,9 +32,9 @@ export default function ModalFundUnsubscribe({
const [dateMin] = useState(addDays(new Date(), 1));
const translate = useTranslate();
- const pushDanger = usePushDanger();
const pushSuccess = usePushSuccess();
const setProgress = useSetProgress();
+ const pushApiError = usePushApiError();
const fundUnsubscribeService = useFundUnsubscribeService();
@@ -54,7 +54,7 @@ export default function ModalFundUnsubscribe({
onUnsubscribe?.();
})
.catch((err: ResponseError) => {
- pushDanger('Er is iets mis gegaan.', 'Probeer het probleem op te lossen en opnieuw te versturen.');
+ pushApiError(err);
form.setErrors(err.data.errors);
})
.finally(() => {
diff --git a/react/src/dashboard/components/modals/ModalOrderPhysicalCard.tsx b/react/src/dashboard/components/modals/ModalOrderPhysicalCard.tsx
index 6869bcbf0..8cb7278b1 100644
--- a/react/src/dashboard/components/modals/ModalOrderPhysicalCard.tsx
+++ b/react/src/dashboard/components/modals/ModalOrderPhysicalCard.tsx
@@ -7,7 +7,7 @@ import FormError from '../elements/forms/errors/FormError';
import { usePhysicalCardsRequestService } from '../../services/PhysicalCardsRequestService';
import useTranslate from '../../hooks/useTranslate';
import { ResponseError } from '../../props/ApiResponses';
-import usePushDanger from '../../hooks/usePushDanger';
+import usePushApiError from '../../hooks/usePushApiError';
export default function ModalOrderPhysicalCard({
modal,
@@ -21,7 +21,7 @@ export default function ModalOrderPhysicalCard({
onRequested: () => void;
}) {
const translate = useTranslate();
- const pushDanger = usePushDanger();
+ const pushApiError = usePushApiError();
const setProgress = useSetProgress();
const physicalCardsRequestService = usePhysicalCardsRequestService();
@@ -56,7 +56,7 @@ export default function ModalOrderPhysicalCard({
.catch((err: ResponseError) => {
form.setIsLocked(false);
form.setErrors(err.data.errors);
- pushDanger('Mislukt!', err.data.message);
+ pushApiError(err);
setState('form');
})
.finally(() => setProgress(100));
@@ -83,11 +83,11 @@ export default function ModalOrderPhysicalCard({
})
.catch((err: ResponseError) => {
form.setErrors(err.data.errors);
- pushDanger('Mislukt!', err.data.message);
+ pushApiError(err);
})
.finally(() => setProgress(100));
},
- [form, physicalCardsRequestService, pushDanger, setProgress, voucher.address, voucher.fund.organization_id],
+ [form, physicalCardsRequestService, pushApiError, setProgress, voucher.address, voucher.fund.organization_id],
);
return (
diff --git a/react/src/dashboard/components/modals/ModalReimbursementCategoryEdit.tsx b/react/src/dashboard/components/modals/ModalReimbursementCategoryEdit.tsx
index b8dab2151..bb3e9d25e 100644
--- a/react/src/dashboard/components/modals/ModalReimbursementCategoryEdit.tsx
+++ b/react/src/dashboard/components/modals/ModalReimbursementCategoryEdit.tsx
@@ -5,10 +5,10 @@ import useFormBuilder from '../../hooks/useFormBuilder';
import { useReimbursementCategoryService } from '../../services/ReimbursementCategoryService';
import useActiveOrganization from '../../hooks/useActiveOrganization';
import usePushSuccess from '../../hooks/usePushSuccess';
-import usePushDanger from '../../hooks/usePushDanger';
import useSetProgress from '../../hooks/useSetProgress';
import FormError from '../elements/forms/errors/FormError';
import { ResponseError } from '../../props/ApiResponses';
+import usePushApiError from '../../hooks/usePushApiError';
export default function ModalReimbursementCategoryEdit({
modal,
@@ -25,7 +25,7 @@ export default function ModalReimbursementCategoryEdit({
}) {
const activeOrganization = useActiveOrganization();
- const pushDanger = usePushDanger();
+ const pushApiError = usePushApiError();
const pushSuccess = usePushSuccess();
const setProgress = useSetProgress();
@@ -49,7 +49,7 @@ export default function ModalReimbursementCategoryEdit({
onSubmit?.();
})
.catch((err: ResponseError) => {
- pushDanger('Mislukt!', err.data?.message);
+ pushApiError(err);
form.setErrors(err.data?.errors);
form.setIsLocked(false);
})
diff --git a/react/src/dashboard/components/modals/ModalReimbursementDetailsEdit.tsx b/react/src/dashboard/components/modals/ModalReimbursementDetailsEdit.tsx
index 611847ef6..2925d8c0f 100644
--- a/react/src/dashboard/components/modals/ModalReimbursementDetailsEdit.tsx
+++ b/react/src/dashboard/components/modals/ModalReimbursementDetailsEdit.tsx
@@ -7,7 +7,6 @@ import useFormBuilder from '../../hooks/useFormBuilder';
import { useReimbursementsService } from '../../services/ReimbursementService';
import { useReimbursementCategoryService } from '../../services/ReimbursementCategoryService';
import usePushSuccess from '../../hooks/usePushSuccess';
-import usePushDanger from '../../hooks/usePushDanger';
import useSetProgress from '../../hooks/useSetProgress';
import FormError from '../elements/forms/errors/FormError';
import SelectControlOptions from '../elements/select-control/templates/SelectControlOptions';
@@ -15,6 +14,7 @@ import SelectControl from '../elements/select-control/SelectControl';
import ReimbursementCategory from '../../props/models/ReimbursementCategory';
import useOpenModal from '../../hooks/useOpenModal';
import ModalReimbursementCategoriesEdit from '../modals/ModalReimbursementCategoriesEdit';
+import usePushApiError from '../../hooks/usePushApiError';
export default function ModalReimbursementDetailsEdit({
modal,
@@ -32,7 +32,7 @@ export default function ModalReimbursementDetailsEdit({
className?: string;
}) {
const openModal = useOpenModal();
- const pushDanger = usePushDanger();
+ const pushApiError = usePushApiError();
const pushSuccess = usePushSuccess();
const setProgress = useSetProgress();
@@ -61,7 +61,7 @@ export default function ModalReimbursementDetailsEdit({
modal.close();
})
.catch((err: ResponseError) => {
- pushDanger('Mislukt!', err.data.message);
+ pushApiError(err);
form.setErrors(err.data.errors);
form.setIsLocked(false);
})
@@ -75,9 +75,9 @@ export default function ModalReimbursementDetailsEdit({
reimbursementCategoryService
.list(organization.id, { per_page: 100 })
.then((res) => setCategories([{ id: null, name: 'Geen categorie' }, ...res.data.data]))
- .catch((err: ResponseError) => pushDanger('Mislukt!', err.data.message))
+ .catch(pushApiError)
.finally(() => setProgress(100));
- }, [organization.id, pushDanger, reimbursementCategoryService, setProgress]);
+ }, [organization.id, pushApiError, reimbursementCategoryService, setProgress]);
const manageCategories = useCallback(() => {
setShowModal(false);
diff --git a/react/src/dashboard/components/modals/ModalReimbursementResolve.tsx b/react/src/dashboard/components/modals/ModalReimbursementResolve.tsx
index 6f6122382..57fe9d7cd 100644
--- a/react/src/dashboard/components/modals/ModalReimbursementResolve.tsx
+++ b/react/src/dashboard/components/modals/ModalReimbursementResolve.tsx
@@ -7,9 +7,9 @@ import useFormBuilder from '../../hooks/useFormBuilder';
import { useReimbursementsService } from '../../services/ReimbursementService';
import useSetProgress from '../../hooks/useSetProgress';
import usePushSuccess from '../../hooks/usePushSuccess';
-import usePushDanger from '../../hooks/usePushDanger';
import CheckboxControl from '../elements/forms/controls/CheckboxControl';
import Tooltip from '../elements/tooltip/Tooltip';
+import usePushApiError from '../../hooks/usePushApiError';
export default function ModalReimbursementResolve({
modal,
@@ -26,8 +26,8 @@ export default function ModalReimbursementResolve({
onSubmit: (res: ApiResponseSingle
) => void;
className?: string;
}) {
- const pushDanger = usePushDanger();
const pushSuccess = usePushSuccess();
+ const pushApiError = usePushApiError();
const setProgress = useSetProgress();
const reimbursementService = useReimbursementsService();
@@ -63,7 +63,7 @@ export default function ModalReimbursementResolve({
.catch((err: ResponseError) => {
form.setErrors(err.data?.errors);
form.setIsLocked(false);
- pushDanger('Mislukt!', err.data?.message);
+ pushApiError(err);
})
.finally(() => setProgress(100));
},
diff --git a/react/src/dashboard/components/modals/ModalSocialMediaEdit.tsx b/react/src/dashboard/components/modals/ModalSocialMediaEdit.tsx
index 1724dfdde..b684011fe 100644
--- a/react/src/dashboard/components/modals/ModalSocialMediaEdit.tsx
+++ b/react/src/dashboard/components/modals/ModalSocialMediaEdit.tsx
@@ -11,8 +11,8 @@ import ImplementationSocialMedia from '../../props/models/ImplementationSocialMe
import Implementation from '../../props/models/Implementation';
import useImplementationSocialMediaService from '../../services/ImplementationSocialMediaService';
import usePushSuccess from '../../hooks/usePushSuccess';
-import usePushDanger from '../../hooks/usePushDanger';
import useSetProgress from '../../hooks/useSetProgress';
+import usePushApiError from '../../hooks/usePushApiError';
export default function ModalSocialMediaEdit({
modal,
@@ -31,8 +31,8 @@ export default function ModalSocialMediaEdit({
organization: Organization;
implementation: Implementation;
}) {
- const pushDanger = usePushDanger();
const pushSuccess = usePushSuccess();
+ const pushApiError = usePushApiError();
const setProgress = useSetProgress();
const implementationSocialMediaService = useImplementationSocialMediaService();
@@ -69,9 +69,9 @@ export default function ModalSocialMediaEdit({
onSubmit();
modal.close();
})
- .catch((res: ResponseError) => {
- pushDanger('Error!', res?.data?.message);
- form.setErrors(res.data.errors);
+ .catch((err: ResponseError) => {
+ pushApiError(err);
+ form.setErrors(err.data.errors);
})
.finally(() => {
form.setIsLocked(false);
diff --git a/react/src/dashboard/components/modals/ModalVoucherCreate.tsx b/react/src/dashboard/components/modals/ModalVoucherCreate.tsx
index 7707a3dd8..83e250034 100644
--- a/react/src/dashboard/components/modals/ModalVoucherCreate.tsx
+++ b/react/src/dashboard/components/modals/ModalVoucherCreate.tsx
@@ -23,6 +23,7 @@ import ModalNotification from './ModalNotification';
import SelectControlOptionsFund from '../elements/select-control/templates/SelectControlOptionsFund';
import FormGroupInfo from '../elements/forms/elements/FormGroupInfo';
import TranslateHtml from '../elements/translate-html/TranslateHtml';
+import usePushApiError from '../../hooks/usePushApiError';
export default function ModalVoucherCreate({
funds,
@@ -43,6 +44,7 @@ export default function ModalVoucherCreate({
const openModal = useOpenModal();
const pushDanger = usePushDanger();
const setProgress = useSetProgress();
+ const pushApiError = usePushApiError();
const voucherService = useVoucherService();
const productService = useProductService();
@@ -126,7 +128,7 @@ export default function ModalVoucherCreate({
.catch((err: ResponseError) => {
form.setErrors(err.data.errors);
form.setIsLocked(false);
- pushDanger('Mislukt!', err.data.message);
+ pushApiError(err);
})
.finally(() => {
setProgress(100);
@@ -197,7 +199,7 @@ export default function ModalVoucherCreate({
}
})
.catch((err: ResponseError) => {
- pushDanger('Mislukt!', err.data.message);
+ pushApiError(err);
form.setErrors(err.data.errors);
form.setIsLocked(false);
})
diff --git a/react/src/dashboard/components/modals/ModalVoucherQRCode.tsx b/react/src/dashboard/components/modals/ModalVoucherQRCode.tsx
index ff49be3bb..461b035fe 100644
--- a/react/src/dashboard/components/modals/ModalVoucherQRCode.tsx
+++ b/react/src/dashboard/components/modals/ModalVoucherQRCode.tsx
@@ -5,7 +5,6 @@ import FormError from '../elements/forms/errors/FormError';
import Voucher from '../../props/models/Voucher';
import useVoucherService from '../../services/VoucherService';
import useActiveOrganization from '../../hooks/useActiveOrganization';
-import usePushDanger from '../../hooks/usePushDanger';
import QrCode from '../elements/qr-code/QrCode';
import SelectControl from '../elements/select-control/SelectControl';
import { ResponseError } from '../../props/ApiResponses';
@@ -16,6 +15,7 @@ import VoucherQrCodePrintable from '../../../webshop/components/printable/Vouche
import useOpenPrintable from '../../hooks/useOpenPrintable';
import useAssetUrl from '../../hooks/useAssetUrl';
import Fund from '../../props/models/Fund';
+import usePushApiError from '../../hooks/usePushApiError';
export default function ModalVoucherQRCode({
fund,
@@ -36,8 +36,8 @@ export default function ModalVoucherQRCode({
}) {
const assetUrl = useAssetUrl();
const translate = useTranslate();
- const pushDanger = usePushDanger();
const setProgress = useSetProgress();
+ const pushApiError = usePushApiError();
const openPrintable = useOpenPrintable();
const activeOrganization = useActiveOrganization();
@@ -78,10 +78,10 @@ export default function ModalVoucherQRCode({
onAssigned(res.data.data);
setSuccess(true);
})
- .catch((res: ResponseError) => {
- form.setErrors(res.data.errors);
+ .catch((err: ResponseError) => {
+ form.setErrors(err.data.errors);
form.setIsLocked(false);
- pushDanger('Error!', res.data.message);
+ pushApiError(err);
})
.finally(() => {
form.setIsLocked(false);
diff --git a/react/src/dashboard/components/modals/ModalVoucherRecordEdit.tsx b/react/src/dashboard/components/modals/ModalVoucherRecordEdit.tsx
index 0cb89fb3e..a122541c7 100644
--- a/react/src/dashboard/components/modals/ModalVoucherRecordEdit.tsx
+++ b/react/src/dashboard/components/modals/ModalVoucherRecordEdit.tsx
@@ -10,11 +10,12 @@ import Organization from '../../props/models/Organization';
import { useRecordTypeService } from '../../services/RecordTypeService';
import RecordType from '../../props/models/RecordType';
import useVoucherRecordService from '../../services/VoucherRecordService';
-import usePushDanger from '../../hooks/usePushDanger';
import usePushSuccess from '../../hooks/usePushSuccess';
import VoucherRecord from '../../props/models/VoucherRecord';
import { dateFormat, dateParse } from '../../helpers/dates';
import DatePickerControl from '../elements/forms/controls/DatePickerControl';
+import usePushApiError from '../../hooks/usePushApiError';
+import { ResponseError } from '../../props/ApiResponses';
export default function ModalVoucherRecordEdit({
modal,
@@ -31,9 +32,9 @@ export default function ModalVoucherRecordEdit({
className?: string;
organization: Organization;
}) {
- const pushDanger = usePushDanger();
const pushSuccess = usePushSuccess();
const setProgress = useSetProgress();
+ const pushApiError = usePushApiError();
const recordTypeService = useRecordTypeService();
const voucherRecordService = useVoucherRecordService();
@@ -68,9 +69,9 @@ export default function ModalVoucherRecordEdit({
pushSuccess('Gelukt!', 'Persoonsgegeven is toegevoegd!');
modal.close();
})
- .catch((res) => {
- form.setErrors(res.data?.errors);
- pushDanger('Foutmelding!', res.data.message);
+ .catch((err: ResponseError) => {
+ form.setErrors(err.data?.errors);
+ pushApiError(err);
})
.finally(() => form.setIsLocked(false));
},
@@ -100,9 +101,9 @@ export default function ModalVoucherRecordEdit({
voucherRecordService
.list(organization.id, voucher.id, { per_page: 100 })
.then((res) => setExistingRecordTypes(res.data.data.map((record) => record.record_type_key)))
- .catch((res) => pushDanger('Mislukt!', res.data.message))
+ .catch(pushApiError)
.finally(() => setProgress(100));
- }, [organization.id, setProgress, voucher.id, voucherRecordService, pushDanger]);
+ }, [organization.id, setProgress, voucher.id, voucherRecordService, pushApiError]);
useEffect(() => {
fetchExistingRecordTypes();
diff --git a/react/src/dashboard/components/modals/ModalVoucherTransaction/ModalVoucherTransaction.tsx b/react/src/dashboard/components/modals/ModalVoucherTransaction/ModalVoucherTransaction.tsx
index 559307582..ac3a09976 100644
--- a/react/src/dashboard/components/modals/ModalVoucherTransaction/ModalVoucherTransaction.tsx
+++ b/react/src/dashboard/components/modals/ModalVoucherTransaction/ModalVoucherTransaction.tsx
@@ -9,7 +9,6 @@ import Fund from '../../../props/models/Fund';
import { useOrganizationService } from '../../../services/OrganizationService';
import { useReimbursementsService } from '../../../services/ReimbursementService';
import useVoucherService from '../../../services/VoucherService';
-import usePushDanger from '../../../hooks/usePushDanger';
import SelectControl from '../../elements/select-control/SelectControl';
import SelectControlOptions from '../../elements/select-control/templates/SelectControlOptions';
import FormError from '../../elements/forms/errors/FormError';
@@ -18,6 +17,8 @@ import ModalVoucherTransactionPreview from './ModalVoucherTransactionPreview';
import Reimbursement from '../../../props/models/Reimbursement';
import useSetProgress from '../../../hooks/useSetProgress';
import useTranslate from '../../../hooks/useTranslate';
+import usePushApiError from '../../../hooks/usePushApiError';
+import { ResponseError } from '../../../props/ApiResponses';
import InfoBox from '../../elements/info-box/InfoBox';
type ReimbursementLocale = Partial;
@@ -39,8 +40,8 @@ export default function ModalVoucherTransaction({
}) {
const translate = useTranslate();
- const pushDanger = usePushDanger();
const setProgress = useSetProgress();
+ const pushApiError = usePushApiError();
const fundService = useFundService();
const voucherService = useVoucherService();
@@ -155,10 +156,10 @@ export default function ModalVoucherTransaction({
setState('finish');
onCreated?.();
})
- .catch((res) => {
- form.setErrors(res.data.errors);
+ .catch((err: ResponseError) => {
+ form.setErrors(err.data.errors);
setState('form');
- pushDanger('Mislukt!', res.data.message);
+ pushApiError(err);
})
.finally(() => {
setProgress(100);
diff --git a/react/src/dashboard/components/pages/auth/SignUpProvider.tsx b/react/src/dashboard/components/pages/auth/SignUpProvider.tsx
index 9a5db6dfa..989ebf1e2 100644
--- a/react/src/dashboard/components/pages/auth/SignUpProvider.tsx
+++ b/react/src/dashboard/components/pages/auth/SignUpProvider.tsx
@@ -46,9 +46,9 @@ import useFilter from '../../../hooks/useFilter';
import useDemoTransactionService from '../../../services/DemoTransactionService';
import { uniq } from 'lodash';
import useAppConfigs from '../../../hooks/useAppConfigs';
-import usePushDanger from '../../../hooks/usePushDanger';
import useTranslate from '../../../hooks/useTranslate';
import SignUpFooter from '../../../../webshop/components/elements/sign-up/SignUpFooter';
+import usePushApiError from '../../../hooks/usePushApiError';
type OfficeLocal = Office & { edit?: boolean };
@@ -58,7 +58,7 @@ export default function SignUpProvider() {
const appConfigs = useAppConfigs();
const translate = useTranslate();
- const pushDanger = usePushDanger();
+ const pushApiError = usePushApiError();
const [printDebug] = useState(false);
@@ -347,13 +347,13 @@ export default function SignUpProvider() {
});
});
})
- .catch((err: ResponseError) => pushDanger('Mislukt!', err.data.message));
+ .catch(pushApiError);
},
}}
/>
));
},
- [officeService, openModal, pushDanger],
+ [officeService, openModal, pushApiError],
);
const addOffice = useCallback(() => {
diff --git a/react/src/dashboard/components/pages/bank-connections/BankConnections.tsx b/react/src/dashboard/components/pages/bank-connections/BankConnections.tsx
index e8a9c57b1..4c10e57c3 100644
--- a/react/src/dashboard/components/pages/bank-connections/BankConnections.tsx
+++ b/react/src/dashboard/components/pages/bank-connections/BankConnections.tsx
@@ -19,6 +19,7 @@ import useConfirmBankConnectionDisable from './hooks/useConfirmBankConnectionDis
import useConfirmBankNewConnection from './hooks/useConfirmBankNewConnection';
import LoadingCard from '../../elements/loading-card/LoadingCard';
import EmptyCard from '../../elements/empty-card/EmptyCard';
+import usePushApiError from '../../../hooks/usePushApiError';
import useConfigurableTable from '../vouchers/hooks/useConfigurableTable';
import TableTopScroller from '../../elements/tables/TableTopScroller';
@@ -29,6 +30,7 @@ export default function BankConnections() {
const openModal = useOpenModal();
const pushDanger = usePushDanger();
const pushSuccess = usePushSuccess();
+ const pushApiError = usePushApiError();
const confirmBankNewConnection = useConfirmBankNewConnection();
const confirmBankConnectionDisable = useConfirmBankConnectionDisable();
@@ -67,9 +69,9 @@ export default function BankConnections() {
const onRequestError = useCallback(
(err: ResponseError) => {
- pushDanger('Error', err.data.message || 'Er is iets misgegaan, probeer het later opnieuw.');
+ pushApiError(err, 'Er is iets misgegaan, probeer het later opnieuw.');
},
- [pushDanger],
+ [pushApiError],
);
const fetchBanks = useCallback(() => {
diff --git a/react/src/dashboard/components/pages/bi-connection/BiConnection.tsx b/react/src/dashboard/components/pages/bi-connection/BiConnection.tsx
index 304a0ce52..388154bb9 100644
--- a/react/src/dashboard/components/pages/bi-connection/BiConnection.tsx
+++ b/react/src/dashboard/components/pages/bi-connection/BiConnection.tsx
@@ -11,7 +11,6 @@ import { useBiConnectionService } from '../../../services/BiConnectionService';
import { chunk } from 'lodash';
import ModalDangerZone from '../../modals/ModalDangerZone';
import useOpenModal from '../../../hooks/useOpenModal';
-import usePushDanger from '../../../hooks/usePushDanger';
import usePushSuccess from '../../../hooks/usePushSuccess';
import BiConnectionDataType from '../../../props/models/BiConnectionDataType';
import { StringParam } from 'use-query-params';
@@ -25,6 +24,7 @@ import LoadingCard from '../../elements/loading-card/LoadingCard';
import InfoBox from '../../elements/info-box/InfoBox';
import FormGroupInfo from '../../elements/forms/elements/FormGroupInfo';
import BlockLabelTabs from '../../elements/block-label-tabs/BlockLabelTabs';
+import usePushApiError from '../../../hooks/usePushApiError';
export default function BiConnection() {
const auth2FAState = useAuthIdentity2FAState();
@@ -33,9 +33,9 @@ export default function BiConnection() {
const openModal = useOpenModal();
const translate = useTranslate();
- const pushDanger = usePushDanger();
const pushSuccess = usePushSuccess();
const setProgress = useSetProgress();
+ const pushApiError = usePushApiError();
const biConnectionService = useBiConnectionService();
@@ -106,7 +106,7 @@ export default function BiConnection() {
filtersUpdate({ view_type: 'security' });
}
- pushDanger(err.data?.message || 'Onbekende foutmelding!');
+ pushApiError(err);
})
.finally(() => {
setIpError(null);
@@ -152,10 +152,10 @@ export default function BiConnection() {
setConnection(res.data.data);
pushSuccess('Opgeslagen!');
})
- .catch((err: ResponseError) => pushDanger(err.data?.message || 'Foutmelding!'))
+ .catch(pushApiError)
.finally(() => setProgress(100));
});
- }, [setProgress, activeOrganization.id, askConfirmation, biConnectionService, pushDanger, pushSuccess]);
+ }, [setProgress, activeOrganization.id, askConfirmation, biConnectionService, pushApiError, pushSuccess]);
const addIp = useCallback(() => {
if (!ip) {
@@ -262,7 +262,7 @@ export default function BiConnection() {