Fairoj: All Consoles Removed & Without Otp fixed

This commit is contained in:
saravanakumarkandasami 2019-02-27 15:06:19 +05:30
parent 0288135cef
commit de537a667a
41 changed files with 209 additions and 245209 deletions

File diff suppressed because one or more lines are too long

View File

@ -73,7 +73,7 @@ export class OtpPage {
}
checkotp(otp)
{
let data = {'pd_id':this.applicatentDetails.pd_id,'OTP':otp};
let data = {'pd_id':this.applicatentDetails.pd_id,'OTP':otp,'fk_updatedby':this.users};
this.pddetails.checkotp(data).subscribe(res=>
{
console.log("Otp",res)
@ -152,7 +152,7 @@ export class OtpPage {
console.log(this.reasonForm.value);
if(this.reasonForm.valid)
{
let data = {'pd_id':this.applicatentDetails.pd_id,'reason':this.reasonForm.value.reason,'other_reason':this.reasonForm.value.others_reason};
let data = {'pd_id':this.applicatentDetails.pd_id,'reason':this.reasonForm.value.reason,'other_reason':this.reasonForm.value.others_reason,'fk_updatedby':this.users};
this.pddetails.checkotp(data).subscribe(res=>
{
this.otpStatus = res;

View File

@ -37,7 +37,7 @@ export class PdListPage {
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public pdofficer:PdtriggerProvider,public shared:CognitoServiceProvider,public db:DatabaseProvider,public androidPermissions:AndroidPermissions) {
//this.getlenderpddetails();
// this.getpdTriggerdetails();
console.log("Entered")
}
ionViewDidLoad() {
@ -63,7 +63,7 @@ export class PdListPage {
//alert(this.viewchange);
}
pdlistsearch(searchbar) {
console.log(searchbar);
this.pdinprogress = this.searchinprogress;
this.pdschduleDetails = this.searchpast;
// reset countries list with initial call
@ -87,8 +87,7 @@ export class PdListPage {
}else
{
if (q.trim() == '') {
console.log(q.trim());
console.log(this.pdlistdetails);
return ;
}else{
this.pdschduleDetails = this.searchpast.filter((v) => {
@ -111,21 +110,22 @@ export class PdListPage {
{
let userid = this.aws.getlocale();
console.log("User",userid)
//.log("User",userid)
this.pdofficer.getpddetails(userid).subscribe(res=>
{
this.pdlistdetails = res;
if(this.pdlistdetails.dataStatus == true)
{
console.log(this.pdlistdetails);
this.pdlistaccess = true;
this.pdschduleDetails = this.pdlistdetails.records.filter(sch=>sch.pd_status =="ACCEPTED" || sch.pd_status =="SCHEDULED" || sch.pd_status =="INITIATED" || sch.pd_status =="STARTED" || sch.pd_status =="INPROGRESS" && sch.applicat_details);
this.searchpast = this.pdschduleDetails;
// console.log(65,this.pdlistdetails.records.filter(sch=>sch.pd_status =="STARTED" || sch.pd_status == "INPROGRESS" || sch.pd_status =="ACCEPTED" || sch.pd_status =="SCHEDULED" && sch.pd_status =="INITIATED" || sch.pd_status =="STARTED"));
this.pdinprogress = this.pdlistdetails.records.filter(allocate=>allocate.pd_status == "ALLOCATED");
this.searchinprogress = this.pdinprogress;
console.log(this.pdinprogress);
this.random_bg_color();
this.random_ng_past();
}else
@ -161,11 +161,11 @@ export class PdListPage {
this.bgColor = [];
this.pdschduleDetails = [];
this.pdinprogress = [];
console.log('Begin async operation', refresher);
this.shared.refresh();
this.getpdTriggerdetails();
setTimeout(() => {
console.log('Async operation has ended');
refresher.complete();
}, 2000);
}

View File

@ -65,7 +65,6 @@ completedAccess:any;
searchitem:any;
constructor(public navCtrl: NavController, public navParams: NavParams,public templateget:QuestionCategoryProvider,public aws:AwsServiceProvider, public shared:CognitoServiceProvider,public toast:ToastProvider,public pdstatusprovide:PdtriggerProvider) {
this.pddetails = this.navParams.get('pdDetails');
console.log("Pd",this.pddetails);
}
@ -76,7 +75,6 @@ searchitem:any;
}
// doughuntChart()
// {
// console.log(this.doughnutCanvas);
// this.doughnutChart = new Chart(this.doughnutCanvas.nativeElement, {
// type: 'doughnut',
@ -122,7 +120,6 @@ searchitem:any;
{
this.questionCate = this.questionCate.records;
//console.log(this.questionCate.counts);
this.random_ng_past();
if(this.questionCate.question_answers !='' && this.questionCate.template_forms!='')
{
@ -139,11 +136,9 @@ searchitem:any;
this.overallqustioncountAccess = true;
}
//console.log(this.questionCate);
// console.log(this.questionfinishedList);
}else if(this.questionCate.template_forms!='')
{
@ -187,11 +182,8 @@ searchitem:any;
questionsTag(categroyId){
this.pdinfo = this.pddetails;
console.log('data',categroyId);
console.log('pdinfo',this.pdinfo);
this.questionCate = this.questionCate.question_answers.filter(cate=>cate.fk_question_category_id == categroyId)[0];
//console.log(this.questionCate);
// if(this.questionCate.questions.length !="0"){
this.navCtrl.push(PdQuestionPage,{'questionDetails':this.questionCate,'pdDetails':this.pdinfo});
@ -205,7 +197,6 @@ searchitem:any;
tempQustionTag(categroyId)
{
this.pdinfo = this.pddetails;
console.log('data',categroyId);
let formName = this.questionCate.template_forms.filter(temp=>temp.form_id==categroyId)[0];
if(categroyId ==5)
{
@ -294,7 +285,6 @@ searchitem:any;
var q = searchbar.target.value;
// if the value is an empty string don't filter the items
console.log(this.searchQuestion);
if(this.searchQuestion !== undefined){
if (q.trim() == '') {
return ;
@ -304,7 +294,6 @@ searchitem:any;
// return true;
// }
// })
// console.log(this.questionCate);
}
}else
{
@ -316,7 +305,6 @@ searchitem:any;
// return true;
// }
// })
console.log(this.questionCate);
}
}
}
@ -338,11 +326,9 @@ searchitem:any;
doRefresh(refresher) {
this.questionCate = [];
this.questionfinishedList = [];
console.log('Begin async operation', refresher);
this.shared.refresh();
this.getcategoryList();
setTimeout(() => {
console.log('Async operation has ended');
refresher.complete();
}, 2000);
}

View File

@ -79,7 +79,7 @@ export class PdQuestionAddressPage {
this.getCityAndPincodeDetails(this.pdState);
this.pdCity = this.pdDetails.fk_city;
this.pdPincode = this.pdDetails.pincode_id;
console.log('this.pdPincode', this.pdPincode);
this.pdOtherPincode = this.pdPincode == 1 ? this.pdDetails.other_pincode : '';
this.getdropdownlist();
@ -123,7 +123,8 @@ export class PdQuestionAddressPage {
ionViewDidLoad() {
//this.addUnits();
console.log('ionViewDidLoad PdQuestionAddressPage');
console.log("ionViewDidLoad PdQuestionAddressPage")
}
ionViewWillLeave()
@ -137,14 +138,14 @@ export class PdQuestionAddressPage {
// text: 'Save',
// cssClass: 'method-color',
// handler: () => {
// console.log('Save clicked');
//
// }
// },
// {
// text: 'Cancel',
// cssClass: 'method-color',
// handler: () => {
// console.log('Cancel clicked');
//
// this.navCtrl.pop();
// }
// }
@ -153,7 +154,7 @@ export class PdQuestionAddressPage {
// method.present()
// console.log(this.pdQuestionAddress.dirty);
}
/** To Get City And Pincode Data For Address Form
@ -252,7 +253,7 @@ export class PdQuestionAddressPage {
// checkaddress(value)
// {
// // console.log(value);
//
// if(value=="OTHERS")
// {
// this.addressRemarksAccess = true;
@ -332,13 +333,13 @@ export class PdQuestionAddressPage {
}
inWords(e,i){
console.log(e);
this.premisesRentAmtInwords[i] = this.constant.convertNumberToWords(e.target.value);
}
inWordsForRent(e){
//console.log(e);
this.rentAmtInwords = this.constant.convertNumberToWords(e.target.value);
}
@ -349,7 +350,6 @@ export class PdQuestionAddressPage {
savepdQuestion(answerData)
{
console.log(answerData);
let records: any = {};
records.address = answerData.address;
if(answerData.address_type_others != null){
@ -393,18 +393,17 @@ export class PdQuestionAddressPage {
// records.bussiness_activity_remark = answerData.bussiness_activity_remark;
// records.business_years = answerData.business_years;
// records.business_month = answerData.business_month;
// console.log("Additional Units",this.pdQuestionAddress.controls.additional_address_units.value);
// console.log("item",this.items)
// records.additional_address_units = answerData.additional_address_units;
console.log('params', records);
this.qustCat.saveForm(records).subscribe(data => {
// console.log('data', data);
// let params: any = {};
// params.pd_id = '250';
// params.pd_form_id = '250';
// console.log('param', params);
this.navCtrl.pop();
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
@ -502,20 +501,20 @@ export class PdQuestionAddressPage {
// this.pdQuestionAddress.controls['business_month'].setValue(this.getaddressDetails.business_month);
console.log(this.getaddressDetails.additional_address_units);
/* if(this.getaddressDetails.bussiness_activity == 'yes') {
if (result.length == 0) {
console.log("0")
control.push(this.createUnits(null));
} else {*/
console.log("1",this.getaddressDetails.additional_address_units)
//for(let val of this.getaddressDetails.additional_address_units){
//control.push(this.createUnits(val));
//}
//result.forEach((datas,index) => {
// console.log(datas);
//this.premisesRentAmtInwords[index] = this.constant.convertNumberToWords(datas.premises_rent_amt);
//this.pdQuestionAddress.controls['additional_address_units'].setValue(datas);

View File

@ -30,7 +30,7 @@ export class PdQuestionAssessedBusinessIncomePage {
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,public toast:ToastProvider) {
this.pdDetails = this.navParams.get('pdDetails');
this.expenseDetails = this.navParams.get('income');
console.log(this.expenseDetails);
this.users = this.aws.getlocale();
this.BuissnessForm = this.fb.group(
{
@ -101,18 +101,17 @@ export class PdQuestionAssessedBusinessIncomePage {
busIncomecalculate(index,details)
{
console.log(details,index);
let frequencyId = details.value.fk_frequency_id;
let incomeValue = details.value.income_value;
// let UOM = details.value.rate_per_unit;
// console.log(frequencyId,purchaseQty,UOM,index);
// console.log(frequencyId);
let annual:any;
if(incomeValue!=null && incomeValue !=null){
let frequency_factor = this.m_freqOfPurchase.filter(frq=>frq.frequency_id == frequencyId)[0];
if(frequencyId==1)
{
console.log(frequency_factor.mutiple_factor);
annual = (incomeValue*frequency_factor.mutiple_factor);
this.incomeannual[index] = annual;
details.controls['annual_income_value'].setValue(annual);
@ -165,10 +164,10 @@ export class PdQuestionAssessedBusinessIncomePage {
saveBusinessData(answerData)
{
// console.log(answerData);
if(this.BuissnessForm.valid){
let records = {'records':answerData.busIncome};
console.log('data',records);
this.qustCat.saveassessedForms('saveOtherBusinessIncome',records).subscribe(res=>
{
if(res['dataStatus']==true)

View File

@ -102,12 +102,11 @@ export class PdQuestionAssessedBusinessPage {
busExpensecalculat(index,details)
{
console.log(details,index);
let frequencyId = details.value.fk_frequency_id;
let expenseValue = details.value.expense_value;
let UOM = details.value.rate_per_unit;
// console.log(frequencyId,purchaseQty,UOM,index);
// console.log(frequencyId);
let annual
if(expenseValue!=null){
if(frequencyId==1)
@ -153,10 +152,10 @@ export class PdQuestionAssessedBusinessPage {
saveBusinessData(answerData)
{
// console.log(answerData);
if(this.BuissnessForm.valid){
let records = {'records':answerData.busExpense};
console.log('data',records);
this.qustCat.saveassessedForms('saveAssessedIncomeBusinessExpenses',records).subscribe(res=>
{
if(res['dataStatus']==true)

View File

@ -34,7 +34,7 @@ export class PdQuestionAssessedDailySalesPage {
this.grossprofitCalc = this.navParams.get('grossprofit');
this.users = this.aws.getlocale();
this.currentDate = constant.getcurrentDate().replace("T00:00",'');
console.log(this.currentDate);
this.salesDailyForm = this.fb.group(
{
sales_product: this.fb.array([]),
@ -76,7 +76,7 @@ export class PdQuestionAssessedDailySalesPage {
temparr = [];
tempdate = [];
getSalesCalc(subchild,child,key) {
console.log(key);
let saledate: any = new Date(subchild.value.sales_date).getMonth() + 1;
let totalitemmargin = child.value.margin_per;
@ -94,33 +94,31 @@ export class PdQuestionAssessedDailySalesPage {
if (loopAccess) {
// console.log(loopAccess,loopindex);
this.tempdate[loopindex].value = this.tempdate[loopindex].value + subchild.value.sales_value;
this.temparr.push(subchild.value.sales_value);
loopAccess = false;
loopindex = 0;
// console.log('merge');
} else {
// console.log(loopAccess,loopindex);
// console.log('push');
this.tempdate.push({ 'month': saledate, 'value': subchild.value.sales_value }); this.temparr.push(subchild.value.sales_value);
}
} else {
// console.log('else')
this.tempdate.push({ 'month': saledate, 'value': subchild.value.sales_value });
this.temparr.push(subchild.value.sales_value);
}
let totalMonth = 12 / this.tempdate.length;
console.log(this.tempdate);
let tempgrandTotal = this.tempdate.reduce((a, b) => (+a + +b.value), 0);
console.log(tempgrandTotal);
// let value = tempgrandTotal * (totalitemmargin / 100);
let value = tempgrandTotal*totalMonth ;
console.log(value);
let grandValue = value * (totalitemmargin / 100);
child.controls['margin_value'].setValue(grandValue);
@ -132,7 +130,7 @@ export class PdQuestionAssessedDailySalesPage {
if (this.salesDailyForm.valid) {
const control = <FormArray>this.salesDailyForm.get('sales_product') as FormArray;
control.push(this.createdailysalesProduct());
// console.log(control.length);
this.adddailyChildSaleProduct(control.length - 1);
}
}
@ -145,7 +143,7 @@ export class PdQuestionAssessedDailySalesPage {
}
deletedailySalesProduct(index) {
console.log(index);
this.tempdate.slice(index,1);
const control = (<FormArray>this.salesDailyForm.controls['sales_product']) as FormArray;
if (control.length == 1) {
@ -180,7 +178,7 @@ export class PdQuestionAssessedDailySalesPage {
}
getDailySalesData(dailySalesData) {
console.log(dailySalesData);
const control = <FormArray>this.salesDailyForm.get('sales_product') as FormArray;
let salesChildControl;
let salesChildControlarr = [];

View File

@ -66,14 +66,14 @@ export class PdQuestionAssessedDashPage {
saveAssessedForm(answerData)
{
console.log(this.assessedForm.value);
if(this.assessedForm.valid)
{
let records = {'records':this.assessedForm.value};
console.log('data',records);
this.qustCat.saveassessedForms('saveAssessedIncomeCalculateMode',records).subscribe(res=>
{
if(res['dataStatus']==true)
@ -117,14 +117,14 @@ export class PdQuestionAssessedDashPage {
{
this.businessIncome = true;
}
console.log(res['records'].final_data.length);
if(res['records'].final_data.length !=0){
this.finalAccess = true;
this.finalData = res['records'].final_data[0];
this.finalIncome = this.finalData.income;
this.finalExpense = this.finalData.expense;
}
console.log(this.grossprofit);
if(this.grossprofit !==undefined)
{
this.grossAccess = true;

View File

@ -62,7 +62,7 @@ export class PdQuestionAssestsPage {
this.assestInfo = "busass";
this.FormId = this.navParams.get('FormId');
console.log(this.FormId);
this.pdDetails = this.navParams.get('pdDetails');
this.pdid=this.pdDetails.pd_id;
this.users = this.aws.getlocale();
@ -135,10 +135,10 @@ export class PdQuestionAssestsPage {
}
});
this.qustCat.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
console.log("Entering company List")
if(data['dataStatus']==true){
this.existCompanyList=data['records'].filter(val =>val.is_active===true && val.is_company_applicant===true)
console.log("company List",data['records'])
}
let modifyCompanyList : any=[];
if(this.existCompanyList.length>0){
@ -146,7 +146,7 @@ export class PdQuestionAssestsPage {
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
});
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
console.log("Company applicant",this.mergeCompanyApplicant)
}
let modifyApplicantList: any=[];
@ -155,7 +155,7 @@ export class PdQuestionAssestsPage {
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
});
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
console.log("Applicants",this.mergeCompanyApplicant);
// this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1);
}
})
@ -216,7 +216,7 @@ export class PdQuestionAssestsPage {
loanCalc(details ,flag)
{
if(flag == 1){
//console.log(details.value);
let ElapsedValues;
if(details.value.original_loan_tenure != null && details.value.original_loan_tenure != '' && details.value.balance_tenure != null && details.value.balance_tenure != ''){
@ -230,9 +230,7 @@ export class PdQuestionAssestsPage {
show: boolean;
selectedAssetsType(e: any, i: any,flag : any): void {
console.log(e);
console.log(i);
console.log(flag);
let val = i;
if(flag == 1){
const arr = (<FormArray>this.AssetsDetailsForm.controls['assets_details']).at(val).get('details') as FormArray;
@ -449,7 +447,7 @@ export class PdQuestionAssestsPage {
}
saveAssetDetails(answerData)
{
console.log(answerData);
Object.keys(answerData).forEach((key) => (answerData[key] == null) && delete answerData[key]);
// answerData.assets_details.map(val => {
// if (val.emi == 'no') {
@ -463,7 +461,7 @@ export class PdQuestionAssestsPage {
answerData.pdid = this.pdDetails.pd_id;
answerData.formid = this.FormId.form_id;
answerData.fk_createdby = this.users;
console.log('final',answerData);
this.qustCat.saveForm(answerData).subscribe(res=>
{
if(res['dataStatus']==true)
@ -534,7 +532,7 @@ export class PdQuestionAssestsPage {
// }
this.apiLoadFinish = true;
console.log(assetArray);
//this.AssetsDetailsForm.controls['assets_details'].setValue(assetArray);
}else{
this.apiLoadFinish = true;

View File

@ -47,7 +47,7 @@ export class PdQuestionBankingPage {
this.applicants = this.applicants.filter(val=>val.applicant_type==0 || val.applicant_type==1)
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
console.log(this.pdDetails);
// alert();
this.users = this.aws.getlocale();
this.bankDetails = this.fb.group(
@ -86,10 +86,10 @@ export class PdQuestionBankingPage {
}
});
this.qustCat.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
console.log("Entering company List")
if(data['dataStatus']==true){
this.existCompanyList=data['records'].filter(val =>val.is_active===true && val.is_company_applicant===true)
console.log("company List",data['records'])
}
// let modifyCompanyList : any=[];
// if(this.existCompanyList.length>0){
@ -97,7 +97,7 @@ export class PdQuestionBankingPage {
// return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
// });
// this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
// console.log("Company applicant",this.mergeCompanyApplicant)
//}
})
let modifyApplicantList: any=[];
@ -106,7 +106,7 @@ export class PdQuestionBankingPage {
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
});
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
console.log(this.mergeCompanyApplicant);
// this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1);
}
}
@ -140,7 +140,7 @@ inWords(e,i,flag){
/** To Convert Month into Year */
ConvertMonthintoYear(itemrow,e){
//console.log(itemrow);
let year = itemrow.controls.vintage_year.value;
@ -196,7 +196,7 @@ inWords(e,i,flag){
this.bankitems.push(this.createBankItem(''));
//console.log(this.pdQuestionAddress.get('items')['controls']);
}
@ -225,16 +225,16 @@ inWords(e,i,flag){
records.fk_createdby = this.users;
records.banking_details = answerData.bankitems;
records.banking_form_remark = answerData.banking_form_remark;
console.log('data', records);
this.qustCat.saveForm(records).subscribe(data => {
console.log('data', data);
if(data['dataStatus']==true)
{
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
this.navCtrl.pop();
}
})
//console.log(answerData);
}
retiveBankDetails()
@ -250,12 +250,12 @@ inWords(e,i,flag){
this.bankitems = this.bankDetails.get('bankitems') as FormArray;
if(result.length ==0){
console.log("Data=0")
this.bankitems.push(this.createBankItem(''))
}else
{
console.log("Data>0")
result.forEach((datas,index)=>
@ -273,7 +273,7 @@ inWords(e,i,flag){
}else
{
console.log("Data False")
this.addBankDetails();
}
});

View File

@ -86,7 +86,7 @@ export class PdQuestionBusinessAssetsPage {
this.qustcat.retiverForm(params).subscribe(data => {
if(data['status'] == 200) {
// console.log("form record 5",data.records);
this.addressLabel = '';
@ -113,7 +113,7 @@ export class PdQuestionBusinessAssetsPage {
this.qustcat.getcommondrop('ASSETTYPE').subscribe(data=>{
this.m_assets_type=data['records'].filter(val=>val.isactive==1 && val.flag==1);
// console.log(this.m_assets_type)
})
this.qustcat.getcommondrop('PROPERTIES').subscribe(data=>{
@ -123,7 +123,7 @@ export class PdQuestionBusinessAssetsPage {
this.qustcat.getCompaniesListsForBusiness(this.pdDetails.pd_id).subscribe(data=>{
if(data.dataStatus){
this.existCompanyList=data['records'].filter(val=>val.is_active==true);
// console.log("existCompanyList",this.existCompanyList)
}
let modifyCompanyList : any=[];
@ -157,12 +157,12 @@ export class PdQuestionBusinessAssetsPage {
this.qustcat.retiverForm(params).subscribe(res=>{
if(res['dataStatus']==true){
// console.log("records",res['records'])
//this.data_all=res['records']
/* var assestArray=Object.keys(res['records'].business_assets_details).map(function(key){
return res['records'].business_assets_details[key]
});
console.log("Asset Form",assestArray);
//this.formLoadData(assestArray)
this._businessAssetsQuesFrom.controls['business_assets_form_remark'].setValue(res['records'].business_assets_form_remark);
if(assestArray.length>0){
@ -189,7 +189,7 @@ export class PdQuestionBusinessAssetsPage {
this.formLoadData(null);
}
this.apiLoadFinish=true
console.log("success");
})
//this.formLoadData(null);
@ -219,7 +219,7 @@ export class PdQuestionBusinessAssetsPage {
}
else{
// console.log("Data Here");
let value=data;
this._businessAssetsQuesFrom=this.fb.group({
pdid: [this.pdDetails.pd_id],
@ -237,7 +237,7 @@ export class PdQuestionBusinessAssetsPage {
business_assets_form_remark:[value.business_assets_form_remark || '']
});
if (value.business_address_availability == 'yes') {
// console.log(value.business_assets_for_address);
this.addBusinessAssetsForAddress(value.business_assets_for_address);
}
else {
@ -390,7 +390,7 @@ createBusinessAssetsForAddress(): FormGroup {
this.RentAmtInwordsForAddress[index] = this.cons.convertNumberToWords(datas.business_monthly_rented_amt);
this.appxMarketAmtInwordsForAddress[index] = this.cons.convertNumberToWords(datas.business_approximate_market_value);
let Avaliablity = 1;
// console.log(datas.business_name_of_the_owner);
if(datas.business_name_of_the_owner.length > 0){
datas.business_name_of_the_owner.forEach(option => {
if(option.id == 0 && option.group_id == 2){
@ -424,7 +424,7 @@ createBusinessAssetsForAddress(): FormGroup {
var result=Object.keys(supp_data).map(function(key){
return supp_data[key];
})
// console.log("Result",result)
if(result.length>0){
result.forEach((datas,index)=>{
this.appxMarketAmtInwords[index]=this.cons.convertNumberToWords(+datas.business_approximate_market_value)
@ -446,7 +446,7 @@ createBusinessAssetsForAddress(): FormGroup {
control.push(this.initBusinessDetailsWithdata(formData));
this.setBusinessAssetsDetailsWithData(formData.business_assets_mode, val.business_details, control.length - 1)
}
// console.log("Add Business Details exit");
}
this.loadDetails=true
}
@ -465,7 +465,7 @@ createBusinessAssetsForAddress(): FormGroup {
}
initBusinessDetailsWithdata(data) {
// console.log("initBusinessDetailsWithdata",data)
let formGroup= this.fb.group({
business_assets_mode: [data.business_assets_mode],
@ -484,8 +484,7 @@ createBusinessAssetsForAddress(): FormGroup {
return formGroup;
}
setBusinessAssetsDetailsWithData(assets_details_mode:any,datas:any,i:any){
// console.log("Asset Mode business asset",assets_details_mode)
// console.log("setBusinessAssetsDetailsWithData",datas)
let val = i;
let data = datas;
const control=(<FormArray>this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray;
@ -716,17 +715,17 @@ createBusinessAssetsForAddress(): FormGroup {
let Avaliablity = 1;
value.forEach(option => {
if(option.id == 0 && option.group_id == 2){
// console.log('true');
Avaliablity = option.id;
}
});
// isOtherOwner: boolean = false;
if(Avaliablity == 0){
// console.log(Avaliablity);
item.controls.business_name_of_the_other_owner.setValidators([Validators.required]);
this.isOtherOwnerForAddress = true;
}else{
// console.log(Avaliablity);
item.controls.business_name_of_the_other_owner.setValue('');
item.controls.business_name_of_the_other_owner.clearValidators();
this.isOtherOwnerForAddress = false;

View File

@ -46,21 +46,18 @@ step:number
constructor(public navCtrl: NavController, public navParams: NavParams,public aws: AwsServiceProvider,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public cons:ConstantsProvider,public toast:ToastProvider) {
this.pdDetails=this.navParams.get('pdDetails')
// console.log("pd",this.pdDetails);
this.pd_cus_segment=this.pdDetails.customer_segment_abbr.toUpperCase();
this.pd_cus_segment=this.pd_cus_segment.substring(0,3)
this.pdid=this.pdDetails.pd_id;
this.formDetails=this.navParams.get('formDetails');
this.form_id = this.formDetails.form_id;
this.company_id=this.pdDetails.company_id
// console.log(" business bank Form Id fetched",this.form_id);
// console.log(" business bank Form Details",this.formDetails);
// console.log(" business bank Form Id",this.formDetails.form_id);
this.applicants = this.pdDetails.applicat_details;
this.applicants = this.applicants.filter(appt=>appt.applicant_type != 2)
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
//console.log(this.pdDetails);
// alert();
this.users = this.aws.getlocale();
this.step=0
this.bankingForm = this.fb.group(
@ -97,10 +94,10 @@ step:number
}
});
this.qustCat.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
console.log("Entering company List")
if(data['dataStatus']==true){
this.existCompanyList=data['records'].filter(val =>val.is_active===true && val.is_company_applicant===true)
console.log("company List",data['records'])
}
let modifyCompanyList : any=[];
if(this.existCompanyList.length>0){
@ -108,7 +105,7 @@ step:number
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
});
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
console.log("Company applicant",this.mergeCompanyApplicant)
}
})
let modifyApplicantList: any=[];
@ -117,7 +114,7 @@ step:number
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
});
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
console.log(this.mergeCompanyApplicant);
// this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1);
}
}
@ -153,7 +150,7 @@ step:number
}
/** To Convert Month into Year */
ConvertMonthintoYear(itemrow,e){
//console.log(itemrow);
let year = itemrow.controls.vintage_year.value;
@ -179,9 +176,7 @@ step:number
}
setRequiredValidation(value,item,flag) {
console.log(item);
console.log(value);
console.log(flag);
if(flag == 1){
value==0
@ -232,7 +227,7 @@ step:number
control.push(this.createBankItem(''));
//console.log(this.pdQuestionAddress.get('items')['controls']);
}
@ -250,7 +245,7 @@ step:number
control.reset();
}
else
// console.log('index value -', index);
control.removeAt(i);
}
@ -268,21 +263,21 @@ step:number
var result = Object.keys(res['records'].banking_details).map(function(key) {
return res['records'].banking_details[key];
});
console.log("retrieve data",res['records']);
this.bankingForm.controls.banking_form_remark.setValue(res['records'].banking_form_remark);
if(result.length == 0){
console.log("DAta Status 0")
control.push(this.createBankItem(''))
}else
{
console.log("DAta Status >1")
result.forEach((datas,index)=>
{
this. selectedAccTypeChanges(datas.account_type,index);
if(datas.limit != ''){
console.log("Datas",datas);
this.amtInwords[index] = this.cons.convertNumberToWords(+datas.limit);
}
this. selectedAccTypeChanges(datas.account_type,index);
@ -293,7 +288,7 @@ step:number
}
}else
{
console.log("DAta Status False");
control.push(this.createBankItem(''));
}
});
@ -309,9 +304,9 @@ step:number
records.company_id=this.company_id;
records.banking_details = answerData.itemRows;
records.banking_form_remark = answerData.banking_form_remark;
console.log('data', records);
this.qustCat.saveForm(records).subscribe(data => {
console.log('data', data);
if(data['dataStatus']==true)
{
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
@ -321,7 +316,7 @@ step:number
this.toast.pdTriggerappmessage("Sorry!! Something Went Wrong");
}
})
//console.log(answerData);
}

View File

@ -64,35 +64,34 @@ export class PdQuestionBusinessGroupPage {
if(details.form_id==1){
this.navCtrl.push(PdQuestionSupplierInfoPage,{'formDetails':details,'pdDetails':this.pdDetails});
// console.log("form_id",details.form_id)
}
if(details.form_id==2){
this.navCtrl.push(PdQuestionClientInfoPage,{'formDetails':details,'pdDetails':this.pdDetails});
// console.log("form_id",details.form_id)
}
if(details.form_id==11){
this.navCtrl.push(PdQuestionStockInfoPage,{'formDetails':details,'pdDetails':this.pdDetails});
// console.log("form_id",details.form_id)
}
if(details.form_id==13){
this.navCtrl.push(PdQuestionBusinessInfoPage,{'formDetails':details,'pdDetails':this.pdDetails});
// console.log("form_id",details.form_id)
}
if(details.form_id==14){
this.navCtrl.push(PdQuestionFinancialInfoPage,{'formDetails':details,'pdDetails':this.pdDetails});
console.log("form_id",details.form_id)
}
if(details.form_id==15){
this.navCtrl.push(PdQuestionSupplierInfoPage,{'formDetails':details,'pdDetails':this.pdDetails});
// console.log("form_id",details.form_id)
}
if(details.form_id==21){
this.navCtrl.push(PdQuestionBusinessBankingPage,{'formDetails':details,'pdDetails':this.pdDetails});
// console.log("form_id",details.form_id)
}
if(details.form_id==22){
this.navCtrl.push(PdQuestionBusinessAssetsPage,{'formDetails':details,'pdDetails':this.pdDetails});
// console.log("form_id",details.form_id)
}

View File

@ -63,14 +63,14 @@ export class PdQuestionBusinessInfoPage {
this.getStateCityDet();
this.pdDetails = this.navParams.get('pdDetails');
this.pdid=this.pdDetails.pd_id
console.log("pdails",this.pdDetails)
this.formdetails = this.navParams.get('formDetails');
console.log(this.formdetails)
this.FormId = this.formdetails.form_id;
this.users = this.aws.getlocale();
//console.log("pd",this.pdDetails);
this.applicants=this.pdDetails.applicat_details;
console.log("Applicants",this.applicants)
this.generalExistEntityType=this.pdDetails.business_entity_type
this.generalExistEntityType_other=this.pdDetails.business_entity_type_other
this.generalExistBusinessYear=this.pdDetails.business_years
@ -134,7 +134,7 @@ export class PdQuestionBusinessInfoPage {
getdropdown() {
this.qustCat.getcommondrop('RELATIONSHIPS').subscribe(data => {
// console.log('data', data);
data['records'].forEach(val => {
if (val.isactive == 1) {
this.relationData.push(val);
@ -143,7 +143,7 @@ export class PdQuestionBusinessInfoPage {
});
this.qustCat.getcommondrop('INDUSTRYCLASSIFICATION').subscribe(data => {
// console.log('data', data);
data['records'].forEach(val => {
if (val.isactive == 1) {
this.industryData.push(val);
@ -152,7 +152,7 @@ export class PdQuestionBusinessInfoPage {
});
this.qustCat.getcommondrop('TYPEOFACTIVITY').subscribe(data => {
// console.log('data', data);
data['records'].forEach(val => {
if (val.isactive == 1) {
this.activityData.push(val);
@ -172,20 +172,20 @@ export class PdQuestionBusinessInfoPage {
});
// console.log("stateList first",this.stateList);
this.qustCat.getcommondrop('COUNTRY').subscribe(data=>{
this.countryDataList=data['records'].filter(val=>val.isactive==1);
//console.log("countryDataList",this.countryDataList)
});
this.qustCat.getcommondrop('TITLES').subscribe(data=>{
this.titleData=data['records'].filter(val=>val.isactive==1);
})
this.qustCat.getAllPersonsName(this.pdid).subscribe(data=>{
if(data.dataStatus){
console.log("Person List",data)
this.personsList=data['record'].filter(val=>val.applicant_type==1)
console.log("Person List",this.personsList)
}
})
@ -193,16 +193,16 @@ export class PdQuestionBusinessInfoPage {
getStateCityDet(){
this.qustCat.getStateCityDetails().subscribe(data=>{
// console.log("data first23",data.records)
this.stateList=data.records
// console.log("stateListFun",this.stateList)
this.getDetails();
});
}
getDetails(){
// console.log("get State",this.stateList);
let params: any = {};
params.pd_id = this.pdid;
params.pd_form_id = 13
@ -210,7 +210,7 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
this.qustCat.retiverForm(params).subscribe(data=>{
let businessVal=data['records']
let constVal: any;
// console.log("datavalue",businessVal)
const Partnr:any = <FormArray>this.businessForm.controls['partners'];
@ -226,7 +226,7 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
const otherDoc = <FormArray>this.businessForm.controls['documents'];
//retailControl.push(this.manufactureDetails());
//manufacture_details.push(this.manufactureDetails())
// console.log("Manufacture",manufacture_details);
// const india_sales:any=<FormArray> this.businessForm.controls['manufacturing_activity_details']['controls'][0].controls.india_where_sale_done;
//india_sales.push(this.indiaSalesDone())
//const country_sale:any=<FormArray>this.businessForm.controls['manufacturing_activity_details']['controls'][0].controls.countries_where_export_done;
@ -239,7 +239,7 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
let PartnrArray=Object.keys(data['records'].partners).map(function(key){
return data['records'].partners[key];
})
// console.log("PartnrArray",PartnrArray)
if(PartnrArray.length==0){
Partnr.push(this.createPartners())
}
@ -304,7 +304,7 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
this.appxSalaryAmtInwords = this.cons.convertNumberToWords(businessVal.employees_appx_salary);
}
console.log("pa",this.businessForm.controls['partners']['controls'])
// this.businessForm.controls['partners']['controls'].value.partner_other_name='dd'
// this.businessForm.setValue(businessVal);
//this.businessForm.value.seasonality
@ -327,9 +327,7 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
return activityData[index];
}
}).filter(item => item != undefined);
// console.log("exist act",exist_activity_data);
// console.log('activityData',activityData)
// console.log(this.businessForm.controls['select_business_activity_type'])
if(check_exist_businees_activity.length > 0)
{
check_exist_businees_activity.forEach((val,index) => {
@ -337,13 +335,13 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
// this.businessForm.controls['select_business_activity_type'].value[index].exist_status=val.exist_status
});
// console.log("exist business act",check_exist_businees_activity)
businessVal.select_business_activity_type=check_exist_businees_activity;
}
// business_activity.push(this.createBusinessActivity())
// this.businessForm.controls['select_business_activity_type'].setValue(check_exist_businees_activity)
// console.log("Entering Manufacture Details");
if(data['records'].manufacturing_activity_details){
let selectedManufacturing=Object.keys(data['records'].manufacturing_activity_details).map(function(key){
return data['records'].manufacturing_activity_details[key];
@ -398,19 +396,19 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
}
});
businessVal.manufacturing_activity_details=selectedManufacturing;
// console.log("data")
}
else{
// console.log("no data ")
businessVal.manufacturing_activity_details=[];
}
}
else{
// console.log("no data last")
businessVal.manufacturing_activity_details=[];
}
// console.log("exit")
if(data['records'].retail_trading_activity_details){
let selectedRetail = Object.keys(data['records'].retail_trading_activity_details).map(function (key) {
@ -471,7 +469,7 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
else {
businessVal.retail_trading_activity_details=[];
}
console.log("retail finish")
// update whole sale details
if(data['records'].wholesale_trading_activity_details){
@ -535,7 +533,7 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
businessVal.wholesale_trading_activity_details=[];
}
console.log("whole Sale finish")
if(data['records'].service_provider_activity_details){
let selectedService=Object.keys(data['records'].service_provider_activity_details).map(function (key){
@ -593,20 +591,21 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
}
});
// console.log("data",selectedService)
businessVal.service_provider_activity_details=selectedService;
}
else{
businessVal.service_provider_activity_details=[];
console.log("no data")
}
}
else {
businessVal.service_provider_activity_details=[];
}
console.log("Service finish")
if(data['records'].others_activity_details){
// update others activity details
@ -627,7 +626,7 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
businessVal.others_activity_details=[];
}
console.log("Others finish")
// dynamically add form group control
if(data['dataStatus']){
@ -637,16 +636,14 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
}
console.log("Seasonality");
console.log('businessVal',businessVal)
// this.businessForm.controls['partners'].setValue(PartnrArray);
//this.businessForm.controls['persons_with_relationships'].setValue(PartnrArray1)
// this.businessForm.controls['manufacturing_activity_details'].setValue(businessVal.manufacturing_activity_details)
console.log("inserting..")
this.businessForm.setValue(businessVal);
console.log("Finish")
}
else{
@ -671,14 +668,12 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
val.toUpperCase()=='YES' ? this.businessForm.addControl('peak_period_of_business', new FormControl('', Validators.required)) : this.businessForm.removeControl('peak_period_of_business');
val.toUpperCase()=='YES' ? this.businessForm.addControl('month_of_business_run', new FormControl('', Validators.required)) : this.businessForm.removeControl('month_of_business_run');
});
// console.log("getDetails exit")
}
filterCity(datasource: any,filterid:number) {
//console.log("datasource",datasource)
// console.log("Filter Id",filterid)
//console.log("State List" ,this.stateList)
if(filterid){
let filter = this.stateList.filter(x=>x.state_id==filterid);
@ -713,7 +708,7 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
});
let merged = [].concat.apply([], setCityFilter);
// console.log(merged)
if(merged.length>0){
let check: any = merged.filter(function(fVal){
return existCities.some(function(sVal){
@ -752,7 +747,7 @@ changeBusinessActivity(event: any){
let manufacturingControl = <FormArray>this.businessForm.controls['manufacturing_activity_details'];
manufacturingControl.controls = [];
manufacturingControl.setValue([]);
console.log("true");
}
else if(event.value.exist_status==false && event.value.type_of_activity_id==2){
this.ManufacturingChecked = event.value.exist_status;
@ -959,7 +954,7 @@ changePanIndiaOptions(type,selectedIndex,value) {
control.controls[selectedIndex].removeControl('india_where_sale_done');
control.controls[selectedIndex].removeControl('max_sale_state_name');
if(value=='Yes') {
console.log("clicked yes");
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([]));
control.controls[selectedIndex].addControl('max_sale_state_name',this.fb.array([this.maxSaleState()])); }
else if(value=='No'){
@ -1364,9 +1359,9 @@ relationChanged(event) {
}
submitDetails() {
console.log("First",this.businessForm.value);
let family: any = [];
console.log(this.FormId)
let design: any;
//let records={'pdid':this.pdDetails.pd_id,'formid':this.FormId,'fk_createdby':this.users};
let records:any;
@ -1374,7 +1369,7 @@ submitDetails() {
// records.formid = this.FormId;
// records.fk_createdby = this.users;
records=this.businessForm.value;
console.log("Records",records)
//if(records.persons_with_relationships=='')
if (records.other_documents == 'no') {
delete records.documents;
@ -1386,7 +1381,7 @@ submitDetails() {
delete records.ownership_others;
}
// records.family_members_involved = this.relativeNames;
//console.log('recordss', records);
let validationFlag : number = 0;
@ -1481,7 +1476,7 @@ submitDetails() {
let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':this.FormId.form_id};
this.qustCat.retiverForm(records).subscribe(data => {
let businessVal = data['records'];
// console.log('data', businessVal);
let constVal: any;
const Desgn = <FormArray>this.businessForm.controls['designation'];
const Partnr = <FormArray>this.businessForm.controls['partners'];
@ -1574,23 +1569,18 @@ ServiceCounterArray: any = [];
//this.ExportFlag=false
const parentControl = <FormArray>this.businessForm.controls['select_business_activity_type'];
const childControl = <FormArray>parentControl.controls[0];
// console.log('parentControl',parentControl);
// console.log('parentControl.controls',parentControl.controls);
// console.log('childControl',childControl.value);
// console.log('childControl',childControl.value.exist_status);
// childControl.forEach((datas,index) => {
// console.log(datas);
// // exist_status==true && event.value.type_of_activity_id
// console.log(datas[index].);
// console.log(datas[index].controls.exist_status.value);
// });
console.log('CheckExport');
console.log(value,stringFlag,index);
console.log(this.ManufacturingChecked , this.RetailedChecked , this.WholeSalesChecked , this.ServiceChecked);
if(!this.ManufacturingChecked){
if(stringFlag == 'MActivity' && value != "Within India"){
@ -1642,20 +1632,19 @@ ServiceCounterArray: any = [];
}
let SumOfManufacturingCounter = this.ManufacturingCounterArray.reduce((sum, val) => sum + +val, 0);
console.log(SumOfManufacturingCounter,this.ManufacturingCounterArray);
let SumOfRetailCounter = this.RetailCounterArray.reduce((sum, val) => sum + +val, 0);
// console.log(SumOfRetailCounter , this.RetailCounterArray);
let SumOfWholeSaleCounter = this.WholeSaleCounterArray.reduce((sum, val) => sum + +val, 0);
// console.log(SumOfWholeSaleCounter,this.WholeSaleCounterArray);
let SumOfServiceCounter = this.ServiceCounterArray.reduce((sum, val) => sum + +val, 0);
// console.log(SumOfServiceCounter,this.ServiceCounterArray);
let overallCounter = SumOfManufacturingCounter + SumOfRetailCounter + SumOfWholeSaleCounter + SumOfServiceCounter ;
this.ExportFlag = overallCounter > 0 ? true : false ;
console.log('overallCounter , SumOfManufacturingCounter , SumOfRetailCounter , SumOfWholeSaleCounter , SumOfServiceCounter ' , overallCounter , SumOfManufacturingCounter , SumOfRetailCounter , SumOfWholeSaleCounter , SumOfServiceCounter);
console.log('Current Flag Status : ',this.ExportFlag );
}
}

View File

@ -126,7 +126,7 @@ export class PdQuestionClientInfoPage {
// let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (key) {
// return dataForm.main_raw_materials[key];
// });
console.log(dataForm);
let api_main_raw_materials = dataForm.manufacturing_details[0].main_raw_materials;
this.initManufacturingProductsDetails(api_main_raw_materials);
@ -517,7 +517,7 @@ export class PdQuestionClientInfoPage {
// }
/** To Save/Edited Popup Data */
saveClientInfo(answerFormValues) {
// console.log(answerFormValues);
Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]);
if (answerFormValues.manufacturing_details[0] == null) {
delete answerFormValues['manufacturing_details'];

View File

@ -61,8 +61,7 @@ export class PdQuestionFinancialInfoPage {
// this.FormId=this.navParams.get('FormId');
this.company_id=this.pdDetails.company_id
this.users=this.aws.getlocale();
console.log("Pd",this.pdDetails);
console.log("Form ",this.FormId)
this.initFinancialForm()
}

View File

@ -267,14 +267,13 @@ export class PdQuestionStockInfoPage {
tradingForm: Boolean = false;
tradingFormCreation(val) {
// console.log('val',val);
// console.log('tradingForm',this.tradingForm);
let arr = val.filter(data => data.type_of_activity_id == 4);
if (arr.length > 0) {
// console.log(arr.products);
// if(arr.products === undefined){
// console.log(arr.products);
// this.tradingForm = false;
// return;
// }

View File

@ -39,7 +39,7 @@ export class PdQuestionCurrentLoansPage {
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public toast:ToastProvider, public aws:AwsServiceProvider,public constant:ConstantsProvider) {
this.applicants=[]
// console.log("before",this.applicants)
this.questionDetails = this.navParams.get('questionDetails');
this.pdDetails = this.navParams.get('pdDetails');
this.pdid=this.pdDetails.pd_id;
@ -50,7 +50,7 @@ export class PdQuestionCurrentLoansPage {
this.getdropdown();
// this.applicants.push
console.log(this.applicants);
this.users = this.aws.getlocale();
this.currentLoans = this.fb.group(
{
@ -62,7 +62,7 @@ export class PdQuestionCurrentLoansPage {
}
ionViewDidLoad() {
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
this.getcurrentLoans()
}
@ -81,10 +81,10 @@ export class PdQuestionCurrentLoansPage {
});
this.qustCat.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
console.log("Entering company List")
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
if(data['dataStatus']==true){
this.existCompanyList=data['records'].filter(val =>val.is_active===true && val.is_company_applicant===true)
console.log("company List",data['records'])
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
}
let modifyCompanyList : any=[];
if(this.existCompanyList.length>0){
@ -93,7 +93,7 @@ export class PdQuestionCurrentLoansPage {
});
//modifyCompanyList.push({'id':"0",'name':'Others','group_id':1})
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
console.log("Company applicant",this.mergeCompanyApplicant)
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
}
})
let modifyApplicantList: any=[];
@ -104,7 +104,7 @@ export class PdQuestionCurrentLoansPage {
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
console.log(this.mergeCompanyApplicant);
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
// this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1);
}
@ -118,7 +118,7 @@ export class PdQuestionCurrentLoansPage {
exitsCheck(val)
{
console.log(val);
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
if(val =="Yes")
{
@ -222,8 +222,7 @@ inWords(e,i,flag){
selectedfrequency(e,i){
// console.log(+e.value);
// console.log(i);
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
// alert('function in');
@ -238,11 +237,11 @@ selectedfrequency(e,i){
case 7: this.placeholderName[i] = 'Monthly Instalment Amount'; break;
default: this.placeholderName[i] = 'Instalment Amount'; break;
}
// console.log(this.placeholderName);
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
}
submitCurrentloan(answerData) {
console.log(answerData);
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
let records: any = {};
records.pdid = this.pdDetails.pd_id;
records.formid = this.FormId.form_id;
@ -250,9 +249,9 @@ submitCurrentloan(answerData) {
records.existing_loan = answerData.existing_loan;
records.loan_details = answerData.loan_details;
records.currentloan_remarks = answerData.currentloan_remarks;
console.log('data', records);
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
this.qustCat.saveForm(records).subscribe(data => {
console.log('data', data);
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
if(data['dataStatus']==true)
@ -271,10 +270,10 @@ submitCurrentloan(answerData) {
if(res['dataStatus']==true )
{
let currentLoanDetails = res['records'];
console.log("res",res['records']);
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
if(res['records'].loan_details !== undefined && res['records'].loan_details !=null && res['records'].loan_details !=''){
var result = Object.keys(res['records'].loan_details).map(function(key) {
console.log("Function result",res['records'].loan_details[key]);
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
return res['records'].loan_details[key];
});
@ -291,7 +290,7 @@ submitCurrentloan(answerData) {
{
result.forEach((datas,index)=>
{
console.log("Datas",datas)
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
control.push(this.createLoanDetail(null));
this.selectedfrequency(datas.frequency,index);
if(datas.loan_amount!=''){
@ -314,18 +313,17 @@ submitCurrentloan(answerData) {
}
else {
// console.log('else part',value.status);
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
this.qustCat.getAssetsWithLoanFromBusiness(this.pdid).subscribe(data=>{
// console.log(data);
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
if(data.dataStatus == true){
// console.log(data.record);
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
let AssetData = data.record;
// console.log(AssetData.business_assets);
// console.log(AssetData.other_assests);
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
if(AssetData.business_assets.length>0){
AssetData.business_assets.map(element => {
@ -433,7 +431,7 @@ submitCurrentloan(answerData) {
}
}
else{
// console.log('else,else.part');
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
control.push(this.createLoanDetail(null));
}
}

View File

@ -64,10 +64,7 @@ data:any;
this.pdDetails = this.navParams.get('pdDetails');
this.selected_person=this.pdDetails.pdapplicants_details;
this.selectPerson=this.pdDetails.applicat_details
console.log("applicant details",this.selected_person);
console.log('Pd Applicant',this.pdDetails);
this.users = this.aws.getlocale();
//console.log('aws',this.users);
this.familyForm = this.fb.group({
@ -87,7 +84,7 @@ data:any;
}
ionViewDidLoad() {
console.log('ionViewDidLoad PdQuestionFamilyPage');
console.log("ionViewDidLoad PdQuestionFamilyPage")
this.getFamilyData();
}
initFamilyDetails(records) : void
@ -135,14 +132,11 @@ data:any;
const control = <FormArray>this.familyForm.controls['family_details'];
control.push(formData);
// console.log('family full records',val);
let inx=control.length-1;
//this.getNumberOfFamilyMemberDetails(inx);
this.initFamilyMembersDetails(inx, val.family_members_details);
console.log(control);
// console.log('control family',inx);
//this.initFamilyMembersDetails
@ -181,7 +175,6 @@ data:any;
}
initFamilyMembersDetails(inx,val) :void {
const control = <FormArray>this.familyForm.controls['family_details']['controls'][inx].controls.family_members_details;
// console.log("Controls for family members ",control.length);
val.forEach((vals,index)=>{
@ -204,7 +197,6 @@ data:any;
non_earning_if_retired_from: [vals.non_earning_if_retired_from || null, Validators.compose([])],
})
// console.log("family member control",control);
control.push(datas);
});
}
@ -244,7 +236,6 @@ data:any;
}
removeMemberDet(index:any,f_index:any){
const control=<FormArray>this.familyForm.controls['family_details']['controls'][f_index].controls.family_members_details;
console.log("length",control)
if(control.length>1){
control.removeAt(index);
}
@ -258,28 +249,20 @@ data:any;
{
var datavalue=data;
// console.log("Array",datavalue);
let formData=<FormArray>this.familyForm.controls['family_details']['controls'][datavalue].controls;
//console.log("form0",formData['total_number_of_family_members']);
if(formData['total_number_of_family_members'].valid)
{
let totmem=formData['total_number_of_family_members'].value;
console.log("Tot num",totmem);
const control=<FormArray>this.familyForm.controls['family_details']['controls'][data].controls.family_members_details;
console.log("Form Fields",control.length)
if(totmem>=control.length){
let len=totmem-control.length;
//console.log("if",len);
for( let i=0;i<len;i++){
control.push(this.generateFamilyMembersDetailsGet())
}
}
else if (totmem < control.length) {
// console.log("For Slice",control.controls.length)
//control.controls.slice(1, 2);
// console.log(this.total_number_of_family_members);
var numbe=control.length-totmem;
console.log("For Remove",numbe);
for(let i=control.length;i>=totmem;i--)
{
control.removeAt(i);
@ -303,10 +286,8 @@ data:any;
control.controls=[];
}
/* const control=<FormArray>this.familyForm.controls['family_details']['controls'][data].controls.family_members_details;
console.log("dataff",control);
control.push(this.initFamilyMembersDetails());
*/
//console.log(formData['1']);
}
generateFamilyMembersDetailsGet(): FormGroup {
return this.fb.group({
@ -329,7 +310,6 @@ data:any;
getRelation() {
let master_name = 'RELATIONSHIPS';
this.qustCat.getcommondrop(master_name).subscribe(data => {
//console.log('data', data);
if(data['dataStatus'] == true){
this.relationData = data['records'].filter(rel=>rel.isactive ==1);
@ -371,15 +351,12 @@ data:any;
}
getCity(e,i){
console.log("E value",e);
// this.cityData = this.wholeCityData.filter(city=>city.fk_state_id == e);
// this._pd.retriveForm(params).subscribe(data => {
this.qustCat.getStateWiseCities(e).subscribe(data=>{
if (data['dataStatus'] == true) {
console.log(data.status);
this.cityData[i] = data.records.cities;
this.pincodeData[i] = data.records.pincode;
console.log(this.cityData);
}
});
}
@ -387,7 +364,6 @@ getoccupation()
{
let master_name = 'OCCUPATIONMEMBERS';
this.qustCat.getcommondrop(master_name).subscribe(data => {
//console.log('data', data);
if(data['dataStatus']==true){
this.occupationData = data['records'].filter(occ=>occ.isactive ==1);
}
@ -410,7 +386,6 @@ addearningMembers()
this.items.push(this.createMembers());
this.count++;
this.checkfamilystatus(this.count,'');
console.log(120,this.count);
}
@ -424,7 +399,6 @@ deleteEarningMembers(i)
this.items.removeAt(i);
}
this.count--;
console.log(134,this.count);
this.checkfamilystatus(this.count,'');
}
createNonMembers(): FormGroup {
@ -463,8 +437,6 @@ checkfamilystatus(count,familystatus)
}else{
familystatus = this.familyForm.get('members').value;
}
console.log(familystatus);
console.log(count);
if(familystatus !== null ){
if(familystatus == count)
{
@ -479,7 +451,6 @@ checkfamilystatus(count,familystatus)
/* Old
savepdfamily(answerData)
{
console.log(answerData);
let records: any = {};
records.no_of_years = answerData.years;
if (answerData.ownership == '4') {
@ -502,10 +473,8 @@ savepdfamily(answerData)
records.formid = this.FormId.form_id;
records.fk_createdby = this.users;
records.family_details_form_remark = answerData.family_details_form_remark;
console.log('params', records);
this.qustCat.saveForm(records).subscribe(res=>
{
//console.log(res);
if(res['dataStatus']==true)
{
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
@ -520,22 +489,17 @@ savepdfamily(answerData)
let records:any={};
records=this.familyForm.value;
console.log("family details",records.family_details);
//console.log("Records",records);
Object.keys(records).forEach((key)=>(records[key]==null)&& delete records[key]);
records.pdid=this.pdDetails.pd_id;
records.formid=this.FormId.form_id;
records.fk_createdby=this.users;
//console.log(JSON.stringify(records));
this.qustCat.saveForm(records).subscribe(res=>{
// console.log("Result",);
this.toast.pdTriggerappmessage("Record Saved Successfully");
this.navCtrl.pop();
},err=>{
console.log(err);
this.toast.pdTriggerappmessage("Some Fields value is Missing Please Fill It");
})
@ -561,10 +525,8 @@ savepdfamily(answerData)
records.formid = this.FormId.form_id;
records.fk_createdby = this.users;
records.family_details_form_remark = answerData.family_details_form_remark;
console.log('params', records);
this.qustCat.saveForm(records).subscribe(res=>
{
//console.log(res);
if(res['dataStatus']==true)
{
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
@ -686,7 +648,6 @@ resValue:any;
if(res['dataStatus']==true){
let Temparr : any = [];
console.log("Family Details",res.record)
if(res.record.from_general_form.length>0){
let familyMembersGeneralForm=Object.keys(res.record.from_general_form).map(function(key){
return res.record.from_general_form[key]
@ -699,7 +660,6 @@ resValue:any;
age:element.age,
data_gets_from:'GeneralForm'};
// console.log('familyMembersGeneralForm',familyMembersGeneralForm);
});
Temparr.push(datas);
}
@ -723,27 +683,21 @@ resValue:any;
let records={'pd_id':this.pdDetails.pd_id,'pd_form_id':this.FormId.form_id};
this.qustCat.retiverForm(records).subscribe(res=>{
//console.log("result",JSON.stringify(res));
console.log("datastatus",res['dataStatus']);
if(res['status']==200){
console.log("getValue records",res['records'].family_details);
this.familyForm.controls.family_details_form_remark.setValue(res['records'].family_details_form_remark);
this.resValue=res;
this.initFamilyDetails(res['records'].family_details);
}
else{
console.log("no data");
this.initFamilyDetails(null);
}
//this.generateFamilyMembersDetailsGetData(res['records'].family_members_details);
//console.log("datastatus number",res[0].status)
},err=>{
console.log(err);
})
/*let earning:any = [];
let non_earning:any = [];
@ -756,12 +710,10 @@ resValue:any;
return res['records'].non_earning_members[key];
});
//console.log(non_earning);
this.familyForm.controls['family_details_form_remark'].setValue(res['records'].family_details_form_remark);
earning = Object.keys(res['records'].earning_members).map(function(key) {
return res['records'].earning_members[key];
});
console.log(earning);
let familyDetails = res['records'];
this.checkfamilystatus(non_earning.length + earning.length,familyDetails.family_members);
// this.familyForm.controls['person'].setValue(familyDetails.person_met);
@ -774,26 +726,20 @@ resValue:any;
this.familyForm.controls['rent'].setValue(familyDetails.what_rent);
// this.familyForm.controls['earningMembers'].setValue(earning);
// for(this.)
console.log(189);
this.items = this.familyForm.get('earningMembers') as FormArray;
this.membersitem =this.familyForm.get('nonEarningMembers') as FormArray;
console.log(192);
if(earning.length==0)
{
this.addearningMembers();
console.log('if');
}else
{
earning.forEach(datas => {
this.count++;
this.items.push(this.createMembers());
});
console.log('else',earning);
console.log(this.items);
this.familyForm.controls['earningMembers'].setValue(earning);
}
//console.log(201,earning);
if(non_earning.length==0)
{

View File

@ -32,7 +32,6 @@ export class PdQuestionFinalRemarkPage {
this.pdid=this.pdDetails.pd_id
this.FormId=this.navParams.get('FormId');
this.users=aws.getlocale()
console.log("form Id",this.FormId);
this._finalRemarkForm=this.fb.group({
fk_createdby:[this.users],
@ -53,10 +52,10 @@ export class PdQuestionFinalRemarkPage {
}
ionViewDidLoad() {
console.log('ionViewDidLoad PdQuestionFinalRemarkPage');
}
getDropDown(){
this.qustcat.getcommondrop('CUSTOMERBEHAVIOUR').subscribe(res=>{
// console.log("drop",res);
this.m_remarkTypeCustomerBehaviour=res['records'].filter(data=>data.isactive==1)
})
this.qustcat.getcommondrop('PDOFFICERRECOMMENDATIONS').subscribe(res=>{
@ -65,9 +64,7 @@ getDropDown(){
}
RecommendationChange(e){
console.log('e',e);
if(e==1){
console.log('other only',e);
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValidators([Validators.required]);
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
@ -80,7 +77,6 @@ RecommendationChange(e){
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].setValue('');
}
if(e==2){
console.log('all Validation clear ',e);
this._finalRemarkForm.controls['others_pd_officers_recommendation'].clearValidators();
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValue('');
@ -95,7 +91,6 @@ RecommendationChange(e){
}
if(e==3){
console.log('negative only',e);
this._finalRemarkForm.controls['enter_reason_for_negative'].setValidators([Validators.required]);
this._finalRemarkForm.controls['enter_reason_for_negative'].updateValueAndValidity();
@ -109,7 +104,6 @@ RecommendationChange(e){
}
if(e==4){
console.log('credit only',e);
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].setValidators([Validators.required]);
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].updateValueAndValidity();
@ -127,7 +121,6 @@ RecommendationChange(e){
let saveRecords={'pd_id':this.pdid,'pd_form_id':this.FormId.form_id}
this.qustcat.retiverForm(saveRecords).subscribe(data=>{
if(data['dataStatus']==true){
console.log("Data get",data['records'])
this._finalRemarkForm.controls.final_custormer_remark_type.setValue(data['records'].final_custormer_remark_type);
this._finalRemarkForm.controls.final_other_customer_behaviour.setValue(data['records'].final_other_customer_behaviour);
this._finalRemarkForm.controls.is_service_provided.setValue(data['records'].is_service_provided);
@ -143,7 +136,6 @@ RecommendationChange(e){
var answerData=this._finalRemarkForm.value
//To Remove The "Null" With Key also
Object.keys(answerData).forEach((key) => (answerData[key] == null) && delete answerData[key]);
console.log(JSON.stringify(answerData));
this.qustcat.saveForm(answerData).subscribe(res=>{
if(res['dataStatus']==true){
this.toast.pdTriggerappmessage("Record Saved Successfully");

View File

@ -64,16 +64,13 @@ export class PdQuestionGeneralInfoPage {
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public fb:FormBuilder,public modal:ModalController) {
this.maxDate = new Date();
// console.log(this.maxDate);
this.pd_applicants_details = [];
this.pd_applicants_details.pop();
this.pdDetails = this.navParams.get('pdDetails');
//console.log("Full pd",this.pdDetails);
//let get_max_date=this.pdDetails.pd_date_of_initiation.split('/').reverse.join("/");
//this.maxDate=new Date(get_max_date)
this.FormId = this.navParams.get('FormId');
// console.log(this.pdDetails);
this.users = this.aws.getlocale();
this.getdropdown();
@ -94,8 +91,6 @@ export class PdQuestionGeneralInfoPage {
//this.initIndividuals();
this.pd_applicants_details = this.pdDetails.applicat_details;
// console.log(this.pd_applicants_details);
// console.log(this.pd_applicants_details);
@ -121,7 +116,6 @@ export class PdQuestionGeneralInfoPage {
this.fulldata=control.value;
//control.controls.length
//control.push()
// console.log("individualsListBothCase",this.individualsListBothCase);
});
this.generalForm.controls['company_value'].valueChanges.subscribe(val=>{
let control=<FormArray>this.generalForm.controls['company_value'];
@ -139,8 +133,6 @@ export class PdQuestionGeneralInfoPage {
initlistv(data,purpose) :void
{
// console.log("full data length",this.lengthv.individuals.length);
//console.log("gne data",data)
const control=<FormArray>this.generalForm.controls['list_value'];
if(purpose=='ins')
{
@ -203,13 +195,9 @@ export class PdQuestionGeneralInfoPage {
}
qualificationById(data):string{
//console.log("qualification List",this.qualificationList.length)
//console.log("value",data)
console.log("qual List inside fun",this.qualificationList);
for(let i of this.qualificationList){
if(data==i.qualification_id){
this.qual_name=i.qualification_name
//console.log("i",this.qual_name)
return this.qual_name
}
}
@ -281,19 +269,14 @@ export class PdQuestionGeneralInfoPage {
business_entity_type_name:[c_business_name]
});
control.push(formData);
//console.log("finished company Value");
this.h_companies=false;
}
}
}
businessEntityById(val):string{
//console.log("qualification List",this.qualificationList.length)
// console.log("value",val)
console.log("businessEntity List inside fun",this.businessEntityTypeList)
for(let v of this.businessEntityTypeList){
if(val==v.business_entity_type_id){
var name=v.business_entity_type_name
// console.log("i",v.business_entity_type_name)
return name
}
}
@ -399,7 +382,6 @@ datajson:any;
dataobj:any;
addRec(v){
//console.log("v",v);
if(v=='1')
{
this.buttonClick=!this.buttonClick;
@ -416,15 +398,10 @@ dataobj:any;
// const control=<FormArray>this.generalForm.controls['individuals'];
//control.removeAt(i);
//this.data=this.generalForm.value.individuals;
/* console.log("Data First",this.data);
this.cart.push(this.generalForm.value.individuals);
this.data=Object.assign(this.cart);
console.log("Cart",this.cart);
// this.data=Object.assign(this.generalForm.value.individuals)
this.datajson=JSON.stringify(this.cart)
console.log("dataobj",this.dataobj)
console.log("data",this.data);
console.log("datajson",this.datajson)*/
if(v=='1')
{
if(!this.generalForm.controls['individuals'].valid){
@ -465,8 +442,6 @@ dataobj:any;
control.value[i].is_active=false
var vla=control.value[i]
this.OldData.push(vla);
//console.log(vla);
//console.log(this.OldData);
control.removeAt(i);
@ -499,7 +474,6 @@ dataobj:any;
if(res['dataStatus']==true)
{
this.qualificationList=res['records'].filter(com=>com.isactive==1);
//console.log("qualificationList",this.qualificationList)
}
});
this.qustCat.getcommondrop('BUSINESSENTITYTYPE').subscribe(res=>{
@ -544,7 +518,6 @@ dataobj:any;
}
if(exist_applicant_relation.length > 0){
exist_applicant_relation.forEach(val => {
// console.log(val);
relationControl.push(this.createApplicantRelation(val));
//push related to details
this.fetch_related_details.push(val.applicant_name);
@ -603,7 +576,6 @@ dataobj:any;
let relationControl = <FormArray>this.generalForm.controls['applicant_relation'];
let pos_id = relationControl.value.map(e=>
e.pd_co_applicant_id).indexOf(item.pd_co_applicant_id.value);
// console.log(pos_id,item.pd_co_applicant_id.value);
if(item.pd_co_applicant_id.value !=0){
relationControl.removeAt(pos_id);
let pos_name=this.fetch_related_details.indexOf(item.applicant_name.value);
@ -620,7 +592,6 @@ dataobj:any;
}
createApplicantRelation(elementValue: any) {
//console.log('function in 156');
return this.fb.group({
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
@ -664,7 +635,6 @@ dataobj:any;
}
getDateObjects(values: any, controlIndex) {
// console.log("Date Change Action",values);
let control: any = this.generalForm.get('companies') as FormArray;
control.controls['business_years']=''
control.controls['business_month']=''
@ -687,7 +657,6 @@ getDateObjects(values: any, controlIndex) {
submitData(answerData)
{
console.log("Answer",answerData);
let saveRecords:any={}
var valuesData_indi:any=[]
@ -726,12 +695,9 @@ getDateObjects(values: any, controlIndex) {
saveRecords.persons_with_relationships=answerData.persons_with_relationships;
saveRecords.company_with_relationships=answerData.company_with_relationships
saveRecords.general_remark=answerData.general_remark;
console.log("save Records",saveRecords);
//console.log("saveR",saveRecords)
//console.log("Save",valuesData)
this.qustCat.saveForm(saveRecords).subscribe(dataResult=>{
if(dataResult['dataStatus']==true){
@ -741,12 +707,10 @@ getDateObjects(values: any, controlIndex) {
}
else{
this.toast.pdTriggerappmessage('Error');
//console.log("Error",)
}
})
/* Old Data
console.log("Answer Data",answerData);
if(this.generalForm.valid)
{
let saveRecords:any = {}
@ -779,7 +743,6 @@ getDateObjects(values: any, controlIndex) {
saveRecords.selected_applicant=applicantList;
saveRecords.applicant_relation=applicantRelationList;
saveRecords.fk_createdby = this.users;
console.log(saveRecords);
this.qustCat.saveForm(saveRecords).subscribe(res=>
{
if(res['dataStatus']==true)
@ -801,11 +764,9 @@ getDateObjects(values: any, controlIndex) {
companyControl.controls=[]
if(res['dataStatus']==true)
{
// console.log("Getting DAta",res);
this.lengthv=this.data_all;
this.generalForm.controls['general_remark'].setValue(this.data_all.general_remark);
//console.log("1")
this.initlistv(this.data_all.individuals,'get')
/* var arrlist_indi:any=[]
@ -819,7 +780,6 @@ getDateObjects(values: any, controlIndex) {
}
})
}*/
// console.log("2")
@ -839,29 +799,21 @@ getDateObjects(values: any, controlIndex) {
})
}
//console.log(exist_companies);
//console.log("Old Data",this.OldData);
this.initCompanyValue(arraylis,'get');
// console.log("3")
if(this.data_all.persons_with_relationships != ''){
// console.log("Entering personwithRelation")
this.initPersonRelationship(this.data_all.persons_with_relationships);
//console.log("4")
}
if(this.data_all.company_with_relationships != ''){
this.initCompanyRelationShip(this.data_all.company_with_relationships);
// console.log("5")
}
}
else{
// console.log("Error");
}
})
/*let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':this.FormId.form_id};
console.log('function in');
this.qustCat.retiverForm(records).subscribe(res=>
{
if(res['dataStatus']==true)
@ -873,7 +825,6 @@ getDateObjects(values: any, controlIndex) {
let applicant_relation = Object.keys(res['records'].applicant_relation).map(function(key)
{
console.log(key);
return res['records'].applicant_relation[key];
});

View File

@ -101,7 +101,7 @@ export class PdQuestionLenderRepresentativePage {
{
return res['records'].lender_representative_details[key];
});
console.log(lender_represent_details);
const control = <FormArray>this.representativeForm.controls['lender_representative_details'] as FormArray;
lender_represent_details.forEach(val=>
{

View File

@ -64,7 +64,6 @@ export class PdQuestionLoansPage {
constructor(public navCtrl: NavController, public navParams: NavParams, public fb: FormBuilder, public qustCat: QuestionCategoryProvider, public aws: AwsServiceProvider, public toast: ToastProvider,public constant:ConstantsProvider) {
this.FormId = this.navParams.get('FormId');
this.pdDetails = this.navParams.get('pdDetails');
console.log(this.pdDetails);
this.applicants = this.pdDetails.applicat_details
this.productAbbr = this.pdDetails.product_abbr;
this.users = this.aws.getlocale();
@ -99,7 +98,6 @@ export class PdQuestionLoansPage {
loandetails_remarks: ['', Validators.compose([Validators.required])],
});
console.log(75,this.pdDetails.product_abbr);
if(this.pdDetails.product_abbr !="BL" || this.pdDetails.product_abbr !="PL" || this.pdDetails.product_abbr !="LL")
{
this.mortagetypeAccess = true;
@ -107,7 +105,6 @@ export class PdQuestionLoansPage {
{
this.mortagetypeAccess = false;
}
console.log(this.mortagetypeAccess);
if(this.productAbbr == 'PL' || this.productAbbr == 'BL' || this.productAbbr == 'LAP'){
@ -118,7 +115,7 @@ export class PdQuestionLoansPage {
ionViewDidLoad() {
console.log('ionViewDidLoad PdQuestionLoansPage');
console .log('ionViewDidLoad PdQuestionLoansPage');
this.getLoanDetails();
}
@ -141,7 +138,6 @@ export class PdQuestionLoansPage {
this.qustCat.getcommondrop('MORTAGEPROPERTIES').subscribe(
data => {
if(data['dataStatus']==true){
// console.log(data['records']);
let that = this;
this.m_mortageTypeProperty = data['records'].filter(
function(data){
@ -158,7 +154,6 @@ export class PdQuestionLoansPage {
return ;
}
});
console.log(this.m_mortageTypeProperty);
// this.mortage_type(this.propertyType);
}
});
@ -183,10 +178,8 @@ export class PdQuestionLoansPage {
});
this.qustCat.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
console.log("Entering company List")
if(data['dataStatus']==true){
this.existCompanyList=data['records'].filter(val =>val.is_active===true && val.is_company_applicant===true)
console.log("company List",data['records'])
}
let modifyCompanyList : any=[];
if(this.existCompanyList.length>0){
@ -213,23 +206,18 @@ export class PdQuestionLoansPage {
})
console.log("complete")
}
selectedBalancesTransferChanges(event: any){
// console.log('First Time',event);
// console.log('First Time Value',event.value);
// if(event.value == 'no') {
// this.loanDetailsForm.controls['is_topup'].clearValidators();
//this.loanDetailsForm.controls['is_topup'].updateValueAndValidity();
// this.loanDetailsForm.controls['is_topup'].setValue('');
// console.log('no',event.value);
//}
//else if(event.value == 'yes'){
// this.loanDetailsForm.controls['is_topup'].setValidators([Validators.required]);
//this.loanDetailsForm.controls['is_topup'].updateValueAndValidity();
// console.log('yes',event.value);
// }
if (event.value == 'no') {
this.loanDetailsForm.controls['source'].setValidators([Validators.required]);
@ -266,9 +254,7 @@ export class PdQuestionLoansPage {
mortage_type(mortage_value)
{
console.log(mortage_value);
let mortagetypes = this.m_mortageTypeProperty.filter(mor=>mor.mortage_property_id==mortage_value)[0];
console.log(mortagetypes);
var property_name=mortagetypes.property_name
if(property_name=='Others (Please Specify)')
{
@ -300,25 +286,21 @@ export class PdQuestionLoansPage {
this.loanDetailsForm.controls['topup_amount'].setValue(topupAmt);
}
endUserChange(event) {
console.log("change",this.m_endUseForLoan);
//this.endUserList = [];
event.forEach(option => {
let othresData = this.m_endUseForLoan.filter(sub=>sub.enduse_of_loan_id==option)[0];
othresData = othresData.enduse_of_loan.substr(0,6).toLowerCase();
this.endUserList.push({ end_use: option });
console.log(201,othresData);
if (othresData == 'others') {
this.isOtherPurpose = true;
return ;
}else
{
//console.log('else');
this.isOtherPurpose = false;
}
});
console.log(this.endUserList);
}
ownerNameChange(event) {
this.ownerNames = [];
@ -327,7 +309,6 @@ export class PdQuestionLoansPage {
});
}
sourceChange(evt) {
// console.log('source Changed Values',evt);
// this.isOtherSource = (evt.some(e => e == 4) == true) ? true : false ;
// this.isPLSource = (evt.some(e => e == 3) == true) ? true : false ;
@ -368,8 +349,6 @@ export class PdQuestionLoansPage {
}
}
submitLoanDetails() {
// console.log(answerData);
// console.log(this.endUserList);
// if(this.loanDetailsForm.valid){
let records: any = {};
records.pdid = this.pdDetails.pd_id;
@ -444,7 +423,6 @@ export class PdQuestionLoansPage {
records.property_type_others = this.loanDetailsForm.controls['property_type_others'].value;
};
// records.owner_name_group = this.ownerNames;
// console.log(this.loanDetailsForm.controls['owner_name'].value);
if(this.loanDetailsForm.controls['owner_name'].value != ''){
let dataOwner_name = [];
this.loanDetailsForm.controls['owner_name'].value.forEach(element => {
@ -469,9 +447,7 @@ export class PdQuestionLoansPage {
records.emv_per_customer = this.loanDetailsForm.controls['emv_per_customer'].value;
//records.value_per_agreement = this.loanDetailsForm.controls['value_per_agreement'].value;
records.loandetails_remarks = this.loanDetailsForm.controls['loandetails_remarks'].value;
console.log('data', records);
this.qustCat.saveForm(records).subscribe(data => {
console.log('data', data);
this.navCtrl.pop();
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
// this.notifier.notify('success', 'Saved Successfully.');
@ -483,11 +459,9 @@ export class PdQuestionLoansPage {
}
getLoanDetails() {
console.log("Entering LoanDetails GEt");
let records = { 'pd_id': this.pdDetails.pd_id, 'pd_form_id': this.FormId.form_id };
this.qustCat.retiverForm(records).subscribe(value => {
console.log('value', value);
if (value['dataStatus'] == true) {
let loanDetails = value['records'];
let result = Object.keys(loanDetails.end_use_group).map(function (key) {
@ -510,8 +484,6 @@ export class PdQuestionLoansPage {
this.ownerNames.push({'end_use':val.end_use});
});
}
// console.log('enduse', enduse);
console.log('ownername', loanDetails);
this.loanDetailsForm.controls['loan_amount'].setValue(loanDetails.loan_amount);
if(loanDetails.loan_amount){ this.loanAmtInWords = this.constant.convertNumberToWords(loanDetails.loan_amount); }
this.loanDetailsForm.controls['end_use'].setValue(this.enduse);
@ -586,7 +558,6 @@ export class PdQuestionLoansPage {
this.propertyType =loanDetails.property_type;
if(loanDetails.property_type !=null){
this.mortage_type(this.propertyType);
console.log("mortageCardAccess",this.mortageCardAccess);
if(this.mortageCardAccess == true){
this.loanDetailsForm.controls['property_type_others'].setValue(loanDetails.property_type_others);
// this.mortage_type(loanDetails.property_type_others);

View File

@ -38,7 +38,6 @@ export class PdQuestionNeighbourHoodPage {
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public fb:FormBuilder, public constant: ConstantsProvider) {
this.pdDetails = this.navParams.get('pdDetails');
console.log("Pd",this.pdDetails)
this.FormId = this.navParams.get('FormId');
this.applicants = this.pdDetails.applicat_details;
this.applicants = this.applicants.filter(appt=>appt.applicant_type != 2);
@ -53,7 +52,6 @@ export class PdQuestionNeighbourHoodPage {
referencecheck_list: this.fb.array([]),
neighbour_reference_remark:''
})
// console.log(this.pdDetails);
this.users = this.aws.getlocale();
this.getneighbourhood();
@ -61,7 +59,7 @@ export class PdQuestionNeighbourHoodPage {
}
ionViewDidLoad() {
console.log('ionViewDidLoad PdQuestionNeighbourHoodPage');
console .log('ionViewDidLoad PdQuestionNeighbourHoodPage');
}
getdropdown()
@ -114,11 +112,9 @@ export class PdQuestionNeighbourHoodPage {
}
toggleVisibility(e,index,flag){
console.log(e,index);
let val
if(flag == 1){
// console.log("val",val);
this.isDisplay[index] = e;
}
else if(flag==2){
@ -127,7 +123,6 @@ toggleVisibility(e,index,flag){
}
checkOthers(values){
console.log("check other value",values)
if(values!=null) {
return values==0 ? true : false;
}
@ -208,7 +203,6 @@ checkOthers(values){
{
console.log(answerData);
let saveRecords:any = {}
let referencecheck_list:any=[];
@ -258,7 +252,6 @@ checkOthers(values){
saveRecords.fk_createdby = this.users;
saveRecords.neighbourhood_status=answerData.neighbourhood_status
saveRecords.neighbour_reference_remark=answerData.neighbour_reference_remark;
console.log(saveRecords);
this.qustCat.saveForm(saveRecords).subscribe(res=>
{
@ -282,7 +275,6 @@ checkOthers(values){
if(res['dataStatus']==true)
{
let neighbourDetails = res['records'];
console.log("neighbour Status",neighbourDetails)
// neighbourDetails.neighbourhood_list.=''
if(neighbourDetails.check_type==0)
@ -295,10 +287,8 @@ checkOthers(values){
{
return res['records'].neighbourhood_list[key];
});
console.log("data")
neighbourhood_list.forEach((element,index)=>
{
console.log("did_not Know",element.did_not_know_the_business_operation)
this.toggleVisibility(element.did_not_know_the_business_operation,index,1);
this.toggleVisibility(element.did_not_know_the_owner,index,2);
neicontrol.push(this.createNeighbourhood());
@ -316,19 +306,16 @@ checkOthers(values){
{
return res['records'].referencecheck_list[key];
});
console.log(referencecheck_list);
this.neighbourhoodForm.controls['check_type'].setValue(neighbourDetails.check_type);
this.neighbourhoodForm.controls['neighbour_reference_remark'].setValue(neighbourDetails.neighbour_reference_remark);
referencecheck_list.forEach((val,index)=>
{
let statecodesearch = val.landline.search("-");
referencecheck_list[index].statecode = val.landline.substr(0,statecodesearch);
console.log(val);
referencecheck_list[index].landline = val.landline.substr(+statecodesearch + 1,8);
control.push(this.createreferance());
this.amtInWords[index]=this.constant.convertNumberToWords(val.business_volume_amount);
});
console.log(referencecheck_list);
this.neighbourhoodForm.controls['referencecheck_list'].setValue(referencecheck_list);
}else

View File

@ -37,7 +37,6 @@ export class PdQuestionOtherIncomePage {
this.pdDetails = this.navParams.get('pdDetails');
this.pdid=this.pdDetails.pd_id;
console.log("pdid",this.pdid);
this.FormId = this.navParams.get('FormId');
this.getFrequency();
this.users = this.aws.getlocale();
@ -87,7 +86,6 @@ deleteIncomeDetails(index) {
}
checkotherDetails(val)
{
console.log("Change",val)
if(val=="Yes")
{
this.addIncomeDetails();
@ -97,8 +95,6 @@ checkotherDetails(val)
const control= <FormArray>this.otherIncomeForm.controls['income_details'];
control.removeAt(0)
// let len=control.length
// console.log("Form",this.otherIncomeForm)
// console.log("Length",control.length)
// for(let i=0;i<len;i++){
// control.removeAt(i);
// }
@ -107,17 +103,13 @@ checkotherDetails(val)
}
getFrequency() {
this.qustCat.getAllPersonsName(this.pdid).subscribe(res=>{
// console.log("income earn",res)
if(res['dataStatus']==true)
{
console.log("income Earned by",res);
this.incomeEarnedBy=res['record'];
//console.log("res",res['record'])
}
})
let master_name = 'FREQUENCY';
this.qustCat.getcommondrop(master_name).subscribe(data => {
//console.log('data', data);
if(data['dataStatus']==true)
{
this.frequencyData = data['records'].filter(fre=>fre.isactive==1);
@ -145,9 +137,7 @@ submitOtherIncome(answerData)
records.other_income = answerData.other_income;
records.income_details = answerData.income_details;
records.otherincome_remarks = answerData.otherincome_remarks;
console.log('data', records);
this.qustCat.saveForm(records).subscribe(data => {
console.log('data', data);
this.navCtrl.pop();
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
}, error => {
@ -162,19 +152,15 @@ getOtherIncome()
this.qustCat.retiverForm(records).subscribe(res=>
{
this.incomeDetails = this.otherIncomeForm.get('income_details') as FormArray;
console.log(124,res);
this.otherIncomeDetails = res;
if(this.otherIncomeDetails.dataStatus == true)
{
this.otherIncomeDetails = this.otherIncomeDetails.records;
if(this.otherIncomeDetails.other_income=='Yes'){
console.log('if');
var incomeArray = Object.keys(res['records'].income_details).map(function(key) {
//console.log(res);
return res['records'].income_details[key];
});
console.log(this.otherIncomeDetails);
this.otherIncomeForm.controls['other_income'].setValue(this.otherIncomeDetails.other_income);
this.otherIncomeForm.controls['otherincome_remarks'].setValue(this.otherIncomeDetails.otherincome_remarks);
@ -189,7 +175,6 @@ getOtherIncome()
incomeArray.forEach((datas,index)=>
{
this.incomeDetails.push(this.createDetail());
// console.log("Amount",this.otherIncomeDetails.income_details.amount);
this.amtInWords[index]=this.constant.convertNumberToWords(datas.amount)
})
}
@ -197,7 +182,6 @@ getOtherIncome()
}else
{
console.log('else');
this.otherIncomeForm.controls['other_income'].setValue(this.otherIncomeDetails.other_income);
this.otherIncomeForm.controls['otherincome_remarks'].setValue(this.otherIncomeDetails.otherincome_remarks);
}

View File

@ -47,7 +47,6 @@ export class PdQuestionPersonalInfoPage implements OnInit{
this.questionDetails = this.navParams.get('questionDetails');
this.pdDetails = this.navParams.get('pdDetails');
this.users = this.aws.getlocale();
console.log(this.pdDetails);
// this.getRelationMaster();
@ -61,7 +60,6 @@ export class PdQuestionPersonalInfoPage implements OnInit{
this.getRelationMaster();
this.mainApplicantDetails = this.pdDetails.applicat_details
.filter(item => item.applicant_type == 1);
// console.log(this.mainApplicantDetails)
this.coApplicantDetails = this.pdDetails.applicat_details
.filter(item => item.applicant_type == 0);
}
@ -146,7 +144,6 @@ var co_result = Object.keys(data.co_applicant_details).map(function(key) {
coItem: coApplicantGroup,
personal_info_form_remark: [data.personal_info_form_remark]
});
//console.log(this._personalForm);
this.loadDataStatus = true;
}
@ -202,7 +199,6 @@ var co_result = Object.keys(data.co_applicant_details).map(function(key) {
coItem: coApplicantGroup,
personal_info_form_remark:null
});
//console.log(this._personalForm);
this.loadDataStatus = true;
}
@ -263,7 +259,6 @@ submitPersonalForm(formData:any) {
"co_applicant_details":co_applicantDetails,
"personal_info_form_remark": this._personalForm.get('personal_info_form_remark').value
};
console.log(save_details);
this.qustCat.saveForm(save_details).subscribe(result => {
if (result['dataStatus']==true) {
this.navCtrl.pop();

View File

@ -41,7 +41,7 @@ export class PdQuestionRentalInfoPage {
}
ionViewDidLoad() {
console.log('ionViewDidLoad PdQuestionRentalInfoPage');
console.log('ionViewDidLoad PdQuestionRentalInfoPage');
}
createrentalHome()
@ -94,8 +94,6 @@ export class PdQuestionRentalInfoPage {
{
const control = (<FormArray>this.rentalForms.controls['rental_home']).at(i).get('details_tenants') as FormArray;
// console.log(rent);
console.log(control);
// control.controls.splice(0);
control.push(this.createTenantsDetails());
@ -121,9 +119,7 @@ export class PdQuestionRentalInfoPage {
}
saveRentalDetails(answerData)
{
//console.log(answerData);
let records:any={}
console.log(this.rentalForms.value);
// if(this.rentalForms.valid){
@ -139,7 +135,6 @@ export class PdQuestionRentalInfoPage {
}
records.rental_home = answerData.rental_home;
Object.keys(records.rental_home).forEach((key) => (records.rental_home[key]==null) && delete answerData[key]);
console.log('data',records);
this.qustCat.saveForm(records).subscribe(res=>
{
@ -160,13 +155,11 @@ export class PdQuestionRentalInfoPage {
let records = { 'pd_id': this.pdDetails.pd_id, 'pd_form_id': this.FormId.form_id };
this.qustCat.retiverForm(records).subscribe(res=>
{
console.log(res);
if(res['dataStatus']==true)
{
let rentalDetails = res['records'];
var rentalData = Object.keys(res['records'].rental_home
).map(function(key) {
//console.log(res);
return res['records'].rental_home
[key];
@ -177,10 +170,7 @@ export class PdQuestionRentalInfoPage {
rentalData.forEach((val,index)=>
{
console.log(index);
// console.log(val);
// this.addrentalHome();
console.log(control);
// tanantsData.push(Object.keys(val.details_tenants).map(function(key)
// {
@ -204,10 +194,8 @@ export class PdQuestionRentalInfoPage {
tanantscontrol.push(this.createTenantsDetails());
});
// console.log(182,control.controls[index].get('details_tenants'));
// control[index].details_tenants =tanantscontrol;
});
// console.log(rentalData);
this.rentalForms.controls['person_met'].setValue(rentalDetails.person_met);
this.rentalForms.controls['property_own'].setValue(rentalDetails.property_own);
this.rentalForms.controls['nature_property'].setValue(rentalDetails.nature_property);
@ -217,7 +205,6 @@ export class PdQuestionRentalInfoPage {
}
this.rentalForms.controls['rental_home'].setValue(rentalData);
console.log(this.rentalForms);
}else
{
this.addrentalHome();

View File

@ -49,7 +49,6 @@ export class PdQuestionPage {
qustType:any;
constructor(public navCtrl: NavController, public navParams: NavParams, platform: Platform,public fb:FormBuilder,public qstDetails:QuestionCategoryProvider,public aws:AwsServiceProvider,public camera:CameraProvider,public toast:ToastProvider) {
console.log('Width: ' + platform.width());
this.screenWidth_px=platform.width();
@ -67,7 +66,6 @@ export class PdQuestionPage {
}
ionViewDidLoad() {
// console.log('ionViewDidLoad GoogleplaytabPage');
}
ionViewDidEnter() {
this.SwipedTabsIndicator = document.getElementById("indicator");
@ -83,21 +81,15 @@ export class PdQuestionPage {
scrollIndicatiorTab()
{
//console.log(1);
this.ItemsTitles.scrollTo(this.calculateDistanceToSpnd(this.SwipedTabsSlider.getActiveIndex())-this.screenWidth_px/2,0);
// console.log(82,this.isLeft);
// console.log(this.isLeft,this.isRight);
// let answerDetails = this.questionAnswer.value;
// console.log(answerDetails);
// let remarks = this.questionanotherData.value;
if(this.isLeft)
{
console.log(this.isLeft);
//this.prev(answerDetails,remarks,this.questionDetails);
}
if(this.isRight)
{
console.log(this.isRight);
//this.saveQuestionDetails(answerDetails,remarks,this.questionDetails);
}
}
@ -181,9 +173,7 @@ export class PdQuestionPage {
getpdQuestionDetails()
{
this.questionDetails = this.navParams.get('questionDetails');
console.log('157',this.questionDetails);
this.pdinfo = this.navParams.get('pdDetails');
console.log(this.pdinfo);
for(let qustimage of this.questionDetails.questions)
{
if(qustimage.images !==undefined){
@ -203,10 +193,8 @@ export class PdQuestionPage {
}
}
console.log(this.questionAnswer.get('items')['controls']);
}
}
console.log(this.docArray);
for(let i=1;i<=this.questionDetails.questions_count;i++){
let j = i.toString();
this.tabs.push(j);
@ -231,10 +219,7 @@ getquestionAnswer(answers)
// count = 0;
getDocUpload(qustid)
{
//console.log('right',this.isRight,'left',this.isLeft);
// this.docqustid = qustId;
// console.log(this.count);
// console.log(qustid);
this.camera.getpicture().then(res=>
{
if(res !== undefined){
@ -256,16 +241,13 @@ getquestionAnswer(answers)
}
saveQuestionDetails(answerDetails,questionRemarks,questionDetails)
{
console.log(answerDetails);
//console.log(this.docArray);
for(let docs of this.docArray)
{
if(docs.pd_document_title !='' && docs.pd_document_title != null && docs.pd_document_title !== undefined){
//alert();
this.imageArray.push({'pd_document_name':docs.pd_document_name,'pd_document_title':docs.pd_document_title});
console.log('if');
// return true;
}else
{
@ -274,14 +256,11 @@ getquestionAnswer(answers)
}
}
//console.log(answerDetails.answerDetails);
if(answerDetails.answerDetails !=null){
//alert('answers');
console.log(this.imageArray);
let pd_id = this.pdinfo.pd_id;
let catid = questionDetails.fk_question_category_id;
let qt_id = questionDetails.questions.filter(qst=>qst.template_question_id == answerDetails.answerDetails.fk_template_question_id)[0];
console.log(qt_id);
let qut_id = qt_id.fk_question_id;
let qustName = qt_id.question;
let qut_weightage = qt_id.question_weightage;
@ -333,7 +312,6 @@ getquestionAnswer(answers)
};
//console.log(this.docArray);
// this.qstDetails.saveQusetion(saveRecords).subscribe(res=>
// {
@ -342,7 +320,6 @@ getquestionAnswer(answers)
// this.SwipedTabsSlider.slideNext();
// this.docArray = [];
// this.getcategoryList(qt_id,pd_id);
// console.log(this.docArray);
// }
// })
// }else
@ -354,7 +331,6 @@ getquestionAnswer(answers)
getcategoryList(qustinfo,pdId)
{
console.log("252",qustinfo);
let qustDetails = {"question_id":qustinfo.fk_question_id, "pd_id":pdId, "template_id":qustinfo.fk_template_id, "category_id":qustinfo.fk_template_question_category_id
};
let answerData:any;
@ -365,13 +341,10 @@ getquestionAnswer(answers)
{
// answerData = answerData.records;
// console.log('303',answerData);
// console.log('304',this.questionDetails);
// let eachquestion = this.questionDetails.questions.filter(qust=>qust.question_id == answerData.question_id)[0];
// eachquestion['answers'] = answerData.answers;
// this.questionDetails =
// console.log(this.questionDetails);
// this.imageArray = answerData.images;
// for(let docs of this.imageArray)
// {
@ -382,14 +355,12 @@ getquestionAnswer(answers)
});
}
prev(answerDetails,questionRemarks,questionDetails) {
//console.log(this.docArray);
for(let docs of this.docArray)
{
if(docs.pd_document_title !='' && docs.pd_document_title != null && docs.pd_document_title !== undefined){
//alert();
this.imageArray.push({'pd_document_name':docs.pd_document_name,'pd_document_title':docs.pd_document_title});
console.log('if');
// return true;
}else
{
@ -398,14 +369,11 @@ getquestionAnswer(answers)
}
}
//console.log(answerDetails.answerDetails);
if(answerDetails.answerDetails !=null){
//alert('answers');
console.log(this.imageArray);
let pd_id = this.pdinfo.pd_id;
let catid = questionDetails.fk_question_category_id;
let qt_id = questionDetails.questions.filter(qst=>qst.template_question_id == answerDetails.answerDetails.fk_template_question_id)[0];
console.log(qt_id);
let qut_id = qt_id.fk_question_id;
let qustName = qt_id.question;
let qut_weightage = qt_id.question_weightage;
@ -457,7 +425,6 @@ getquestionAnswer(answers)
};
//console.log(this.docArray);
this.qstDetails.saveQusetion(saveRecords).subscribe(res=>
{
@ -466,7 +433,6 @@ getquestionAnswer(answers)
this.SwipedTabsSlider.slidePrev();
this.docArray = [];
this.getcategoryList(qt_id,pd_id);
console.log(this.docArray);
}
})
}else{

View File

@ -19,7 +19,7 @@ public commonimage = "http://ssa.sineedge.com/sparqapi/logo/avatar.jpg";
let testapiurl = 'http://ssa.sineedge.com/sparqtest/api/';
let devapiurl = 'http://ssa.sineedge.com/sparqapi/api/';
let localapiurl = 'http://192.168.0.9/sparqapi/api/';
return devapiurl;
return testapiurl;
}
getcurrentDate()

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
null

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,6 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<script data-ionic="inject">
(function(w){var i=w.Ionic=w.Ionic||{};i.version='3.9.2';i.angular='^5.0.3';i.staticDir='build/';})(window);
</script>
<meta charset="UTF-8">
<title>Ionic App</title>
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">