gwm-ApplicantID
This commit is contained in:
parent
c22f884fcf
commit
8f74d54908
@ -241,11 +241,12 @@ exports.GetCreditPdData = async (req, res) =>
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
applicantDetails = await Credit_PdHelper.MainApplicantDetails(req.query.losid);
|
|
||||||
MainApplicantDetails = JSON.parse(applicantDetails);
|
// applicantDetails = await Credit_PdHelper.MainApplicantDetails(req.query.losid);
|
||||||
if(MainApplicantDetails.status == 200)
|
// MainApplicantDetails = JSON.parse(applicantDetails);
|
||||||
{
|
// if(MainApplicantDetails.status == 200)
|
||||||
CreditGeneralInformation.findAll({ where : { name : MainApplicantDetails.data.name,is_active : 1},
|
// {
|
||||||
|
CreditGeneralInformation.findAll({ where : { applicant_id : req.query.losid,is_active : 1},
|
||||||
include : [
|
include : [
|
||||||
{model: CreditAddressDetail }, {model: CreditFuturePlans },
|
{model: CreditAddressDetail }, {model: CreditFuturePlans },
|
||||||
{model : CreditBorrowerAndGuarantorDetails },
|
{model : CreditBorrowerAndGuarantorDetails },
|
||||||
@ -289,11 +290,11 @@ exports.GetCreditPdData = async (req, res) =>
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
res.send({'status':404,'message':"failed",'data':"No data"});
|
// res.send({'status':404,'message':"failed",'data':"No data"});
|
||||||
}
|
// }
|
||||||
|
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
res.status(500).send({'status':404,
|
res.status(500).send({'status':404,
|
||||||
|
|||||||
@ -47,51 +47,31 @@ exports.test = (req, res) =>
|
|||||||
// SupplierDetail.destroy({ where : { pd_id : CreditGeneralInformationDataExist.dataValues.pd_id}});
|
// SupplierDetail.destroy({ where : { pd_id : CreditGeneralInformationDataExist.dataValues.pd_id}});
|
||||||
// }).catch(err=>{logMsg.info("GeneralInformation Deletion failed ,PdId(ref_no)= "+req.body.pdid+ " ERR =" + err); });
|
// }).catch(err=>{logMsg.info("GeneralInformation Deletion failed ,PdId(ref_no)= "+req.body.pdid+ " ERR =" + err); });
|
||||||
const moment = require('moment');
|
const moment = require('moment');
|
||||||
console.log("hai");
|
|
||||||
array = [
|
|
||||||
"09:00 am",
|
|
||||||
"09:30 am",
|
|
||||||
"10:00 am",
|
|
||||||
"10:30 am",
|
|
||||||
"11:00 am",
|
|
||||||
"11:30 am",
|
|
||||||
"12:00 pm",
|
|
||||||
"12:30 pm",
|
|
||||||
"01:00 pm",
|
|
||||||
"01:00 pm",
|
|
||||||
"01:30 pm",
|
|
||||||
"02:00 pm",
|
|
||||||
"02:30 pm",
|
|
||||||
"03:00 pm",
|
|
||||||
"03:30 pm",
|
|
||||||
"04:00 pm",
|
|
||||||
"04:30 pm",
|
|
||||||
"05:00 pm",
|
|
||||||
"05:30 pm",
|
|
||||||
"06:00 pm",
|
|
||||||
"06:30 pm",
|
|
||||||
"07:00 pm",
|
|
||||||
"07:30 pm",
|
|
||||||
"08:00 pm",
|
|
||||||
"08:30 pm",
|
|
||||||
"09:00 pm",
|
|
||||||
];
|
|
||||||
let index = array.indexOf("02:30 pm");
|
|
||||||
console.log(index)
|
|
||||||
// const firstSlt = new Date("Wed Apr 12 2023 12:15:00 GMT+0530");
|
|
||||||
// const lastSlt = new Date("Wed Apr 12 2023 12:45:00 GMT+0530");
|
|
||||||
const firstSlt = "11:30 am";
|
|
||||||
// const filteredTimes = array.filter(time => time.length > 4; );
|
|
||||||
|
|
||||||
filteredTimes = array.filter(function(item) {
|
array = [
|
||||||
return array.indexOf(item) > index;
|
{
|
||||||
});
|
"serviceID": 4,
|
||||||
|
"active": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceID": 5,
|
||||||
|
"active": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
value = 4;
|
||||||
|
result = array.filter((item) => item.serviceID !== value);
|
||||||
|
// let index = array.indexOf({"serviceID": value ,"active": 1});
|
||||||
|
// console.log(index)
|
||||||
|
//removeByAttr(array, 'serviceID', value);
|
||||||
|
//array[index].remove();
|
||||||
|
result = array.filter((item) => item.serviceID !== value);
|
||||||
// dt = new Date();
|
// dt = new Date();
|
||||||
// time = new moment(dt);
|
// time = new moment(dt);
|
||||||
// time.toString()
|
// time.toString()
|
||||||
// time = time.add(interval,'m');
|
// time = time.add(interval,'m');
|
||||||
console.log(filteredTimes);
|
|
||||||
res.send({'status':200 , message:"Success." , 'rslt' : filteredTimes});
|
res.send({'status':200 , message:"Success." , 'rslt' : result});
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
res.status(500).send({'status':404,
|
res.status(500).send({'status':404,
|
||||||
message: err.message || "Some error occurred while inserting statements." ,'data': "No data"
|
message: err.message || "Some error occurred while inserting statements." ,'data': "No data"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user