ECommerce Ordini Email 1

This commit is contained in:
Paolo Arena
2021-03-30 02:23:38 +02:00
parent 678d8ecd6b
commit 0b4203067a
13 changed files with 202 additions and 14 deletions

View File

@@ -47,6 +47,12 @@ const MyPageSchema = new Schema({
onlyif_logged: {
type: Boolean,
},
only_residenti: {
type: Boolean,
},
color: {
type: String,
},
imgback: {
type: String,
},

View File

@@ -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) {

View File

@@ -51,6 +51,9 @@ var ProjectSchema = new mongoose.Schema({
viceRespUsername: {
type: String,
},
vice2RespUsername: {
type: String,
},
statusproj: {
type: Number,
default: 0

View File

@@ -31,6 +31,9 @@ var TodoSchema = new mongoose.Schema({
descr: {
type: String,
},
note: {
type: String,
},
priority: {
type: Number,
},