feat: cashbox batch creation on machine cashbox removal

fix: cashbox batch creation with empty cashbox
This commit is contained in:
Sérgio Salgado 2021-04-28 16:41:27 +01:00 committed by Josh Harvey
parent 482e1afc3a
commit 61cc772816
5 changed files with 15 additions and 13 deletions

View file

@ -5,7 +5,7 @@ const resolvers = {
cashboxBatches: () => cashbox.getBatches()
},
Mutation: {
createBatch: (...[, { deviceId }]) => cashbox.createCashboxBatch(deviceId),
createBatch: (...[, { deviceId, cashboxCount }]) => cashbox.createCashboxBatch(deviceId, cashboxCount),
editBatch: (...[, { id, performedBy }]) => cashbox.editBatchById(id, performedBy)
}
}

View file

@ -16,7 +16,7 @@ const typeDef = gql`
}
type Mutation {
createBatch(deviceId: ID): CashboxBatch
createBatch(deviceId: ID, cashboxCount: Int): CashboxBatch
editBatch(id: ID, performedBy: String): CashboxBatch
}
`