ECommerce Ordini Email 1
This commit is contained in:
@@ -47,6 +47,12 @@ const MyPageSchema = new Schema({
|
||||
onlyif_logged: {
|
||||
type: Boolean,
|
||||
},
|
||||
only_residenti: {
|
||||
type: Boolean,
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
},
|
||||
imgback: {
|
||||
type: String,
|
||||
},
|
||||
|
||||
@@ -55,7 +55,7 @@ module.exports.executeQueryTable = function (idapp, params) {
|
||||
};
|
||||
|
||||
module.exports.getFieldsForSearch = function () {
|
||||
return [{field: 'note', type: tools.FieldType.string}]
|
||||
return [{ field: 'note', type: tools.FieldType.string }]
|
||||
};
|
||||
|
||||
|
||||
@@ -78,9 +78,14 @@ module.exports.getNewNumOrder = async function (uid, idapp) {
|
||||
|
||||
};
|
||||
|
||||
module.exports.getOrdersCartByUserId = async function (uid, idapp) {
|
||||
module.exports.getOrdersCartByUserId = async function (uid, idapp, numorder) {
|
||||
let query = { userId: uid, idapp, status: { $gte: shared_consts.OrderStatus.CHECKOUT_SENT } }
|
||||
const myorderscart = await OrdersCart.find(query);
|
||||
let myorderscart = null;
|
||||
if (numorder > 0) {
|
||||
query = { userId: uid, idapp, numorder, status: { $gte: shared_consts.OrderStatus.CHECKOUT_SENT } }
|
||||
}
|
||||
|
||||
myorderscart = await OrdersCart.find(query);
|
||||
|
||||
for (let ind = 0; ind < myorderscart.length; ind++) {
|
||||
for (const idkey in myorderscart[ind].items) {
|
||||
|
||||
@@ -51,6 +51,9 @@ var ProjectSchema = new mongoose.Schema({
|
||||
viceRespUsername: {
|
||||
type: String,
|
||||
},
|
||||
vice2RespUsername: {
|
||||
type: String,
|
||||
},
|
||||
statusproj: {
|
||||
type: Number,
|
||||
default: 0
|
||||
|
||||
@@ -31,6 +31,9 @@ var TodoSchema = new mongoose.Schema({
|
||||
descr: {
|
||||
type: String,
|
||||
},
|
||||
note: {
|
||||
type: String,
|
||||
},
|
||||
priority: {
|
||||
type: Number,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user