changes: ps
This commit is contained in:
parent
22896ca1c7
commit
8c0f13c977
398
ng6-seed/package-lock.json
generated
398
ng6-seed/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -111,10 +111,12 @@ export class AddressComponent implements OnInit {
|
||||
this.getMasterDetails('COMMENTSONLOCALITY',2);
|
||||
//this.getMasterDetails('CUSTOMERBEHAVIOUR',3);review doc s.no 3.e
|
||||
this.getMasterDetails('LOCALITY',4);
|
||||
this.getMasterDetails('ADDRESSTYPE',5);
|
||||
// this.getMasterDetails('ADDRESSTYPE',5);
|
||||
this.getMasterDetails('RESIDENCEOWNERSHIP',6);
|
||||
this.getMasterDetails('CITY',7);
|
||||
|
||||
this.getM_Address_Type();
|
||||
|
||||
this.initAddressForm();
|
||||
let params: any = {};
|
||||
params.pd_id = this.pdid;
|
||||
@ -198,6 +200,24 @@ export class AddressComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
getM_Address_Type() {
|
||||
this._pd.getAllMasterDatas('ADDRESSTYPE').subscribe(
|
||||
data => {
|
||||
this.addressData = data.records.filter(data => data.isactive == 1);
|
||||
// console.log(this.addressData);
|
||||
if(this.CustSegAbbr == 'SENP' || this.CustSegAbbr == 'SEP'){
|
||||
|
||||
// console.log('whole',FilteredAddressType);
|
||||
let index1 = this.addressData.map(data => data.address_type).indexOf("Residence");
|
||||
this.addressData.splice(index1, 1);
|
||||
// console.log('FirstOne',FilteredAddressType);
|
||||
let index2 = this.addressData.map(data => data.address_type).indexOf("Residence cum Office");
|
||||
this.addressData.splice(index2, 1);
|
||||
// console.log('SecondOne',FilteredAddressType);
|
||||
}
|
||||
// console.log(this.addressData);
|
||||
})
|
||||
}
|
||||
public initAddressForm(): void {
|
||||
this.addressForm = this.fb.group({
|
||||
address: [this.pdAddress != '' ? this.pdAddress : '' , Validators.compose([Validators.required])],
|
||||
@ -287,16 +307,16 @@ export class AddressComponent implements OnInit {
|
||||
else if(type==4 && val.isactive == 1){
|
||||
this.localityData.push(val);
|
||||
}
|
||||
else if(type==5 && val.isactive == 1){
|
||||
this.addressData.push(val);
|
||||
if(this.CustSegAbbr == 'SENP' || this.CustSegAbbr == 'SEP'){
|
||||
// console.log(this.CustSegAbbr);
|
||||
// console.log('inside if',this.addressData);
|
||||
this.addressData.indexOf("Residence")
|
||||
this.addressData.indexOf("Residence cum Office")
|
||||
// console.log('inside if 2',this.addressData);
|
||||
}
|
||||
}
|
||||
// else if(type==5 && val.isactive == 1){
|
||||
// this.addressData.push(val);
|
||||
// if(this.CustSegAbbr == 'SENP' || this.CustSegAbbr == 'SEP'){
|
||||
// // console.log(this.CustSegAbbr);
|
||||
// // console.log('inside if',this.addressData);
|
||||
// this.addressData.indexOf("Residence")
|
||||
// this.addressData.indexOf("Residence cum Office")
|
||||
// // console.log('inside if 2',this.addressData);
|
||||
// }
|
||||
// }
|
||||
else if(type==6 && val.isactive == 1){
|
||||
this.ownerShipData.push(val);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user