refactor: styling improvements and add custom carousel component

This commit is contained in:
José Oliveira 2021-08-10 12:21:34 +01:00
parent 91a302676a
commit 2f2285e943
5 changed files with 73 additions and 38 deletions

View file

@ -285,4 +285,12 @@ function updateTxCustomerPhoto (customerId, txId, direction, data) {
: db.oneOrNone(cashOutSql, [formattedData.tx_customer_photo_at, formattedData.tx_customer_photo_path, customerId, txId])
}
module.exports = { batch, single, cancel, getCustomerTransactionsBatch, getTx, getTxAssociatedData, updateTxCustomerPhoto }
module.exports = {
batch,
single,
cancel,
getCustomerTransactionsBatch,
getTx,
getTxAssociatedData,
updateTxCustomerPhoto
}

View file

@ -108,7 +108,7 @@ function updateTxCustomerPhoto (req, res, next) {
Promise.all([customers.getById(customerId), txs.getTx(txId, direction)])
.then(([customer, tx]) => {
if (!customer || !tx) { throw httpError('Not Found', 404) }
if (!customer || !tx) return
return customers.updateTxCustomerPhoto(tcPhotoData)
.then(newPatch => txs.updateTxCustomerPhoto(customerId, txId, direction, newPatch))
})