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
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
<div fxFlex="33">
|
<div fxFlex="33">
|
||||||
<mat-form-field style="width: 80%;">
|
<mat-form-field style="width: 80%;">
|
||||||
<mat-select placeholder="Address Type" formControlName="address_type" required (selectionChange)="selectedAddressType($event.source.triggerValue)">
|
<mat-select placeholder="Address Type" formControlName="address_type" required (selectionChange)="selectedAddressType($event.source.triggerValue)" >
|
||||||
<mat-option value="{{m_addressType.address_type_id}}"
|
<mat-option value="{{m_addressType.address_type_id}}"
|
||||||
*ngFor="let m_addressType of addressData">{{m_addressType.address_type}}
|
*ngFor="let m_addressType of addressData">{{m_addressType.address_type}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
|
|||||||
@ -111,10 +111,12 @@ export class AddressComponent implements OnInit {
|
|||||||
this.getMasterDetails('COMMENTSONLOCALITY',2);
|
this.getMasterDetails('COMMENTSONLOCALITY',2);
|
||||||
//this.getMasterDetails('CUSTOMERBEHAVIOUR',3);review doc s.no 3.e
|
//this.getMasterDetails('CUSTOMERBEHAVIOUR',3);review doc s.no 3.e
|
||||||
this.getMasterDetails('LOCALITY',4);
|
this.getMasterDetails('LOCALITY',4);
|
||||||
this.getMasterDetails('ADDRESSTYPE',5);
|
// this.getMasterDetails('ADDRESSTYPE',5);
|
||||||
this.getMasterDetails('RESIDENCEOWNERSHIP',6);
|
this.getMasterDetails('RESIDENCEOWNERSHIP',6);
|
||||||
this.getMasterDetails('CITY',7);
|
this.getMasterDetails('CITY',7);
|
||||||
|
|
||||||
|
this.getM_Address_Type();
|
||||||
|
|
||||||
this.initAddressForm();
|
this.initAddressForm();
|
||||||
let params: any = {};
|
let params: any = {};
|
||||||
params.pd_id = this.pdid;
|
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 {
|
public initAddressForm(): void {
|
||||||
this.addressForm = this.fb.group({
|
this.addressForm = this.fb.group({
|
||||||
address: [this.pdAddress != '' ? this.pdAddress : '' , Validators.compose([Validators.required])],
|
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){
|
else if(type==4 && val.isactive == 1){
|
||||||
this.localityData.push(val);
|
this.localityData.push(val);
|
||||||
}
|
}
|
||||||
else if(type==5 && val.isactive == 1){
|
// else if(type==5 && val.isactive == 1){
|
||||||
this.addressData.push(val);
|
// this.addressData.push(val);
|
||||||
if(this.CustSegAbbr == 'SENP' || this.CustSegAbbr == 'SEP'){
|
// if(this.CustSegAbbr == 'SENP' || this.CustSegAbbr == 'SEP'){
|
||||||
// console.log(this.CustSegAbbr);
|
// // console.log(this.CustSegAbbr);
|
||||||
// console.log('inside if',this.addressData);
|
// // console.log('inside if',this.addressData);
|
||||||
this.addressData.indexOf("Residence")
|
// this.addressData.indexOf("Residence")
|
||||||
this.addressData.indexOf("Residence cum Office")
|
// this.addressData.indexOf("Residence cum Office")
|
||||||
// console.log('inside if 2',this.addressData);
|
// // console.log('inside if 2',this.addressData);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
else if(type==6 && val.isactive == 1){
|
else if(type==6 && val.isactive == 1){
|
||||||
this.ownerShipData.push(val);
|
this.ownerShipData.push(val);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user