pd datails form dynamic get changes : kdk
This commit is contained in:
parent
be208de246
commit
de67d1b911
@ -57,8 +57,8 @@ export class AddressComponent implements OnInit {
|
||||
this.getCustomer();
|
||||
this.initAddressForm();
|
||||
let params: any = {};
|
||||
params.pd_id = '250';
|
||||
params.pd_form_id = '250';
|
||||
params.pd_id = this.pdid;
|
||||
params.pd_form_id = '5';
|
||||
this._pd.retriveForm(params).subscribe(data => {
|
||||
console.log('data', data);
|
||||
const control = <FormArray>this.addressForm.controls['neighbourhood'];
|
||||
@ -175,9 +175,9 @@ export class AddressComponent implements OnInit {
|
||||
records.comment_locality = this.commentlocality.value;
|
||||
records.customer_behaviour = this.commentlocality.value;
|
||||
records.neighbourhood = this.addressForm.controls.neighbourhood.value;
|
||||
records.pdid = '250';
|
||||
records.formid = '250';
|
||||
records.fk_createdby = '250';
|
||||
records.pdid = this.pdid;
|
||||
records.formid = '5';
|
||||
// records.fk_createdby = '250';
|
||||
console.log('params', records);
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
console.log('data', data);
|
||||
|
||||
@ -43,8 +43,8 @@ export class BankingDetailsComponent implements OnInit {
|
||||
this.step = 0;
|
||||
this.initBankingForm();
|
||||
let params: any = {};
|
||||
params.pd_id = '252';
|
||||
params.pd_form_id = '252';
|
||||
params.pd_id = this.pdid;
|
||||
params.pd_form_id = '7';
|
||||
this._pd.retriveForm(params).subscribe(data => {
|
||||
console.log('data', data);
|
||||
const control = <FormArray>this.bankingForm.controls['itemRows'];
|
||||
@ -97,9 +97,9 @@ export class BankingDetailsComponent implements OnInit {
|
||||
return;
|
||||
}
|
||||
let records: any = {};
|
||||
records.pdid = '252';
|
||||
records.formid = '252';
|
||||
records.fk_createdby = '252';
|
||||
records.pdid = this.pdid;
|
||||
records.formid = '7';
|
||||
// records.fk_createdby = '252';
|
||||
records.banking_details = this.bankingForm.controls['itemRows'].value;
|
||||
console.log('data', records);
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
|
||||
@ -63,8 +63,8 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
this.getOccupation();
|
||||
this.initFamilyForm();
|
||||
let params: any = {};
|
||||
params.pd_id = '251';
|
||||
params.pd_form_id = '555';
|
||||
params.pd_id = this.pdid;
|
||||
params.pd_form_id = '6';
|
||||
this._pd.retriveForm(params).subscribe(data => {
|
||||
console.log('data', data);
|
||||
const control = <FormArray>this.familyForm.controls['nonEarningMembers'];
|
||||
@ -211,9 +211,9 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
records.family_members = this.members.value;
|
||||
records.earning_members = this.familyForm.controls['earningMembers'].value;
|
||||
records.non_earning_members = this.familyForm.controls['nonEarningMembers'].value;
|
||||
records.pdid = '251';
|
||||
records.formid = '555';
|
||||
records.fk_createdby = '251';
|
||||
records.pdid = this.pdid;
|
||||
records.formid = '6';
|
||||
// records.fk_createdby = '251';
|
||||
console.log('params', records);
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
console.log('data', data);
|
||||
|
||||
@ -46,49 +46,50 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
||||
// pdFullDetails:any=[];
|
||||
|
||||
// category static form buttons
|
||||
categoryFormButtons: any = [
|
||||
{
|
||||
"form_id": 1,
|
||||
"form_name": "Supplier Details"
|
||||
},
|
||||
{
|
||||
"form_id": 2,
|
||||
"form_name": "Client Details",
|
||||
},
|
||||
{
|
||||
"form_id": 3,
|
||||
"form_name": "Personal Details",
|
||||
},
|
||||
{
|
||||
"form_id":4,
|
||||
"form_name":"Asset Details",
|
||||
},
|
||||
{
|
||||
"form_id": 5,
|
||||
"form_name": "Address"
|
||||
},
|
||||
{
|
||||
"form_id": 6,
|
||||
"form_name": "Family",
|
||||
},
|
||||
{
|
||||
"form_id": 7,
|
||||
"form_name": "Banking",
|
||||
},
|
||||
{
|
||||
"form_id": 8,
|
||||
"form_name": "Current Loan",
|
||||
},
|
||||
{
|
||||
"form_id": 9,
|
||||
"form_name": "Other Income",
|
||||
},
|
||||
{
|
||||
"form_id": 10,
|
||||
"form_name": "Loan Details",
|
||||
},
|
||||
categoryFormButtons: any;
|
||||
// = [
|
||||
// {
|
||||
// "form_id": 1,
|
||||
// "form_name": "Supplier Details"
|
||||
// },
|
||||
// {
|
||||
// "form_id": 2,
|
||||
// "form_name": "Client Details",
|
||||
// },
|
||||
// {
|
||||
// "form_id": 3,
|
||||
// "form_name": "Personal Details",
|
||||
// },
|
||||
// {
|
||||
// "form_id":4,
|
||||
// "form_name":"Asset Details",
|
||||
// },
|
||||
// {
|
||||
// "form_id": 5,
|
||||
// "form_name": "Address"
|
||||
// },
|
||||
// {
|
||||
// "form_id": 6,
|
||||
// "form_name": "Family",
|
||||
// },
|
||||
// {
|
||||
// "form_id": 7,
|
||||
// "form_name": "Banking",
|
||||
// },
|
||||
// {
|
||||
// "form_id": 8,
|
||||
// "form_name": "Current Loan",
|
||||
// },
|
||||
// {
|
||||
// "form_id": 9,
|
||||
// "form_name": "Other Income",
|
||||
// },
|
||||
// {
|
||||
// "form_id": 10,
|
||||
// "form_name": "Loan Details",
|
||||
// },
|
||||
|
||||
];
|
||||
// ];
|
||||
formsCategoryEnable: boolean = false;
|
||||
selectedFormsCategory: any;
|
||||
// create values for status check
|
||||
@ -158,6 +159,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
||||
if (data.status == 200) {
|
||||
this.pdMasterList = data.records.pdmaster_details;
|
||||
this.categoryList = data.records.question_answers;
|
||||
this.categoryFormButtons = data.records.template_forms;
|
||||
let filterApplicantName = data.records.pdapplicants_detials.filter(item => item.applicant_type == 1);
|
||||
this.mainApplicantName = filterApplicantName[0].applicant_name;
|
||||
this.currentPDStatus = data.records.pdmaster_details.pd_status;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user