0
1
Fork 0
hedera-web-mindshore/js/hedera/basket-checker.js

22 lines
419 B
JavaScript

module.exports = {
async check(conn, hash) {
this.hash = hash;
const resultSet = await conn.execQuery('CALL myBasket_check');
const status = resultSet.fetchValue();
if (!status) return;
const isOk = status == 'UPDATED' || status == 'OK';
if (status == 'UPDATED')
Htk.Toast.showWarning(_('Order items updated'));
if (!isOk)
this.hash.setAll({form: 'ecomerce/checkout'});
return isOk;
}
};