feat: add emptyUnit bills table

feat: rework cash unit operations
fix: multiple fixes for the empty unit workflow
This commit is contained in:
Sérgio Salgado 2023-05-04 02:43:19 +01:00
parent 797f074898
commit 45f722e724
8 changed files with 171 additions and 59 deletions

9
lib/utils.js Normal file
View file

@ -0,0 +1,9 @@
const _ = require('lodash')
const camelize = obj =>
_.transform(obj, (acc, value, key, target) => {
const camelKey = _.isArray(target) ? key : _.camelCase(key.toString())
acc[camelKey] = _.isObject(value) && !(value instanceof Date) ? camelize(value) : value
})
module.exports = camelize