Code merge
This commit is contained in:
parent
d797e84a6f
commit
b03af71736
@ -1 +1 @@
|
|||||||
{"version":3,"sources":["../../@angular/common/http (ignored)"],"names":[],"mappings":";;;;;AAAA,e","file":"0.js","sourcesContent":["/* (ignored) */\n\n\n//////////////////\n// WEBPACK FOOTER\n// @angular/common/http (ignored)\n// module id = 706\n// module chunks = 0"],"sourceRoot":""}
|
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
|||||||
#Mon Apr 29 20:23:26 IST 2019
|
#Sat May 11 17:18:37 IST 2019
|
||||||
base.0=S\:\\pd_office\\pd_officer\\platforms\\android\\app\\build\\intermediates\\transforms\\dexMerger\\debug\\0
|
base.0=S\:\\pd_office\\pd_officer\\platforms\\android\\app\\build\\intermediates\\transforms\\dexMerger\\debug\\0
|
||||||
path.0=classes.dex
|
path.0=classes.dex
|
||||||
renamed.0=classes.dex
|
renamed.0=classes.dex
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#Internal package file, do not edit.
|
#Internal package file, do not edit.
|
||||||
#Mon Apr 29 20:23:27 IST 2019
|
#Sat May 11 17:18:37 IST 2019
|
||||||
60.set=ASSET
|
60.set=ASSET
|
||||||
52.set=ASSET
|
52.set=ASSET
|
||||||
53.base=S\:\\pd_office\\pd_officer\\platforms\\android\\app\\build\\intermediates\\assets\\debug
|
53.base=S\:\\pd_office\\pd_officer\\platforms\\android\\app\\build\\intermediates\\assets\\debug
|
||||||
|
|||||||
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -62,7 +62,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col col-1><ion-icon name="md-cash"></ion-icon></ion-col>
|
<ion-col col-1><ion-icon name="md-cash"></ion-icon></ion-col>
|
||||||
<ion-col class="cardinfo">{{"₹"}} {{pdMaster.loan_amount}}</ion-col>
|
<ion-col class="cardinfo">{{"₹"}} {{pdMaster.loan_amount}} ( {{inWords(pdMaster.loan_amount)}} ) </ion-col>
|
||||||
</ion-row>
|
</ion-row>
|
||||||
<hr/>
|
<hr/>
|
||||||
<div *ngFor="let addr of addresses; let i=index">
|
<div *ngFor="let addr of addresses; let i=index">
|
||||||
|
|||||||
@ -639,4 +639,8 @@ else{
|
|||||||
this.getFullPD();
|
this.getFullPD();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inWords(e){
|
||||||
|
return this.constant.convertNumberToWords(+e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -405,7 +405,7 @@
|
|||||||
<!-- <ion-buttons >
|
<!-- <ion-buttons >
|
||||||
<ion-button color="optblue" full [disabled]="!pdforms.valid" mat-raised-button style="width:100%" (click)="savepdDetails(pdforms.value)">Save <ion-icon name="md-disc"></ion-icon></ion-button> -->
|
<ion-button color="optblue" full [disabled]="!pdforms.valid" mat-raised-button style="width:100%" (click)="savepdDetails(pdforms.value)">Save <ion-icon name="md-disc"></ion-icon></ion-button> -->
|
||||||
<span *ngIf='!complete_status'>
|
<span *ngIf='!complete_status'>
|
||||||
<button ion-button full color="optblue" (click)="savepdQuestion(pdQuestionAddress.value)"> Save</button>
|
<button ion-button full ion-fixed color="optblue" (click)="savepdQuestion(pdQuestionAddress.value)"> Save</button>
|
||||||
</span>
|
</span>
|
||||||
<!-- </ion-buttons> -->
|
<!-- </ion-buttons> -->
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<button ion-button menuToggle>
|
<button ion-button menuToggle>
|
||||||
<ion-icon name="menu"></ion-icon>
|
<ion-icon name="menu"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
<ion-title *ngIf="!viewchange">Business Income</ion-title>
|
<ion-title *ngIf="!viewchange">Business Expenses</ion-title>
|
||||||
|
|
||||||
|
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
|
|||||||
@ -102,7 +102,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ion-icon class="ion-icon-custome" name="logo-android"></ion-icon>
|
<ion-icon class="ion-icon-custome" name="logo-android"></ion-icon>
|
||||||
<h1 class="htag">BUSINESS EXPENSE</h1>
|
<h1 class="htag">BUSINESS EXPENSES</h1>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
<ion-col col-6 text-center>
|
<ion-col col-6 text-center>
|
||||||
@ -116,7 +116,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ion-icon class="ion-icon-custome" name="logo-android"></ion-icon>
|
<ion-icon class="ion-icon-custome" name="logo-android"></ion-icon>
|
||||||
<h1 class="htag">HOUSE HOLD</h1>
|
<h1 class="htag">HOUSEHOLD EXPENSES</h1>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
<!-- </ion-row>
|
<!-- </ion-row>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<button ion-button menuToggle>
|
<button ion-button menuToggle>
|
||||||
<ion-icon name="menu"></ion-icon>
|
<ion-icon name="menu"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
<ion-title *ngIf="!viewchange">House Hold Expense</ion-title>
|
<ion-title *ngIf="!viewchange">Household Expenses</ion-title>
|
||||||
|
|
||||||
|
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
|
|||||||
@ -374,7 +374,7 @@
|
|||||||
|
|
||||||
<div *ngIf="pageId==3">
|
<div *ngIf="pageId==3">
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-header><h4>Business Expense Items</h4></mat-card-header>
|
<mat-card-header><h4>Business Expenses</h4></mat-card-header>
|
||||||
|
|
||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col col-3 *ngIf="businessExpenses_details!=''"><a (click)="editExpenseAllDetails(businessExpenses_details)"><h2>{{"✎"}}</h2></a></ion-col>
|
<ion-col col-3 *ngIf="businessExpenses_details!=''"><a (click)="editExpenseAllDetails(businessExpenses_details)"><h2>{{"✎"}}</h2></a></ion-col>
|
||||||
@ -411,7 +411,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div *ngIf="pageId==4">
|
<div *ngIf="pageId==4">
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-header><h4>House Hold Items</h4></mat-card-header>
|
<mat-card-header><h4>Household Expenses</h4></mat-card-header>
|
||||||
|
|
||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col col-3 *ngIf="houseHold_details !=''"><a (click)="editHouseExpenseAllDetails(houseHold_details)"><h2>{{"✎"}}</h2></a></ion-col>
|
<ion-col col-3 *ngIf="houseHold_details !=''"><a (click)="editHouseExpenseAllDetails(houseHold_details)"><h2>{{"✎"}}</h2></a></ion-col>
|
||||||
|
|||||||
@ -59,10 +59,21 @@
|
|||||||
<div fxLayout="column" fxLayoutAlign="start stretch" *ngIf="item.value.purchase_type=='1'">
|
<div fxLayout="column" fxLayoutAlign="start stretch" *ngIf="item.value.purchase_type=='1'">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
|
|
||||||
<mat-select placeholder="UOM" name="fk_uom_id" formControlName="fk_uom_id">
|
<!-- <mat-select placeholder="UOM" name="fk_uom_id" formControlName="fk_uom_id">
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option *ngFor="let uom of UOM" [value]="uom.uom_id">{{uom.name}}</mat-option>
|
<mat-option *ngFor="let uom of UOM" [value]="uom.uom_id">{{uom.name}}</mat-option>
|
||||||
</mat-select>
|
</mat-select> -->
|
||||||
|
<mat-select matInput placeholder="UOM" formControlName="fk_uom_id">
|
||||||
|
<mat-option>
|
||||||
|
<ngx-mat-select-search formControlName="uomSearch" (keyup)="searchUOM(item,i)"
|
||||||
|
[placeholderLabel]="'Find UOM'" [noEntriesFoundLabel]="'No Matching Result'">
|
||||||
|
<ion-icon name="md-close" ngxMatSelectSearchClear></ion-icon>
|
||||||
|
</ngx-mat-select-search>
|
||||||
|
</mat-option>
|
||||||
|
<mat-option [value]="U.uom_id" *ngFor="let U of UOMData">
|
||||||
|
{{U.name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -72,7 +83,7 @@
|
|||||||
<div *ngIf="item.value.purchase_type=='1'">
|
<div *ngIf="item.value.purchase_type=='1'">
|
||||||
<div fxLayout="column" fxLayoutAlign="start stretch" *ngIf="item.value.purchase_type=='1'">
|
<div fxLayout="column" fxLayoutAlign="start stretch" *ngIf="item.value.purchase_type=='1'">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput placeholder="Rate / Unit of Purchase" type="number" name="rate_per_unit" formControlName="rate_per_unit" (keyup)="inWords($event.target.value,i,1);purchaseCalculation(i,item.value)" required>
|
<input matInput placeholder="Rate / Unit of Purchase" type="number" name="rate_per_unit" formControlName="rate_per_unit" (keyup)="purchaseCalculation(i,item.value)" required>
|
||||||
<mat-hint align="end" style="font-size:12px" *ngIf="item.get('rate_per_unit').value != null"> {{"₹"}} {{RateOfPurchase[i]}} Only</mat-hint>
|
<mat-hint align="end" style="font-size:12px" *ngIf="item.get('rate_per_unit').value != null"> {{"₹"}} {{RateOfPurchase[i]}} Only</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -5,7 +5,8 @@ import { QuestionCategoryProvider } from '../../../providers/question-category/q
|
|||||||
import { ToastProvider } from '../../../providers/common-provider/toast';
|
import { ToastProvider } from '../../../providers/common-provider/toast';
|
||||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||||
import { ConstantsProvider } from '../../../providers/constants/constants'
|
import { ConstantsProvider } from '../../../providers/constants/constants'
|
||||||
|
import { takeUntil } from 'rxjs/operators';
|
||||||
|
import { Subject } from 'rxjs';
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionAssessedPurchasePage page.
|
* Generated class for the PdQuestionAssessedPurchasePage page.
|
||||||
*
|
*
|
||||||
@ -33,6 +34,9 @@ export class PdQuestionAssessedPurchasePage {
|
|||||||
productListData:any=[]
|
productListData:any=[]
|
||||||
check_type:any=[{'type_id':"1",'type_name':'Quantity and Rate Information'},{'type_id':"2",'type_name':'Value Information'}]
|
check_type:any=[{'type_id':"1",'type_name':'Quantity and Rate Information'},{'type_id':"2",'type_name':'Value Information'}]
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
|
UOMData:any=[];
|
||||||
|
protected _onDestroy = new Subject<void>();
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public fb:FormBuilder,public navParams: NavParams,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public aws:AwsServiceProvider,public cons:ConstantsProvider) {
|
constructor(public navCtrl: NavController, public fb:FormBuilder,public navParams: NavParams,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public aws:AwsServiceProvider,public cons:ConstantsProvider) {
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
this.purchaseDetails = this.navParams.get('purchase');
|
this.purchaseDetails = this.navParams.get('purchase');
|
||||||
@ -74,6 +78,7 @@ export class PdQuestionAssessedPurchasePage {
|
|||||||
purchase_type:['1'],
|
purchase_type:['1'],
|
||||||
purchase_qty:[null,Validators.compose([Validators.required])],
|
purchase_qty:[null,Validators.compose([Validators.required])],
|
||||||
fk_uom_id:[null,Validators.compose([Validators.required])],
|
fk_uom_id:[null,Validators.compose([Validators.required])],
|
||||||
|
uomSearch:[null],
|
||||||
uom_other:[null],
|
uom_other:[null],
|
||||||
rate_per_unit:[null,Validators.compose([Validators.required])],
|
rate_per_unit:[null,Validators.compose([Validators.required])],
|
||||||
fk_frequency_id:[null,Validators.compose([Validators.required])],
|
fk_frequency_id:[null,Validators.compose([Validators.required])],
|
||||||
@ -97,6 +102,7 @@ export class PdQuestionAssessedPurchasePage {
|
|||||||
{
|
{
|
||||||
if(res['dataStatus']==true){
|
if(res['dataStatus']==true){
|
||||||
this.UOM = res['records'].filter(uom=>uom.isactive==1);
|
this.UOM = res['records'].filter(uom=>uom.isactive==1);
|
||||||
|
this.UOMData=this.UOM.slice();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.qustCat.getcommondrop('BUSINESSEXPENSES').subscribe(res=>
|
this.qustCat.getcommondrop('BUSINESSEXPENSES').subscribe(res=>
|
||||||
@ -177,6 +183,12 @@ export class PdQuestionAssessedPurchasePage {
|
|||||||
{
|
{
|
||||||
console.log("value",values);
|
console.log("value",values);
|
||||||
let control:any = <FormArray>this.rawMaterialForm.controls['purchase'];
|
let control:any = <FormArray>this.rawMaterialForm.controls['purchase'];
|
||||||
|
if(values.rate_per_unit != null){
|
||||||
|
if(values.rate_per_unit != ''){
|
||||||
|
this.inWords(values.rate_per_unit,indexVal,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(values.purchase_type == "1" && values.purchase_qty!='' && values.rate_per_unit!='' && values.fk_frequency_id!='' && values.purchase_qty!=null && values.rate_per_unit!=null && values.fk_frequency_id!=null) {
|
if(values.purchase_type == "1" && values.purchase_qty!='' && values.rate_per_unit!='' && values.fk_frequency_id!='' && values.purchase_qty!=null && values.rate_per_unit!=null && values.fk_frequency_id!=null) {
|
||||||
let filterFrequencyValue: any = this.m_freqOfPurchase.filter(val =>val.frequency_id==values.fk_frequency_id);
|
let filterFrequencyValue: any = this.m_freqOfPurchase.filter(val =>val.frequency_id==values.fk_frequency_id);
|
||||||
control.controls[indexVal].controls['annual_purchase_value'].setValue((parseFloat(values.purchase_qty) * parseFloat(values.rate_per_unit) * parseFloat(filterFrequencyValue[0].mutiple_factor)).toFixed(2));
|
control.controls[indexVal].controls['annual_purchase_value'].setValue((parseFloat(values.purchase_qty) * parseFloat(values.rate_per_unit) * parseFloat(filterFrequencyValue[0].mutiple_factor)).toFixed(2));
|
||||||
@ -242,6 +254,10 @@ console.log("value",values);
|
|||||||
}
|
}
|
||||||
savepurchaseData(answerData)
|
savepurchaseData(answerData)
|
||||||
{
|
{
|
||||||
|
answerData.purchase.forEach(parVal=>{
|
||||||
|
delete parVal.uomSearch
|
||||||
|
})
|
||||||
|
|
||||||
if(this.rawMaterialForm.valid){
|
if(this.rawMaterialForm.valid){
|
||||||
let records = {'records':answerData.purchase};
|
let records = {'records':answerData.purchase};
|
||||||
console.log('data',records);
|
console.log('data',records);
|
||||||
@ -306,6 +322,7 @@ console.log("value",values);
|
|||||||
purchase_type:[data.purchase_type],
|
purchase_type:[data.purchase_type],
|
||||||
purchase_qty:[data.purchase_qty,Validators.compose([Validators.required])],
|
purchase_qty:[data.purchase_qty,Validators.compose([Validators.required])],
|
||||||
fk_uom_id:[data.fk_uom_id,Validators.compose([Validators.required])],
|
fk_uom_id:[data.fk_uom_id,Validators.compose([Validators.required])],
|
||||||
|
uomSearch:[null],
|
||||||
uom_other:[data.uom_other],
|
uom_other:[data.uom_other],
|
||||||
rate_per_unit:[data.rate_per_unit,Validators.compose([Validators.required])],
|
rate_per_unit:[data.rate_per_unit,Validators.compose([Validators.required])],
|
||||||
fk_frequency_id:[data.fk_frequency_id,Validators.compose([Validators.required])],
|
fk_frequency_id:[data.fk_frequency_id,Validators.compose([Validators.required])],
|
||||||
@ -337,6 +354,28 @@ console.log("value",values);
|
|||||||
this.purchaseCalculation(indexVal,control.controls[indexVal].value);
|
this.purchaseCalculation(indexVal,control.controls[indexVal].value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
searchUOM(control:any,i:number){
|
||||||
|
control.controls['uomSearch'].valueChanges
|
||||||
|
.pipe(takeUntil(this._onDestroy))
|
||||||
|
.subscribe(()=>{
|
||||||
|
let val = control.controls['uomSearch'].value;
|
||||||
|
if (!this.UOM) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let searchVal = val
|
||||||
|
if (!searchVal) {
|
||||||
|
|
||||||
|
this.UOMData=this.UOM.slice()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
searchVal = searchVal.toLowerCase()
|
||||||
|
}
|
||||||
|
this.UOMData=this.UOM.filter(res => res.name.toLowerCase().indexOf(searchVal) > -1)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
inWords(e,c,flag){
|
inWords(e,c,flag){
|
||||||
switch(flag){
|
switch(flag){
|
||||||
case 1 :
|
case 1 :
|
||||||
|
|||||||
@ -37,10 +37,22 @@
|
|||||||
<input type="number" matInput placeholder="Sale Quantity" (keyup)="salesCalculation(i,item.value)" formControlName="sales_qty" name="sales_qty">
|
<input type="number" matInput placeholder="Sale Quantity" (keyup)="salesCalculation(i,item.value)" formControlName="sales_qty" name="sales_qty">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<mat-select placeholder="UOM" name="fk_uom_id" formControlName="fk_uom_id" >
|
<!-- <mat-select placeholder="UOM" name="fk_uom_id" formControlName="fk_uom_id" >
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option *ngFor="let uom of UOM" [value]="uom.uom_id">{{uom.name}}</mat-option>
|
<mat-option *ngFor="let uom of UOM" [value]="uom.uom_id">{{uom.name}}</mat-option>
|
||||||
</mat-select>
|
</mat-select> -->
|
||||||
|
<mat-select matInput placeholder="UOM" formControlName="fk_uom_id">
|
||||||
|
<mat-option>
|
||||||
|
<ngx-mat-select-search formControlName="uomSearch" (keyup)="searchUOM(item,i)"
|
||||||
|
[placeholderLabel]="'Find UOM'" [noEntriesFoundLabel]="'No Matching Result'">
|
||||||
|
<ion-icon name="md-close" ngxMatSelectSearchClear></ion-icon>
|
||||||
|
</ngx-mat-select-search>
|
||||||
|
</mat-option>
|
||||||
|
<mat-option [value]="U.uom_id" *ngFor="let U of UOMData">
|
||||||
|
|
||||||
|
{{U.name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 100%" *ngIf="item.controls['fk_uom_id'].value == 1">
|
<mat-form-field style="width: 100%" *ngIf="item.controls['fk_uom_id'].value == 1">
|
||||||
<input matInput type="text" autocomplete="off" formControlName="uom_other" placeholder="Other UOM">
|
<input matInput type="text" autocomplete="off" formControlName="uom_other" placeholder="Other UOM">
|
||||||
|
|||||||
@ -5,7 +5,8 @@ import { FormGroup, FormBuilder, Validators, FormArray } from '@angular/forms';
|
|||||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||||
import { ToastProvider } from '../../../providers/common-provider/toast';
|
import { ToastProvider } from '../../../providers/common-provider/toast';
|
||||||
import {ConstantsProvider} from '../../../providers/constants/constants'
|
import {ConstantsProvider} from '../../../providers/constants/constants'
|
||||||
|
import { takeUntil } from 'rxjs/operators';
|
||||||
|
import { Subject } from 'rxjs';
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionAssessedSalesPage page.
|
* Generated class for the PdQuestionAssessedSalesPage page.
|
||||||
*
|
*
|
||||||
@ -38,6 +39,8 @@ export class PdQuestionAssessedSalesPage {
|
|||||||
check_type:any=[{'type_id':"1",'type_name':'Quantity and Rate Information'},{'type_id':"2",'type_name':'Value Information'}]
|
check_type:any=[{'type_id':"1",'type_name':'Quantity and Rate Information'},{'type_id':"2",'type_name':'Value Information'}]
|
||||||
product_and_services: any=[];
|
product_and_services: any=[];
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
|
UOMData:any=[]
|
||||||
|
protected _onDestroy = new Subject<void>();
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public cons:ConstantsProvider) {
|
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public cons:ConstantsProvider) {
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
this.FormId = this.navParams.get('FormId');
|
this.FormId = this.navParams.get('FormId');
|
||||||
@ -81,6 +84,7 @@ export class PdQuestionAssessedSalesPage {
|
|||||||
{
|
{
|
||||||
if(res['dataStatus']==true){
|
if(res['dataStatus']==true){
|
||||||
this.UOM = res['records'].filter(uom=>uom.isactive==1);
|
this.UOM = res['records'].filter(uom=>uom.isactive==1);
|
||||||
|
this.UOMData=this.UOM.slice();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -134,6 +138,7 @@ export class PdQuestionAssessedSalesPage {
|
|||||||
sales_qty:[null,Validators.compose([Validators.required])],
|
sales_qty:[null,Validators.compose([Validators.required])],
|
||||||
sales_type:["1"],
|
sales_type:["1"],
|
||||||
fk_uom_id:[null,Validators.compose([Validators.required])],
|
fk_uom_id:[null,Validators.compose([Validators.required])],
|
||||||
|
uomSearch:[null],
|
||||||
uom_other:[null],
|
uom_other:[null],
|
||||||
rate_per_unit:[null,Validators.compose([Validators.required])],
|
rate_per_unit:[null,Validators.compose([Validators.required])],
|
||||||
fk_frequency_id:[null,Validators.compose([Validators.required])],
|
fk_frequency_id:[null,Validators.compose([Validators.required])],
|
||||||
@ -385,6 +390,10 @@ export class PdQuestionAssessedSalesPage {
|
|||||||
{
|
{
|
||||||
|
|
||||||
if(this.assessedForm.valid){
|
if(this.assessedForm.valid){
|
||||||
|
answerData.salesCalItemwise.forEach(parVal=>{
|
||||||
|
delete parVal.uomSearch
|
||||||
|
});
|
||||||
|
|
||||||
let records = {'records':answerData.salesCalItemwise};
|
let records = {'records':answerData.salesCalItemwise};
|
||||||
console.log(records);
|
console.log(records);
|
||||||
this.qustCat.saveassessedForms('saveAssessedIncomeSalesCalculatedByItemwise',records).subscribe(res=>
|
this.qustCat.saveassessedForms('saveAssessedIncomeSalesCalculatedByItemwise',records).subscribe(res=>
|
||||||
@ -471,6 +480,27 @@ else{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
searchUOM(control:any,i:number){
|
||||||
|
control.controls['uomSearch'].valueChanges
|
||||||
|
.pipe(takeUntil(this._onDestroy))
|
||||||
|
.subscribe(()=>{
|
||||||
|
let val = control.controls['uomSearch'].value;
|
||||||
|
if (!this.UOM) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let searchVal = val
|
||||||
|
if (!searchVal) {
|
||||||
|
|
||||||
|
this.UOMData=this.UOM.slice()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
searchVal = searchVal.toLowerCase()
|
||||||
|
}
|
||||||
|
this.UOMData=this.UOM.filter(res => res.name.toLowerCase().indexOf(searchVal) > -1)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
createSaleswithData(data)
|
createSaleswithData(data)
|
||||||
{
|
{
|
||||||
return this.fb.group(
|
return this.fb.group(
|
||||||
@ -483,6 +513,7 @@ else{
|
|||||||
sales_type:[data.sales_type,Validators.compose([Validators.required])],
|
sales_type:[data.sales_type,Validators.compose([Validators.required])],
|
||||||
sales_qty:[data.sales_qty,Validators.compose([Validators.required])],
|
sales_qty:[data.sales_qty,Validators.compose([Validators.required])],
|
||||||
fk_uom_id:[data.fk_uom_id,Validators.compose([Validators.required])],
|
fk_uom_id:[data.fk_uom_id,Validators.compose([Validators.required])],
|
||||||
|
uomSearch:[null],
|
||||||
uom_other:[data.uom_other],
|
uom_other:[data.uom_other],
|
||||||
rate_per_unit:[data.rate_per_unit,Validators.compose([Validators.required])],
|
rate_per_unit:[data.rate_per_unit,Validators.compose([Validators.required])],
|
||||||
fk_frequency_id:[data.fk_frequency_id,Validators.compose([Validators.required])],
|
fk_frequency_id:[data.fk_frequency_id,Validators.compose([Validators.required])],
|
||||||
|
|||||||
@ -137,7 +137,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field *ngIf="(itemrow.get('business_ownership_type').value == 'rented')">
|
<mat-form-field *ngIf="(itemrow.get('business_ownership_type').value == 'rented')">
|
||||||
<input matInput autocomplete="off" placeholder="Monthly Rent Amount"
|
<input matInput autocomplete="off" [placeholder]= "'Monthly ' + addressType + ' Rent Amount'"
|
||||||
formControlName="business_monthly_rented_amt" type='numbers' (keyup)="inWords($event,i,9)">
|
formControlName="business_monthly_rented_amt" type='numbers' (keyup)="inWords($event,i,9)">
|
||||||
<mat-hint align="end" style="font-size:12px"
|
<mat-hint align="end" style="font-size:12px"
|
||||||
*ngIf="itemrow.get('business_monthly_rented_amt').value != ''">{{"₹"}}
|
*ngIf="itemrow.get('business_monthly_rented_amt').value != ''">{{"₹"}}
|
||||||
@ -161,8 +161,8 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select multiple placeholder="Asset Owned by" formControlName="business_name_of_the_owner"
|
<mat-select multiple [placeholder]="addressType + ' Owned by'" formControlName="business_name_of_the_owner"
|
||||||
[compareWith]="compareObjects" (selectionChange)="setRequiredValidation($event.value,itemrow,8)">
|
[compareWith]="compareObjects" (selectionChange)="setRequiredValidation($event.value,itemrow,8,i)">
|
||||||
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||||
<mat-option *ngFor="let val of group.groupValues" [value]="val">
|
<mat-option *ngFor="let val of group.groupValues" [value]="val">
|
||||||
{{val.name}}
|
{{val.name}}
|
||||||
@ -176,7 +176,7 @@
|
|||||||
<input matInput placeholder="business_name_of_the_owner" formControlName="business_name_of_the_owner" autocomplete="off">
|
<input matInput placeholder="business_name_of_the_owner" formControlName="business_name_of_the_owner" autocomplete="off">
|
||||||
</mat-form-field> -->
|
</mat-form-field> -->
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<mat-form-field style="width:100%" *ngIf="isOtherOwnerForAddress">
|
<mat-form-field style="width:100%" *ngIf="checkOthers(itemrow.get('business_name_of_the_owner').value) === true">
|
||||||
<input matInput placeholder="Specify Asset Owned Name"
|
<input matInput placeholder="Specify Asset Owned Name"
|
||||||
formControlName="business_name_of_the_other_owner" autocomplete="off">
|
formControlName="business_name_of_the_other_owner" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|||||||
@ -58,6 +58,7 @@ export class PdQuestionBusinessAssetsPage {
|
|||||||
appxMarketAmtInwordsForAddress: any =[];
|
appxMarketAmtInwordsForAddress: any =[];
|
||||||
isOtherOwnerForAddress : boolean = false;
|
isOtherOwnerForAddress : boolean = false;
|
||||||
isOtherOwner: boolean = false;
|
isOtherOwner: boolean = false;
|
||||||
|
addressType:any = '';
|
||||||
public m_vehicle_type = [];
|
public m_vehicle_type = [];
|
||||||
cityArr: any=[];
|
cityArr: any=[];
|
||||||
pinArr: any=[];
|
pinArr: any=[];
|
||||||
@ -130,12 +131,12 @@ export class PdQuestionBusinessAssetsPage {
|
|||||||
let selectedPincode = this.pinArr.filter(element => element.pincode_id == data.pincode)[0];
|
let selectedPincode = this.pinArr.filter(element => element.pincode_id == data.pincode)[0];
|
||||||
|
|
||||||
console.log(selectedCity)
|
console.log(selectedCity)
|
||||||
let addressType
|
|
||||||
if(selectedAddressType != '' && selectedAddressType != undefined){
|
if(selectedAddressType != '' && selectedAddressType != undefined){
|
||||||
addressType = data.address_type != 1 ? selectedAddressType.address_type : data.address_type_others;
|
this.addressType = data.address_type != 1 ? selectedAddressType.address_type : data.address_type_others;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
addressType=''
|
this.addressType=''
|
||||||
}
|
}
|
||||||
let address = data.address + ' , ' + selectedCity.city_name + ','+selectedState.name +'-' + (data.pincode == 1 ? data.pincode_others : selectedPincode.pincode);
|
let address = data.address + ' , ' + selectedCity.city_name + ','+selectedState.name +'-' + (data.pincode == 1 ? data.pincode_others : selectedPincode.pincode);
|
||||||
|
|
||||||
@ -144,9 +145,9 @@ export class PdQuestionBusinessAssetsPage {
|
|||||||
// let address = data.address;
|
// let address = data.address;
|
||||||
// let addressType = data.address_type != 1 ? selectedAddressType.address_type : data.address_type_others;
|
// let addressType = data.address_type != 1 ? selectedAddressType.address_type : data.address_type_others;
|
||||||
|
|
||||||
this.placeholderName[inx] = 'Was any business activity seen at the '+addressType+' during PD visit?';
|
this.placeholderName[inx] = 'Was any business activity seen at the '+ this.addressType+' during PD visit?';
|
||||||
//console.log(this.placeholderName)
|
//console.log(this.placeholderName)
|
||||||
let addressLabel = " : "+address+' / '+addressType ;
|
let addressLabel = " : "+address+' / '+ this.addressType ;
|
||||||
console.log("dd",addressLabel)
|
console.log("dd",addressLabel)
|
||||||
let values={
|
let values={
|
||||||
address_label:addressLabel,
|
address_label:addressLabel,
|
||||||
@ -491,6 +492,7 @@ createBusinessAssetsForAddress(): FormGroup {
|
|||||||
if(datas.address_label != null && datas.address_label !=''){
|
if(datas.address_label != null && datas.address_label !=''){
|
||||||
let splitted=datas.address_label.split('/')[1]
|
let splitted=datas.address_label.split('/')[1]
|
||||||
this.placeholderName[index]='Was any business activity seen at the '+splitted+' during PD visit?';
|
this.placeholderName[index]='Was any business activity seen at the '+splitted+' during PD visit?';
|
||||||
|
this.addressType = splitted;
|
||||||
}
|
}
|
||||||
this.RentAmtInwordsForAddress[index] = this.cons.convertNumberToWords(datas.business_monthly_rented_amt);
|
this.RentAmtInwordsForAddress[index] = this.cons.convertNumberToWords(datas.business_monthly_rented_amt);
|
||||||
this.appxMarketAmtInwordsForAddress[index] = this.cons.convertNumberToWords(datas.business_approximate_market_value);
|
this.appxMarketAmtInwordsForAddress[index] = this.cons.convertNumberToWords(datas.business_approximate_market_value);
|
||||||
@ -750,8 +752,18 @@ createBusinessAssetsForAddress(): FormGroup {
|
|||||||
|
|
||||||
// // check others
|
// // check others
|
||||||
checkOthers(values){
|
checkOthers(values){
|
||||||
if(values!=null) {
|
// if(values!=null) {
|
||||||
return values.id==0 ? true : false;
|
// return values.id==0 ? true : false;
|
||||||
|
// }
|
||||||
|
if(values.length > 0) {
|
||||||
|
// return values.id==0 ? true : false;
|
||||||
|
let Avaliablity = 1;
|
||||||
|
values.forEach(option => {
|
||||||
|
if(option.id == 0 && option.group_id == 2){
|
||||||
|
Avaliablity = option.id;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return Avaliablity == 0 ? true : false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -1526,86 +1526,211 @@
|
|||||||
<mat-card-title>Documents Sighted </mat-card-title>
|
<mat-card-title>Documents Sighted </mat-card-title>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content class="matcard">
|
<mat-card-content class="matcard">
|
||||||
|
<ion-grid>
|
||||||
|
<ion-row>
|
||||||
|
<ion-col>
|
||||||
|
<p>Shop and Est Act Cert</p>
|
||||||
|
<mat-radio-group formControlName="shop_eat_act_cert" (change)="radioChange($event,1)">
|
||||||
|
|
||||||
|
<mat-radio-button value="yes">Yes</mat-radio-button>
|
||||||
|
<mat-radio-button value="no">No</mat-radio-button>
|
||||||
|
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
||||||
|
|
||||||
|
</mat-radio-group>
|
||||||
|
</ion-col>
|
||||||
|
<ion-col>
|
||||||
|
<div float-right *ngIf="businessForm.controls['shop_eat_act_cert'].value == 'yes'">
|
||||||
|
<br>
|
||||||
|
<div *ngIf="businessForm.controls['shop_eat_act_cert_pic'].value !== ''" >
|
||||||
|
<img src="{{businessForm.controls['shop_eat_act_cert_pic'].value}}" imageViewer style ="width: 40px;height: 35px;">
|
||||||
|
</div>
|
||||||
|
<div *ngIf="businessForm.controls['shop_eat_act_cert_pic'].value === ''" >
|
||||||
|
<label style="display: block; text-align: center !important;"> Shop and Est Act Cert
|
||||||
|
Image </label>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: -webkit-center;" >
|
||||||
|
<ion-icon title="Click Here For Person Met Image" name="md-camera" (click)="ImageUpload(1)"></ion-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
|
||||||
|
<ion-row>
|
||||||
|
<ion-col>
|
||||||
|
<p>GST Regn Cert</p>
|
||||||
|
<mat-radio-group formControlName="gst_Regn_cert" (change)="radioChange($event,2)">
|
||||||
|
|
||||||
|
<mat-radio-button value="yes">Yes</mat-radio-button>
|
||||||
|
<mat-radio-button value="no">No</mat-radio-button>
|
||||||
|
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
||||||
|
|
||||||
|
|
||||||
<p>Shop and Est Act Cert</p>
|
</mat-radio-group>
|
||||||
<mat-radio-group formControlName="shop_eat_act_cert">
|
</ion-col>
|
||||||
|
<ion-col>
|
||||||
|
<div float-right *ngIf="businessForm.controls['gst_Regn_cert'].value == 'yes'">
|
||||||
|
<br>
|
||||||
|
<div *ngIf="businessForm.controls['gst_Regn_cert_pic'].value !== ''" >
|
||||||
|
<img src="{{businessForm.controls['gst_Regn_cert_pic'].value}}" imageViewer style ="width: 40px;height: 35px;">
|
||||||
|
</div>
|
||||||
|
<div *ngIf="businessForm.controls['gst_Regn_cert_pic'].value === ''" >
|
||||||
|
<label style="display: block; text-align: center !important;"> GST Regn Cert
|
||||||
|
Image </label>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: -webkit-center;" >
|
||||||
|
<ion-icon title="Click Here For Person Met Image" name="md-camera" (click)="ImageUpload(2)"></ion-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<mat-radio-button value="yes">Yes</mat-radio-button>
|
</ion-col>
|
||||||
<mat-radio-button value="no">No</mat-radio-button>
|
</ion-row>
|
||||||
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
|
||||||
|
<ion-row *ngIf="businessForm.controls['export_import_cert']">
|
||||||
|
<ion-col>
|
||||||
|
<p>Export / Import cert</p>
|
||||||
|
<mat-radio-group formControlName="export_import_cert" (change)="radioChange($event,3)">
|
||||||
|
|
||||||
|
<mat-radio-button value="yes">Yes</mat-radio-button>
|
||||||
|
<mat-radio-button value="no">No</mat-radio-button>
|
||||||
|
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
||||||
|
|
||||||
|
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
|
</ion-col>
|
||||||
|
<ion-col>
|
||||||
|
<div float-right *ngIf="businessForm.controls['export_import_cert'].value == 'yes'">
|
||||||
|
<br>
|
||||||
|
<div *ngIf="businessForm.controls['export_import_cert_pic'].value !== ''" >
|
||||||
|
<img src="{{businessForm.controls['export_import_cert_pic'].value}}" imageViewer style ="width: 40px;height: 35px;">
|
||||||
|
</div>
|
||||||
|
<div *ngIf="businessForm.controls['export_import_cert_pic'].value === ''" >
|
||||||
|
<label style="display: block; text-align: center !important;"> Export / Import cert
|
||||||
|
Image </label>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: -webkit-center;" >
|
||||||
|
<ion-icon title="Click Here For Person Met Image" name="md-camera" (click)="ImageUpload(3)"></ion-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<p>GST Regn Cert</p>
|
</ion-col>
|
||||||
<mat-radio-group formControlName="gst_Regn_cert">
|
</ion-row>
|
||||||
|
|
||||||
<mat-radio-button value="yes">Yes</mat-radio-button>
|
<ion-row *ngIf="businessForm.controls['factory_cert']">
|
||||||
<mat-radio-button value="no">No</mat-radio-button>
|
<ion-col>
|
||||||
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
|
||||||
|
<p>Factory Cert</p>
|
||||||
|
<mat-radio-group formControlName="factory_cert" (change)="radioChange($event,4)">
|
||||||
|
|
||||||
|
<mat-radio-button value="yes">Yes</mat-radio-button>
|
||||||
|
<mat-radio-button value="no">No</mat-radio-button>
|
||||||
|
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
||||||
|
</mat-radio-group>
|
||||||
|
</ion-col>
|
||||||
|
<ion-col>
|
||||||
|
<div float-right *ngIf="businessForm.controls['factory_cert'].value == 'yes'">
|
||||||
|
<br>
|
||||||
|
<div *ngIf="businessForm.controls['factory_cert_pic'].value !== ''" >
|
||||||
|
<img src="{{businessForm.controls['factory_cert_pic'].value}}" imageViewer style ="width: 40px;height: 35px;">
|
||||||
|
</div>
|
||||||
|
<div *ngIf="businessForm.controls['factory_cert_pic'].value === ''" >
|
||||||
|
<label style="display: block; text-align: center !important;"> Factory Cert
|
||||||
|
Image </label>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: -webkit-center;" >
|
||||||
|
<ion-icon title="Click Here For Person Met Image" name="md-camera" (click)="ImageUpload(4)"></ion-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
|
||||||
|
<ion-row *ngIf="businessForm.controls['practice_cert']">
|
||||||
|
<ion-col>
|
||||||
|
<p>Cert of Practice</p>
|
||||||
|
<mat-radio-group formControlName="practice_cert" (change)="radioChange($event,5)">
|
||||||
|
|
||||||
|
<mat-radio-button value="yes">Yes</mat-radio-button>
|
||||||
|
<mat-radio-button value="no">No</mat-radio-button>
|
||||||
|
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
||||||
|
|
||||||
|
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
|
</ion-col>
|
||||||
|
<ion-col>
|
||||||
|
<div float-right *ngIf="businessForm.controls['practice_cert'].value == 'yes'">
|
||||||
|
<br>
|
||||||
|
<div *ngIf="businessForm.controls['practice_cert_pic'].value !== ''" >
|
||||||
|
<img src="{{businessForm.controls['practice_cert_pic'].value}}" imageViewer style ="width: 40px;height: 35px;">
|
||||||
|
</div>
|
||||||
|
<div *ngIf="businessForm.controls['practice_cert_pic'].value === ''" >
|
||||||
|
<label style="display: block; text-align: center !important;"> Cert of Practice
|
||||||
|
Image </label>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: -webkit-center;" >
|
||||||
|
<ion-icon title="Click Here For Person Met Image" name="md-camera" (click)="ImageUpload(5)"></ion-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
|
||||||
<div *ngIf="businessForm.controls['export_import_cert']">
|
<ion-row>
|
||||||
<p>Export / Import cert</p>
|
<ion-col>
|
||||||
<mat-radio-group formControlName="export_import_cert">
|
<p>PF Regn</p>
|
||||||
|
<mat-radio-group formControlName="pf_regn" (change)="radioChange($event,6)">
|
||||||
|
|
||||||
<mat-radio-button value="yes">Yes</mat-radio-button>
|
<mat-radio-button value="yes">Yes</mat-radio-button>
|
||||||
<mat-radio-button value="no">No</mat-radio-button>
|
<mat-radio-button value="no">No</mat-radio-button>
|
||||||
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
||||||
|
|
||||||
|
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
</div>
|
</ion-col>
|
||||||
|
<ion-col>
|
||||||
|
<div float-right *ngIf="businessForm.controls['pf_regn'].value == 'yes'">
|
||||||
|
<br>
|
||||||
|
<div *ngIf="businessForm.controls['pf_regn_pic'].value !== ''" >
|
||||||
|
<img src="{{businessForm.controls['pf_regn_pic'].value}}" imageViewer style ="width: 40px;height: 35px;">
|
||||||
|
</div>
|
||||||
|
<div *ngIf="businessForm.controls['pf_regn_pic'].value === ''" >
|
||||||
|
<label style="display: block; text-align: center !important;"> PF Regn
|
||||||
|
Image </label>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: -webkit-center;" >
|
||||||
|
<ion-icon title="Click Here For Person Met Image" name="md-camera" (click)="ImageUpload(6)"></ion-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
|
||||||
<div *ngIf="businessForm.controls['factory_cert']">
|
<ion-row>
|
||||||
<p>Factory Cert</p>
|
<ion-col>
|
||||||
<mat-radio-group formControlName="factory_cert">
|
<p>ESIC Regn</p>
|
||||||
|
<mat-radio-group formControlName="esic_regn" (change)="radioChange($event,7)">
|
||||||
<mat-radio-button value="yes">Yes</mat-radio-button>
|
|
||||||
<mat-radio-button value="no">No</mat-radio-button>
|
|
||||||
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
|
||||||
</mat-radio-group>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div *ngIf="businessForm.controls['practice_cert']">
|
|
||||||
|
|
||||||
|
|
||||||
<p>Cert of Practice</p>
|
|
||||||
<mat-radio-group formControlName="practice_cert">
|
|
||||||
|
|
||||||
<mat-radio-button value="yes">Yes</mat-radio-button>
|
|
||||||
<mat-radio-button value="no">No</mat-radio-button>
|
|
||||||
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
|
||||||
|
|
||||||
|
|
||||||
</mat-radio-group>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p>PF Regn</p>
|
|
||||||
<mat-radio-group formControlName="pf_regn">
|
|
||||||
|
|
||||||
<mat-radio-button value="yes">Yes</mat-radio-button>
|
|
||||||
<mat-radio-button value="no">No</mat-radio-button>
|
|
||||||
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
|
||||||
|
|
||||||
|
|
||||||
</mat-radio-group>
|
|
||||||
|
|
||||||
<p>ESIC Regn</p>
|
|
||||||
<mat-radio-group formControlName="esic_regn">
|
|
||||||
|
|
||||||
<mat-radio-button value="yes">Yes</mat-radio-button>
|
|
||||||
<mat-radio-button value="no">No</mat-radio-button>
|
|
||||||
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
|
||||||
</mat-radio-group>
|
|
||||||
|
|
||||||
|
<mat-radio-button value="yes">Yes</mat-radio-button>
|
||||||
|
<mat-radio-button value="no">No</mat-radio-button>
|
||||||
|
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
||||||
|
</mat-radio-group>
|
||||||
|
</ion-col>
|
||||||
|
<ion-col>
|
||||||
|
<div float-right *ngIf="businessForm.controls['esic_regn'].value == 'yes'">
|
||||||
|
<br>
|
||||||
|
<div *ngIf="businessForm.controls['esic_regn_pic'].value !== ''" >
|
||||||
|
<img src="{{businessForm.controls['esic_regn_pic'].value}}" imageViewer style ="width: 40px;height: 35px;">
|
||||||
|
</div>
|
||||||
|
<div *ngIf="businessForm.controls['esic_regn_pic'].value === ''" >
|
||||||
|
<label style="display: block; text-align: center !important;"> ESIC Regn
|
||||||
|
Image </label>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: -webkit-center;" >
|
||||||
|
<ion-icon title="Click Here For Person Met Image" name="md-camera" (click)="ImageUpload(7)"></ion-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
|
||||||
|
</ion-grid>
|
||||||
|
|
||||||
<p>Do You Want to Add Other Documents?</p>
|
<p>Do You Want to Add Other Documents?</p>
|
||||||
<mat-radio-group formControlName="other_documents">
|
<mat-radio-group formControlName="other_documents">
|
||||||
|
|||||||
@ -137,7 +137,8 @@ export class PdQuestionBusinessInfoPage {
|
|||||||
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: [''],
|
||||||
gst_Regn_cert: [''],
|
shop_eat_act_cert_pic:[''],
|
||||||
|
gst_Regn_cert: [''],
|
||||||
//export_import_cert: [''],
|
//export_import_cert: [''],
|
||||||
// factory_cert: [''],
|
// factory_cert: [''],
|
||||||
//practice_cert: [''],
|
//practice_cert: [''],
|
||||||
@ -297,6 +298,7 @@ changeOfStartedBusiness(members,i,e){
|
|||||||
//max_sale_state.push(this.maxSaleState())
|
//max_sale_state.push(this.maxSaleState())
|
||||||
|
|
||||||
if(data['status']==200){
|
if(data['status']==200){
|
||||||
|
|
||||||
let DocArray: any;
|
let DocArray: any;
|
||||||
let PartnrArray=Object.keys(data['records'].partners).map(function(key){
|
let PartnrArray=Object.keys(data['records'].partners).map(function(key){
|
||||||
return data['records'].partners[key];
|
return data['records'].partners[key];
|
||||||
@ -755,8 +757,11 @@ changeOfStartedBusiness(members,i,e){
|
|||||||
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)); }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// this.businessForm.controls['partners'].setValue(PartnrArray);
|
// this.businessForm.controls['partners'].setValue(PartnrArray);
|
||||||
//this.businessForm.controls['persons_with_relationships'].setValue(PartnrArray1)
|
//this.businessForm.controls['persons_with_relationships'].setValue(PartnrArray1)
|
||||||
|
|
||||||
@ -774,12 +779,21 @@ changeOfStartedBusiness(members,i,e){
|
|||||||
posControl.push(this.createPOSMachinesDetails(businessVal.pos_machines_details));
|
posControl.push(this.createPOSMachinesDetails(businessVal.pos_machines_details));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
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'].factory_cert =='yes'){ this.businessForm.addControl('factory_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('factory_cert_pic');}
|
||||||
|
if(data['records'].practice_cert_cert =='yes'){ this.businessForm.addControl('practice_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('practice_cert_pic');}
|
||||||
|
if(data['records'].shop_eat_act_cert =='yes'){ alert('if control'); this.businessForm.addControl('shop_eat_act_cert_pic', new FormControl('')); }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'].esic_regn =='yes'){ this.businessForm.addControl('esic_regn_pic', new FormControl('')); }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');}
|
||||||
|
|
||||||
this.businessForm.setValue(businessVal);
|
this.businessForm.setValue(businessVal);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
console.log('console.log 2');
|
||||||
Partnr.push(this.createPartners());
|
Partnr.push(this.createPartners());
|
||||||
control1.push(this.createRelationShip())
|
control1.push(this.createRelationShip())
|
||||||
|
|
||||||
@ -797,11 +811,41 @@ changeOfStartedBusiness(members,i,e){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
// change business sessional
|
// change business sessional
|
||||||
this.businessForm.controls['seasonality'].valueChanges.subscribe(val => {
|
this.businessForm.controls['seasonality'].valueChanges.subscribe(val => {
|
||||||
val.toUpperCase()=='YES' ? this.businessForm.addControl('peak_period_of_business', new FormControl('', Validators.required)) : this.businessForm.removeControl('peak_period_of_business');
|
val.toUpperCase()=='YES' ? this.businessForm.addControl('peak_period_of_business', new FormControl('', Validators.required)) : this.businessForm.removeControl('peak_period_of_business');
|
||||||
val.toUpperCase()=='YES' ? this.businessForm.addControl('month_of_business_run', new FormControl('', Validators.required)) : this.businessForm.removeControl('month_of_business_run');
|
val.toUpperCase()=='YES' ? this.businessForm.addControl('month_of_business_run', new FormControl('', Validators.required)) : this.businessForm.removeControl('month_of_business_run');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// if(this.businessForm.controls['gst_Regn_cert']){
|
||||||
|
// this.businessForm.controls['gst_Regn_cert'].valueChanges.subscribe(val => {
|
||||||
|
|
||||||
|
// val.toUpperCase()=='YES' ? this.businessForm.addControl('gst_Regn_cert_pic', new FormControl('')) : this.businessForm.removeControl('gst_Regn_cert_pic');
|
||||||
|
// });}
|
||||||
|
// if(this.businessForm.controls['factory_cert']){
|
||||||
|
// 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');
|
||||||
|
// });}
|
||||||
|
// if(this.businessForm.controls['practice_cert_cert']){
|
||||||
|
// this.businessForm.controls['practice_cert_cert'].valueChanges.subscribe(val => {
|
||||||
|
// 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']){
|
||||||
|
// this.businessForm.controls['shop_eat_act_cert'].valueChanges.subscribe(val => {
|
||||||
|
// val.toUpperCase()=='YES' ? this.businessForm.addControl('shop_eat_act_cert_pic', new FormControl('')) : this.businessForm.removeControl('shop_eat_act_cert_pic');
|
||||||
|
// });}
|
||||||
|
// if(this.businessForm.controls['pf_regn']){
|
||||||
|
// this.businessForm.controls['pf_regn'].valueChanges.subscribe(val => {
|
||||||
|
// val.toUpperCase()=='YES' ? this.businessForm.addControl('pf_regn_pic', new FormControl('')) : this.businessForm.removeControl('pf_regn_pic');
|
||||||
|
// });}
|
||||||
|
// if(this.businessForm.controls['esic_regn']){
|
||||||
|
// this.businessForm.controls['esic_regn'].valueChanges.subscribe(val => {
|
||||||
|
// val.toUpperCase()=='YES' ? this.businessForm.addControl('esic_regn_pic', new FormControl('')) : this.businessForm.removeControl('esic_regn_pic');
|
||||||
|
// });}
|
||||||
|
// if(this.businessForm.controls['export_import_cert']){
|
||||||
|
// this.businessForm.controls['export_import_cert'].valueChanges.subscribe(val => {
|
||||||
|
// val.toUpperCase()=='YES' ? this.businessForm.addControl('export_import_cert_pic', new FormControl('')) : this.businessForm.removeControl('export_import_cert_pic');
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2241,7 +2285,33 @@ toGetPOSMachinesDetails(e,flag){
|
|||||||
value.get('partner_other_name').setValue(this.cons.sentenceCase(name));
|
value.get('partner_other_name').setValue(this.cons.sentenceCase(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImageUpload(Flag : any){
|
||||||
|
// alert('Inside Mobile Upload Function' + Flag);
|
||||||
|
|
||||||
|
// alert('is_person_met_pic 1');
|
||||||
|
this.cameraProvider.getpicture().then(res=>{
|
||||||
|
|
||||||
|
if(Flag == 1 ){ this.businessForm.controls.shop_eat_act_cert_pic.setValue(res != 'error' ? res : ''); alert('Inside Mobile Upload Function' + Flag);}
|
||||||
|
if(Flag == 2 ){ this.businessForm.controls.gst_Regn_cert_pic.setValue(res != 'error' ? res : ''); alert('Inside Mobile Upload Function' + Flag);}
|
||||||
|
if(Flag == 3 ){ this.businessForm.controls.export_import_cert_pic.setValue(res != 'error' ? res : ''); alert('Inside Mobile Upload Function' + Flag);}
|
||||||
|
if(Flag == 4 ){ this.businessForm.controls.factory_cert_pic.setValue(res != 'error' ? res : ''); alert('Inside Mobile Upload Function' + Flag);}
|
||||||
|
if(Flag == 5 ){ this.businessForm.controls.practice_cert_pic.setValue(res != 'error' ? res : ''); alert('Inside Mobile Upload Function' + Flag);}
|
||||||
|
if(Flag == 6 ){ this.businessForm.controls.pf_regn_pic.setValue(res != 'error' ? res : ''); alert('Inside Mobile Upload Function' + Flag);}
|
||||||
|
if(Flag == 7 ){ this.businessForm.controls.esic_regn_pic.setValue(res != 'error' ? res : ''); alert('Inside Mobile Upload Function' + Flag);}
|
||||||
|
|
||||||
|
// console.table('1',this.businessForm.value);
|
||||||
|
},error=>{
|
||||||
|
console.log("Camera Error ",JSON.stringify(error));
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
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 == 2) {event.value =='yes' ? this.businessForm.addControl('gst_Regn_cert_pic', new FormControl('')) : 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 == 5) {event.value =='yes' ? this.businessForm.addControl('practice_cert_pic', new FormControl('')) : 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 == 7) {event.value =='yes' ? this.businessForm.addControl('esic_regn_pic', new FormControl('')) : 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');}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -363,17 +363,84 @@
|
|||||||
<mat-option value="no">No</mat-option>
|
<mat-option value="no">No</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:100%;" *ngIf="financialForm.controls.is_there_working_capital_available.value == 'yes'">
|
<!-- <mat-form-field style="width:100%;" *ngIf="financialForm.controls.is_there_working_capital_available.value == 'yes'">
|
||||||
<mat-select multiple formControlName="working_capital_facilities_availed"
|
<mat-select multiple formControlName="working_capital_facilities_availed"
|
||||||
placeholder="Working Capital Facilities availed">
|
placeholder="Working Capital Facilities availed">
|
||||||
<!-- <mat-option>Select</mat-option> -->
|
<mat-option>Select</mat-option>
|
||||||
<mat-option *ngFor="let a of av" [value]="a.id">{{a.name}}</mat-option>
|
<mat-option *ngFor="let a of av" [value]="a.id">{{a.name}}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field> -->
|
||||||
<mat-form-field style="width:100%;" *ngIf="financialForm.controls.is_there_working_capital_available.value == 'yes' && financialForm.controls.working_capital_facilities_availed.value != ''">
|
<!-- <mat-form-field style="width:100%;" *ngIf="financialForm.controls.is_there_working_capital_available.value == 'yes' && financialForm.controls.working_capital_facilities_availed.value != ''">
|
||||||
<input matInput autocomplete="off" placeholder="Details of Facility"
|
<input matInput autocomplete="off" placeholder="Details of Facility"
|
||||||
formControlName="reason_for_working_capital_facilities_availed">
|
formControlName="reason_for_working_capital_facilities_availed">
|
||||||
</mat-form-field>
|
</mat-form-field> -->
|
||||||
|
<div *ngIf="financialForm.controls.is_there_working_capital_available.value == 'yes'">
|
||||||
|
|
||||||
|
<mat-card-subtitle>
|
||||||
|
<p>Working Capital Facilities availed</p>
|
||||||
|
</mat-card-subtitle>
|
||||||
|
|
||||||
|
<div class="toggle" fxLayout="row wrap" formArrayName="select_working_capital_facilities_availed">
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25"
|
||||||
|
*ngFor="let entityType of financialForm.controls.select_working_capital_facilities_availed['controls']; let e = index;"
|
||||||
|
[formGroupName]="e">
|
||||||
|
<mat-checkbox class="example-margin" color="primary" formControlName="exist_status"
|
||||||
|
(click)="changeWorkingCapitalFacilities(entityType)">{{entityType.controls.name.value}}</mat-checkbox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<mat-form-field style="width:100%;" *ngIf="financialForm.controls['other_reason_for_working_capital_facilities_availed']">
|
||||||
|
<input matInput autocomplete="off" placeholder="Others Working Capital Facilities availed"
|
||||||
|
formControlName="other_reason_for_working_capital_facilities_availed">
|
||||||
|
<!-- <mat-error *ngIf="financialForm.controls['other_reason_for_working_capital_facilities_availed'].hasError('required')">other_reason_for_working_capital_facilities_availed Required</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width:100%;" *ngIf="financialForm.controls['reason_for_working_capital_facilities_availed']">
|
||||||
|
<input matInput autocomplete="off" placeholder="Details of Others Facility"
|
||||||
|
formControlName="reason_for_working_capital_facilities_availed">
|
||||||
|
<!-- <mat-error *ngIf="financialForm.controls['reason_for_working_capital_facilities_availed'].hasError('required')">reason_for_working_capital_facilities_availed Required</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width:100%;" *ngIf="financialForm.controls['bank_guarantee']">
|
||||||
|
<input matInput autocomplete="off" placeholder="Details of Bank Guarantee Facility"
|
||||||
|
formControlName="bank_guarantee">
|
||||||
|
<!-- <mat-error *ngIf="financialForm.controls['bank_guarantee'].hasError('required')">reason_for_working_capital_facilities_availed Required</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width:100%;" *ngIf="financialForm.controls['cash_credit_limit']">
|
||||||
|
<input matInput autocomplete="off" placeholder="Details of Cash Credit Limit"
|
||||||
|
formControlName="cash_credit_limit">
|
||||||
|
<!-- <mat-error *ngIf="financialForm.controls['cash_credit_limit'].hasError('required')">cash_credit_limit Required</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width:100%;" *ngIf="financialForm.controls['factoring']">
|
||||||
|
<input matInput autocomplete="off" placeholder="Details of Factoring"
|
||||||
|
formControlName="factoring">
|
||||||
|
<!-- <mat-error *ngIf="financialForm.controls['factoring'].hasError('required')">cash_credit_limit Required</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
|
||||||
|
<mat-form-field style="width:100%;" *ngIf="financialForm.controls['letter_of_credit']">
|
||||||
|
<input matInput autocomplete="off" placeholder="Details of Letter of Credit"
|
||||||
|
formControlName="letter_of_credit">
|
||||||
|
<!-- <mat-error *ngIf="financialForm.controls['letter_of_credit'].hasError('required')">letter_of_credit Required</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
|
||||||
|
<mat-form-field style="width:100%;" *ngIf="financialForm.controls['forfaiting']">
|
||||||
|
<input matInput autocomplete="off" placeholder="Details of Forfaiting"
|
||||||
|
formControlName="factoring">
|
||||||
|
<!-- <mat-error *ngIf="financialForm.controls['forfaiting'].hasError('required')">forfaiting Required</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
|
||||||
|
<mat-form-field style="width:100%;" *ngIf="financialForm.controls['od_limit']">
|
||||||
|
<input matInput autocomplete="off" placeholder="Details of OD Limit"
|
||||||
|
formControlName="od_limit">
|
||||||
|
<!-- <mat-error *ngIf="financialForm.controls['od_limit'].hasError('required')">forfaiting Required</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|
||||||
|
|||||||
@ -65,5 +65,7 @@ page-pd-question-financial-info {
|
|||||||
height: 28px;
|
height: 28px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.toggle{
|
||||||
|
padding: 1.4rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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 { FormGroup,Validators,FormBuilder, FormArray } from '@angular/forms'
|
import { FormGroup,Validators,FormBuilder, FormArray, FormControl } from '@angular/forms'
|
||||||
import {ConstantsProvider} from '../../../../providers/constants/constants'
|
import {ConstantsProvider} from '../../../../providers/constants/constants'
|
||||||
import {CameraProvider} from '../../../../providers/common-provider/camera'
|
import {CameraProvider} from '../../../../providers/common-provider/camera'
|
||||||
import {LoadingProvider} from '../../../../providers/common-provider/loading'
|
import {LoadingProvider} from '../../../../providers/common-provider/loading'
|
||||||
@ -231,10 +231,11 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
unsold_stock_lies_in_days:[''],
|
unsold_stock_lies_in_days:[''],
|
||||||
is_there_working_capital_available:[''],
|
is_there_working_capital_available:[''],
|
||||||
working_capital_facilities_availed:[''],
|
working_capital_facilities_availed:[''],
|
||||||
reason_for_working_capital_facilities_availed:[''],
|
// reason_for_working_capital_facilities_availed:[''],
|
||||||
// same_as_financial_statements:[''],
|
// same_as_financial_statements:[''],
|
||||||
date_per_financial: this.fb.array([]),
|
date_per_financial: this.fb.array([]),
|
||||||
estimated_value: this.fb.array([])
|
estimated_value: this.fb.array([]),
|
||||||
|
select_working_capital_facilities_availed : this.fb.array([])
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
createDate(date){
|
createDate(date){
|
||||||
@ -340,6 +341,8 @@ submitDetails(){
|
|||||||
//financeDate.push(this.createDate(''))
|
//financeDate.push(this.createDate(''))
|
||||||
const estimate= <FormArray> this.financialForm.controls['estimated_value']
|
const estimate= <FormArray> this.financialForm.controls['estimated_value']
|
||||||
//estimate.push(this.createValue(''))
|
//estimate.push(this.createValue(''))
|
||||||
|
const workingCptlControl = <FormArray>this.financialForm.controls['select_working_capital_facilities_availed'];
|
||||||
|
|
||||||
let params:any={}
|
let params:any={}
|
||||||
params.parent_pdid=this.pdDetails.parent_pd_id
|
params.parent_pdid=this.pdDetails.parent_pd_id
|
||||||
params.pd_id=this.pdDetails.pd_id
|
params.pd_id=this.pdDetails.pd_id
|
||||||
@ -349,6 +352,7 @@ submitDetails(){
|
|||||||
if(value['dataStatus']==true){
|
if(value['dataStatus']==true){
|
||||||
let retrieveData=value['records'];
|
let retrieveData=value['records'];
|
||||||
if(value['records'].is_financial_statements == 'yes'){
|
if(value['records'].is_financial_statements == 'yes'){
|
||||||
|
this.isDisplay = true;
|
||||||
let result=Object.keys(value['records'].date_per_financial).map(function(key) {
|
let result=Object.keys(value['records'].date_per_financial).map(function(key) {
|
||||||
return value['records'].date_per_financial[key]
|
return value['records'].date_per_financial[key]
|
||||||
})
|
})
|
||||||
@ -398,15 +402,149 @@ submitDetails(){
|
|||||||
retrieveData.company_id=this.company_id
|
retrieveData.company_id=this.company_id
|
||||||
retrieveData.fk_createdby=this.users
|
retrieveData.fk_createdby=this.users
|
||||||
retrieveData.formid=this.FormId
|
retrieveData.formid=this.FormId
|
||||||
|
let avData = this.av.map(item => ({ name: item.name, id: item.id }))
|
||||||
|
let exist_av_data: any = [];
|
||||||
|
|
||||||
|
if (retrieveData.select_working_capital_facilities_availed) {
|
||||||
|
exist_av_data = Object.keys(retrieveData.select_working_capital_facilities_availed).map(function (key) {
|
||||||
|
return retrieveData.select_working_capital_facilities_availed[key].id;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
let actual_av = avData.map(item => item.id);
|
||||||
|
let check_exist_av = actual_av.map((id, index) => {
|
||||||
|
if (exist_av_data.indexOf(id) < 0) {
|
||||||
|
avData[index].exist_status = 0;
|
||||||
|
return avData[index];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
avData[index].exist_status = 1;
|
||||||
|
return avData[index];
|
||||||
|
}
|
||||||
|
}).filter(item => item != undefined);
|
||||||
|
|
||||||
|
if (check_exist_av.length > 0) {
|
||||||
|
check_exist_av.forEach(val => {
|
||||||
|
workingCptlControl.push(this.workingCptl(val));
|
||||||
|
|
||||||
|
if (val.exist_status == 1 && val.id == 2) {
|
||||||
|
this.financialForm.addControl('bank_guarantee', new FormControl(''));
|
||||||
|
}
|
||||||
|
if (val.exist_status == 1 && val.id == 3) {
|
||||||
|
this.financialForm.addControl('cash_credit_limit', new FormControl(''));
|
||||||
|
}
|
||||||
|
if (val.exist_status == 1 && val.id == 4) {
|
||||||
|
this.financialForm.addControl('factoring', new FormControl(''));
|
||||||
|
}
|
||||||
|
if (val.exist_status == 1 && val.id == 5) {
|
||||||
|
this.financialForm.addControl('forfaiting', new FormControl(''));
|
||||||
|
}
|
||||||
|
if (val.exist_status == 1 && val.id == 6) {
|
||||||
|
this.financialForm.addControl('letter_of_credit', new FormControl(''));
|
||||||
|
}
|
||||||
|
if (val.exist_status == 1 && val.id == 7) {
|
||||||
|
this.financialForm.addControl('od_limit', new FormControl(''));
|
||||||
|
}
|
||||||
|
if (val.exist_status == 1 && val.id == 1) {
|
||||||
|
this.financialForm.addControl('other_reason_for_working_capital_facilities_availed', new FormControl(''));
|
||||||
|
this.financialForm.addControl('reason_for_working_capital_facilities_availed', new FormControl(''));
|
||||||
|
}
|
||||||
|
console.log(val);
|
||||||
|
});
|
||||||
|
console.log('check_exist_businees_activity',check_exist_av);
|
||||||
|
retrieveData.select_working_capital_facilities_availed = check_exist_av;
|
||||||
|
}
|
||||||
|
|
||||||
this.financialForm.setValue(retrieveData)
|
this.financialForm.setValue(retrieveData)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
let avData = this.av.map(item => ({ name: item.name, id: item.id }))
|
||||||
|
let exist_av_data: any = [];
|
||||||
|
|
||||||
|
let actual_av = avData.map(item => item.id);
|
||||||
|
let check_exist_av = actual_av.map((id, index) => {
|
||||||
|
if (exist_av_data.indexOf(id) < 0) {
|
||||||
|
avData[index].exist_status = 0;
|
||||||
|
return avData[index];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
avData[index].exist_status = 1;
|
||||||
|
return avData[index];
|
||||||
|
}
|
||||||
|
}).filter(item => item != undefined);
|
||||||
|
|
||||||
|
if (check_exist_av.length > 0) {
|
||||||
|
check_exist_av.forEach(val => {
|
||||||
|
workingCptlControl.push(this.workingCptl(val));
|
||||||
|
});
|
||||||
|
}
|
||||||
//financial_date.push(this.createDate());
|
//financial_date.push(this.createDate());
|
||||||
//estimated_val.push(this.createValue(''));
|
//estimated_val.push(this.createValue(''));
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
workingCptl(details: any): FormGroup {
|
||||||
|
return this.fb.group({
|
||||||
|
id: [details.id, Validators.compose([Validators.required])],
|
||||||
|
name: [details.name, Validators.compose([Validators.required])],
|
||||||
|
exist_status: [details.exist_status == 1 ? true : false]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
changeWorkingCapitalFacilities(event: any) {
|
||||||
|
console.log('event',event);
|
||||||
|
if (event.value.exist_status == true && event.value.id == 2) {
|
||||||
|
console.log('event.value.exist_status == true && event.value.id == 2',event.value.exist_status,event.value.id)
|
||||||
|
|
||||||
|
this.financialForm.removeControl('bank_guarantee');
|
||||||
|
}
|
||||||
|
else if (event.value.exist_status == false && event.value.id == 2) {
|
||||||
|
console.log('event.value.exist_status == true && event.value.id == 2',event.value.exist_status,event.value.id)
|
||||||
|
this.financialForm.addControl('bank_guarantee', new FormControl(''));
|
||||||
|
}
|
||||||
|
if (event.value.exist_status == true && event.value.id == 3) {
|
||||||
|
this.financialForm.removeControl('cash_credit_limit');
|
||||||
|
}
|
||||||
|
else if (event.value.exist_status == false && event.value.id == 3) {
|
||||||
|
this.financialForm.addControl('cash_credit_limit', new FormControl(''));
|
||||||
|
}
|
||||||
|
if (event.value.exist_status == true && event.value.id == 4) {
|
||||||
|
this.financialForm.removeControl('factoring');
|
||||||
|
}
|
||||||
|
else if (event.value.exist_status == false && event.value.id == 4) {
|
||||||
|
this.financialForm.addControl('factoring', new FormControl(''));
|
||||||
|
}
|
||||||
|
if (event.value.exist_status == true && event.value.id == 5) {
|
||||||
|
this.financialForm.removeControl('forfaiting');
|
||||||
|
}
|
||||||
|
else if (event.value.exist_status == false && event.value.id == 5) {
|
||||||
|
this.financialForm.addControl('forfaiting', new FormControl(''));
|
||||||
|
}
|
||||||
|
if (event.value.exist_status == true && event.value.id == 6) {
|
||||||
|
this.financialForm.removeControl('letter_of_credit');
|
||||||
|
}
|
||||||
|
else if (event.value.exist_status == false && event.value.id == 6) {
|
||||||
|
this.financialForm.addControl('letter_of_credit', new FormControl(''));
|
||||||
|
}
|
||||||
|
if (event.value.exist_status == true && event.value.id == 7) {
|
||||||
|
this.financialForm.removeControl('od_limit');
|
||||||
|
}
|
||||||
|
else if (event.value.exist_status == false && event.value.id == 7) {
|
||||||
|
this.financialForm.addControl('od_limit', new FormControl(''));
|
||||||
|
}
|
||||||
|
if (event.value.exist_status == true && event.value.id == 1) {
|
||||||
|
this.financialForm.removeControl('other_reason_for_working_capital_facilities_availed');
|
||||||
|
this.financialForm.removeControl('reason_for_working_capital_facilities_availed');
|
||||||
|
}
|
||||||
|
else if (event.value.exist_status == false && event.value.id == 1) {
|
||||||
|
this.financialForm.addControl('other_reason_for_working_capital_facilities_availed', new FormControl(''));
|
||||||
|
this.financialForm.addControl('reason_for_working_capital_facilities_availed', new FormControl(''));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* New Calculation for Finanical Statement
|
* New Calculation for Finanical Statement
|
||||||
**/
|
**/
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
<ion-grid *ngIf="imageDisplay.length >0 ">
|
<ion-grid *ngIf="imageDisplay.length >0 ">
|
||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
|
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
|
||||||
<img src="{{image.image}}" imageViewer><br/>
|
<img src="{{image.image}}" imageViewer class="doc-image-bucket"><br/>
|
||||||
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
|
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
|
||||||
|
|
||||||
<input *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)">
|
<input *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)">
|
||||||
@ -45,7 +45,7 @@
|
|||||||
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
|
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
|
||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
|
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
|
||||||
<img src="{{image.image}}" imageViewer><br/>
|
<img src="{{image.image}}" imageViewer class="doc-image-bucket"><br/>
|
||||||
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
|
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
|
||||||
|
|
||||||
<input #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
|
<input #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
|
||||||
@ -66,17 +66,27 @@
|
|||||||
<ion-list formArrayName="list_value">
|
<ion-list formArrayName="list_value">
|
||||||
<ion-item-sliding [formGroupName]="i" *ngFor="let item of generalForm.controls.list_value['controls']; let i=index">
|
<ion-item-sliding [formGroupName]="i" *ngFor="let item of generalForm.controls.list_value['controls']; let i=index">
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<h2 style="font-size: 18px !important;">{{item.get('applicant_name').value | titlecase}}</h2>
|
<ion-row>
|
||||||
<p>Age : {{item.get('age').value}}
|
<ion-col class="avatar_col">
|
||||||
<span *ngIf="item.get('qualification_name').value != ''">
|
<ion-avatar slot="start">
|
||||||
<ion-icon name="school">
|
<span *ngIf="item.get('is_person_met_pic').value ===''"><img src="../../../assets/img/avatar/girl-avatar.png" ></span>
|
||||||
</ion-icon>
|
<span *ngIf="item.get('is_person_met_pic').value !==''"><img src="{{item.get('is_person_met_pic').value}}" ></span>
|
||||||
{{item.get('qualification_name').value}}</span></p>
|
</ion-avatar>
|
||||||
<p *ngIf="item.get('course_name').value != ''">
|
</ion-col>
|
||||||
<ion-icon name="copy"></ion-icon> {{item.get('course_name').value | titlecase}}
|
<ion-col>
|
||||||
</p>
|
<h2 style="font-size: 16px !important;">{{item.get('applicant_name').value | titlecase}}</h2>
|
||||||
</ion-label>
|
<p style="font-size: 13px !important;">Age : {{item.get('age').value}}
|
||||||
|
<span *ngIf="item.get('qualification_name').value != ''" style="font-size: 13px !important;">
|
||||||
|
<ion-icon name="school">
|
||||||
|
</ion-icon>
|
||||||
|
{{item.get('qualification_name').value}}</span></p>
|
||||||
|
<p *ngIf="item.get('course_name').value != ''" style="font-size: 13px !important;">
|
||||||
|
<ion-icon name="copy"></ion-icon> {{item.get('course_name').value | titlecase}}
|
||||||
|
</p>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
</ion-label>
|
||||||
<!--<p><ion-icon name="school"></ion-icon> {{item.get('qualification').value}}</p>-->
|
<!--<p><ion-icon name="school"></ion-icon> {{item.get('qualification').value}}</p>-->
|
||||||
<button ion-button align="end" item-end small clear (click)="editIndividuals(i)">
|
<button ion-button align="end" item-end small clear (click)="editIndividuals(i)">
|
||||||
<ion-icon name="md-create"></ion-icon>
|
<ion-icon name="md-create"></ion-icon>
|
||||||
@ -99,7 +109,6 @@
|
|||||||
</ion-list>
|
</ion-list>
|
||||||
<button ion-button color="danger" (click)="removeList(i,1)">
|
<button ion-button color="danger" (click)="removeList(i,1)">
|
||||||
<ion-icon name="trash"></ion-icon>
|
<ion-icon name="trash"></ion-icon>
|
||||||
|
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
</ion-item-options>
|
</ion-item-options>
|
||||||
@ -161,9 +170,62 @@
|
|||||||
<input matInput placeholder="Qualification Details" formControlName="course_name">
|
<input matInput placeholder="Qualification Details" formControlName="course_name">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<mat-checkbox class="table-checkbox-com" color="primary" formControlName="is_person_met">Is Person Met</mat-checkbox><br />
|
|
||||||
<br />
|
<ion-row class="igelabel">
|
||||||
<mat-checkbox class="table-checkbox-com" color="primary" formControlName="is_applicant">Is Applicant</mat-checkbox>
|
<ion-col>
|
||||||
|
<mat-checkbox class="table-checkbox-com" color="primary" formControlName="is_person_met">Is Person Met</mat-checkbox><br/>
|
||||||
|
<br/>
|
||||||
|
<mat-checkbox class="table-checkbox-com" color="primary" formControlName="is_applicant">Is Applicant</mat-checkbox>
|
||||||
|
<br/>
|
||||||
|
</ion-col>
|
||||||
|
<ion-col end *ngIf="indi.get('is_person_met').value === true ">
|
||||||
|
|
||||||
|
<!-- <div class="hoverdp" float-right>
|
||||||
|
<div *ngIf="indi.get('is_person_met_pic').value !== ''" >
|
||||||
|
<img src="{{indi.get('is_person_met_pic').value}}" imageViewer style="width: 80px;height:80px;border-radius: 50%;border:2px">
|
||||||
|
</div>
|
||||||
|
<div *ngIf="indi.get('is_person_met_pic').value === ''" >
|
||||||
|
<img [src]="'https://image.ibb.co/mGjZB9/usernew.png'" style="width: 80px;height:80px;border-radius: 50%;border:2px">
|
||||||
|
</div>
|
||||||
|
<ion-icon style="color:#716462;position: absolute; top: 28%;left: 14.5%;" name="school"></ion-icon>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
<div float-right>
|
||||||
|
<div *ngIf="indi.get('is_person_met_pic').value !== ''" >
|
||||||
|
<img src="{{indi.get('is_person_met_pic').value}}" imageViewer style ="width: 40px;height: 35px;">
|
||||||
|
</div>
|
||||||
|
<div *ngIf="indi.get('is_person_met_pic').value === ''" >
|
||||||
|
<label style="display: block; text-align: center !important;"> Person Met
|
||||||
|
Image </label>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: -webkit-center;" >
|
||||||
|
<ion-icon title="Click Here For Person Met Image" name="md-camera" (click)="ImageUpload(indi,1)"></ion-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div *ngIf="indi.get('is_person_met_pic').value !== ''" float-right>
|
||||||
|
<img src="{{indi.get('is_person_met_pic').value}}" imageViewer style ="width: 40px;height: 35px;">
|
||||||
|
</div> -->
|
||||||
|
</ion-col>
|
||||||
|
<ion-col start *ngIf="indi.get('is_person_met').value === true ">
|
||||||
|
<div float-left>
|
||||||
|
<div *ngIf="indi.get('is_person_met_id_proof').value !== ''">
|
||||||
|
<img src="{{indi.get('is_person_met_id_proof').value}}" imageViewer style ="width: 40px;height: 35px;">
|
||||||
|
</div>
|
||||||
|
<div *ngIf="indi.get('is_person_met_id_proof').value === ''" >
|
||||||
|
<!-- <label style="text-align: -webkit-center;" > Person Met ID Proof </label> -->
|
||||||
|
<label style="display: block; text-align: center !important;"> Person Met
|
||||||
|
ID Proof </label>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: -webkit-center;" >
|
||||||
|
<ion-icon name="md-camera" title="Click Here For Person Met ID Proof" (click)="ImageUpload(indi,2)"></ion-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div *ngIf="indi.get('is_person_met_id_proof').value !== ''" float-left>
|
||||||
|
<img src="{{indi.get('is_person_met_id_proof').value}}" imageViewer style ="width: 40px;height: 35px;">
|
||||||
|
</div> -->
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
|
||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col end>
|
<ion-col end>
|
||||||
<button *ngIf="addIndi" float-right ion-button color="optblue" (click)="addParticular(1,indi)">Add</button>
|
<button *ngIf="addIndi" float-right ion-button color="optblue" (click)="addParticular(1,indi)">Add</button>
|
||||||
|
|||||||
@ -22,22 +22,27 @@ page-pd-question-general-info {
|
|||||||
zoom: 0.8;
|
zoom: 0.8;
|
||||||
}
|
}
|
||||||
/*FOR IMAGES*/
|
/*FOR IMAGES*/
|
||||||
img{
|
.doc-image-bucket{
|
||||||
padding:0 5px 0 0;
|
padding:0 5px 0 0 !important;
|
||||||
height: 180px;
|
height: 180px !important;
|
||||||
//width:130px;
|
//width:130px;
|
||||||
//border:3px solid black;
|
//border:3px solid black;
|
||||||
//border-radius: 20px;
|
//border-radius: 20px;
|
||||||
//background-color: gray;
|
//background-color: gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.avatar_col{
|
||||||
|
padding: 0px !important;
|
||||||
|
height: 40px !important;
|
||||||
|
width: 40px !important;
|
||||||
|
flex-grow: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
input{
|
input{
|
||||||
width: 100px;
|
width: 100px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
border-color: gray;
|
border-color: gray;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -162,7 +162,7 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
|
|
||||||
ionViewDidLoad() {
|
ionViewDidLoad() {
|
||||||
// this.pd_applicants_details.pop();
|
// this.pd_applicants_details.pop();
|
||||||
console.log('ionViewDidLoad PdQuestionGeneralInfoPage');
|
console.log("%cionViewDidLoad, PdQuestionGeneralInfoPage","font-size:300%;color:purple;font-weight:bold;font-family:Mongoose;");
|
||||||
this.getGeneralForm()
|
this.getGeneralForm()
|
||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
|
|
||||||
@ -175,7 +175,7 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ionViewCanLeave(){
|
ionViewCanLeave(){
|
||||||
console.log("dirty",this.generalForm.dirty);
|
console.table("dirty",this.generalForm.dirty);
|
||||||
if(this.generalForm.dirty){
|
if(this.generalForm.dirty){
|
||||||
|
|
||||||
return new Promise((resolve,reject)=>{
|
return new Promise((resolve,reject)=>{
|
||||||
@ -244,9 +244,11 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
{
|
{
|
||||||
var c_qualification_name=this.qualificationById(val.qualification) // for getting qualification Name
|
var c_qualification_name=this.qualificationById(val.qualification) // for getting qualification Name
|
||||||
let formData:FormGroup=this.fb.group({
|
let formData:FormGroup=this.fb.group({
|
||||||
applicant_title_name:[val.applicant_title_name],
|
applicant_title_name:[val.applicant_title_name],
|
||||||
applicant_name:[val.applicant_name],
|
applicant_name:[val.applicant_name],
|
||||||
is_person_met:val.is_person_met,
|
is_person_met:val.is_person_met,
|
||||||
|
is_person_met_pic :val.is_person_met_pic,
|
||||||
|
is_person_met_id_proof : val.is_person_met_id_proof,
|
||||||
is_applicant:val.is_applicant,
|
is_applicant:val.is_applicant,
|
||||||
age:[val.age],
|
age:[val.age],
|
||||||
qualification:[val.qualification],
|
qualification:[val.qualification],
|
||||||
@ -274,6 +276,8 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
applicant_title_name:[val.applicant_title_name],
|
applicant_title_name:[val.applicant_title_name],
|
||||||
applicant_name:[val.applicant_name],
|
applicant_name:[val.applicant_name],
|
||||||
is_person_met:val.is_person_met,
|
is_person_met:val.is_person_met,
|
||||||
|
is_person_met_pic:val.is_person_met_pic,
|
||||||
|
is_person_met_id_proof:val.is_person_met_id_proof,
|
||||||
is_applicant:val.is_applicant,
|
is_applicant:val.is_applicant,
|
||||||
age:[val.age],
|
age:[val.age],
|
||||||
qualification:[val.qualification],
|
qualification:[val.qualification],
|
||||||
@ -400,6 +404,8 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
let formData : FormGroup=this.fb.group({
|
let formData : FormGroup=this.fb.group({
|
||||||
applicant_name:['',Validators.required],
|
applicant_name:['',Validators.required],
|
||||||
is_person_met:false,
|
is_person_met:false,
|
||||||
|
is_person_met_pic:[''],
|
||||||
|
is_person_met_id_proof:[''],
|
||||||
is_applicant:false,
|
is_applicant:false,
|
||||||
age:[''],
|
age:[''],
|
||||||
qualification:[''],
|
qualification:[''],
|
||||||
@ -415,6 +421,8 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
|
|
||||||
applicant_name:[data.applicant_name,Validators.required],
|
applicant_name:[data.applicant_name,Validators.required],
|
||||||
is_person_met:data.is_person_met,
|
is_person_met:data.is_person_met,
|
||||||
|
is_person_met_pic : data.is_person_met_pic,
|
||||||
|
is_person_met_id_proof : data.is_person_met_id_proof,
|
||||||
is_applicant:data.is_applicant,
|
is_applicant:data.is_applicant,
|
||||||
age:[data.age],
|
age:[data.age],
|
||||||
qualification:[data.qualification],
|
qualification:[data.qualification],
|
||||||
@ -614,6 +622,8 @@ dataobj:any;
|
|||||||
applicant_title_name:val.applicant_title_name,
|
applicant_title_name:val.applicant_title_name,
|
||||||
applicant_name:val.applicant_name,
|
applicant_name:val.applicant_name,
|
||||||
is_person_met:val.is_person_met,
|
is_person_met:val.is_person_met,
|
||||||
|
is_person_met_pic : val.is_person_met_pic,
|
||||||
|
is_person_met_id_proof: val.is_person_met_id_proof,
|
||||||
is_applicant:val.is_applicant,
|
is_applicant:val.is_applicant,
|
||||||
age:val.age,
|
age:val.age,
|
||||||
qualification:val.qualification,
|
qualification:val.qualification,
|
||||||
@ -1000,6 +1010,9 @@ temp: number = 0;
|
|||||||
|
|
||||||
submitData(answerData)
|
submitData(answerData)
|
||||||
{
|
{
|
||||||
|
console.table(this.generalForm.value);
|
||||||
|
console.log(answerData);
|
||||||
|
|
||||||
console.log('1)',this.temp);
|
console.log('1)',this.temp);
|
||||||
let saveRecords:any={}
|
let saveRecords:any={}
|
||||||
var valuesData_indi:any=[]
|
var valuesData_indi:any=[]
|
||||||
@ -1253,6 +1266,8 @@ console.log('1)',this.temp);
|
|||||||
this.pd_applicants_details.forEach((datas,index)=>{
|
this.pd_applicants_details.forEach((datas,index)=>{
|
||||||
datas.is_applicant=true,
|
datas.is_applicant=true,
|
||||||
datas.is_person_met = false;
|
datas.is_person_met = false;
|
||||||
|
datas.is_person_met_pic = '';
|
||||||
|
datas.is_person_met_id_proof = '';
|
||||||
datas.is_new = false;
|
datas.is_new = false;
|
||||||
datas.is_main_applicant = datas.applicant_type == '1' ? true : false;
|
datas.is_main_applicant = datas.applicant_type == '1' ? true : false;
|
||||||
datas.is_active = true;
|
datas.is_active = true;
|
||||||
@ -1261,6 +1276,7 @@ console.log('1)',this.temp);
|
|||||||
datas.age = '',
|
datas.age = '',
|
||||||
datas.qualification = '',
|
datas.qualification = '',
|
||||||
datas.course_name = ''
|
datas.course_name = ''
|
||||||
|
|
||||||
if (datas.company_name != '' && datas.company_name != null) {
|
if (datas.company_name != '' && datas.company_name != null) {
|
||||||
console.log("company");
|
console.log("company");
|
||||||
let setCompanyValues: any = { company_order_id: companyControl.controls.length + 1, company_name: datas.company_name, is_company_applicant: datas.is_company_applicant, business_entity_type: datas.business_entity_type, business_entity_type_other: datas.business_entity_type_other, business_years: datas.business_years, business_month: datas.business_month, business_date_object: datas.business_date_object, is_new: datas.is_new, is_active: true, associate_pd_id:this.pdDetails.pd_id }
|
let setCompanyValues: any = { company_order_id: companyControl.controls.length + 1, company_name: datas.company_name, is_company_applicant: datas.is_company_applicant, business_entity_type: datas.business_entity_type, business_entity_type_other: datas.business_entity_type_other, business_years: datas.business_years, business_month: datas.business_month, business_date_object: datas.business_date_object, is_new: datas.is_new, is_active: true, associate_pd_id:this.pdDetails.pd_id }
|
||||||
@ -1396,6 +1412,7 @@ console.log('1)',this.temp);
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sendImage(){
|
sendImage(){
|
||||||
this.loading.loaderForSendImage()
|
this.loading.loaderForSendImage()
|
||||||
console.log("ll",JSON.stringify(this.imageBucket));
|
console.log("ll",JSON.stringify(this.imageBucket));
|
||||||
@ -1425,7 +1442,46 @@ console.log('1)',this.temp);
|
|||||||
console.log("val",value)
|
console.log("val",value)
|
||||||
let name=value.get('applicant_name').value
|
let name=value.get('applicant_name').value
|
||||||
value.get('applicant_name').setValue(this.cons.sentenceCase(name));
|
value.get('applicant_name').setValue(this.cons.sentenceCase(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ImageUpload(control,Flag : any){
|
||||||
|
// alert('Inside Mobile Upload Function' + Flag);
|
||||||
|
if(Flag == 1){
|
||||||
|
// alert('is_person_met_pic 1');
|
||||||
|
this.cameraProvider.getpicture().then(res=>{
|
||||||
|
// alert("Response 1" + res);
|
||||||
|
if(res != 'error'){
|
||||||
|
control.controls['is_person_met_pic'].setValue(res);
|
||||||
|
alert(JSON.stringify(this.generalForm.value));
|
||||||
|
// this.toast.pdTriggerappmessage('Flag 1 Success');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
control.controls['is_person_met_pic'].setValue('');
|
||||||
|
// this.toast.pdTriggerappmessage('Flag 1 Fail');
|
||||||
|
}
|
||||||
|
console.table('1',this.generalForm.value);
|
||||||
|
},error=>{
|
||||||
|
console.log("Camera Error ",JSON.stringify(error));
|
||||||
|
})
|
||||||
|
}
|
||||||
|
else if(Flag == 2){
|
||||||
|
// alert('is_person_met_id_proof 2');
|
||||||
|
this.cameraProvider.getpicture().then(res=>{
|
||||||
|
// alert("Response 2" + res);
|
||||||
|
if(res != 'error'){
|
||||||
|
control.controls['is_person_met_id_proof'].setValue(res);
|
||||||
|
// alert(JSON.stringify(this.generalForm.value));
|
||||||
|
// this.toast.pdTriggerappmessage('Flag 2 Success');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
control.controls['is_person_met_id_proof'].setValue('');
|
||||||
|
// this.toast.pdTriggerappmessage('Flag 2 Fail');
|
||||||
|
}
|
||||||
|
// console.table('1',this.generalForm.value);
|
||||||
|
},error=>{
|
||||||
|
console.log("Camera Error ",JSON.stringify(error));
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// console.table('Overall',this.generalForm.value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,6 +32,13 @@ let alert=this.alertCtrl.create({
|
|||||||
message:msg,
|
message:msg,
|
||||||
cssClass:'buttoncss',
|
cssClass:'buttoncss',
|
||||||
buttons:[{
|
buttons:[{
|
||||||
|
text:'No',
|
||||||
|
cssClass:'btnNo',
|
||||||
|
handler:()=>{
|
||||||
|
alert.dismiss(false)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},{
|
||||||
text:'Yes',
|
text:'Yes',
|
||||||
cssClass:'btnYes',
|
cssClass:'btnYes',
|
||||||
handler:()=>{
|
handler:()=>{
|
||||||
@ -39,14 +46,7 @@ let alert=this.alertCtrl.create({
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
]
|
||||||
text:'No',
|
|
||||||
cssClass:'btnNo',
|
|
||||||
handler:()=>{
|
|
||||||
alert.dismiss(false)
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
});
|
});
|
||||||
//alert.present()
|
//alert.present()
|
||||||
return alert
|
return alert
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
33180
www/build/main.css
33180
www/build/main.css
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user