feat: assign unit destination during cash-in
fix: cash cassettes wizard initial values
This commit is contained in:
parent
2967ad3a75
commit
2d010fc359
3 changed files with 46 additions and 22 deletions
|
|
@ -156,7 +156,7 @@ const Wizard = ({ machine, cashoutSettings, locale, onClose, save, error }) => {
|
|||
])
|
||||
)
|
||||
|
||||
const makeInitialValues = () =>
|
||||
const makeCassettesInitialValues = () =>
|
||||
!R.isEmpty(cashoutSettings)
|
||||
? R.reduce(
|
||||
(acc, value) => {
|
||||
|
|
@ -168,6 +168,22 @@ const Wizard = ({ machine, cashoutSettings, locale, onClose, save, error }) => {
|
|||
)
|
||||
: {}
|
||||
|
||||
const makeStackersInitialValues = () =>
|
||||
!R.isEmpty(cashoutSettings)
|
||||
? R.reduce(
|
||||
(acc, value) => {
|
||||
acc[`stacker${value}f`] = ''
|
||||
acc[`stacker${value}r`] = ''
|
||||
return acc
|
||||
},
|
||||
{},
|
||||
R.range(1, numberOfStackers + 1)
|
||||
)
|
||||
: {}
|
||||
|
||||
const makeInitialValues = () =>
|
||||
R.merge(makeCassettesInitialValues(), makeStackersInitialValues())
|
||||
|
||||
const steps = R.pipe(
|
||||
R.concat(makeStackerSteps(numberOfStackers)),
|
||||
R.concat(makeCassetteSteps(numberOfCassettes)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue