Reintroduce cashbox (#535)

* feat: reintroduce cashbox component

* feat: cashbox update on db

* feat: cashbox on notifications

* feat: cashbox on overrides

* fix: cashin notifications

* fix: styling

* feat: cashin bills added to cashbox

* refactor: comment unused code

* fix: new bills length on cashbox

* fix: remove unused code

* chore: remove temporary code
This commit is contained in:
chaotixkilla 2021-01-18 20:23:46 +00:00 committed by GitHub
parent 0d3eb2e392
commit 26c5c427bf
6 changed files with 55 additions and 18 deletions

View file

@ -275,6 +275,7 @@ const typeDefs = gql`
rename
emptyCashInBills
resetCashOutBills
setCassetteBills
unpair
reboot
shutdown
@ -282,7 +283,7 @@ const typeDefs = gql`
}
type Mutation {
machineAction(deviceId:ID!, action: MachineAction!, cassette1: Int, cassette2: Int, newName: String): Machine
machineAction(deviceId:ID!, action: MachineAction!, cashbox: Int, cassette1: Int, cassette2: Int, newName: String): Machine
setCustomer(customerId: ID!, customerInput: CustomerInput): Customer
saveConfig(config: JSONObject): JSONObject
resetConfig(schemaVersion: Int): JSONObject
@ -348,7 +349,7 @@ const resolvers = {
coupons: () => couponManager.getAvailableCoupons()
},
Mutation: {
machineAction: (...[, { deviceId, action, cassette1, cassette2, newName }]) => machineAction({ deviceId, action, cassette1, cassette2, newName }),
machineAction: (...[, { deviceId, action, cashbox, cassette1, cassette2, newName }]) => machineAction({ deviceId, action, cashbox, cassette1, cassette2, newName }),
createPairingTotem: (...[, { name }]) => pairing.totem(name),
saveAccounts: (...[, { accounts }]) => settingsLoader.saveAccounts(accounts),
resetAccounts: (...[, { schemaVersion }]) => settingsLoader.resetAccounts(schemaVersion),