fix: batch creation and UI details
This commit is contained in:
parent
c83b3cda56
commit
3281df1a91
4 changed files with 20 additions and 14 deletions
|
|
@ -10,7 +10,7 @@ const namespaces = {
|
||||||
COIN_ATM_RADAR: 'coinAtmRadar',
|
COIN_ATM_RADAR: 'coinAtmRadar',
|
||||||
TERMS_CONDITIONS: 'termsConditions',
|
TERMS_CONDITIONS: 'termsConditions',
|
||||||
CASH_OUT: 'cashOut',
|
CASH_OUT: 'cashOut',
|
||||||
CASH_IN: 'cashInt',
|
CASH_IN: 'cashIn',
|
||||||
COMPLIANCE: 'compliance'
|
COMPLIANCE: 'compliance'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,22 +2,20 @@ const express = require('express')
|
||||||
const router = express.Router()
|
const router = express.Router()
|
||||||
|
|
||||||
const cashbox = require('../cashbox-batches')
|
const cashbox = require('../cashbox-batches')
|
||||||
const machine = require('../machine-loader')
|
const { getMachine, setMachine } = require('../machine-loader')
|
||||||
const { loadLatestConfig } = require('../new-settings-loader')
|
const { loadLatestConfig } = require('../new-settings-loader')
|
||||||
const { getCashInSettings } = require('../new-config-manager')
|
const { getCashInSettings } = require('../new-config-manager')
|
||||||
|
|
||||||
function notifyCashboxRemoval (req, res, next) {
|
function notifyCashboxRemoval (req, res, next) {
|
||||||
console.log('We got a notification for the cashbox removal!!')
|
return getMachine(req.deviceId)
|
||||||
return machine.getMachine(req.deviceId)
|
|
||||||
.then(machine => {
|
.then(machine => {
|
||||||
loadLatestConfig()
|
loadLatestConfig()
|
||||||
.then(async config => {
|
.then(async config => {
|
||||||
console.log('entered the config')
|
|
||||||
const cashInSettings = getCashInSettings(config)
|
const cashInSettings = getCashInSettings(config)
|
||||||
|
console.log(cashInSettings)
|
||||||
if (cashInSettings.cashboxReset === 'Automatic') {
|
if (cashInSettings.cashboxReset === 'Automatic') {
|
||||||
console.log('We proceed with the cashbox reset!!')
|
|
||||||
await cashbox.createCashboxBatch(req.deviceId, machine.cashbox)
|
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' })
|
return res.status(200).send({ status: 'OK' })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import { CashOut, CashIn } from 'src/components/inputs/cashbox/Cashbox'
|
||||||
import { NumberInput, CashCassetteInput } from 'src/components/inputs/formik'
|
import { NumberInput, CashCassetteInput } from 'src/components/inputs/formik'
|
||||||
import TitleSection from 'src/components/layout/TitleSection'
|
import TitleSection from 'src/components/layout/TitleSection'
|
||||||
import { EmptyTable } from 'src/components/table'
|
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 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 ReverseHistoryIcon } from 'src/styling/icons/circle buttons/history/white.svg'
|
||||||
import { ReactComponent as HistoryIcon } from 'src/styling/icons/circle buttons/history/zodiac.svg'
|
import { ReactComponent as HistoryIcon } from 'src/styling/icons/circle buttons/history/zodiac.svg'
|
||||||
|
|
@ -254,14 +254,14 @@ const CashCassettes = () => {
|
||||||
}}
|
}}
|
||||||
iconClassName={classes.listViewButton}
|
iconClassName={classes.listViewButton}
|
||||||
className={classes.tableWidth}>
|
className={classes.tableWidth}>
|
||||||
<P className={classes.descriptions}>Cashbox reset</P>
|
<Box alignItems="center" justifyContent="end">
|
||||||
<Box display="flex" alignItems="center">
|
<Label1 className={classes.cashboxReset}>Cashbox reset</Label1>
|
||||||
<Box
|
<Box
|
||||||
display="flex"
|
display="flex"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
justifyContent="end"
|
justifyContent="end"
|
||||||
mr="-5px">
|
mr="-4px">
|
||||||
<P>{cashboxReset}</P>
|
<P className={classes.selection}>{cashboxReset}</P>
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={() => setEditingSchema(true)}
|
onClick={() => setEditingSchema(true)}
|
||||||
className={classes.button}>
|
className={classes.button}>
|
||||||
|
|
@ -331,7 +331,7 @@ const CashCassettes = () => {
|
||||||
/>
|
/>
|
||||||
<P className={classes.descriptions}>
|
<P className={classes.descriptions}>
|
||||||
Choose this option if you want your cash-in cashbox count to be
|
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.
|
||||||
</P>
|
</P>
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
name="set-manual-reset"
|
name="set-manual-reset"
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,14 @@ export default {
|
||||||
marginRight: 90
|
marginRight: 90
|
||||||
},
|
},
|
||||||
descriptions: {
|
descriptions: {
|
||||||
color: offColor
|
color: offColor,
|
||||||
|
marginTop: '0px'
|
||||||
|
},
|
||||||
|
cashboxReset: {
|
||||||
|
color: offColor,
|
||||||
|
margin: '13px 0px -5px 20px'
|
||||||
|
},
|
||||||
|
selection: {
|
||||||
|
marginRight: '12px'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue