Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
cb74c4f816
41
ng6-seed/package-lock.json
generated
41
ng6-seed/package-lock.json
generated
@ -4344,12 +4344,14 @@
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
@ -4364,17 +4366,20 @@
|
||||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
@ -4491,7 +4496,8 @@
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
@ -4503,6 +4509,7 @@
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"number-is-nan": "^1.0.0"
|
||||
}
|
||||
@ -4517,6 +4524,7 @@
|
||||
"version": "3.0.4",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
@ -4524,12 +4532,14 @@
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"minipass": {
|
||||
"version": "2.2.4",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.1",
|
||||
"yallist": "^3.0.0"
|
||||
@ -4548,6 +4558,7 @@
|
||||
"version": "0.5.1",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
}
|
||||
@ -4628,7 +4639,8 @@
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
@ -4640,6 +4652,7 @@
|
||||
"version": "1.4.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
@ -4761,6 +4774,7 @@
|
||||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"code-point-at": "^1.0.0",
|
||||
"is-fullwidth-code-point": "^1.0.0",
|
||||
@ -7313,6 +7327,14 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"ngx-viewer": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ngx-viewer/-/ngx-viewer-1.0.1.tgz",
|
||||
"integrity": "sha512-9nYfxsxco/x8zLjdVOAhi4SFMZhSgtHBGTmcns9ebQn5nCBwHbk9O62K5ZIWkfOElr9ey1KA+DmppH32YGkXEA==",
|
||||
"requires": {
|
||||
"tslib": "^1.9.0"
|
||||
}
|
||||
},
|
||||
"nice-try": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
|
||||
@ -10695,6 +10717,11 @@
|
||||
"extsprintf": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"viewerjs": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/viewerjs/-/viewerjs-1.3.1.tgz",
|
||||
"integrity": "sha512-FBO2pN5XKx2yYpfZpQFSI89GhN4PvIhI2gCyahTsLzIUQzKIIRTQyAOMG5Dey7rgMMGU+JsmpfL2q/eARiB7Dg=="
|
||||
},
|
||||
"vm-browserify": {
|
||||
"version": "0.0.4",
|
||||
"resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<div class="pad-wrap">
|
||||
<div class="pad-wrap" [style.minHeight]="'100%'">
|
||||
<div fxFlex.gt-sm="100" fxFlex.gt-xs="100" fxFlex="100">
|
||||
<mat-card style="min-height: 90%;">
|
||||
<mat-card-title>
|
||||
|
||||
@ -19,6 +19,7 @@ li
|
||||
display:inline-block;
|
||||
//float:left;
|
||||
}
|
||||
|
||||
|
||||
.example-full-width {
|
||||
width: 95%;
|
||||
|
||||
@ -1,58 +1,135 @@
|
||||
<mat-card-content>
|
||||
<mat-table [dataSource]="dataSourceTab1" matSort *ngIf="PdListData.length > 0" >
|
||||
|
||||
<ng-container matColumnDef="PDType">
|
||||
<mat-card-content>
|
||||
<mat-expansion-panel [(expanded)]="xpandStatus">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title class="text-xs-left">
|
||||
<h6 class="mt-0">
|
||||
<mat-icon>filter_list</mat-icon> Filter</h6>
|
||||
</mat-panel-title>
|
||||
|
||||
<mat-cell fxFlex="15" class="cell" *matCellDef="let details;" style="justify-content:flex-end">
|
||||
|
||||
<div *ngIf="details.fk_pd_type != null" [ngClass]="(details.fk_pd_type=='1')?'fullPD':(details.fk_pd_type=='2')?'smartPD':'telePD'" class="mr-1 mb-1 hover-icon commonPDType"
|
||||
[matTooltip]="details.pd_type_name" matTooltipPosition="above"><strong style="font-size:3rem;">{{(details.pd_type_name | slice:0:1)}}</strong></div>
|
||||
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Name">
|
||||
<mat-cell class="cell" *matCellDef="let details;">
|
||||
<span *ngIf="details.applicat_details" mat-line><b>{{details.applicat_details[0].applicant_name}}</b></span><br>
|
||||
<span class="fontsize"> {{details.lender_applicant_id}}</span> <span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Lenderid">
|
||||
<mat-cell class="cell" *matCellDef="let details">
|
||||
<span *ngIf="details.lender_full_name" mat-line> {{details.lender_full_name}} </span><br>
|
||||
<span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}/{{details.subproduct_abbr}}</span> <br>
|
||||
<span *ngIf="details.loan_amount" class="fontsize"><i class="fa-1x fa fa-rupee"></i> {{details.loan_amount}}</span>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Address">
|
||||
<mat-cell class="cell" *matCellDef="let details;">
|
||||
<span matTooltip="Initiated Date" matTooltipPosition="above" >{{details.pd_date_of_initiation}}</span><br>
|
||||
<span class="fontsize" *ngIf="details.city_name"> <i class="fa-1x fa fa-map-marker"> </i> {{details.city_name}}-{{details.pincode}} </span>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Status">
|
||||
<mat-cell class="cell center" *matCellDef="let details;">
|
||||
<span *ngIf="details.pd_status!='QC_COMPLETED'"> {{details.pd_status}}</span>
|
||||
<span *ngIf="details.pd_status=='QC_COMPLETED'"> QC COMPLETED</span><br>
|
||||
<span class="fontsize" *ngIf="details.pd_status!='SCHEDULED' && details.pd_status!='QC_COMPLETED'" [matTooltip]="details.pd_status | titlecase" matTooltipPosition="above" >{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}
|
||||
</span>
|
||||
<span class="fontsize" *ngIf="details.pd_status=='QC_COMPLETED'" matTooltip="QC Completed" matTooltipPosition="above" >{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}
|
||||
</span>
|
||||
<span class="fontsize" *ngIf="details.pd_status=='SCHEDULED'" [matTooltip]="details.pd_status | titlecase" matTooltipPosition="above" >{{details.scheduled_on}}
|
||||
</span>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Action">
|
||||
<mat-cell class="cell center" *matCellDef="let details;">
|
||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary" (click)="viewPD(details.pd_id)" matTooltip="View"
|
||||
matTooltipPosition="above"><mat-icon>visibility</mat-icon></button>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">
|
||||
</mat-row>
|
||||
</mat-table>
|
||||
|
||||
</mat-card-content>
|
||||
</mat-expansion-panel-header>
|
||||
<mat-list class="m-gap p-gap">
|
||||
<div [formGroup]="searchForm">
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-select multiple formControlName="pd_type" placeholder="PD Type">
|
||||
<mat-option *ngFor="let type of PDType" [value]="type.pd_type_id">{{type.type_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-select multiple formControlName="pd_status" placeholder="PD Status">
|
||||
<mat-option *ngFor="let status of pdStatus" [value]="status.pd_status_name">{{status.pd_status_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<input matInput [matDatepicker]="picker" (blur)="checkDate($event)" formControlName="pd_from_date" placeholder="Choose a From date">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<input matInput [matDatepicker]="picker1" [min]="searchForm.get('pd_from_date').value" formControlName="pd_to_date" placeholder="Choose a todate">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker1></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-select multiple formControlName="pd_products" placeholder="Products">
|
||||
<mat-option *ngFor="let pro of PRODUCTS" [value]="pro.product_id">{{pro.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-select multiple formControlName="pd_city" placeholder="City">
|
||||
<mat-option *ngFor="let city of CITY" [value]="city.city_id">{{city.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-select multiple formControlName="pd_lender" placeholder="Lender Name">
|
||||
<mat-option *ngFor="let ent of ENTITY" [value]="ent.entity_id">{{ent.full_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<input matInput type="text" formControlName="pd_name" placeholder="Applicant Name">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<input matInput type="text" formControlName="pd_applicant_id" placeholder="Applicant Id">
|
||||
</mat-form-field>
|
||||
<br/>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()" matTooltip="Add More Additional Requirements"
|
||||
matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>search</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-list>
|
||||
|
||||
<mat-paginator *ngIf="!recordStatus" #paginator class="mat-elevation-z1" [length]="PdListData.length" [pageIndex]="pageIndex" [pageSize]="pageSize"
|
||||
[pageSizeOptions]="[5, 10, 25,50, 100]" (page)="pageEvent = $event; pageChange($event)" showFirstLastButtons>
|
||||
</mat-paginator>
|
||||
</mat-expansion-panel>
|
||||
<br/>
|
||||
<mat-table [dataSource]="dataSourceTab1" matSort *ngIf="PdListData.length > 0">
|
||||
|
||||
<ng-container matColumnDef="PDType">
|
||||
|
||||
<mat-cell fxFlex="15" class="cell" *matCellDef="let details;" style="justify-content:flex-end">
|
||||
|
||||
<div *ngIf="details.fk_pd_type != null" [ngClass]="(details.fk_pd_type=='1')?'fullPD':(details.fk_pd_type=='2')?'smartPD':'telePD'"
|
||||
class="mr-1 mb-1 hover-icon commonPDType" [matTooltip]="details.pd_type_name" matTooltipPosition="above">
|
||||
<strong style="font-size:3rem;">{{(details.pd_type_name | slice:0:1)}}</strong>
|
||||
</div>
|
||||
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Name">
|
||||
<mat-cell class="cell" *matCellDef="let details;">
|
||||
<span *ngIf="details.applicat_details" mat-line>
|
||||
<b>{{details.applicat_details[0].applicant_name}}</b>
|
||||
</span>
|
||||
<br>
|
||||
<span class="fontsize"> {{details.lender_applicant_id}}</span>
|
||||
<span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Lenderid">
|
||||
<mat-cell class="cell" *matCellDef="let details">
|
||||
<span *ngIf="details.lender_full_name" mat-line> {{details.lender_full_name}} </span>
|
||||
<br>
|
||||
<span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}/{{details.subproduct_abbr}}</span>
|
||||
<br>
|
||||
<span *ngIf="details.loan_amount" class="fontsize">
|
||||
<i class="fa-1x fa fa-rupee"></i> {{details.loan_amount}}</span>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Address">
|
||||
<mat-cell class="cell" *matCellDef="let details;">
|
||||
<span matTooltip="Initiated Date" matTooltipPosition="above">{{details.pd_date_of_initiation}}</span>
|
||||
<br>
|
||||
<span class="fontsize" *ngIf="details.city_name">
|
||||
<i class="fa-1x fa fa-map-marker"> </i> {{details.city_name}}-{{details.pincode}} </span>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Status">
|
||||
<mat-cell class="cell center" *matCellDef="let details;">
|
||||
<span *ngIf="details.pd_status!='QC_COMPLETED'"> {{details.pd_status}}</span>
|
||||
<span *ngIf="details.pd_status=='QC_COMPLETED'"> QC COMPLETED</span>
|
||||
<br>
|
||||
<span class="fontsize" *ngIf="details.pd_status!='SCHEDULED' && details.pd_status!='QC_COMPLETED'" [matTooltip]="details.pd_status | titlecase"
|
||||
matTooltipPosition="above">{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}
|
||||
</span>
|
||||
<span class="fontsize" *ngIf="details.pd_status=='QC_COMPLETED'" matTooltip="QC Completed" matTooltipPosition="above">{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}
|
||||
</span>
|
||||
<span class="fontsize" *ngIf="details.pd_status=='SCHEDULED'" [matTooltip]="details.pd_status | titlecase" matTooltipPosition="above">{{details.scheduled_on}}
|
||||
</span>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Action">
|
||||
<mat-cell class="cell center" *matCellDef="let details;">
|
||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary" (click)="viewPD(details.pd_id)"
|
||||
matTooltip="View" matTooltipPosition="above">
|
||||
<mat-icon>visibility</mat-icon>
|
||||
</button>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">
|
||||
</mat-row>
|
||||
</mat-table>
|
||||
|
||||
</mat-card-content>
|
||||
|
||||
<mat-paginator *ngIf="!recordStatus" #paginator class="mat-elevation-z1" [length]="PdListData.length" [pageIndex]="pageIndex"
|
||||
[pageSize]="pageSize" [pageSizeOptions]="[5, 10, 25,50, 100]" (page)="pageEvent = $event; pageChange($event)" showFirstLastButtons>
|
||||
</mat-paginator>
|
||||
<notifier-container></notifier-container>
|
||||
@ -1,6 +1,9 @@
|
||||
import { Component,ViewChild, OnInit, ViewEncapsulation, Input, Output, EventEmitter, OnDestroy, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { PdTrigerService } from './../../../pd-service/pd-triger.service';
|
||||
import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material';
|
||||
import { FormGroup, FormBuilder } from '@angular/forms';
|
||||
import { DatePipe } from '@angular/common';
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
|
||||
@Component({
|
||||
selector: 'app-all-pd',
|
||||
@ -11,6 +14,16 @@ import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/m
|
||||
})
|
||||
|
||||
export class AllPdComponent implements OnInit, OnChanges {
|
||||
xpandStatus: boolean = false;
|
||||
PRODUCTS: any;
|
||||
ENTITY: any;
|
||||
CITY: any;
|
||||
tempStore = new MatTableDataSource();
|
||||
PDType: any;
|
||||
pdStatus: any;
|
||||
searchForm:FormGroup;
|
||||
pipe = new DatePipe('en-US');
|
||||
public notifier : NotifierService;
|
||||
recordStatus: boolean;
|
||||
errorMessage:any[]=[];
|
||||
tabStatus:string="ALL";
|
||||
@ -34,12 +47,26 @@ export class AllPdComponent implements OnInit, OnChanges {
|
||||
pageSize = 10;
|
||||
pageEvent: PageEvent;
|
||||
|
||||
constructor(private _pd: PdTrigerService) {
|
||||
constructor(private _pd: PdTrigerService,private _fb:FormBuilder) {
|
||||
|
||||
this.searchForm = this._fb.group(
|
||||
{
|
||||
pd_type:[null],
|
||||
pd_status:[null],
|
||||
pd_from_date:[null],
|
||||
pd_to_date:[null],
|
||||
pd_city:[null],
|
||||
pd_products:[null],
|
||||
pd_lender:[null],
|
||||
pd_name:[null],
|
||||
pd_applicant_id:[null],
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.recordStatus=false;
|
||||
// this.loadPDDetails();
|
||||
this.getcommonDropDown();
|
||||
}
|
||||
ngAfterViewInit() {
|
||||
this.dataSourceTab1.paginator = this.paginator;
|
||||
@ -65,7 +92,7 @@ export class AllPdComponent implements OnInit, OnChanges {
|
||||
this.PdListData = data.records;
|
||||
this.dataLengthTab1 = data.records.length;
|
||||
this.dataSourceTab1.data = this.PdListData;
|
||||
|
||||
this.tempStore.data = this.PdListData;
|
||||
}
|
||||
else{
|
||||
this.PdListData=[];
|
||||
@ -87,4 +114,89 @@ export class AllPdComponent implements OnInit, OnChanges {
|
||||
return word[0].toUpperCase() + word.substr(1).toLowerCase();
|
||||
}
|
||||
|
||||
/**
|
||||
* Common Search
|
||||
* sriram
|
||||
*/
|
||||
|
||||
getcommonDropDown()
|
||||
{
|
||||
this._pd.getAllMasterDatas('PDSTATUS').subscribe(res=>
|
||||
{
|
||||
if(res.dataStatus==true)
|
||||
{
|
||||
this.pdStatus = res.records.filter(status=>status.isactive==1);
|
||||
}
|
||||
});
|
||||
|
||||
this._pd.getAllMasterDatas('PDTYPE').subscribe(res=>
|
||||
{
|
||||
if(res.dataStatus==true)
|
||||
{
|
||||
this.PDType = res.records.filter(type=>type.isactive==1);
|
||||
}
|
||||
});
|
||||
|
||||
this._pd.getAllMasterDatas('CITY').subscribe(res=>
|
||||
{
|
||||
if(res.dataStatus==true)
|
||||
{
|
||||
this.CITY = res.records.filter(city=>city.isactive==1);
|
||||
}
|
||||
});
|
||||
this._pd.getAllMasterDatas('ENTITY').subscribe(res=>
|
||||
{
|
||||
if(res.dataStatus==true)
|
||||
{
|
||||
this.ENTITY = res.records.filter(ent=>ent.isactive==1);
|
||||
}
|
||||
});
|
||||
this._pd.getAllMasterDatas('PRODUCTS').subscribe(res=>
|
||||
{
|
||||
if(res.dataStatus==true)
|
||||
{
|
||||
this.PRODUCTS = res.records.filter(pro=>pro.isactive==1);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
checkDate(e)
|
||||
{
|
||||
console.log(e);
|
||||
}
|
||||
searchItem()
|
||||
{
|
||||
|
||||
if(this.searchForm.value.pd_type !=null)
|
||||
{
|
||||
|
||||
}else
|
||||
{
|
||||
this.searchForm.value.pd_type = [];
|
||||
}
|
||||
|
||||
if(this.searchForm.value.pd_status !=null)
|
||||
{
|
||||
|
||||
}else
|
||||
{
|
||||
this.searchForm.value.pd_status = [];
|
||||
}
|
||||
|
||||
this.searchForm.value.pd_from_date = this.pipe.transform(this.searchForm.value.pd_from_date,'yyyy-MM-dd');
|
||||
this.searchForm.value.pd_to_date = this.pipe.transform(this.searchForm.value.pd_to_date,'yyyy-MM-dd');
|
||||
console.log(JSON.stringify(this.searchForm.value));
|
||||
this._pd.overAllSearchFormDetails(this.searchForm.value).subscribe(res=>
|
||||
{
|
||||
this.xpandStatus = false;
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
this.dataSourceTab1 = res['records'];
|
||||
}else{
|
||||
// this.notifier.notify('warning', 'No Records Found');
|
||||
this.dataSourceTab1 = this.tempStore;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,4 +1,66 @@
|
||||
<mat-card-content>
|
||||
|
||||
<mat-expansion-panel>
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title class="text-xs-left">
|
||||
<h6 class="mt-0"><mat-icon>filter_list</mat-icon> Filter</h6>
|
||||
</mat-panel-title>
|
||||
|
||||
</mat-expansion-panel-header>
|
||||
<mat-list class="m-gap p-gap">
|
||||
<div [formGroup]="searchForm">
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-select multiple formControlName="pd_type" placeholder="PD Type">
|
||||
<mat-option *ngFor="let type of PDType" [value]="type.pd_type_id">{{type.type_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-select multiple formControlName="pd_status" placeholder="PD Status">
|
||||
<mat-option *ngFor="let status of pdStatus" [value]="status.pd_status_name">{{status.pd_status_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<input matInput [matDatepicker]="picker" (blur)="checkDate($event)" formControlName="pd_from_date" placeholder="Choose a From date">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<input matInput [matDatepicker]="picker1" [min]="searchForm.get('pd_from_date').value" formControlName="pd_to_date" placeholder="Choose a todate">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker1></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-select multiple formControlName="pd_products" placeholder="Products">
|
||||
<mat-option *ngFor="let pro of PRODUCTS" [value]="pro.product_id">{{pro.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-select multiple formControlName="pd_city" placeholder="City">
|
||||
<mat-option *ngFor="let city of CITY" [value]="city.city_id">{{city.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-select multiple formControlName="pd_lender" placeholder="Lender Name">
|
||||
<mat-option *ngFor="let ent of ENTITY" [value]="ent.entity_id">{{ent.full_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<input matInput type="text" formControlName="pd_name" placeholder="Applicant Name">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<input matInput type="text" formControlName="pd_applicant_id" placeholder="Applicant Id">
|
||||
</mat-form-field>
|
||||
<br/>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||
matTooltip="Add More Additional Requirements" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>search</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-list>
|
||||
|
||||
</mat-expansion-panel>
|
||||
<br/>
|
||||
|
||||
<mat-table [dataSource]="dataSourceTab4" matSort *ngIf="completedPdListData.length > 0" >
|
||||
|
||||
<ng-container matColumnDef="PDType">
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import { Component,ViewChild, OnInit, ViewEncapsulation, Input, Output, EventEmitter, OnDestroy, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { PdTrigerService } from './../../../pd-service/pd-triger.service';
|
||||
import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material';
|
||||
import { FormGroup, FormBuilder } from '@angular/forms';
|
||||
import { DatePipe } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-completed-pd',
|
||||
@ -11,11 +13,23 @@ import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/m
|
||||
})
|
||||
|
||||
export class CompletedPdComponent implements OnInit, OnChanges {
|
||||
xpandStatus: boolean = false;
|
||||
PRODUCTS: any;
|
||||
CITY: any;
|
||||
ENTITY: any;
|
||||
PDType: any;
|
||||
pdStatus: any;
|
||||
recordStatus: boolean;
|
||||
errorMessage:any[]=[];
|
||||
tabStatus:string="COMPLETED";
|
||||
pipe = new DatePipe('en-US');
|
||||
|
||||
public dataLengthTab4: number;
|
||||
public dataSourceTab4 = new MatTableDataSource();
|
||||
tempStore = new MatTableDataSource();
|
||||
|
||||
searchForm:FormGroup;
|
||||
|
||||
displayedColumns = ['PDType','Name','Lenderid','Address','Status','Action'];
|
||||
|
||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||
@ -33,12 +47,26 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
||||
pageSize = 10;
|
||||
pageEvent: PageEvent;
|
||||
|
||||
constructor(private _pd: PdTrigerService) {
|
||||
constructor(private _pd: PdTrigerService,public _fb:FormBuilder) {
|
||||
|
||||
this.searchForm = this._fb.group(
|
||||
{
|
||||
pd_type:[null],
|
||||
pd_status:[null],
|
||||
pd_from_date:[null],
|
||||
pd_to_date:[null],
|
||||
pd_city:[null],
|
||||
pd_products:[null],
|
||||
pd_lender:[null],
|
||||
pd_name:[null],
|
||||
pd_applicant_id:[null],
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.recordStatus=false;
|
||||
// this.loadPDDetails();
|
||||
this.getcommonDropDown();
|
||||
}
|
||||
ngAfterViewInit() {
|
||||
this.dataSourceTab4.paginator = this.paginator;
|
||||
@ -63,7 +91,7 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
||||
this.completedPdListData = data.records;
|
||||
this.dataLengthTab4 = data.records.length;
|
||||
this.dataSourceTab4.data = this.completedPdListData;
|
||||
|
||||
this.tempStore.data
|
||||
}
|
||||
else{
|
||||
this.completedPdListData=[];
|
||||
@ -85,6 +113,94 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
||||
return word[0].toUpperCase() + word.substr(1).toLowerCase();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Common Search
|
||||
* sriram
|
||||
*/
|
||||
|
||||
getcommonDropDown()
|
||||
{
|
||||
this._pd.getAllMasterDatas('PDSTATUS').subscribe(res=>
|
||||
{
|
||||
if(res.dataStatus==true)
|
||||
{
|
||||
this.pdStatus = res.records.filter(status=>status.isactive==1 && status.pd_status_name==this.tabStatus);
|
||||
// this.searchForm.controls['pd_status'].setValue(this.pdStatus[0]);
|
||||
}
|
||||
});
|
||||
|
||||
this._pd.getAllMasterDatas('PDTYPE').subscribe(res=>
|
||||
{
|
||||
if(res.dataStatus==true)
|
||||
{
|
||||
this.PDType = res.records.filter(type=>type.isactive==1);
|
||||
}
|
||||
});
|
||||
|
||||
this._pd.getAllMasterDatas('CITY').subscribe(res=>
|
||||
{
|
||||
if(res.dataStatus==true)
|
||||
{
|
||||
this.CITY = res.records.filter(city=>city.isactive==1);
|
||||
}
|
||||
});
|
||||
this._pd.getAllMasterDatas('ENTITY').subscribe(res=>
|
||||
{
|
||||
if(res.dataStatus==true)
|
||||
{
|
||||
this.ENTITY = res.records.filter(ent=>ent.isactive==1);
|
||||
}
|
||||
});
|
||||
this._pd.getAllMasterDatas('PRODUCTS').subscribe(res=>
|
||||
{
|
||||
if(res.dataStatus==true)
|
||||
{
|
||||
this.PRODUCTS = res.records.filter(pro=>pro.isactive==1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
checkDate(e)
|
||||
{
|
||||
console.log(e);
|
||||
}
|
||||
searchItem()
|
||||
{
|
||||
|
||||
if(this.searchForm.value.pd_type !=null)
|
||||
{
|
||||
|
||||
}else
|
||||
{
|
||||
this.searchForm.value.pd_type = [];
|
||||
}
|
||||
|
||||
if(this.searchForm.value.pd_status !=null)
|
||||
{
|
||||
|
||||
}else
|
||||
{
|
||||
this.searchForm.value.pd_status = [];
|
||||
}
|
||||
|
||||
this.searchForm.value.pd_from_date = this.pipe.transform(this.searchForm.value.pd_from_date,'yyyy-MM-dd');
|
||||
this.searchForm.value.pd_to_date = this.pipe.transform(this.searchForm.value.pd_to_date,'yyyy-MM-dd');
|
||||
|
||||
this._pd.overAllSearchFormDetails(this.searchForm.value).subscribe(res=>
|
||||
{
|
||||
this.xpandStatus = false;
|
||||
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
this.dataSourceTab4 = res['records'];
|
||||
}else{
|
||||
// this.notifier.notify('warning', 'No Records Found');
|
||||
this.dataSourceTab4 = this.tempStore;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,64 @@
|
||||
<mat-card-content>
|
||||
<mat-expansion-panel [(expanded)]="xpandStatus">
|
||||
<mat-expansion-panel-header >
|
||||
<mat-panel-title class="text-xs-left">
|
||||
<h6 class="mt-0"><mat-icon>filter_list</mat-icon> Filter</h6>
|
||||
</mat-panel-title>
|
||||
|
||||
</mat-expansion-panel-header>
|
||||
<mat-list class="m-gap p-gap">
|
||||
<div [formGroup]="searchForm">
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-select multiple formControlName="pd_type" placeholder="PD Type">
|
||||
<mat-option *ngFor="let type of PDType" [value]="type.pd_type_id">{{type.type_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-select multiple formControlName="pd_status" placeholder="PD Status">
|
||||
<mat-option *ngFor="let status of pdStatus" [value]="status.pd_status_name">{{status.pd_status_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<input matInput [matDatepicker]="picker" (blur)="checkDate($event)" formControlName="pd_from_date" placeholder="Choose a From date">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<input matInput [matDatepicker]="picker1" [min]="searchForm.get('pd_from_date').value" formControlName="pd_to_date" placeholder="Choose a todate">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker1></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-select multiple formControlName="pd_products" placeholder="Products">
|
||||
<mat-option *ngFor="let pro of PRODUCTS" [value]="pro.product_id">{{pro.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-select multiple formControlName="pd_city" placeholder="City">
|
||||
<mat-option *ngFor="let city of CITY" [value]="city.city_id">{{city.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-select multiple formControlName="pd_lender" placeholder="Lender Name">
|
||||
<mat-option *ngFor="let ent of ENTITY" [value]="ent.entity_id">{{ent.full_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<input matInput type="text" formControlName="pd_name" placeholder="Applicant Name">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<input matInput type="text" formControlName="pd_applicant_id" placeholder="Applicant Id">
|
||||
</mat-form-field>
|
||||
<br/>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||
matTooltip="Add More Additional Requirements" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>search</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-list>
|
||||
|
||||
</mat-expansion-panel>
|
||||
<br/>
|
||||
<mat-table [dataSource]="dataSourceTab2" matSort *ngIf="progressPdListData.length > 0" >
|
||||
<ng-container matColumnDef="PDType">
|
||||
<mat-cell fxFlex="15" class="cell" style="text-align: center" *matCellDef="let details;">
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import { Component,ViewChild, OnInit, ViewEncapsulation, Input, Output, EventEmitter, OnDestroy, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { PdTrigerService } from './../../../pd-service/pd-triger.service';
|
||||
import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { DatePipe } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-inprogress-pd',
|
||||
@ -9,11 +11,19 @@ import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/m
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class InprogressPdComponent implements OnInit, OnChanges {
|
||||
xpandStatus: boolean = false;
|
||||
PRODUCTS: any;
|
||||
ENTITY: any;
|
||||
CITY: any;
|
||||
PDType: any;
|
||||
pdStatus: any;
|
||||
recordStatus: boolean;
|
||||
errorMessage:any[]=[];
|
||||
tabStatus:string="INPROGRESS";
|
||||
pipe = new DatePipe('en-US');
|
||||
public dataLengthTab2: number;
|
||||
public dataSourceTab2 = new MatTableDataSource();
|
||||
tempStore = new MatTableDataSource();
|
||||
displayedColumns = ['PDType','Name','Lenderid','Address','Status','Action'];
|
||||
|
||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||
@ -30,13 +40,27 @@ export class InprogressPdComponent implements OnInit, OnChanges {
|
||||
pageIndex = 0;
|
||||
pageSize = 10;
|
||||
pageEvent: PageEvent;
|
||||
searchForm:FormGroup;
|
||||
constructor(private _pd: PdTrigerService,public _fb:FormBuilder) {
|
||||
|
||||
constructor(private _pd: PdTrigerService) {
|
||||
this.searchForm = this._fb.group(
|
||||
{
|
||||
pd_type:[null],
|
||||
pd_status:[null],
|
||||
pd_from_date:[null],
|
||||
pd_to_date:[null],
|
||||
pd_city:[null],
|
||||
pd_products:[null],
|
||||
pd_lender:[null],
|
||||
pd_name:[null],
|
||||
pd_applicant_id:[null],
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.recordStatus=false;
|
||||
// this.loadPDDetails();
|
||||
this.getcommonDropDown();
|
||||
}
|
||||
ngAfterViewInit() {
|
||||
this.dataSourceTab2.paginator = this.paginator;
|
||||
@ -61,7 +85,7 @@ export class InprogressPdComponent implements OnInit, OnChanges {
|
||||
this.progressPdListData = data.records;
|
||||
this.dataLengthTab2 = data.records.length;
|
||||
this.dataSourceTab2.data = this.progressPdListData;
|
||||
|
||||
this.tempStore.data = this.progressPdListData;
|
||||
}
|
||||
else{
|
||||
this.progressPdListData=[];
|
||||
@ -82,4 +106,89 @@ export class InprogressPdComponent implements OnInit, OnChanges {
|
||||
return word[0].toUpperCase() + word.substr(1).toLowerCase();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Common Search
|
||||
* sriram
|
||||
*/
|
||||
|
||||
getcommonDropDown()
|
||||
{
|
||||
this._pd.getAllMasterDatas('PDSTATUS').subscribe(res=>
|
||||
{
|
||||
if(res.dataStatus==true)
|
||||
{
|
||||
this.pdStatus = res.records.filter(status=>status.isactive==1 && status.pd_status_name == this.tabStatus);
|
||||
}
|
||||
// this.searchForm.controls['pd_status'].setValue(this.pdStatus[0]);
|
||||
});
|
||||
|
||||
this._pd.getAllMasterDatas('PDTYPE').subscribe(res=>
|
||||
{
|
||||
if(res.dataStatus==true)
|
||||
{
|
||||
this.PDType = res.records.filter(type=>type.isactive==1);
|
||||
}
|
||||
});
|
||||
|
||||
this._pd.getAllMasterDatas('CITY').subscribe(res=>
|
||||
{
|
||||
if(res.dataStatus==true)
|
||||
{
|
||||
this.CITY = res.records.filter(city=>city.isactive==1);
|
||||
}
|
||||
});
|
||||
this._pd.getAllMasterDatas('ENTITY').subscribe(res=>
|
||||
{
|
||||
if(res.dataStatus==true)
|
||||
{
|
||||
this.ENTITY = res.records.filter(ent=>ent.isactive==1);
|
||||
}
|
||||
});
|
||||
this._pd.getAllMasterDatas('PRODUCTS').subscribe(res=>
|
||||
{
|
||||
if(res.dataStatus==true)
|
||||
{
|
||||
this.PRODUCTS = res.records.filter(pro=>pro.isactive==1);
|
||||
}
|
||||
});
|
||||
}
|
||||
checkDate(e)
|
||||
{
|
||||
console.log(e);
|
||||
}
|
||||
searchItem()
|
||||
{
|
||||
|
||||
if(this.searchForm.value.pd_type !=null)
|
||||
{
|
||||
|
||||
}else
|
||||
{
|
||||
this.searchForm.value.pd_type = [];
|
||||
}
|
||||
|
||||
if(this.searchForm.value.pd_status !=null)
|
||||
{
|
||||
|
||||
}else
|
||||
{
|
||||
this.searchForm.value.pd_status = [];
|
||||
}
|
||||
|
||||
this.searchForm.value.pd_from_date = this.pipe.transform(this.searchForm.value.pd_from_date,'yyyy-MM-dd');
|
||||
this.searchForm.value.pd_to_date = this.pipe.transform(this.searchForm.value.pd_to_date,'yyyy-MM-dd');
|
||||
|
||||
this._pd.overAllSearchFormDetails(this.searchForm.value).subscribe(res=>
|
||||
{
|
||||
this.xpandStatus = false;
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
this.dataSourceTab2 = res['records'];
|
||||
}else{
|
||||
// this.notifier.notify('warning', 'No Records Found');
|
||||
this.dataSourceTab2 = this.tempStore;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="50" class="pb-0 text-sm-right">
|
||||
<button mat-fab color="primary" (click)="viewMapPdDetails()" class="mr-1 mb-1" matTooltip="Map view" matTooltipPosition="above"><mat-icon>map</mat-icon></button>
|
||||
<button mat-fab color="primary" (click)="addPdDetails()" class="mr-1 mb-1" matTooltip="Add PD" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||
<button mat-fab (click)="viewMapPdDetails()" class="mr-1 mb-1 hover-icon" matTooltip="Map view" matTooltipPosition="above"><mat-icon>map</mat-icon></button>
|
||||
<button mat-fab (click)="addPdDetails()" class="mr-1 mb-1 hover-icon" matTooltip="Add PD" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||
</div>
|
||||
</div>
|
||||
<mat-card>
|
||||
|
||||
@ -20,4 +20,8 @@
|
||||
}
|
||||
.mat-tab-label-active{
|
||||
color: red !important;
|
||||
}
|
||||
}
|
||||
.mat-fab.mat-accent{
|
||||
color:red !important;
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
|
||||
<div fxLayout="row">
|
||||
<div fxLayout="row" [style.minHeight]="'100%'">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 95%;">
|
||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 24%;">
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
<div>
|
||||
<div style="text-align:right;position:absolute;z-index:2;right:1px">
|
||||
<button mat-fab color="primary" matTooltip="Close" matTooltipPosition="above" (click)="goList()"><mat-icon>close</mat-icon></button>
|
||||
<button mat-fab class="hover-icon" matTooltip="Close" matTooltipPosition="above" (click)="goList()"><mat-icon>close</mat-icon></button>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||
|
||||
@ -1,4 +1,64 @@
|
||||
<mat-card-content>
|
||||
<mat-expansion-panel [(expanded)]="xpandStatus">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title class="text-xs-left">
|
||||
<h6 class="mt-0"><mat-icon>filter_list</mat-icon> Filter</h6>
|
||||
</mat-panel-title>
|
||||
|
||||
</mat-expansion-panel-header>
|
||||
<mat-list class="m-gap p-gap">
|
||||
<div [formGroup]="searchForm">
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-select multiple formControlName="pd_type" placeholder="PD Type">
|
||||
<mat-option *ngFor="let type of PDType" [value]="type.pd_type_id">{{type.type_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-select multiple formControlName="pd_status" placeholder="PD Status">
|
||||
<mat-option *ngFor="let status of pdStatus" [value]="status.pd_status_name">{{status.pd_status_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<input matInput [matDatepicker]="picker" (blur)="checkDate($event)" formControlName="pd_from_date" placeholder="Choose a From date">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<input matInput [matDatepicker]="picker1" [min]="searchForm.get('pd_from_date').value"formControlName="pd_to_date" placeholder="Choose a todate">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker1></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-select multiple formControlName="pd_products" placeholder="Products">
|
||||
<mat-option *ngFor="let pro of PRODUCTS" [value]="pro.product_id">{{pro.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-select multiple formControlName="pd_city" placeholder="City">
|
||||
<mat-option *ngFor="let city of CITY" [value]="city.city_id">{{city.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-select multiple formControlName="pd_lender" placeholder="Lender Name">
|
||||
<mat-option *ngFor="let ent of ENTITY" [value]="ent.entity_id">{{ent.full_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<input matInput type="text" formControlName="pd_name" placeholder="Applicant Name">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<input matInput type="text" formControlName="pd_applicant_id" placeholder="Applicant Id">
|
||||
</mat-form-field>
|
||||
<br/>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||
matTooltip="Add More Additional Requirements" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>search</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-list>
|
||||
|
||||
</mat-expansion-panel>
|
||||
<br/>
|
||||
<mat-table [dataSource]="dataSourceTab5" matSort *ngIf="qcCompletedPdListData.length > 0" >
|
||||
<ng-container matColumnDef="PDType">
|
||||
<mat-cell fxFlex="15" class="cell" style="text-align: center" *matCellDef="let details;">
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import { Component,ViewChild, OnInit, ViewEncapsulation, Input, Output, EventEmitter, OnDestroy, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { Component, ViewChild, OnInit, ViewEncapsulation, Input, Output, EventEmitter, OnDestroy, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { PdTrigerService } from './../../../pd-service/pd-triger.service';
|
||||
import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { DatePipe } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-qc-completed-pd',
|
||||
@ -11,21 +13,31 @@ import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/m
|
||||
})
|
||||
|
||||
export class QcCompletedPdComponent implements OnInit, OnChanges {
|
||||
xpandStatus: boolean = false;
|
||||
PRODUCTS: any;
|
||||
ENTITY: any;
|
||||
CITY: any;
|
||||
PDType: any;
|
||||
pdStatus: any;
|
||||
recordStatus: boolean;
|
||||
errorMessage:any[]=[];
|
||||
tabStatus:string="QC_COMPLETED";
|
||||
errorMessage: any[] = [];
|
||||
tabStatus: string = "QC_COMPLETED";
|
||||
pipe = new DatePipe('en-US');
|
||||
|
||||
public dataLengthTab5: number;
|
||||
public dataSourceTab5 = new MatTableDataSource();
|
||||
displayedColumns = ['PDType','Name','Lenderid','Address','Status','Action'];
|
||||
tempStore = new MatTableDataSource();
|
||||
searchForm: FormGroup;
|
||||
displayedColumns = ['PDType', 'Name', 'Lenderid', 'Address', 'Status', 'Action'];
|
||||
|
||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||
@ViewChild(MatSort) sort: MatSort;
|
||||
|
||||
|
||||
@Input() bindFilterValue: string;
|
||||
@Output() loadPdView = new EventEmitter<string>();
|
||||
|
||||
// data source variable details
|
||||
qcCompletedPdListData:any[] = [];
|
||||
qcCompletedPdListData: any[] = [];
|
||||
|
||||
// pagination variable details
|
||||
length = 50;
|
||||
@ -33,12 +45,26 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
|
||||
pageSize = 10;
|
||||
pageEvent: PageEvent;
|
||||
|
||||
constructor(private _pd: PdTrigerService) {
|
||||
}
|
||||
constructor(private _pd: PdTrigerService, public _fb: FormBuilder) {
|
||||
|
||||
this.searchForm = this._fb.group(
|
||||
{
|
||||
pd_type: [null],
|
||||
pd_status: [null],
|
||||
pd_from_date: [null],
|
||||
pd_to_date: [null],
|
||||
pd_city: [null],
|
||||
pd_products: [null],
|
||||
pd_lender: [null],
|
||||
pd_name: [null],
|
||||
pd_applicant_id: [null],
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.recordStatus=false;
|
||||
// this.loadPDDetails();
|
||||
this.recordStatus = false;
|
||||
// this.loadPDDetails();
|
||||
this.getcommonDropDown();
|
||||
}
|
||||
ngAfterViewInit() {
|
||||
this.dataSourceTab5.paginator = this.paginator;
|
||||
@ -51,39 +77,105 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
|
||||
filteredText = filteredText ? filteredText.trim() : filteredText;
|
||||
filteredText = filteredText ? filteredText.toLowerCase() : filteredText;
|
||||
this.dataSourceTab5.filter = filteredText;
|
||||
}
|
||||
}
|
||||
|
||||
// load inprogress pd list
|
||||
// load inprogress pd list
|
||||
|
||||
loadPDDetails() {
|
||||
this._pd.getTabStatusPdDetails(this.tabStatus)
|
||||
.subscribe(
|
||||
.subscribe(
|
||||
data => {
|
||||
if (data.status == 200) {
|
||||
this.qcCompletedPdListData = data.records;
|
||||
this.dataLengthTab5 = data.records.length;
|
||||
this.dataSourceTab5.data = this.qcCompletedPdListData;
|
||||
|
||||
this.tempStore.data = this.qcCompletedPdListData;
|
||||
}
|
||||
else{
|
||||
this.qcCompletedPdListData=[];
|
||||
this.dataLengthTab5= null;
|
||||
this.recordStatus=true;
|
||||
else {
|
||||
this.qcCompletedPdListData = [];
|
||||
this.dataLengthTab5 = null;
|
||||
this.recordStatus = true;
|
||||
}
|
||||
}, error => this.errorMessage = <any> error);
|
||||
}, error => this.errorMessage = <any>error);
|
||||
}
|
||||
pageChange(e) {
|
||||
console.log(e);
|
||||
}
|
||||
viewPD(pdid:string){
|
||||
viewPD(pdid: string) {
|
||||
this.loadPdView.next(pdid);
|
||||
|
||||
}
|
||||
titleCaseWord(word:string) {
|
||||
titleCaseWord(word: string) {
|
||||
if (!word) return word;
|
||||
return word[0].toUpperCase() + word.substr(1).toLowerCase();
|
||||
}
|
||||
|
||||
/**
|
||||
* Common Search
|
||||
* sriram
|
||||
*/
|
||||
|
||||
getcommonDropDown() {
|
||||
this._pd.getAllMasterDatas('PDSTATUS').subscribe(res => {
|
||||
if (res.dataStatus == true) {
|
||||
this.pdStatus = res.records.filter(status => status.isactive == 1 && status.pd_status_name == this.tabStatus);
|
||||
// this.searchForm.controls['pd_status'].setValue(this.pdStatus[0]);
|
||||
}
|
||||
});
|
||||
|
||||
this._pd.getAllMasterDatas('PDTYPE').subscribe(res => {
|
||||
if (res.dataStatus == true) {
|
||||
this.PDType = res.records.filter(type => type.isactive == 1);
|
||||
}
|
||||
});
|
||||
this._pd.getAllMasterDatas('CITY').subscribe(res => {
|
||||
if (res.dataStatus == true) {
|
||||
this.CITY = res.records.filter(city => city.isactive == 1);
|
||||
}
|
||||
});
|
||||
this._pd.getAllMasterDatas('ENTITY').subscribe(res => {
|
||||
if (res.dataStatus == true) {
|
||||
this.ENTITY = res.records.filter(ent => ent.isactive == 1);
|
||||
}
|
||||
});
|
||||
this._pd.getAllMasterDatas('PRODUCTS').subscribe(res => {
|
||||
if (res.dataStatus == true) {
|
||||
this.PRODUCTS = res.records.filter(pro => pro.isactive == 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
checkDate(e) {
|
||||
console.log(e);
|
||||
}
|
||||
searchItem() {
|
||||
|
||||
if (this.searchForm.value.pd_type != null) {
|
||||
|
||||
} else {
|
||||
this.searchForm.value.pd_type = [];
|
||||
}
|
||||
|
||||
if (this.searchForm.value.pd_status != null) {
|
||||
|
||||
} else {
|
||||
this.searchForm.value.pd_status = [];
|
||||
}
|
||||
|
||||
this.searchForm.value.pd_from_date = this.pipe.transform(this.searchForm.value.pd_from_date, 'yyyy-MM-dd');
|
||||
this.searchForm.value.pd_to_date = this.pipe.transform(this.searchForm.value.pd_to_date, 'yyyy-MM-dd');
|
||||
|
||||
this._pd.overAllSearchFormDetails(this.searchForm.value).subscribe(res => {
|
||||
this.xpandStatus = false;
|
||||
if (res['dataStatus'] == true) {
|
||||
this.dataSourceTab5 = res['records'];
|
||||
} else {
|
||||
console.log('else');
|
||||
// this.notifier.notify('warning', 'No Records Found');
|
||||
this.dataSourceTab5 = this.tempStore;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,64 @@
|
||||
<mat-card-content>
|
||||
<mat-expansion-panel [(expanded)]="xpandStatus">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title class="text-xs-left">
|
||||
<h6 class="mt-0"><mat-icon>filter_list</mat-icon> Filter</h6>
|
||||
</mat-panel-title>
|
||||
|
||||
</mat-expansion-panel-header>
|
||||
<mat-list class="m-gap p-gap">
|
||||
<div [formGroup]="searchForm">
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-select multiple formControlName="pd_type" placeholder="PD Type">
|
||||
<mat-option *ngFor="let type of PDType" [value]="type.pd_type_id">{{type.type_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-select multiple formControlName="pd_status" placeholder="PD Status">
|
||||
<mat-option *ngFor="let status of pdStatus" [value]="status.pd_status_name">{{status.pd_status_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<input matInput [matDatepicker]="picker" (blur)="checkDate($event)" formControlName="pd_from_date" placeholder="Choose a From date">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<input matInput [matDatepicker]="picker1" [min]="searchForm.get('pd_from_date').value"formControlName="pd_to_date" placeholder="Choose a todate">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker1></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-select multiple formControlName="pd_products" placeholder="Products">
|
||||
<mat-option *ngFor="let pro of PRODUCTS" [value]="pro.product_id">{{pro.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-select multiple formControlName="pd_city" placeholder="City">
|
||||
<mat-option *ngFor="let city of CITY" [value]="city.city_id">{{city.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-select multiple formControlName="pd_lender" placeholder="Lender Name">
|
||||
<mat-option *ngFor="let ent of ENTITY" [value]="ent.entity_id">{{ent.full_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<input matInput type="text" formControlName="pd_name" placeholder="Applicant Name">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<input matInput type="text" formControlName="pd_applicant_id" placeholder="Applicant Id">
|
||||
</mat-form-field>
|
||||
<br/>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||
matTooltip="Add More Additional Requirements" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>search</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-list>
|
||||
|
||||
</mat-expansion-panel>
|
||||
<br/>
|
||||
<mat-table [dataSource]="dataSourceTab3" matSort *ngIf="scheduledPdListData.length > 0" >
|
||||
<ng-container matColumnDef="PDType">
|
||||
<mat-cell fxFlex="15" class="cell" style="text-align: center" *matCellDef="let details;">
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import { Component,ViewChild, OnInit, ViewEncapsulation, Input, Output, EventEmitter, OnDestroy, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { PdTrigerService } from './../../../pd-service/pd-triger.service';
|
||||
import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { DatePipe } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-scheduled-pd',
|
||||
@ -9,11 +11,20 @@ import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/m
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class ScheduledPdComponent implements OnInit, OnChanges {
|
||||
xpandStatus: boolean = false;
|
||||
PRODUCTS: any;
|
||||
ENTITY: any;
|
||||
CITY: any;
|
||||
PDType: any;
|
||||
pdStatus: any;
|
||||
recordStatus: boolean;
|
||||
errorMessage:any[]=[];
|
||||
tabStatus:string="SCHEDULED";
|
||||
pipe = new DatePipe('en-US');
|
||||
searchForm:FormGroup;
|
||||
public dataLengthTab3: number;
|
||||
public dataSourceTab3 = new MatTableDataSource();
|
||||
tempStore = new MatTableDataSource();
|
||||
displayedColumns = ['PDType','Name','Lenderid','Address','Status','Action'];
|
||||
|
||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||
@ -31,12 +42,26 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
|
||||
pageSize = 10;
|
||||
pageEvent: PageEvent;
|
||||
|
||||
constructor(private _pd: PdTrigerService) {
|
||||
constructor(private _pd: PdTrigerService,public _fb:FormBuilder) {
|
||||
|
||||
this.searchForm = this._fb.group(
|
||||
{
|
||||
pd_type:[null],
|
||||
pd_status:[null],
|
||||
pd_from_date:[null],
|
||||
pd_to_date:[null],
|
||||
pd_city:[null],
|
||||
pd_products:[null],
|
||||
pd_lender:[null],
|
||||
pd_name:[null],
|
||||
pd_applicant_id:[null],
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.recordStatus=false;
|
||||
// this.loadPDDetails();
|
||||
this.getcommonDropDown();
|
||||
}
|
||||
ngAfterViewInit() {
|
||||
this.dataSourceTab3.paginator = this.paginator;
|
||||
@ -61,6 +86,7 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
|
||||
this.scheduledPdListData = data.records;
|
||||
this.dataLengthTab3 = data.records.length;
|
||||
this.dataSourceTab3.data = this.scheduledPdListData;
|
||||
this.tempStore.data = this.scheduledPdListData
|
||||
|
||||
}
|
||||
else{
|
||||
@ -81,7 +107,89 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
|
||||
if (!word) return word;
|
||||
return word[0].toUpperCase() + word.substr(1).toLowerCase();
|
||||
}
|
||||
/**
|
||||
* Common Search
|
||||
* sriram
|
||||
*/
|
||||
|
||||
getcommonDropDown()
|
||||
{
|
||||
this._pd.getAllMasterDatas('PDSTATUS').subscribe(res=>
|
||||
{
|
||||
if(res.dataStatus==true)
|
||||
{
|
||||
this.pdStatus = res.records.filter(status=>status.isactive==1 && status.pd_status_name==this.tabStatus);
|
||||
// this.searchForm.controls['pd_status'].setValue(this.pdStatus[0]);
|
||||
}
|
||||
});
|
||||
|
||||
this._pd.getAllMasterDatas('PDTYPE').subscribe(res=>
|
||||
{
|
||||
if(res.dataStatus==true)
|
||||
{
|
||||
this.PDType = res.records.filter(type=>type.isactive==1);
|
||||
}
|
||||
});
|
||||
this._pd.getAllMasterDatas('CITY').subscribe(res=>
|
||||
{
|
||||
if(res.dataStatus==true)
|
||||
{
|
||||
this.CITY = res.records.filter(city=>city.isactive==1);
|
||||
}
|
||||
});
|
||||
this._pd.getAllMasterDatas('ENTITY').subscribe(res=>
|
||||
{
|
||||
if(res.dataStatus==true)
|
||||
{
|
||||
this.ENTITY = res.records.filter(ent=>ent.isactive==1);
|
||||
}
|
||||
});
|
||||
this._pd.getAllMasterDatas('PRODUCTS').subscribe(res=>
|
||||
{
|
||||
if(res.dataStatus==true)
|
||||
{
|
||||
this.PRODUCTS = res.records.filter(pro=>pro.isactive==1);
|
||||
}
|
||||
});
|
||||
}
|
||||
checkDate(e)
|
||||
{
|
||||
console.log(e);
|
||||
}
|
||||
searchItem()
|
||||
{
|
||||
|
||||
if(this.searchForm.value.pd_type !=null)
|
||||
{
|
||||
|
||||
}else
|
||||
{
|
||||
this.searchForm.value.pd_type = [];
|
||||
}
|
||||
|
||||
if(this.searchForm.value.pd_status !=null)
|
||||
{
|
||||
|
||||
}else
|
||||
{
|
||||
this.searchForm.value.pd_status = [];
|
||||
}
|
||||
|
||||
this.searchForm.value.pd_from_date = this.pipe.transform(this.searchForm.value.pd_from_date,'yyyy-MM-dd');
|
||||
this.searchForm.value.pd_to_date = this.pipe.transform(this.searchForm.value.pd_to_date,'yyyy-MM-dd');
|
||||
|
||||
this._pd.overAllSearchFormDetails(this.searchForm.value).subscribe(res=>
|
||||
{
|
||||
this.xpandStatus = false;
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
this.dataSourceTab3 = res['records'];
|
||||
}else{
|
||||
// this.notifier.notify('warning', 'No Records Found');
|
||||
this.dataSourceTab3 = this.tempStore;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -102,19 +102,25 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<!-- <mat-form-field *ngIf="addressForm.controls['bussiness_activity'].value == 'yes'" style="width: 100%">
|
||||
<!-- <mat-form-field *ngIf="addressForm.controls['bussiness_activity'].value == 'yes'" style="width: 100%"> -->
|
||||
<!-- <mat-select placeholder="Bussiness Type" formControlName="bussiness_address_type">
|
||||
<mat-option value="{{m_addressType.address_type_id}}"
|
||||
*ngFor="let m_addressType of addressData">{{m_addressType.address_type}}
|
||||
</mat-option>
|
||||
</mat-select> -->
|
||||
<!-- --<mat-select placeholder="Type of Premises" formControlName="bussiness_address_type" multiple>
|
||||
<!-- <mat-select placeholder="Type of Premises" formControlName="bussiness_address_type" multiple>
|
||||
<mat-option *ngFor="let m_addressType of addressData" [value]="m_addressType.address_type_id" (onSelectionChange)="SelectedPremises($event)" > {{m_addressType.address_type}} </mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field> -->
|
||||
<p>Type of Premises</p>
|
||||
<div fxLayout="row wrap" class="example-section" *ngIf="addressForm.controls['bussiness_activity'].value == 'yes'">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25" *ngFor="let at of addressData;let i = index;"> <!---- [formGroupName]="i"> -->
|
||||
<mat-checkbox class="example-margin" color="primary" [value]="at.address_type_id" (change)="SelectedPremises($event)" [checked]="at.status==1 ? true:false">{{at.address_type}}</mat-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<mat-form-field *ngIf="PremisesOtherFlag == true" style="width: 40%">
|
||||
<input matInput placeholder="Specify Other Premises Type" formControlName="bussiness_address_type_others" autocomplete="off">
|
||||
<input matInput placeholder="Specify Other Premises Type" formControlName="bussiness_address_type_others" (change)="otherValueset()" autocomplete="off">
|
||||
</mat-form-field>
|
||||
<span formArrayName="additional_premises">
|
||||
<div
|
||||
|
||||
@ -54,6 +54,9 @@ export class AddressComponent implements OnInit {
|
||||
|
||||
formPremisesArray: any = [];
|
||||
formPremisesCityArray: any = [];
|
||||
additional_premises: any=[];
|
||||
bussiness_address_type: any=[];
|
||||
tempArr: any[];
|
||||
//neighbourStatusData:any=["Yes","No"];
|
||||
//applicantOwnerData:any=["Yes","No","Dont Know"];
|
||||
|
||||
@ -124,90 +127,78 @@ export class AddressComponent implements OnInit {
|
||||
this.addressForm.controls.rent_amt.setValue(data.records.rent_amt);
|
||||
this.addressForm.controls.bussiness_activity.setValue(data.records.bussiness_activity);
|
||||
|
||||
if(data.records.bussiness_activity == 'yes') {
|
||||
let selectedPremisesDBData = Object.keys(data.records.bussiness_address_type).map(function (key) {
|
||||
return data.records.bussiness_address_type[key];
|
||||
});
|
||||
// if(data.records.bussiness_activity == 'yes') {
|
||||
|
||||
// this.bussiness_address_type = [];
|
||||
|
||||
let enduse: any = [];
|
||||
let existPremises: any =[];
|
||||
// this.bussiness_address_type = (Object.keys(data.records.bussiness_address_type).map(function(key)
|
||||
// {
|
||||
// return data.records.bussiness_address_type[key].premises_types;
|
||||
// }))
|
||||
|
||||
selectedPremisesDBData.forEach(val => {
|
||||
enduse.push(val.premises_types);
|
||||
existPremises.push(val);
|
||||
});
|
||||
// // console.log(bussiness_address_type);
|
||||
|
||||
|
||||
this.formPremisesArray = existPremises;
|
||||
// let selectedPremisesDBData = Object.keys(data.records.bussiness_address_type).map(function (key) {
|
||||
// return data.records.bussiness_address_type[key];
|
||||
// });
|
||||
|
||||
this.addressForm.controls.bussiness_address_type.setValue(enduse);
|
||||
|
||||
var additionalPremisesResult = Object.keys(data.records.additional_premises).map(function (key) {
|
||||
return data.records.additional_premises[key];
|
||||
});
|
||||
// let enduse: any = [];
|
||||
// let existPremises: any =[];
|
||||
|
||||
// let cityenduse: any = [];
|
||||
// let existcity: any =[];
|
||||
// selectedPremisesDBData.forEach(val => {
|
||||
// enduse.push(val.premises_types);
|
||||
// existPremises.push(val);
|
||||
// });
|
||||
|
||||
// additionalPremisesResult.forEach(val => {
|
||||
// cityenduse.push(val.premises_types);
|
||||
// existcity.push(val);
|
||||
// });
|
||||
|
||||
// this.formPremisesCityArray = existcity;
|
||||
|
||||
additionalPremisesResult.forEach((val,index)=>
|
||||
{
|
||||
console.log(val);
|
||||
let cityenduse: any = [];
|
||||
let existcity: any =[];
|
||||
|
||||
if(val.premises_city != ''){
|
||||
this.formPremisesCityArray = [];
|
||||
val.premises_city.forEach(option => {
|
||||
// cityenduse.push(option);
|
||||
// existcity.push(val);
|
||||
//this.formPremisesCityArray.push({additional_premises_city: option});
|
||||
//this.addressForm.controls.additional_premises.value[index].premises_city = cityenduse;
|
||||
console.log(option);
|
||||
});
|
||||
//console.log(cityenduse);
|
||||
//this.formPremisesCityArray = existcity;
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
if (additionalPremisesResult.length == 0) {
|
||||
additionalPremisesControl.push(this.createPremises());
|
||||
} else {
|
||||
let cityenduse: any = [];
|
||||
let existcity: any =[];
|
||||
|
||||
additionalPremisesResult.forEach(datas => {
|
||||
if(datas.premises_city != ''){
|
||||
cityenduse.push(datas.additional_premises_city);
|
||||
existcity.push(datas);
|
||||
}
|
||||
additionalPremisesControl.push(this.createPremises());
|
||||
});
|
||||
|
||||
this.formPremisesCityArray = existcity;
|
||||
console.log(cityenduse);
|
||||
console.log(existcity);
|
||||
|
||||
this.addressForm.controls['additional_premises'].setValue(additionalPremisesResult);
|
||||
// this.formPremisesArray = existPremises;
|
||||
|
||||
}
|
||||
|
||||
// this.addressForm.controls.bussiness_address_type.setValue(enduse);
|
||||
|
||||
// var additionalPremisesResult = Object.keys(data.records.additional_premises).map(function (key) {
|
||||
// return data.records.additional_premises[key];
|
||||
// });
|
||||
|
||||
// this.additional_premises = additionalPremisesResult;
|
||||
|
||||
// if (additionalPremisesResult.length == 0) {
|
||||
// additionalPremisesControl.push(this.createPremises());
|
||||
// } else {
|
||||
// additionalPremisesResult.forEach(datas => {
|
||||
// additionalPremisesControl.push(this.createPremises());
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
if(data.records.bussiness_address_type == 12) {
|
||||
this.addressForm.controls.bussiness_address_type_others.setValue(data.records.bussiness_address_type_others);
|
||||
}
|
||||
// if(data.records.bussiness_address_type == 12) {
|
||||
// this.addressForm.controls.bussiness_address_type_others.setValue(data.records.bussiness_address_type_others);
|
||||
// }
|
||||
// }
|
||||
|
||||
if(data.records.bussiness_activity == 'yes' && data.records.bussiness_address_type !=null) {
|
||||
let that = this;
|
||||
this.bussiness_address_type = [];
|
||||
|
||||
this.bussiness_address_type = (Object.keys(data.records.bussiness_address_type).map(function(key)
|
||||
{
|
||||
return data.records.bussiness_address_type[key].premises_types;
|
||||
}))
|
||||
|
||||
this.additional_premises = Object.keys(data.records.additional_premises).map(function(key)
|
||||
{
|
||||
return data.records.additional_premises[key];
|
||||
})
|
||||
|
||||
}
|
||||
console.log(this.bussiness_address_type);
|
||||
console.log(this.additional_premises);
|
||||
|
||||
this.selectedValue(this.bussiness_address_type,this.additional_premises);
|
||||
if (data.records.locality_others) {
|
||||
this.addressForm.controls.locality_others.setValue(data.records.locality_others);
|
||||
}
|
||||
|
||||
// if (result.length == 0) {
|
||||
// control.push(this.createNeighbour());
|
||||
// } else {
|
||||
@ -221,6 +212,7 @@ export class AddressComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public initAddressForm(): void {
|
||||
this.addressForm = this.fb.group({
|
||||
address: ['', Validators.compose([Validators.required])],
|
||||
@ -376,8 +368,12 @@ export class AddressComponent implements OnInit {
|
||||
// console.log(val);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
else{
|
||||
this.formPremisesCityArray = [];
|
||||
|
||||
this.addressForm.controls.additional_premises.value[index].premises_city = null;
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
records.additional_premises = this.addressForm.controls.additional_premises.value;
|
||||
@ -402,59 +398,194 @@ export class AddressComponent implements OnInit {
|
||||
// this.formPremisesCityArray.push({city: option});
|
||||
// });
|
||||
// }
|
||||
|
||||
SelectedPremises($event){
|
||||
console.log('event',$event);
|
||||
|
||||
let premisesData = $event.source.value;
|
||||
|
||||
|
||||
if($event.source._selected === true ){
|
||||
|
||||
console.log(premisesData);
|
||||
|
||||
if($event.checked === true ){
|
||||
|
||||
//this.formPremisesArray.push({member: $event.source.value});
|
||||
//this.selectedSegmentDatas.push(CustomerSegmentName.name);
|
||||
//console.log('true',premisesData);
|
||||
|
||||
|
||||
//console.log(this.formPremisesArray);
|
||||
|
||||
|
||||
this.formPremisesArray.push({premises_types: $event.source.value});
|
||||
|
||||
//console.log(this.formPremisesArray);
|
||||
|
||||
let array = this.addressData.filter(data => data.address_type_id == premisesData);
|
||||
|
||||
|
||||
console.log(this.formPremisesArray);
|
||||
const control = <FormArray>this.addressForm.controls['additional_premises'];
|
||||
let array = this.addressData.filter(data => data.address_type_id == premisesData)[0];
|
||||
console.log(array);
|
||||
if(premisesData == 12){
|
||||
this.PremisesOtherFlag = true;
|
||||
this.PremisesLabel[this.z] = this.addressForm.get('bussiness_address_type_others').value;
|
||||
// this.PremisesLabel[this.z] = this.pdQuestionAddress.get('bussiness_address_type_others').value;
|
||||
control.push(this.createPremises());
|
||||
|
||||
}
|
||||
else{
|
||||
this.PremisesLabel[this.z] = array[0].address_type;
|
||||
}
|
||||
this.z++;
|
||||
|
||||
|
||||
const control = <FormArray>this.addressForm.controls['additional_premises'];
|
||||
this.PremisesLabel[this.z] = array.address_type;
|
||||
control.push(this.createPremises());
|
||||
|
||||
|
||||
|
||||
}
|
||||
console.log(this.PremisesLabel);
|
||||
this.z++;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
else if($event.source._selected === false ){
|
||||
|
||||
console.log('false',premisesData);
|
||||
|
||||
else if($event.checked === false ){
|
||||
|
||||
if(premisesData == 12){
|
||||
this.PremisesOtherFlag = false;
|
||||
}
|
||||
|
||||
console.log(this.formPremisesArray);
|
||||
let index = this.formPremisesArray.findIndex(form=>form.premises_types== $event.source.value);
|
||||
console.log(index);
|
||||
const control = <FormArray>this.addressForm.controls['additional_premises'];
|
||||
control.removeAt(this.z);
|
||||
control.removeAt(index);
|
||||
this.PremisesLabel.splice(index,1);
|
||||
console.log(this.z);
|
||||
this.z--;
|
||||
//let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName.name);
|
||||
//this.selectedSegmentDatas.splice(index,1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
getCity(e)
|
||||
{
|
||||
this.cityData = [];
|
||||
e.forEach(val=>
|
||||
{
|
||||
this.cityData.push({additional_premises_city:val});
|
||||
});
|
||||
console.log(this.cityData);
|
||||
}
|
||||
otherValueset()
|
||||
{
|
||||
let z = this.z;
|
||||
this.PremisesLabel[z-1] = this.addressForm.get('bussiness_address_type_others').value;
|
||||
}
|
||||
// checkaddress(value)
|
||||
// {
|
||||
// // console.log(value);
|
||||
// if(value=="OTHERS")
|
||||
// {
|
||||
// this.addressRemarksAccess = true;
|
||||
// }else
|
||||
// {
|
||||
// this.addressRemarksAccess = false;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// SelectedPremises($event){
|
||||
// console.log('event',$event);
|
||||
|
||||
// let premisesData = $event.source.value;
|
||||
|
||||
|
||||
// if($event.source._selected === true ){
|
||||
|
||||
// //this.formPremisesArray.push({member: $event.source.value});
|
||||
// //this.selectedSegmentDatas.push(CustomerSegmentName.name);
|
||||
// //console.log('true',premisesData);
|
||||
|
||||
// //console.log(this.formPremisesArray);
|
||||
|
||||
// this.formPremisesArray.push({premises_types: $event.source.value});
|
||||
|
||||
// //console.log(this.formPremisesArray);
|
||||
|
||||
// let array = this.addressData.filter(data => data.address_type_id == premisesData);
|
||||
|
||||
// if(premisesData == 12){
|
||||
// this.PremisesOtherFlag = true;
|
||||
// this.PremisesLabel[this.z] = this.addressForm.get('bussiness_address_type_others').value;
|
||||
// }
|
||||
// else{
|
||||
// this.PremisesLabel[this.z] = array[0].address_type;
|
||||
// }
|
||||
// this.z++;
|
||||
|
||||
|
||||
// const control = <FormArray>this.addressForm.controls['additional_premises'];
|
||||
// control.push(this.createPremises());
|
||||
|
||||
|
||||
|
||||
// }
|
||||
// else if($event.source._selected === false ){
|
||||
|
||||
// console.log('false',premisesData);
|
||||
|
||||
|
||||
// if(premisesData == 12){
|
||||
// this.PremisesOtherFlag = false;
|
||||
// }
|
||||
|
||||
// const control = <FormArray>this.addressForm.controls['additional_premises'];
|
||||
// control.removeAt(this.z);
|
||||
// this.z--;
|
||||
// //let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName.name);
|
||||
// //this.selectedSegmentDatas.splice(index,1);
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
selectedValue(e,data)
|
||||
{
|
||||
console.log('501 function',);
|
||||
console.log('inside function in bussiness_address_type,',e);
|
||||
console.log('inside function in this.additional_premises,',data);
|
||||
|
||||
let premisesData = e ;
|
||||
this.tempArr = [];
|
||||
let that = this;
|
||||
this.addressData = Object.keys(this.addressData).map(function(key)
|
||||
{
|
||||
that.addressData[key].status = 0;
|
||||
return that.addressData[key];
|
||||
})
|
||||
console.log(this.addressData);
|
||||
premisesData.forEach((val,index)=>
|
||||
{
|
||||
console.log(val);
|
||||
this.z++;
|
||||
// console.log(this.addressTypes);
|
||||
this.formPremisesArray.push({premises_types: val});
|
||||
|
||||
this.tempArr.push(this.addressData.filter(add=>add.address_type_id==val)[0]);
|
||||
|
||||
this.PremisesLabel[index] = this.tempArr[index].address_type;
|
||||
|
||||
if(data[index] !==undefined && data[index].premises_ownership < 2 ){
|
||||
data[index].premises_city = Object.keys(data[index].premises_city).map(function(key)
|
||||
{
|
||||
return data[index].premises_city[key].additional_premises_city;
|
||||
});
|
||||
}
|
||||
this.addressData.forEach(data=>
|
||||
{
|
||||
if(data.address_type_id == val)
|
||||
{
|
||||
data.status = 1;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
const control = <FormArray>this.addressForm.controls['additional_premises'] as FormArray;
|
||||
|
||||
// control.removeAt(0);
|
||||
this.tempArr.forEach((item,index)=>
|
||||
{
|
||||
control.push(this.createPremises());
|
||||
});
|
||||
|
||||
this.addressForm.controls['additional_premises'].setValue(data);
|
||||
}
|
||||
|
||||
validateAllFormFields(formGroup: FormGroup) {
|
||||
|
||||
@ -280,6 +280,7 @@
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer>
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
@ -369,7 +370,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
|
||||
|
||||
@ -14,7 +14,307 @@
|
||||
|
||||
|
||||
<mat-tab-group>
|
||||
<mat-tab label="Other Asset Questions">
|
||||
<mat-tab label="Business Asset Questions">
|
||||
<ng-template matTabContent>
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="100">
|
||||
<mat-card style="min-height: 550px;">
|
||||
<mat-card-content>
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
<div formArrayName="business_assets_details" fxFill>
|
||||
<div *ngFor="let sup of _assetsQuesFrom.controls.business_assets_details['controls']; let i=index">
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<div [formGroupName]="i">
|
||||
<div fxLayout="row wrap" fxLayoutGap="5px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width:100%">
|
||||
<mat-select (selectionChange)="selectedAssetsType($event, i,2)" placeholder="Assets Type" formControlName="business_assets_mode" requried>
|
||||
<mat-option *ngFor="let asset of m_assets_type" [value]="asset.id">{{ asset.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!--Desction Dynamic details: START-->
|
||||
<div formArrayName="business_details" class="example-full-width">
|
||||
<!--Property-->
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 1 ">
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div *ngFor="let detail of sup['controls'].business_details['controls']; let s = index">
|
||||
<div [formGroupName]="s">
|
||||
<div>
|
||||
<mat-form-field style="width:100%">
|
||||
<mat-select placeholder="Property Type" formControlName="property_type" required>
|
||||
<mat-option *ngFor="let prop of m_propertyType" [value]="prop.id">{{ prop.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div>
|
||||
<mat-form-field *ngIf="detail.get('property_type').value == 5">
|
||||
<input matInput placeholder="Other Property Type" formControlName="other_property_type" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--Four Wheeler-->
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 2">
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div *ngFor="let detail of sup['controls'].business_details['controls']; let s = index">
|
||||
<div [formGroupName]="s">
|
||||
<div>
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model_four_weeler" required autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--Two Wheeler-->
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 3">
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div *ngFor="let detail of sup['controls'].business_details['controls']; let s = index">
|
||||
<div [formGroupName]="s">
|
||||
<div>
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model_two_weeler" required autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--Consumer Durable-->
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 5">
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div *ngFor="let detail of sup['controls'].business_details['controls']; let s = index">
|
||||
<div [formGroupName]="s">
|
||||
<div>
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Description" formControlName="consumer_durable_description" required>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--Insurance-->
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 6">
|
||||
<div fxFill>
|
||||
<div *ngFor="let detail of sup['controls'].business_details['controls']; let s = index">
|
||||
<div [formGroupName]="s">
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Premium Paid" formControlName="premium_paid" required (keypress)="keyPress($event)" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="33">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Frequency" formControlName="frequency_mode" required>
|
||||
<mat-option *ngFor="let freqn of m_freqOfPurchase" [value]="freqn.frequency_id">{{ freqn.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Sum Assured" formControlName="sum_assured" required (keypress)="keyPress($event)" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Members Covered" formControlName="members_coverd" required autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--Investments-->
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 7">
|
||||
<div>
|
||||
<div *ngFor="let detail of sup['controls'].business_details['controls']; let s = index">
|
||||
<div [formGroupName]="s">
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxFlex="33">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Type" formControlName="investments_type" required>
|
||||
<mat-option *ngFor="let ins_type of m_investmentType" [value]="ins_type.id">{{ ins_type.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- <div fxFlex="33" *ngIf="detail.get('investments_type').value == 6 "> -->
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Specify Other Type" formControlName="other_investments_type" autocomplete="off">
|
||||
</mat-form-field>
|
||||
<!-- </div> -->
|
||||
<div fxFlex="33" >
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Amount of Investment" formControlName="amount_of_invest" required (keypress)="keyPress($event)" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Bank Name" formControlName="bank_name" required autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--other assets-->
|
||||
<!-- <div *ngIf="sup.get('assets_mode').value == 8"> -->
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 8">
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div *ngFor="let detail of sup['controls'].business_details['controls']; let s = index">
|
||||
<div [formGroupName]="s">
|
||||
<div>
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Description of the Assets" formControlName="any_other_assets" required autocomplete="off">
|
||||
</mat-form-field>
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Value of the Assets" formControlName="any_other_asset_value" required autocomplete="off">
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field class="ml-xs example-full-width"> -->
|
||||
<!-- <input matInput placeholder="Is Any Loan" formControlName="any_other_asset_loan" required> -->
|
||||
<!-- </mat-form-field> -->
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<mat-select placeholder="Is there any asset loan?" formControlName="any_other_asset_loan" required>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
<mat-option value="nan">NAN</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field class="ml-xs example-full-width" *ngIf="detail.get(any_other_asset_loan).value == 'yes'"> -->
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="What is the EMI amount ?" formControlName="other_asset_emi_amt" autocomplete="off">
|
||||
<!-- <span matSuffix>.00</span> -->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--Desction Dynamic details : END -->
|
||||
<!-- {{sup.get('business_assets_mode').value}} -->
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 1 || sup.get('business_assets_mode').value == 4">
|
||||
<div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Approximate Market Value" formControlName="business_approximate_market_value" (keypress)="keyPress($event)" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 1 || sup.get('business_assets_mode').value == 2 || sup.get('business_assets_mode').value == 3 || sup.get('business_assets_mode').value == 4 || sup.get('business_assets_mode').value == 5">
|
||||
|
||||
<div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Name of the Owner" formControlName="business_name_of_the_owner" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<!-- <div fxFlex="33">
|
||||
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<mat-select placeholder="Name of the Owner"
|
||||
formControlName="business_name_of_the_owner" required>
|
||||
|
||||
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name}}</mat-option>
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width" *ngIf="sup.get('business_name_of_the_owner').value == 0">
|
||||
<input matInput placeholder="Specify Other Owner Name"
|
||||
formControlName="other_owner" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<mat-select placeholder="Relation" formControlName="relation" required>
|
||||
<mat-option value="{{relations.relationship_id}}"
|
||||
*ngFor="let relations of m_relation">
|
||||
{{relations.name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div> -->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 1 || sup.get('business_assets_mode').value == 2 || sup.get('business_assets_mode').value == 3 || sup.get('business_assets_mode').value == 4 || sup.get('business_assets_mode').value == 5">
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width" style="width:95%">
|
||||
<mat-select placeholder="Is there a loan existing against this asset?" formControlName="business_emi">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="sup.get('business_emi').value === 'yes'" fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width" style="width:95%">
|
||||
<input matInput placeholder="Amount of EMI on This Loan?" formControlName="business_emi_paid" (keypress)="keyPress($event)" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="sup.get('business_emi').value === 'yes'" fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width" style="width:95%">
|
||||
<input matInput placeholder="Original Loan Tenure in Months" formControlName="business_original_loan_tenure" autocomplete="off" (change)="loanCalc(sup,2)">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="sup.get('business_emi').value === 'yes'" fxFlex="33" style="width:95%">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Balance Tenure in Months" formControlName="business_balance_tenure" autocomplete="off" (change)="loanCalc(sup,2)">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="sup.get('business_emi').value === 'yes' && sup.get('business_original_loan_tenure').value != '' && sup.get('business_balance_tenure').value != '' " fxFlex="33" style="width:95%">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Elapsed Tenure in Months" formControlName="business_elapsed_tenure" autocomplete="off">
|
||||
</mat-form-field>
|
||||
<!-- <p>Elapsed tenure is {{elapsed_tenure}}</p> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div fxLayout="row" fxLayoutGap="12px" fxLayoutAlign="start none">
|
||||
<div fxFlex="20">
|
||||
<span *ngIf="_assetsQuesFrom.controls.business_assets_details.controls.length > 1" (click)="removeLanguage(i,2)">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="text-align:right;">
|
||||
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Business Asset Details" matTooltipPosition="above"
|
||||
class="mr-1 mb-1 hover-icon" (click)="addSupplierDetails($event,2); false"><mat-icon>add</mat-icon></button>
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
|
||||
|
||||
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<mat-tab label="Other Asset Questions">
|
||||
<ng-template matTabContent>
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="100">
|
||||
@ -233,11 +533,37 @@
|
||||
</div>
|
||||
<div *ngIf="sup.get('assets_mode').value == 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 4 || sup.get('assets_mode').value == 5">
|
||||
|
||||
<div fxFlex="33">
|
||||
<!-- <div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Name of the Owner" formControlName="name_of_the_owner" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div> -->
|
||||
<div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<mat-select placeholder="Name of the Owner"
|
||||
formControlName="name_of_the_owner" required>
|
||||
|
||||
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name}}</mat-option>
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width" *ngIf="sup.get('name_of_the_owner').value == 0 && sup.get('name_of_the_owner').value != ''">
|
||||
<input matInput placeholder="Specify Other Owner Name"
|
||||
formControlName="other_owner" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<mat-select placeholder="Relation" formControlName="relation" required>
|
||||
<mat-option value="{{relations.relationship_id}}"
|
||||
*ngFor="let relations of m_relation">
|
||||
{{relations.name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!---- <div *ngIf="sup.get('assets_mode').value == 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 5">
|
||||
@ -268,12 +594,12 @@
|
||||
</div>
|
||||
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width" style="width:95%">
|
||||
<input matInput placeholder="Original Loan Tenure in Months" formControlName="original_loan_tenure" (change)="loanCalc(sup)" autocomplete="off">
|
||||
<input matInput placeholder="Original Loan Tenure in Months" formControlName="original_loan_tenure" (change)="loanCalc(sup,1)" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33" style="width:95%">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Balance Tenure in Months" formControlName="balance_tenure" (change)="loanCalc(sup)" autocomplete="off">
|
||||
<input matInput placeholder="Balance Tenure in Months" formControlName="balance_tenure" (change)="loanCalc(sup,1)" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="sup.get('emi').value === 'yes' && sup.get('original_loan_tenure').value != '' && sup.get('balance_tenure').value != '' " fxFlex="33" style="width:95%">
|
||||
@ -311,482 +637,104 @@
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=1" alt="Image 1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=2" alt="Image 2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
|
||||
<div class="p-list">
|
||||
<div class="top"><img src="https://picsum.photos/2000/1500/?random=3" alt="Image 3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=2" alt="Image 2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
|
||||
<div class="p-list">
|
||||
<div class="top"><img src="https://picsum.photos/2000/1500/?random=3" alt="Image 3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=1" alt="Image 1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<mat-tab label="Bussiness Asset Questions">
|
||||
<ng-template matTabContent>
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="100">
|
||||
<mat-card style="min-height: 550px;">
|
||||
<mat-card-content>
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
<div formArrayName="business_assets_details" fxFill>
|
||||
<div *ngFor="let sup of _assetsQuesFrom.controls.business_assets_details['controls']; let i=index">
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<div [formGroupName]="i">
|
||||
<div fxLayout="row wrap" fxLayoutGap="5px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width:100%">
|
||||
<mat-select (selectionChange)="selectedAssetsType($event, i,2)" placeholder="Assets Type" formControlName="business_assets_mode" requried>
|
||||
<mat-option *ngFor="let asset of m_assets_type" [value]="asset.id">{{ asset.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!--Desction Dynamic details: START-->
|
||||
<div formArrayName="business_details" class="example-full-width">
|
||||
<!--Property-->
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 1 ">
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div *ngFor="let detail of sup['controls'].business_details['controls']; let s = index">
|
||||
<div [formGroupName]="s">
|
||||
<div>
|
||||
<mat-form-field style="width:100%">
|
||||
<mat-select placeholder="Property Type" formControlName="property_type" required>
|
||||
<mat-option *ngFor="let prop of m_propertyType" [value]="prop.id">{{ prop.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div>
|
||||
<mat-form-field *ngIf="detail.get('property_type').value == 5">
|
||||
<input matInput placeholder="Other Property Type" formControlName="other_property_type" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--Four Wheeler-->
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 2">
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div *ngFor="let detail of sup['controls'].business_details['controls']; let s = index">
|
||||
<div [formGroupName]="s">
|
||||
<div>
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model_four_weeler" required autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--Two Wheeler-->
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 3">
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div *ngFor="let detail of sup['controls'].business_details['controls']; let s = index">
|
||||
<div [formGroupName]="s">
|
||||
<div>
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model_two_weeler" required autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--Consumer Durable-->
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 5">
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div *ngFor="let detail of sup['controls'].business_details['controls']; let s = index">
|
||||
<div [formGroupName]="s">
|
||||
<div>
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Description" formControlName="consumer_durable_description" required>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--Insurance-->
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 6">
|
||||
<div fxFill>
|
||||
<div *ngFor="let detail of sup['controls'].business_details['controls']; let s = index">
|
||||
<div [formGroupName]="s">
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Premium Paid" formControlName="premium_paid" required (keypress)="keyPress($event)" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="33">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Frequency" formControlName="frequency_mode" required>
|
||||
<mat-option *ngFor="let freqn of m_freqOfPurchase" [value]="freqn.frequency_id">{{ freqn.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Sum Assured" formControlName="sum_assured" required (keypress)="keyPress($event)" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Members Covered" formControlName="members_coverd" required autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--Investments-->
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 7">
|
||||
<div>
|
||||
<div *ngFor="let detail of sup['controls'].business_details['controls']; let s = index">
|
||||
<div [formGroupName]="s">
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxFlex="33">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Type" formControlName="investments_type" required>
|
||||
<mat-option *ngFor="let ins_type of m_investmentType" [value]="ins_type.id">{{ ins_type.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- <div fxFlex="33" *ngIf="detail.get('investments_type').value == 6 "> -->
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Specify Other Type" formControlName="other_investments_type" autocomplete="off">
|
||||
</mat-form-field>
|
||||
<!-- </div> -->
|
||||
<div fxFlex="33" >
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Amount of Investment" formControlName="amount_of_invest" required (keypress)="keyPress($event)" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Bank Name" formControlName="bank_name" required autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--other assets-->
|
||||
<!-- <div *ngIf="sup.get('assets_mode').value == 8"> -->
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 8">
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div *ngFor="let detail of sup['controls'].business_details['controls']; let s = index">
|
||||
<div [formGroupName]="s">
|
||||
<div>
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Description of the Assets" formControlName="any_other_assets" required autocomplete="off">
|
||||
</mat-form-field>
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Value of the Assets" formControlName="any_other_asset_value" required autocomplete="off">
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field class="ml-xs example-full-width"> -->
|
||||
<!-- <input matInput placeholder="Is Any Loan" formControlName="any_other_asset_loan" required> -->
|
||||
<!-- </mat-form-field> -->
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<mat-select placeholder="Is there any asset loan?" formControlName="any_other_asset_loan" required>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
<mat-option value="nan">NAN</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field class="ml-xs example-full-width" *ngIf="detail.get(any_other_asset_loan).value == 'yes'"> -->
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="What is the EMI amount ?" formControlName="other_asset_emi_amt" autocomplete="off">
|
||||
<!-- <span matSuffix>.00</span> -->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--Desction Dynamic details : END -->
|
||||
<!-- {{sup.get('business_assets_mode').value}} -->
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 1 || sup.get('business_assets_mode').value == 4">
|
||||
<div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Approximate Market Value" formControlName="business_approximate_market_value" (keypress)="keyPress($event)" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer>
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=1" alt="Image 1"></div>
|
||||
</div>
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 1 || sup.get('business_assets_mode').value == 2 || sup.get('business_assets_mode').value == 3 || sup.get('business_assets_mode').value == 4 || sup.get('business_assets_mode').value == 5">
|
||||
|
||||
<div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Name of the Owner" formControlName="business_name_of_the_owner" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 1 || sup.get('business_assets_mode').value == 2 || sup.get('business_assets_mode').value == 3 || sup.get('business_assets_mode').value == 4 || sup.get('business_assets_mode').value == 5">
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width" style="width:95%">
|
||||
<mat-select placeholder="Is there a loan existing against this asset?" formControlName="business_emi">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="sup.get('business_emi').value === 'yes'" fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width" style="width:95%">
|
||||
<input matInput placeholder="Amount of EMI on This Loan?" formControlName="business_emi_paid" (keypress)="keyPress($event)" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="sup.get('business_emi').value === 'yes'" fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width" style="width:95%">
|
||||
<input matInput placeholder="Original Loan Tenure in Months" formControlName="business_original_loan_tenure" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="sup.get('business_emi').value === 'yes'" fxFlex="33" style="width:95%">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Balance Tenure in Months" formControlName="business_balance_tenure" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- <div *ngIf="sup.get('emi').value === 'yes' && sup.get('original_loan_tenure').value != '' && sup.get('balance_tenure').value != '' " fxFlex="33" style="width:95%">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Elapsed Tenure in Months" formControlName="elapsed_tenure" autocomplete="off">
|
||||
</mat-form-field> -->
|
||||
<!-- <p>Elapsed tenure is {{elapsed_tenure}}</p> -->
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div fxLayout="row" fxLayoutGap="12px" fxLayoutAlign="start none">
|
||||
<div fxFlex="20">
|
||||
<span *ngIf="_assetsQuesFrom.controls.business_assets_details.controls.length > 1" (click)="removeLanguage(i,2)">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=2" alt="Image 2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
|
||||
<div class="p-list">
|
||||
<div class="top"><img src="https://picsum.photos/2000/1500/?random=3" alt="Image 3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=2" alt="Image 2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
|
||||
<div class="p-list">
|
||||
<div class="top"><img src="https://picsum.photos/2000/1500/?random=3" alt="Image 3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=1" alt="Image 1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="text-align:right;">
|
||||
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Business Asset Details" matTooltipPosition="above"
|
||||
class="mr-1 mb-1 hover-icon" (click)="addSupplierDetails($event,2); false"><mat-icon>add</mat-icon></button>
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
|
||||
|
||||
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="25" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
|
||||
<div class="top"><img src="./../../../../../../../assets/images/face2.jpg" alt=""/></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<small>Nivi SKM</small>
|
||||
<!-- <p>{{docs.pd_document_name}}</p> -->
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="25" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
|
||||
<div class="top"><img src="./../../../../../../../assets/images/face1.jpg" alt=""/></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<small>Nivi SKM</small>
|
||||
<!-- <p>{{docs.pd_document_name}}</p> -->
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="25" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
|
||||
<div class="top"><img src="./../../../../../../../assets/images/face1.jpg" alt=""/></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<small>Nivi SKM</small>
|
||||
<!-- <p>{{docs.pd_document_name}}</p> -->
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="25" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
|
||||
<div class="top"><img src="./../../../../../../../assets/images/face1.jpg" alt=""/></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<small>Nivi SKM</small>
|
||||
<!-- <p>{{docs.pd_document_name}}</p> -->
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="25" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
|
||||
<div class="top"><img src="./../../../../../../../assets/images/face1.jpg" alt=""/></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<small>Nivi SKM</small>
|
||||
<!-- <p>{{docs.pd_document_name}}</p> -->
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="25" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
|
||||
<div class="top"><img src="./../../../../../../../assets/images/face1.jpg" alt=""/></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<small>Nivi SKM</small>
|
||||
<!-- <p>{{docs.pd_document_name}}</p> -->
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions>
|
||||
|
||||
|
||||
@ -35,7 +35,9 @@ export class AssetsInfoComponent implements OnInit {
|
||||
public _assetsQuesFrom: FormGroup;
|
||||
public submitted = false;
|
||||
public m_assets_type = [];
|
||||
|
||||
public m_relation = [];
|
||||
public applicants: any;
|
||||
|
||||
// public m_assets_type = [
|
||||
// {
|
||||
// 'id': "1",
|
||||
@ -168,6 +170,8 @@ public m_investmentType = [];
|
||||
private pdTrigerService: PdTrigerService,
|
||||
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
|
||||
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.applicants = this.pd_all_details.pdapplicants_detials;
|
||||
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
|
||||
this.notifier = notifier;
|
||||
}
|
||||
|
||||
@ -199,6 +203,7 @@ public m_investmentType = [];
|
||||
this.getM_PropertyType();
|
||||
this.getM_InvestmentType();
|
||||
this.getM_FreqOfPurchase();
|
||||
this.getM_Relation();
|
||||
//this.getM_InsuranceType();
|
||||
}
|
||||
|
||||
@ -240,7 +245,18 @@ public m_investmentType = [];
|
||||
)
|
||||
}
|
||||
|
||||
getM_FreqOfPurchase() {
|
||||
getM_Relation() {
|
||||
this.pdTrigerService.getAllMasterDatas('RELATIONSHIPS').subscribe(
|
||||
data => {
|
||||
this.m_relation = data.records.filter(data => data.isactive == 1);
|
||||
},
|
||||
error => {
|
||||
this.notifier.notify('warning', 'No Category Records Found.!');
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
getM_FreqOfPurchase() {
|
||||
this.pdTrigerService.getAllMasterDatas('FREQUENCY').subscribe(
|
||||
data => {
|
||||
this.m_freqOfPurchase = data.records.filter(data => data.isactive == 1);
|
||||
@ -297,7 +313,7 @@ public m_investmentType = [];
|
||||
assets_form_remark:[value.assets_form_remark || 'check']
|
||||
});
|
||||
this.addAssetsDetailsWithData(value.assets_details);
|
||||
this.addAssetsDetailsWithData2(value.business_assets_details);
|
||||
this.addBusinessAssetsDetailsWithData(value.business_assets_details);
|
||||
} else {
|
||||
this._assetsQuesFrom = this._formBuilder.group({
|
||||
pdid: [this.pdid],
|
||||
@ -306,7 +322,7 @@ public m_investmentType = [];
|
||||
this.initDetails(),
|
||||
]),
|
||||
business_assets_details : this._formBuilder.array([
|
||||
this.initnewDetails(),
|
||||
this.initBusinessDetails(),
|
||||
]),
|
||||
assets_form_remark:['']
|
||||
});
|
||||
@ -328,6 +344,8 @@ public m_investmentType = [];
|
||||
details: this._formBuilder.array([]),
|
||||
approximate_market_value: ['', Validators.compose([])],
|
||||
name_of_the_owner: ['', Validators.compose([])],
|
||||
other_owner:[''],
|
||||
relation: [''],
|
||||
// purchase_year: ['', Validators.compose([])],
|
||||
//purchase_month: ['', Validators.compose([])],
|
||||
emi: [''],
|
||||
@ -338,12 +356,14 @@ public m_investmentType = [];
|
||||
});
|
||||
}
|
||||
|
||||
initnewDetails() {
|
||||
initBusinessDetails() {
|
||||
return this._formBuilder.group({
|
||||
business_assets_mode: ['', Validators.compose([Validators.required])],
|
||||
business_details: this._formBuilder.array([]),
|
||||
business_approximate_market_value: ['', Validators.compose([])],
|
||||
business_name_of_the_owner: ['', Validators.compose([])],
|
||||
// other_owner:[''],
|
||||
// relation:[''],
|
||||
// purchase_year: ['', Validators.compose([])],
|
||||
//purchase_month: ['', Validators.compose([])],
|
||||
business_emi: [''],
|
||||
@ -562,6 +582,8 @@ public m_investmentType = [];
|
||||
details: this._formBuilder.array([]),
|
||||
approximate_market_value: [data.approximate_market_value, Validators.compose([])],
|
||||
name_of_the_owner: [data.name_of_the_owner, Validators.compose([])],
|
||||
other_owner:[data.other_owner || ''],
|
||||
relation: [data.relation || ''],
|
||||
// purchase_year: [data.purchase_year, Validators.compose([])],
|
||||
// purchase_month: [data.purchase_month, Validators.compose([])],
|
||||
emi: [data.emi || 0],
|
||||
@ -571,12 +593,14 @@ public m_investmentType = [];
|
||||
elapsed_tenure: [data.elapsed_tenure || '']
|
||||
});
|
||||
}
|
||||
initnewDetailsWithdata(data) {
|
||||
initBusinessDetailsWithdata(data) {
|
||||
return this._formBuilder.group({
|
||||
business_assets_mode: [data.business_assets_mode, Validators.compose([Validators.required])],
|
||||
business_details: this._formBuilder.array([]),
|
||||
business_approximate_market_value: [data.business_approximate_market_value, Validators.compose([])],
|
||||
business_name_of_the_owner: [data.business_name_of_the_owner, Validators.compose([])],
|
||||
// other_owner:[data.other_owner || ''],
|
||||
// relation: [data.relation || ''],
|
||||
// purchase_year: [data.purchase_year, Validators.compose([])],
|
||||
// purchase_month: [data.purchase_month, Validators.compose([])],
|
||||
business_emi: [data.business_emi || 0],
|
||||
@ -598,6 +622,8 @@ public m_investmentType = [];
|
||||
assets_mode: val.assets_mode,
|
||||
approximate_market_value: val.approximate_market_value,
|
||||
name_of_the_owner: val.name_of_the_owner,
|
||||
other_owner:val.other_owner,
|
||||
relation: val.relation,
|
||||
// purchase_year: val.purchase_year,
|
||||
// purchase_month: val.purchase_month,
|
||||
emi: val.emi,
|
||||
@ -614,7 +640,7 @@ public m_investmentType = [];
|
||||
this.loadDetails = true;
|
||||
}
|
||||
|
||||
addAssetsDetailsWithData2(supp_data) {
|
||||
addBusinessAssetsDetailsWithData(supp_data) {
|
||||
|
||||
console.log(supp_data);
|
||||
|
||||
@ -627,6 +653,8 @@ public m_investmentType = [];
|
||||
business_assets_mode: val.business_assets_mode,
|
||||
business_approximate_market_value: val.business_approximate_market_value,
|
||||
business_name_of_the_owner: val.business_name_of_the_owner,
|
||||
// other_owner: val.other_owner,
|
||||
// relation : val.relation,
|
||||
// purchase_year: val.purchase_year,
|
||||
// purchase_month: val.purchase_month,
|
||||
business_emi: val.business_emi,
|
||||
@ -640,7 +668,7 @@ public m_investmentType = [];
|
||||
// this.setAssetsDetailsWithData(vals.business_assets_mode, val.details, control.length - 1)
|
||||
|
||||
const control = <FormArray>this._assetsQuesFrom.controls['business_assets_details'];
|
||||
control.push(this.initnewDetailsWithdata(vals));
|
||||
control.push(this.initBusinessDetailsWithdata(vals));
|
||||
this.setAssetsDetailsWithData2(vals.business_assets_mode, val.business_details, control.length - 1)
|
||||
}
|
||||
}
|
||||
@ -763,7 +791,7 @@ public m_investmentType = [];
|
||||
control.push(this.initDetails());
|
||||
}else if(flag == 2){
|
||||
const control = <FormArray>this._assetsQuesFrom.controls['business_assets_details'];
|
||||
control.push(this.initnewDetails());
|
||||
control.push(this.initBusinessDetails());
|
||||
}
|
||||
}
|
||||
removeLanguage(i: number,flag) {
|
||||
@ -857,8 +885,9 @@ public m_investmentType = [];
|
||||
}
|
||||
}
|
||||
|
||||
loanCalc(details)
|
||||
loanCalc(details ,flag)
|
||||
{
|
||||
if(flag == 1){
|
||||
//console.log(details.value);
|
||||
let ElapsedValues;
|
||||
|
||||
@ -866,6 +895,15 @@ public m_investmentType = [];
|
||||
ElapsedValues = details.value.original_loan_tenure - details.value.balance_tenure ;
|
||||
details.controls['elapsed_tenure'].setValue(ElapsedValues);
|
||||
}
|
||||
}
|
||||
else if(flag == 2){
|
||||
let BusinessElapsedValues;
|
||||
|
||||
if(details.value.business_original_loan_tenure != null && details.value.business_original_loan_tenure != '' && details.value.business_balance_tenure != null && details.value.business_balance_tenure != ''){
|
||||
BusinessElapsedValues = details.value.business_original_loan_tenure - details.value.business_balance_tenure ;
|
||||
details.controls['business_elapsed_tenure'].setValue(BusinessElapsedValues);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -192,6 +192,7 @@
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer>
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
@ -281,7 +282,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
|
||||
|
||||
@ -388,6 +388,7 @@
|
||||
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer>
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
@ -478,7 +479,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
|
||||
|
||||
@ -107,6 +107,7 @@
|
||||
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer>
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
@ -196,7 +197,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
|
||||
|
||||
@ -128,6 +128,7 @@
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer>
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
@ -217,7 +218,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
|
||||
@ -246,120 +246,10 @@
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="25" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
|
||||
<div class="top"><img src="./../../../../../../../assets/images/face2.jpg" alt="" /></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<small>Nivi SKM</small>
|
||||
<!-- <p>{{docs.pd_document_name}}</p> -->
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="25" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
|
||||
<div class="top"><img src="./../../../../../../../assets/images/face1.jpg" alt="" /></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<small>Nivi SKM</small>
|
||||
<!-- <p>{{docs.pd_document_name}}</p> -->
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="25" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
|
||||
<div class="top"><img src="./../../../../../../../assets/images/face1.jpg" alt="" /></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<small>Nivi SKM</small>
|
||||
<!-- <p>{{docs.pd_document_name}}</p> -->
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="25" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
|
||||
<div class="top"><img src="./../../../../../../../assets/images/face1.jpg" alt="" /></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<small>Nivi SKM</small>
|
||||
<!-- <p>{{docs.pd_document_name}}</p> -->
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="25" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
|
||||
<div class="top"><img src="./../../../../../../../assets/images/face1.jpg" alt="" /></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<small>Nivi SKM</small>
|
||||
<!-- <p>{{docs.pd_document_name}}</p> -->
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="25" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
|
||||
<div class="top"><img src="./../../../../../../../assets/images/face1.jpg" alt="" /></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<small>Nivi SKM</small>
|
||||
<!-- <p>{{docs.pd_document_name}}</p> -->
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
|
||||
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer>
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
@ -449,7 +339,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
|
||||
|
||||
@ -139,6 +139,7 @@
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer>
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
@ -228,7 +229,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
|
||||
|
||||
@ -51,6 +51,7 @@
|
||||
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer>
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
@ -141,7 +142,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
|
||||
@ -183,6 +183,7 @@
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer>
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
@ -273,6 +274,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
|
||||
@ -93,6 +93,7 @@
|
||||
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer>
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
@ -182,7 +183,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
|
||||
|
||||
@ -209,6 +209,7 @@
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer>
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
@ -299,7 +300,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
|
||||
|
||||
@ -204,6 +204,7 @@
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer>
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
@ -293,7 +294,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="100">
|
||||
<!-- start main applicant -->
|
||||
<mat-card>
|
||||
<mat-card *ngIf="rawMaterialAccess">
|
||||
<mat-card-header>
|
||||
<p>Raw Materials<p>
|
||||
</mat-card-header>
|
||||
@ -26,39 +26,50 @@
|
||||
<div *ngFor="let details of stockForm.controls.raw_materials['controls']; let i=index"
|
||||
[formGroupName]="i">
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput placeholder="Name" formControlName="raw_name" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="is the Stock is Observed ?"
|
||||
formControlName="stock_observed" required>
|
||||
formControlName="stock_observed" required
|
||||
(selectionChange)="RawMaterialValidation($event)">
|
||||
<mat-option value="yes" >Yes</mat-option>
|
||||
<mat-option value="no" >No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<div *ngIf="details.get('stock_observed').value == 'no'" >
|
||||
<mat-form-field>
|
||||
<span *ngIf="details.get('stock_observed').value == 'no'" >
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput placeholder="Estimated Quantity" formControlName="raw_quantity" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="Unit of Mearsurement"
|
||||
formControlName="raw_uom" required>
|
||||
<mat-option value="{{uom.uom_id}}" *ngFor="let uom of uomData">{{uom.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="details.get('raw_uom').value == 61" >
|
||||
<mat-form-field *ngIf="details.get('raw_uom').value == 61" style="width:30%">
|
||||
<input matInput placeholder="Specify Other UOM" formControlName="other_uom" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Value" formControlName="raw_value" (keypress)="keyPress($event)" required>
|
||||
<mat-form-field style="width:76%">
|
||||
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="raw_value" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" required>
|
||||
<mat-hint align="end" *ngIf="details.get('raw_value').value != ''">{{"₹"}} {{rawValueInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:76%">
|
||||
<input matInput placeholder="Value of raw materials as per latest financial Statements" formControlName="rawmaterial_value" (keypress)="keyPress($event)" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:76%">
|
||||
<input matInput placeholder="Is the stock of raw materials observed ?" formControlName="is_sufficiant_raw" required>
|
||||
<mat-form-field style="width:90%">
|
||||
<!-- <input matInput placeholder="Is the stock of raw materials observed ?" formControlName="is_sufficiant_raw" required> -->
|
||||
<mat-select placeholder="Is the stock of Raw Materials observed, sufficient considering the size of operations" formControlName="is_sufficiant_raw" required>
|
||||
<mat-option value="yes" >Yes</mat-option>
|
||||
<mat-option value="no" >No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<mat-form-field *ngIf="details.get('is_sufficiant_raw').value == 'no'" appearance="outline" style="width: 90%">
|
||||
<mat-label>Please comment on the stock level observed?</mat-label>
|
||||
<textarea matInput placeholder="Please comment on the stock level observed" formControlName="rawmaterial_remarks"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
</span>
|
||||
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="addRawMaterials()"
|
||||
matTooltip="Add More Raw Materials" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="i==0">
|
||||
@ -79,7 +90,7 @@
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="100">
|
||||
<!-- start co applicant form details -->
|
||||
<mat-card>
|
||||
<mat-card *ngIf="finishedGoodsAccess">
|
||||
<mat-card-header>
|
||||
<p>Finished Goods<p>
|
||||
</mat-card-header>
|
||||
@ -87,21 +98,40 @@
|
||||
<div *ngFor="let details of stockForm.controls.finished_goods['controls']; let i=index"
|
||||
[formGroupName]="i">
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput placeholder="Name" formControlName="goods_name" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="is the Goods is Observed ?"
|
||||
formControlName="goods_observed" required
|
||||
(selectionChange)="GoodsValidation($event)">
|
||||
<mat-option value="yes" >Yes</mat-option>
|
||||
<mat-option value="no" >No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<span *ngIf="details.get('goods_observed').value == 'no'" >
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput placeholder="Estimated Quantity" formControlName="goods_quantity" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Value" formControlName="goods_value" (keypress)="keyPress($event)" required>
|
||||
<mat-form-field style="width:76%">
|
||||
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,2)" required>
|
||||
<mat-hint align="end" *ngIf="details.get('goods_value').value != ''">{{"₹"}} {{goodsValueInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:76%">
|
||||
<input matInput placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:76%">
|
||||
<input matInput placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" required>
|
||||
<mat-form-field style="width:90%">
|
||||
<!-- <input matInput placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" required> -->
|
||||
<mat-select placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" required>
|
||||
<mat-option value="yes" >Yes</mat-option>
|
||||
<mat-option value="no" >No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="details.get('is_sufficiant_goods').value == 'no'" appearance="outline" style="width: 90%">
|
||||
<mat-label>Please comment on the finished goods stock level observed?</mat-label>
|
||||
<textarea matInput placeholder="Please comment on the finished goods observed" formControlName="finishedgoods_remarks"></textarea>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="addGoods()"
|
||||
matTooltip="Add More Finished Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="i==0">
|
||||
@ -119,10 +149,73 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="100">
|
||||
<mat-card *ngIf="tradeConcernAccess">
|
||||
<mat-card-header>
|
||||
<p>Stock of Goods Traded<p>
|
||||
</mat-card-header>
|
||||
<div formArrayName="traded_goods">
|
||||
<div *ngFor="let details of stockForm.controls.traded_goods['controls']; let i=index"
|
||||
[formGroupName]="i">
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput placeholder="Name" formControlName="traded_goods_name" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="is the Traded Goods is Observed ?"
|
||||
formControlName="traded_goods_observed" required
|
||||
(selectionChange)="TradedGoodsValidation($event)">
|
||||
<mat-option value="yes" >Yes</mat-option>
|
||||
<mat-option value="no" >No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<span *ngIf="details.get('traded_goods_observed').value == 'no'" >
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput placeholder="Estimated Quantity" formControlName="traded_goods_quantity" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:76%">
|
||||
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,3)" required>
|
||||
<mat-hint align="end" *ngIf="details.get('estimated_traded_goods_value').value != ''">{{"₹"}} {{tradedGoodsValueInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:76%">
|
||||
<input matInput placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:90%">
|
||||
<!-- <input matInput placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" required> -->
|
||||
<mat-select placeholder="Is the stock of Traded goods observed ?" formControlName="is_sufficiant_traded_goods" required>
|
||||
<mat-option value="yes" >Yes</mat-option>
|
||||
<mat-option value="no" >No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="details.get('is_sufficiant_traded_goods').value == 'no'" appearance="outline" style="width: 90%">
|
||||
<mat-label>Please comment on the Traded Goods stock level observed?</mat-label>
|
||||
<textarea matInput placeholder="Please comment on the traded goods stock level observed" formControlName="traded_goods_remarks"></textarea>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="addTradedGoods()"
|
||||
matTooltip="Add More Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="i==0">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteTradedGoods(i)"
|
||||
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="i>0">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</mat-card-content>
|
||||
</div>
|
||||
</div>
|
||||
</mat-card>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer>
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
@ -212,7 +305,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
|
||||
@ -222,7 +316,7 @@
|
||||
<mat-dialog-actions>
|
||||
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
<mat-label>Please comment on the stock level observed?</mat-label>
|
||||
<mat-label>Remarks</mat-label>
|
||||
<textarea matInput placeholder="Remarks" formControlName="stock_remarks"></textarea>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
@ -38,8 +38,15 @@ export class StockComponent implements OnInit {
|
||||
public stockForm: FormGroup;
|
||||
private notifier: NotifierService;
|
||||
public uomData : any = [];
|
||||
rawmaterial : any;
|
||||
|
||||
rawmaterial : any;
|
||||
goodsValueInWords : any;
|
||||
rawValueInWords : any;
|
||||
tradedGoodsValueInWords : any;
|
||||
rawMaterialAccess: boolean;
|
||||
finishedGoodsAccess: boolean;
|
||||
tradeConcernAccess: boolean;
|
||||
|
||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private _pd: PdTrigerService,@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
|
||||
@ -69,90 +76,185 @@ export class StockComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
this.initstockForm();
|
||||
this.getUOM();
|
||||
this.setSku('data',0);
|
||||
//this.setSku('data',0);
|
||||
let params: any = {};
|
||||
let activityArray : any = [];
|
||||
params.pd_id = this.pdid;
|
||||
params.pd_form_id = this.form_id;
|
||||
|
||||
this._pd.stockFormAccess({pd_id:this.pdid}).subscribe(value => {
|
||||
console.log(value);
|
||||
const rawMaterial = <FormArray>this.stockForm.controls['raw_materials'];
|
||||
const finishedGoods = <FormArray>this.stockForm.controls['finished_goods'];
|
||||
const tradedGoods = <FormArray>this.stockForm.controls['traded_goods'];
|
||||
|
||||
if (value.status == 200) {
|
||||
console.log('value.records',value.records);
|
||||
value.records.type_of_activity.forEach(val => {
|
||||
//console.log(val);
|
||||
//console.log(val.type_of_activity_id);
|
||||
this.rawMaterialAccess = true;
|
||||
this.finishedGoodsAccess = true;
|
||||
this.tradeConcernAccess = true;
|
||||
if(val.type_of_activity_id == 1){
|
||||
rawMaterial.push(this.createRawmaterial());
|
||||
finishedGoods.push(this.createGoods());
|
||||
tradedGoods.push(this.createTradedGoods());
|
||||
}
|
||||
else if(val.type_of_activity_id == 2){
|
||||
rawMaterial.push(this.createRawmaterial());
|
||||
finishedGoods.push(this.createGoods());
|
||||
}
|
||||
else if(val.type_of_activity_id == 3){
|
||||
rawMaterial.push(this.createRawmaterial());
|
||||
finishedGoods.push(this.createGoods());
|
||||
}
|
||||
// else if(val.type_of_activity_id == 4){
|
||||
// }
|
||||
|
||||
});
|
||||
|
||||
this._pd.retriveForm({pd_id:this.pdid,pd_form_id:'1'}).subscribe(value => {
|
||||
console.log('Raw material Name',value.records.main_raw_materials);
|
||||
|
||||
|
||||
//console.log('Raw material Name',value.records.main_raw_materials);
|
||||
|
||||
// const faControl = (<FormArray>this.stockForm.controls['raw_materials']).at(1);
|
||||
|
||||
const control = (<FormArray>this.stockForm.controls['raw_materials']).at(0);
|
||||
console.log(control);
|
||||
//const control = (<FormArray>this.stockForm.controls['raw_materials']).at(0);
|
||||
//console.log(control);
|
||||
|
||||
// this.stockForm.controls['raw_materials'].setValue(value.records.main_raw_materials);
|
||||
if (value.status == 200) {
|
||||
this.rawmaterial = value.records.main_raw_materials;
|
||||
}else{ this.rawmaterial = ''; }
|
||||
// if (value.status == 200) {
|
||||
// this.rawmaterial = value.records.main_raw_materials;
|
||||
// }else{ this.rawmaterial = ''; }
|
||||
})
|
||||
|
||||
this._pd.retriveForm(params).subscribe(value => {
|
||||
console.log('value', value);
|
||||
const rawMaterial = <FormArray>this.stockForm.controls['raw_materials'];
|
||||
const finishedGoods = <FormArray>this.stockForm.controls['finished_goods'];
|
||||
//console.log('value', value);
|
||||
|
||||
if (value.status == 200) {
|
||||
let result = Object.keys(value.records.raw_materials).map(function(key) {
|
||||
return value.records.raw_materials[key];
|
||||
});
|
||||
let result_Goods = Object.keys(value.records.finished_goods).map(function(key) {
|
||||
return value.records.finished_goods[key];
|
||||
});
|
||||
console.log('data',value);
|
||||
// Raw Material Access is True means., Data have to load,
|
||||
if(this.rawMaterialAccess == true){
|
||||
|
||||
let result = Object.keys(value.records.raw_materials).map(function(key) {
|
||||
return value.records.raw_materials[key];
|
||||
});
|
||||
|
||||
if (result.length > 0) {
|
||||
|
||||
result.forEach(val => {
|
||||
|
||||
//this.RawMaterialValidation(val.stock_observed);
|
||||
rawMaterial.push(this.createRawmaterial());
|
||||
if(val.raw_value != '' && val.raw_value != null ){ this.rawValueInWords = this._pd.convertNumberToWords(val.raw_value); }
|
||||
});
|
||||
this.stockForm.controls['raw_materials'].setValue(result);
|
||||
} else {
|
||||
rawMaterial.push(this.createRawmaterial());
|
||||
}
|
||||
}
|
||||
|
||||
// Finished Goods Access is TRUE Means., data have to load.,
|
||||
if(this.finishedGoodsAccess == true){
|
||||
let result_Goods = Object.keys(value.records.finished_goods).map(function(key) {
|
||||
return value.records.finished_goods[key];
|
||||
});
|
||||
|
||||
if (result_Goods.length > 0) {
|
||||
|
||||
result_Goods.forEach(val => {
|
||||
|
||||
//this.GoodsValidation(val.goods_observed);
|
||||
finishedGoods.push(this.createGoods());
|
||||
if(val.goods_value != '' && val.goods_value != null ){ this.goodsValueInWords = this._pd.convertNumberToWords(val.goods_value); }
|
||||
});
|
||||
this.stockForm.controls['finished_goods'].setValue(result_Goods);
|
||||
} else {
|
||||
finishedGoods.push(this.createGoods());
|
||||
}
|
||||
}
|
||||
|
||||
//TradeConcern Access is TRUE Means., data have to load.,
|
||||
if(this.tradeConcernAccess == true){
|
||||
let result_Traded_Goods = Object.keys(value.records.finished_goods).map(function(key) {
|
||||
return value.records.traded_goods[key];
|
||||
});
|
||||
|
||||
if (result_Traded_Goods.length > 0) {
|
||||
|
||||
result_Traded_Goods.forEach(val => {
|
||||
|
||||
|
||||
tradedGoods.push(this.createTradedGoods());
|
||||
if(val.traded_goods_value != '' && val.traded_goods_value != null )
|
||||
{ this.tradedGoodsValueInWords = this._pd.convertNumberToWords(val.traded_goods_value); }
|
||||
});
|
||||
this.stockForm.controls['traded_goods'].setValue(result_Traded_Goods);
|
||||
} else {
|
||||
tradedGoods.push(this.createTradedGoods());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.stockForm.controls['stock_remarks'].setValue(value.records.stock_remarks);
|
||||
if (result.length > 0) {
|
||||
result.forEach(val => {
|
||||
rawMaterial.push(this.createRawmaterial());
|
||||
});
|
||||
this.stockForm.controls['raw_materials'].setValue(result);
|
||||
} else {
|
||||
rawMaterial.push(this.createRawmaterial());
|
||||
}
|
||||
if (result_Goods.length > 0) {
|
||||
result_Goods.forEach(val => {
|
||||
finishedGoods.push(this.createGoods());
|
||||
});
|
||||
this.stockForm.controls['finished_goods'].setValue(result_Goods);
|
||||
} else {
|
||||
finishedGoods.push(this.createGoods());
|
||||
}
|
||||
|
||||
} else {
|
||||
rawMaterial.push(this.createRawmaterial());
|
||||
finishedGoods.push(this.createGoods());
|
||||
// rawMaterial.push(this.createRawmaterial());
|
||||
// finishedGoods.push(this.createGoods());
|
||||
// tradedGoods.push(this.createTradedGoods());
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public initstockForm(): void {
|
||||
this.stockForm = this.fb.group({
|
||||
stock_remarks: ['', Validators.compose([Validators.required])],
|
||||
raw_materials: this.fb.array([]),
|
||||
finished_goods: this.fb.array([])
|
||||
finished_goods: this.fb.array([]),
|
||||
traded_goods: this.fb.array([])
|
||||
});
|
||||
}
|
||||
setSku(sku: string, index: number) {
|
||||
//setSku(sku: string, index: number) {
|
||||
// const faControl =
|
||||
// (<FormArray>this.stockForm.controls['raw_materials']).at(index);
|
||||
// faControl['controls'].raw_name.setValue(sku);
|
||||
}
|
||||
// }
|
||||
createRawmaterial() {
|
||||
return this.fb.group({
|
||||
raw_name: ['', Validators.compose([Validators.required])],
|
||||
stock_observed:['', Validators.compose([Validators.required])],
|
||||
raw_quantity: ['', Validators.compose([Validators.required])],
|
||||
raw_uom: ['', Validators.compose([Validators.required])],
|
||||
raw_quantity: [''],
|
||||
raw_uom: [''],
|
||||
other_uom : [''],
|
||||
raw_value: ['', Validators.compose([Validators.required])],
|
||||
rawmaterial_value: ['', Validators.compose([Validators.required])],
|
||||
is_sufficiant_raw: ['', Validators.compose([Validators.required])],
|
||||
raw_value: [''],
|
||||
rawmaterial_value: [''],
|
||||
is_sufficiant_raw: [''],
|
||||
rawmaterial_remarks:['']
|
||||
});
|
||||
}
|
||||
createGoods() {
|
||||
return this.fb.group({
|
||||
goods_name: ['', Validators.compose([Validators.required])],
|
||||
goods_quantity: ['', Validators.compose([Validators.required])],
|
||||
goods_value: ['', Validators.compose([Validators.required])],
|
||||
finished_goods_value: ['', Validators.compose([Validators.required])],
|
||||
is_sufficiant_goods: ['', Validators.compose([Validators.required])],
|
||||
goods_observed: ['', Validators.compose([Validators.required])],
|
||||
goods_quantity: [''],
|
||||
goods_value: [''],
|
||||
finished_goods_value: [''],
|
||||
is_sufficiant_goods: [''],
|
||||
finishedgoods_remarks:['']
|
||||
});
|
||||
}
|
||||
|
||||
createTradedGoods() {
|
||||
return this.fb.group({
|
||||
traded_goods_name: ['', Validators.compose([Validators.required])],
|
||||
traded_goods_observed: ['', Validators.compose([Validators.required])],
|
||||
traded_goods_quantity: [''],
|
||||
estimated_traded_goods_value: [''],
|
||||
traded_goods_value: [''],
|
||||
is_sufficiant_traded_goods: [''],
|
||||
traded_goods_remarks:['']
|
||||
});
|
||||
}
|
||||
addRawMaterials() {
|
||||
@ -171,6 +273,15 @@ export class StockComponent implements OnInit {
|
||||
const control = <FormArray>this.stockForm.controls['finished_goods'];
|
||||
control.removeAt(index);
|
||||
}
|
||||
addTradedGoods() {
|
||||
const control = <FormArray>this.stockForm.controls['traded_goods'];
|
||||
control.push(this.createTradedGoods());
|
||||
}
|
||||
deleteTradedGoods(index) {
|
||||
const control = <FormArray>this.stockForm.controls['traded_goods'];
|
||||
control.removeAt(index);
|
||||
}
|
||||
|
||||
submitDetails() {
|
||||
if (!this.stockForm.valid) {
|
||||
return;
|
||||
@ -179,12 +290,16 @@ export class StockComponent implements OnInit {
|
||||
records.pdid = this.pdid;
|
||||
records.formid = this.form_id;
|
||||
records.fk_createdby = this.pdid;
|
||||
records.raw_materials = this.stockForm.controls['raw_materials'].value;
|
||||
if(this.rawMaterialAccess == true){
|
||||
records.raw_materials = this.stockForm.controls['raw_materials'].value; }
|
||||
if(this.finishedGoodsAccess == true){
|
||||
records.finished_goods = this.stockForm.controls['finished_goods'].value;}
|
||||
if(this.tradeConcernAccess == true){
|
||||
records.traded_goods = this.stockForm.controls['traded_goods'].value; }
|
||||
records.stock_remarks = this.stockForm.controls['stock_remarks'].value;
|
||||
records.finished_goods = this.stockForm.controls['finished_goods'].value;
|
||||
console.log('data', records);
|
||||
//console.log('data', records);
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
console.log('data', data);
|
||||
//console.log('data', data);
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
}, error => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
@ -220,4 +335,151 @@ export class StockComponent implements OnInit {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
/** To Convert Amount into Words */
|
||||
inWords(e,flag:number){
|
||||
switch(flag){
|
||||
case 1 :
|
||||
this.rawValueInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 2 :
|
||||
this.goodsValueInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 3 :
|
||||
this.tradedGoodsValueInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Validation Dynamically Add And Remove
|
||||
GoodsValidation(event: any){
|
||||
// console.log('First Time',event);
|
||||
// console.log('First Time Value',event.value);
|
||||
|
||||
const control = <FormArray>this.stockForm.controls['finished_goods'];
|
||||
|
||||
if(event.value == 'no') {
|
||||
|
||||
control.controls[0].get('goods_quantity').setValidators([Validators.required]);
|
||||
control.controls[0].get('goods_quantity').updateValueAndValidity();
|
||||
|
||||
control.controls[0].get('goods_value').setValidators([Validators.required]);
|
||||
control.controls[0].get('goods_value').updateValueAndValidity();
|
||||
|
||||
control.controls[0].get('finished_goods_value').setValidators([Validators.required]);
|
||||
control.controls[0].get('finished_goods_value').updateValueAndValidity();
|
||||
|
||||
control.controls[0].get('is_sufficiant_goods').setValidators([Validators.required]);
|
||||
control.controls[0].get('is_sufficiant_goods').updateValueAndValidity();
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
if(event.value == 'yes') {
|
||||
|
||||
control.controls[0].get('goods_quantity').clearValidators();
|
||||
control.controls[0].get('goods_quantity').updateValueAndValidity();
|
||||
|
||||
control.controls[0].get('goods_value').clearValidators();
|
||||
control.controls[0].get('goods_value').updateValueAndValidity();
|
||||
|
||||
control.controls[0].get('finished_goods_value').clearValidators();
|
||||
control.controls[0].get('finished_goods_value').updateValueAndValidity();
|
||||
|
||||
control.controls[0].get('is_sufficiant_goods').clearValidators();
|
||||
control.controls[0].get('is_sufficiant_goods').updateValueAndValidity();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RawMaterialValidation(event: any){
|
||||
// console.log('First Time',event);
|
||||
// console.log('First Time Value',event.value);
|
||||
|
||||
const control = <FormArray>this.stockForm.controls['raw_materials'];
|
||||
|
||||
if(event.value == 'no') {
|
||||
|
||||
control.controls[0].get('raw_quantity').setValidators([Validators.required]);
|
||||
control.controls[0].get('raw_quantity').updateValueAndValidity();
|
||||
|
||||
control.controls[0].get('raw_uom').setValidators([Validators.required]);
|
||||
control.controls[0].get('raw_uom').updateValueAndValidity();
|
||||
|
||||
control.controls[0].get('raw_value').setValidators([Validators.required]);
|
||||
control.controls[0].get('raw_value').updateValueAndValidity();
|
||||
|
||||
control.controls[0].get('rawmaterial_value').setValidators([Validators.required]);
|
||||
control.controls[0].get('rawmaterial_value').updateValueAndValidity();
|
||||
|
||||
control.controls[0].get('is_sufficiant_raw').setValidators([Validators.required]);
|
||||
control.controls[0].get('is_sufficiant_raw').updateValueAndValidity();
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
if(event.value == 'yes') {
|
||||
|
||||
control.controls[0].get('raw_quantity').clearValidators();
|
||||
control.controls[0].get('raw_quantity').updateValueAndValidity();
|
||||
|
||||
control.controls[0].get('raw_uom').clearValidators();
|
||||
control.controls[0].get('raw_uom').updateValueAndValidity();
|
||||
|
||||
control.controls[0].get('raw_value').clearValidators();
|
||||
control.controls[0].get('raw_value').updateValueAndValidity();
|
||||
|
||||
control.controls[0].get('rawmaterial_value').clearValidators();
|
||||
control.controls[0].get('rawmaterial_value').updateValueAndValidity();
|
||||
|
||||
control.controls[0].get('is_sufficiant_raw').clearValidators();
|
||||
control.controls[0].get('is_sufficiant_raw').updateValueAndValidity();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
TradedGoodsValidation(event: any){
|
||||
console.log('First Time',event);
|
||||
console.log('First Time Value',event.value);
|
||||
|
||||
const control = <FormArray>this.stockForm.controls['tradeded_goods'];
|
||||
|
||||
if(event.value == 'no') {
|
||||
|
||||
control.controls[0].get('traded_goods_quantity').setValidators([Validators.required]);
|
||||
control.controls[0].get('traded_goods_quantity').updateValueAndValidity();
|
||||
|
||||
control.controls[0].get('estimated_traded_goods_value').setValidators([Validators.required]);
|
||||
control.controls[0].get('estimated_traded_goods_value').updateValueAndValidity();
|
||||
|
||||
control.controls[0].get('traded_goods_value').setValidators([Validators.required]);
|
||||
control.controls[0].get('traded_goods_value').updateValueAndValidity();
|
||||
|
||||
control.controls[0].get('is_sufficiant_traded_goods').setValidators([Validators.required]);
|
||||
control.controls[0].get('is_sufficiant_traded_goods').updateValueAndValidity();
|
||||
}
|
||||
else
|
||||
if(event.value == 'yes') {
|
||||
|
||||
control.controls[0].get('traded_goods_quantity').clearValidators();
|
||||
control.controls[0].get('traded_goods_quantity').updateValueAndValidity();
|
||||
|
||||
control.controls[0].get('estimated_traded_goods_value').clearValidators();
|
||||
control.controls[0].get('estimated_traded_goods_value').updateValueAndValidity();
|
||||
|
||||
control.controls[0].get('traded_goods_value').clearValidators();
|
||||
control.controls[0].get('traded_goods_value').updateValueAndValidity();
|
||||
|
||||
control.controls[0].get('is_sufficiant_traded_goods').clearValidators();
|
||||
control.controls[0].get('is_sufficiant_traded_goods').updateValueAndValidity();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -14,11 +14,16 @@
|
||||
</div>
|
||||
</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-card-content style="max-height:100% !important;">
|
||||
<div fxLayout="row wrap" class="child_mat_card">
|
||||
<mat-card fxFlex.xs="90" fxFlex.sm="45" fxFlex.md="30" fxFlex.lg="23" fxFlex.xl="23" *ngFor="let formButton of categoryFormButtons;let quesIndex=index" [ngStyle]="{'background-color':formButton.isAnswered == false ? '#827f7f' : '#4caf50' ,'color':'#fff'}" (click)="OnSelectDirectForms(formButton)">
|
||||
<mat-card fxFlex.xs="80" fxFlex.sm="45" fxFlex.md="30" fxFlex.lg="23" fxFlex.xl="23" *ngFor="let formButton of categoryFormButtons;let quesIndex=index" [ngStyle]="{'background-color':formButton.isAnswered == false ? '#827f7f' : '#4caf50' ,'color':'#fff'}" (click)="OnSelectDirectForms(formButton)">
|
||||
<mat-card-header>
|
||||
<mat-card-title>{{ (formButton.form_name.length>17)? (formButton.form_name | slice:0:17)+'..':(formButton.form_name) }}</mat-card-title>
|
||||
<div fxFlex="90" align="left" style="padding:15px !important;">
|
||||
{{ (formButton.form_name.length>17)? (formButton.form_name | slice:0:17)+'..':(formButton.form_name) }}
|
||||
</div>
|
||||
<div fxFlex="20" align="end">
|
||||
<span style="padding: 3px;" class="menu-badge mat-purple ng-star-inserted" align="center">Q{{formButton.pd_form_order}}</span>
|
||||
</div>
|
||||
<!-- <mat-card-subtitle>Karthi Kms</mat-card-subtitle> -->
|
||||
</mat-card-header>
|
||||
</mat-card>
|
||||
|
||||
@ -11,6 +11,16 @@ mat-card.parent_mat_card > {
|
||||
max-height:52vh;
|
||||
overflow:auto;
|
||||
}
|
||||
.user-thumb {
|
||||
position: absolute;
|
||||
bottom: -35%;
|
||||
// img {
|
||||
// border: 5px solid $white;
|
||||
// border-radius: 100%;
|
||||
// height: 75px;
|
||||
// width: 75px;
|
||||
// }
|
||||
}
|
||||
// @media only screen and (max-width:319px) {
|
||||
// mat-card-content {
|
||||
// max-height: 350px;
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
<button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdApplicant(pdApplicantData)"><mat-icon>edit</mat-icon></button>
|
||||
</div>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Applicants</mat-card-title>
|
||||
<mat-card-title style="color:red !important;">Applicants</mat-card-title>
|
||||
</mat-card-header>
|
||||
|
||||
<mat-card-content *ngIf="pdApplicantData.length>0; else noApplicant">
|
||||
@ -101,7 +101,7 @@
|
||||
<button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editAdditionalRequirement(pdAdditionalReqData)"><mat-icon>edit</mat-icon></button>
|
||||
</div>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Additional Requirements</mat-card-title>
|
||||
<mat-card-title style="color:red !important;">Additional Requirements</mat-card-title>
|
||||
</mat-card-header>
|
||||
|
||||
<mat-card-content *ngIf="pdAdditionalReqData.length>0; else noRequirement">
|
||||
@ -123,7 +123,7 @@
|
||||
<!-- pd documents card -->
|
||||
<mat-expansion-panel *ngIf="pdDocumentsData.length>0; else nodocument">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title class="text-xs-left">
|
||||
<mat-panel-title class="text-xs-left" style="color:red !important;">
|
||||
<h6 class="mt-0">Documents</h6>
|
||||
</mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
@ -145,7 +145,7 @@
|
||||
<!--pd logs card -->
|
||||
<mat-expansion-panel *ngIf="masterPdLogsData.length>0; else nohistory">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title class="text-xs-left">
|
||||
<mat-panel-title class="text-xs-left" style="color:red !important;">
|
||||
<h6 class="mt-0"> PD History</h6>
|
||||
</mat-panel-title>
|
||||
|
||||
|
||||
@ -5,4 +5,7 @@
|
||||
}
|
||||
.minheight {
|
||||
min-height: 100%;
|
||||
}
|
||||
::ng-deep .body-container{
|
||||
padding: 0rem !important;
|
||||
}
|
||||
@ -15,7 +15,7 @@ import {
|
||||
MatToolbarModule, MatSelectModule, MatListModule, MatGridListModule,
|
||||
MatTabsModule, MatCheckboxModule,
|
||||
MatBadgeModule, MatExpansionModule, MatStepperModule, MatSidenavModule,
|
||||
MatMenuModule, MatButtonToggleModule,
|
||||
MatMenuModule, MatButtonToggleModule,MatChipsModule,
|
||||
MatAutocompleteModule, MatDatepickerModule } from '@angular/material';
|
||||
|
||||
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
||||
@ -273,6 +273,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
||||
PdfViewerModule,
|
||||
MatCardModule,
|
||||
MatIconModule,
|
||||
MatAutocompleteModule,
|
||||
MatInputModule,
|
||||
MatRadioModule,
|
||||
MatTableModule,
|
||||
@ -282,6 +283,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
||||
MatToolbarModule,
|
||||
FlexLayoutModule,
|
||||
NgxDatatableModule,
|
||||
MatChipsModule,
|
||||
FormsModule,MatSlideToggleModule,
|
||||
MatSelectModule, MatListModule,MatGridListModule, MatTabsModule, MatBadgeModule, MatCheckboxModule,MatStepperModule,MatSidenavModule ,MatMenuModule, MatButtonToggleModule,
|
||||
ReactiveFormsModule,
|
||||
|
||||
@ -423,9 +423,29 @@ convertNumberToWords(amount) {
|
||||
)
|
||||
}
|
||||
|
||||
stockFormAccess(pdid: any): Observable<any> {
|
||||
|
||||
return this._http.post<any>(this.apiUrl+"getTypeOfActivetyFromBusinessForm",{"records":pdid})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
// private handleError<T>(operation = 'operation', result?: T) {
|
||||
// return (error: any): Observable<T> => {
|
||||
// return of(result as T);
|
||||
// };
|
||||
// }
|
||||
|
||||
/**Search Filter
|
||||
* Sriram
|
||||
*/
|
||||
|
||||
overAllSearchFormDetails(searchItem)
|
||||
{
|
||||
let records = {'records':searchItem};
|
||||
return this._http.post(this.apiUrl+'filterPDList',records).pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
0
ng6-seed/src/app/settings/entity/entity-edit/entity-branch-add/entity-branch-add.component.html
Normal file → Executable file
0
ng6-seed/src/app/settings/entity/entity-edit/entity-branch-add/entity-branch-add.component.html
Normal file → Executable file
0
ng6-seed/src/app/settings/entity/entity-edit/entity-branch-add/entity-branch-add.component.scss
Normal file → Executable file
0
ng6-seed/src/app/settings/entity/entity-edit/entity-branch-add/entity-branch-add.component.scss
Normal file → Executable file
0
ng6-seed/src/app/settings/entity/entity-edit/entity-branch-add/entity-branch-add.component.spec.ts
Normal file → Executable file
0
ng6-seed/src/app/settings/entity/entity-edit/entity-branch-add/entity-branch-add.component.spec.ts
Normal file → Executable file
0
ng6-seed/src/app/settings/entity/entity-edit/entity-branch-add/entity-branch-add.component.ts
Normal file → Executable file
0
ng6-seed/src/app/settings/entity/entity-edit/entity-branch-add/entity-branch-add.component.ts
Normal file → Executable file
Loading…
Reference in New Issue
Block a user