changes : ps

This commit is contained in:
venbatechnologies@gmail.com 2019-01-14 16:11:09 +05:30
parent 721e337ec8
commit 135182ea57
4 changed files with 396 additions and 298 deletions

View File

@ -6,6 +6,8 @@ import { NotifierService } from 'angular-notifier';
import { PdTrigerService } from '../../../pd-service/pd-triger.service'; import { PdTrigerService } from '../../../pd-service/pd-triger.service';
import { ListPdComponent } from '../list-pd.component'; import { ListPdComponent } from '../list-pd.component';
import { AwsService } from '../../../../AwsService/aws.service'; import { AwsService } from '../../../../AwsService/aws.service';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({ @Component({
selector: 'app-add-pd', selector: 'app-add-pd',
templateUrl: './add-pd.component.html', templateUrl: './add-pd.component.html',
@ -486,11 +488,14 @@ export class AddPdComponent implements OnInit, OnDestroy {
} }
} }
loadPdListCompoent(from:boolean) { loadPdListCompoent(from:boolean) {
//alert(from);
if(from){ if(from){
// alert('if'+from);
this.router.navigate([ '../../' ], { relativeTo: this.route }); this.router.navigate([ '../../' ], { relativeTo: this.route });
this.ListPdComponent.pdListLoad(true); this.ListPdComponent.pdListLoad(true);
} }
else{ else{
// alert(from);
this.router.navigate([ '../../' ], { relativeTo: this.route }); this.router.navigate([ '../../' ], { relativeTo: this.route });
this.ListPdComponent.showListView(true); this.ListPdComponent.showListView(true);
} }

View File

@ -17,30 +17,30 @@
<mat-card-title>PD Details</mat-card-title> <mat-card-title>PD Details</mat-card-title>
</mat-card-header> --> </mat-card-header> -->
<mat-card-content> <mat-card-content>
<mat-form-field style="width: 32%"> <mat-form-field style="width: 29%">
<mat-select placeholder="Lender Name" formControlName="fk_lender_id"> <mat-select placeholder="Lender Name" formControlName="fk_lender_id">
<mat-option> <mat-option>
Select Select
</mat-option> </mat-option>
<mat-option *ngFor="let LL of lenderList" [value]="LL.entity_id" > <mat-option *ngFor="let LL of lenderList" [value]="LL.entity_id" >
{{LL.full_name}} {{LL.full_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
<!-- <mat-error *ngIf="pdMain.fk_lender_id.hasError('required')" class="mat-text-warn">Lender Name Required.</mat-error> --> <!-- <mat-error *ngIf="pdMain.fk_lender_id.hasError('required')" class="mat-text-warn">Lender Name Required.</mat-error> -->
</mat-form-field>
<mat-form-field style="width: 32%">
<input matInput placeholder="Loan Applicant ID" formControlName="lender_applicant_id" type="text" required>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 32%">
<mat-form-field style="width: 29%">
<input matInput placeholder="Loan Applicant ID" formControlName="lender_applicant_id" type="text" required>
</mat-form-field>
<mat-form-field style="width: 29%">
<input matInput placeholder="Lender Contact Person" formControlName="pd_contact_person" type="text" required> <input matInput placeholder="Lender Contact Person" formControlName="pd_contact_person" type="text" required>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 25%"> <mat-form-field style="width: 29%">
<input matInput placeholder="Lender Contact Number" formControlName="pd_contact_mobileno" type="text" (keypress)="keyPress($event)"> <input matInput placeholder="Lender Mobile Number" formControlName="pd_contact_mobileno" type="text" (keypress)="keyPress($event)">
<mat-error *ngIf="pdMain.pd_contact_mobileno.hasError('pattern') || pdMain.pd_contact_mobileno.hasError('maxlength') || pdMain.pd_contact_mobileno.hasError('minlength')">Enter Valid Mobile Number. </mat-error> <mat-error *ngIf="pdMain.pd_contact_mobileno.hasError('pattern') || pdMain.pd_contact_mobileno.hasError('maxlength') || pdMain.pd_contact_mobileno.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 10%"> <mat-form-field style="width: 10%">
<input matInput placeholder="STD Code" formControlName="lender_stdcode" type="text" (keypress)="keyPress($event)"> <input matInput placeholder="STD Code" formControlName="lender_stdcode" type="text" (keypress)="keyPress($event)">
<!-- <span matPrefix>+91</span> --> <!-- <span matPrefix>+91</span> -->
<mat-error *ngIf="pdMain.lender_stdcode.hasError('maxlength') || pdMain.lender_stdcode.hasError('minlength')">Enter Valid STD Code. </mat-error> <mat-error *ngIf="pdMain.lender_stdcode.hasError('maxlength') || pdMain.lender_stdcode.hasError('minlength')">Enter Valid STD Code. </mat-error>
@ -49,7 +49,7 @@
<input matInput placeholder="LandLine Number" formControlName="lender_landline" type="text" (keypress)="keyPress($event)"> <input matInput placeholder="LandLine Number" formControlName="lender_landline" type="text" (keypress)="keyPress($event)">
<mat-error *ngIf="pdMain.lender_landline.hasError('maxlength') || pdMain.lender_landline.hasError('minlength')">Enter Valid Landline Number. </mat-error> <mat-error *ngIf="pdMain.lender_landline.hasError('maxlength') || pdMain.lender_landline.hasError('minlength')">Enter Valid Landline Number. </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 32%"> <mat-form-field style="width: 29%">
<mat-select placeholder="Product Name" formControlName="fk_product_id" (selectionChange)="getSubproductList(pdMain.fk_product_id.value)"> <mat-select placeholder="Product Name" formControlName="fk_product_id" (selectionChange)="getSubproductList(pdMain.fk_product_id.value)">
<mat-option> <mat-option>
Select Select
@ -61,7 +61,7 @@
<!-- <mat-error *ngIf="pdMain.fk_product_id.hasError('required')">Product Required.</mat-error> --> <!-- <mat-error *ngIf="pdMain.fk_product_id.hasError('required')">Product Required.</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 32%"> <mat-form-field style="width: 29%">
<mat-select placeholder="Sub product Name" formControlName="fk_subproduct_id"> <mat-select placeholder="Sub product Name" formControlName="fk_subproduct_id">
<mat-option>Select</mat-option> <mat-option>Select</mat-option>
@ -74,7 +74,7 @@
<!-- <mat-error *ngIf="pdMain.fk_subproduct_id.hasError('required')">Sub Product Required.</mat-error> --> <!-- <mat-error *ngIf="pdMain.fk_subproduct_id.hasError('required')">Sub Product Required.</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 32%"> <mat-form-field style="width: 29%">
<mat-select placeholder="Customer Segment" formControlName="fk_customer_segment"> <mat-select placeholder="Customer Segment" formControlName="fk_customer_segment">
<mat-option>Select</mat-option> <mat-option>Select</mat-option>
<mat-option *ngFor="let CSL of customerSegmentList" [value]="CSL.customer_segment_id" > <mat-option *ngFor="let CSL of customerSegmentList" [value]="CSL.customer_segment_id" >
@ -83,7 +83,7 @@
</mat-select> </mat-select>
<!-- <mat-error *ngIf="pdMain.fk_customer_segment.hasError('required')">Customer Segment Required.</mat-error> --> <!-- <mat-error *ngIf="pdMain.fk_customer_segment.hasError('required')">Customer Segment Required.</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 32%"> <mat-form-field style="width: 29%">
<mat-select placeholder="PD Type" formControlName="fk_pd_type"> <mat-select placeholder="PD Type" formControlName="fk_pd_type">
<mat-option>Select</mat-option> <mat-option>Select</mat-option>
<mat-option *ngFor="let PDL of pdTypeList" [value]="PDL.pd_type_id" > <mat-option *ngFor="let PDL of pdTypeList" [value]="PDL.pd_type_id" >
@ -94,7 +94,7 @@
<!-- <mat-error *ngIf="pdMain.fk_pd_type.hasError('required')">PD Type Required.</mat-error> --> <!-- <mat-error *ngIf="pdMain.fk_pd_type.hasError('required')">PD Type Required.</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 24%"> <mat-form-field style="width: 62%">
<!-- <input matInput placeholder="Loan Amount" formControlName="loan_amount"> --> <!-- <input matInput placeholder="Loan Amount" formControlName="loan_amount"> -->
<input matInput placeholder="Loan Amount" formControlName="loan_amount" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" required autocomplete="off"> <input matInput placeholder="Loan Amount" formControlName="loan_amount" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" required autocomplete="off">
<mat-hint align="start" style="font-size:70%" *ngIf="pdMain.loan_amount.value != ''">{{"&#8377;"}} {{loanAmtInWords}} Only</mat-hint> <mat-hint align="start" style="font-size:70%" *ngIf="pdMain.loan_amount.value != ''">{{"&#8377;"}} {{loanAmtInWords}} Only</mat-hint>
@ -106,7 +106,7 @@
<textarea matInput placeholder="Address at which PD is to be done" formControlName="addressline1" oninput="this.value = this.value.toUpperCase()"></textarea> <textarea matInput placeholder="Address at which PD is to be done" formControlName="addressline1" oninput="this.value = this.value.toUpperCase()"></textarea>
<!-- <mat-error *ngIf="pdMain.addressline1.hasError('required')">Address1 required.</mat-error> --> <!-- <mat-error *ngIf="pdMain.addressline1.hasError('required')">Address1 required.</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 32%;"> <mat-form-field style="width: 29%;">
<mat-select placeholder="State" formControlName="fk_state" (selectionChange)="getCityList(pdMain.fk_state.value)"> <mat-select placeholder="State" formControlName="fk_state" (selectionChange)="getCityList(pdMain.fk_state.value)">
<mat-option>Select</mat-option> <mat-option>Select</mat-option>
@ -118,7 +118,7 @@
<!-- <mat-error *ngIf="pdMain.fk_state.hasError('required')">State Required.</mat-error> --> <!-- <mat-error *ngIf="pdMain.fk_state.hasError('required')">State Required.</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 32%;"> <mat-form-field style="width: 29%;">
<mat-select placeholder="City" formControlName="fk_city"> <mat-select placeholder="City" formControlName="fk_city">
<mat-option>Select</mat-option> <mat-option>Select</mat-option>
<mat-option *ngFor="let CL of cityList" [value]="CL.city_id"> <mat-option *ngFor="let CL of cityList" [value]="CL.city_id">

View File

@ -1,275 +1,289 @@
<mat-card> <mat-card>
<mat-card-content> <mat-card-content>
<mat-card class="p-2 mb-2" style="height: 370px !important;"> <mat-card class="p-2 mb-2" style="height: 370px !important;">
<div fxLayout="row" fxLayoutWrap="wrap" class="mb-3"> <div fxLayout="row" fxLayoutWrap="wrap" class="mb-3">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="60" fxFlex.lg="30" fxFlex.xl="30" class="profile-center" style="text-align:center;"> <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="60" fxFlex.lg="30" fxFlex.xl="30" class="profile-center" style="text-align:center;">
<!--<div class="mb-1"> <!--<div class="mb-1">
<img src="assets/images/userpic.jpg" width="100" height="100" alt="" class="radius-circle"> <img src="assets/images/userpic.jpg" width="100" height="100" alt="" class="radius-circle">
</div>--> </div>-->
<mat-card style="padding: 15px;height: 290px;width: 280px;box-shadow: 0 5px 11px 0 rgba(0,0,0,.18), 0 4px 15px 0 rgba(0,0,0,.15) !important;"> <mat-card style="padding: 15px;height: 290px;width: 280px;box-shadow: 0 5px 11px 0 rgba(0,0,0,.18), 0 4px 15px 0 rgba(0,0,0,.15) !important;">
<div *ngFor="let master of pdMasterData" class="ml-xs mr-xs"> <div *ngFor="let master of pdMasterData" class="ml-xs mr-xs">
<h4 class="ma-0">{{master.lender_short_name}}</h4> <h4 class="ma-0">{{master.lender_short_name}}</h4>
<small>{{master.branch_name}}</small> <small>{{master.branch_name}}</small>
<div *ngIf="master.lender_applicant_id"> <div *ngIf="master.lender_applicant_id">
<small> {{master.lender_applicant_id}}</small> <br> <small> {{master.lender_applicant_id}}</small> <br>
<small>{{master.pd_date_of_initiation}}</small><br> <small>{{master.pd_date_of_initiation}}</small><br>
<br>
<button mat-raised-button color="primary" style="cursor: not-allowed !important;">
<span *ngIf="master.pd_status==pdStatusCheck.SCHEDULED" style="text-align:left">{{master.pd_status | titlecase}}</span>
<span *ngIf="master.pd_status!=pdStatusCheck.SCHEDULED && master.pd_status!=pdStatusCheck.QC_COMPLETED " style="text-align:left">{{master.pd_status | titlecase}}</span>
<span *ngIf="master.pd_status==pdStatusCheck.QC_COMPLETED " style="text-align:left">QC Completed</span>
</button>&nbsp;&nbsp;
<button *ngIf="currentPDStatus==pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger" matTooltipPosition="above" (click)="directTriggerPD(mandatoryFieldsValidations,master)"><mat-icon>flash_on</mat-icon></button>
<br> <br>
<button mat-raised-button color="primary" style="cursor: not-allowed !important;"> <small *ngIf="master.pd_allocated_to && master.fk_pd_type==1" style="text-align:left" matTooltip="PD Officer" matTooltipPosition="above">{{master.pd_allocated_to | titlecase}}</small>
<span *ngIf="master.pd_status==pdStatusCheck.SCHEDULED" style="text-align:left">{{master.pd_status | titlecase}}</span> <small *ngIf="master.executive_name && master.centralofficer && master.fk_pd_type==2" style="text-align:left" matTooltip="PD Officer" matTooltipPosition="above">{{master.executive_name | titlecase}}/{{master.centralofficer | titlecase}}</small>
<span *ngIf="master.pd_status!=pdStatusCheck.SCHEDULED && master.pd_status!=pdStatusCheck.QC_COMPLETED " style="text-align:left">{{master.pd_status | titlecase}}</span> <small *ngIf="master.centralofficer && master.fk_pd_type==3" style="text-align:left" matTooltip="PD Officer" matTooltipPosition="above">{{master.centralofficer | titlecase}}</small> <br>
<span *ngIf="master.pd_status==pdStatusCheck.QC_COMPLETED " style="text-align:left">QC Completed</span>
</button>&nbsp;&nbsp;
<button *ngIf="currentPDStatus==pdStatusCheck.DRAFT && mandatoryFieldsValidations.length==0" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger" matTooltipPosition="above" (click)="directTriggerPD(mandatoryFieldsValidations,master.pd_id)"><mat-icon>flash_on</mat-icon></button>
<br>
<small *ngIf="master.pd_allocated_to && master.fk_pd_type==1" style="text-align:left" matTooltip="PD Officer" matTooltipPosition="above">{{master.pd_allocated_to | titlecase}}</small>
<small *ngIf="master.executive_name && master.centralofficer && master.fk_pd_type==2" style="text-align:left" matTooltip="PD Officer" matTooltipPosition="above">{{master.executive_name | titlecase}}/{{master.centralofficer | titlecase}}</small>
<small *ngIf="master.centralofficer && master.fk_pd_type==3" style="text-align:left" matTooltip="PD Officer" matTooltipPosition="above">{{master.centralofficer | titlecase}}</small> <br>
<small *ngIf="master.pd_status==pdStatusCheck.SCHEDULED">{{master.scheduled_on}}</small>
</div> <small *ngIf="master.pd_status==pdStatusCheck.SCHEDULED">{{master.scheduled_on}}</small>
</div>
</mat-card>
<!--< <h4>John Doe</h4>
<span>johndoe@johndoe.com</span>
p class="mt-xs mb-xs">Sr. Manager</p>
<a href="javascript:;" class="block mt-xs mb-xs">www.example.com</a>
<button mat-raised-button color="primary">Edit Profile</button>-->
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="70" fxFlex.xl="70" class="content-data">
<figure>
<mat-card-content style="padding:0px !important;">
<div fxLayout="row" class="ml-xs mr-xs">
<div fxFlex="100" style="text-align: right;">
<span *ngFor="let master of pdMasterData">
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master)"><mat-icon>verified_user</mat-icon></button>
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master)"><mat-icon>schedule</mat-icon></button>
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.TRIGGERED && currentPDStatus!=pdStatusCheck.DRAFT && enableStartPD" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(viewID)"><mat-icon>question_answer</mat-icon></button>
<button *ngIf="master.pd_type_name && currentPDStatus===pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="getPDIDReport(viewID)"><mat-icon>ballot</mat-icon></button>
</span>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button>
</div>
</div>
</mat-card-content>
<hr>
<mat-card-content>
<div *ngFor="let master of pdMasterData">
<div fxLayout="row" fxLayoutWrap="wrap" class="mb-3">
<div fxFlex="60">
<div fxLayout="row">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
<div fxFlex="10">
<span><i class="fa-1x fa fa-suitcase" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i></span>
</div>
<div fxFlex="90">
<span *ngIf="master.product_name"> {{master.product_name}}<span *ngIf="master.subproduct_name"> / {{master.subproduct_name}} </span></span>
</div>
</div>
</div>
<div fxLayout="row">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
<div fxFlex="10">
<span><i class="fa-1x fa fa-rupee" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i></span>
</div>
<div fxFlex="90">
<span *ngIf="master.loan_amount"> {{master.loan_amount}}</span>
</div>
</div>
</div>
<div fxLayout="row">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
<div fxFlex="10">
<span><i class="fa-1x fa fa-check-circle" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i></span>
</div>
<div fxFlex="90">
<span *ngIf="master.pd_type_name"> {{master.pd_type_name}}</span>
</div>
</div>
</div>
<div fxLayout="row">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
<div fxFlex="10">
<span><i class="fa-1x fa fa-map-marker" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i></span>
</div>
<div fxFlex="90">
<span *ngIf="master.state_name" class="hover-icon"> {{master.addressline1}},<br> {{master.city_name}},<br>{{master.state_name}}-{{master.pincode}} </span>
</div>
</div>
</div>
<!--<div fxLayout="row">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
<span><i class="fa-1x fa fa-suitcase" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i>&nbsp; {{master.addressline1}}</span>
</div>
</div>-->
</div>
<div fxFlex="40">
<div *ngIf="master.pd_contact_person || master.pd_contact_mobileno" style="background-color:#e3dbdb;padding:9px;">
<h4 class="ma-0" style="font-size:13px;padding-bottom:5px;color:red;"><span>Lender Contact Details</span></h4>
<div fxLayout="row">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
<span *ngIf="master.pd_contact_person"> <i class="fa-1x fa fa-user" style="padding: 8px 13px 8px 13px;border-bottom: 2px solid red;"></i>&nbsp; {{master.pd_contact_person}}</span>
</div>
</div>
<div fxLayout="row">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
<span *ngIf="master.pd_contact_mobileno"> <i class="fa-1x fa fa-phone" style="padding: 8px 13px 8px 13px;border-bottom: 2px solid red;"></i>&nbsp; {{master.pd_contact_mobileno}}</span>
</div>
</div>
</div>
<br>
<div fxLayout="row" *ngIf="master.remarks" style="background-color:#e3dbdb;padding:15px;">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
<h4 class="ma-0" style="font-size:13px;padding-bottom:5px;color:red;"><span> Remarks </span></h4>
<span>{{master.remarks}}</span>
</div>
</div>
<div fxLayout="row" class="cardEdit" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
<button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdMaster(master)"><mat-icon>edit</mat-icon></button>
</div>
</div>
</div>
</div>
</div>
</mat-card-content>
</figure>
</div>
</div>
</mat-card>
<mat-card class="p-2">
<h4>PD Details</h4>
<mat-tab-group class="mt-2">
<mat-tab>
<ng-template mat-tab-label>Applicants</ng-template>
<div class="cardEdit" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED">
<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 style="color:red !important;">Applicants</mat-card-title>
</mat-card-header>
<mat-card-content *ngIf="pdApplicantData.length>0; else noApplicant">
<mat-list *ngFor="let applicant of pdApplicantData">
<mat-list-item style="height:68px !important;">
<p><span *ngIf="applicant.applicant_name!=null" class="mb-2 text-center hover-icon">
<i class="fa-1x fa fa-user-o" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i>
&nbsp;{{applicant.applicant_name}}
</span> &nbsp;&nbsp;&nbsp;
<span *ngIf="applicant.mobile_no != '' && applicant.mobile_no != null" class="mb-2 text-center hover-icon">
<i class="fa-1x fa fa-phone" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i>
&nbsp;{{applicant.mobile_no}}
</span> &nbsp;&nbsp;&nbsp;
<span *ngIf="applicant.landline != '' && applicant.landline != 'null-null' && applicant.landline != null " class="mb-2 text-center hover-icon">
<i class="fa-1x fa fa-phone" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i>
&nbsp;{{applicant.landline}}
</span>
<span *ngIf="applicant.applicant_type=='1';else codetails" style="font-size:12px;">( Main Applicant )</span>
<ng-template #codetails><span> {{applicant.relation_name}} </span></ng-template>
</p>
</mat-list-item>
</mat-list>
</mat-card-content>
<ng-template #noApplicant>
<mat-card-content>
<p>No Applicant</p>
</mat-card-content>
</ng-template>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>Additional Requirements</ng-template>
<div class="cardEdit" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED">
<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 style="color:red !important;">Additional Requirements</mat-card-title>
</mat-card-header>
<mat-card-content *ngIf="pdAdditionalReqData.length>0; else noRequirement">
<mat-list *ngFor="let requirement of pdAdditionalReqData">
<mat-list-item>
<p>{{requirement.add_requirement}}</p>
</mat-list-item>
</mat-list>
</mat-card-content>
<ng-template #noRequirement>
<mat-card-content>
<p>No Additional Requirements</p>
</mat-card-content>
</ng-template>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>Documents</ng-template>
<div *ngIf="pdDocumentsData.length>0; else nodocument">
<mat-list *ngFor="let documents of pdDocumentsData">
<mat-list-item>
<!--<p><span><i class="fa-1x fa fa-file"></i> {{documents.pd_document_title}} </span></p> -->
<a href="{{documents.doc_url}}" target="_blank"><i class="fa-1x fa fa-file"></i> {{documents.pd_document_title}}</a>
<!-- <span class="mb-2 text-center hover-icon"> &nbsp;{{documents.pd_document_name}} </span> -->
</mat-list-item>
</mat-list>
</div> </div>
<ng-template #nodocument> </div>
<mat-card-content> </mat-card>
<p>No Document</p> <!--< <h4>John Doe</h4>
</mat-card-content> <span>johndoe@johndoe.com</span>
</ng-template> p class="mt-xs mb-xs">Sr. Manager</p>
</mat-tab> <a href="javascript:;" class="block mt-xs mb-xs">www.example.com</a>
<mat-tab> <button mat-raised-button color="primary">Edit Profile</button>-->
<ng-template mat-tab-label>QC Notes</ng-template> </div>
<div style="color:red !important;"> <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="70" fxFlex.xl="70" class="content-data">
<h6>QC Notes</h6> <figure>
</div> <mat-card-content style="padding:0px !important;">
<p>
{{ pdMasterData[0]?.qc_remarks}}</p> <div fxLayout="row" class="ml-xs mr-xs">
<div fxFlex="100" style="text-align: right;">
</mat-tab> <span *ngFor="let master of pdMasterData">
<mat-tab> <button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master)"><mat-icon>verified_user</mat-icon></button>
<ng-template mat-tab-label>QC Remarks</ng-template> <button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master)"><mat-icon>schedule</mat-icon></button>
<div *ngIf="pdMasterData[0]?.pd_status === 'QC_COMPLETED'" class="m-gap p-gap" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" <button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.TRIGGERED && currentPDStatus!=pdStatusCheck.DRAFT && enableStartPD" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(viewID)"><mat-icon>question_answer</mat-icon></button>
fxFlex.lg="100" fxFlex.xl="100"> <button *ngIf="master.pd_type_name && currentPDStatus===pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="getPDIDReport(viewID)"><mat-icon>ballot</mat-icon></button>
<div style="color:red !important;"> </span>
<h6>QC Remarks</h6> <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button>
</div> </div>
<div> </div>
<div style="display: inline-flex"> </mat-card-content>
<div style="margin: 12px; font-size: 21px;"> <hr>
{{ pdMasterData[0]?.qc_rating}} <mat-card-content>
</div> <div *ngFor="let master of pdMasterData">
<div style="display: inline-block"> <div fxLayout="row" fxLayoutWrap="wrap" class="mb-3">
<app-rating [rating]="pd_QC_Rating"></app-rating> <div fxFlex="60">
</div> <div fxLayout="row">
</div> <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
</div> <div fxFlex="10">
<br> <span><i class="fa-1x fa fa-suitcase" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i></span>
<div style="display: inline-block;"> </div>
{{ pdMasterData[0]?.qc_feedback}} <div fxFlex="90">
</div> <span *ngIf="master.product_name"> {{master.product_name}}<span *ngIf="master.subproduct_name"> / {{master.subproduct_name}} </span></span>
</div> </div>
</mat-tab> </div>
<mat-tab> </div>
<ng-template mat-tab-label>PD History</ng-template> <div fxLayout="row">
<div *ngIf="masterPdLogsData.length>0; else nohistory"> <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
<mat-list class="m-gap p-gap" *ngFor="let master of masterPdLogsData"> <div fxFlex="10">
<mat-list-item> <span><i class="fa-1x fa fa-rupee" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i></span>
<span style="font-size:15px;"><span style="color:#908f8f">{{master.time}}&nbsp;</span> </div>
<span style="color:#908f8f"> <i> {{master.user}} </i> </span><br> <span>{{master.log}}</span> </span> <div fxFlex="90">
<span *ngIf="master.loan_amount"> {{master.loan_amount}}</span>
</mat-list-item> </div>
</div>
</mat-list> </div>
<div fxLayout="row">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
<div fxFlex="10">
<span><i class="fa-1x fa fa-check-circle" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i></span>
</div>
<div fxFlex="90">
<span *ngIf="master.pd_type_name"> {{master.pd_type_name}}</span>
</div>
</div>
</div>
<div fxLayout="row">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
<div fxFlex="10">
<span><i class="fa-1x fa fa-map-marker" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i></span>
</div>
<div fxFlex="90">
<span *ngIf="master.state_name" class="hover-icon"> {{master.addressline1}},<br> {{master.city_name}},<br>{{master.state_name}}-{{master.pincode}} </span>
</div>
</div>
</div>
<!--<div fxLayout="row">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
<span><i class="fa-1x fa fa-suitcase" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i>&nbsp; {{master.addressline1}}</span>
</div>
</div>-->
</div> </div>
<ng-template #nohistory> <div fxFlex="40">
<mat-card-content> <div *ngIf="master.pd_contact_person || master.pd_contact_mobileno" style="background-color:#e3dbdb;padding:9px;">
<p>No History</p> <h4 class="ma-0" style="font-size:13px;padding-bottom:5px;color:red;"><span>Lender Contact Details</span></h4>
</mat-card-content>
</ng-template> <div fxLayout="row">
</mat-tab> <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
</mat-tab-group> <span *ngIf="master.pd_contact_person"> <i class="fa-1x fa fa-user" style="padding: 8px 13px 8px 13px;border-bottom: 2px solid red;"></i>&nbsp; {{master.pd_contact_person}}</span>
</mat-card> </div>
</mat-card-content> </div>
</mat-card> <div fxLayout="row">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
<span *ngIf="master.pd_contact_mobileno"> <i class="fa-1x fa fa-phone" style="padding: 8px 13px 8px 13px;border-bottom: 2px solid red;"></i>&nbsp; {{master.pd_contact_mobileno}}</span>
</div>
</div>
</div>
<br>
<div fxLayout="row" *ngIf="master.remarks" style="background-color:#e3dbdb;padding:15px;">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
<h4 class="ma-0" style="font-size:13px;padding-bottom:5px;color:red;"><span> Remarks </span></h4>
<span>{{master.remarks}}</span>
</div>
</div>
<div fxLayout="row" class="cardEdit" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
<button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdMaster(master)"><mat-icon>edit</mat-icon></button>
</div>
</div>
</div>
</div>
</div>
</mat-card-content>
</figure>
</div>
</div>
</mat-card>
<mat-card class="p-2">
<h4>PD Details</h4>
<mat-tab-group class="mt-2">
<mat-tab>
<ng-template mat-tab-label>Applicants</ng-template>
<!-- <div class="cardEdit" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED">
<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 style="color:red !important;">Applicants</mat-card-title>
</mat-card-header> -->
<mat-card-header>
<div fxFlex="70" align="left" style="padding: 10px !important; color:red !important;">
<mat-card-title>Applicants</mat-card-title>
</div>
<div fxFlex="30" align="end" style="padding: 10px !important;" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED">
<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-content *ngIf="pdApplicantData.length>0; else noApplicant">
<mat-list *ngFor="let applicant of pdApplicantData">
<mat-list-item style="height:68px !important;">
<p><span *ngIf="applicant.applicant_name!=null" class="mb-2 text-center hover-icon">
<i class="fa-1x fa fa-user-o" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i>
&nbsp;{{applicant.applicant_name}}
</span> &nbsp;&nbsp;&nbsp;
<span *ngIf="applicant.mobile_no != '' && applicant.mobile_no != null" class="mb-2 text-center hover-icon">
<i class="fa-1x fa fa-phone" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i>
&nbsp;{{applicant.mobile_no}}
</span> &nbsp;&nbsp;&nbsp;
<span *ngIf="applicant.landline != '' && applicant.landline != 'null-null' && applicant.landline != null " class="mb-2 text-center hover-icon">
<i class="fa-1x fa fa-phone" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i>
&nbsp;{{applicant.landline}}
</span>
<span *ngIf="applicant.applicant_type=='1';else codetails" style="font-size:12px;">( Main Applicant )</span>
<ng-template #codetails><span> {{applicant.relation_name}} </span></ng-template>
</p>
</mat-list-item>
</mat-list>
</mat-card-content>
<ng-template #noApplicant>
<mat-card-content>
<p>No Applicant</p>
</mat-card-content>
</ng-template>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>Additional Requirements</ng-template>
<!-- <div class="cardEdit" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED">
<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 style="color:red !important;">Additional Requirements</mat-card-title>
</mat-card-header> -->
<mat-card-header>
<div fxFlex="70" align="left" style="padding: 10px !important; color:red !important;">
<mat-card-title>Additional Requirements</mat-card-title>
</div>
<div fxFlex="30" align="end" style="padding: 10px !important;" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED">
<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-content *ngIf="pdAdditionalReqData.length>0; else noRequirement">
<mat-list *ngFor="let requirement of pdAdditionalReqData">
<mat-list-item>
<p>{{requirement.add_requirement}}</p>
</mat-list-item>
</mat-list>
</mat-card-content>
<ng-template #noRequirement>
<mat-card-content>
<p>No Additional Requirements</p>
</mat-card-content>
</ng-template>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>Documents</ng-template>
<div *ngIf="pdDocumentsData.length>0; else nodocument">
<mat-list *ngFor="let documents of pdDocumentsData">
<mat-list-item>
<!--<p><span><i class="fa-1x fa fa-file"></i> {{documents.pd_document_title}} </span></p> -->
<a href="{{documents.doc_url}}" target="_blank"><i class="fa-1x fa fa-file"></i> {{documents.pd_document_title}}</a>
<!-- <span class="mb-2 text-center hover-icon"> &nbsp;{{documents.pd_document_name}} </span> -->
</mat-list-item>
</mat-list>
</div>
<ng-template #nodocument>
<mat-card-content>
<p>No Document</p>
</mat-card-content>
</ng-template>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>QC Notes</ng-template>
<div style="color:red !important;">
<h6>QC Notes</h6>
</div>
<p>
{{ pdMasterData[0]?.qc_remarks}}</p>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>QC Remarks</ng-template>
<div *ngIf="pdMasterData[0]?.pd_status === 'QC_COMPLETED'" class="m-gap p-gap" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100"
fxFlex.lg="100" fxFlex.xl="100">
<div style="color:red !important;">
<h6>QC Remarks</h6>
</div>
<div>
<div style="display: inline-flex">
<div style="margin: 12px; font-size: 21px;">
{{ pdMasterData[0]?.qc_rating}}
</div>
<div style="display: inline-block">
<app-rating [rating]="pd_QC_Rating"></app-rating>
</div>
</div>
</div>
<br>
<div style="display: inline-block;">
{{ pdMasterData[0]?.qc_feedback}}
</div>
</div>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>PD History</ng-template>
<div *ngIf="masterPdLogsData.length>0; else nohistory">
<mat-list class="m-gap p-gap" *ngFor="let master of masterPdLogsData">
<mat-list-item>
<span style="font-size:15px;"><span style="color:#908f8f">{{master.time}}&nbsp;</span>
<span style="color:#908f8f"> <i> {{master.user}} </i> </span><br> <span>{{master.log}}</span> </span>
</mat-list-item>
</mat-list>
</div>
<ng-template #nohistory>
<mat-card-content>
<p>No History</p>
</mat-card-content>
</ng-template>
</mat-tab>
</mat-tab-group>
</mat-card>
</mat-card-content>
</mat-card>

View File

@ -30,6 +30,59 @@ export class ViewPdComponent implements OnInit, OnDestroy {
masterPdLogsData: any=[]; masterPdLogsData: any=[];
applicantPDLogsData: any=[]; applicantPDLogsData: any=[];
pdAdditionalReqData: any=[]; pdAdditionalReqData: any=[];
FilteredFieldNames : any=[];
localcount :any;
localstring : any;
localMandatoryFields: any=
[ {'backEnd_FieldName':"fk_lender_id",'frontEnd_FieldName':"Lender Name"},
{'backEnd_FieldName':"lender_applicant_id",'frontEnd_FieldName':"Loan Applicant ID"},
{'backEnd_FieldName':"fk_product_id",'frontEnd_FieldName':"Product Name"},
{'backEnd_FieldName':"fk_subproduct_id",'frontEnd_FieldName':"Sub Product Name"},
{'backEnd_FieldName':"fk_pd_type",'frontEnd_FieldName':"PD Type"},
{'backEnd_FieldName':"fk_customer_segment",'frontEnd_FieldName':"Customer Segment"},
{'backEnd_FieldName':"loan_amount",'frontEnd_FieldName':"Loan Amount"},
{'backEnd_FieldName':"addressline1",'frontEnd_FieldName':"Address at which PD is to be done"},
{'backEnd_FieldName':"fk_city",'frontEnd_FieldName':"City"},
{'backEnd_FieldName':"fk_state",'frontEnd_FieldName':"State"},
{'backEnd_FieldName':"pincode",'frontEnd_FieldName':"Pincode"},
{'backEnd_FieldName':"pd_contact_person",'frontEnd_FieldName':"Lender Contact Person"},
{'backEnd_FieldName':"pd_contact_mobileno",'frontEnd_FieldName':"Lender's Mobile Number"},
{'backEnd_FieldName':"pd_branch_id",'frontEnd_FieldName':"Branch"},
{'backEnd_FieldName':"pd_contact_landline",'frontEnd_FieldName':"Lender's Landline Number"}];
// localMandatoryFields: any=
// ['fk_lender_id',
// 'lender_applicant_id',
// 'fk_product_id',
// 'fk_subproduct_id',
// 'fk_pd_type',
// 'fk_customer_segment',
// 'loan_amount',
// 'addressline1',
// 'fk_city',
// 'fk_state',
// 'pincode',
// 'pd_contact_person',
// 'pd_contact_mobileno',
// 'pd_branch_id',
// 'pd_contact_landline'];
// localMandatoryFields2: any=
// [ "Lender Name",
// "Loan Applicant ID",
// "Product Name",
// "Sub Product Name",
// "PD Type",
// "Customer Segment",
// "Loan Amount",
// "Address at which PD is to be done",
// "City",
// "State",
// "Pincode",
// "Lender Contact Person",
// "Lender's Mobile Number",
// "Branch",
// "Lender's Landline Number"];
viewID:string; viewID:string;
viewParams:any; viewParams:any;
destroyType:number=1; destroyType:number=1;
@ -119,9 +172,18 @@ export class ViewPdComponent implements OnInit, OnDestroy {
width: '80%', width: '80%',
disableClose: true disableClose: true
}); });
dialogPDMaster.afterClosed() dialogPDMaster.afterOpen()
.subscribe(dataresult => { .subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!'); if(this.localcount == 1){
let ffd : any = [];
this.FilteredFieldNames.forEach(field => {
ffd.push(field.frontEnd_FieldName);
});
this.notifier.notify('info', 'Please Fill ' + ffd.join(',') + ' are Fields.!');
}
});
dialogPDMaster.afterClosed().subscribe(dataresult => {
this.viewPdDetails(this.viewID) this.viewPdDetails(this.viewID)
}); });
} }
@ -233,9 +295,26 @@ export class ViewPdComponent implements OnInit, OnDestroy {
} }
// direct trigger the pd // direct trigger the pd
directTriggerPD(data: any,pdid:string){ directTriggerPD(data: any,masterdetail : any){
/** */
let pdid = masterdetail.pd_id;
let getValues = data.filter(val =>val).map(Val => Val);
this.FilteredFieldNames = getValues.map(x => {
let findIndex = this.localMandatoryFields.map(val => val.backEnd_FieldName).indexOf(x);
return this.localMandatoryFields[findIndex];
});
if(data.length>0){ if(data.length>0){
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
// FilteredFieldNames.forEach(field => {
// });
this.localcount = 1;
this.editPdMaster(masterdetail);
// alert(this.localMandatoryFields);
} }
else { else {
let lenderMasterArray = { let lenderMasterArray = {
@ -276,4 +355,4 @@ export class ViewPdComponent implements OnInit, OnDestroy {
} }
} }