import * as R from 'ramda' import { IconButton } from 'src/components/buttons' import { CashIn, CashOutLite } from 'src/components/inputs/cashbox/Cashbox' import { ReactComponent as EditIcon } from 'src/styling/icons/action/edit/enabled.svg' import { fromNamespace } from 'src/utils/config' import { cashUnitCapacity } from 'src/utils/machine' const getElements = ( classes, config, bills, setWizard, widths, setMachineId ) => { console.log(config) const fillingPercentageSettings = fromNamespace('notifications', config) const locale = fromNamespace('locale')(config) const cashout = fromNamespace('cashOut')(config) const fiatCurrency = locale?.fiatCurrency const getCashoutSettings = id => fromNamespace(id)(cashout) const elements = [ { name: 'name', header: 'Machine', width: widths.name, view: m => <>{m.name}, input: ({ field: { value: name } }) => <>{name} }, { name: 'cashbox', header: 'Cashbox', width: widths.cashbox, view: m => ( it.fiat, bills[m.id ?? m.deviceId] ?? []))} width={25} height={45} omitInnerPercentage className={classes.padding} /> ), inputProps: { decimalPlaces: 0 } }, { name: 'cassettes', header: 'Cassettes & Recyclers', width: widths.cassettes, view: m => { return (
{R.map(it => ( ))(R.range(1, m.numberOfCassettes + 1))}
{R.map(it => ( <> {it !== m.numberOfStackers && ( )} ))(R.range(1, m.numberOfStackers + 1))}
) }, inputProps: { decimalPlaces: 0 } }, { name: 'edit', header: 'Edit', width: widths.edit, textAlign: 'center', view: m => { return ( { !R.isNil(setMachineId) && setMachineId(m.id ?? m.deviceId) setWizard(true) }}> ) } } ] return elements } export default { getElements }