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) 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=> this.pddetails.checkotp(data).subscribe(res=>
{ {
console.log("Otp",res) console.log("Otp",res)
@ -152,7 +152,7 @@ export class OtpPage {
console.log(this.reasonForm.value); console.log(this.reasonForm.value);
if(this.reasonForm.valid) 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.pddetails.checkotp(data).subscribe(res=>
{ {
this.otpStatus = 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) { 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.getlenderpddetails();
// this.getpdTriggerdetails(); // this.getpdTriggerdetails();
console.log("Entered")
} }
ionViewDidLoad() { ionViewDidLoad() {
@ -63,7 +63,7 @@ export class PdListPage {
//alert(this.viewchange); //alert(this.viewchange);
} }
pdlistsearch(searchbar) { pdlistsearch(searchbar) {
console.log(searchbar);
this.pdinprogress = this.searchinprogress; this.pdinprogress = this.searchinprogress;
this.pdschduleDetails = this.searchpast; this.pdschduleDetails = this.searchpast;
// reset countries list with initial call // reset countries list with initial call
@ -87,8 +87,7 @@ export class PdListPage {
}else }else
{ {
if (q.trim() == '') { if (q.trim() == '') {
console.log(q.trim());
console.log(this.pdlistdetails);
return ; return ;
}else{ }else{
this.pdschduleDetails = this.searchpast.filter((v) => { this.pdschduleDetails = this.searchpast.filter((v) => {
@ -111,21 +110,22 @@ export class PdListPage {
{ {
let userid = this.aws.getlocale(); let userid = this.aws.getlocale();
console.log("User",userid) //.log("User",userid)
this.pdofficer.getpddetails(userid).subscribe(res=> this.pdofficer.getpddetails(userid).subscribe(res=>
{ {
this.pdlistdetails = res; this.pdlistdetails = res;
if(this.pdlistdetails.dataStatus == true) if(this.pdlistdetails.dataStatus == true)
{ {
console.log(this.pdlistdetails);
this.pdlistaccess = true; 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.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; 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.pdinprogress = this.pdlistdetails.records.filter(allocate=>allocate.pd_status == "ALLOCATED");
this.searchinprogress = this.pdinprogress; this.searchinprogress = this.pdinprogress;
console.log(this.pdinprogress);
this.random_bg_color(); this.random_bg_color();
this.random_ng_past(); this.random_ng_past();
}else }else
@ -161,11 +161,11 @@ export class PdListPage {
this.bgColor = []; this.bgColor = [];
this.pdschduleDetails = []; this.pdschduleDetails = [];
this.pdinprogress = []; this.pdinprogress = [];
console.log('Begin async operation', refresher);
this.shared.refresh(); this.shared.refresh();
this.getpdTriggerdetails(); this.getpdTriggerdetails();
setTimeout(() => { setTimeout(() => {
console.log('Async operation has ended');
refresher.complete(); refresher.complete();
}, 2000); }, 2000);
} }

View File

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

View File

@ -79,7 +79,7 @@ export class PdQuestionAddressPage {
this.getCityAndPincodeDetails(this.pdState); this.getCityAndPincodeDetails(this.pdState);
this.pdCity = this.pdDetails.fk_city; this.pdCity = this.pdDetails.fk_city;
this.pdPincode = this.pdDetails.pincode_id; this.pdPincode = this.pdDetails.pincode_id;
console.log('this.pdPincode', this.pdPincode);
this.pdOtherPincode = this.pdPincode == 1 ? this.pdDetails.other_pincode : ''; this.pdOtherPincode = this.pdPincode == 1 ? this.pdDetails.other_pincode : '';
this.getdropdownlist(); this.getdropdownlist();
@ -123,7 +123,8 @@ export class PdQuestionAddressPage {
ionViewDidLoad() { ionViewDidLoad() {
//this.addUnits(); //this.addUnits();
console.log('ionViewDidLoad PdQuestionAddressPage'); console.log("ionViewDidLoad PdQuestionAddressPage")
} }
ionViewWillLeave() ionViewWillLeave()
@ -137,14 +138,14 @@ export class PdQuestionAddressPage {
// text: 'Save', // text: 'Save',
// cssClass: 'method-color', // cssClass: 'method-color',
// handler: () => { // handler: () => {
// console.log('Save clicked'); //
// } // }
// }, // },
// { // {
// text: 'Cancel', // text: 'Cancel',
// cssClass: 'method-color', // cssClass: 'method-color',
// handler: () => { // handler: () => {
// console.log('Cancel clicked'); //
// this.navCtrl.pop(); // this.navCtrl.pop();
// } // }
// } // }
@ -153,7 +154,7 @@ export class PdQuestionAddressPage {
// method.present() // method.present()
// console.log(this.pdQuestionAddress.dirty);
} }
/** To Get City And Pincode Data For Address Form /** To Get City And Pincode Data For Address Form
@ -252,7 +253,7 @@ export class PdQuestionAddressPage {
// checkaddress(value) // checkaddress(value)
// { // {
// // console.log(value); //
// if(value=="OTHERS") // if(value=="OTHERS")
// { // {
// this.addressRemarksAccess = true; // this.addressRemarksAccess = true;
@ -332,13 +333,13 @@ export class PdQuestionAddressPage {
} }
inWords(e,i){ inWords(e,i){
console.log(e);
this.premisesRentAmtInwords[i] = this.constant.convertNumberToWords(e.target.value); this.premisesRentAmtInwords[i] = this.constant.convertNumberToWords(e.target.value);
} }
inWordsForRent(e){ inWordsForRent(e){
//console.log(e);
this.rentAmtInwords = this.constant.convertNumberToWords(e.target.value); this.rentAmtInwords = this.constant.convertNumberToWords(e.target.value);
} }
@ -349,7 +350,6 @@ export class PdQuestionAddressPage {
savepdQuestion(answerData) savepdQuestion(answerData)
{ {
console.log(answerData);
let records: any = {}; let records: any = {};
records.address = answerData.address; records.address = answerData.address;
if(answerData.address_type_others != null){ if(answerData.address_type_others != null){
@ -393,18 +393,17 @@ export class PdQuestionAddressPage {
// records.bussiness_activity_remark = answerData.bussiness_activity_remark; // records.bussiness_activity_remark = answerData.bussiness_activity_remark;
// records.business_years = answerData.business_years; // records.business_years = answerData.business_years;
// records.business_month = answerData.business_month; // 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; // records.additional_address_units = answerData.additional_address_units;
console.log('params', records);
this.qustCat.saveForm(records).subscribe(data => { this.qustCat.saveForm(records).subscribe(data => {
// console.log('data', data);
// let params: any = {}; // let params: any = {};
// params.pd_id = '250'; // params.pd_id = '250';
// params.pd_form_id = '250'; // params.pd_form_id = '250';
// console.log('param', params);
this.navCtrl.pop(); this.navCtrl.pop();
this.toast.pdTriggerappmessage('Record Saved Successfully.!'); this.toast.pdTriggerappmessage('Record Saved Successfully.!');
@ -502,20 +501,20 @@ export class PdQuestionAddressPage {
// this.pdQuestionAddress.controls['business_month'].setValue(this.getaddressDetails.business_month); // this.pdQuestionAddress.controls['business_month'].setValue(this.getaddressDetails.business_month);
console.log(this.getaddressDetails.additional_address_units);
/* if(this.getaddressDetails.bussiness_activity == 'yes') { /* if(this.getaddressDetails.bussiness_activity == 'yes') {
if (result.length == 0) { if (result.length == 0) {
console.log("0")
control.push(this.createUnits(null)); control.push(this.createUnits(null));
} else {*/ } else {*/
console.log("1",this.getaddressDetails.additional_address_units)
//for(let val of this.getaddressDetails.additional_address_units){ //for(let val of this.getaddressDetails.additional_address_units){
//control.push(this.createUnits(val)); //control.push(this.createUnits(val));
//} //}
//result.forEach((datas,index) => { //result.forEach((datas,index) => {
// console.log(datas);
//this.premisesRentAmtInwords[index] = this.constant.convertNumberToWords(datas.premises_rent_amt); //this.premisesRentAmtInwords[index] = this.constant.convertNumberToWords(datas.premises_rent_amt);
//this.pdQuestionAddress.controls['additional_address_units'].setValue(datas); //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) { 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.pdDetails = this.navParams.get('pdDetails');
this.expenseDetails = this.navParams.get('income'); this.expenseDetails = this.navParams.get('income');
console.log(this.expenseDetails);
this.users = this.aws.getlocale(); this.users = this.aws.getlocale();
this.BuissnessForm = this.fb.group( this.BuissnessForm = this.fb.group(
{ {
@ -101,18 +101,17 @@ export class PdQuestionAssessedBusinessIncomePage {
busIncomecalculate(index,details) busIncomecalculate(index,details)
{ {
console.log(details,index);
let frequencyId = details.value.fk_frequency_id; let frequencyId = details.value.fk_frequency_id;
let incomeValue = details.value.income_value; let incomeValue = details.value.income_value;
// let UOM = details.value.rate_per_unit; // let UOM = details.value.rate_per_unit;
// console.log(frequencyId,purchaseQty,UOM,index);
// console.log(frequencyId);
let annual:any; let annual:any;
if(incomeValue!=null && incomeValue !=null){ if(incomeValue!=null && incomeValue !=null){
let frequency_factor = this.m_freqOfPurchase.filter(frq=>frq.frequency_id == frequencyId)[0]; let frequency_factor = this.m_freqOfPurchase.filter(frq=>frq.frequency_id == frequencyId)[0];
if(frequencyId==1) if(frequencyId==1)
{ {
console.log(frequency_factor.mutiple_factor);
annual = (incomeValue*frequency_factor.mutiple_factor); annual = (incomeValue*frequency_factor.mutiple_factor);
this.incomeannual[index] = annual; this.incomeannual[index] = annual;
details.controls['annual_income_value'].setValue(annual); details.controls['annual_income_value'].setValue(annual);
@ -165,10 +164,10 @@ export class PdQuestionAssessedBusinessIncomePage {
saveBusinessData(answerData) saveBusinessData(answerData)
{ {
// console.log(answerData);
if(this.BuissnessForm.valid){ if(this.BuissnessForm.valid){
let records = {'records':answerData.busIncome}; let records = {'records':answerData.busIncome};
console.log('data',records);
this.qustCat.saveassessedForms('saveOtherBusinessIncome',records).subscribe(res=> this.qustCat.saveassessedForms('saveOtherBusinessIncome',records).subscribe(res=>
{ {
if(res['dataStatus']==true) if(res['dataStatus']==true)

View File

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

View File

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

View File

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

View File

@ -62,7 +62,7 @@ export class PdQuestionAssestsPage {
this.assestInfo = "busass"; this.assestInfo = "busass";
this.FormId = this.navParams.get('FormId'); this.FormId = this.navParams.get('FormId');
console.log(this.FormId);
this.pdDetails = this.navParams.get('pdDetails'); this.pdDetails = this.navParams.get('pdDetails');
this.pdid=this.pdDetails.pd_id; this.pdid=this.pdDetails.pd_id;
this.users = this.aws.getlocale(); this.users = this.aws.getlocale();
@ -135,10 +135,10 @@ export class PdQuestionAssestsPage {
} }
}); });
this.qustCat.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{ this.qustCat.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
console.log("Entering company List")
if(data['dataStatus']==true){ if(data['dataStatus']==true){
this.existCompanyList=data['records'].filter(val =>val.is_active===true && val.is_company_applicant===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=[]; let modifyCompanyList : any=[];
if(this.existCompanyList.length>0){ 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}; return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
}); });
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList}) this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
console.log("Company applicant",this.mergeCompanyApplicant)
} }
let modifyApplicantList: any=[]; let modifyApplicantList: any=[];
@ -155,7 +155,7 @@ export class PdQuestionAssestsPage {
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2}; return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
}); });
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList}) this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
console.log("Applicants",this.mergeCompanyApplicant);
// this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1); // this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1);
} }
}) })
@ -216,7 +216,7 @@ export class PdQuestionAssestsPage {
loanCalc(details ,flag) loanCalc(details ,flag)
{ {
if(flag == 1){ if(flag == 1){
//console.log(details.value);
let ElapsedValues; let ElapsedValues;
if(details.value.original_loan_tenure != null && details.value.original_loan_tenure != '' && details.value.balance_tenure != null && details.value.balance_tenure != ''){ 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; show: boolean;
selectedAssetsType(e: any, i: any,flag : any): void { selectedAssetsType(e: any, i: any,flag : any): void {
console.log(e);
console.log(i);
console.log(flag);
let val = i; let val = i;
if(flag == 1){ if(flag == 1){
const arr = (<FormArray>this.AssetsDetailsForm.controls['assets_details']).at(val).get('details') as FormArray; const arr = (<FormArray>this.AssetsDetailsForm.controls['assets_details']).at(val).get('details') as FormArray;
@ -449,7 +447,7 @@ export class PdQuestionAssestsPage {
} }
saveAssetDetails(answerData) saveAssetDetails(answerData)
{ {
console.log(answerData);
Object.keys(answerData).forEach((key) => (answerData[key] == null) && delete answerData[key]); Object.keys(answerData).forEach((key) => (answerData[key] == null) && delete answerData[key]);
// answerData.assets_details.map(val => { // answerData.assets_details.map(val => {
// if (val.emi == 'no') { // if (val.emi == 'no') {
@ -463,7 +461,7 @@ export class PdQuestionAssestsPage {
answerData.pdid = this.pdDetails.pd_id; answerData.pdid = this.pdDetails.pd_id;
answerData.formid = this.FormId.form_id; answerData.formid = this.FormId.form_id;
answerData.fk_createdby = this.users; answerData.fk_createdby = this.users;
console.log('final',answerData);
this.qustCat.saveForm(answerData).subscribe(res=> this.qustCat.saveForm(answerData).subscribe(res=>
{ {
if(res['dataStatus']==true) if(res['dataStatus']==true)
@ -534,7 +532,7 @@ export class PdQuestionAssestsPage {
// } // }
this.apiLoadFinish = true; this.apiLoadFinish = true;
console.log(assetArray);
//this.AssetsDetailsForm.controls['assets_details'].setValue(assetArray); //this.AssetsDetailsForm.controls['assets_details'].setValue(assetArray);
}else{ }else{
this.apiLoadFinish = true; 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 = this.applicants.filter(val=>val.applicant_type==0 || val.applicant_type==1)
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'}); this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
console.log(this.pdDetails);
// alert(); // alert();
this.users = this.aws.getlocale(); this.users = this.aws.getlocale();
this.bankDetails = this.fb.group( this.bankDetails = this.fb.group(
@ -86,10 +86,10 @@ export class PdQuestionBankingPage {
} }
}); });
this.qustCat.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{ this.qustCat.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
console.log("Entering company List")
if(data['dataStatus']==true){ if(data['dataStatus']==true){
this.existCompanyList=data['records'].filter(val =>val.is_active===true && val.is_company_applicant===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=[]; // let modifyCompanyList : any=[];
// if(this.existCompanyList.length>0){ // 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}; // return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
// }); // });
// this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList}) // this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
// console.log("Company applicant",this.mergeCompanyApplicant)
//} //}
}) })
let modifyApplicantList: any=[]; let modifyApplicantList: any=[];
@ -106,7 +106,7 @@ export class PdQuestionBankingPage {
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2}; return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
}); });
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList}) this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
console.log(this.mergeCompanyApplicant);
// this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1); // this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1);
} }
} }
@ -140,7 +140,7 @@ inWords(e,i,flag){
/** To Convert Month into Year */ /** To Convert Month into Year */
ConvertMonthintoYear(itemrow,e){ ConvertMonthintoYear(itemrow,e){
//console.log(itemrow);
let year = itemrow.controls.vintage_year.value; let year = itemrow.controls.vintage_year.value;
@ -196,7 +196,7 @@ inWords(e,i,flag){
this.bankitems.push(this.createBankItem('')); 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.fk_createdby = this.users;
records.banking_details = answerData.bankitems; records.banking_details = answerData.bankitems;
records.banking_form_remark = answerData.banking_form_remark; records.banking_form_remark = answerData.banking_form_remark;
console.log('data', records);
this.qustCat.saveForm(records).subscribe(data => { this.qustCat.saveForm(records).subscribe(data => {
console.log('data', data);
if(data['dataStatus']==true) if(data['dataStatus']==true)
{ {
this.toast.pdTriggerappmessage('Record Saved Successfully.!'); this.toast.pdTriggerappmessage('Record Saved Successfully.!');
this.navCtrl.pop(); this.navCtrl.pop();
} }
}) })
//console.log(answerData);
} }
retiveBankDetails() retiveBankDetails()
@ -250,12 +250,12 @@ inWords(e,i,flag){
this.bankitems = this.bankDetails.get('bankitems') as FormArray; this.bankitems = this.bankDetails.get('bankitems') as FormArray;
if(result.length ==0){ if(result.length ==0){
console.log("Data=0")
this.bankitems.push(this.createBankItem('')) this.bankitems.push(this.createBankItem(''))
}else }else
{ {
console.log("Data>0")
result.forEach((datas,index)=> result.forEach((datas,index)=>
@ -273,7 +273,7 @@ inWords(e,i,flag){
}else }else
{ {
console.log("Data False")
this.addBankDetails(); this.addBankDetails();
} }
}); });

View File

@ -86,7 +86,7 @@ export class PdQuestionBusinessAssetsPage {
this.qustcat.retiverForm(params).subscribe(data => { this.qustcat.retiverForm(params).subscribe(data => {
if(data['status'] == 200) { if(data['status'] == 200) {
// console.log("form record 5",data.records);
this.addressLabel = ''; this.addressLabel = '';
@ -113,7 +113,7 @@ export class PdQuestionBusinessAssetsPage {
this.qustcat.getcommondrop('ASSETTYPE').subscribe(data=>{ this.qustcat.getcommondrop('ASSETTYPE').subscribe(data=>{
this.m_assets_type=data['records'].filter(val=>val.isactive==1 && val.flag==1); 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=>{ this.qustcat.getcommondrop('PROPERTIES').subscribe(data=>{
@ -123,7 +123,7 @@ export class PdQuestionBusinessAssetsPage {
this.qustcat.getCompaniesListsForBusiness(this.pdDetails.pd_id).subscribe(data=>{ this.qustcat.getCompaniesListsForBusiness(this.pdDetails.pd_id).subscribe(data=>{
if(data.dataStatus){ if(data.dataStatus){
this.existCompanyList=data['records'].filter(val=>val.is_active==true); this.existCompanyList=data['records'].filter(val=>val.is_active==true);
// console.log("existCompanyList",this.existCompanyList)
} }
let modifyCompanyList : any=[]; let modifyCompanyList : any=[];
@ -157,12 +157,12 @@ export class PdQuestionBusinessAssetsPage {
this.qustcat.retiverForm(params).subscribe(res=>{ this.qustcat.retiverForm(params).subscribe(res=>{
if(res['dataStatus']==true){ if(res['dataStatus']==true){
// console.log("records",res['records'])
//this.data_all=res['records'] //this.data_all=res['records']
/* var assestArray=Object.keys(res['records'].business_assets_details).map(function(key){ /* var assestArray=Object.keys(res['records'].business_assets_details).map(function(key){
return res['records'].business_assets_details[key] return res['records'].business_assets_details[key]
}); });
console.log("Asset Form",assestArray);
//this.formLoadData(assestArray) //this.formLoadData(assestArray)
this._businessAssetsQuesFrom.controls['business_assets_form_remark'].setValue(res['records'].business_assets_form_remark); this._businessAssetsQuesFrom.controls['business_assets_form_remark'].setValue(res['records'].business_assets_form_remark);
if(assestArray.length>0){ if(assestArray.length>0){
@ -189,7 +189,7 @@ export class PdQuestionBusinessAssetsPage {
this.formLoadData(null); this.formLoadData(null);
} }
this.apiLoadFinish=true this.apiLoadFinish=true
console.log("success");
}) })
//this.formLoadData(null); //this.formLoadData(null);
@ -219,7 +219,7 @@ export class PdQuestionBusinessAssetsPage {
} }
else{ else{
// console.log("Data Here");
let value=data; let value=data;
this._businessAssetsQuesFrom=this.fb.group({ this._businessAssetsQuesFrom=this.fb.group({
pdid: [this.pdDetails.pd_id], pdid: [this.pdDetails.pd_id],
@ -237,7 +237,7 @@ export class PdQuestionBusinessAssetsPage {
business_assets_form_remark:[value.business_assets_form_remark || ''] business_assets_form_remark:[value.business_assets_form_remark || '']
}); });
if (value.business_address_availability == 'yes') { if (value.business_address_availability == 'yes') {
// console.log(value.business_assets_for_address);
this.addBusinessAssetsForAddress(value.business_assets_for_address); this.addBusinessAssetsForAddress(value.business_assets_for_address);
} }
else { else {
@ -390,7 +390,7 @@ createBusinessAssetsForAddress(): FormGroup {
this.RentAmtInwordsForAddress[index] = this.cons.convertNumberToWords(datas.business_monthly_rented_amt); this.RentAmtInwordsForAddress[index] = this.cons.convertNumberToWords(datas.business_monthly_rented_amt);
this.appxMarketAmtInwordsForAddress[index] = this.cons.convertNumberToWords(datas.business_approximate_market_value); this.appxMarketAmtInwordsForAddress[index] = this.cons.convertNumberToWords(datas.business_approximate_market_value);
let Avaliablity = 1; let Avaliablity = 1;
// console.log(datas.business_name_of_the_owner);
if(datas.business_name_of_the_owner.length > 0){ if(datas.business_name_of_the_owner.length > 0){
datas.business_name_of_the_owner.forEach(option => { datas.business_name_of_the_owner.forEach(option => {
if(option.id == 0 && option.group_id == 2){ if(option.id == 0 && option.group_id == 2){
@ -424,7 +424,7 @@ createBusinessAssetsForAddress(): FormGroup {
var result=Object.keys(supp_data).map(function(key){ var result=Object.keys(supp_data).map(function(key){
return supp_data[key]; return supp_data[key];
}) })
// console.log("Result",result)
if(result.length>0){ if(result.length>0){
result.forEach((datas,index)=>{ result.forEach((datas,index)=>{
this.appxMarketAmtInwords[index]=this.cons.convertNumberToWords(+datas.business_approximate_market_value) this.appxMarketAmtInwords[index]=this.cons.convertNumberToWords(+datas.business_approximate_market_value)
@ -446,7 +446,7 @@ createBusinessAssetsForAddress(): FormGroup {
control.push(this.initBusinessDetailsWithdata(formData)); control.push(this.initBusinessDetailsWithdata(formData));
this.setBusinessAssetsDetailsWithData(formData.business_assets_mode, val.business_details, control.length - 1) this.setBusinessAssetsDetailsWithData(formData.business_assets_mode, val.business_details, control.length - 1)
} }
// console.log("Add Business Details exit");
} }
this.loadDetails=true this.loadDetails=true
} }
@ -465,7 +465,7 @@ createBusinessAssetsForAddress(): FormGroup {
} }
initBusinessDetailsWithdata(data) { initBusinessDetailsWithdata(data) {
// console.log("initBusinessDetailsWithdata",data)
let formGroup= this.fb.group({ let formGroup= this.fb.group({
business_assets_mode: [data.business_assets_mode], business_assets_mode: [data.business_assets_mode],
@ -484,8 +484,7 @@ createBusinessAssetsForAddress(): FormGroup {
return formGroup; return formGroup;
} }
setBusinessAssetsDetailsWithData(assets_details_mode:any,datas:any,i:any){ 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 val = i;
let data = datas; let data = datas;
const control=(<FormArray>this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray; 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; let Avaliablity = 1;
value.forEach(option => { value.forEach(option => {
if(option.id == 0 && option.group_id == 2){ if(option.id == 0 && option.group_id == 2){
// console.log('true');
Avaliablity = option.id; Avaliablity = option.id;
} }
}); });
// isOtherOwner: boolean = false; // isOtherOwner: boolean = false;
if(Avaliablity == 0){ if(Avaliablity == 0){
// console.log(Avaliablity);
item.controls.business_name_of_the_other_owner.setValidators([Validators.required]); item.controls.business_name_of_the_other_owner.setValidators([Validators.required]);
this.isOtherOwnerForAddress = true; this.isOtherOwnerForAddress = true;
}else{ }else{
// console.log(Avaliablity);
item.controls.business_name_of_the_other_owner.setValue(''); item.controls.business_name_of_the_other_owner.setValue('');
item.controls.business_name_of_the_other_owner.clearValidators(); item.controls.business_name_of_the_other_owner.clearValidators();
this.isOtherOwnerForAddress = false; 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) { 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') 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.pdDetails.customer_segment_abbr.toUpperCase();
this.pd_cus_segment=this.pd_cus_segment.substring(0,3) this.pd_cus_segment=this.pd_cus_segment.substring(0,3)
this.pdid=this.pdDetails.pd_id; this.pdid=this.pdDetails.pd_id;
this.formDetails=this.navParams.get('formDetails'); this.formDetails=this.navParams.get('formDetails');
this.form_id = this.formDetails.form_id; this.form_id = this.formDetails.form_id;
this.company_id=this.pdDetails.company_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.pdDetails.applicat_details;
this.applicants = this.applicants.filter(appt=>appt.applicant_type != 2) this.applicants = this.applicants.filter(appt=>appt.applicant_type != 2)
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'}); this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
//console.log(this.pdDetails);
// alert();
this.users = this.aws.getlocale(); this.users = this.aws.getlocale();
this.step=0 this.step=0
this.bankingForm = this.fb.group( this.bankingForm = this.fb.group(
@ -97,10 +94,10 @@ step:number
} }
}); });
this.qustCat.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{ this.qustCat.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
console.log("Entering company List")
if(data['dataStatus']==true){ if(data['dataStatus']==true){
this.existCompanyList=data['records'].filter(val =>val.is_active===true && val.is_company_applicant===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=[]; let modifyCompanyList : any=[];
if(this.existCompanyList.length>0){ 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}; return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
}); });
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList}) this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
console.log("Company applicant",this.mergeCompanyApplicant)
} }
}) })
let modifyApplicantList: any=[]; let modifyApplicantList: any=[];
@ -117,7 +114,7 @@ step:number
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2}; return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
}); });
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList}) this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
console.log(this.mergeCompanyApplicant);
// this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1); // this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1);
} }
} }
@ -153,7 +150,7 @@ step:number
} }
/** To Convert Month into Year */ /** To Convert Month into Year */
ConvertMonthintoYear(itemrow,e){ ConvertMonthintoYear(itemrow,e){
//console.log(itemrow);
let year = itemrow.controls.vintage_year.value; let year = itemrow.controls.vintage_year.value;
@ -179,9 +176,7 @@ step:number
} }
setRequiredValidation(value,item,flag) { setRequiredValidation(value,item,flag) {
console.log(item);
console.log(value);
console.log(flag);
if(flag == 1){ if(flag == 1){
value==0 value==0
@ -232,7 +227,7 @@ step:number
control.push(this.createBankItem('')); control.push(this.createBankItem(''));
//console.log(this.pdQuestionAddress.get('items')['controls']);
} }
@ -250,7 +245,7 @@ step:number
control.reset(); control.reset();
} }
else else
// console.log('index value -', index);
control.removeAt(i); control.removeAt(i);
} }
@ -268,21 +263,21 @@ step:number
var result = Object.keys(res['records'].banking_details).map(function(key) { var result = Object.keys(res['records'].banking_details).map(function(key) {
return res['records'].banking_details[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); this.bankingForm.controls.banking_form_remark.setValue(res['records'].banking_form_remark);
if(result.length == 0){ if(result.length == 0){
console.log("DAta Status 0")
control.push(this.createBankItem('')) control.push(this.createBankItem(''))
}else }else
{ {
console.log("DAta Status >1")
result.forEach((datas,index)=> result.forEach((datas,index)=>
{ {
this. selectedAccTypeChanges(datas.account_type,index); this. selectedAccTypeChanges(datas.account_type,index);
if(datas.limit != ''){ if(datas.limit != ''){
console.log("Datas",datas);
this.amtInwords[index] = this.cons.convertNumberToWords(+datas.limit); this.amtInwords[index] = this.cons.convertNumberToWords(+datas.limit);
} }
this. selectedAccTypeChanges(datas.account_type,index); this. selectedAccTypeChanges(datas.account_type,index);
@ -293,7 +288,7 @@ step:number
} }
}else }else
{ {
console.log("DAta Status False");
control.push(this.createBankItem('')); control.push(this.createBankItem(''));
} }
}); });
@ -309,9 +304,9 @@ step:number
records.company_id=this.company_id; records.company_id=this.company_id;
records.banking_details = answerData.itemRows; records.banking_details = answerData.itemRows;
records.banking_form_remark = answerData.banking_form_remark; records.banking_form_remark = answerData.banking_form_remark;
console.log('data', records);
this.qustCat.saveForm(records).subscribe(data => { this.qustCat.saveForm(records).subscribe(data => {
console.log('data', data);
if(data['dataStatus']==true) if(data['dataStatus']==true)
{ {
this.toast.pdTriggerappmessage('Record Saved Successfully.!'); this.toast.pdTriggerappmessage('Record Saved Successfully.!');
@ -321,7 +316,7 @@ step:number
this.toast.pdTriggerappmessage("Sorry!! Something Went Wrong"); this.toast.pdTriggerappmessage("Sorry!! Something Went Wrong");
} }
}) })
//console.log(answerData);
} }

View File

@ -64,35 +64,34 @@ export class PdQuestionBusinessGroupPage {
if(details.form_id==1){ if(details.form_id==1){
this.navCtrl.push(PdQuestionSupplierInfoPage,{'formDetails':details,'pdDetails':this.pdDetails}); this.navCtrl.push(PdQuestionSupplierInfoPage,{'formDetails':details,'pdDetails':this.pdDetails});
// console.log("form_id",details.form_id)
} }
if(details.form_id==2){ if(details.form_id==2){
this.navCtrl.push(PdQuestionClientInfoPage,{'formDetails':details,'pdDetails':this.pdDetails}); this.navCtrl.push(PdQuestionClientInfoPage,{'formDetails':details,'pdDetails':this.pdDetails});
// console.log("form_id",details.form_id)
} }
if(details.form_id==11){ if(details.form_id==11){
this.navCtrl.push(PdQuestionStockInfoPage,{'formDetails':details,'pdDetails':this.pdDetails}); this.navCtrl.push(PdQuestionStockInfoPage,{'formDetails':details,'pdDetails':this.pdDetails});
// console.log("form_id",details.form_id)
} }
if(details.form_id==13){ if(details.form_id==13){
this.navCtrl.push(PdQuestionBusinessInfoPage,{'formDetails':details,'pdDetails':this.pdDetails}); this.navCtrl.push(PdQuestionBusinessInfoPage,{'formDetails':details,'pdDetails':this.pdDetails});
// console.log("form_id",details.form_id)
} }
if(details.form_id==14){ if(details.form_id==14){
this.navCtrl.push(PdQuestionFinancialInfoPage,{'formDetails':details,'pdDetails':this.pdDetails}); this.navCtrl.push(PdQuestionFinancialInfoPage,{'formDetails':details,'pdDetails':this.pdDetails});
console.log("form_id",details.form_id)
} }
if(details.form_id==15){ if(details.form_id==15){
this.navCtrl.push(PdQuestionSupplierInfoPage,{'formDetails':details,'pdDetails':this.pdDetails}); this.navCtrl.push(PdQuestionSupplierInfoPage,{'formDetails':details,'pdDetails':this.pdDetails});
// console.log("form_id",details.form_id)
} }
if(details.form_id==21){ if(details.form_id==21){
this.navCtrl.push(PdQuestionBusinessBankingPage,{'formDetails':details,'pdDetails':this.pdDetails}); this.navCtrl.push(PdQuestionBusinessBankingPage,{'formDetails':details,'pdDetails':this.pdDetails});
// console.log("form_id",details.form_id)
} }
if(details.form_id==22){ if(details.form_id==22){
this.navCtrl.push(PdQuestionBusinessAssetsPage,{'formDetails':details,'pdDetails':this.pdDetails}); 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.getStateCityDet();
this.pdDetails = this.navParams.get('pdDetails'); this.pdDetails = this.navParams.get('pdDetails');
this.pdid=this.pdDetails.pd_id this.pdid=this.pdDetails.pd_id
console.log("pdails",this.pdDetails)
this.formdetails = this.navParams.get('formDetails'); this.formdetails = this.navParams.get('formDetails');
console.log(this.formdetails)
this.FormId = this.formdetails.form_id; this.FormId = this.formdetails.form_id;
this.users = this.aws.getlocale(); this.users = this.aws.getlocale();
//console.log("pd",this.pdDetails);
this.applicants=this.pdDetails.applicat_details; this.applicants=this.pdDetails.applicat_details;
console.log("Applicants",this.applicants)
this.generalExistEntityType=this.pdDetails.business_entity_type this.generalExistEntityType=this.pdDetails.business_entity_type
this.generalExistEntityType_other=this.pdDetails.business_entity_type_other this.generalExistEntityType_other=this.pdDetails.business_entity_type_other
this.generalExistBusinessYear=this.pdDetails.business_years this.generalExistBusinessYear=this.pdDetails.business_years
@ -134,7 +134,7 @@ export class PdQuestionBusinessInfoPage {
getdropdown() { getdropdown() {
this.qustCat.getcommondrop('RELATIONSHIPS').subscribe(data => { this.qustCat.getcommondrop('RELATIONSHIPS').subscribe(data => {
// console.log('data', data);
data['records'].forEach(val => { data['records'].forEach(val => {
if (val.isactive == 1) { if (val.isactive == 1) {
this.relationData.push(val); this.relationData.push(val);
@ -143,7 +143,7 @@ export class PdQuestionBusinessInfoPage {
}); });
this.qustCat.getcommondrop('INDUSTRYCLASSIFICATION').subscribe(data => { this.qustCat.getcommondrop('INDUSTRYCLASSIFICATION').subscribe(data => {
// console.log('data', data);
data['records'].forEach(val => { data['records'].forEach(val => {
if (val.isactive == 1) { if (val.isactive == 1) {
this.industryData.push(val); this.industryData.push(val);
@ -152,7 +152,7 @@ export class PdQuestionBusinessInfoPage {
}); });
this.qustCat.getcommondrop('TYPEOFACTIVITY').subscribe(data => { this.qustCat.getcommondrop('TYPEOFACTIVITY').subscribe(data => {
// console.log('data', data);
data['records'].forEach(val => { data['records'].forEach(val => {
if (val.isactive == 1) { if (val.isactive == 1) {
this.activityData.push(val); this.activityData.push(val);
@ -172,20 +172,20 @@ export class PdQuestionBusinessInfoPage {
}); });
// console.log("stateList first",this.stateList);
this.qustCat.getcommondrop('COUNTRY').subscribe(data=>{ this.qustCat.getcommondrop('COUNTRY').subscribe(data=>{
this.countryDataList=data['records'].filter(val=>val.isactive==1); this.countryDataList=data['records'].filter(val=>val.isactive==1);
//console.log("countryDataList",this.countryDataList)
}); });
this.qustCat.getcommondrop('TITLES').subscribe(data=>{ this.qustCat.getcommondrop('TITLES').subscribe(data=>{
this.titleData=data['records'].filter(val=>val.isactive==1); this.titleData=data['records'].filter(val=>val.isactive==1);
}) })
this.qustCat.getAllPersonsName(this.pdid).subscribe(data=>{ this.qustCat.getAllPersonsName(this.pdid).subscribe(data=>{
if(data.dataStatus){ if(data.dataStatus){
console.log("Person List",data)
this.personsList=data['record'].filter(val=>val.applicant_type==1) this.personsList=data['record'].filter(val=>val.applicant_type==1)
console.log("Person List",this.personsList)
} }
}) })
@ -193,16 +193,16 @@ export class PdQuestionBusinessInfoPage {
getStateCityDet(){ getStateCityDet(){
this.qustCat.getStateCityDetails().subscribe(data=>{ this.qustCat.getStateCityDetails().subscribe(data=>{
// console.log("data first23",data.records)
this.stateList=data.records this.stateList=data.records
// console.log("stateListFun",this.stateList)
this.getDetails(); this.getDetails();
}); });
} }
getDetails(){ getDetails(){
// console.log("get State",this.stateList);
let params: any = {}; let params: any = {};
params.pd_id = this.pdid; params.pd_id = this.pdid;
params.pd_form_id = 13 params.pd_form_id = 13
@ -210,7 +210,7 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
this.qustCat.retiverForm(params).subscribe(data=>{ this.qustCat.retiverForm(params).subscribe(data=>{
let businessVal=data['records'] let businessVal=data['records']
let constVal: any; let constVal: any;
// console.log("datavalue",businessVal)
const Partnr:any = <FormArray>this.businessForm.controls['partners']; const Partnr:any = <FormArray>this.businessForm.controls['partners'];
@ -226,7 +226,7 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
const otherDoc = <FormArray>this.businessForm.controls['documents']; const otherDoc = <FormArray>this.businessForm.controls['documents'];
//retailControl.push(this.manufactureDetails()); //retailControl.push(this.manufactureDetails());
//manufacture_details.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; // const india_sales:any=<FormArray> this.businessForm.controls['manufacturing_activity_details']['controls'][0].controls.india_where_sale_done;
//india_sales.push(this.indiaSalesDone()) //india_sales.push(this.indiaSalesDone())
//const country_sale:any=<FormArray>this.businessForm.controls['manufacturing_activity_details']['controls'][0].controls.countries_where_export_done; //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){ let PartnrArray=Object.keys(data['records'].partners).map(function(key){
return data['records'].partners[key]; return data['records'].partners[key];
}) })
// console.log("PartnrArray",PartnrArray)
if(PartnrArray.length==0){ if(PartnrArray.length==0){
Partnr.push(this.createPartners()) Partnr.push(this.createPartners())
} }
@ -304,7 +304,7 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
this.appxSalaryAmtInwords = this.cons.convertNumberToWords(businessVal.employees_appx_salary); 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.controls['partners']['controls'].value.partner_other_name='dd'
// this.businessForm.setValue(businessVal); // this.businessForm.setValue(businessVal);
//this.businessForm.value.seasonality //this.businessForm.value.seasonality
@ -327,9 +327,7 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
return activityData[index]; return activityData[index];
} }
}).filter(item => item != undefined); }).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) if(check_exist_businees_activity.length > 0)
{ {
check_exist_businees_activity.forEach((val,index) => { 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 // 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; businessVal.select_business_activity_type=check_exist_businees_activity;
} }
// business_activity.push(this.createBusinessActivity()) // business_activity.push(this.createBusinessActivity())
// this.businessForm.controls['select_business_activity_type'].setValue(check_exist_businees_activity) // this.businessForm.controls['select_business_activity_type'].setValue(check_exist_businees_activity)
// console.log("Entering Manufacture Details");
if(data['records'].manufacturing_activity_details){ if(data['records'].manufacturing_activity_details){
let selectedManufacturing=Object.keys(data['records'].manufacturing_activity_details).map(function(key){ let selectedManufacturing=Object.keys(data['records'].manufacturing_activity_details).map(function(key){
return data['records'].manufacturing_activity_details[key]; return data['records'].manufacturing_activity_details[key];
@ -398,19 +396,19 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
} }
}); });
businessVal.manufacturing_activity_details=selectedManufacturing; businessVal.manufacturing_activity_details=selectedManufacturing;
// console.log("data")
} }
else{ else{
// console.log("no data ")
businessVal.manufacturing_activity_details=[]; businessVal.manufacturing_activity_details=[];
} }
} }
else{ else{
// console.log("no data last")
businessVal.manufacturing_activity_details=[]; businessVal.manufacturing_activity_details=[];
} }
// console.log("exit")
if(data['records'].retail_trading_activity_details){ if(data['records'].retail_trading_activity_details){
let selectedRetail = Object.keys(data['records'].retail_trading_activity_details).map(function (key) { let selectedRetail = Object.keys(data['records'].retail_trading_activity_details).map(function (key) {
@ -471,7 +469,7 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
else { else {
businessVal.retail_trading_activity_details=[]; businessVal.retail_trading_activity_details=[];
} }
console.log("retail finish")
// update whole sale details // update whole sale details
if(data['records'].wholesale_trading_activity_details){ if(data['records'].wholesale_trading_activity_details){
@ -535,7 +533,7 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
businessVal.wholesale_trading_activity_details=[]; businessVal.wholesale_trading_activity_details=[];
} }
console.log("whole Sale finish")
if(data['records'].service_provider_activity_details){ if(data['records'].service_provider_activity_details){
let selectedService=Object.keys(data['records'].service_provider_activity_details).map(function (key){ 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; businessVal.service_provider_activity_details=selectedService;
} }
else{ else{
businessVal.service_provider_activity_details=[]; businessVal.service_provider_activity_details=[];
console.log("no data")
} }
} }
else { else {
businessVal.service_provider_activity_details=[]; businessVal.service_provider_activity_details=[];
} }
console.log("Service finish")
if(data['records'].others_activity_details){ if(data['records'].others_activity_details){
// update others activity details // update others activity details
@ -627,7 +626,7 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
businessVal.others_activity_details=[]; businessVal.others_activity_details=[];
} }
console.log("Others finish")
// dynamically add form group control // dynamically add form group control
if(data['dataStatus']){ 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['partners'].setValue(PartnrArray);
//this.businessForm.controls['persons_with_relationships'].setValue(PartnrArray1) //this.businessForm.controls['persons_with_relationships'].setValue(PartnrArray1)
// this.businessForm.controls['manufacturing_activity_details'].setValue(businessVal.manufacturing_activity_details) // this.businessForm.controls['manufacturing_activity_details'].setValue(businessVal.manufacturing_activity_details)
console.log("inserting..")
this.businessForm.setValue(businessVal); this.businessForm.setValue(businessVal);
console.log("Finish")
} }
else{ 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('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'); 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) { filterCity(datasource: any,filterid:number) {
//console.log("datasource",datasource)
// console.log("Filter Id",filterid)
//console.log("State List" ,this.stateList)
if(filterid){ if(filterid){
let filter = this.stateList.filter(x=>x.state_id==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); let merged = [].concat.apply([], setCityFilter);
// console.log(merged)
if(merged.length>0){ if(merged.length>0){
let check: any = merged.filter(function(fVal){ let check: any = merged.filter(function(fVal){
return existCities.some(function(sVal){ return existCities.some(function(sVal){
@ -752,7 +747,7 @@ changeBusinessActivity(event: any){
let manufacturingControl = <FormArray>this.businessForm.controls['manufacturing_activity_details']; let manufacturingControl = <FormArray>this.businessForm.controls['manufacturing_activity_details'];
manufacturingControl.controls = []; manufacturingControl.controls = [];
manufacturingControl.setValue([]); manufacturingControl.setValue([]);
console.log("true");
} }
else if(event.value.exist_status==false && event.value.type_of_activity_id==2){ else if(event.value.exist_status==false && event.value.type_of_activity_id==2){
this.ManufacturingChecked = event.value.exist_status; 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('india_where_sale_done');
control.controls[selectedIndex].removeControl('max_sale_state_name'); control.controls[selectedIndex].removeControl('max_sale_state_name');
if(value=='Yes') { if(value=='Yes') {
console.log("clicked yes");
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([])); control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([]));
control.controls[selectedIndex].addControl('max_sale_state_name',this.fb.array([this.maxSaleState()])); } control.controls[selectedIndex].addControl('max_sale_state_name',this.fb.array([this.maxSaleState()])); }
else if(value=='No'){ else if(value=='No'){
@ -1364,9 +1359,9 @@ relationChanged(event) {
} }
submitDetails() { submitDetails() {
console.log("First",this.businessForm.value);
let family: any = []; let family: any = [];
console.log(this.FormId)
let design: any; let design: any;
//let records={'pdid':this.pdDetails.pd_id,'formid':this.FormId,'fk_createdby':this.users}; //let records={'pdid':this.pdDetails.pd_id,'formid':this.FormId,'fk_createdby':this.users};
let records:any; let records:any;
@ -1374,7 +1369,7 @@ submitDetails() {
// records.formid = this.FormId; // records.formid = this.FormId;
// records.fk_createdby = this.users; // records.fk_createdby = this.users;
records=this.businessForm.value; records=this.businessForm.value;
console.log("Records",records)
//if(records.persons_with_relationships=='') //if(records.persons_with_relationships=='')
if (records.other_documents == 'no') { if (records.other_documents == 'no') {
delete records.documents; delete records.documents;
@ -1386,7 +1381,7 @@ submitDetails() {
delete records.ownership_others; delete records.ownership_others;
} }
// records.family_members_involved = this.relativeNames; // records.family_members_involved = this.relativeNames;
//console.log('recordss', records);
let validationFlag : number = 0; let validationFlag : number = 0;
@ -1481,7 +1476,7 @@ submitDetails() {
let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':this.FormId.form_id}; let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':this.FormId.form_id};
this.qustCat.retiverForm(records).subscribe(data => { this.qustCat.retiverForm(records).subscribe(data => {
let businessVal = data['records']; let businessVal = data['records'];
// console.log('data', businessVal);
let constVal: any; let constVal: any;
const Desgn = <FormArray>this.businessForm.controls['designation']; const Desgn = <FormArray>this.businessForm.controls['designation'];
const Partnr = <FormArray>this.businessForm.controls['partners']; const Partnr = <FormArray>this.businessForm.controls['partners'];
@ -1574,23 +1569,18 @@ ServiceCounterArray: any = [];
//this.ExportFlag=false //this.ExportFlag=false
const parentControl = <FormArray>this.businessForm.controls['select_business_activity_type']; const parentControl = <FormArray>this.businessForm.controls['select_business_activity_type'];
const childControl = <FormArray>parentControl.controls[0]; 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) => { // childControl.forEach((datas,index) => {
// console.log(datas);
// // exist_status==true && event.value.type_of_activity_id // // 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(!this.ManufacturingChecked){
if(stringFlag == 'MActivity' && value != "Within India"){ if(stringFlag == 'MActivity' && value != "Within India"){
@ -1642,20 +1632,19 @@ ServiceCounterArray: any = [];
} }
let SumOfManufacturingCounter = this.ManufacturingCounterArray.reduce((sum, val) => sum + +val, 0); 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); 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); 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); let SumOfServiceCounter = this.ServiceCounterArray.reduce((sum, val) => sum + +val, 0);
// console.log(SumOfServiceCounter,this.ServiceCounterArray);
let overallCounter = SumOfManufacturingCounter + SumOfRetailCounter + SumOfWholeSaleCounter + SumOfServiceCounter ; let overallCounter = SumOfManufacturingCounter + SumOfRetailCounter + SumOfWholeSaleCounter + SumOfServiceCounter ;
this.ExportFlag = overallCounter > 0 ? true : false ; 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) { // let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (key) {
// return dataForm.main_raw_materials[key]; // return dataForm.main_raw_materials[key];
// }); // });
console.log(dataForm);
let api_main_raw_materials = dataForm.manufacturing_details[0].main_raw_materials; let api_main_raw_materials = dataForm.manufacturing_details[0].main_raw_materials;
this.initManufacturingProductsDetails(api_main_raw_materials); this.initManufacturingProductsDetails(api_main_raw_materials);
@ -517,7 +517,7 @@ export class PdQuestionClientInfoPage {
// } // }
/** To Save/Edited Popup Data */ /** To Save/Edited Popup Data */
saveClientInfo(answerFormValues) { saveClientInfo(answerFormValues) {
// console.log(answerFormValues);
Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]); Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]);
if (answerFormValues.manufacturing_details[0] == null) { if (answerFormValues.manufacturing_details[0] == null) {
delete answerFormValues['manufacturing_details']; delete answerFormValues['manufacturing_details'];

View File

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

View File

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

View File

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

View File

@ -32,7 +32,6 @@ export class PdQuestionFinalRemarkPage {
this.pdid=this.pdDetails.pd_id this.pdid=this.pdDetails.pd_id
this.FormId=this.navParams.get('FormId'); this.FormId=this.navParams.get('FormId');
this.users=aws.getlocale() this.users=aws.getlocale()
console.log("form Id",this.FormId);
this._finalRemarkForm=this.fb.group({ this._finalRemarkForm=this.fb.group({
fk_createdby:[this.users], fk_createdby:[this.users],
@ -53,10 +52,10 @@ export class PdQuestionFinalRemarkPage {
} }
ionViewDidLoad() { ionViewDidLoad() {
console.log('ionViewDidLoad PdQuestionFinalRemarkPage'); console.log('ionViewDidLoad PdQuestionFinalRemarkPage');
} }
getDropDown(){ getDropDown(){
this.qustcat.getcommondrop('CUSTOMERBEHAVIOUR').subscribe(res=>{ this.qustcat.getcommondrop('CUSTOMERBEHAVIOUR').subscribe(res=>{
// console.log("drop",res);
this.m_remarkTypeCustomerBehaviour=res['records'].filter(data=>data.isactive==1) this.m_remarkTypeCustomerBehaviour=res['records'].filter(data=>data.isactive==1)
}) })
this.qustcat.getcommondrop('PDOFFICERRECOMMENDATIONS').subscribe(res=>{ this.qustcat.getcommondrop('PDOFFICERRECOMMENDATIONS').subscribe(res=>{
@ -65,9 +64,7 @@ getDropDown(){
} }
RecommendationChange(e){ RecommendationChange(e){
console.log('e',e);
if(e==1){ 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'].setValidators([Validators.required]);
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity(); this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
@ -80,7 +77,6 @@ RecommendationChange(e){
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].setValue(''); this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].setValue('');
} }
if(e==2){ if(e==2){
console.log('all Validation clear ',e);
this._finalRemarkForm.controls['others_pd_officers_recommendation'].clearValidators(); this._finalRemarkForm.controls['others_pd_officers_recommendation'].clearValidators();
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity(); this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValue(''); this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValue('');
@ -95,7 +91,6 @@ RecommendationChange(e){
} }
if(e==3){ 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'].setValidators([Validators.required]);
this._finalRemarkForm.controls['enter_reason_for_negative'].updateValueAndValidity(); this._finalRemarkForm.controls['enter_reason_for_negative'].updateValueAndValidity();
@ -109,7 +104,6 @@ RecommendationChange(e){
} }
if(e==4){ 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'].setValidators([Validators.required]);
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].updateValueAndValidity(); 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} let saveRecords={'pd_id':this.pdid,'pd_form_id':this.FormId.form_id}
this.qustcat.retiverForm(saveRecords).subscribe(data=>{ this.qustcat.retiverForm(saveRecords).subscribe(data=>{
if(data['dataStatus']==true){ 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_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.final_other_customer_behaviour.setValue(data['records'].final_other_customer_behaviour);
this._finalRemarkForm.controls.is_service_provided.setValue(data['records'].is_service_provided); this._finalRemarkForm.controls.is_service_provided.setValue(data['records'].is_service_provided);
@ -143,7 +136,6 @@ RecommendationChange(e){
var answerData=this._finalRemarkForm.value var answerData=this._finalRemarkForm.value
//To Remove The "Null" With Key also //To Remove The "Null" With Key also
Object.keys(answerData).forEach((key) => (answerData[key] == null) && delete answerData[key]); Object.keys(answerData).forEach((key) => (answerData[key] == null) && delete answerData[key]);
console.log(JSON.stringify(answerData));
this.qustcat.saveForm(answerData).subscribe(res=>{ this.qustcat.saveForm(answerData).subscribe(res=>{
if(res['dataStatus']==true){ if(res['dataStatus']==true){
this.toast.pdTriggerappmessage("Record Saved Successfully"); 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) { 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(); this.maxDate = new Date();
// console.log(this.maxDate);
this.pd_applicants_details = []; this.pd_applicants_details = [];
this.pd_applicants_details.pop(); this.pd_applicants_details.pop();
this.pdDetails = this.navParams.get('pdDetails'); 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("/"); //let get_max_date=this.pdDetails.pd_date_of_initiation.split('/').reverse.join("/");
//this.maxDate=new Date(get_max_date) //this.maxDate=new Date(get_max_date)
this.FormId = this.navParams.get('FormId'); this.FormId = this.navParams.get('FormId');
// console.log(this.pdDetails);
this.users = this.aws.getlocale(); this.users = this.aws.getlocale();
this.getdropdown(); this.getdropdown();
@ -94,8 +91,6 @@ export class PdQuestionGeneralInfoPage {
//this.initIndividuals(); //this.initIndividuals();
this.pd_applicants_details = this.pdDetails.applicat_details; 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; this.fulldata=control.value;
//control.controls.length //control.controls.length
//control.push() //control.push()
// console.log("individualsListBothCase",this.individualsListBothCase);
}); });
this.generalForm.controls['company_value'].valueChanges.subscribe(val=>{ this.generalForm.controls['company_value'].valueChanges.subscribe(val=>{
let control=<FormArray>this.generalForm.controls['company_value']; let control=<FormArray>this.generalForm.controls['company_value'];
@ -139,8 +133,6 @@ export class PdQuestionGeneralInfoPage {
initlistv(data,purpose) :void 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']; const control=<FormArray>this.generalForm.controls['list_value'];
if(purpose=='ins') if(purpose=='ins')
{ {
@ -203,13 +195,9 @@ export class PdQuestionGeneralInfoPage {
} }
qualificationById(data):string{ 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){ for(let i of this.qualificationList){
if(data==i.qualification_id){ if(data==i.qualification_id){
this.qual_name=i.qualification_name this.qual_name=i.qualification_name
//console.log("i",this.qual_name)
return this.qual_name return this.qual_name
} }
} }
@ -281,19 +269,14 @@ export class PdQuestionGeneralInfoPage {
business_entity_type_name:[c_business_name] business_entity_type_name:[c_business_name]
}); });
control.push(formData); control.push(formData);
//console.log("finished company Value");
this.h_companies=false; this.h_companies=false;
} }
} }
} }
businessEntityById(val):string{ 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){ for(let v of this.businessEntityTypeList){
if(val==v.business_entity_type_id){ if(val==v.business_entity_type_id){
var name=v.business_entity_type_name var name=v.business_entity_type_name
// console.log("i",v.business_entity_type_name)
return name return name
} }
} }
@ -399,7 +382,6 @@ datajson:any;
dataobj:any; dataobj:any;
addRec(v){ addRec(v){
//console.log("v",v);
if(v=='1') if(v=='1')
{ {
this.buttonClick=!this.buttonClick; this.buttonClick=!this.buttonClick;
@ -416,15 +398,10 @@ dataobj:any;
// const control=<FormArray>this.generalForm.controls['individuals']; // const control=<FormArray>this.generalForm.controls['individuals'];
//control.removeAt(i); //control.removeAt(i);
//this.data=this.generalForm.value.individuals; //this.data=this.generalForm.value.individuals;
/* console.log("Data First",this.data);
this.cart.push(this.generalForm.value.individuals); this.cart.push(this.generalForm.value.individuals);
this.data=Object.assign(this.cart); this.data=Object.assign(this.cart);
console.log("Cart",this.cart);
// this.data=Object.assign(this.generalForm.value.individuals) // this.data=Object.assign(this.generalForm.value.individuals)
this.datajson=JSON.stringify(this.cart) 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(v=='1')
{ {
if(!this.generalForm.controls['individuals'].valid){ if(!this.generalForm.controls['individuals'].valid){
@ -465,8 +442,6 @@ dataobj:any;
control.value[i].is_active=false control.value[i].is_active=false
var vla=control.value[i] var vla=control.value[i]
this.OldData.push(vla); this.OldData.push(vla);
//console.log(vla);
//console.log(this.OldData);
control.removeAt(i); control.removeAt(i);
@ -499,7 +474,6 @@ dataobj:any;
if(res['dataStatus']==true) if(res['dataStatus']==true)
{ {
this.qualificationList=res['records'].filter(com=>com.isactive==1); this.qualificationList=res['records'].filter(com=>com.isactive==1);
//console.log("qualificationList",this.qualificationList)
} }
}); });
this.qustCat.getcommondrop('BUSINESSENTITYTYPE').subscribe(res=>{ this.qustCat.getcommondrop('BUSINESSENTITYTYPE').subscribe(res=>{
@ -544,7 +518,6 @@ dataobj:any;
} }
if(exist_applicant_relation.length > 0){ if(exist_applicant_relation.length > 0){
exist_applicant_relation.forEach(val => { exist_applicant_relation.forEach(val => {
// console.log(val);
relationControl.push(this.createApplicantRelation(val)); relationControl.push(this.createApplicantRelation(val));
//push related to details //push related to details
this.fetch_related_details.push(val.applicant_name); this.fetch_related_details.push(val.applicant_name);
@ -603,7 +576,6 @@ dataobj:any;
let relationControl = <FormArray>this.generalForm.controls['applicant_relation']; let relationControl = <FormArray>this.generalForm.controls['applicant_relation'];
let pos_id = relationControl.value.map(e=> let pos_id = relationControl.value.map(e=>
e.pd_co_applicant_id).indexOf(item.pd_co_applicant_id.value); 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){ if(item.pd_co_applicant_id.value !=0){
relationControl.removeAt(pos_id); relationControl.removeAt(pos_id);
let pos_name=this.fetch_related_details.indexOf(item.applicant_name.value); let pos_name=this.fetch_related_details.indexOf(item.applicant_name.value);
@ -620,7 +592,6 @@ dataobj:any;
} }
createApplicantRelation(elementValue: any) { createApplicantRelation(elementValue: any) {
//console.log('function in 156');
return this.fb.group({ return this.fb.group({
pd_co_applicant_id: [elementValue.pd_co_applicant_id], pd_co_applicant_id: [elementValue.pd_co_applicant_id],
@ -664,7 +635,6 @@ dataobj:any;
} }
getDateObjects(values: any, controlIndex) { getDateObjects(values: any, controlIndex) {
// console.log("Date Change Action",values);
let control: any = this.generalForm.get('companies') as FormArray; let control: any = this.generalForm.get('companies') as FormArray;
control.controls['business_years']='' control.controls['business_years']=''
control.controls['business_month']='' control.controls['business_month']=''
@ -687,7 +657,6 @@ getDateObjects(values: any, controlIndex) {
submitData(answerData) submitData(answerData)
{ {
console.log("Answer",answerData);
let saveRecords:any={} let saveRecords:any={}
var valuesData_indi:any=[] var valuesData_indi:any=[]
@ -726,12 +695,9 @@ getDateObjects(values: any, controlIndex) {
saveRecords.persons_with_relationships=answerData.persons_with_relationships; saveRecords.persons_with_relationships=answerData.persons_with_relationships;
saveRecords.company_with_relationships=answerData.company_with_relationships saveRecords.company_with_relationships=answerData.company_with_relationships
saveRecords.general_remark=answerData.general_remark; 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=>{ this.qustCat.saveForm(saveRecords).subscribe(dataResult=>{
if(dataResult['dataStatus']==true){ if(dataResult['dataStatus']==true){
@ -741,12 +707,10 @@ getDateObjects(values: any, controlIndex) {
} }
else{ else{
this.toast.pdTriggerappmessage('Error'); this.toast.pdTriggerappmessage('Error');
//console.log("Error",)
} }
}) })
/* Old Data /* Old Data
console.log("Answer Data",answerData);
if(this.generalForm.valid) if(this.generalForm.valid)
{ {
let saveRecords:any = {} let saveRecords:any = {}
@ -779,7 +743,6 @@ getDateObjects(values: any, controlIndex) {
saveRecords.selected_applicant=applicantList; saveRecords.selected_applicant=applicantList;
saveRecords.applicant_relation=applicantRelationList; saveRecords.applicant_relation=applicantRelationList;
saveRecords.fk_createdby = this.users; saveRecords.fk_createdby = this.users;
console.log(saveRecords);
this.qustCat.saveForm(saveRecords).subscribe(res=> this.qustCat.saveForm(saveRecords).subscribe(res=>
{ {
if(res['dataStatus']==true) if(res['dataStatus']==true)
@ -801,11 +764,9 @@ getDateObjects(values: any, controlIndex) {
companyControl.controls=[] companyControl.controls=[]
if(res['dataStatus']==true) if(res['dataStatus']==true)
{ {
// console.log("Getting DAta",res);
this.lengthv=this.data_all; this.lengthv=this.data_all;
this.generalForm.controls['general_remark'].setValue(this.data_all.general_remark); this.generalForm.controls['general_remark'].setValue(this.data_all.general_remark);
//console.log("1")
this.initlistv(this.data_all.individuals,'get') this.initlistv(this.data_all.individuals,'get')
/* var arrlist_indi:any=[] /* 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'); this.initCompanyValue(arraylis,'get');
// console.log("3")
if(this.data_all.persons_with_relationships != ''){ if(this.data_all.persons_with_relationships != ''){
// console.log("Entering personwithRelation")
this.initPersonRelationship(this.data_all.persons_with_relationships); this.initPersonRelationship(this.data_all.persons_with_relationships);
//console.log("4")
} }
if(this.data_all.company_with_relationships != ''){ if(this.data_all.company_with_relationships != ''){
this.initCompanyRelationShip(this.data_all.company_with_relationships); this.initCompanyRelationShip(this.data_all.company_with_relationships);
// console.log("5")
} }
} }
else{ else{
// console.log("Error");
} }
}) })
/*let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':this.FormId.form_id}; /*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=> this.qustCat.retiverForm(records).subscribe(res=>
{ {
if(res['dataStatus']==true) if(res['dataStatus']==true)
@ -873,7 +825,6 @@ getDateObjects(values: any, controlIndex) {
let applicant_relation = Object.keys(res['records'].applicant_relation).map(function(key) let applicant_relation = Object.keys(res['records'].applicant_relation).map(function(key)
{ {
console.log(key);
return res['records'].applicant_relation[key]; return res['records'].applicant_relation[key];
}); });

View File

@ -101,7 +101,7 @@ export class PdQuestionLenderRepresentativePage {
{ {
return res['records'].lender_representative_details[key]; return res['records'].lender_representative_details[key];
}); });
console.log(lender_represent_details);
const control = <FormArray>this.representativeForm.controls['lender_representative_details'] as FormArray; const control = <FormArray>this.representativeForm.controls['lender_representative_details'] as FormArray;
lender_represent_details.forEach(val=> 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) { 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.FormId = this.navParams.get('FormId');
this.pdDetails = this.navParams.get('pdDetails'); this.pdDetails = this.navParams.get('pdDetails');
console.log(this.pdDetails);
this.applicants = this.pdDetails.applicat_details this.applicants = this.pdDetails.applicat_details
this.productAbbr = this.pdDetails.product_abbr; this.productAbbr = this.pdDetails.product_abbr;
this.users = this.aws.getlocale(); this.users = this.aws.getlocale();
@ -99,7 +98,6 @@ export class PdQuestionLoansPage {
loandetails_remarks: ['', Validators.compose([Validators.required])], 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") if(this.pdDetails.product_abbr !="BL" || this.pdDetails.product_abbr !="PL" || this.pdDetails.product_abbr !="LL")
{ {
this.mortagetypeAccess = true; this.mortagetypeAccess = true;
@ -107,7 +105,6 @@ export class PdQuestionLoansPage {
{ {
this.mortagetypeAccess = false; this.mortagetypeAccess = false;
} }
console.log(this.mortagetypeAccess);
if(this.productAbbr == 'PL' || this.productAbbr == 'BL' || this.productAbbr == 'LAP'){ if(this.productAbbr == 'PL' || this.productAbbr == 'BL' || this.productAbbr == 'LAP'){
@ -141,7 +138,6 @@ export class PdQuestionLoansPage {
this.qustCat.getcommondrop('MORTAGEPROPERTIES').subscribe( this.qustCat.getcommondrop('MORTAGEPROPERTIES').subscribe(
data => { data => {
if(data['dataStatus']==true){ if(data['dataStatus']==true){
// console.log(data['records']);
let that = this; let that = this;
this.m_mortageTypeProperty = data['records'].filter( this.m_mortageTypeProperty = data['records'].filter(
function(data){ function(data){
@ -158,7 +154,6 @@ export class PdQuestionLoansPage {
return ; return ;
} }
}); });
console.log(this.m_mortageTypeProperty);
// this.mortage_type(this.propertyType); // this.mortage_type(this.propertyType);
} }
}); });
@ -183,10 +178,8 @@ export class PdQuestionLoansPage {
}); });
this.qustCat.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{ this.qustCat.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
console.log("Entering company List")
if(data['dataStatus']==true){ if(data['dataStatus']==true){
this.existCompanyList=data['records'].filter(val =>val.is_active===true && val.is_company_applicant===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=[]; let modifyCompanyList : any=[];
if(this.existCompanyList.length>0){ if(this.existCompanyList.length>0){
@ -213,23 +206,18 @@ export class PdQuestionLoansPage {
}) })
console.log("complete")
} }
selectedBalancesTransferChanges(event: any){ selectedBalancesTransferChanges(event: any){
// console.log('First Time',event);
// console.log('First Time Value',event.value);
// if(event.value == 'no') { // if(event.value == 'no') {
// this.loanDetailsForm.controls['is_topup'].clearValidators(); // this.loanDetailsForm.controls['is_topup'].clearValidators();
//this.loanDetailsForm.controls['is_topup'].updateValueAndValidity(); //this.loanDetailsForm.controls['is_topup'].updateValueAndValidity();
// this.loanDetailsForm.controls['is_topup'].setValue(''); // this.loanDetailsForm.controls['is_topup'].setValue('');
// console.log('no',event.value);
//} //}
//else if(event.value == 'yes'){ //else if(event.value == 'yes'){
// this.loanDetailsForm.controls['is_topup'].setValidators([Validators.required]); // this.loanDetailsForm.controls['is_topup'].setValidators([Validators.required]);
//this.loanDetailsForm.controls['is_topup'].updateValueAndValidity(); //this.loanDetailsForm.controls['is_topup'].updateValueAndValidity();
// console.log('yes',event.value);
// } // }
if (event.value == 'no') { if (event.value == 'no') {
this.loanDetailsForm.controls['source'].setValidators([Validators.required]); this.loanDetailsForm.controls['source'].setValidators([Validators.required]);
@ -266,9 +254,7 @@ export class PdQuestionLoansPage {
mortage_type(mortage_value) mortage_type(mortage_value)
{ {
console.log(mortage_value);
let mortagetypes = this.m_mortageTypeProperty.filter(mor=>mor.mortage_property_id==mortage_value)[0]; let mortagetypes = this.m_mortageTypeProperty.filter(mor=>mor.mortage_property_id==mortage_value)[0];
console.log(mortagetypes);
var property_name=mortagetypes.property_name var property_name=mortagetypes.property_name
if(property_name=='Others (Please Specify)') if(property_name=='Others (Please Specify)')
{ {
@ -300,25 +286,21 @@ export class PdQuestionLoansPage {
this.loanDetailsForm.controls['topup_amount'].setValue(topupAmt); this.loanDetailsForm.controls['topup_amount'].setValue(topupAmt);
} }
endUserChange(event) { endUserChange(event) {
console.log("change",this.m_endUseForLoan);
//this.endUserList = []; //this.endUserList = [];
event.forEach(option => { event.forEach(option => {
let othresData = this.m_endUseForLoan.filter(sub=>sub.enduse_of_loan_id==option)[0]; let othresData = this.m_endUseForLoan.filter(sub=>sub.enduse_of_loan_id==option)[0];
othresData = othresData.enduse_of_loan.substr(0,6).toLowerCase(); othresData = othresData.enduse_of_loan.substr(0,6).toLowerCase();
this.endUserList.push({ end_use: option }); this.endUserList.push({ end_use: option });
console.log(201,othresData);
if (othresData == 'others') { if (othresData == 'others') {
this.isOtherPurpose = true; this.isOtherPurpose = true;
return ; return ;
}else }else
{ {
//console.log('else');
this.isOtherPurpose = false; this.isOtherPurpose = false;
} }
}); });
console.log(this.endUserList);
} }
ownerNameChange(event) { ownerNameChange(event) {
this.ownerNames = []; this.ownerNames = [];
@ -327,7 +309,6 @@ export class PdQuestionLoansPage {
}); });
} }
sourceChange(evt) { sourceChange(evt) {
// console.log('source Changed Values',evt);
// this.isOtherSource = (evt.some(e => e == 4) == true) ? true : false ; // this.isOtherSource = (evt.some(e => e == 4) == true) ? true : false ;
// this.isPLSource = (evt.some(e => e == 3) == true) ? true : false ; // this.isPLSource = (evt.some(e => e == 3) == true) ? true : false ;
@ -368,8 +349,6 @@ export class PdQuestionLoansPage {
} }
} }
submitLoanDetails() { submitLoanDetails() {
// console.log(answerData);
// console.log(this.endUserList);
// if(this.loanDetailsForm.valid){ // if(this.loanDetailsForm.valid){
let records: any = {}; let records: any = {};
records.pdid = this.pdDetails.pd_id; 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.property_type_others = this.loanDetailsForm.controls['property_type_others'].value;
}; };
// records.owner_name_group = this.ownerNames; // records.owner_name_group = this.ownerNames;
// console.log(this.loanDetailsForm.controls['owner_name'].value);
if(this.loanDetailsForm.controls['owner_name'].value != ''){ if(this.loanDetailsForm.controls['owner_name'].value != ''){
let dataOwner_name = []; let dataOwner_name = [];
this.loanDetailsForm.controls['owner_name'].value.forEach(element => { 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.emv_per_customer = this.loanDetailsForm.controls['emv_per_customer'].value;
//records.value_per_agreement = this.loanDetailsForm.controls['value_per_agreement'].value; //records.value_per_agreement = this.loanDetailsForm.controls['value_per_agreement'].value;
records.loandetails_remarks = this.loanDetailsForm.controls['loandetails_remarks'].value; records.loandetails_remarks = this.loanDetailsForm.controls['loandetails_remarks'].value;
console.log('data', records);
this.qustCat.saveForm(records).subscribe(data => { this.qustCat.saveForm(records).subscribe(data => {
console.log('data', data);
this.navCtrl.pop(); this.navCtrl.pop();
this.toast.pdTriggerappmessage('Record Saved Successfully.!'); this.toast.pdTriggerappmessage('Record Saved Successfully.!');
// this.notifier.notify('success', 'Saved Successfully.'); // this.notifier.notify('success', 'Saved Successfully.');
@ -483,11 +459,9 @@ export class PdQuestionLoansPage {
} }
getLoanDetails() { getLoanDetails() {
console.log("Entering LoanDetails GEt");
let records = { 'pd_id': this.pdDetails.pd_id, 'pd_form_id': this.FormId.form_id }; let records = { 'pd_id': this.pdDetails.pd_id, 'pd_form_id': this.FormId.form_id };
this.qustCat.retiverForm(records).subscribe(value => { this.qustCat.retiverForm(records).subscribe(value => {
console.log('value', value);
if (value['dataStatus'] == true) { if (value['dataStatus'] == true) {
let loanDetails = value['records']; let loanDetails = value['records'];
let result = Object.keys(loanDetails.end_use_group).map(function (key) { 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}); 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); this.loanDetailsForm.controls['loan_amount'].setValue(loanDetails.loan_amount);
if(loanDetails.loan_amount){ this.loanAmtInWords = this.constant.convertNumberToWords(loanDetails.loan_amount); } if(loanDetails.loan_amount){ this.loanAmtInWords = this.constant.convertNumberToWords(loanDetails.loan_amount); }
this.loanDetailsForm.controls['end_use'].setValue(this.enduse); this.loanDetailsForm.controls['end_use'].setValue(this.enduse);
@ -586,7 +558,6 @@ export class PdQuestionLoansPage {
this.propertyType =loanDetails.property_type; this.propertyType =loanDetails.property_type;
if(loanDetails.property_type !=null){ if(loanDetails.property_type !=null){
this.mortage_type(this.propertyType); this.mortage_type(this.propertyType);
console.log("mortageCardAccess",this.mortageCardAccess);
if(this.mortageCardAccess == true){ if(this.mortageCardAccess == true){
this.loanDetailsForm.controls['property_type_others'].setValue(loanDetails.property_type_others); this.loanDetailsForm.controls['property_type_others'].setValue(loanDetails.property_type_others);
// this.mortage_type(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) { 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'); this.pdDetails = this.navParams.get('pdDetails');
console.log("Pd",this.pdDetails)
this.FormId = this.navParams.get('FormId'); this.FormId = this.navParams.get('FormId');
this.applicants = this.pdDetails.applicat_details; this.applicants = this.pdDetails.applicat_details;
this.applicants = this.applicants.filter(appt=>appt.applicant_type != 2); this.applicants = this.applicants.filter(appt=>appt.applicant_type != 2);
@ -53,7 +52,6 @@ export class PdQuestionNeighbourHoodPage {
referencecheck_list: this.fb.array([]), referencecheck_list: this.fb.array([]),
neighbour_reference_remark:'' neighbour_reference_remark:''
}) })
// console.log(this.pdDetails);
this.users = this.aws.getlocale(); this.users = this.aws.getlocale();
this.getneighbourhood(); this.getneighbourhood();
@ -114,11 +112,9 @@ export class PdQuestionNeighbourHoodPage {
} }
toggleVisibility(e,index,flag){ toggleVisibility(e,index,flag){
console.log(e,index);
let val let val
if(flag == 1){ if(flag == 1){
// console.log("val",val);
this.isDisplay[index] = e; this.isDisplay[index] = e;
} }
else if(flag==2){ else if(flag==2){
@ -127,7 +123,6 @@ toggleVisibility(e,index,flag){
} }
checkOthers(values){ checkOthers(values){
console.log("check other value",values)
if(values!=null) { if(values!=null) {
return values==0 ? true : false; return values==0 ? true : false;
} }
@ -208,7 +203,6 @@ checkOthers(values){
{ {
console.log(answerData);
let saveRecords:any = {} let saveRecords:any = {}
let referencecheck_list:any=[]; let referencecheck_list:any=[];
@ -258,7 +252,6 @@ checkOthers(values){
saveRecords.fk_createdby = this.users; saveRecords.fk_createdby = this.users;
saveRecords.neighbourhood_status=answerData.neighbourhood_status saveRecords.neighbourhood_status=answerData.neighbourhood_status
saveRecords.neighbour_reference_remark=answerData.neighbour_reference_remark; saveRecords.neighbour_reference_remark=answerData.neighbour_reference_remark;
console.log(saveRecords);
this.qustCat.saveForm(saveRecords).subscribe(res=> this.qustCat.saveForm(saveRecords).subscribe(res=>
{ {
@ -282,7 +275,6 @@ checkOthers(values){
if(res['dataStatus']==true) if(res['dataStatus']==true)
{ {
let neighbourDetails = res['records']; let neighbourDetails = res['records'];
console.log("neighbour Status",neighbourDetails)
// neighbourDetails.neighbourhood_list.='' // neighbourDetails.neighbourhood_list.=''
if(neighbourDetails.check_type==0) if(neighbourDetails.check_type==0)
@ -295,10 +287,8 @@ checkOthers(values){
{ {
return res['records'].neighbourhood_list[key]; return res['records'].neighbourhood_list[key];
}); });
console.log("data")
neighbourhood_list.forEach((element,index)=> 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_business_operation,index,1);
this.toggleVisibility(element.did_not_know_the_owner,index,2); this.toggleVisibility(element.did_not_know_the_owner,index,2);
neicontrol.push(this.createNeighbourhood()); neicontrol.push(this.createNeighbourhood());
@ -316,19 +306,16 @@ checkOthers(values){
{ {
return res['records'].referencecheck_list[key]; return res['records'].referencecheck_list[key];
}); });
console.log(referencecheck_list);
this.neighbourhoodForm.controls['check_type'].setValue(neighbourDetails.check_type); this.neighbourhoodForm.controls['check_type'].setValue(neighbourDetails.check_type);
this.neighbourhoodForm.controls['neighbour_reference_remark'].setValue(neighbourDetails.neighbour_reference_remark); this.neighbourhoodForm.controls['neighbour_reference_remark'].setValue(neighbourDetails.neighbour_reference_remark);
referencecheck_list.forEach((val,index)=> referencecheck_list.forEach((val,index)=>
{ {
let statecodesearch = val.landline.search("-"); let statecodesearch = val.landline.search("-");
referencecheck_list[index].statecode = val.landline.substr(0,statecodesearch); referencecheck_list[index].statecode = val.landline.substr(0,statecodesearch);
console.log(val);
referencecheck_list[index].landline = val.landline.substr(+statecodesearch + 1,8); referencecheck_list[index].landline = val.landline.substr(+statecodesearch + 1,8);
control.push(this.createreferance()); control.push(this.createreferance());
this.amtInWords[index]=this.constant.convertNumberToWords(val.business_volume_amount); this.amtInWords[index]=this.constant.convertNumberToWords(val.business_volume_amount);
}); });
console.log(referencecheck_list);
this.neighbourhoodForm.controls['referencecheck_list'].setValue(referencecheck_list); this.neighbourhoodForm.controls['referencecheck_list'].setValue(referencecheck_list);
}else }else

View File

@ -37,7 +37,6 @@ export class PdQuestionOtherIncomePage {
this.pdDetails = this.navParams.get('pdDetails'); this.pdDetails = this.navParams.get('pdDetails');
this.pdid=this.pdDetails.pd_id; this.pdid=this.pdDetails.pd_id;
console.log("pdid",this.pdid);
this.FormId = this.navParams.get('FormId'); this.FormId = this.navParams.get('FormId');
this.getFrequency(); this.getFrequency();
this.users = this.aws.getlocale(); this.users = this.aws.getlocale();
@ -87,7 +86,6 @@ deleteIncomeDetails(index) {
} }
checkotherDetails(val) checkotherDetails(val)
{ {
console.log("Change",val)
if(val=="Yes") if(val=="Yes")
{ {
this.addIncomeDetails(); this.addIncomeDetails();
@ -97,8 +95,6 @@ checkotherDetails(val)
const control= <FormArray>this.otherIncomeForm.controls['income_details']; const control= <FormArray>this.otherIncomeForm.controls['income_details'];
control.removeAt(0) control.removeAt(0)
// let len=control.length // let len=control.length
// console.log("Form",this.otherIncomeForm)
// console.log("Length",control.length)
// for(let i=0;i<len;i++){ // for(let i=0;i<len;i++){
// control.removeAt(i); // control.removeAt(i);
// } // }
@ -107,17 +103,13 @@ checkotherDetails(val)
} }
getFrequency() { getFrequency() {
this.qustCat.getAllPersonsName(this.pdid).subscribe(res=>{ this.qustCat.getAllPersonsName(this.pdid).subscribe(res=>{
// console.log("income earn",res)
if(res['dataStatus']==true) if(res['dataStatus']==true)
{ {
console.log("income Earned by",res);
this.incomeEarnedBy=res['record']; this.incomeEarnedBy=res['record'];
//console.log("res",res['record'])
} }
}) })
let master_name = 'FREQUENCY'; let master_name = 'FREQUENCY';
this.qustCat.getcommondrop(master_name).subscribe(data => { this.qustCat.getcommondrop(master_name).subscribe(data => {
//console.log('data', data);
if(data['dataStatus']==true) if(data['dataStatus']==true)
{ {
this.frequencyData = data['records'].filter(fre=>fre.isactive==1); this.frequencyData = data['records'].filter(fre=>fre.isactive==1);
@ -145,9 +137,7 @@ submitOtherIncome(answerData)
records.other_income = answerData.other_income; records.other_income = answerData.other_income;
records.income_details = answerData.income_details; records.income_details = answerData.income_details;
records.otherincome_remarks = answerData.otherincome_remarks; records.otherincome_remarks = answerData.otherincome_remarks;
console.log('data', records);
this.qustCat.saveForm(records).subscribe(data => { this.qustCat.saveForm(records).subscribe(data => {
console.log('data', data);
this.navCtrl.pop(); this.navCtrl.pop();
this.toast.pdTriggerappmessage('Record Saved Successfully.!'); this.toast.pdTriggerappmessage('Record Saved Successfully.!');
}, error => { }, error => {
@ -162,19 +152,15 @@ getOtherIncome()
this.qustCat.retiverForm(records).subscribe(res=> this.qustCat.retiverForm(records).subscribe(res=>
{ {
this.incomeDetails = this.otherIncomeForm.get('income_details') as FormArray; this.incomeDetails = this.otherIncomeForm.get('income_details') as FormArray;
console.log(124,res);
this.otherIncomeDetails = res; this.otherIncomeDetails = res;
if(this.otherIncomeDetails.dataStatus == true) if(this.otherIncomeDetails.dataStatus == true)
{ {
this.otherIncomeDetails = this.otherIncomeDetails.records; this.otherIncomeDetails = this.otherIncomeDetails.records;
if(this.otherIncomeDetails.other_income=='Yes'){ if(this.otherIncomeDetails.other_income=='Yes'){
console.log('if');
var incomeArray = Object.keys(res['records'].income_details).map(function(key) { var incomeArray = Object.keys(res['records'].income_details).map(function(key) {
//console.log(res);
return res['records'].income_details[key]; return res['records'].income_details[key];
}); });
console.log(this.otherIncomeDetails);
this.otherIncomeForm.controls['other_income'].setValue(this.otherIncomeDetails.other_income); this.otherIncomeForm.controls['other_income'].setValue(this.otherIncomeDetails.other_income);
this.otherIncomeForm.controls['otherincome_remarks'].setValue(this.otherIncomeDetails.otherincome_remarks); this.otherIncomeForm.controls['otherincome_remarks'].setValue(this.otherIncomeDetails.otherincome_remarks);
@ -189,7 +175,6 @@ getOtherIncome()
incomeArray.forEach((datas,index)=> incomeArray.forEach((datas,index)=>
{ {
this.incomeDetails.push(this.createDetail()); this.incomeDetails.push(this.createDetail());
// console.log("Amount",this.otherIncomeDetails.income_details.amount);
this.amtInWords[index]=this.constant.convertNumberToWords(datas.amount) this.amtInWords[index]=this.constant.convertNumberToWords(datas.amount)
}) })
} }
@ -197,7 +182,6 @@ getOtherIncome()
}else }else
{ {
console.log('else');
this.otherIncomeForm.controls['other_income'].setValue(this.otherIncomeDetails.other_income); this.otherIncomeForm.controls['other_income'].setValue(this.otherIncomeDetails.other_income);
this.otherIncomeForm.controls['otherincome_remarks'].setValue(this.otherIncomeDetails.otherincome_remarks); 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.questionDetails = this.navParams.get('questionDetails');
this.pdDetails = this.navParams.get('pdDetails'); this.pdDetails = this.navParams.get('pdDetails');
this.users = this.aws.getlocale(); this.users = this.aws.getlocale();
console.log(this.pdDetails);
// this.getRelationMaster(); // this.getRelationMaster();
@ -61,7 +60,6 @@ export class PdQuestionPersonalInfoPage implements OnInit{
this.getRelationMaster(); this.getRelationMaster();
this.mainApplicantDetails = this.pdDetails.applicat_details this.mainApplicantDetails = this.pdDetails.applicat_details
.filter(item => item.applicant_type == 1); .filter(item => item.applicant_type == 1);
// console.log(this.mainApplicantDetails)
this.coApplicantDetails = this.pdDetails.applicat_details this.coApplicantDetails = this.pdDetails.applicat_details
.filter(item => item.applicant_type == 0); .filter(item => item.applicant_type == 0);
} }
@ -146,7 +144,6 @@ var co_result = Object.keys(data.co_applicant_details).map(function(key) {
coItem: coApplicantGroup, coItem: coApplicantGroup,
personal_info_form_remark: [data.personal_info_form_remark] personal_info_form_remark: [data.personal_info_form_remark]
}); });
//console.log(this._personalForm);
this.loadDataStatus = true; this.loadDataStatus = true;
} }
@ -202,7 +199,6 @@ var co_result = Object.keys(data.co_applicant_details).map(function(key) {
coItem: coApplicantGroup, coItem: coApplicantGroup,
personal_info_form_remark:null personal_info_form_remark:null
}); });
//console.log(this._personalForm);
this.loadDataStatus = true; this.loadDataStatus = true;
} }
@ -263,7 +259,6 @@ submitPersonalForm(formData:any) {
"co_applicant_details":co_applicantDetails, "co_applicant_details":co_applicantDetails,
"personal_info_form_remark": this._personalForm.get('personal_info_form_remark').value "personal_info_form_remark": this._personalForm.get('personal_info_form_remark').value
}; };
console.log(save_details);
this.qustCat.saveForm(save_details).subscribe(result => { this.qustCat.saveForm(save_details).subscribe(result => {
if (result['dataStatus']==true) { if (result['dataStatus']==true) {
this.navCtrl.pop(); this.navCtrl.pop();

View File

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

View File

@ -49,7 +49,6 @@ export class PdQuestionPage {
qustType:any; 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) { 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(); this.screenWidth_px=platform.width();
@ -67,7 +66,6 @@ export class PdQuestionPage {
} }
ionViewDidLoad() { ionViewDidLoad() {
// console.log('ionViewDidLoad GoogleplaytabPage');
} }
ionViewDidEnter() { ionViewDidEnter() {
this.SwipedTabsIndicator = document.getElementById("indicator"); this.SwipedTabsIndicator = document.getElementById("indicator");
@ -83,21 +81,15 @@ export class PdQuestionPage {
scrollIndicatiorTab() scrollIndicatiorTab()
{ {
//console.log(1);
this.ItemsTitles.scrollTo(this.calculateDistanceToSpnd(this.SwipedTabsSlider.getActiveIndex())-this.screenWidth_px/2,0); 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; // let answerDetails = this.questionAnswer.value;
// console.log(answerDetails);
// let remarks = this.questionanotherData.value; // let remarks = this.questionanotherData.value;
if(this.isLeft) if(this.isLeft)
{ {
console.log(this.isLeft);
//this.prev(answerDetails,remarks,this.questionDetails); //this.prev(answerDetails,remarks,this.questionDetails);
} }
if(this.isRight) if(this.isRight)
{ {
console.log(this.isRight);
//this.saveQuestionDetails(answerDetails,remarks,this.questionDetails); //this.saveQuestionDetails(answerDetails,remarks,this.questionDetails);
} }
} }
@ -181,9 +173,7 @@ export class PdQuestionPage {
getpdQuestionDetails() getpdQuestionDetails()
{ {
this.questionDetails = this.navParams.get('questionDetails'); this.questionDetails = this.navParams.get('questionDetails');
console.log('157',this.questionDetails);
this.pdinfo = this.navParams.get('pdDetails'); this.pdinfo = this.navParams.get('pdDetails');
console.log(this.pdinfo);
for(let qustimage of this.questionDetails.questions) for(let qustimage of this.questionDetails.questions)
{ {
if(qustimage.images !==undefined){ 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++){ for(let i=1;i<=this.questionDetails.questions_count;i++){
let j = i.toString(); let j = i.toString();
this.tabs.push(j); this.tabs.push(j);
@ -231,10 +219,7 @@ getquestionAnswer(answers)
// count = 0; // count = 0;
getDocUpload(qustid) getDocUpload(qustid)
{ {
//console.log('right',this.isRight,'left',this.isLeft);
// this.docqustid = qustId; // this.docqustid = qustId;
// console.log(this.count);
// console.log(qustid);
this.camera.getpicture().then(res=> this.camera.getpicture().then(res=>
{ {
if(res !== undefined){ if(res !== undefined){
@ -256,16 +241,13 @@ getquestionAnswer(answers)
} }
saveQuestionDetails(answerDetails,questionRemarks,questionDetails) saveQuestionDetails(answerDetails,questionRemarks,questionDetails)
{ {
console.log(answerDetails);
//console.log(this.docArray);
for(let docs of this.docArray) for(let docs of this.docArray)
{ {
if(docs.pd_document_title !='' && docs.pd_document_title != null && docs.pd_document_title !== undefined){ if(docs.pd_document_title !='' && docs.pd_document_title != null && docs.pd_document_title !== undefined){
//alert(); //alert();
this.imageArray.push({'pd_document_name':docs.pd_document_name,'pd_document_title':docs.pd_document_title}); this.imageArray.push({'pd_document_name':docs.pd_document_name,'pd_document_title':docs.pd_document_title});
console.log('if');
// return true; // return true;
}else }else
{ {
@ -274,14 +256,11 @@ getquestionAnswer(answers)
} }
} }
//console.log(answerDetails.answerDetails);
if(answerDetails.answerDetails !=null){ if(answerDetails.answerDetails !=null){
//alert('answers'); //alert('answers');
console.log(this.imageArray);
let pd_id = this.pdinfo.pd_id; let pd_id = this.pdinfo.pd_id;
let catid = questionDetails.fk_question_category_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]; 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 qut_id = qt_id.fk_question_id;
let qustName = qt_id.question; let qustName = qt_id.question;
let qut_weightage = qt_id.question_weightage; let qut_weightage = qt_id.question_weightage;
@ -333,7 +312,6 @@ getquestionAnswer(answers)
}; };
//console.log(this.docArray);
// this.qstDetails.saveQusetion(saveRecords).subscribe(res=> // this.qstDetails.saveQusetion(saveRecords).subscribe(res=>
// { // {
@ -342,7 +320,6 @@ getquestionAnswer(answers)
// this.SwipedTabsSlider.slideNext(); // this.SwipedTabsSlider.slideNext();
// this.docArray = []; // this.docArray = [];
// this.getcategoryList(qt_id,pd_id); // this.getcategoryList(qt_id,pd_id);
// console.log(this.docArray);
// } // }
// }) // })
// }else // }else
@ -354,7 +331,6 @@ getquestionAnswer(answers)
getcategoryList(qustinfo,pdId) 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 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; let answerData:any;
@ -365,13 +341,10 @@ getquestionAnswer(answers)
{ {
// answerData = answerData.records; // 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]; // let eachquestion = this.questionDetails.questions.filter(qust=>qust.question_id == answerData.question_id)[0];
// eachquestion['answers'] = answerData.answers; // eachquestion['answers'] = answerData.answers;
// this.questionDetails = // this.questionDetails =
// console.log(this.questionDetails);
// this.imageArray = answerData.images; // this.imageArray = answerData.images;
// for(let docs of this.imageArray) // for(let docs of this.imageArray)
// { // {
@ -382,14 +355,12 @@ getquestionAnswer(answers)
}); });
} }
prev(answerDetails,questionRemarks,questionDetails) { prev(answerDetails,questionRemarks,questionDetails) {
//console.log(this.docArray);
for(let docs of this.docArray) for(let docs of this.docArray)
{ {
if(docs.pd_document_title !='' && docs.pd_document_title != null && docs.pd_document_title !== undefined){ if(docs.pd_document_title !='' && docs.pd_document_title != null && docs.pd_document_title !== undefined){
//alert(); //alert();
this.imageArray.push({'pd_document_name':docs.pd_document_name,'pd_document_title':docs.pd_document_title}); this.imageArray.push({'pd_document_name':docs.pd_document_name,'pd_document_title':docs.pd_document_title});
console.log('if');
// return true; // return true;
}else }else
{ {
@ -398,14 +369,11 @@ getquestionAnswer(answers)
} }
} }
//console.log(answerDetails.answerDetails);
if(answerDetails.answerDetails !=null){ if(answerDetails.answerDetails !=null){
//alert('answers'); //alert('answers');
console.log(this.imageArray);
let pd_id = this.pdinfo.pd_id; let pd_id = this.pdinfo.pd_id;
let catid = questionDetails.fk_question_category_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]; 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 qut_id = qt_id.fk_question_id;
let qustName = qt_id.question; let qustName = qt_id.question;
let qut_weightage = qt_id.question_weightage; let qut_weightage = qt_id.question_weightage;
@ -457,7 +425,6 @@ getquestionAnswer(answers)
}; };
//console.log(this.docArray);
this.qstDetails.saveQusetion(saveRecords).subscribe(res=> this.qstDetails.saveQusetion(saveRecords).subscribe(res=>
{ {
@ -466,7 +433,6 @@ getquestionAnswer(answers)
this.SwipedTabsSlider.slidePrev(); this.SwipedTabsSlider.slidePrev();
this.docArray = []; this.docArray = [];
this.getcategoryList(qt_id,pd_id); this.getcategoryList(qt_id,pd_id);
console.log(this.docArray);
} }
}) })
}else{ }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 testapiurl = 'http://ssa.sineedge.com/sparqtest/api/';
let devapiurl = 'http://ssa.sineedge.com/sparqapi/api/'; let devapiurl = 'http://ssa.sineedge.com/sparqapi/api/';
let localapiurl = 'http://192.168.0.9/sparqapi/api/'; let localapiurl = 'http://192.168.0.9/sparqapi/api/';
return devapiurl; return testapiurl;
} }
getcurrentDate() 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> <!DOCTYPE html>
<html lang="en" dir="ltr"> <html lang="en" dir="ltr">
<head> <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"> <meta charset="UTF-8">
<title>Ionic App</title> <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"> <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">