refactor: make cash box field's width configurable

This commit is contained in:
siiky 2022-11-08 15:16:16 +00:00
parent 2297f98246
commit c338d50086

View file

@ -26,9 +26,9 @@ const CASSETTE_LIST = [
] ]
const widthsByNumberOfCassettes = { const widthsByNumberOfCassettes = {
2: { machine: 230, cassette: 250 }, 2: { machine: 230, cashbox: 150, cassette: 250 },
3: { machine: 216, cassette: 270 }, 3: { machine: 216, cashbox: 150, cassette: 270 },
4: { machine: 210, cassette: 204 } 4: { machine: 210, cashbox: 150, cassette: 204 }
} }
const FiatBalanceOverrides = ({ config, section }) => { const FiatBalanceOverrides = ({ config, section }) => {
@ -147,7 +147,7 @@ const FiatBalanceOverrides = ({ config, section }) => {
{ {
name: CASHBOX_KEY, name: CASHBOX_KEY,
display: 'Cash box', display: 'Cash box',
width: 155, width: widthsByNumberOfCassettes[maxNumberOfCassettes].cashbox,
textAlign: 'right', textAlign: 'right',
bold: true, bold: true,
input: NumberInput, input: NumberInput,