- aggiunto bottone per Confermare tutti gli ordini
- 1 bottone per Consegnare e Pagare
This commit is contained in:
@@ -376,25 +376,26 @@ router.post('/:userId/ordercartstatus', authenticate, async function (req, res,
|
||||
const userDest = await User.findById(myOrdersCart.userId).lean();
|
||||
|
||||
if (ris) {
|
||||
let ordertype = '';
|
||||
|
||||
// Aggiorna gli Stati Interni !
|
||||
myOrdersCart = await OrdersCart.updateCmd(myOrdersCart, status, true, options);
|
||||
|
||||
let ordertype = '';
|
||||
if ((options.hasOwnProperty('sendmail') && options.sendmail) || !options.hasOwnProperty('sendmail')) {
|
||||
if (status === shared_consts.OrderStatus.ORDER_CONFIRMED) {
|
||||
ordertype = 'order_confirmed';
|
||||
} else if (status === shared_consts.OrderStatus.DELIVERED) {
|
||||
ordertype = 'order_consegnato';
|
||||
} else if (status === shared_consts.OrderStatus.CANCELED) {
|
||||
ordertype = 'order_canceled';
|
||||
}
|
||||
|
||||
if (status === shared_consts.OrderStatus.ORDER_CONFIRMED) {
|
||||
ordertype = 'order_confirmed';
|
||||
} else if (status === shared_consts.OrderStatus.DELIVERED) {
|
||||
ordertype = 'order_consegnato';
|
||||
} else if (status === shared_consts.OrderStatus.CANCELED) {
|
||||
ordertype = 'order_canceled';
|
||||
}
|
||||
if (ordertype !== '') {
|
||||
sendemail.sendEmail_Order(userDest.lang, idapp, myOrdersCart, userDest, ordertype, status)
|
||||
.then((ris) => {
|
||||
|
||||
if (ordertype !== '') {
|
||||
sendemail.sendEmail_Order(userDest.lang, idapp, myOrdersCart, userDest, ordertype, status)
|
||||
.then((ris) => {
|
||||
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user