required in business : ps
This commit is contained in:
parent
5c3a90de96
commit
4b99096f81
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@ import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
|||||||
import { AwsServiceProvider } from '../../../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../../../providers/aws-service/aws-service';
|
||||||
import { ToastProvider } from '../../../../providers/common-provider/toast';
|
import { ToastProvider } from '../../../../providers/common-provider/toast';
|
||||||
import { QuestionCategoryProvider } from '../../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../../providers/question-category/question-category';
|
||||||
import { FormBuilder, FormGroup,FormArray, Validators, FormControl } from '@angular/forms';
|
import { FormGroup, FormBuilder,FormArray,Validator, Validators, FormControl } from '@angular/forms';
|
||||||
import { createPipe } from '@angular/compiler/src/core';
|
import { createPipe } from '@angular/compiler/src/core';
|
||||||
import { elementAt, takeUntil } from 'rxjs/operators';
|
import { elementAt, takeUntil } from 'rxjs/operators';
|
||||||
import { ConstantsProvider } from '../../../../providers/constants/constants'
|
import { ConstantsProvider } from '../../../../providers/constants/constants'
|
||||||
@ -143,14 +143,14 @@ export class PdQuestionBusinessInfoPage {
|
|||||||
employees_appx_salary: [''],
|
employees_appx_salary: [''],
|
||||||
was_the_company_name_board_sighted: ['', Validators.compose([Validators.required])],
|
was_the_company_name_board_sighted: ['', Validators.compose([Validators.required])],
|
||||||
officer_total: ['', Validators.compose([Validators.required])],
|
officer_total: ['', Validators.compose([Validators.required])],
|
||||||
shop_eat_act_cert: [''],
|
shop_eat_act_cert: ['', Validators.compose([Validators.required])],
|
||||||
shop_eat_act_cert_pic:[''],
|
// shop_eat_act_cert_pic:['', Validators.compose([Validators.required])],
|
||||||
gst_Regn_cert: [''],
|
gst_Regn_cert: ['', Validators.compose([Validators.required])],
|
||||||
//export_import_cert: [''],
|
//export_import_cert: [''],
|
||||||
//factory_cert: [''],
|
//factory_cert: [''],
|
||||||
//practice_cert: [''],
|
//practice_cert: [''],
|
||||||
pf_regn: [''],
|
pf_regn: ['', Validators.compose([Validators.required])],
|
||||||
esic_regn: [''],
|
esic_regn: ['', Validators.compose([Validators.required])],
|
||||||
other_documents: [''],
|
other_documents: [''],
|
||||||
documents: this.fb.array([]),
|
documents: this.fb.array([]),
|
||||||
business_remarks: ['']
|
business_remarks: ['']
|
||||||
@ -299,8 +299,7 @@ changeOfStartedBusiness(members,i,e){
|
|||||||
// country_sale.push(this.createCountrySale());
|
// country_sale.push(this.createCountrySale());
|
||||||
//const max_sale_state:any=<FormArray> this.businessForm.controls['manufacturing_activity_details']['controls'][0].controls.max_sale_state_name;
|
//const max_sale_state:any=<FormArray> this.businessForm.controls['manufacturing_activity_details']['controls'][0].controls.max_sale_state_name;
|
||||||
//max_sale_state.push(this.maxSaleState())
|
//max_sale_state.push(this.maxSaleState())
|
||||||
this.product_abbr == 'LAEP' ? this.businessForm.addControl('fire_noc', new FormControl('', Validators.required)) : this.businessForm.removeControl('fire_noc');
|
this.product_abbr == 'LAEP' ? this.businessForm.addControl('fire_noc', new FormControl(null, Validators.compose([Validators.required]))) : this.businessForm.removeControl('fire_noc');
|
||||||
|
|
||||||
if (data['status'] == 200) {
|
if (data['status'] == 200) {
|
||||||
|
|
||||||
let DocArray: any;
|
let DocArray: any;
|
||||||
@ -396,8 +395,7 @@ changeOfStartedBusiness(members,i,e){
|
|||||||
}
|
}
|
||||||
}).filter(item => item != undefined);
|
}).filter(item => item != undefined);
|
||||||
|
|
||||||
if(check_exist_businees_activity.length > 0)
|
if (check_exist_businees_activity.length > 0) {
|
||||||
{
|
|
||||||
check_exist_businees_activity.forEach((val, index) => {
|
check_exist_businees_activity.forEach((val, index) => {
|
||||||
business_activity.push(this.createBusinessActivity(val));
|
business_activity.push(this.createBusinessActivity(val));
|
||||||
// this.businessForm.controls['select_business_activity_type'].value[index].exist_status=val.exist_status
|
// this.businessForm.controls['select_business_activity_type'].value[index].exist_status=val.exist_status
|
||||||
@ -767,7 +765,8 @@ changeOfStartedBusiness(members,i,e){
|
|||||||
|
|
||||||
if (data['records'].seasonality.toUpperCase() == 'YES') {
|
if (data['records'].seasonality.toUpperCase() == 'YES') {
|
||||||
this.businessForm.addControl('peak_period_of_business', new FormControl('', Validators.required));
|
this.businessForm.addControl('peak_period_of_business', new FormControl('', Validators.required));
|
||||||
this.businessForm.addControl('month_of_business_run', new FormControl('', Validators.required)); }
|
this.businessForm.addControl('month_of_business_run', new FormControl('', Validators.required));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -792,14 +791,14 @@ changeOfStartedBusiness(members,i,e){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('businessVal', businessVal);
|
console.log('businessVal', businessVal);
|
||||||
if(data['records'].gst_Regn_cert =='yes'){ this.businessForm.addControl('gst_Regn_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('gst_Regn_cert_pic');}
|
if (data['records'].gst_Regn_cert == 'yes') { this.businessForm.addControl('gst_Regn_cert_pic', new FormControl('', Validators.compose([Validators.required]))); } else { this.businessForm.removeControl('gst_Regn_cert_pic'); }
|
||||||
if(data['records'].factory_cert =='yes'){ this.businessForm.addControl('factory_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('factory_cert_pic');}
|
if (data['records'].factory_cert == 'yes') { this.businessForm.addControl('factory_cert_pic', new FormControl('', Validators.compose([Validators.required]))); } else { this.businessForm.removeControl('factory_cert_pic'); }
|
||||||
if(data['records'].practice_cert =='yes'){ this.businessForm.addControl('practice_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('practice_cert_pic');}
|
if (data['records'].practice_cert == 'yes') { this.businessForm.addControl('practice_cert_pic', new FormControl('', Validators.compose([Validators.required]))); } else { this.businessForm.removeControl('practice_cert_pic'); }
|
||||||
if(data['records'].shop_eat_act_cert =='yes'){ this.businessForm.addControl('shop_eat_act_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('shop_eat_act_cert_pic');}
|
if (data['records'].shop_eat_act_cert == 'yes') { this.businessForm.addControl('shop_eat_act_cert_pic', new FormControl('', Validators.compose([Validators.required]))); } else { this.businessForm.removeControl('shop_eat_act_cert_pic'); }
|
||||||
if(data['records'].pf_regn =='yes'){ this.businessForm.addControl('pf_regn_pic', new FormControl('')); }else{ this.businessForm.removeControl('pf_regn_pic');}
|
if (data['records'].pf_regn == 'yes') { this.businessForm.addControl('pf_regn_pic', new FormControl('', Validators.compose([Validators.required]))); } else { this.businessForm.removeControl('pf_regn_pic'); }
|
||||||
if(data['records'].esic_regn =='yes'){ this.businessForm.addControl('esic_regn_pic', new FormControl('')); }else{ this.businessForm.removeControl('esic_regn_pic');}
|
if (data['records'].esic_regn == 'yes') { this.businessForm.addControl('esic_regn_pic', new FormControl('', Validators.compose([Validators.required]))); } else { this.businessForm.removeControl('esic_regn_pic'); }
|
||||||
if(data['records'].export_import_cert =='yes'){ this.businessForm.addControl('export_import_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('export_import_cert_pic');}
|
if (data['records'].export_import_cert == 'yes') { this.businessForm.addControl('export_import_cert_pic', new FormControl('', Validators.compose([Validators.required]))); } else { this.businessForm.removeControl('export_import_cert_pic'); }
|
||||||
if(data['records'].fire_noc =='yes'){ this.businessForm.addControl('fire_noc_pic', new FormControl('')); }else{ this.businessForm.removeControl('fire_noc_pic');}
|
if (data['records'].fire_noc == 'yes') { this.businessForm.addControl('fire_noc_pic', new FormControl('', Validators.compose([Validators.required]))); } else { this.businessForm.removeControl('fire_noc_pic'); }
|
||||||
|
|
||||||
this.businessForm.setValue(businessVal);
|
this.businessForm.setValue(businessVal);
|
||||||
|
|
||||||
@ -813,8 +812,7 @@ changeOfStartedBusiness(members,i,e){
|
|||||||
|
|
||||||
// find business activity type businees activity type list
|
// find business activity type businees activity type list
|
||||||
let activityData = this.activityData.map(item => ({ name: item.name, type_of_activity_id: item.type_of_activity_id, exist_status: 0 }))
|
let activityData = this.activityData.map(item => ({ name: item.name, type_of_activity_id: item.type_of_activity_id, exist_status: 0 }))
|
||||||
if(activityData.length > 0)
|
if (activityData.length > 0) {
|
||||||
{
|
|
||||||
activityData.forEach(val => {
|
activityData.forEach(val => {
|
||||||
business_activity.push(this.createBusinessActivity(val));
|
business_activity.push(this.createBusinessActivity(val));
|
||||||
});
|
});
|
||||||
@ -837,8 +835,8 @@ changeOfStartedBusiness(members,i,e){
|
|||||||
// this.businessForm.controls['factory_cert'].valueChanges.subscribe(val => {
|
// this.businessForm.controls['factory_cert'].valueChanges.subscribe(val => {
|
||||||
// val.toUpperCase()=='YES' ? this.businessForm.addControl('factory_cert_pic', new FormControl('')) : this.businessForm.removeControl('factory_cert_pic');
|
// val.toUpperCase()=='YES' ? this.businessForm.addControl('factory_cert_pic', new FormControl('')) : this.businessForm.removeControl('factory_cert_pic');
|
||||||
// });}
|
// });}
|
||||||
// if(this.businessForm.controls['practice_cert_cert']){
|
// if(this.businessForm.controls['practice_cert']){
|
||||||
// this.businessForm.controls['practice_cert_cert'].valueChanges.subscribe(val => {
|
// this.businessForm.controls['practice_cert'].valueChanges.subscribe(val => {
|
||||||
// val.toUpperCase()=='YES' ? this.businessForm.addControl('practice_cert_pic', new FormControl('')) : this.businessForm.removeControl('practice_cert_pic');
|
// val.toUpperCase()=='YES' ? this.businessForm.addControl('practice_cert_pic', new FormControl('')) : this.businessForm.removeControl('practice_cert_pic');
|
||||||
// });}
|
// });}
|
||||||
// if(this.businessForm.controls['shop_eat_act_cert']){
|
// if(this.businessForm.controls['shop_eat_act_cert']){
|
||||||
@ -1246,10 +1244,12 @@ changePanIndiaOptions(type,selectedIndex,value) {
|
|||||||
if (value == 'Yes') {
|
if (value == 'Yes') {
|
||||||
|
|
||||||
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([]));
|
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([]));
|
||||||
control.controls[selectedIndex].addControl('max_sale_state_name',this.fb.array([this.maxSaleState()])); }
|
control.controls[selectedIndex].addControl('max_sale_state_name', this.fb.array([this.maxSaleState()]));
|
||||||
|
}
|
||||||
else if (value == 'No') {
|
else if (value == 'No') {
|
||||||
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([this.indiaSalesDone()]));
|
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([this.indiaSalesDone()]));
|
||||||
control.controls[selectedIndex].addControl('max_sale_state_name',this.fb.array([this.maxSaleState()])); }
|
control.controls[selectedIndex].addControl('max_sale_state_name', this.fb.array([this.maxSaleState()]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (type == 2) {
|
else if (type == 2) {
|
||||||
let control: any = this.businessForm.get('retail_trading_activity_details') as FormArray;
|
let control: any = this.businessForm.get('retail_trading_activity_details') as FormArray;
|
||||||
@ -1257,10 +1257,12 @@ changePanIndiaOptions(type,selectedIndex,value) {
|
|||||||
control.controls[selectedIndex].removeControl('max_sale_state_name');
|
control.controls[selectedIndex].removeControl('max_sale_state_name');
|
||||||
if (value == 'Yes') {
|
if (value == 'Yes') {
|
||||||
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([]));
|
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([]));
|
||||||
control.controls[selectedIndex].addControl('max_sale_state_name',this.fb.array([this.maxSaleState()])); }
|
control.controls[selectedIndex].addControl('max_sale_state_name', this.fb.array([this.maxSaleState()]));
|
||||||
|
}
|
||||||
else if (value == 'No') {
|
else if (value == 'No') {
|
||||||
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([this.indiaSalesDone()]));
|
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([this.indiaSalesDone()]));
|
||||||
control.controls[selectedIndex].addControl('max_sale_state_name',this.fb.array([this.maxSaleState()])); }
|
control.controls[selectedIndex].addControl('max_sale_state_name', this.fb.array([this.maxSaleState()]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (type == 3) {
|
else if (type == 3) {
|
||||||
let control: any = this.businessForm.get('wholesale_trading_activity_details') as FormArray;
|
let control: any = this.businessForm.get('wholesale_trading_activity_details') as FormArray;
|
||||||
@ -1268,10 +1270,12 @@ changePanIndiaOptions(type,selectedIndex,value) {
|
|||||||
control.controls[selectedIndex].removeControl('max_sale_state_name');
|
control.controls[selectedIndex].removeControl('max_sale_state_name');
|
||||||
if (value == 'Yes') {
|
if (value == 'Yes') {
|
||||||
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([]));
|
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([]));
|
||||||
control.controls[selectedIndex].addControl('max_sale_state_name',this.fb.array([this.maxSaleState()])); }
|
control.controls[selectedIndex].addControl('max_sale_state_name', this.fb.array([this.maxSaleState()]));
|
||||||
|
}
|
||||||
else if (value == 'No') {
|
else if (value == 'No') {
|
||||||
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([this.indiaSalesDone()]));
|
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([this.indiaSalesDone()]));
|
||||||
control.controls[selectedIndex].addControl('max_sale_state_name',this.fb.array([this.maxSaleState()])); }
|
control.controls[selectedIndex].addControl('max_sale_state_name', this.fb.array([this.maxSaleState()]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (type == 4) {
|
else if (type == 4) {
|
||||||
let control: any = this.businessForm.get('service_provider_activity_details') as FormArray;
|
let control: any = this.businessForm.get('service_provider_activity_details') as FormArray;
|
||||||
@ -1279,10 +1283,12 @@ changePanIndiaOptions(type,selectedIndex,value) {
|
|||||||
control.controls[selectedIndex].removeControl('max_sale_state_name');
|
control.controls[selectedIndex].removeControl('max_sale_state_name');
|
||||||
if (value == 'Yes') {
|
if (value == 'Yes') {
|
||||||
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([]));
|
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([]));
|
||||||
control.controls[selectedIndex].addControl('max_sale_state_name',this.fb.array([this.maxSaleState()])); }
|
control.controls[selectedIndex].addControl('max_sale_state_name', this.fb.array([this.maxSaleState()]));
|
||||||
|
}
|
||||||
else if (value == 'No') {
|
else if (value == 'No') {
|
||||||
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([this.indiaSalesDone()]));
|
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([this.indiaSalesDone()]));
|
||||||
control.controls[selectedIndex].addControl('max_sale_state_name',this.fb.array([this.maxSaleState()])); }
|
control.controls[selectedIndex].addControl('max_sale_state_name', this.fb.array([this.maxSaleState()]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1749,10 +1755,106 @@ createPOSMachinesDetails(data){
|
|||||||
|
|
||||||
submitDetails() {
|
submitDetails() {
|
||||||
|
|
||||||
|
// if (!this.businessForm.valid) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
if (this.businessForm.controls['export_sale_of_total_sales'].invalid) {
|
if (this.businessForm.controls['export_sale_of_total_sales'].invalid) {
|
||||||
this.toast.pdTriggerappmessage("Please enter a value between 0 and 100 in export sale as a % total sales");
|
this.toast.pdTriggerappmessage("Please enter a value between 0 and 100 in export sale as a % total sales");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.businessForm.controls['gst_Regn_cert'].invalid) {
|
||||||
|
this.toast.pdTriggerappmessage("GST Regn Cert is required");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.businessForm.controls['gst_Regn_cert_pic'] && this.businessForm.value.gst_Regn_cert == 'yes') {
|
||||||
|
if (this.businessForm.controls['gst_Regn_cert_pic'].invalid) {
|
||||||
|
this.toast.pdTriggerappmessage("gst regn cert pic is required");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (this.businessForm.controls['factory_cert'] && this.businessForm.controls['factory_cert'].invalid) {
|
||||||
|
this.toast.pdTriggerappmessage("Factory Cert is required");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.businessForm.controls['factory_cert_pic'] && this.businessForm.value.factory_cert == 'yes') {
|
||||||
|
if (this.businessForm.controls['factory_cert_pic'].invalid) {
|
||||||
|
this.toast.pdTriggerappmessage("factory cert pic is required");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (this.businessForm.controls['practice_cert'] && this.businessForm.controls['practice_cert'].invalid) {
|
||||||
|
this.toast.pdTriggerappmessage("Practice Cert is required");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.businessForm.controls['practice_cert_pic'] && this.businessForm.value.practice_cert == 'yes') {
|
||||||
|
if (this.businessForm.controls['practice_cert_pic'].invalid) {
|
||||||
|
this.toast.pdTriggerappmessage(" practice cert pic is required");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (this.businessForm.controls['shop_eat_act_cert'].invalid) {
|
||||||
|
this.toast.pdTriggerappmessage("shop eat act cert is required");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.businessForm.controls['shop_eat_act_cert_pic'] && this.businessForm.value.shop_eat_act_cert == 'yes') {
|
||||||
|
if (this.businessForm.controls['shop_eat_act_cert_pic'].invalid) {
|
||||||
|
this.toast.pdTriggerappmessage("Shop eat act cert pic is required");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.businessForm.controls['pf_regn'].invalid) {
|
||||||
|
this.toast.pdTriggerappmessage("PF Regn is required");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.businessForm.controls['pf_regn_pic'] && this.businessForm.value.pf_regn == 'yes') {
|
||||||
|
if (this.businessForm.controls['pf_regn_pic'].invalid) {
|
||||||
|
this.toast.pdTriggerappmessage("PF Regn pic is required");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.businessForm.controls['esic_regn'].invalid) {
|
||||||
|
this.toast.pdTriggerappmessage("ESIC Regn is required");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.businessForm.controls['esic_regn_pic'] && this.businessForm.value.esic_regn == 'yes') {
|
||||||
|
if (this.businessForm.controls['esic_regn_pic'].invalid) {
|
||||||
|
this.toast.pdTriggerappmessage("ESIC Regn pic is required");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.businessForm.controls['export_import_cert'] && this.businessForm.controls['export_import_cert'].invalid) {
|
||||||
|
this.toast.pdTriggerappmessage("Export Import Cert is required");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.businessForm.controls['export_import_cert_pic'] && this.businessForm.value.export_import_cert == 'yes') {
|
||||||
|
if (this.businessForm.controls['export_import_cert_pic'].invalid) {
|
||||||
|
this.toast.pdTriggerappmessage("Export /Import Cert pic is required");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.businessForm.controls['fire_noc'] && this.businessForm.controls['fire_noc'].invalid) {
|
||||||
|
this.toast.pdTriggerappmessage("Fire Noc is required");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.businessForm.controls['fire_noc_pic'] && this.businessForm.value.fire_noc == 'yes') {
|
||||||
|
if (this.businessForm.controls['fire_noc_pic'].invalid) {
|
||||||
|
this.toast.pdTriggerappmessage("Fire Noc pic is required");
|
||||||
|
return;
|
||||||
|
} }
|
||||||
|
|
||||||
|
|
||||||
// if(this.businessForm.controls['export_sale_of_total_sales']){
|
// if(this.businessForm.controls['export_sale_of_total_sales']){
|
||||||
// if(this.businessForm.controls['export_sale_of_total_sales'].value > 100 || this.businessForm.controls['export_sale_of_total_sales'].value < 0){
|
// if(this.businessForm.controls['export_sale_of_total_sales'].value > 100 || this.businessForm.controls['export_sale_of_total_sales'].value < 0){
|
||||||
|
|
||||||
@ -1952,8 +2054,7 @@ if(records.pos_machines_details){
|
|||||||
// }
|
// }
|
||||||
// console.log('records',records);
|
// console.log('records',records);
|
||||||
this.qustCat.saveForm(records).subscribe(data => {
|
this.qustCat.saveForm(records).subscribe(data => {
|
||||||
if(data['dataStatus']==true)
|
if (data['dataStatus'] == true) {
|
||||||
{
|
|
||||||
this.businessForm.markAsUntouched();
|
this.businessForm.markAsUntouched();
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -1962,8 +2063,7 @@ if(records.pos_machines_details){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
getBuisnessDetails()
|
getBuisnessDetails() {
|
||||||
{
|
|
||||||
let records = { 'parent_pdid': this.pdDetails.parent_pd_id, 'pd_id': this.pdDetails.pd_id, 'pd_form_id': this.FormId };
|
let records = { 'parent_pdid': this.pdDetails.parent_pd_id, 'pd_id': this.pdDetails.pd_id, 'pd_form_id': this.FormId };
|
||||||
this.qustCat.retiverForm(records).subscribe(data => {
|
this.qustCat.retiverForm(records).subscribe(data => {
|
||||||
let businessVal = data['records'];
|
let businessVal = data['records'];
|
||||||
@ -2113,8 +2213,7 @@ ServiceCounterArray: any = [];
|
|||||||
|
|
||||||
if (!this.ServiceChecked) {
|
if (!this.ServiceChecked) {
|
||||||
|
|
||||||
if(stringFlag == 'SPActivity' && value == "Both")
|
if (stringFlag == 'SPActivity' && value == "Both") {
|
||||||
{
|
|
||||||
this.ServiceCounterArray[index] = 1;
|
this.ServiceCounterArray[index] = 1;
|
||||||
}
|
}
|
||||||
else if (stringFlag == 'SPActivity' && value != "Both") {
|
else if (stringFlag == 'SPActivity' && value != "Both") {
|
||||||
@ -2413,13 +2512,13 @@ toGetPOSMachinesDetails(e,flag){
|
|||||||
}
|
}
|
||||||
|
|
||||||
radioChange(event, Flag) {
|
radioChange(event, Flag) {
|
||||||
if(Flag == 1) {event.value =='yes' ? this.businessForm.addControl('shop_eat_act_cert_pic', new FormControl('')) : this.businessForm.removeControl('shop_eat_act_cert_pic');}
|
if (Flag == 1) { event.value == 'yes' ? this.businessForm.addControl('shop_eat_act_cert_pic', new FormControl('', Validators.compose([Validators.required]))) : this.businessForm.removeControl('shop_eat_act_cert_pic'); }
|
||||||
if(Flag == 2) {event.value =='yes' ? this.businessForm.addControl('gst_Regn_cert_pic', new FormControl('')) : this.businessForm.removeControl('gst_Regn_cert_pic'); }
|
if (Flag == 2) { event.value == 'yes' ? this.businessForm.addControl('gst_Regn_cert_pic', new FormControl('', Validators.compose([Validators.required]))) : this.businessForm.removeControl('gst_Regn_cert_pic'); }
|
||||||
if(Flag == 4) {event.value =='yes' ? this.businessForm.addControl('factory_cert_pic', new FormControl('')) : this.businessForm.removeControl('factory_cert_pic');}
|
if (Flag == 4) { event.value == 'yes' ? this.businessForm.addControl('factory_cert_pic', new FormControl('', Validators.compose([Validators.required]))) : this.businessForm.removeControl('factory_cert_pic'); }
|
||||||
if(Flag == 5) {event.value =='yes' ? this.businessForm.addControl('practice_cert_pic', new FormControl('')) : this.businessForm.removeControl('practice_cert_pic');}
|
if (Flag == 5) { event.value == 'yes' ? this.businessForm.addControl('practice_cert_pic', new FormControl('', Validators.compose([Validators.required]))) : this.businessForm.removeControl('practice_cert_pic'); }
|
||||||
if(Flag == 6) {event.value =='yes' ? this.businessForm.addControl('pf_regn_pic', new FormControl('')) : this.businessForm.removeControl('pf_regn_pic');}
|
if (Flag == 6) { event.value == 'yes' ? this.businessForm.addControl('pf_regn_pic', new FormControl('', Validators.compose([Validators.required]))) : this.businessForm.removeControl('pf_regn_pic'); }
|
||||||
if(Flag == 7) {event.value =='yes' ? this.businessForm.addControl('esic_regn_pic', new FormControl('')) : this.businessForm.removeControl('esic_regn_pic');}
|
if (Flag == 7) { event.value == 'yes' ? this.businessForm.addControl('esic_regn_pic', new FormControl('', Validators.compose([Validators.required]))) : this.businessForm.removeControl('esic_regn_pic'); }
|
||||||
if(Flag == 3) {event.value =='yes' ? this.businessForm.addControl('export_import_cert_pic', new FormControl('')) : this.businessForm.removeControl('export_import_cert_pic');}
|
if (Flag == 3) { event.value == 'yes' ? this.businessForm.addControl('export_import_cert_pic', new FormControl('', Validators.compose([Validators.required]))) : this.businessForm.removeControl('export_import_cert_pic'); }
|
||||||
if(Flag == 8) {event.value =='yes' ? this.businessForm.addControl('fire_noc_pic', new FormControl('')) : this.businessForm.removeControl('fire_noc_pic');}
|
if (Flag == 8) { event.value == 'yes' ? this.businessForm.addControl('fire_noc_pic', new FormControl('', Validators.compose([Validators.required]))) : this.businessForm.removeControl('fire_noc_pic'); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user