diff --git a/package-lock.json b/package-lock.json index 6c657d7..5fbcfd3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,8 +12,8 @@ "@emotion/styled": "^11.14.1", "@jsquash/avif": "^2.1.1", "@jsquash/resize": "^2.1.1", - "@mui/icons-material": "^9.4.0", - "@mui/material": "^9.4.0", + "@mui/icons-material": "^9.5.0", + "@mui/material": "^9.5.0", "@shopify/draggable": "^1.2.1", "ag-grid-community": "^36.2.0", "ag-grid-react": "^36.2.0", @@ -28,7 +28,7 @@ "react-dom": "^19.3.0", "react-router-dom": "^7.18.4", "react-virtual-aggridautomat": "file:../react-virtual-aggridautomat", - "react-window": "^2.3.3", + "react-window": "^2.3.4", "skelehash-wasm": "^0.1.0", "sortablejs": "^1.15.7", "thumbhash": "^0.1.1" @@ -40,7 +40,7 @@ "eslint-plugin-react-hooks": "^7.1.1", "globals": "^17.13.0", "qrcode": "^1.5.4", - "vite": "^8.3.2", + "vite": "^8.3.4", "vite-plugin-pwa": "^2.0.0" } }, @@ -2680,9 +2680,9 @@ "license": "MIT" }, "node_modules/@mui/core-downloads-tracker": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-9.4.0.tgz", - "integrity": "sha512-d+gIYM1raJP87yrVQcVg+Q3vycVMArMkgu/TjJLi2vTvO9FHKWNRR1xs9nnN4eLpM9nGxxm02UMvc9BrmcUKvQ==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-9.5.0.tgz", + "integrity": "sha512-PErEpl3Lp+1ZqWYKI7GQU8XSiciAFmLbUAZ7IoaUL598HLy1UAFuEUMEJu8yAS1v8vkXYzWprMVZzky4UwXoOA==", "license": "MIT", "funding": { "type": "opencollective", @@ -2690,12 +2690,12 @@ } }, "node_modules/@mui/icons-material": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-9.4.0.tgz", - "integrity": "sha512-5PVgBYtLOXTk6u0YUAjoV9GoTUQDbeZ8g+pus2h0GphLT/rpmftRnB5D/Kw6QCAovB7EyBX7UxKdZqPBBAHUKw==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-9.5.0.tgz", + "integrity": "sha512-dahtVaqnRUIBgaZ4WC9EdP+LgJ5d2rslASYIX+nDFG6+ssUiM11jQ+Gd1wH8vhUGoNA9ES40MYics5BI8zJFXQ==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.29.7" + "@babel/runtime": "^7.29.7 || ^8.0.5" }, "engines": { "node": ">=14.0.0" @@ -2705,7 +2705,7 @@ "url": "https://opencollective.com/mui-org" }, "peerDependencies": { - "@mui/material": "^9.4.0", + "@mui/material": "^9.5.0", "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, @@ -2716,22 +2716,22 @@ } }, "node_modules/@mui/material": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-9.4.0.tgz", - "integrity": "sha512-6KKUIvkQ2r/s48s9VZV9JEZ1W2dRa7RndVsF+Ipx4CYxDOQeozeRsS5r9NiheFf8A5hpbqJJIGoX7hjg5X4XUw==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-9.5.0.tgz", + "integrity": "sha512-QgqvdVjZoKxP8E8SBxYY6LrdV+kw00moXweZQWBbMMdifPKZAGfUaaXhGKIca6fjKnCL6HJIe/AWWCpqNvyHVw==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.29.7", - "@mui/core-downloads-tracker": "^9.4.0", - "@mui/system": "^9.4.0", - "@mui/types": "^9.4.0", - "@mui/utils": "^9.4.0", + "@babel/runtime": "^7.29.7 || ^8.0.5", + "@mui/core-downloads-tracker": "^9.5.0", + "@mui/system": "^9.5.0", + "@mui/types": "^9.5.0", + "@mui/utils": "^9.5.0", "@popperjs/core": "^2.11.8", "@types/react-transition-group": "^4.4.12", "clsx": "^2.1.1", "csstype": "^3.2.3", "prop-types": "^15.8.1", - "react-is": "^19.2.8", + "react-is": "^19.3.0", "react-transition-group": "^4.4.5" }, "engines": { @@ -2744,7 +2744,7 @@ "peerDependencies": { "@emotion/react": "^11.5.0", "@emotion/styled": "^11.3.0", - "@mui/material-pigment-css": "^9.4.0", + "@mui/material-pigment-css": "^9.5.0", "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" @@ -2765,13 +2765,13 @@ } }, "node_modules/@mui/private-theming": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-9.4.0.tgz", - "integrity": "sha512-qQpX/2XPGDz5F2OIWzo4kkorURlDeXGKytRQudXCdLS5TuwKsMKaZyx77LZEVSB73c7o3UrLWwQ/goRuHBdtjw==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-9.5.0.tgz", + "integrity": "sha512-UHZKySlr4ZJeA5HEhe/Tq1fhsR5573ViKYn7JV80dCVJtgqRQIplRSer1DHPg2Yi22llX7QRhgM0Vtrx4kZHSA==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.29.7", - "@mui/utils": "^9.4.0", + "@babel/runtime": "^7.29.7 || ^8.0.5", + "@mui/utils": "^9.5.0", "prop-types": "^15.8.1" }, "engines": { @@ -2792,12 +2792,12 @@ } }, "node_modules/@mui/styled-engine": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-9.4.0.tgz", - "integrity": "sha512-SlqVEYqnyEgXMFW4JuIDMelyhKzoWBJ85v2mNCQd0XtU0uk7U9E1zaJZ06XqodhA8oJrb+4Q+3E/JlwBe4jWkw==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-9.5.0.tgz", + "integrity": "sha512-IX1ceHnZ0bJgzJRWO/Ayl4ME1rNmpWVYwV28yb089UAMR17rJkV1qfr7ApsWQXXPi1oi+2JapJrWQAiAnTlJHQ==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.29.7", + "@babel/runtime": "^7.29.7 || ^8.0.5", "@emotion/cache": "^11.14.0", "@emotion/serialize": "^1.3.3", "@emotion/sheet": "^1.4.0", @@ -2826,16 +2826,16 @@ } }, "node_modules/@mui/system": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-9.4.0.tgz", - "integrity": "sha512-AZz9z13oGS1J0BYeAFHTbV7PegCtPiE/uMEIi7TJ1kTx3Vkt+jUpLyXF/2uV8B6Y79iTh98kVeOH9fX3x3zXXg==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-9.5.0.tgz", + "integrity": "sha512-OZuAwvoiaaHpvn0a540VH1DUwwmojJubGfNmO2g+nb2ybNDP4/gF7t7aA6AMduELSuJ5yxwlzyFvUO3CfLv1Yg==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.29.7", - "@mui/private-theming": "^9.4.0", - "@mui/styled-engine": "^9.4.0", - "@mui/types": "^9.4.0", - "@mui/utils": "^9.4.0", + "@babel/runtime": "^7.29.7 || ^8.0.5", + "@mui/private-theming": "^9.5.0", + "@mui/styled-engine": "^9.5.0", + "@mui/types": "^9.5.0", + "@mui/utils": "^9.5.0", "clsx": "^2.1.1", "csstype": "^3.2.3", "prop-types": "^15.8.1" @@ -2866,12 +2866,12 @@ } }, "node_modules/@mui/types": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-9.4.0.tgz", - "integrity": "sha512-13DH0Oniua4WmGqeYbQAZqmiN7r4nfd0zwIoGJ5QeJwyIHgEmf+LkRw/jV1HZb6AiUoHX8Oxf4xgalq3vYHcIw==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-9.5.0.tgz", + "integrity": "sha512-O0S6xS80qEQqW2CYNrd4GlBEQ1xpMOHZ5b4zO/DaLu6NZmtthM6smEg0Gz/u9gX5vL+8NB3EiBIxmxSCcG590Q==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.29.7" + "@babel/runtime": "^7.29.7 || ^8.0.5" }, "peerDependencies": { "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0" @@ -2883,17 +2883,17 @@ } }, "node_modules/@mui/utils": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-9.4.0.tgz", - "integrity": "sha512-WkzY8uYtqUDyGKPShrRQRBomfMQHddlsyKu/gRRESYO24tDPD2z0xRE8CBoUsWqpBa+YrFs9KixiS7kQRjsPAQ==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-9.5.0.tgz", + "integrity": "sha512-8m0LfSgE2pj58znY3kZ+anwRKbnBkcu/7AJPA8L/77wEjN0QnpX4/zRAccyplp1VEUnMsUBADeTRin5Mkf7epA==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.29.7", - "@mui/types": "^9.4.0", + "@babel/runtime": "^7.29.7 || ^8.0.5", + "@mui/types": "^9.5.0", "@types/prop-types": "^15.7.15", "clsx": "^2.1.1", "prop-types": "^15.8.1", - "react-is": "^19.2.8" + "react-is": "^19.3.0" }, "engines": { "node": ">=14.0.0" @@ -3796,6 +3796,16 @@ "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", "license": "MIT" }, + "node_modules/@types/react": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz", + "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==", + "license": "MIT", + "peer": true, + "dependencies": { + "csstype": "^3.2.2" + } + }, "node_modules/@types/react-transition-group": { "version": "4.4.12", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.12.tgz", @@ -6849,9 +6859,9 @@ "license": "MIT" }, "node_modules/nanoid": { - "version": "3.3.19", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.19.tgz", - "integrity": "sha512-Y2tUNy4ouw6tq5oDSKeQYGOyhkUBhNOcGV/02KC+6kd9eDGqdZd++mjMiIDilrBYvjEnCYvVtsuHCuP+okSfug==", + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", "dev": true, "funding": [ { @@ -7234,9 +7244,9 @@ } }, "node_modules/postcss": { - "version": "8.5.28", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.28.tgz", - "integrity": "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==", + "version": "8.5.29", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.29.tgz", + "integrity": "sha512-49cGhUbXj8Qenv0iTMxA1cFBzxXoctpC9Ujd77t1WcbJIr6nF/eI7g/8MgxrYldFRuAXvja7xQRwavoW7kgrxQ==", "dev": true, "funding": [ { @@ -7254,9 +7264,9 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.18", + "nanoid": "^3.3.19", "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" + "source-map-js": "^1.2.2" }, "engines": { "node": "^10 || ^12 || >=14" @@ -7505,9 +7515,9 @@ "link": true }, "node_modules/react-window": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/react-window/-/react-window-2.3.3.tgz", - "integrity": "sha512-uu/dTwysXp+YL+i5GW/cC/3JrqyE7oE6DYXYVlTeMaDSDgCI+UGo+XCKwXfS8uoFPih8TJYTnikqjAnbDvn75Q==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/react-window/-/react-window-2.3.4.tgz", + "integrity": "sha512-CnRWoRg+ZnQkLcULSNdbgKJnfcexy9x+9ELOATmDlDv3ZoADyLJc22vN3JRvMV651A6gFwYBlxllU9X+H9dyhQ==", "license": "MIT", "peerDependencies": { "react": "^18.0.0 || ^19.0.0", @@ -8177,9 +8187,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -8762,16 +8772,16 @@ "license": "MIT" }, "node_modules/vite": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.2.tgz", - "integrity": "sha512-SQr1x6W5vVSbROg7vsyXIaxK9b0G7zsT68acdWWRmnBUsgDieLCRG+Rep9WdZgcposvv/GSnr4GUUBqB3vXq6w==", + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.4.tgz", + "integrity": "sha512-IftLE8phJhdNRIGNEV4JCCvfNScoZQVfcXaN8TQropWGJtOHcu+iAB9pHcuGvmEb/kddw0LBe/jS8ztdC6xdiQ==", "dev": true, "license": "MIT", "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.7", - "postcss": "^8.5.28", - "rolldown": "~1.2.11", + "postcss": "^8.5.29", + "rolldown": "~1.2.12", "tinyglobby": "^0.2.17" }, "bin": { diff --git a/package.json b/package.json index a5eeac9..cb250cf 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,8 @@ "@emotion/styled": "^11.14.1", "@jsquash/avif": "^2.1.1", "@jsquash/resize": "^2.1.1", - "@mui/icons-material": "^9.4.0", - "@mui/material": "^9.4.0", + "@mui/icons-material": "^9.5.0", + "@mui/material": "^9.5.0", "@shopify/draggable": "^1.2.1", "ag-grid-community": "^36.2.0", "ag-grid-react": "^36.2.0", @@ -37,7 +37,7 @@ "react-dom": "^19.3.0", "react-router-dom": "^7.18.4", "react-virtual-aggridautomat": "file:../react-virtual-aggridautomat", - "react-window": "^2.3.3", + "react-window": "^2.3.4", "skelehash-wasm": "^0.1.0", "sortablejs": "^1.15.7", "thumbhash": "^0.1.1" @@ -49,7 +49,7 @@ "eslint-plugin-react-hooks": "^7.1.1", "globals": "^17.13.0", "qrcode": "^1.5.4", - "vite": "^8.3.2", + "vite": "^8.3.4", "vite-plugin-pwa": "^2.0.0" }, "allowScripts": { diff --git a/src/components/brand/ArtikelMarke.jsx b/src/components/brand/ArtikelMarke.jsx index 1606707..2ac3163 100644 --- a/src/components/brand/ArtikelMarke.jsx +++ b/src/components/brand/ArtikelMarke.jsx @@ -1,7 +1,9 @@ import { PureComponent } from 'react'; import Box from '@mui/material/Box'; +import Chip from '@mui/material/Chip'; import IconButton from '@mui/material/IconButton'; import ListItem from '@mui/material/ListItem'; +import Tooltip from '@mui/material/Tooltip'; import DeleteOutlinedIcon from '@mui/icons-material/DeleteOutlined'; import ImageSearchIcon from '@mui/icons-material/ImageSearch'; import SingleLineTextEdit from 'dashgui/SingleLineTextEdit'; @@ -111,6 +113,8 @@ class ArtikelMarke extends PureComponent { const name = brand?.name ?? ''; const hasLogo = this.hasLogo(); + const articleCount = brand?.articleCount ?? 0; + return ( <> )} - - {true ? ( - ) : ({draft})} + + 0 ? 'text.primary' : 'text.disabled', + flexShrink: 0, + '& .MuiChip-label': { + px: 0.5, + textAlign: 'center', + width: '100%', + }, + }} + /> { - if (this._cancelled) return; - return { - warehouses: state.filteredWarehouses, - filter: state.filter, - status: state.status, - error: state.error ? backendErrorFrom(state.error) : null, - }; - }); + this.unsub = warehouseAutomat.subscribe(this, (state) => ({ + warehouses: state.filteredWarehouses ?? state.warehouses, + filter: state.filter ?? '', + status: state.status, + error: state.error ? backendErrorFrom(state.error) : null, + })); if (warehouseAutomat.state.status !== 'ready') { void warehouseAutomat.actions.load().catch((err) => notifyError(err)); @@ -265,7 +262,7 @@ class ArtikelLagerPage extends PureComponent { } render() { - const { status, error, warehouses } = this.state; + const { status, error, warehouses, filter } = this.state; const { prefill, returnTo } = getInitialParams(this.props); if (status === 'loading' || status === 'idle') { @@ -280,6 +277,8 @@ class ArtikelLagerPage extends PureComponent { return ; } + const trimmedFilter = filter?.trim() ?? ''; + return ( <> {warehouses.length === 0 ? ( - Noch keine Lager angelegt. + {trimmedFilter + ? `Keine Treffer für „${trimmedFilter}“.` + : 'Noch keine Lager angelegt.'} ) : ( warehouses.map((wh) => (