business : ps
This commit is contained in:
parent
3b6117a0b2
commit
88d6675c60
@ -345,8 +345,8 @@
|
|||||||
{{country}}
|
{{country}}
|
||||||
<!-- <input matInput placeholder="Countries Where The Export Is Being Done" formControlName="country_name" > -->
|
<!-- <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-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name">
|
||||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.state_id">
|
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
|
||||||
{{CL.state_name}}
|
{{CL.country_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -427,8 +427,8 @@
|
|||||||
<mat-form-field style="width:35%;">
|
<mat-form-field style="width:35%;">
|
||||||
<!-- <input matInput placeholder="Countries Where The Export Is Being Done" formControlName="country_name" > -->
|
<!-- <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-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name">
|
||||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.state_id">
|
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
|
||||||
{{CL.state_name}}
|
{{CL.country_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -550,8 +550,8 @@
|
|||||||
<mat-form-field style="width:35%;">
|
<mat-form-field style="width:35%;">
|
||||||
<!-- <input matInput placeholder="Countries Where The Export Is Being Done" formControlName="country_name" > -->
|
<!-- <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-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name">
|
||||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.state_id">
|
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
|
||||||
{{CL.state_name}}
|
{{CL.country_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -634,8 +634,8 @@
|
|||||||
<mat-form-field style="width:35%;">
|
<mat-form-field style="width:35%;">
|
||||||
<!-- <input matInput placeholder="Countries Where The Export Is Being Done" formControlName="country_name" > -->
|
<!-- <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-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name">
|
||||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.state_id">
|
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
|
||||||
{{CL.state_name}}
|
{{CL.country_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -759,8 +759,8 @@
|
|||||||
<mat-form-field style="width:35%;">
|
<mat-form-field style="width:35%;">
|
||||||
<!-- <input matInput placeholder="Countries Where The Export Is Being Done" formControlName="country_name" > -->
|
<!-- <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-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name">
|
||||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.state_id">
|
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
|
||||||
{{CL.state_name}}
|
{{CL.country_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -841,8 +841,8 @@
|
|||||||
<mat-form-field style="width:35%;">
|
<mat-form-field style="width:35%;">
|
||||||
<!-- <input matInput placeholder="Countries Where The Export Is Being Done" formControlName="country_name" > -->
|
<!-- <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-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name">
|
||||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.state_id">
|
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
|
||||||
{{CL.state_name}}
|
{{CL.country_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -966,8 +966,8 @@
|
|||||||
<mat-form-field style="width:35%;">
|
<mat-form-field style="width:35%;">
|
||||||
<!-- <input matInput placeholder="Countries Where Services Are Being Exported" formControlName="country_name" > -->
|
<!-- <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-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name">
|
||||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.state_id">
|
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
|
||||||
{{CL.state_name}}
|
{{CL.country_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -1050,8 +1050,8 @@
|
|||||||
<mat-form-field style="width:35%;">
|
<mat-form-field style="width:35%;">
|
||||||
<!-- <input matInput placeholder="Countries Where Services Are Being Exported" formControlName="country_name" > -->
|
<!-- <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-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name">
|
||||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.state_id">
|
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
|
||||||
{{CL.state_name}}
|
{{CL.country_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|||||||
@ -41,7 +41,67 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
//industryData: any = [];
|
//industryData: any = [];
|
||||||
activityData: any = [];
|
activityData: any = [];
|
||||||
stateList: 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;
|
relativeNames: any;
|
||||||
applicants: any;
|
applicants: any;
|
||||||
public businessForm: FormGroup;
|
public businessForm: FormGroup;
|
||||||
@ -49,6 +109,7 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
existCompanyList: any = [];
|
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=["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 =[];
|
businessEntityTypeList: any =[];
|
||||||
|
filterCityList : any = [];
|
||||||
// this is for automatic bind entitity name for display
|
// 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: 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} = {};
|
sourceNames: {[k: string]: any} = {};
|
||||||
@ -97,7 +158,7 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
//this.getIndustry();
|
//this.getIndustry();
|
||||||
this.getActivity();
|
this.getActivity();
|
||||||
this.getStateCityList();
|
this.getStateCityList();
|
||||||
this.getCountryDataList();
|
//this.getCountryDataList();
|
||||||
this.initBusinessForm();
|
this.initBusinessForm();
|
||||||
this.getCompanyRelation();
|
this.getCompanyRelation();
|
||||||
this.getCompanyListForBusiness();
|
this.getCompanyListForBusiness();
|
||||||
@ -1108,16 +1169,16 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
getCountryDataList(){
|
// getCountryDataList(){
|
||||||
let master_name = 'STATE';
|
// let master_name = 'STATE';
|
||||||
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
// this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||||
data.records.forEach(val => {
|
// data.records.forEach(val => {
|
||||||
if (val.isactive == 1) {
|
// if (val.isactive == 1) {
|
||||||
this.countryDataList.push(val);
|
// this.countryDataList.push(val);
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
// add and create person with relationship details
|
// add and create person with relationship details
|
||||||
createPersonRelationhip(details: any):FormGroup {
|
createPersonRelationhip(details: any):FormGroup {
|
||||||
@ -1217,7 +1278,7 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
validateAppxSales(records){
|
validateAppxSales(records){
|
||||||
|
|
||||||
console.log(records.manufacturing_activity_details.length);
|
//console.log(records.manufacturing_activity_details.length);
|
||||||
|
|
||||||
//this Variable For Validation
|
//this Variable For Validation
|
||||||
let validationFlag : number = 0;
|
let validationFlag : number = 0;
|
||||||
@ -1377,7 +1438,7 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
|
|
||||||
// filter max sale options
|
// filter max sale options
|
||||||
filterMaxSaleState(datasource: any,filterValues:any){
|
filterMaxSaleState(datasource: any,filterValues:any){
|
||||||
console.log('filterMaxSaleState',filterValues);
|
this.filterCityList = filterValues;
|
||||||
if(filterValues){
|
if(filterValues){
|
||||||
let getOriginalStateList = datasource.map(dval => dval.state_id);
|
let getOriginalStateList = datasource.map(dval => dval.state_id);
|
||||||
let getStateValues = filterValues.filter(val =>val.state_name).map(mapVal => mapVal.state_name);
|
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 : [];
|
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){
|
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 setCityFilter = filterValues.map(x => {
|
||||||
let findIndex = getOriginalStateList.indexOf(x);
|
let findIndex = getOriginalStateList.indexOf(x);
|
||||||
findIndex = datasource[findIndex].cities;
|
findIndex = datasource[findIndex].cities;
|
||||||
return findIndex;
|
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);
|
let merged = [].concat.apply([], setCityFilter);
|
||||||
return merged.length > 0 ? merged : [];
|
return merged.length > 0 ? merged : [];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user