chore: use monorepo organization
This commit is contained in:
parent
deaf7d6ecc
commit
a687827f7e
1099 changed files with 8184 additions and 11535 deletions
|
|
@ -1,17 +0,0 @@
|
|||
const { parseAsync } = require('json2csv')
|
||||
const cashbox = require('../../../cashbox-batches')
|
||||
const logDateFormat = require('../../../logs').logDateFormat
|
||||
|
||||
const resolvers = {
|
||||
Query: {
|
||||
cashboxBatches: () => cashbox.getBatches(),
|
||||
cashboxBatchesCsv: (...[, { from, until, timezone }]) => cashbox.getBatches(from, until)
|
||||
.then(data => parseAsync(logDateFormat(timezone, cashbox.logFormatter(data), ['created'])))
|
||||
},
|
||||
Mutation: {
|
||||
createBatch: (...[, { deviceId, cashboxCount }]) => cashbox.createCashboxBatch(deviceId, cashboxCount),
|
||||
editBatch: (...[, { id, performedBy }]) => cashbox.editBatchById(id, performedBy)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = resolvers
|
||||
Loading…
Add table
Add a link
Reference in a new issue