banner fix

This commit is contained in:
CHIEFSOFT\ameye
2024-08-04 13:17:23 -04:00
parent c95f0a3597
commit ff4dfed01d
+19 -39
View File
@@ -34,16 +34,23 @@ var banners = {
logger.info("client_id result.rows ==> ",result.rows);
client_id = result.rows[0]["client_id"];
logger.info("client_id AAA ==> ",client_id);
let resultItem ={
"result": bannerArray,
"total_record": 4
}
next(null, resultItem ); // pass control to the next handler
// we must have client_id to contibnue
var reqClinet = {
"uid": req.body.uid,
"client_id": req.body.member_id,
};
// var reqClinet = {
// "uid": req.body.uid,
// "client_id": req.body.member_id,
// };
// this.RecoCheckActive=( reqClinet,r2,r3)=>{
//
// }
/*
Qstring1 = "SELECT count(id) AS total_active_jobs FROM members_jobs_contract " +
" WHERE client_id = "+client_id+" AND status =1 AND delivery_date > now() ";
logger.info(Qstring1);
@@ -74,7 +81,8 @@ var banners = {
logger.info("Error on past due =>", e.message);
}
});
logger.info("total_past_client_due ==> ",total_past_client_due);
logger.info("total_past_client_due ==> ",total_past_client_due);
bannerArray.current.banner.status = 1;
@@ -87,6 +95,9 @@ var banners = {
}
next(null, resultItem ); // pass control to the next handler
}
*/
// end of we have client id
@@ -113,24 +124,6 @@ var banners = {
//bannerCards.push(bannerArray.current);
// // logger.info(Qstring);
// db.query(Qstring, function (err, result) {
// try {
// if (err) throw err;
// let resultItem ={
// "result": result.rows,
// "total_record": result.rowCount
// }
// // logger.info(result);
// next(null, resultItem); // pass control to the next handler
// // next(null, result.rows); // pass control to the next handler
// } catch (e) {
// next(e.message, null); // pass control to the next handler
// }
// });
var bannerArray = {
"pending": {
"banner": {
@@ -188,22 +181,9 @@ var banners = {
}
}
};
// "another1task": {
// "banner": {
// "image": "https://www.wrenchboard.com/assets/images/apps/banners/recommend-banner.jpg",
// "icon": "bannerimage.icon",
// "style": "style4",
// "text": "Dummy for now",
// "description": "dummy dummy dummy",
// "action": "thisaction"
// }
// },
},
},
homebanners: function (req, res, next) {
var result=[];
var result=[];
this.RecoCheckOffers(req, res, function(err, result){
logger.info("************************ aaaa");