business form changes

This commit is contained in:
gandhimathi 2019-01-22 15:10:15 +05:30
parent 216ca42eca
commit 9fb74aa682
2 changed files with 119 additions and 100 deletions

View File

@ -62,13 +62,15 @@
<mat-form-field style="width: 20%;"> <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)"> <input matInput placeholder="Year" formControlName="current_business_experiance_year" (keyup)="getWorkExperience(members.value,i)" required autocomplete="off" (keypress)="keyPress($event)">
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 21%;"> <mat-form-field style="width: 21%;">
<input matInput placeholder="Month" formControlName="current_business_experiance_month" required (keypress)="keyPress($event)" (change)="ConvertMonthintoYear(members,$event.target.value)" autocomplete="off"> <input matInput placeholder="Month" formControlName="current_business_experiance_month" (keypress)="keyPress($event)" (change)="ConvertMonthintoYear(members,$event.target.value)" autocomplete="off">
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 35%;"> <mat-form-field style="width: 35%;">
<input matInput type="number" placeholder="Total Work Experience" <input matInput placeholder="Total Work Experience"
formControlName="total_business_experiance" (keyup)="getWorkExperience(members.value,i)" required> formControlName="total_business_experiance" (keypress)="keyPress($event)" (keyup)="getWorkExperience(members.value,i)" autocomplete="off" required>
</mat-form-field> </mat-form-field>
</div> </div>
<div fxLayout="row nowrap" *ngIf="members.value.total_business_previous_experience!=undefined"> <div fxLayout="row nowrap" *ngIf="members.value.total_business_previous_experience!=undefined">
@ -251,14 +253,16 @@
<div *ngIf="manufacturing.value.max_sale_state_name !=undefined" formArrayName="max_sale_state_name"> <div *ngIf="manufacturing.value.max_sale_state_name !=undefined" formArrayName="max_sale_state_name">
<div fxLayout="row nowrap" class="tab_class" *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-form-field style="width:84%;">
<mat-select multiple placeholder="Max Sales Done In Which States" formControlName="state_name"> <mat-label>States Where Max Sales Done for {{manufacturing.value.main_products}}</mat-label>
<mat-select multiple placeholder="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"> <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">
{{MSL.state_name}} {{MSL.state_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:84%;" *ngIf="manufacturing.value.pan_india_options=='No'"> <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-label>Cities Where Max Sales Done for {{manufacturing.value.main_products}}</mat-label>
<mat-select multiple placeholder="Cities" formControlName="city_name">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name,manufacturing.get('india_where_sale_done').value)" [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}} {{MCL.city_name}}
</mat-option> </mat-option>
@ -273,9 +277,9 @@
<div fxLayout="row nowrap" *ngFor="let countryList of manufacturing.get('countries_where_export_done').controls; let c = index" [formGroupName]="c"> <div fxLayout="row nowrap" *ngFor="let countryList of manufacturing.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
<mat-form-field style="width:35%;"> <mat-form-field style="width:35%;">
{{country}} <mat-label>Countries Where The Export Is Being Done for {{manufacturing.value.main_products}}</mat-label>
<!-- <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" formControlName="country_name">
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id"> <mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
{{CL.country_name}} {{CL.country_name}}
</mat-option> </mat-option>
@ -303,7 +307,7 @@
</ng-container> </ng-container>
<ng-container *ngIf="manufacturing.value.countries_where_export_done !=undefined && manufacturing.value.india_where_sale_done !=undefined"> <ng-container *ngIf="manufacturing.value.countries_where_export_done !=undefined && manufacturing.value.india_where_sale_done !=undefined">
<p>Import</p> <p>Within India </p>
<div fxLayout="row nowrap" class="tab_class state-margin"> <div fxLayout="row nowrap" class="tab_class state-margin">
<mat-form-field style="width: 35%;" *ngIf="manufacturing.value.pan_india_options !=undefined"> <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-select formControlName="pan_india_options" placeholder="Is PAN India" (selectionChange)="changePanIndiaOptions(1,m,manufacturing.value.pan_india_options)" required>
@ -346,14 +350,16 @@
<div formArrayName="max_sale_state_name"> <div formArrayName="max_sale_state_name">
<div fxLayout="row nowrap" class="tab_class" *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-form-field style="width:84%;">
<mat-select multiple placeholder="Max Sales Done In Which States" formControlName="state_name"> <mat-label>States Where Max Sales Done for {{manufacturing.value.main_products}}</mat-label>
<mat-select multiple placeholder="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"> <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">
{{MSL.state_name}} {{MSL.state_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:84%;" *ngIf="manufacturing.value.pan_india_options=='No'"> <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-label>Cities Where Max Sales Done for {{manufacturing.value.main_products}}</mat-label>
<mat-select multiple placeholder="Cities" formControlName="city_name">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name,manufacturing.get('india_where_sale_done').value)" [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}} {{MCL.city_name}}
</mat-option> </mat-option>
@ -364,15 +370,15 @@
<p>Export</p> <p>Export</p>
<div formArrayName="countries_where_export_done"> <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"> <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%;"> <mat-form-field style="width:55%;">
<!-- <input matInput placeholder="Countries Where The Export Is Being Done" formControlName="country_name" > --> <mat-label>Countries Where The Export Is Being Done for {{manufacturing.value.main_products}}</mat-label>
<mat-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name"> <mat-select placeholder="Countries" formControlName="country_name">
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id"> <mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
{{CL.country_name}} {{CL.country_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:45%;"> <mat-form-field style="width:35%;">
<input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required> <input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required>
</mat-form-field> </mat-form-field>
@ -391,18 +397,14 @@
</button> </button>
</div> </div>
</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">
</mat-form-field>
</div>
</ng-container> </ng-container>
</mat-card-content> </mat-card-content>
<mat-card-actions> <mat-card-actions>
<mat-form-field style="width: 92%"> <mat-form-field style="width: 92%">
<mat-label>Description of Manufacturing Product</mat-label> <mat-label>Description of {{manufacturing.value.main_products}}</mat-label>
<textarea matInput placeholder="Description of Manufacturing Product" formControlName="description"></textarea> <textarea matInput placeholder="Description" formControlName="description"></textarea>
</mat-form-field> </mat-form-field>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>
@ -475,14 +477,18 @@
<div *ngIf="retail.value.max_sale_state_name !=undefined" formArrayName="max_sale_state_name"> <div *ngIf="retail.value.max_sale_state_name !=undefined" formArrayName="max_sale_state_name">
<div fxLayout="row nowrap" class="tab_class" *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-form-field style="width:84%;">
<mat-select multiple placeholder="Max Sales Done In Which States" formControlName="state_name"> <mat-label>States Where Max Sales Done for {{retail.value.main_products}}</mat-label>
<mat-select multiple placeholder="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"> <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">
{{MSL.state_name}} {{MSL.state_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:84%;" *ngIf="retail.value.pan_india_options=='No'"> <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-label>Cities Where Max Sales Done for {{retail.value.main_products}}</mat-label>
<mat-select multiple placeholder="Cities" formControlName="city_name">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name,retail.get('india_where_sale_done').value)" [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}} {{MCL.city_name}}
</mat-option> </mat-option>
@ -496,7 +502,9 @@
<div formArrayName="countries_where_export_done"> <div formArrayName="countries_where_export_done">
<div fxLayout="row nowrap" *ngFor="let countryList of retail.get('countries_where_export_done').controls; let c = index" [formGroupName]="c"> <div fxLayout="row nowrap" *ngFor="let countryList of retail.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
<mat-form-field style="width:35%;"> <mat-form-field style="width:55%;">
<mat-label>Countries Where Export Is Being Done for {{retail.value.main_products}}</mat-label>
<!-- <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.country_id"> <mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
@ -504,7 +512,7 @@
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:45%;"> <mat-form-field style="width:35%;">
<input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required> <input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required>
</mat-form-field> </mat-form-field>
@ -525,7 +533,7 @@
</ng-container> </ng-container>
<ng-container *ngIf="retail.value.countries_where_export_done !=undefined && retail.value.india_where_sale_done !=undefined"> <ng-container *ngIf="retail.value.countries_where_export_done !=undefined && retail.value.india_where_sale_done !=undefined">
<p>Import</p> <p>Within India</p>
<div fxLayout="row nowrap" class="tab_class state-margin"> <div fxLayout="row nowrap" class="tab_class state-margin">
<mat-form-field style="width: 35%;" *ngIf="retail.value.pan_india_options !=undefined"> <mat-form-field style="width: 35%;" *ngIf="retail.value.pan_india_options !=undefined">
@ -569,14 +577,17 @@
<div formArrayName="max_sale_state_name"> <div formArrayName="max_sale_state_name">
<div fxLayout="row nowrap" class="tab_class" *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-form-field style="width:84%;">
<mat-select multiple placeholder="Max Sales Done In Which States" formControlName="state_name"> <mat-label>States Where Max Sales Done for {{retail.value.main_products}}</mat-label>
<mat-select multiple placeholder="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"> <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">
{{MSL.state_name}} {{MSL.state_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:84%;" *ngIf="retail.value.pan_india_options=='No'"> <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-label>Cities Where Max Sales Done for {{retail.value.main_products}}</mat-label>
<mat-select multiple placeholder="Cities" formControlName="city_name">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name,retail.get('india_where_sale_done').value)" [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}} {{MCL.city_name}}
</mat-option> </mat-option>
@ -587,14 +598,16 @@
<p>Export</p> <p>Export</p>
<div formArrayName="countries_where_export_done"> <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"> <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-form-field style="width:55%;">
<mat-label>Countries Where The Export Is Being Done for {{retail.value.main_products}}</mat-label>
<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.country_id"> <mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
{{CL.country_name}} {{CL.country_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:45%;"> <mat-form-field style="width:35%;">
<input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required> <input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required>
</mat-form-field> </mat-form-field>
@ -613,11 +626,7 @@
</button> </button>
</div> </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>
</div>
</ng-container> </ng-container>
@ -625,8 +634,8 @@
</mat-card-content> </mat-card-content>
<mat-card-actions> <mat-card-actions>
<mat-form-field style="width: 92%"> <mat-form-field style="width: 92%">
<mat-label>Description of Retail Trading Product</mat-label> <mat-label>Description of {{retail.value.main_products}}</mat-label>
<textarea matInput placeholder="Description of Retail Trading Product" formControlName="description"></textarea> <textarea matInput placeholder="Description" formControlName="description"></textarea>
</mat-form-field> </mat-form-field>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>
@ -699,14 +708,18 @@
<div *ngIf="wholesale.value.max_sale_state_name !=undefined" formArrayName="max_sale_state_name"> <div *ngIf="wholesale.value.max_sale_state_name !=undefined" formArrayName="max_sale_state_name">
<div fxLayout="row nowrap" class="tab_class" *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-form-field style="width:84%;">
<mat-select multiple placeholder="Max Sales Done In Which States" formControlName="state_name"> <mat-label>States Where Max Sales Done for {{wholesale.value.main_products}}</mat-label>
<mat-select multiple placeholder="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"> <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">
{{MSL.state_name}} {{MSL.state_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:84%;" *ngIf="wholesale.value.pan_india_options=='No'"> <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-label>Cities Where Max Sales Done for {{wholesale.value.main_products}}</mat-label>
<mat-select multiple placeholder="Cities" formControlName="city_name">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name,wholesale.get('india_where_sale_done').value)" [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}} {{MCL.city_name}}
</mat-option> </mat-option>
@ -720,15 +733,15 @@
<div formArrayName="countries_where_export_done"> <div formArrayName="countries_where_export_done">
<div fxLayout="row nowrap" *ngFor="let countryList of wholesale.get('countries_where_export_done').controls; let c = index" [formGroupName]="c"> <div fxLayout="row nowrap" *ngFor="let countryList of wholesale.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
<mat-form-field style="width:35%;"> <mat-form-field style="width:55%;">
<!-- <input matInput placeholder="Countries Where The Export Is Being Done" formControlName="country_name" > --> <mat-label>Countries Where The Export Is Being Done for {{wholesale.value.main_products}}</mat-label>
<mat-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name"> <mat-select placeholder="Countries" formControlName="country_name">
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id"> <mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
{{CL.country_name}} {{CL.country_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:45%;"> <mat-form-field style="width:35%;">
<input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required> <input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required>
</mat-form-field> </mat-form-field>
@ -744,7 +757,7 @@
</div> </div>
</ng-container> </ng-container>
<ng-container *ngIf="wholesale.value.countries_where_export_done !=undefined && wholesale.value.india_where_sale_done !=undefined"> <ng-container *ngIf="wholesale.value.countries_where_export_done !=undefined && wholesale.value.india_where_sale_done !=undefined">
<p>Import</p> <p>Within India</p>
<div fxLayout="row nowrap" class="tab_class state-margin"> <div fxLayout="row nowrap" class="tab_class state-margin">
<mat-form-field style="width: 35%;" *ngIf="wholesale.value.pan_india_options !=undefined"> <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-select formControlName="pan_india_options" placeholder="Is PAN India" (selectionChange)="changePanIndiaOptions(3,w,wholesale.value.pan_india_options)" required>
@ -788,14 +801,18 @@
<div formArrayName="max_sale_state_name"> <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"> <div fxLayout="row nowrap" *ngFor="let maxStateList of wholesale.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
<mat-form-field style="width:84%;"> <mat-form-field style="width:84%;">
<mat-select multiple placeholder="Max Sales Done In Which States" formControlName="state_name"> <mat-label>States Where Max Sales Done for {{wholesale.value.main_products}}</mat-label>
<mat-select multiple placeholder="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"> <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">
{{MSL.state_name}} {{MSL.state_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:84%;" *ngIf="wholesale.value.pan_india_options=='No'"> <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-label>Cities Where Max Sales Done for {{wholesale.value.main_products}}</mat-label>
<mat-select multiple placeholder="Cities" formControlName="city_name">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name,wholesale.get('india_where_sale_done').value)" [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}} {{MCL.city_name}}
</mat-option> </mat-option>
@ -806,15 +823,17 @@
<p>Export</p> <p>Export</p>
<div formArrayName="countries_where_export_done"> <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"> <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%;"> <mat-form-field style="width:55%;">
<!-- <input matInput placeholder="Countries Where The Export Is Being Done" formControlName="country_name" > --> <mat-label>Cities Where Max Sales Done for {{wholesale.value.main_products}}</mat-label>
<mat-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name">
<mat-label>Countries Where The Export Is Being Done for {{wholesale.value.main_products}}</mat-label>
<mat-select placeholder="Countries" formControlName="country_name">
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id"> <mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
{{CL.country_name}} {{CL.country_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:45%;"> <mat-form-field style="width:35%;">
<input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required> <input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required>
</mat-form-field> </mat-form-field>
@ -833,19 +852,15 @@
</div> </div>
</div> </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>
</div>
</ng-container> </ng-container>
</mat-card-content> </mat-card-content>
<mat-card-actions> <mat-card-actions>
<mat-form-field style="width: 92%"> <mat-form-field style="width: 92%">
<mat-label>Description of Wholesale Trade Product</mat-label> <mat-label>Description of {{wholesale.value.main_products}}</mat-label>
<textarea matInput placeholder="Description of Wholesale Trade Product" formControlName="description"></textarea> <textarea matInput placeholder="Description" formControlName="description"></textarea>
</mat-form-field> </mat-form-field>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>
@ -916,14 +931,18 @@
<div *ngIf="serviceprovider.value.max_sale_state_name !=undefined" formArrayName="max_sale_state_name"> <div *ngIf="serviceprovider.value.max_sale_state_name !=undefined" formArrayName="max_sale_state_name">
<div fxLayout="row nowrap" class="tab_class" *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-form-field style="width:84%;">
<mat-select multiple placeholder="Max Revenue From Services From Which States" formControlName="state_name"> <mat-label>States Where Max Revenue From Services for {{serviceprovider.value.main_products}}</mat-label>
<mat-select multiple placeholder="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"> <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">
{{MSL.state_name}} {{MSL.state_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:84%;" *ngIf="serviceprovider.value.pan_india_options=='No'"> <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-label>Cities Where Max Revenue From Services for {{serviceprovider.value.main_products}}</mat-label>
<mat-select multiple placeholder="Cities" formControlName="city_name">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name,serviceprovider.get('india_where_sale_done').value)" [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}} {{MCL.city_name}}
</mat-option> </mat-option>
@ -937,15 +956,15 @@
<div formArrayName="countries_where_export_done"> <div formArrayName="countries_where_export_done">
<div fxLayout="row nowrap" *ngFor="let countryList of serviceprovider.get('countries_where_export_done').controls; let c = index" [formGroupName]="c"> <div fxLayout="row nowrap" *ngFor="let countryList of serviceprovider.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
<mat-form-field style="width:35%;"> <mat-form-field style="width:55%;">
<!-- <input matInput placeholder="Countries Where Services Are Being Exported" formControlName="country_name" > --> <mat-label>Countries Where The Export Is Being Done for {{serviceprovider.value.main_products}}</mat-label>
<mat-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name"> <mat-select placeholder="Countries" formControlName="country_name">
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id"> <mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
{{CL.country_name}} {{CL.country_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:45%;"> <mat-form-field style="width:35%;">
<input matInput placeholder="Approx % of Revenue From Service" formControlName="approx_sale" required> <input matInput placeholder="Approx % of Revenue From Service" formControlName="approx_sale" required>
</mat-form-field> </mat-form-field>
@ -966,7 +985,7 @@
</ng-container> </ng-container>
<ng-container *ngIf="serviceprovider.value.countries_where_export_done !=undefined && serviceprovider.value.india_where_sale_done !=undefined"> <ng-container *ngIf="serviceprovider.value.countries_where_export_done !=undefined && serviceprovider.value.india_where_sale_done !=undefined">
<p>Import</p> <p>Within India</p>
<div fxLayout="row nowrap" class="tab_class state-margin"> <div fxLayout="row nowrap" class="tab_class state-margin">
<mat-form-field style="width: 35%;" *ngIf="serviceprovider.value.pan_india_options !=undefined"> <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-select formControlName="pan_india_options" placeholder="Is PAN India" (selectionChange)="changePanIndiaOptions(4,sp,serviceprovider.value.pan_india_options)" required>
@ -1009,14 +1028,18 @@
<div formArrayName="max_sale_state_name"> <div formArrayName="max_sale_state_name">
<div fxLayout="row nowrap" clas="tab_class" *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-form-field style="width:84%;">
<mat-select multiple placeholder="Max Revenue From Services From Which States" formControlName="state_name"> <mat-label>States Where Max Revenue From Services for {{serviceprovider.value.main_products}}</mat-label>
<mat-select multiple placeholder="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"> <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">
{{MSL.state_name}} {{MSL.state_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:84%;" *ngIf="serviceprovider.value.pan_india_options=='No'"> <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-label>Cities Where Max Revenue From Services for {{serviceprovider.value.main_products}}</mat-label>
<mat-select multiple placeholder="Cities" formControlName="city_name">
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name,serviceprovider.get('india_where_sale_done').value)" [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}} {{MCL.city_name}}
</mat-option> </mat-option>
@ -1027,15 +1050,15 @@
<p>Export</p> <p>Export</p>
<div formArrayName="countries_where_export_done"> <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"> <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%;"> <mat-form-field style="width:55%;">
<!-- <input matInput placeholder="Countries Where Services Are Being Exported" formControlName="country_name" > --> <mat-label>Countries Where The Export Is Being Done for {{serviceprovider.value.main_products}}</mat-label>
<mat-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name"> <mat-select placeholder="Countries" formControlName="country_name">
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id"> <mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
{{CL.country_name}} {{CL.country_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:45%;"> <mat-form-field style="width:35%;">
<input matInput placeholder="Approx % of Revenue From Service" formControlName="approx_sale" required> <input matInput placeholder="Approx % of Revenue From Service" formControlName="approx_sale" required>
</mat-form-field> </mat-form-field>
@ -1054,19 +1077,15 @@
</div> </div>
</div> </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>
</div>
</ng-container> </ng-container>
</mat-card-content> </mat-card-content>
<mat-card-actions> <mat-card-actions>
<mat-form-field style="width: 92%"> <mat-form-field style="width: 92%">
<mat-label>Description of Service Provider</mat-label> <mat-label>Description of {{serviceprovider.value.main_products}}</mat-label>
<textarea matInput placeholder="Description of Service Provider" formControlName="description"></textarea> <textarea matInput placeholder="Description" formControlName="description"></textarea>
</mat-form-field> </mat-form-field>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>
@ -1081,7 +1100,7 @@
</mat-card> </mat-card>
<mat-card *ngIf="businessForm.controls.others_activity_details['controls'].length>0"> <mat-card *ngIf="businessForm.controls.others_activity_details['controls'].length>0">
<mat-card-header> <mat-card-header>
<mat-card-title>Other Details</mat-card-title>> <mat-card-title>Other Details</mat-card-title>
</mat-card-header> </mat-card-header>
<mat-card-content formArrayName="others_activity_details"> <mat-card-content formArrayName="others_activity_details">
<mat-card *ngFor="let others of businessForm.controls.others_activity_details['controls']; let o=index" [formGroupName]="o"> <mat-card *ngFor="let others of businessForm.controls.others_activity_details['controls']; let o=index" [formGroupName]="o">
@ -1102,6 +1121,17 @@
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>
<mat-card> <mat-card>
<mat-card-header>
<mat-card-title>Export Sale As a % Total Sales</mat-card-title>
</mat-card-header>
<mat-card-content>
<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>
</mat-card-content>
</mat-card>
<mat-card>
<mat-card-title>Seasonality</mat-card-title> <mat-card-title>Seasonality</mat-card-title>
<mat-card-content> <mat-card-content>
<div fxLayout="row wrap"> <div fxLayout="row wrap">
@ -1402,7 +1432,7 @@
</mat-form-field> </mat-form-field>
</div> </div>
<div fxFlex="40" align="end"> <div fxFlex="40" align="end">
<button type="submit" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Submit" matTooltipPosition="above" (click)="submitDetails()"><mat-icon>save</mat-icon> <button type="submit" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Save" matTooltipPosition="above" (click)="submitDetails()"><mat-icon>save</mat-icon>
</button> </button>
</div> </div>
</mat-dialog-actions> </mat-dialog-actions>

View File

@ -71,7 +71,7 @@ export class BusinessInfoComponent implements OnInit {
private route: ActivatedRoute, private route: ActivatedRoute,
private router: Router, private router: Router,
private _pd: PdTrigerService, private _pd: PdTrigerService,
@Inject(MAT_DIALOG_DATA) public pd_all_details: any, private dialog: MatDialog) { @Inject(MAT_DIALOG_DATA) public pd_all_details: any, private dialog: MatDialog, private dialogRef: MatDialogRef<BusinessInfoComponent>) {
//this.adapter.setLocale('fr'); //this.adapter.setLocale('fr');
this.pdid = this.pd_all_details.pdmaster_details.pd_id; this.pdid = this.pd_all_details.pdmaster_details.pd_id;
this.company_id = this.pd_all_details.company_id; this.company_id = this.pd_all_details.company_id;
@ -82,7 +82,7 @@ export class BusinessInfoComponent implements OnInit {
this.notifier = notifier; this.notifier = notifier;
this.generalExistEntityType = this.pd_all_details.business_entity_type; this.generalExistEntityType = this.pd_all_details.business_entity_type;
this.generalExistEntityType_other = this.pd_all_details.business_entity_type_other; this.generalExistEntityType_other = this.pd_all_details.business_entity_type_other;
this.generalExistBusinessYear = this.pd_all_details.business_years;
} }
public viewerOptions: any = { public viewerOptions: any = {
@ -287,7 +287,6 @@ export class BusinessInfoComponent implements OnInit {
} }
else if(element.area_of_sale=='Both'){ else if(element.area_of_sale=='Both'){
manufacturingControl.controls[index].addControl('india_where_sale_done', this.fb.array([])); manufacturingControl.controls[index].addControl('india_where_sale_done', this.fb.array([]));
manufacturingControl.controls[index].addControl('export_sale_of_total_sales',new FormControl(''));
manufacturingControl.controls[index].addControl('pan_india_options',new FormControl('', Validators.required)); manufacturingControl.controls[index].addControl('pan_india_options',new FormControl('', Validators.required));
manufacturingControl.controls[index].addControl('max_sale_state_name',this.fb.array([])); manufacturingControl.controls[index].addControl('max_sale_state_name',this.fb.array([]));
@ -350,7 +349,6 @@ export class BusinessInfoComponent implements OnInit {
} }
else if(element.area_of_sale=='Both'){ else if(element.area_of_sale=='Both'){
retailControl.controls[index].addControl('india_where_sale_done', this.fb.array([])); retailControl.controls[index].addControl('india_where_sale_done', this.fb.array([]));
retailControl.controls[index].addControl('export_sale_of_total_sales',new FormControl(''));
retailControl.controls[index].addControl('pan_india_options',new FormControl('', Validators.required)); retailControl.controls[index].addControl('pan_india_options',new FormControl('', Validators.required));
retailControl.controls[index].addControl('max_sale_state_name',this.fb.array([])); retailControl.controls[index].addControl('max_sale_state_name',this.fb.array([]));
element.india_where_sale_done.forEach((innerElement,innerIndex) => { element.india_where_sale_done.forEach((innerElement,innerIndex) => {
@ -410,7 +408,6 @@ export class BusinessInfoComponent implements OnInit {
} }
else if(element.area_of_sale=='Both'){ else if(element.area_of_sale=='Both'){
wholesaleControl.controls[index].addControl('india_where_sale_done', this.fb.array([])); wholesaleControl.controls[index].addControl('india_where_sale_done', this.fb.array([]));
wholesaleControl.controls[index].addControl('export_sale_of_total_sales',new FormControl(''));
wholesaleControl.controls[index].addControl('pan_india_options',new FormControl('', Validators.required)); wholesaleControl.controls[index].addControl('pan_india_options',new FormControl('', Validators.required));
wholesaleControl.controls[index].addControl('max_sale_state_name',this.fb.array([])); wholesaleControl.controls[index].addControl('max_sale_state_name',this.fb.array([]));
element.india_where_sale_done.forEach((innerElement,innerIndex) => { element.india_where_sale_done.forEach((innerElement,innerIndex) => {
@ -473,7 +470,6 @@ export class BusinessInfoComponent implements OnInit {
} }
else if(element.area_of_sale=='Both'){ else if(element.area_of_sale=='Both'){
serviceProviderControl.controls[index].addControl('india_where_sale_done', this.fb.array([])); serviceProviderControl.controls[index].addControl('india_where_sale_done', this.fb.array([]));
serviceProviderControl.controls[index].addControl('export_sale_of_total_sales',new FormControl(''));
serviceProviderControl.controls[index].addControl('pan_india_options',new FormControl('', Validators.required)); serviceProviderControl.controls[index].addControl('pan_india_options',new FormControl('', Validators.required));
serviceProviderControl.controls[index].addControl('max_sale_state_name',this.fb.array([])); serviceProviderControl.controls[index].addControl('max_sale_state_name',this.fb.array([]));
element.india_where_sale_done.forEach((innerElement,innerIndex) => { element.india_where_sale_done.forEach((innerElement,innerIndex) => {
@ -571,6 +567,7 @@ export class BusinessInfoComponent implements OnInit {
fk_createdby: this.pdid, fk_createdby: this.pdid,
//industry: [''], //industry: [''],
seasonality: ['', Validators.compose([Validators.required])], seasonality: ['', Validators.compose([Validators.required])],
export_sale_of_total_sales:[],
//month_of_business_run : [''], //month_of_business_run : [''],
// peak_period_of_business : [''], // peak_period_of_business : [''],
//designation: this.fb.array([]), //designation: this.fb.array([]),
@ -672,7 +669,6 @@ export class BusinessInfoComponent implements OnInit {
control.controls[getIndex].removeControl('india_where_sale_done'); control.controls[getIndex].removeControl('india_where_sale_done');
control.controls[getIndex].removeControl('pan_india_options'); control.controls[getIndex].removeControl('pan_india_options');
control.controls[getIndex].removeControl('max_sale_state_name'); control.controls[getIndex].removeControl('max_sale_state_name');
control.controls[getIndex].removeControl('export_sale_of_total_sales');
control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required)); control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required));
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([])); control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([]));
control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()])); control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()]));
@ -682,7 +678,6 @@ export class BusinessInfoComponent implements OnInit {
control.controls[getIndex].removeControl('countries_where_export_done'); control.controls[getIndex].removeControl('countries_where_export_done');
control.controls[getIndex].removeControl('india_where_sale_done'); control.controls[getIndex].removeControl('india_where_sale_done');
control.controls[getIndex].removeControl('pan_india_options'); control.controls[getIndex].removeControl('pan_india_options');
control.controls[getIndex].removeControl('export_sale_of_total_sales');
control.controls[getIndex].removeControl('max_sale_state_name'); control.controls[getIndex].removeControl('max_sale_state_name');
control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()])); control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()]));
@ -696,7 +691,6 @@ export class BusinessInfoComponent implements OnInit {
control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required)); control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required));
control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()])); control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()]));
control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()])); control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()]));
control.controls[getIndex].addControl('export_sale_of_total_sales',new FormControl(''));
} }
} }
@ -710,7 +704,6 @@ export class BusinessInfoComponent implements OnInit {
control.controls[getIndex].removeControl('india_where_sale_done'); control.controls[getIndex].removeControl('india_where_sale_done');
control.controls[getIndex].removeControl('pan_india_options'); control.controls[getIndex].removeControl('pan_india_options');
control.controls[getIndex].removeControl('max_sale_state_name'); control.controls[getIndex].removeControl('max_sale_state_name');
control.controls[getIndex].removeControl('export_sale_of_total_sales');
control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required)); control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required));
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([])); control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([]));
control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()])); control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()]));
@ -720,7 +713,6 @@ export class BusinessInfoComponent implements OnInit {
control.controls[getIndex].removeControl('countries_where_export_done'); control.controls[getIndex].removeControl('countries_where_export_done');
control.controls[getIndex].removeControl('india_where_sale_done'); control.controls[getIndex].removeControl('india_where_sale_done');
control.controls[getIndex].removeControl('pan_india_options'); control.controls[getIndex].removeControl('pan_india_options');
control.controls[getIndex].removeControl('export_sale_of_total_sales');
control.controls[getIndex].removeControl('max_sale_state_name'); control.controls[getIndex].removeControl('max_sale_state_name');
control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()])); control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()]));
@ -734,7 +726,6 @@ export class BusinessInfoComponent implements OnInit {
control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required)); control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required));
control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()])); control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()]));
control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()])); control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()]));
control.controls[getIndex].addControl('export_sale_of_total_sales',new FormControl(''));
} }
} }
@ -747,7 +738,6 @@ export class BusinessInfoComponent implements OnInit {
control.controls[getIndex].removeControl('india_where_sale_done'); control.controls[getIndex].removeControl('india_where_sale_done');
control.controls[getIndex].removeControl('pan_india_options'); control.controls[getIndex].removeControl('pan_india_options');
control.controls[getIndex].removeControl('max_sale_state_name'); control.controls[getIndex].removeControl('max_sale_state_name');
control.controls[getIndex].removeControl('export_sale_of_total_sales');
control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required)); control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required));
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([])); control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([]));
control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()])); control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()]));
@ -757,7 +747,6 @@ export class BusinessInfoComponent implements OnInit {
control.controls[getIndex].removeControl('countries_where_export_done'); control.controls[getIndex].removeControl('countries_where_export_done');
control.controls[getIndex].removeControl('india_where_sale_done'); control.controls[getIndex].removeControl('india_where_sale_done');
control.controls[getIndex].removeControl('pan_india_options'); control.controls[getIndex].removeControl('pan_india_options');
control.controls[getIndex].removeControl('export_sale_of_total_sales');
control.controls[getIndex].removeControl('max_sale_state_name'); control.controls[getIndex].removeControl('max_sale_state_name');
control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()])); control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()]));
@ -771,7 +760,6 @@ export class BusinessInfoComponent implements OnInit {
control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required)); control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required));
control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()])); control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()]));
control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()])); control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()]));
control.controls[getIndex].addControl('export_sale_of_total_sales',new FormControl(''));
} }
} }
// change service provider // change service provider
@ -783,7 +771,6 @@ export class BusinessInfoComponent implements OnInit {
control.controls[getIndex].removeControl('india_where_sale_done'); control.controls[getIndex].removeControl('india_where_sale_done');
control.controls[getIndex].removeControl('pan_india_options'); control.controls[getIndex].removeControl('pan_india_options');
control.controls[getIndex].removeControl('max_sale_state_name'); control.controls[getIndex].removeControl('max_sale_state_name');
control.controls[getIndex].removeControl('export_sale_of_total_sales');
control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required)); control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required));
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([])); control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([]));
control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()])); control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()]));
@ -793,7 +780,6 @@ export class BusinessInfoComponent implements OnInit {
control.controls[getIndex].removeControl('countries_where_export_done'); control.controls[getIndex].removeControl('countries_where_export_done');
control.controls[getIndex].removeControl('india_where_sale_done'); control.controls[getIndex].removeControl('india_where_sale_done');
control.controls[getIndex].removeControl('pan_india_options'); control.controls[getIndex].removeControl('pan_india_options');
control.controls[getIndex].removeControl('export_sale_of_total_sales');
control.controls[getIndex].removeControl('max_sale_state_name'); control.controls[getIndex].removeControl('max_sale_state_name');
control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()])); control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()]));
@ -807,7 +793,6 @@ export class BusinessInfoComponent implements OnInit {
control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required)); control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required));
control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()])); control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()]));
control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()])); control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()]));
control.controls[getIndex].addControl('export_sale_of_total_sales',new FormControl(''));
} }
} }
// change pan india options // change pan india options
@ -870,7 +855,7 @@ export class BusinessInfoComponent implements OnInit {
shareholding: [''], shareholding: [''],
started_business: [''], started_business: [''],
current_business_experiance_year: ['', Validators.compose([Validators.required])], current_business_experiance_year: ['', Validators.compose([Validators.required])],
current_business_experiance_month: ['', Validators.compose([Validators.required])], current_business_experiance_month: [''],
total_business_experiance: ['', Validators.compose([Validators.required])], total_business_experiance: ['', Validators.compose([Validators.required])],
}); });
} }
@ -1205,9 +1190,10 @@ export class BusinessInfoComponent implements OnInit {
control.controls[key].addControl('total_business_previous_experience', new FormControl('', Validators.required)) control.controls[key].addControl('total_business_previous_experience', new FormControl('', Validators.required))
} }
else if(total_experience < current_experience) { else if(total_experience < current_experience) {
control.controls[key].controls['total_business_experiance'].setValue(current_experience); //control.controls[key].controls['total_business_experiance'].setValue(current_experience);
control.controls[key].removeControl('total_business_previous_experience') control.controls[key].removeControl('total_business_previous_experience')
} }
else { else {
control.controls[key].removeControl('total_business_previous_experience') control.controls[key].removeControl('total_business_previous_experience')
} }
@ -1250,7 +1236,7 @@ export class BusinessInfoComponent implements OnInit {
// console.log(this.businessForm.value); // console.log(this.businessForm.value);
if (!this.businessForm.valid) { if (!this.businessForm.valid) {
//console.log(' Requried validation error'); this.notifier.notify('warning',"Please Check All Manatory Fields..");
return; return;
} }
// let design: any; // let design: any;
@ -1352,6 +1338,9 @@ export class BusinessInfoComponent implements OnInit {
records.select_business_activity_type = records.select_business_activity_type.filter(value=>value.exist_status==1); records.select_business_activity_type = records.select_business_activity_type.filter(value=>value.exist_status==1);
this._pd.saveForm(records).subscribe(data => { this._pd.saveForm(records).subscribe(data => {
this.notifier.notify('success', 'Saved Successfully.'); this.notifier.notify('success', 'Saved Successfully.');
setTimeout(() =>{
this.dialogRef.close();
},3000);
}, error => { }, error => {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
}); });