diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html
index 382d4c1c2..b5d903b2f 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html
@@ -1809,6 +1809,31 @@
+
+
+
+ Yes
+ No
+ Not Applicable
+
+ Electricity Bill Required
+
+
+
+
+
+
+ Electricity Bill Image
+
+
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts
index 4418ad9a3..929a96d76 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts
@@ -320,6 +320,7 @@ export class BusinessInfoComponent implements OnInit {
});
if (selectedManufacturing.length > 0) {
// this is for auto generate fields
+ this.businessForm.addControl('eb_bill',new FormControl('',Validators.compose([Validators.required])))
selectedManufacturing.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('export_import_cert');
selectedManufacturing.length > 0 ? this.businessForm.addControl('factory_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('factory_cert');
selectedManufacturing.forEach((element, index) => {
@@ -621,6 +622,7 @@ export class BusinessInfoComponent implements OnInit {
if(data.records.esic_regn =='yes'){ this.businessForm.addControl('esic_regn_pic', new FormControl('')); }else{ this.businessForm.removeControl('esic_regn_pic');}
if(data.records.export_import_cert =='yes'){ this.businessForm.addControl('export_import_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('export_import_cert_pic');}
if(data.records.fire_noc =='yes'){ this.businessForm.addControl('fire_noc_pic', new FormControl('')); }else{ this.businessForm.removeControl('fire_noc_pic');}
+ if(data.records.eb_bill =='yes' && data.records.manufacturing_activity_details.length > 0){ this.businessForm.addControl('eb_bill_pic', new FormControl('')); }else{ this.businessForm.removeControl('eb_bill_pic');}
this.businessForm.patchValue(businessVal);
// console.log('this.businessForm',this.businessForm);
} else {
@@ -717,21 +719,22 @@ export class BusinessInfoComponent implements OnInit {
// businees activity type change event
changeBusinessActivity(event: any) {
-
-
+ console.log(event);
if (event.value.exist_status == true && event.value.type_of_activity_id == 2) {
this.ManufacturingUnChecked = event.value.exist_status;
let manufacturingControl = this.businessForm.controls['manufacturing_activity_details'];
manufacturingControl.controls = [];
manufacturingControl.setValue([]);
+ this.businessForm.removeControl('eb_bill')
}
else if (event.value.exist_status == false && event.value.type_of_activity_id == 2) {
this.ManufacturingUnChecked = event.value.exist_status;
let manufacturingControl = this.businessForm.controls['manufacturing_activity_details'];
manufacturingControl.push(this.createActivity());
-
+ this.businessForm.addControl('eb_bill',new FormControl('',Validators.compose([Validators.required])))
+
}
if (event.value.exist_status == true && event.value.type_of_activity_id == 3) {
@@ -802,6 +805,7 @@ export class BusinessInfoComponent implements OnInit {
if (this.ManufacturingUnChecked || this.ManufacturingUnChecked == undefined && this.RetailedUnChecked || this.RetailedUnChecked == undefined && this.WholeSalesUnChecked || this.WholeSalesUnChecked == undefined && this.ServiceUnChecked || this.ServiceUnChecked == undefined) {
this.ExportFlag = false;
}
+
}
// change area of sale options in manufacturing
changeManufacturingAreaSale(getDetails: any, getIndex) {
@@ -1300,11 +1304,11 @@ export class BusinessInfoComponent implements OnInit {
// add and create person with relationship details
createPersonRelationhip(details: any): FormGroup {
return this.fb.group({
- other_family_relationship_id: [details.other_family_relationship_id, Validators.required],
+ other_family_relationship_id: [details.other_family_relationship_id],
family_member_salutation: [details.family_member_salutation],
- family_member_name: [details.family_member_name, Validators.required],
- relationship_with_company_id: [details.relationship_with_company_id, Validators.required],
- relation_to_id: [details.relation_to_id, Validators.required],
+ family_member_name: [details.family_member_name],
+ relationship_with_company_id: [details.relationship_with_company_id],
+ relation_to_id: [details.relation_to_id],
started_business: [details.started_business],
});
}
@@ -1999,6 +2003,7 @@ export class BusinessInfoComponent implements OnInit {
if(Flag == 7) {event.value =='yes' ? this.businessForm.addControl('esic_regn_pic', new FormControl('')) : this.businessForm.removeControl('esic_regn_pic');}
if(Flag == 3) {event.value =='yes' ? this.businessForm.addControl('export_import_cert_pic', new FormControl('')) : this.businessForm.removeControl('export_import_cert_pic');}
if(Flag == 8) {event.value =='yes' ? this.businessForm.addControl('fire_noc_pic', new FormControl('')) : this.businessForm.removeControl('fire_noc_pic');}
+ if(Flag == 9) {event.value =='yes' ? this.businessForm.addControl('eb_bill_pic', new FormControl('')) : this.businessForm.removeControl('eb_bill_pic');}
}
/* imageCrop(pic) {
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.ts
index b4776d8ce..5c30d39e4 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.ts
@@ -10,7 +10,7 @@ import { bool } from 'aws-sdk/clients/signer';
styleUrls: ['./other-applicant-details.component.scss']
})
export class OtherApplicantDetailsComponent implements OnInit {
- pageTitle: string = "Add Name of Person(s) Met and Individual Loan Applicant(s) ";
+ pageTitle: string = "";
public _OtherForm: FormGroup;
applicantInfo: any = { 'pd_co_applicant_id': "", 'applicant_name': '', 'is_applicant': false, 'is_person_met': false, applicant_title_name: '', age: '', qualification: '', course_name: '' };
titleList: any = [];
@@ -26,11 +26,22 @@ export class OtherApplicantDetailsComponent implements OnInit {
// this.EditGeneralFormData = generalFormData.value;
// this.EditFlag = true;
// }
-
- }
+ console.log("data",this.data)
+ if(this.data.edit_data){
+ this.pageTitle="Update Name of Person(s) Met and Individual Loan Applicant(s) "
+ }
+ else{
+ this.pageTitle="Add Name of Person(s) Met and Individual Loan Applicant(s) "
+ }
+ }
ngOnInit() {
+ if(this.data.edit_data){
+ this.initFormDetails(this.data.previous_value)
+ }
+ else{
this.initFormDetails(null);
+ }
this.getMasterDetails('TITLES', 1);
this.getMasterDetails('EDUQUALIFICATION', 2);
}
@@ -57,6 +68,11 @@ export class OtherApplicantDetailsComponent implements OnInit {
applicant_list: this._fb.array([this.createApplicant(this.applicantInfo)]),
});
}
+ else{
+ this._OtherForm=this._fb.group({
+ applicant_list:this._fb.array([this.createApplicant(this.data.previous_value)])
+ })
+ }
}
// create applicant form array
@@ -64,12 +80,12 @@ export class OtherApplicantDetailsComponent implements OnInit {
return this._fb.group({
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
applicant_title_name: [elementValue.applicant_title_name, Validators.required],
- applicant_name: ['', Validators.required],
- is_applicant: [false],
- is_person_met: [false],
- age: [''],
- qualification: [''],
- course_name: ['']
+ applicant_name: [elementValue.applicant_name || '', Validators.required],
+ is_applicant: [elementValue.is_applicant || false],
+ is_person_met: [elementValue.is_person_met || false],
+ age: [elementValue.age || ''],
+ qualification: [elementValue.qualification || ''],
+ course_name: [elementValue.course_name || '']
});
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html
index da7ceac14..4a1a24c79 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html
@@ -30,10 +30,10 @@
Name
-
-
+ (change)="ApplicantName($event,details.value,i)"> -->
+ {{details.value.applicant_name | titlecase}}
@@ -97,10 +97,10 @@
-
+