diff --git a/lib/new-config-manager.js b/lib/new-config-manager.js index 3739b576..6f01b1ee 100644 --- a/lib/new-config-manager.js +++ b/lib/new-config-manager.js @@ -10,7 +10,7 @@ const namespaces = { COIN_ATM_RADAR: 'coinAtmRadar', TERMS_CONDITIONS: 'termsConditions', CASH_OUT: 'cashOut', - CASH_IN: 'cashInt', + CASH_IN: 'cashIn', COMPLIANCE: 'compliance' } diff --git a/lib/routes/cashboxRoutes.js b/lib/routes/cashboxRoutes.js index 93e735f9..c39085d7 100644 --- a/lib/routes/cashboxRoutes.js +++ b/lib/routes/cashboxRoutes.js @@ -2,22 +2,20 @@ const express = require('express') const router = express.Router() const cashbox = require('../cashbox-batches') -const machine = require('../machine-loader') +const { getMachine, setMachine } = require('../machine-loader') const { loadLatestConfig } = require('../new-settings-loader') const { getCashInSettings } = require('../new-config-manager') function notifyCashboxRemoval (req, res, next) { - console.log('We got a notification for the cashbox removal!!') - return machine.getMachine(req.deviceId) + return getMachine(req.deviceId) .then(machine => { loadLatestConfig() .then(async config => { - console.log('entered the config') const cashInSettings = getCashInSettings(config) + console.log(cashInSettings) if (cashInSettings.cashboxReset === 'Automatic') { - console.log('We proceed with the cashbox reset!!') await cashbox.createCashboxBatch(req.deviceId, machine.cashbox) - await machine.setMachine({ deviceId: req.deviceId, action: 'emptyCashInBills' }) + await setMachine({ deviceId: req.deviceId, action: 'emptyCashInBills' }) return res.status(200).send({ status: 'OK' }) } }) diff --git a/new-lamassu-admin/src/pages/Maintenance/CashCassettes.js b/new-lamassu-admin/src/pages/Maintenance/CashCassettes.js index 8c6a2b10..46639a01 100644 --- a/new-lamassu-admin/src/pages/Maintenance/CashCassettes.js +++ b/new-lamassu-admin/src/pages/Maintenance/CashCassettes.js @@ -13,7 +13,7 @@ import { CashOut, CashIn } from 'src/components/inputs/cashbox/Cashbox' import { NumberInput, CashCassetteInput } from 'src/components/inputs/formik' import TitleSection from 'src/components/layout/TitleSection' import { EmptyTable } from 'src/components/table' -import { P } from 'src/components/typography' +import { P, Label1 } from 'src/components/typography' import { ReactComponent as EditIcon } from 'src/styling/icons/action/edit/enabled.svg' import { ReactComponent as ReverseHistoryIcon } from 'src/styling/icons/circle buttons/history/white.svg' import { ReactComponent as HistoryIcon } from 'src/styling/icons/circle buttons/history/zodiac.svg' @@ -254,14 +254,14 @@ const CashCassettes = () => { }} iconClassName={classes.listViewButton} className={classes.tableWidth}> -

Cashbox reset

- + + Cashbox reset -

{cashboxReset}

+ mr="-4px"> +

{cashboxReset}

setEditingSchema(true)} className={classes.button}> @@ -331,7 +331,7 @@ const CashCassettes = () => { />

Choose this option if you want your cash-in cashbox count to be - automatically when it is physically removed from the machine. + reset automatically when it is physically removed from the machine.