From e822737af6eeae57516573c732ce8b32f0696c81 Mon Sep 17 00:00:00 2001 From: Taranto Date: Sat, 24 Oct 2020 11:10:00 +0100 Subject: [PATCH] fix: disable cash cassettes when no cash-out --- .../src/pages/Maintenance/CashCassettes.js | 11 ++++++++--- new-lamassu-admin/src/pages/ServerLogs.js | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/new-lamassu-admin/src/pages/Maintenance/CashCassettes.js b/new-lamassu-admin/src/pages/Maintenance/CashCassettes.js index 9570a26f..278cc113 100644 --- a/new-lamassu-admin/src/pages/Maintenance/CashCassettes.js +++ b/new-lamassu-admin/src/pages/Maintenance/CashCassettes.js @@ -88,7 +88,8 @@ const CashCassettes = () => { }) } - const getDenomination = id => fromNamespace(id)(cashout) + const getCashoutSettings = id => fromNamespace(id)(cashout) + const isCashOutDisabled = ({ id }) => !getCashoutSettings(id).active const elements = [ { @@ -102,10 +103,11 @@ const CashCassettes = () => { name: 'cassette1', header: 'Cash-out 1', width: 265, + stripe: true, view: (value, { id }) => ( @@ -119,10 +121,11 @@ const CashCassettes = () => { name: 'cassette2', header: 'Cash-out 2', width: 265, + stripe: true, view: (value, { id }) => ( @@ -141,6 +144,8 @@ const CashCassettes = () => { { const getLogLevels = R.compose( R.prepend(SHOW_ALL), R.uniq, + R.concat(['error', 'info', 'debug']), R.map(R.path(['logLevel'])), R.path(['serverLogs']) )