Chnages and Issues fixes : ps
This commit is contained in:
parent
d797e84a6f
commit
04cc170b41
File diff suppressed because one or more lines are too long
2842
package-lock.json
generated
2842
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -71,6 +71,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ionic/app-scripts": "3.1.5",
|
"@ionic/app-scripts": "3.1.5",
|
||||||
|
"@ionic/lab": "1.0.24",
|
||||||
"typescript": "2.4.2"
|
"typescript": "2.4.2"
|
||||||
},
|
},
|
||||||
"description": "An Ionic project",
|
"description": "An Ionic project",
|
||||||
|
|||||||
@ -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">
|
||||||
|
|||||||
@ -620,6 +620,11 @@ else{
|
|||||||
{
|
{
|
||||||
this.navCtrl.push(PdGeneralImagesPage,{'pdDetails':this.applicatentDetails});
|
this.navCtrl.push(PdGeneralImagesPage,{'pdDetails':this.applicatentDetails});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inWords(e){
|
||||||
|
return this.constant.convertNumberToWords(+e);
|
||||||
|
}
|
||||||
|
|
||||||
inprogress(data,address_child){
|
inprogress(data,address_child){
|
||||||
// data.pd_id=address_child.pd_id
|
// data.pd_id=address_child.pd_id
|
||||||
console.log(address_child)
|
console.log(address_child)
|
||||||
|
|||||||
@ -357,17 +357,12 @@ completePDAlert()
|
|||||||
if(!this.overallqustioncountAccess){// For checking Answered Forms
|
if(!this.overallqustioncountAccess){// For checking Answered Forms
|
||||||
this.toast.pdTriggerappmessage("Please complete all the Forms");
|
this.toast.pdTriggerappmessage("Please complete all the Forms");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("this.ena",this.enableAddonPD);
|
|
||||||
|
|
||||||
if(this.enableAddonPD == true){//FOR CHECKING THE ADDRESS COUNT. IF VALUE 1 THIS BLOCK EXECUTED
|
if(this.enableAddonPD == true){//FOR CHECKING THE ADDRESS COUNT. IF VALUE 1 THIS BLOCK EXECUTED
|
||||||
return new Promise(reject=>{
|
return new Promise(reject=>{
|
||||||
let alert=this.toast.setAlertForCompletePD()
|
let alert=this.toast.setAlertForCompletePD()
|
||||||
alert.present();
|
alert.present();
|
||||||
|
|
||||||
alert.onDidDismiss(data=>{
|
alert.onDidDismiss(data=>{
|
||||||
console.log('data',data)
|
|
||||||
if(data == 'yes'){
|
if(data == 'yes'){
|
||||||
|
|
||||||
this.completed('COMPLETED');
|
this.completed('COMPLETED');
|
||||||
|
|||||||
@ -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 Expense</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>
|
||||||
|
|||||||
@ -58,10 +58,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<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 matInput placeholder="UOM" formControlName="fk_uom_id">
|
||||||
<mat-select placeholder="UOM" name="fk_uom_id" formControlName="fk_uom_id">
|
<mat-option>
|
||||||
<mat-option>Select</mat-option>
|
<ngx-mat-select-search formControlName="uomSearch" (keyup)="searchUOM(item,i)"
|
||||||
<mat-option *ngFor="let uom of UOM" [value]="uom.uom_id">{{uom.name}}</mat-option>
|
[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-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
@ -72,7 +78,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>
|
||||||
|
|||||||
@ -4,7 +4,9 @@ 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 { 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.
|
||||||
@ -30,9 +32,12 @@ export class PdQuestionAssessedPurchasePage {
|
|||||||
rawMaterialForm:FormGroup;
|
rawMaterialForm:FormGroup;
|
||||||
RateOfPurchase: any=[];
|
RateOfPurchase: any=[];
|
||||||
AnnualPurchase: any=[];
|
AnnualPurchase: any=[];
|
||||||
productListData:any=[]
|
productListData:any=[];
|
||||||
|
UOMData: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;
|
||||||
|
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 +79,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 +103,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=>
|
||||||
@ -175,8 +182,12 @@ export class PdQuestionAssessedPurchasePage {
|
|||||||
|
|
||||||
purchaseCalculation(indexVal,values)
|
purchaseCalculation(indexVal,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));
|
||||||
@ -243,6 +254,11 @@ console.log("value",values);
|
|||||||
savepurchaseData(answerData)
|
savepurchaseData(answerData)
|
||||||
{
|
{
|
||||||
if(this.rawMaterialForm.valid){
|
if(this.rawMaterialForm.valid){
|
||||||
|
|
||||||
|
answerData.purchase.forEach(parVal=>{
|
||||||
|
delete parVal.uomSearch
|
||||||
|
})
|
||||||
|
|
||||||
let records = {'records':answerData.purchase};
|
let records = {'records':answerData.purchase};
|
||||||
console.log('data',records);
|
console.log('data',records);
|
||||||
this.qustCat.saveassessedForms('saveAssessedIncomePurchaseDetails',records).subscribe(res=>
|
this.qustCat.saveassessedForms('saveAssessedIncomePurchaseDetails',records).subscribe(res=>
|
||||||
@ -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,9 +37,20 @@
|
|||||||
<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 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-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">
|
||||||
|
|||||||
@ -4,7 +4,9 @@ import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
|||||||
import { FormGroup, FormBuilder, Validators, FormArray } from '@angular/forms';
|
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 +40,9 @@ 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 +86,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 +140,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 +392,11 @@ 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=>
|
||||||
@ -483,6 +495,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])],
|
||||||
@ -493,4 +506,26 @@ else{
|
|||||||
comments:[data.comments]
|
comments:[data.comments]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -429,6 +429,6 @@
|
|||||||
<ion-footer>
|
<ion-footer>
|
||||||
|
|
||||||
<span *ngIf='!complete_status'>
|
<span *ngIf='!complete_status'>
|
||||||
<button ion-button full color="optblue" (click)="saveAssetDetails(AssetsDetailsForm.value)"> Save</button>
|
<button ion-button ion-fixed full color="optblue" (click)="saveAssetDetails(AssetsDetailsForm.value)"> Save</button>
|
||||||
</span>
|
</span>
|
||||||
</ion-footer>
|
</ion-footer>
|
||||||
@ -133,11 +133,14 @@
|
|||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option value="owned">Owned</mat-option>
|
<mat-option value="owned">Owned</mat-option>
|
||||||
<mat-option value="rented">Rented</mat-option>
|
<mat-option value="rented">Rented</mat-option>
|
||||||
|
<!-- <mat-option value="owned">{{ addressType + ' Owned'}}</mat-option>
|
||||||
|
<mat-option value="rented">{{ addressType + ' Rented' }}</mat-option> -->
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</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 +164,9 @@
|
|||||||
</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 formControlName="business_name_of_the_owner"
|
||||||
[compareWith]="compareObjects" (selectionChange)="setRequiredValidation($event.value,itemrow,8)">
|
[placeholder]="addressType + ' Owned by'"
|
||||||
|
[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 +180,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>
|
||||||
|
|||||||
@ -67,7 +67,7 @@ export class PdQuestionBusinessAssetsPage {
|
|||||||
imageBucket: any=[];
|
imageBucket: any=[];
|
||||||
tab: any='0';
|
tab: any='0';
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
|
addressType:any = '';
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,
|
constructor(public navCtrl: NavController, public navParams: NavParams,
|
||||||
public aws:AwsServiceProvider,public fb:FormBuilder,public qustcat:QuestionCategoryProvider,
|
public aws:AwsServiceProvider,public fb:FormBuilder,public qustcat:QuestionCategoryProvider,
|
||||||
public cons:ConstantsProvider,public toast:ToastProvider,private loading:LoadingProvider,
|
public cons:ConstantsProvider,public toast:ToastProvider,private loading:LoadingProvider,
|
||||||
@ -130,12 +130,13 @@ 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;
|
||||||
|
console.log('this.addressType',this.addressType);
|
||||||
}
|
}
|
||||||
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,
|
||||||
@ -164,6 +165,7 @@ export class PdQuestionBusinessAssetsPage {
|
|||||||
business_purchase_year: '',
|
business_purchase_year: '',
|
||||||
business_emi: ''
|
business_emi: ''
|
||||||
}
|
}
|
||||||
|
console.log('this.addressType',this.addressType);
|
||||||
control.push(this.initBusinessDetailsWithdata(values));
|
control.push(this.initBusinessDetailsWithdata(values));
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -491,6 +493,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 +753,15 @@ createBusinessAssetsForAddress(): FormGroup {
|
|||||||
|
|
||||||
// // check others
|
// // check others
|
||||||
checkOthers(values){
|
checkOthers(values){
|
||||||
if(values!=null) {
|
if(values.length > 0) {
|
||||||
return values.id==0 ? true : false;
|
// 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;
|
||||||
|
|||||||
@ -349,6 +349,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]
|
||||||
})
|
})
|
||||||
|
|||||||
@ -31,14 +31,7 @@ let alert=this.alertCtrl.create({
|
|||||||
title:title_name,
|
title:title_name,
|
||||||
message:msg,
|
message:msg,
|
||||||
cssClass:'buttoncss',
|
cssClass:'buttoncss',
|
||||||
buttons:[{
|
buttons:[
|
||||||
text:'Yes',
|
|
||||||
cssClass:'btnYes',
|
|
||||||
handler:()=>{
|
|
||||||
alert.dismiss('s')
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
text:'No',
|
text:'No',
|
||||||
cssClass:'btnNo',
|
cssClass:'btnNo',
|
||||||
@ -46,6 +39,13 @@ let alert=this.alertCtrl.create({
|
|||||||
alert.dismiss(false)
|
alert.dismiss(false)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
},{
|
||||||
|
text:'Yes',
|
||||||
|
cssClass:'btnYes',
|
||||||
|
handler:()=>{
|
||||||
|
alert.dismiss('s')
|
||||||
|
return false
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
//alert.present()
|
//alert.present()
|
||||||
|
|||||||
@ -21,7 +21,7 @@ public commonimage = "http://ssa.sineedge.com/sparqapi/logo/avatar.jpg";
|
|||||||
let devapiurl_beta = 'http://ssa.sineedge.com/sparqapi_beta/api/';
|
let devapiurl_beta = 'http://ssa.sineedge.com/sparqapi_beta/api/';
|
||||||
let devapiurl = 'http://ssa.sineedge.com/sparqapi/api/';
|
let devapiurl = 'http://ssa.sineedge.com/sparqapi/api/';
|
||||||
let localapiurl = 'http://192.168.0.6:9999/AWSEC2/sparqapi/api/';
|
let localapiurl = 'http://192.168.0.6:9999/AWSEC2/sparqapi/api/';
|
||||||
return testapiurl;
|
return devapiurl;
|
||||||
}
|
}
|
||||||
|
|
||||||
getcurrentDate()
|
getcurrentDate()
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user