business : ps
This commit is contained in:
parent
3b6117a0b2
commit
88d6675c60
@ -345,8 +345,8 @@
|
||||
{{country}}
|
||||
<!-- <input matInput placeholder="Countries Where The Export Is Being Done" formControlName="country_name" > -->
|
||||
<mat-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name">
|
||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.state_id">
|
||||
{{CL.state_name}}
|
||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
|
||||
{{CL.country_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -427,8 +427,8 @@
|
||||
<mat-form-field style="width:35%;">
|
||||
<!-- <input matInput placeholder="Countries Where The Export Is Being Done" formControlName="country_name" > -->
|
||||
<mat-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name">
|
||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.state_id">
|
||||
{{CL.state_name}}
|
||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
|
||||
{{CL.country_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -550,8 +550,8 @@
|
||||
<mat-form-field style="width:35%;">
|
||||
<!-- <input matInput placeholder="Countries Where The Export Is Being Done" formControlName="country_name" > -->
|
||||
<mat-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name">
|
||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.state_id">
|
||||
{{CL.state_name}}
|
||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
|
||||
{{CL.country_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -634,8 +634,8 @@
|
||||
<mat-form-field style="width:35%;">
|
||||
<!-- <input matInput placeholder="Countries Where The Export Is Being Done" formControlName="country_name" > -->
|
||||
<mat-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name">
|
||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.state_id">
|
||||
{{CL.state_name}}
|
||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
|
||||
{{CL.country_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -759,8 +759,8 @@
|
||||
<mat-form-field style="width:35%;">
|
||||
<!-- <input matInput placeholder="Countries Where The Export Is Being Done" formControlName="country_name" > -->
|
||||
<mat-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name">
|
||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.state_id">
|
||||
{{CL.state_name}}
|
||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
|
||||
{{CL.country_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -841,8 +841,8 @@
|
||||
<mat-form-field style="width:35%;">
|
||||
<!-- <input matInput placeholder="Countries Where The Export Is Being Done" formControlName="country_name" > -->
|
||||
<mat-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name">
|
||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.state_id">
|
||||
{{CL.state_name}}
|
||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
|
||||
{{CL.country_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -966,8 +966,8 @@
|
||||
<mat-form-field style="width:35%;">
|
||||
<!-- <input matInput placeholder="Countries Where Services Are Being Exported" formControlName="country_name" > -->
|
||||
<mat-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name">
|
||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.state_id">
|
||||
{{CL.state_name}}
|
||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
|
||||
{{CL.country_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -1050,8 +1050,8 @@
|
||||
<mat-form-field style="width:35%;">
|
||||
<!-- <input matInput placeholder="Countries Where Services Are Being Exported" formControlName="country_name" > -->
|
||||
<mat-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name">
|
||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.state_id">
|
||||
{{CL.state_name}}
|
||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
|
||||
{{CL.country_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
@ -41,7 +41,67 @@ export class BusinessInfoComponent implements OnInit {
|
||||
//industryData: any = [];
|
||||
activityData: any = [];
|
||||
stateList: any = [];
|
||||
countryDataList : any = [];
|
||||
// countryDataList : any = [];
|
||||
|
||||
// let datas = {
|
||||
|
||||
countryDataList : any = [
|
||||
{
|
||||
"country_id": 1,
|
||||
"country_name": "India"
|
||||
},
|
||||
{
|
||||
"country_id": 2,
|
||||
"country_name": "China"
|
||||
},
|
||||
{
|
||||
"country_id": 3,
|
||||
"country_name": "U.S.A"
|
||||
},{
|
||||
"country_id": 5,
|
||||
"country_name": "Afghanistan"
|
||||
},{
|
||||
"country_id": 6,
|
||||
"country_name": "Albania "
|
||||
},{
|
||||
"country_id": 7,
|
||||
"country_name": "Algeria "
|
||||
},{
|
||||
"country_id": 8,
|
||||
"country_name": "Andorra "
|
||||
},{
|
||||
"country_id": 8,
|
||||
"country_name": "Angola "
|
||||
},{
|
||||
"country_id": 9,
|
||||
"country_name": "Antigua "
|
||||
},{
|
||||
"country_id": 10,
|
||||
"country_name": "Argentina"
|
||||
},{
|
||||
"country_id": 11,
|
||||
"country_name": "Armenia "
|
||||
},{
|
||||
"country_id": 12,
|
||||
"country_name": "Australia "
|
||||
},{
|
||||
"country_id": 13,
|
||||
"country_name": "Austria "
|
||||
},{
|
||||
"country_id": 14,
|
||||
"country_name": "Azerbaijan"
|
||||
},{
|
||||
"country_id": 15,
|
||||
"country_name": "Bahamas "
|
||||
},{
|
||||
"country_id": 16,
|
||||
"country_name": "Bahrain "
|
||||
},{
|
||||
"country_id": 4,
|
||||
"country_name":"Bangladesh"}
|
||||
];
|
||||
|
||||
|
||||
relativeNames: any;
|
||||
applicants: any;
|
||||
public businessForm: FormGroup;
|
||||
@ -49,6 +109,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
existCompanyList: any = [];
|
||||
// businessEntityTypeList: any=["Private Limited Company","Proprietorship","Partnership","Limited Liability Partnership (LLP)","One Person Company (OPC)","Hindu Undivided Family (HUF)","Society","Cooperative","Trust","Public Ltd Company","Others"]
|
||||
businessEntityTypeList: any =[];
|
||||
filterCityList : any = [];
|
||||
// this is for automatic bind entitity name for display
|
||||
//sourceNames: any = {"Private Limited Company": 'Director / Shareholder Details',"Proprietorship": 'Proprietor Details', "Sole Proprietorship": 'Proprietor Details',"Partnership": 'Partner Details',"Limited Liability Partnership (LLP)": 'Partner Details',"One Person Company (OPC)": 'Director Details',"Hindu Undivided Family (HUF)": 'Karta Details',"Society": 'Member Details',"Cooperative": 'Member Details',"Trust": 'Trustee Details',"Public Ltd Company": 'Director / Shareholder Details','Individual':'Self',"Others": 'Other Enitity Details'};
|
||||
sourceNames: {[k: string]: any} = {};
|
||||
@ -97,7 +158,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
//this.getIndustry();
|
||||
this.getActivity();
|
||||
this.getStateCityList();
|
||||
this.getCountryDataList();
|
||||
//this.getCountryDataList();
|
||||
this.initBusinessForm();
|
||||
this.getCompanyRelation();
|
||||
this.getCompanyListForBusiness();
|
||||
@ -1108,16 +1169,16 @@ export class BusinessInfoComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
getCountryDataList(){
|
||||
let master_name = 'STATE';
|
||||
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||
data.records.forEach(val => {
|
||||
if (val.isactive == 1) {
|
||||
this.countryDataList.push(val);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
// getCountryDataList(){
|
||||
// let master_name = 'STATE';
|
||||
// this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||
// data.records.forEach(val => {
|
||||
// if (val.isactive == 1) {
|
||||
// this.countryDataList.push(val);
|
||||
// }
|
||||
// })
|
||||
// });
|
||||
// }
|
||||
|
||||
// add and create person with relationship details
|
||||
createPersonRelationhip(details: any):FormGroup {
|
||||
@ -1217,7 +1278,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
*/
|
||||
validateAppxSales(records){
|
||||
|
||||
console.log(records.manufacturing_activity_details.length);
|
||||
//console.log(records.manufacturing_activity_details.length);
|
||||
|
||||
//this Variable For Validation
|
||||
let validationFlag : number = 0;
|
||||
@ -1377,7 +1438,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
|
||||
// filter max sale options
|
||||
filterMaxSaleState(datasource: any,filterValues:any){
|
||||
console.log('filterMaxSaleState',filterValues);
|
||||
this.filterCityList = filterValues;
|
||||
if(filterValues){
|
||||
let getOriginalStateList = datasource.map(dval => dval.state_id);
|
||||
let getStateValues = filterValues.filter(val =>val.state_name).map(mapVal => mapVal.state_name);
|
||||
@ -1389,15 +1450,36 @@ export class BusinessInfoComponent implements OnInit {
|
||||
return setStateFilter.length > 0 ? setStateFilter : [];
|
||||
}
|
||||
}
|
||||
// filter max sale cities options
|
||||
filterMaxSaleCities(datasource: any,filterValues:any) {
|
||||
|
||||
filterMaxSaleCities(datasource: any,filterValues:any) {
|
||||
// console.log(datasource);
|
||||
if(filterValues){
|
||||
let getOriginalStateList = datasource.map(dval => dval.state_id);
|
||||
let getOriginalStateList = datasource.map(dval => dval.state_id);//only stateid have this
|
||||
let setCityFilter = filterValues.map(x => {
|
||||
let findIndex = getOriginalStateList.indexOf(x);
|
||||
findIndex = datasource[findIndex].cities;
|
||||
return findIndex;
|
||||
});
|
||||
|
||||
//console.log(this.filterCityList);
|
||||
//let temp = this.filterCityList.filter(val =>val.city_name).map(mapVal => mapVal.city_name)
|
||||
//console.log('temp',temp);
|
||||
let getFilteredCityValues = [].concat.apply([],this.filterCityList.filter(val =>val.city_name).map(mapVal => mapVal.city_name));
|
||||
|
||||
// console.log('asd',getFilteredCityValues);
|
||||
// console.log(setCityFilter);
|
||||
|
||||
// let setStateFilter2: any=[];
|
||||
// setStateFilter2 = getFilteredCityValues.map(x => {
|
||||
// let findIndex = setCityFilter.indexOf(x);
|
||||
// return datasource[findIndex];
|
||||
// });
|
||||
// console.log(setStateFilter2);
|
||||
// let setCityFilter2 = getFilteredCityValues.filter(
|
||||
// d => d == setCityFilter.city_id);
|
||||
// console.log(setCityFilter2);
|
||||
// console.log(this.filterCityList.city_name);
|
||||
|
||||
let merged = [].concat.apply([], setCityFilter);
|
||||
return merged.length > 0 ? merged : [];
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user