-
@@ -283,7 +281,7 @@
+ formControlName="pd_location">
Select
{{data.description}}
@@ -296,7 +294,7 @@
+ formControlName="comment_locality">
Select
{{data.rating}}
@@ -329,7 +327,7 @@
+ autocomplete="off" >
UOM Required
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts
index 37cdae108..0b725742d 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts
@@ -246,11 +246,32 @@ export class AddressComponent implements OnInit {
address_form_remark: ['']
});
if(this.fk_pd_type == '3' || this.fk_pd_type == '2'){
+ this.addressForm.controls['is_pd_done_on_initiated_address'].clearValidators();
+ this.addressForm.controls['is_pd_done_on_initiated_address'].updateValueAndValidity();
+
+ this.addressForm.controls['address_type'].clearValidators();
+ this.addressForm.controls['address_type'].updateValueAndValidity();
+
+ this.addressForm.controls['locality'].clearValidators();
+ this.addressForm.controls['locality'].updateValueAndValidity();
+
+ this.addressForm.controls['locality_mixuse'].clearValidators();
+ this.addressForm.controls['locality_mixuse'].updateValueAndValidity();
+
+ this.addressForm.controls['pd_location'].clearValidators();
+ this.addressForm.controls['pd_location'].updateValueAndValidity();
+
this.addressForm.controls['pd_location'].clearValidators();
this.addressForm.controls['pd_location'].updateValueAndValidity();
this.addressForm.controls['comment_locality'].clearValidators();
this.addressForm.controls['comment_locality'].updateValueAndValidity();
+
+ this.addressForm.controls['estimated_area'].clearValidators();
+ this.addressForm.controls['estimated_area'].updateValueAndValidity();
+
+ this.addressForm.controls['uom'].clearValidators();
+ this.addressForm.controls['uom'].updateValueAndValidity();
}
if(this.lender_short_name == 'CLIX' || this.prod_catagory == 'BL'){
this.addressForm.removeControl('estimated_area');
@@ -296,7 +317,7 @@ export class AddressComponent implements OnInit {
createAlternativeAddresses(AddressDetails): FormGroup {
if (AddressDetails != null) {
return this.fb.group({
- alternative_address: [this.transformName(AddressDetails.alternative_address), Validators.compose([Validators.required])],
+ alternative_address: [this.transformName(AddressDetails.alternative_address)],
alternative_state: [AddressDetails.alternative_state],
alternative_city: [AddressDetails.alternative_city],
alternative_pincode: [AddressDetails.alternative_pincode],
@@ -305,13 +326,13 @@ export class AddressComponent implements OnInit {
pinSearch:[''],
alternative_pd_address_id:[''],
alternative_pincode_others: [AddressDetails.alternative_pincode_others, Validators.compose([Validators.minLength(6), Validators.maxLength(6)])],
- reason_for_alternative_address: [AddressDetails.reason_for_alternative_address, Validators.compose([Validators.required])],
+ reason_for_alternative_address: [AddressDetails.reason_for_alternative_address],
});
}
else if (AddressDetails == null) {
return this.fb.group({
- alternative_address: ['', Validators.compose([Validators.required])],
+ alternative_address: [''],
alternative_state: [''],
alternative_city: [''],
alternative_pincode: [''],
@@ -320,9 +341,11 @@ export class AddressComponent implements OnInit {
pinSearch:[''],
alternative_pd_address_id: [''],
alternative_pincode_others:['', Validators.compose([Validators.minLength(6), Validators.maxLength(6)])],
- reason_for_alternative_address: ['', Validators.compose([Validators.required])],
+ reason_for_alternative_address: [''],
});
}
+
+
}
// addAddresses() {
@@ -395,11 +418,17 @@ export class AddressComponent implements OnInit {
this.addressForm.addControl('alternative_addresses', this.fb.array([]));
const alternative_address_control = this.addressForm.controls['alternative_addresses'];
alternative_address_control.push(this.createAlternativeAddresses(null));
+ if(this.fk_pd_type != '2'){
+ alternative_address_control.at(0)['controls'].reason_for_alternative_address.setValidators(Validators.required);
+ alternative_address_control.at(0)['controls'].alternative_address.setValidators(Validators.required);
+
+ }
}
else if (e === true) {
// console.log('alternativeAddress',e);
this.addressForm.removeControl('alternative_addresses');
}
+
}
// Add and Remove The SpecifyOthers Field
@@ -831,6 +860,11 @@ export class AddressComponent implements OnInit {
}
this.getCityAndPincodeDetails(datas.alternative_state, index, 2);
alternative_address_control.push(this.createAlternativeAddresses(obj));
+ if(this.fk_pd_type != '2'){
+ alternative_address_control.at(0)['controls'].reason_for_alternative_address.setValidators(Validators.required);
+ alternative_address_control.at(0)['controls'].alternative_address.setValidators(Validators.required);
+
+ }
this.setOthers(+datas.alternative_pincode, index, 2);
if(datas.alternative_pincode == 1) {
let AltCtrl: any = alternative_address_control.controls[index];
@@ -927,6 +961,11 @@ export class AddressComponent implements OnInit {
alternative_address_control.removeAt(0);
}
alternative_address_control.push(this.createAlternativeAddresses(obj));
+ if(this.fk_pd_type != '2'){
+ alternative_address_control.at(0)['controls'].reason_for_alternative_address.setValidators(Validators.required);
+ alternative_address_control.at(0)['controls'].alternative_address.setValidators(Validators.required);
+
+ }
this.setOthers(+datas.alternative_pincode, index, 2);
if(datas.alternative_pincode == 1) {
let AltCtrl: any = alternative_address_control.controls[index];
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 940482b11..03653e846 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
@@ -1603,12 +1603,12 @@
-
-
+
+
No of Employees Sighted By PD Officer During His Visit
Company Name Board
-
+
Total Required
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.ts
index 8fac62b43..e45d3b7f0 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.ts
@@ -133,6 +133,8 @@ pdf(fileURL){
this.getMasterDetails('RELATIONWITHBUSINESS',1);
this.getMasterDetails('FREQUENCY',2);
+
+
}
// load form data
@@ -362,17 +364,20 @@ pdf(fileURL){
Ncnt++;
}
}
-
+ if(this.fk_pd_type != '2'){
this._neighbourhoodForm.controls.neighbourhood_status.setValidators([Validators.required]);
this._neighbourhoodForm.controls.neighbourhood_status.updateValueAndValidity();
- if(this._neighbourhoodForm.controls.neighbourhood_status.value != 'Positive'){
- this._neighbourhoodForm.controls.neighbour_reference_remark.setValidators([Validators.required]);
- this._neighbourhoodForm.controls.neighbour_reference_remark.updateValueAndValidity();
- }
- else{
- this._neighbourhoodForm.controls.neighbour_reference_remark.clearValidators();
- this._neighbourhoodForm.controls.neighbour_reference_remark.updateValueAndValidity();
- }
+
+
+ if(this._neighbourhoodForm.controls.neighbourhood_status.value != 'Positive'){
+ this._neighbourhoodForm.controls.neighbour_reference_remark.setValidators([Validators.required]);
+ this._neighbourhoodForm.controls.neighbour_reference_remark.updateValueAndValidity();
+ }
+ else{
+ this._neighbourhoodForm.controls.neighbour_reference_remark.clearValidators();
+ this._neighbourhoodForm.controls.neighbour_reference_remark.updateValueAndValidity();
+ }
+ }
// }
// if(formData.check_type==1){
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.ts
index 42dad9bd8..e17488041 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.ts
@@ -261,7 +261,7 @@ export class QueriesDocsComponent implements OnInit {
let control:any=this.docsCollectedForm.controls['docs_to_be_sighted']
this.docs_array_value.forEach((data,index)=>{
control.push(this.createDocsArray(data))
- control.controls[index].addControl(data.pd_doc_to_be_collect_id,new FormControl('',Validators.required))
+ control.controls[index].addControl(data.pd_doc_to_be_collect_id,new FormControl('',this.fk_pd_type != '2' ? Validators.required : []))
})
}
}
@@ -415,14 +415,14 @@ export class QueriesDocsComponent implements OnInit {
if(value == 'yes'){
// this.camera_btn[index]=true
control.controls[index].removeControl('reason')
- control.controls[index].addControl('img',new FormControl('',Validators.required))
+ control.controls[index].addControl('img',new FormControl(''))
// control.controls[index].addControl('is_new',new FormControl('',Validators.required))
}
else if(value == 'no'){
// this.camera_btn[index]=false
control.controls[index].removeControl('img')
control.controls[index].removeControl('is_new')
- control.controls[index].addControl('reason',new FormControl('',Validators.required));
+ control.controls[index].addControl('reason',new FormControl('',this.fk_pd_type != '2' ? Validators.required : []));
}
}