This commit is contained in:
seb
2026-10-05 01:01:03 +02:00
parent 81b59fd309
commit b766769634
59 changed files with 903 additions and 280 deletions

View File

@@ -10,6 +10,9 @@ import { requireObject } from '../../../utils/apiShape';
import { notifyError } from '../../../utils/notify';
import InputAdornment from '@mui/material/InputAdornment';
import { BrandLabel, BrandThumb } from '../../brand';
import {
PURPLE_BG,
} from '../../../colors';
class PanelValue extends Component {
render() {
@@ -174,7 +177,7 @@ export default class ArticleViewBrand extends PureComponent {
title="Marke"
wide={1}
minHeight={SECOND_ROW_MIN_HEIGHT}
color="#e9d5ff"
color={PURPLE_BG}
contentAlignItems="flex-start"
value={value}
onSave={this.handleSave}

View File

@@ -9,6 +9,10 @@ import { requireObject } from '../../../utils/apiShape';
import { articleEans } from '../../../utils/articleDetail';
import { notifyError } from '../../../utils/notify';
import JsBarcode from 'jsbarcode';
import {
BORDER,
INK,
} from '../../../colors';
class PanelValue extends Component {
render() {
const { label, children } = this.props;
@@ -61,7 +65,7 @@ class SkuBarcode extends PureComponent {
displayValue: false,
margin: 0,
background: 'transparent',
lineColor: '#1e293b',
lineColor: INK,
});
} catch (e) {
console.warn('Barcode render error:', e);
@@ -151,7 +155,7 @@ export default class ArticleViewEANs extends PureComponent {
title={articleData.sku}
wide={1}
minHeight={SECOND_ROW_MIN_HEIGHT}
color="#e2e8f0"
color={BORDER}
contentAlignItems="flex-start"
value={value}
onSave={this.handleSave}

View File

@@ -36,6 +36,10 @@ import attributeAutomat, { selectAttributes } from '../../../automats/attributeA
import artikelAutomat, { getArticle } from '../../../automats/artikelAutomat';
import { notifyError } from '../../../utils/notify';
import articleIndexAutomat from '../../../automats/articleIndexAutomat';
import {
MAGENTA_PANEL,
SHADOW_CARD,
} from '../../../colors';
export default class ArticleViewLists extends PureComponent {
constructor(props) {
@@ -1157,7 +1161,7 @@ export default class ArticleViewLists extends PureComponent {
transition: 'all 0.15s ease-in-out',
'&:hover': {
borderColor: 'primary.main',
boxShadow: '0 1px 4px rgba(0,0,0,0.06)',
boxShadow: SHADOW_CARD,
},
}}
>
@@ -1245,7 +1249,7 @@ export default class ArticleViewLists extends PureComponent {
transition: 'all 0.15s ease-in-out',
'&:hover': {
borderColor: 'primary.main',
boxShadow: '0 1px 4px rgba(0,0,0,0.06)',
boxShadow: SHADOW_CARD,
},
}}
>
@@ -1465,7 +1469,7 @@ export default class ArticleViewLists extends PureComponent {
const parentArticle = parentSku ? getArticle(parentSku) : null;
return (
<PanelTile wide={1} minHeight={200} color="#fbcfe8">
<PanelTile wide={1} minHeight={200} color={MAGENTA_PANEL}>
<Box sx={{ display: 'flex', flexDirection: 'column', height: '100%', gap: 1 }}>
{/* ── Mode 1: Parent Article ──────────────────────────────────────── */}
{isParent ? (
@@ -1640,7 +1644,7 @@ export default class ArticleViewLists extends PureComponent {
transition: 'all 0.15s ease-in-out',
'&:hover': {
borderColor: 'primary.main',
boxShadow: '0 1px 4px rgba(0,0,0,0.06)',
boxShadow: SHADOW_CARD,
},
}}
>

View File

@@ -8,6 +8,9 @@ import { Box, Chip, IconButton } from '@mui/material';
import AddIcon from '@mui/icons-material/Add';
import CategoryPickerDialog from '../CategoryPickerDialog';
import { notifyError } from '../../../utils/notify';
import {
WHITE,
} from '../../../colors';
const articleNameTextSx = {
fontWeight: 700,
@@ -327,7 +330,7 @@ export default class ArticleViewName extends PureComponent {
wide={3}
minHeight={0}
sx={headerTileSx}
color="#ffffff"
color={WHITE}
value={value}
onSave={this.handleSave}
onError={notifyError}

View File

@@ -31,6 +31,10 @@ import { notifyError } from '../../../utils/notify';
import { PriceTaxRow } from './PriceTaxRow';
import TierPricePills from './TierPricePills';
import { PriceUnitRow, PriceUnitCorner } from './PriceUnitRow';
import {
BLUE_PANEL,
BORDER,
} from '../../../colors';
const SECOND_ROW_MIN_HEIGHT = 220;
@@ -481,7 +485,7 @@ export default class ArticleViewPrice extends PureComponent {
<PanelTile
wide={1}
minHeight={SECOND_ROW_MIN_HEIGHT}
color="#e2e8f0"
color={BORDER}
contentAlignItems="flex-start"
>
<Box sx={{ display: 'flex', flexDirection: 'column', height: '100%', width: '100%' }}>
@@ -533,7 +537,7 @@ export default class ArticleViewPrice extends PureComponent {
<EditablePanelTile
wide={1}
minHeight={SECOND_ROW_MIN_HEIGHT}
color="#bfdbfe"
color={BLUE_PANEL}
contentAlignItems="flex-start"
value={priceValue}
onSave={this.handleSave}

View File

@@ -7,6 +7,14 @@ import Tooltip from '@mui/material/Tooltip';
import { PanelTile } from 'dashgui/panels';
import { formatStock } from '../searchFormat';
import ArticleStockAdjustDialog from '../ArticleStockAdjustDialog';
import {
BORDER,
GREEN_PANEL,
PETROL_PANEL,
SORT_GHOST_BG,
TINT_ROW_HOVER,
VEIL_PANEL,
} from '../../../colors';
const SECOND_ROW_MIN_HEIGHT = 220;
@@ -66,7 +74,7 @@ export default class ArticleViewStock extends PureComponent {
<PanelTile
wide={1}
minHeight={SECOND_ROW_MIN_HEIGHT}
color={isParent ? '#e2e8f0' : isStueckliste ? '#cffafe' : '#bbf7d0'}
color={isParent ? BORDER : isStueckliste ? PETROL_PANEL : GREEN_PANEL}
action={
isParent || isStueckliste
? null
@@ -171,7 +179,7 @@ export default class ArticleViewStock extends PureComponent {
mx: -0.5,
transition: 'background-color 0.15s ease',
'&:hover': {
backgroundColor: 'rgba(0, 0, 0, 0.05)',
backgroundColor: TINT_ROW_HOVER,
},
}}
>
@@ -209,7 +217,7 @@ export default class ArticleViewStock extends PureComponent {
mx: -0.5,
transition: 'background-color 0.15s ease',
'&:hover': {
backgroundColor: 'rgba(0, 0, 0, 0.05)',
backgroundColor: TINT_ROW_HOVER,
},
}}
>
@@ -246,7 +254,7 @@ export default class ArticleViewStock extends PureComponent {
pr: 0.5,
'&::-webkit-scrollbar': { width: 4 },
'&::-webkit-scrollbar-thumb': {
backgroundColor: 'rgba(0, 0, 0, 0.15)',
backgroundColor: SORT_GHOST_BG,
borderRadius: 2,
},
}}
@@ -262,7 +270,7 @@ export default class ArticleViewStock extends PureComponent {
py: 0.35,
px: 0.75,
borderRadius: 1,
backgroundColor: 'rgba(255, 255, 255, 0.55)',
backgroundColor: VEIL_PANEL,
}}
>
<Box

View File

@@ -3,6 +3,11 @@ import Box from '@mui/material/Box';
import Chip from '@mui/material/Chip';
import IconButton from '@mui/material/IconButton';
import LayersOutlinedIcon from '@mui/icons-material/LayersOutlined';
import {
TINT_CHIP,
TINT_PILL_ACTIVE,
TINT_STRONG,
} from '../../../colors';
const taxPillSx = {
height: 28,
@@ -27,12 +32,12 @@ export class TaxRatePills extends Component {
sx={{
...taxPillSx,
visibility: active || !readOnly ? 'visible' : 'hidden',
bgcolor: active ? 'rgba(0, 0, 0, 0.14)' : 'rgba(0, 0, 0, 0.06)',
bgcolor: active ? TINT_PILL_ACTIVE : TINT_CHIP,
...(readOnly
? {}
: {
cursor: 'pointer',
'&:hover': { bgcolor: 'rgba(0, 0, 0, 0.12)' },
'&:hover': { bgcolor: TINT_STRONG },
}),
}}
/>

View File

@@ -10,6 +10,9 @@ import StraightenOutlinedIcon from '@mui/icons-material/StraightenOutlined';
import Switch from '@mui/material/Switch';
import TextInput from '../../TextInput';
import { findUnitBySi, unitLabel } from '../../../utils/units';
import {
TINT_PILL,
} from '../../../colors';
const priceUnitCornerSx = {
position: 'absolute',
@@ -49,7 +52,7 @@ export class PriceUnitRow extends Component {
height: 28,
fontSize: 13,
fontWeight: 600,
bgcolor: 'rgba(0, 0, 0, 0.08)',
bgcolor: TINT_PILL,
}}
/>
) : null}

View File

@@ -2,6 +2,9 @@ import { Component } from 'react';
import Box from '@mui/material/Box';
import Chip from '@mui/material/Chip';
import { formatPrice, parsePriceInput } from '../../../utils/price';
import {
TINT_PILL,
} from '../../../colors';
const tierPillSx = {
height: 22,
@@ -24,7 +27,7 @@ export default class TierPricePills extends Component {
label={`ab ${tier.minmultiplier} · ${formatPrice(gross)}`}
sx={{
...tierPillSx,
bgcolor: 'rgba(0, 0, 0, 0.08)',
bgcolor: TINT_PILL,
}}
/>
);