fix: cashout row stripped when editing

This commit is contained in:
José Oliveira 2021-03-11 23:57:54 +00:00 committed by Josh Harvey
parent a5ce5bae56
commit 4cff0a6953

View file

@ -72,6 +72,8 @@ const CashOut = ({ name: SCREEN_KEY }) => {
save(toNamespace(id, { active: !namespaced?.active })) save(toNamespace(id, { active: !namespaced?.active }))
} }
const wasNeverEnabled = it => R.compose(R.length, R.keys)(it) === 1
return ( return (
<> <>
<TitleSection title="Cash-out"> <TitleSection title="Cash-out">
@ -102,7 +104,7 @@ const CashOut = ({ name: SCREEN_KEY }) => {
<EditableTable <EditableTable
namespaces={R.map(R.path(['deviceId']))(machines)} namespaces={R.map(R.path(['deviceId']))(machines)}
data={config} data={config}
stripeWhen={it => !DenominationsSchema.isValidSync(it)} stripeWhen={wasNeverEnabled}
enableEdit enableEdit
editWidth={134} editWidth={134}
enableToggle enableToggle