Merge : ps

This commit is contained in:
venbatechnologies@gmail.com 2019-01-17 20:42:55 +05:30
parent 08bc211fc5
commit f54a013a8a
6 changed files with 675 additions and 532 deletions

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,7 @@
</h2>
<mat-dialog-content>
<ng-container *ngIf="waitLoading && existCompanyList.length > 0 ;">
<mat-card *ngFor="let companyList of existCompanyList">
<mat-card-header>
<mat-card-title class="p-text">{{companyList.company_name}}</mat-card-title>
@ -24,6 +25,12 @@
</div>
</mat-card-content>
</mat-card>
</ng-container>
<mat-card *ngIf="waitLoading==false && existCompanyList.length == 0 ;">
<mat-card-content>
<p><strong>Business Related Information is Not Available.Please Check General Information</strong></p>
</mat-card-content>
</mat-card>
</mat-dialog-content>
<notifier-container></notifier-container>

View File

@ -20,6 +20,7 @@ export class BusinessInfoGroupComponent implements OnInit {
existCompanyList: any = [];
pdid: number;
form_id: number;
waitLoading:boolean;
constructor(notifier: NotifierService,
private route: ActivatedRoute,
private router: Router,
@ -27,6 +28,7 @@ export class BusinessInfoGroupComponent implements OnInit {
@Inject(MAT_DIALOG_DATA) public pd_all_details: any, private dialog: MatDialog) {
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
this.form_id = 13;
// this.waitLoading=false;
}
ngOnInit() {
@ -36,6 +38,10 @@ export class BusinessInfoGroupComponent implements OnInit {
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
if(data.dataStatus){
this.existCompanyList = data.records.filter(val =>val.is_active && val.is_company_applicant===true);
this.waitLoading = true;
}
else {
this.waitLoading = false;
}
})
}
@ -44,6 +50,12 @@ export class BusinessInfoGroupComponent implements OnInit {
OnSelectBusinessGroupForms(details: any, company: any) {
this.pd_all_details.company_id =company.company_order_id;
this.pd_all_details.company_name =company.company_name;
this.pd_all_details.business_entity_type=company.business_entity_type;
this.pd_all_details.business_entity_type_other=company.business_entity_type_other;
this.pd_all_details.business_years = company.business_years;
this.pd_all_details.business_month = company.business_month;
if(details.form_id==1){
const dialogRef = this.dialog.open(SupplierInfoComponent, {
data: this.pd_all_details,

View File

@ -1,7 +1,10 @@
<form [formGroup]="businessForm">
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left" style="padding: 10px !important;">{{pageTitle}}</div>
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{pageTitle}}
<!-- {{businessEntityTypeList.business_entity_type_name}} -->
</div>
<div fxFlex="30" align="end" style="padding: 10px !important;">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right" mat-dialog-close><mat-icon>close</mat-icon></button>
@ -17,105 +20,46 @@
<div fxLayout="row wrap">
<div fxFlex="100">
<mat-card>
<mat-card-header>
<mat-card-title>About Business</mat-card-title>
</mat-card-header>
<mat-card-content>
<div flexLayout="row wrap">
<mat-form-field style="width: 45%;">
<mat-select placeholder="Name in Which The Business is Run"
formControlName="profession_name" required>
<mat-option [value]="company.company_name" *ngFor="let company of existCompanyList">{{company.company_name}}</mat-option>
<!-- <mat-option value="Others">Others</mat-option> -->
</mat-select>
</mat-form-field>
<mat-form-field style="width: 45%;" *ngIf="businessForm.controls.profession_name.value=='Others'">
<input matInput placeholder="Name in Which The Business is Run" formControlName="profession_name_other" required>
</mat-form-field>
<mat-form-field style="width: 45%;">
<mat-select placeholder="Business Entity Type"
formControlName="business_entity_type" required>
<mat-option [value]="entity.business_entity_type_id" *ngFor="let entity of businessEntityTypeList">{{entity.business_entity_type_name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 45%;" *ngIf="businessForm.controls.business_entity_type.value=='11'">
<input matInput placeholder="Other Business Entity Type" formControlName="business_entity_type_other" required>
</mat-form-field>
<!-- <mat-form-field style="width: 45%">
<mat-select placeholder="Industry"
formControlName="industry">
<mat-option value="{{list.industry_classification_id}}" *ngFor="let list of industryData">{{list.name}}</mat-option>
</mat-select>
</mat-form-field> -->
</div>
<!-- <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field>
<input matInput type="number" placeholder="Business Experience in Year" formControlName="business_years" required min='0'>
</mat-form-field>
<mat-form-field>
<input matInput type="number" placeholder="Business Experience in Month" formControlName="business_month" required min='0' max='12'>
</mat-form-field>
</div> -->
<!--<mat-card>
<mat-card-header>
<p>Designation
</p>
</mat-card-header>
<div formArrayName="designation">
<div *ngFor="let members of businessForm.controls.designation['controls']; let i=index"
[formGroupName]="i">
<mat-card-content class="card">
<mat-form-field>
<input matInput placeholder="Name" formControlName="sec_name" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Designation" formControlName="sec_designation" required>
</mat-form-field>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addDesignation()"
matTooltip="Add More Designation" matTooltipPosition="above" color="primary" *ngIf="i==0">
<mat-icon>add</mat-icon>
</button>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="deleteDesignation(i)"
matTooltip="Delete" matTooltipPosition="above" *ngIf="i>0">
<mat-icon>delete</mat-icon>
</button>
</mat-card-content>
</div>
</div>
</mat-card>-->
</mat-card-content>
</mat-card>
<mat-card>
<mat-card-header>
<mat-card-title>{{businessForm.controls.business_entity_type.value =='11' ? businessForm.controls.business_entity_type_other.value : sourceNames[businessForm.controls.business_entity_type.value]}}</mat-card-title>
<mat-card-title>{{businessEntityTypeList.section_label}}</mat-card-title>
</mat-card-header>
<mat-card-content formArrayName="partners">
<mat-card *ngFor="let members of businessForm.controls.partners['controls']; let i=index"
<div class="tab_class" *ngFor="let members of businessForm.controls.partners['controls']; let i=index"
[formGroupName]="i">
<mat-card-content>
<div fxLayout="row nowrap">
<mat-form-field style="width: 45%;">
<mat-select placeholder="Name" formControlName="partner_name" style="width: 90%;" (selectionChange)="changePartnerGroup(members.value.partner_name,i)" required>
<mat-option *ngFor="let app_par of applicants" [value]="app_par.applicant_name">{{app_par.applicant_name | titlecase}}</mat-option>
<mat-option value="Others">Others</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 45%;" *ngIf="members.value.partner_name=='Others'">
<mat-form-field style="width: 40%;" *ngIf="members.value.partner_name=='Others'">
<input matInput placeholder="Specify Others"
formControlName="partner_other_name" required>
</mat-form-field>
<mat-form-field style="width: 45%;" *ngIf="businessForm.controls.business_entity_type.value!='3' && businessForm.controls.business_entity_type.value!='8' && businessForm.controls.business_entity_type.value!=''">
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="deletePartnerDetails(i)"
matTooltip="Delete" matTooltipPosition="above" *ngIf="i>0">
<mat-icon>delete</mat-icon>
</button>
</div>
<div fxLayout="row nowrap" class="state-margin">
<mat-form-field style="width: 45%;" *ngIf="generalExistEntityType!='4' && generalExistEntityType!='9' && generalExistEntityType.value!=''">
<input matInput placeholder="Share of Profit / Shareholding (%)" (keypress)="keyPress($event)"
formControlName="shareholding">
</mat-form-field>
<p style="padding-left: 2% !important">No of Years in Current Business</p>
<mat-form-field style="width: 45%;">
<mat-select placeholder="Started Business" formControlName="started_business">
<mat-option value="">Select</mat-option>
<mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option>
</mat-select>
</mat-form-field>
</div>
<p style="margin-left: 2% !important">No of Years in Current Business</p>
<div fxLayout="row nowrap" class="state-margin">
<mat-form-field style="width: 20%;">
<input matInput placeholder="Year" formControlName="current_business_experiance_year" (keyup)="getWorkExperience(members.value,i)" required autocomplete="off" (keypress)="keyPress($event)">
</mat-form-field>
@ -126,45 +70,25 @@
<input matInput type="number" placeholder="Total Work Experience"
formControlName="total_business_experiance" (keyup)="getWorkExperience(members.value,i)" required>
</mat-form-field>
<mat-form-field style="width: 82%;" *ngIf="members.value.total_business_previous_experience!=undefined">
</div>
<div fxLayout="row nowrap" *ngIf="members.value.total_business_previous_experience!=undefined">
<mat-form-field style="width: 82%;">
<input matInput placeholder="Previous Work Experience Details"
formControlName="total_business_previous_experience" required>
</mat-form-field>
</div>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addPartnerDetails()"
matTooltip="Add More" matTooltipPosition="above" color="primary" *ngIf="i==0">
<mat-icon>add</mat-icon>
</button>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="deletePartnerDetails(i)"
matTooltip="Delete" matTooltipPosition="above" *ngIf="i>0">
<mat-icon>delete</mat-icon>
</button>
</mat-card-content>
</div>
</mat-card>
</mat-card-content>
<mat-card-actions align="center">
<button type="button" mat-flat-button (click)="addPartnerDetails()"
matTooltip="Add More" matTooltipPosition="above" color="primary">
<strong>Add More {{businessEntityTypeList.section_label}}</strong>
</button>
</mat-card-actions>
</mat-card>
<mat-card>
<mat-card-header>
<mat-card-title>Number of Years For Which The Business Has Been Running</mat-card-title>
</mat-card-header>
<mat-card-content>
<mat-form-field style="width: 20%;">
<input matInput placeholder="Year" formControlName="business_years" required autocomplete="off" (keypress)="keyPress($event)">
<mat-error>Please Enter Correct Year</mat-error>
</mat-form-field>
<mat-form-field style="width: 20%;">
<input matInput type="number" placeholder="Month" formControlName="business_month" required (keypress)="keyPress($event)" (change)="ConvertMonthintoYearforBusiness($event.target.value)">
</mat-form-field>
<mat-form-field style="width: 40%;">
<input matInput [max]="maxDate" [matDatepicker]="picker" formControlName="business_date_object" placeholder="Enter Date of Formation, If Available">
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker touchUi #picker></mat-datepicker>
</mat-form-field>
</mat-card-content>
</mat-card>
<mat-card>
<mat-card-header>
<mat-card-title>Add Other Family Members Involved In Business</mat-card-title>
@ -240,10 +164,10 @@
</mat-table>
</mat-card-content>
<mat-card-actions align="end">
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="otherFamilyMemberDialogue()"
<mat-card-actions align="center">
<button type="button" mat-flat-button (click)="otherFamilyMemberDialogue()"
matTooltip="Add Other Family Members" matTooltipPosition="left" color="primary">
<mat-icon>add</mat-icon>
<strong>Add More Family Members</strong>
</button>
</mat-card-actions>
</mat-card>
@ -307,19 +231,25 @@
</mat-select>
</mat-form-field>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addMoreState(m,'1')" *ngIf="s==0"
matTooltip="Add More State" matTooltipPosition="right" color="primary">
<mat-icon>add</mat-icon>
</button>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeState(m,s,'1')" *ngIf="s>0"
matTooltip="Remove State" matTooltipPosition="right">
<mat-icon>delete</mat-icon>
</button>
</div>
</div>
</div>
<div fxLayout="row" class="tab_class" *ngIf="manufacturing.value.pan_india_options=='No'">
<div fxFlex="100" align="center">
<button type="button" mat-flat-button (click)="addMoreState(m,'1')"
matTooltip="Add More State" matTooltipPosition="right" color="primary">
<strong>Add More State</strong>
</button>
</div>
</div>
</div>
<div *ngIf="manufacturing.value.max_sale_state_name !=undefined" formArrayName="max_sale_state_name">
<div fxLayout="row nowrap" *ngFor="let maxStateList of manufacturing.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
<div fxLayout="row nowrap" class="tab_class" *ngFor="let maxStateList of manufacturing.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
<mat-form-field style="width:84%;">
<mat-select multiple placeholder="Max Sales Done In Which States" formControlName="state_name">
<mat-option *ngFor="let MSL of manufacturing.value.pan_india_options=='Yes' ? stateList : filterMaxSaleState(stateList,manufacturing.value.india_where_sale_done)" [value]="MSL.state_id">
@ -329,7 +259,7 @@
</mat-form-field>
<mat-form-field style="width:84%;" *ngIf="manufacturing.value.pan_india_options=='No'">
<mat-select multiple placeholder="Max Sales Done In Which Cities" formControlName="city_name">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name)" [value]="MCL.city_id">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name,manufacturing.get('india_where_sale_done').value)" [value]="MCL.city_id">
{{MCL.city_name}}
</mat-option>
</mat-select>
@ -355,22 +285,26 @@
<input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required>
</mat-form-field>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addMoreState(m,'2')" *ngIf="c==0"
matTooltip="Add More Country" matTooltipPosition="right" color="primary">
<mat-icon>add</mat-icon>
</button>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeState(m,c,'2')" *ngIf="c>0"
matTooltip="Remove Country" matTooltipPosition="right">
<mat-icon>delete</mat-icon>
</button>
</div>
<div fxLayout="row" class="tab_class">
<div fxFlex="100" align="center">
<button type="button" mat-flat-button (click)="addMoreState(m,'2')"
matTooltip="Add More Country" matTooltipPosition="right" color="primary">
<strong>Add More Country</strong>
</button>
</div>
</div>
</div>
</ng-container>
<ng-container *ngIf="manufacturing.value.countries_where_export_done !=undefined && manufacturing.value.india_where_sale_done !=undefined">
<mat-tab-group>
<mat-tab label="Within India">
<div fxLayout="row nowrap" class="tab_class">
<p>Import</p>
<div fxLayout="row nowrap" class="tab_class state-margin">
<mat-form-field style="width: 35%;" *ngIf="manufacturing.value.pan_india_options !=undefined">
<mat-select formControlName="pan_india_options" placeholder="Is PAN India" (selectionChange)="changePanIndiaOptions(1,m,manufacturing.value.pan_india_options)" required>
<mat-option value="Yes">Yes</mat-option>
@ -394,18 +328,23 @@
</mat-select>
</mat-form-field>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addMoreState(m,'1')" *ngIf="s==0"
matTooltip="Add More State" matTooltipPosition="right" color="primary">
<mat-icon>add</mat-icon>
</button>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeState(m,s,'1')" *ngIf="s>0"
matTooltip="Remove State" matTooltipPosition="right">
<mat-icon>delete</mat-icon>
</button>
</div>
<div fxLayout="row" class="tab_class" *ngIf="manufacturing.get('india_where_sale_done').value.length>0">
<div fxFlex="100" align="center">
<button type="button" mat-flat-button (click)="addMoreState(m,'1')"
matTooltip="Add More State" matTooltipPosition="right" color="primary">
<strong>Add More State</strong>
</button>
</div>
</div>
</div>
<div formArrayName="max_sale_state_name">
<div fxLayout="row nowrap" *ngFor="let maxStateList of manufacturing.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
<div fxLayout="row nowrap" class="tab_class" *ngFor="let maxStateList of manufacturing.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
<mat-form-field style="width:84%;">
<mat-select multiple placeholder="Max Sales Done In Which States" formControlName="state_name">
<mat-option *ngFor="let MSL of manufacturing.value.pan_india_options=='Yes' ? stateList : filterMaxSaleState(stateList,manufacturing.value.india_where_sale_done)" [value]="MSL.state_id">
@ -415,15 +354,15 @@
</mat-form-field>
<mat-form-field style="width:84%;" *ngIf="manufacturing.value.pan_india_options=='No'">
<mat-select multiple placeholder="Max Sales Done In Which Cities" formControlName="city_name">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name)" [value]="MCL.city_id">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name,manufacturing.get('india_where_sale_done').value)" [value]="MCL.city_id">
{{MCL.city_name}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
</mat-tab>
<mat-tab label="Export" formArrayName="countries_where_export_done">
<p>Export</p>
<div formArrayName="countries_where_export_done">
<div fxLayout="row nowrap" class="tab_class" *ngFor="let countryList of manufacturing.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
<mat-form-field style="width:35%;">
<!-- <input matInput placeholder="Countries Where The Export Is Being Done" formControlName="country_name" > -->
@ -437,17 +376,21 @@
<input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required>
</mat-form-field>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addMoreState(m,'2')" *ngIf="c==0"
matTooltip="Add More Country" matTooltipPosition="right" color="primary">
<mat-icon>add</mat-icon>
</button>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeState(m,c,'2')" *ngIf="c>0"
matTooltip="Remove Country" matTooltipPosition="right">
<mat-icon>delete</mat-icon>
</button>
</div>
</mat-tab>
</mat-tab-group>
</div>
<div fxLayout="row" class="tab_class">
<div fxFlex="100" align="center">
<button type="button" mat-flat-button (click)="addMoreState(m,'2')"
matTooltip="Add More Country" matTooltipPosition="right" color="primary">
<strong>Add More Country</strong>
</button>
</div>
</div>
<div fxLayout="row">
<mat-form-field style="width:84%;">
<input matInput placeholder="Export Sale As A % of Total Sales" formControlName="export_sale_of_total_sales">
@ -465,10 +408,10 @@
</mat-card>
</mat-card-content>
<mat-card-actions align="end">
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addMoreManufacturing()"
<mat-card-actions align="center">
<button type="button" mat-flat-button (click)="addMoreManufacturing()"
matTooltip="Add More Manufacturing Details" matTooltipPosition="left" color="primary">
<mat-icon>add</mat-icon>
<strong>Add More Manufacturing Details</strong>
</button>
</mat-card-actions>
</mat-card>
@ -514,18 +457,23 @@
</mat-form-field>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addRetailMoreState(r,'1')" *ngIf="s==0"
matTooltip="Add More State" matTooltipPosition="right" color="primary">
<mat-icon>add</mat-icon>
</button>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeRetailState(r,s,'1')" *ngIf="s>0"
matTooltip="Remove State" matTooltipPosition="right">
<mat-icon>delete</mat-icon>
</button>
</div>
<div fxLayout="row" class="tab_class" *ngIf="retail.value.pan_india_options=='No'">
<div fxFlex="100" align="center">
<button type="button" mat-flat-button (click)="addRetailMoreState(r,'1')"
matTooltip="Add More State" matTooltipPosition="right" color="primary">
<strong>Add More State</strong>
</button>
</div>
</div>
</div>
<div *ngIf="retail.value.max_sale_state_name !=undefined" formArrayName="max_sale_state_name">
<div fxLayout="row nowrap" *ngFor="let maxStateList of retail.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
<div fxLayout="row nowrap" class="tab_class" *ngFor="let maxStateList of retail.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
<mat-form-field style="width:84%;">
<mat-select multiple placeholder="Max Sales Done In Which States" formControlName="state_name">
<mat-option *ngFor="let MSL of retail.value.pan_india_options=='Yes' ? stateList : filterMaxSaleState(stateList,retail.value.india_where_sale_done)" [value]="MSL.state_id">
@ -535,7 +483,7 @@
</mat-form-field>
<mat-form-field style="width:84%;" *ngIf="retail.value.pan_india_options=='No'">
<mat-select multiple placeholder="Max Sales Done In Which Cities" formControlName="city_name">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name)" [value]="MCL.city_id">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name,retail.get('india_where_sale_done').value)" [value]="MCL.city_id">
{{MCL.city_name}}
</mat-option>
</mat-select>
@ -560,23 +508,26 @@
<input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required>
</mat-form-field>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addRetailMoreState(r,'2')" *ngIf="c==0"
matTooltip="Add More Country" matTooltipPosition="right" color="primary">
<mat-icon>add</mat-icon>
</button>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeRetailState(r,c,'2')" *ngIf="c>0"
matTooltip="Remove Country" matTooltipPosition="right">
<mat-icon>delete</mat-icon>
</button>
</div>
<div fxLayout="row" class="tab_class">
<div fxFlex="100" align="center">
<button type="button" mat-flat-button (click)="addRetailMoreState(r,'2')"
matTooltip="Add More Country" matTooltipPosition="right" color="primary">
<strong>Add More Country</strong>
</button>
</div>
</div>
</div>
</ng-container>
<ng-container *ngIf="retail.value.countries_where_export_done !=undefined && retail.value.india_where_sale_done !=undefined">
<mat-tab-group>
<mat-tab label="Within India">
<div fxLayout="row nowrap" class="tab_class">
<p>Import</p>
<div fxLayout="row nowrap" class="tab_class state-margin">
<mat-form-field style="width: 35%;" *ngIf="retail.value.pan_india_options !=undefined">
<mat-select formControlName="pan_india_options" placeholder="Is PAN India" (selectionChange)="changePanIndiaOptions(2,r,retail.value.pan_india_options)" required>
<mat-option value="Yes">Yes</mat-option>
@ -600,18 +551,23 @@
</mat-select>
</mat-form-field>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addRetailMoreState(r,'1')" *ngIf="s==0"
matTooltip="Add More State" matTooltipPosition="right" color="primary">
<mat-icon>add</mat-icon>
</button>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeRetailState(r,s,'1')" *ngIf="s>0"
matTooltip="Remove State" matTooltipPosition="right">
<mat-icon>delete</mat-icon>
</button>
</div>
<div fxLayout="row" class="tab_class" *ngIf="retail.get('india_where_sale_done').value.length>0">
<div fxFlex="100" align="center">
<button type="button" mat-flat-button (click)="addRetailMoreState(r,'1')"
matTooltip="Add More State" matTooltipPosition="right" color="primary">
<strong>Add More State</strong>
</button>
</div>
</div>
</div>
<div formArrayName="max_sale_state_name">
<div fxLayout="row nowrap" *ngFor="let maxStateList of retail.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
<div fxLayout="row nowrap" class="tab_class" *ngFor="let maxStateList of retail.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
<mat-form-field style="width:84%;">
<mat-select multiple placeholder="Max Sales Done In Which States" formControlName="state_name">
<mat-option *ngFor="let MSL of retail.value.pan_india_options=='Yes' ? stateList : filterMaxSaleState(stateList,retail.value.india_where_sale_done)" [value]="MSL.state_id">
@ -621,45 +577,48 @@
</mat-form-field>
<mat-form-field style="width:84%;" *ngIf="retail.value.pan_india_options=='No'">
<mat-select multiple placeholder="Max Sales Done In Which Cities" formControlName="city_name">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name)" [value]="MCL.city_id">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name,retail.get('india_where_sale_done').value)" [value]="MCL.city_id">
{{MCL.city_name}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
</mat-tab>
<mat-tab label="Export" formArrayName="countries_where_export_done">
<div fxLayout="row nowrap" class="tab_class" *ngFor="let countryList of retail.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
<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.country_id">
{{CL.country_name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:45%;">
<input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required>
</mat-form-field>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addRetailMoreState(r,'2')" *ngIf="c==0"
matTooltip="Add More Country" matTooltipPosition="right" color="primary">
<mat-icon>add</mat-icon>
</button>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeRetailState(r,c,'2')" *ngIf="c>0"
matTooltip="Remove Country" matTooltipPosition="right">
<mat-icon>delete</mat-icon>
</button>
</div>
</mat-tab>
</mat-tab-group>
<div fxLayout="row">
<mat-form-field style="width:84%;">
<input matInput placeholder="Export Sale As A % of Total Sales" formControlName="export_sale_of_total_sales">
</mat-form-field>
</div>
<p>Export</p>
<div formArrayName="countries_where_export_done">
<div fxLayout="row nowrap" class="tab_class" *ngFor="let countryList of retail.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
<mat-form-field style="width:35%;">
<mat-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name">
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
{{CL.country_name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:45%;">
<input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required>
</mat-form-field>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeRetailState(r,c,'2')" *ngIf="c>0"
matTooltip="Remove Country" matTooltipPosition="right">
<mat-icon>delete</mat-icon>
</button>
</div>
</div>
<div fxLayout="row" class="tab_class">
<div fxFlex="100" align="center">
<button type="button" mat-flat-button (click)="addRetailMoreState(r,'2')"
matTooltip="Add More Country" matTooltipPosition="right" color="primary">
<strong>Add More Country</strong>
</button>
</div>
</div>
<div fxLayout="row" class="tab_class">
<mat-form-field style="width:84%;">
<input matInput placeholder="Export Sale As A % of Total Sales" formControlName="export_sale_of_total_sales">
</mat-form-field>
</div>
</ng-container>
@ -673,10 +632,10 @@
</mat-card>
</mat-card-content>
<mat-card-actions align="end">
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addMoreRetail()"
<mat-card-actions align="center">
<button type="button" mat-flat-button (click)="addMoreRetail()"
matTooltip="Add More Retail Details" matTooltipPosition="left" color="primary">
<mat-icon>add</mat-icon>
<strong>Add More Retail Details</strong>
</button>
</mat-card-actions>
</mat-card>
@ -723,18 +682,22 @@
</mat-form-field>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addWholesaleMoreState(w,'1')" *ngIf="s==0"
matTooltip="Add More State" matTooltipPosition="right" color="primary">
<mat-icon>add</mat-icon>
</button>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeWholesaleState(w,s,'1')" *ngIf="s>0"
matTooltip="Remove State" matTooltipPosition="right">
<mat-icon>delete</mat-icon>
</button>
</div>
<div fxLayout="row" *ngIf="wholesale.value.pan_india_options=='No'">
<div fxFlex="100" align="center">
<button type="button" mat-flat-button (click)="addWholesaleMoreState(w,'1')"
matTooltip="Add More State" matTooltipPosition="right" color="primary">
<strong>Add More State</strong>
</button>
</div>
</div>
</div>
<div *ngIf="wholesale.value.max_sale_state_name !=undefined" formArrayName="max_sale_state_name">
<div fxLayout="row nowrap" *ngFor="let maxStateList of wholesale.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
<div fxLayout="row nowrap" class="tab_class" *ngFor="let maxStateList of wholesale.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
<mat-form-field style="width:84%;">
<mat-select multiple placeholder="Max Sales Done In Which States" formControlName="state_name">
<mat-option *ngFor="let MSL of wholesale.value.pan_india_options=='Yes' ? stateList : filterMaxSaleState(stateList,wholesale.value.india_where_sale_done)" [value]="MSL.state_id">
@ -744,7 +707,7 @@
</mat-form-field>
<mat-form-field style="width:84%;" *ngIf="wholesale.value.pan_india_options=='No'">
<mat-select multiple placeholder="Max Sales Done In Which Cities" formControlName="city_name">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name)" [value]="MCL.city_id">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name,wholesale.get('india_where_sale_done').value)" [value]="MCL.city_id">
{{MCL.city_name}}
</mat-option>
</mat-select>
@ -781,10 +744,8 @@
</div>
</ng-container>
<ng-container *ngIf="wholesale.value.countries_where_export_done !=undefined && wholesale.value.india_where_sale_done !=undefined">
<mat-tab-group>
<mat-tab label="Within India">
<div fxLayout="row nowrap" class="tab_class">
<p>Import</p>
<div fxLayout="row nowrap" class="tab_class state-margin">
<mat-form-field style="width: 35%;" *ngIf="wholesale.value.pan_india_options !=undefined">
<mat-select formControlName="pan_india_options" placeholder="Is PAN India" (selectionChange)="changePanIndiaOptions(3,w,wholesale.value.pan_india_options)" required>
<mat-option value="Yes">Yes</mat-option>
@ -808,15 +769,21 @@
</mat-select>
</mat-form-field>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addWholesaleMoreState(w,'1')" *ngIf="s==0"
matTooltip="Add More State" matTooltipPosition="right" color="primary">
<mat-icon>add</mat-icon>
</button>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeWholesaleState(w,s,'1')" *ngIf="s>0"
matTooltip="Remove State" matTooltipPosition="right">
<mat-icon>delete</mat-icon>
</button>
</div>
<div fxLayout="row" class="tab_class" *ngIf="wholesale.get('india_where_sale_done').value.length>0">
<div fxFlex="100" align="center">
<button type="button" mat-flat-button (click)="addWholesaleMoreState(w,'1')"
matTooltip="Add More State" matTooltipPosition="right" color="primary">
<strong>Add More State</strong>
</button>
</div>
</div>
</div>
<div formArrayName="max_sale_state_name">
<div fxLayout="row nowrap" *ngFor="let maxStateList of wholesale.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
@ -829,15 +796,15 @@
</mat-form-field>
<mat-form-field style="width:84%;" *ngIf="wholesale.value.pan_india_options=='No'">
<mat-select multiple placeholder="Max Sales Done In Which Cities" formControlName="city_name">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name)" [value]="MCL.city_id">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name,wholesale.get('india_where_sale_done').value)" [value]="MCL.city_id">
{{MCL.city_name}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
</mat-tab>
<mat-tab label="Export" formArrayName="countries_where_export_done">
<p>Export</p>
<div formArrayName="countries_where_export_done">
<div fxLayout="row nowrap" class="tab_class" *ngFor="let countryList of wholesale.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
<mat-form-field style="width:35%;">
<!-- <input matInput placeholder="Countries Where The Export Is Being Done" formControlName="country_name" > -->
@ -851,18 +818,22 @@
<input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required>
</mat-form-field>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addWholesaleMoreState(w,'2')" *ngIf="c==0"
matTooltip="Add More Country" matTooltipPosition="right" color="primary">
<mat-icon>add</mat-icon>
</button>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeWholesaleState(w,c,'2')" *ngIf="c>0"
matTooltip="Remove Country" matTooltipPosition="right">
<mat-icon>delete</mat-icon>
</button>
</div>
</mat-tab>
</mat-tab-group>
<div fxLayout="row">
<div fxLayout="row" class="tab_class">
<div fxFlex="100" align="center">
<button type="button" mat-flat-button (click)="addWholesaleMoreState(w,'2')"
matTooltip="Add More Country" matTooltipPosition="right" color="primary">
<strong>Add More Country</strong>
</button>
</div>
</div>
</div>
<div fxLayout="row" class="tab_class">
<mat-form-field style="width:84%;">
<input matInput placeholder="Export Sale As A % of Total Sales" formControlName="export_sale_of_total_sales">
</mat-form-field>
@ -880,10 +851,10 @@
</mat-card>
</mat-card-content>
<mat-card-actions align="end">
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addMoreWholesale()"
<mat-card-actions align="center">
<button type="button" mat-flat-button (click)="addMoreWholesale()"
matTooltip="Add More Wholesale Details" matTooltipPosition="left" color="primary">
<mat-icon>add</mat-icon>
<strong>Add More Wholesale Details</strong>
</button>
</mat-card-actions>
</mat-card>
@ -928,20 +899,22 @@
</mat-select>
</mat-form-field>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addServiceMoreState(sp,'1')" *ngIf="s==0"
matTooltip="Add More State" matTooltipPosition="right" color="primary">
<mat-icon>add</mat-icon>
</button>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeServiceState(sp,s,'1')" *ngIf="s>0"
matTooltip="Remove State" matTooltipPosition="right">
<mat-icon>delete</mat-icon>
</button>
</div>
<div fxLayout="row" *ngIf="serviceprovider.value.pan_india_options=='No'">
<div fxFlex="100" align="center">
<button type="button" mat-flat-button (click)="addServiceMoreState(sp,'1')"
matTooltip="Add More State" matTooltipPosition="right" color="primary">
<strong>Add More State</strong>
</button>
</div>
</div>
</div>
<div *ngIf="serviceprovider.value.max_sale_state_name !=undefined" formArrayName="max_sale_state_name">
<div fxLayout="row nowrap" *ngFor="let maxStateList of serviceprovider.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
<div fxLayout="row nowrap" class="tab_class" *ngFor="let maxStateList of serviceprovider.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
<mat-form-field style="width:84%;">
<mat-select multiple placeholder="Max Revenue From Services From Which States" formControlName="state_name">
<mat-option *ngFor="let MSL of serviceprovider.value.pan_india_options=='Yes' ? stateList : filterMaxSaleState(stateList,serviceprovider.value.india_where_sale_done)" [value]="MSL.state_id">
@ -951,7 +924,7 @@
</mat-form-field>
<mat-form-field style="width:84%;" *ngIf="serviceprovider.value.pan_india_options=='No'">
<mat-select multiple placeholder="Where Is The Maximum Service Provided" formControlName="city_name">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name)" [value]="MCL.city_id">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name,serviceprovider.get('india_where_sale_done').value)" [value]="MCL.city_id">
{{MCL.city_name}}
</mat-option>
</mat-select>
@ -975,23 +948,26 @@
<mat-form-field style="width:45%;">
<input matInput placeholder="Approx % of Revenue From Service" formControlName="approx_sale" required>
</mat-form-field>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addServiceMoreState(sp,'2')" *ngIf="c==0"
matTooltip="Add More Country" matTooltipPosition="right" color="primary">
<mat-icon>add</mat-icon>
</button>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeServiceState(sp,c,'2')" *ngIf="c>0"
matTooltip="Remove Country" matTooltipPosition="right">
<mat-icon>delete</mat-icon>
</button>
</div>
<div fxLayout="row" class="tab_class">
<div fxFlex="100" align="center">
<button type="button" mat-flat-button (click)="addServiceMoreState(sp,'2')"
matTooltip="Add More Country" matTooltipPosition="right" color="primary">
<strong>Add More Country</strong>
</button>
</div>
</div>
</div>
</ng-container>
<ng-container *ngIf="serviceprovider.value.countries_where_export_done !=undefined && serviceprovider.value.india_where_sale_done !=undefined">
<mat-tab-group>
<mat-tab label="Within India">
<div fxLayout="row nowrap" class="tab_class">
<p>Import</p>
<div fxLayout="row nowrap" class="tab_class state-margin">
<mat-form-field style="width: 35%;" *ngIf="serviceprovider.value.pan_india_options !=undefined">
<mat-select formControlName="pan_india_options" placeholder="Is PAN India" (selectionChange)="changePanIndiaOptions(4,sp,serviceprovider.value.pan_india_options)" required>
<mat-option value="Yes">Yes</mat-option>
@ -1015,19 +991,23 @@
</mat-select>
</mat-form-field>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addServiceMoreState(sp,'1')" *ngIf="s==0"
matTooltip="Add More State" matTooltipPosition="right" color="primary">
<mat-icon>add</mat-icon>
</button>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeServiceState(sp,s,'1')" *ngIf="s>0"
matTooltip="Remove State" matTooltipPosition="right">
<mat-icon>delete</mat-icon>
</button>
</div>
<div fxLayout="row" class="tab_class" *ngIf="serviceprovider.get('india_where_sale_done').value.length>0">
<div fxFlex="100" align="center">
<button type="button" mat-flat-button (click)="addServiceMoreState(sp,'1')"
matTooltip="Add More State" matTooltipPosition="right" color="primary">
<strong>Add More State</strong>
</button>
</div>
</div>
</div>
<div formArrayName="max_sale_state_name">
<div fxLayout="row nowrap" *ngFor="let maxStateList of serviceprovider.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
<div fxLayout="row nowrap" clas="tab_class" *ngFor="let maxStateList of serviceprovider.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
<mat-form-field style="width:84%;">
<mat-select multiple placeholder="Max Revenue From Services From Which States" formControlName="state_name">
<mat-option *ngFor="let MSL of serviceprovider.value.pan_india_options=='Yes' ? stateList : filterMaxSaleState(stateList,serviceprovider.value.india_where_sale_done)" [value]="MSL.state_id">
@ -1037,17 +1017,16 @@
</mat-form-field>
<mat-form-field style="width:84%;" *ngIf="serviceprovider.value.pan_india_options=='No'">
<mat-select multiple placeholder="Where Is The Maximum Service Provided" formControlName="city_name">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name)" [value]="MCL.city_id">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name,serviceprovider.get('india_where_sale_done').value)" [value]="MCL.city_id">
{{MCL.city_name}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
</mat-tab>
<mat-tab label="Export" formArrayName="countries_where_export_done">
<div fxLayout="row nowrap" class="tab_class" *ngFor="let countryList of serviceprovider.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
<p>Export</p>
<div formArrayName="countries_where_export_done">
<div fxLayout="row nowrap" class="tab_class state-margin" *ngFor="let countryList of serviceprovider.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
<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">
@ -1060,18 +1039,22 @@
<input matInput placeholder="Approx % of Revenue From Service" formControlName="approx_sale" required>
</mat-form-field>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addServiceMoreState(sp,'2')" *ngIf="c==0"
matTooltip="Add More Country" matTooltipPosition="right" color="primary">
<mat-icon>add</mat-icon>
</button>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeServiceState(sp,c,'2')" *ngIf="c>0"
matTooltip="Remove Country" matTooltipPosition="right">
<mat-icon>delete</mat-icon>
</button>
</div>
</mat-tab>
</mat-tab-group>
<div fxLayout="row">
<div fxLayout="row" class="tab_class">
<div fxFlex="100" align="center">
<button type="button" mat-flat-button (click)="removeServiceState(sp,c,'2')"
matTooltip="Add More Country" matTooltipPosition="right" color="primary">
<strong>Add More Country</strong>
</button>
</div>
</div>
</div>
<div fxLayout="row" class="tab_class">
<mat-form-field style="width:84%;">
<input matInput placeholder="Export Revenue As A % of Total Revenue" formControlName="export_sale_of_total_sales">
</mat-form-field>
@ -1089,10 +1072,10 @@
</mat-card>
</mat-card-content>
<mat-card-actions align="end">
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addMoreServiceprovider()"
<mat-card-actions align="center">
<button type="button" mat-flat-button (click)="addMoreServiceprovider()"
matTooltip="Add More Service Provider Details" matTooltipPosition="left" color="primary">
<mat-icon>add</mat-icon>
<strong>Add More Service Provider Details</strong>
</button>
</mat-card-actions>
</mat-card>
@ -1111,10 +1094,10 @@
</mat-card>
</mat-card-content>
<mat-card-actions align="end">
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addMoreOthersActivity()"
<mat-card-actions align="center">
<button type="button" mat-flat-button (click)="addMoreOthersActivity()"
matTooltip="Add More Details" matTooltipPosition="left" color="primary">
<mat-icon>add</mat-icon>
Add More Details
</button>
</mat-card-actions>
</mat-card>
@ -1202,70 +1185,13 @@
</mat-form-field> -->
</mat-card-content>
</mat-card>
<mat-card>
<mat-card-header>
<mat-card-title>Investment In Business By Applicants </mat-card-title>
</mat-card-header>
<mat-card-content class="matcard">
<mat-form-field>
<input matInput placeholder="Amount Invested by Applicant" formControlName="invested_amount" (keypress)="keyPress($event)" autocomplete="off">
<!--<mat-hint align="start" style="font-size:70%" *ngIf="businessForm.controls['invested_amount'].value != ''">{{"&#8377;"}} {{InvestedAmountInWords}} Only</mat-hint>-->
</mat-form-field>
<!-- <mat-form-field>
<input matInput placeholder="Monthly Working Capital Needed"
formControlName="working_capital" required>
</mat-form-field> -->
</mat-card-content>
</mat-card>
<mat-card>
<mat-card-header>
<mat-card-title>Location </mat-card-title>
</mat-card-header>
<mat-card-content class="matcards">
<mat-form-field>
<mat-select
placeholder="Is the location of the business / profession suited to the nature of business / service provided? "
formControlName="is_service_provided" required>
<mat-option value="well_suited.">Well Suited.</mat-option>
<mat-option value="fairly_suited">Fairly Suited</mat-option>
<mat-option value="not_suited">Not Suited</mat-option>
</mat-select>
</mat-form-field>
</mat-card-content>
</mat-card>
<!-- <mat-card>
<mat-card-header>
<p>Business Setup
</p>
</mat-card-header>
<mat-card-content class="matcards">
<mat-form-field>
<mat-select placeholder="What is the ownership of the setup ?"
formControlName="ownership_setup" required>
<mat-option value="self_owned">self owned</mat-option>
<mat-option value="rented">Rented</mat-option>
<mat-option value="family_owned">Family Owned</mat-option>
<mat-option value="others">others</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="businessForm.controls['ownership_setup'].value == 'others'">
<input matInput placeholder="Please Specify"
formControlName="ownership_others">
</mat-form-field>
<mat-form-field *ngIf="businessForm.controls['ownership_setup'].value == 'rented'">
<input matInput placeholder="Provide Rent Paid?"
formControlName="rent_paid" (keypress)="keyPress($event)">
</mat-form-field>
</mat-card-content>
</mat-card> -->
<mat-card>
<mat-card-header>
<mat-card-title>Documents Sighted </mat-card-title>
</mat-card-header>
<mat-card-content class="matcard">
<mat-form-field>
<mat-select placeholder="Shop and Eat Act Cert"
<mat-select placeholder="Shop and Est Act Cert"
formControlName="shop_eat_act_cert" required>
<mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option>
@ -1280,7 +1206,7 @@
<mat-option value="not applicable">Not Applicable</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-form-field *ngIf="businessForm.controls['export_import_cert']">
<mat-select placeholder="Export / Import cert"
formControlName="export_import_cert" required>
<mat-option value="yes">Yes</mat-option>
@ -1288,7 +1214,7 @@
<mat-option value="not applicable">Not Applicable</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-form-field *ngIf="businessForm.controls['factory_cert']">
<mat-select placeholder="Factory Cert"
formControlName="factory_cert" required>
<mat-option value="yes">Yes</mat-option>
@ -1296,7 +1222,7 @@
<mat-option value="not applicable">Not Applicable</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-form-field *ngIf="businessForm.controls['practice_cert']">
<mat-select placeholder="Cert of Practice"
formControlName="practice_cert" required>
<mat-option value="yes">Yes</mat-option>
@ -1321,11 +1247,11 @@
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="Do you want to add other documents?"
<mat-select placeholder="Do You Want to Add Other Documents?"
formControlName="other_documents" required>
<mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option>
<mat-option value="not applicable">Not Applicable</mat-option>
<!-- <mat-option value="not applicable">Not Applicable</mat-option> -->
</mat-select>
</mat-form-field>
<div formArrayName="documents" *ngIf="businessForm.controls['other_documents'].value == 'yes'">
@ -1347,6 +1273,22 @@
</div>
</mat-card-content>
</mat-card>
<mat-card>
<mat-card-header>
<mat-card-title>Location </mat-card-title>
</mat-card-header>
<mat-card-content class="matcards">
<mat-form-field>
<mat-select
placeholder="Is the location of the business / profession suited to the nature of business / service provided? "
formControlName="is_service_provided" required>
<mat-option value="well_suited.">Well Suited.</mat-option>
<mat-option value="fairly_suited">Fairly Suited</mat-option>
<mat-option value="not_suited">Not Suited</mat-option>
</mat-select>
</mat-form-field>
</mat-card-content>
</mat-card>
</div>
</div>
</ng-template>

View File

@ -135,7 +135,7 @@ mat-header-cell mat-cell {
margin: 0 10px;
}
.tab_class {
margin-top: 3%;
margin-top: 2%;
}
.state-margin {
margin-left: 2%;

View File

@ -47,9 +47,12 @@ export class BusinessInfoComponent implements OnInit {
applicants: any;
public businessForm: FormGroup;
private notifier: NotifierService;
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 =[];
businessEntityTypeList: any ={
business_entity_type_id:String,
business_entity_type_name:String,
sourcsection_labeleName:String
};
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'};
@ -58,6 +61,11 @@ export class BusinessInfoComponent implements OnInit {
// InvestedAmountInWords:any;
public relationSource= new MatTableDataSource();
displayedColumns = ['family_member_name','relation','relation_to','relationship_with_company','started_business'];
generalExistEntityType:string;
generalExistEntityType_other:string;
generalExistBusinessYear:Number;
generalExistBusinessMonth:Number;
constructor(notifier: NotifierService,
private fb: FormBuilder,
private route: ActivatedRoute,
@ -71,7 +79,10 @@ export class BusinessInfoComponent implements OnInit {
this.pageTitle = this.pd_all_details.company_name;
this.applicants = this.pd_all_details.pdapplicants_detials;
this.form_id = 13;
this.notifier = notifier;
this.notifier = notifier;
this.generalExistEntityType = this.pd_all_details.business_entity_type;
this.generalExistEntityType_other = this.pd_all_details.business_entity_type_other;
}
public viewerOptions: any = {
@ -104,7 +115,6 @@ export class BusinessInfoComponent implements OnInit {
this.getCountryDataList();
this.initBusinessForm();
this.getCompanyRelation();
this.getCompanyListForBusiness();
// const Desgn = <FormArray>this.businessForm.controls['designation'];
// const Partnr = <FormArray>this.businessForm.controls['partners'];
// const otherDoc = <FormArray>this.businessForm.controls['documents'];
@ -114,8 +124,8 @@ export class BusinessInfoComponent implements OnInit {
params.company_id = this.company_id;
this._pd.retriveForm(params).subscribe(data => {
let businessVal = data.records;
// this.inWords(data.records.invested_amount);
let constVal: any;
//const Desgn = <FormArray>this.businessForm.controls['designation'];
const Partnr: any = <FormArray>this.businessForm.controls['partners'];
const otherDoc = <FormArray>this.businessForm.controls['documents'];
@ -237,13 +247,7 @@ export class BusinessInfoComponent implements OnInit {
// dynamically add form group control
if(data.dataStatus){
if(data.records.profession_name.toUpperCase()=='OTHERS'){
this.businessForm.addControl('profession_name_other', new FormControl('', Validators.required));
}
if(data.records.business_entity_type.toUpperCase()=='11'){
this.businessForm.addControl('business_entity_type_other', new FormControl('', Validators.required));
}
if(data.records.seasonality.toUpperCase()=='YES'){
this.businessForm.addControl('peak_period_of_business', new FormControl('', Validators.required));
this.businessForm.addControl('month_of_business_run', new FormControl('', Validators.required)); }
@ -255,6 +259,9 @@ export class BusinessInfoComponent implements OnInit {
return data.records.manufacturing_activity_details[key];
});
if(selectedManufacturing.length > 0) {
// this is for auto generate fields
selectedManufacturing.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('export_import_cert');
selectedManufacturing.length > 0 ? this.businessForm.addControl('factory_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('factory_cert');
selectedManufacturing.forEach((element,index)=>{
manufacturingControl.push(this.createActivity());
if(element.area_of_sale=='Within India'){
@ -317,6 +324,7 @@ export class BusinessInfoComponent implements OnInit {
return data.records.retail_trading_activity_details[key];
});
if(selectedRetail.length > 0) {
selectedRetail.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('export_import_cert');
selectedRetail.forEach((element,index)=>{
retailControl.push(this.createActivity());
if(element.area_of_sale=='Within India'){
@ -376,6 +384,7 @@ export class BusinessInfoComponent implements OnInit {
return data.records.wholesale_trading_activity_details[key];
});
if(selectedWholesale.length > 0) {
selectedWholesale.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('export_import_cert');
selectedWholesale.forEach((element,index)=>{
wholesaleControl.push(this.createActivity());
if(element.area_of_sale=='Within India'){
@ -437,6 +446,8 @@ export class BusinessInfoComponent implements OnInit {
return data.records.service_provider_activity_details[key];
});
if(selectedService.length > 0) {
selectedService.length > 0 ? this.businessForm.addControl('practice_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('practice_cert');
selectedService.forEach((element,index)=>{
serviceProviderControl.push(this.createServiceActivity());
if(element.area_of_sale=='Within India'){
@ -512,7 +523,8 @@ export class BusinessInfoComponent implements OnInit {
else {
businessVal.others_activity_details=[];
}
}
this.businessForm.setValue(businessVal);
} else {
//Desgn.push(this.createDesignation());
@ -536,32 +548,7 @@ export class BusinessInfoComponent implements OnInit {
// load exist company list from master
// this.existCompanyList = this.pd_all_details.pdapplicants_detials.filter(item=>item.company_name!=null).map(mapItem=>mapItem.company_name);
this.businessForm.controls['profession_name'].valueChanges.subscribe(val => {
val.toUpperCase()=='OTHERS' ? this.businessForm.addControl('profession_name_other', new FormControl('', Validators.required)) : this.businessForm.removeControl('profession_name_other');
});
this.businessForm.controls['business_entity_type'].valueChanges.subscribe(val => {
val.toUpperCase()=='11' ? this.businessForm.addControl('business_entity_type_other', new FormControl('', Validators.required)) : this.businessForm.removeControl('business_entity_type_other');
});
this.businessForm.controls['business_date_object'].valueChanges.subscribe(val=>{
let pd_initiation_date:string = this.pd_all_details.pdmaster_details.pd_date_of_initiation.split('/').reverse().join("/");
let selected_date = this.pipe.transform(val, 'yyyy/MM/dd'); ;
let diffInMs: number = Date.parse(pd_initiation_date) - Date.parse(selected_date);
let diff: number = Math.floor(diffInMs / 1000);
diff /= (60 * 60 * 24 * 30);
diff=Math.abs(Math.round(diff));
if(this.businessForm.controls['business_date_object'].value){
this.businessForm.controls['business_years'].setValue(0);
this.businessForm.controls['business_month'].setValue(0);
}
if(diff){
this.businessForm.controls['business_years'].setValue(Math.floor(diff / 12));
this.businessForm.controls['business_month'].setValue(Math.floor(diff % 12));
}
});
// change relation with businees update dat sorce table
this.businessForm.controls['persons_with_relationships'].valueChanges.subscribe(val=>{
let relationControl = <FormArray>this.businessForm.controls['persons_with_relationships'];
@ -582,11 +569,6 @@ export class BusinessInfoComponent implements OnInit {
formid: this.form_id,
company_id: this.company_id,
fk_createdby: this.pdid,
profession_name: [this.company_name, Validators.compose([Validators.required])],
business_entity_type: ['', Validators.compose([Validators.required])],
business_years: ['', Validators.compose([Validators.required])],
business_month: ['', Validators.compose([Validators.required])],
business_date_object: [''],
//industry: [''],
seasonality: ['', Validators.compose([Validators.required])],
//month_of_business_run : [''],
@ -599,7 +581,6 @@ export class BusinessInfoComponent implements OnInit {
officer_total: ['', Validators.compose([Validators.required])],
// officer_permanent: ['', Validators.compose([Validators.required])],
// officer_temporary: ['', Validators.compose([Validators.required])],
invested_amount: ['', Validators.compose([Validators.required])],
//working_capital: ['', Validators.compose([Validators.required])],
is_service_provided: ['', Validators.compose([Validators.required])],
// ownership_setup: ['', Validators.compose([Validators.required])],
@ -607,9 +588,9 @@ export class BusinessInfoComponent implements OnInit {
// rent_paid: [''],
shop_eat_act_cert: ['', Validators.compose([Validators.required])],
gst_Regn_cert: ['', Validators.compose([Validators.required])],
export_import_cert: ['', Validators.compose([Validators.required])],
factory_cert: ['', Validators.compose([Validators.required])],
practice_cert: ['', Validators.compose([Validators.required])],
// export_import_cert: ['', Validators.compose([Validators.required])],
//factory_cert: ['', Validators.compose([Validators.required])],
// practice_cert: ['', Validators.compose([Validators.required])],
pf_regn: ['', Validators.compose([Validators.required])],
esic_regn: ['', Validators.compose([Validators.required])],
other_documents: ['', Validators.compose([Validators.required])],
@ -628,52 +609,60 @@ export class BusinessInfoComponent implements OnInit {
// businees activity type change event
changeBusinessActivity(event: any){
if(event.value.exist_status==true && event.value.type_of_activity_id==1){
if(event.value.exist_status==true && event.value.type_of_activity_id==2){
let manufacturingControl = <FormArray>this.businessForm.controls['manufacturing_activity_details'];
manufacturingControl.controls = [];
manufacturingControl.setValue([]);
manufacturingControl.setValue([]);
}
else if(event.value.exist_status==false && event.value.type_of_activity_id==1){
else if(event.value.exist_status==false && event.value.type_of_activity_id==2){
let manufacturingControl = <FormArray>this.businessForm.controls['manufacturing_activity_details'];
manufacturingControl.push(this.createActivity());
}
if(event.value.exist_status==true && event.value.type_of_activity_id==2){
if(event.value.exist_status==true && event.value.type_of_activity_id==3){
let retailControl = <FormArray>this.businessForm.controls['retail_trading_activity_details'];
retailControl.controls = [];
retailControl.setValue([]);
}
else if(event.value.exist_status==false && event.value.type_of_activity_id==2){
else if(event.value.exist_status==false && event.value.type_of_activity_id==3){
let retailControl = <FormArray>this.businessForm.controls['retail_trading_activity_details'];
retailControl.push(this.createActivity());
}
if(event.value.exist_status==true && event.value.type_of_activity_id==3){
if(event.value.exist_status==true && event.value.type_of_activity_id==4){
let wholesaleControl = <FormArray>this.businessForm.controls['wholesale_trading_activity_details'];
wholesaleControl.controls = [];
wholesaleControl.setValue([]);
}
else if(event.value.exist_status==false && event.value.type_of_activity_id==3){
else if(event.value.exist_status==false && event.value.type_of_activity_id==4){
let wholesaleControl = <FormArray>this.businessForm.controls['wholesale_trading_activity_details'];
wholesaleControl.push(this.createActivity());
}
if(event.value.exist_status==true && event.value.type_of_activity_id==4){
if(event.value.exist_status==true && event.value.type_of_activity_id==5){
let serviceControl = <FormArray>this.businessForm.controls['service_provider_activity_details'];
serviceControl.controls = [];
serviceControl.setValue([]);
}
else if(event.value.exist_status==false && event.value.type_of_activity_id==4){
else if(event.value.exist_status==false && event.value.type_of_activity_id==5){
let serviceControl = <FormArray>this.businessForm.controls['service_provider_activity_details'];
serviceControl.push(this.createServiceActivity());
}
if(event.value.exist_status==true && event.value.type_of_activity_id==5){
if(event.value.exist_status==true && event.value.type_of_activity_id==1){
let othersControl = <FormArray>this.businessForm.controls['others_activity_details'];
othersControl.controls = [];
othersControl.setValue([]);
}
else if(event.value.exist_status==false && event.value.type_of_activity_id==5){
else if(event.value.exist_status==false && event.value.type_of_activity_id==1){
let othersControl = <FormArray>this.businessForm.controls['others_activity_details'];
othersControl.push(this.createOthersActivity());
}
// check activity type for make dosument sighted filed dynamically
this.businessForm.value.manufacturing_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl(this.businessForm.value.export_import_cert, Validators.required)) : this.businessForm.removeControl('export_import_cert');
this.businessForm.value.manufacturing_activity_details.length > 0 ? this.businessForm.addControl('factory_cert', new FormControl(this.businessForm.value.factory_cert, Validators.required)) : this.businessForm.removeControl('factory_cert');
this.businessForm.value.service_provider_activity_details.length > 0 ? this.businessForm.addControl('practice_cert', new FormControl(this.businessForm.value.practice_cert, Validators.required)) : this.businessForm.removeControl('practice_cert');
}
// change area of sale options in manufacturing
changeManufacturingAreaSale(getDetails: any, getIndex){
@ -879,6 +868,7 @@ export class BusinessInfoComponent implements OnInit {
return this.fb.group({
partner_name: ['', Validators.compose([Validators.required])],
shareholding: [''],
started_business: [''],
current_business_experiance_year: ['', Validators.compose([Validators.required])],
current_business_experiance_month: ['', Validators.compose([Validators.required])],
total_business_experiance: ['', Validators.compose([Validators.required])],
@ -1084,10 +1074,16 @@ export class BusinessInfoComponent implements OnInit {
getBusinessEntity() {
let master_name = 'BUSINESSENTITYTYPE';
this._pd.getAllMasterDatas(master_name).subscribe(data => {
data.records.forEach(val => {
this.businessEntityTypeList.push(val);
this.sourceNames[val.business_entity_type_id] = val.section_label
});
let filterList = data.records.filter(val=>val.business_entity_type_id==this.generalExistEntityType);
this.businessEntityTypeList.business_entity_type_id = filterList[0].business_entity_type_id==1;
this.businessEntityTypeList.business_entity_type_name = filterList[0].business_entity_type_id!=1 ? filterList[0].business_entity_type_name : this.generalExistEntityType_other;
this.businessEntityTypeList.section_label = filterList[0].business_entity_type_id!=1 ? filterList[0].section_label : this.generalExistEntityType_other;
// data.records.forEach(val => {
// this.businessEntityTypeList.push(val);
// this.sourceNames[val.business_entity_type_id] = val.section_label
// });
});
}
@ -1215,12 +1211,12 @@ export class BusinessInfoComponent implements OnInit {
else {
control.controls[key].removeControl('total_business_previous_experience')
}
let total ;
if(control.length > 0){
total = control.value.reduce((sum, val) => sum + +val.current_business_experiance_year, 0);
this.businessForm.controls.business_years.setValidators([Validators.required, Validators.min(+total)]);
this.businessForm.controls.business_years.updateValueAndValidity();
}
// let total ;
// if(control.length > 0){
// total = control.value.reduce((sum, val) => sum + +val.current_business_experiance_year, 0);
// this.businessForm.controls.business_years.setValidators([Validators.required, Validators.min(+total)]);
// this.businessForm.controls.business_years.updateValueAndValidity();
// }
}
/** To Convert Month into Year */
@ -1236,18 +1232,6 @@ export class BusinessInfoComponent implements OnInit {
}
ConvertMonthintoYearforBusiness(e){
let business_year = this.businessForm.controls.business_years.value;
let converted_month : number = e%12;
let converted_year : number = e/12;
this.businessForm.controls.business_years.setValue(+business_year + +Math.floor(converted_year));
this.businessForm.controls.business_month.setValue(Math.floor(converted_month));
}
/**
* This Function For validate For Appx. sale based on Type OF Activities
*/
@ -1423,40 +1407,34 @@ export class BusinessInfoComponent implements OnInit {
}
}
filterMaxSaleCities(datasource: any,filterValues:any) {
// console.log('Whole State data',datasource); // Whole State data
// console.log('Filtered state id',filterValues); // Filtered state id
filterMaxSaleCities(datasource: any,filterValues:any,selectedCites: any) {
let existCities: any = selectedCites.filter(cfVal=>cfVal.city_name!='').map(mcVal=>mcVal.city_name);
existCities = [].concat.apply([], existCities);
if(filterValues){
let getOriginalStateList = datasource.map(dval => dval.state_id);
// console.log('Whole State id from Datasources',getOriginalStateList)//Whole State id from Datasources
let setCityFilter = filterValues.map(x => {
let findIndex = getOriginalStateList.indexOf(x);
findIndex = datasource[findIndex].cities;
return findIndex;
});
// console.log('Filtered City Array Based on State Wise',setCityFilter)//Filtered City Array
// console.log('Previous filtered City id List ',this.filterCityList);
let merged = [].concat.apply([], setCityFilter);
let getFilteredCityValues = [].concat.apply([],this.filterCityList.filter(val =>val.city_name).map(mapVal => mapVal.city_name));
let getOriginalCityList = merged.map(dval => dval.city_id);
let Filter: any=[];
Filter = getFilteredCityValues.map(x => {
let findIndex = getOriginalCityList.indexOf(x);
findIndex = merged[findIndex];
// console.log('findIndex',findIndex);
//return findIndex.filter(x => x !== undefined);
// console.log(merged)
if(merged.length>0){
let check: any = merged.filter(function(fVal){
return existCities.some(function(sVal){
return fVal.city_id==sVal;
});
Filter = getFilteredCityValues.filter(x => x !== undefined);
return merged.length > 0 ? merged : [];
//return Filter.length > 0 ? Filter : [];
})
return check;
}
else {
return [];
}
}
else {
return [];
}
}
@ -1475,15 +1453,6 @@ export class BusinessInfoComponent implements OnInit {
// this.InvestedAmountInWords = this._pd.convertNumberToWords(e);
// }
getCompanyListForBusiness(): void{
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
if(data.dataStatus){
this.existCompanyList = data.records.filter(val =>val.is_active && val.company_order_id==this.company_id);
}
})
}
checkTotal(FormData){
// console.log(FormData.value.employees_permanent);
// console.log(FormData.value.employees_temporary);