From c0b436f9f217b1d45f22c255514e141ef72c3346 Mon Sep 17 00:00:00 2001 From: seb Date: Fri, 9 Oct 2026 11:33:12 +0200 Subject: [PATCH] u --- .../article/boxes/ArticleViewPrice.jsx | 78 +++++++++---------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/src/components/article/boxes/ArticleViewPrice.jsx b/src/components/article/boxes/ArticleViewPrice.jsx index 0da2659..3a31fff 100644 --- a/src/components/article/boxes/ArticleViewPrice.jsx +++ b/src/components/article/boxes/ArticleViewPrice.jsx @@ -201,11 +201,10 @@ class PriceAmountField extends Component { class PriceDisplay extends Component { render() { - const { saved, taxRates, unitOptions, displaySymbol } = this.props; + const { saved, unitOptions, displaySymbol } = this.props; return ( - onChange({ ...draft, gross })} error={draft.gross !== '' && draftGross == null} /> - onChange({ ...draft, taxRate })} - onOpenTiers={onOpenTiers} - /> onChange({ ...draft, unitamount })} onChangeSi={(unitSi) => onChange({ ...draft, unitSi })} amountError={ - draft.hasUnit && - draft.unitamount !== '' && + draft.hasUnit && draft.unitamount !== '' && (draftAmount == null || draftAmount <= 0) } /> onChange({ ...draft, tiers })} + open={tiersDialogOpen} tiers={draft.tiers ?? []} + onClose={onCloseTiers} onApply={(tiers) => onChange({ ...draft, tiers })} /> ); @@ -557,7 +535,32 @@ export default class ArticleViewPrice extends PureComponent { wide={1} minHeight={SECOND_ROW_MIN_HEIGHT} color={BLUE_PANEL} - title={'€'} + titleContent={({ editing, draft, onChange }) => ( + + + € + + onChange({ ...draft, taxRate }) + : undefined + } + readOnly={!editing} + onOpenTiers={this.openTiersDialog} + /> + + )} contentAlignItems="flex-start" value={priceValue} onSave={this.handleSave} @@ -577,7 +580,6 @@ export default class ArticleViewPrice extends PureComponent { display={ @@ -587,12 +589,10 @@ export default class ArticleViewPrice extends PureComponent { draft={draft} onChange={onChange} inputRef={inputRef} - taxRates={taxRates} unitOptions={unitOptions} displaySymbol={displaySymbol} tiersDialogOpen={tiersDialogOpen} unitEditorOpen={unitEditorOpen} - onOpenTiers={this.openTiersDialog} onCloseTiers={this.closeTiersDialog} onCloseUnitEditor={this.closeUnitEditor} onUnitUpserted={this.refreshUnits}