Fairoj : Trigger screen work and start pd module integrtion, spinner added
This commit is contained in:
parent
5ec65f4594
commit
5027ffa334
@ -4,7 +4,7 @@
|
||||
<div fxLayoutAlign="center">
|
||||
<mat-progress-spinner mode="indeterminate" class="primary"></mat-progress-spinner>
|
||||
</div>
|
||||
<p class="nocontent">Loading....</p>
|
||||
<p class="nocontent" style="text-align: center;">Loading....</p>
|
||||
</div>
|
||||
<form [formGroup]="_PDtriggerForm" *ngIf="loadControl">
|
||||
|
||||
@ -13,13 +13,24 @@
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above"
|
||||
(click)="loadPdListCompoent(cancelStatus)"><mat-icon>close</mat-icon></button>
|
||||
</div>
|
||||
|
||||
<mat-card>
|
||||
<div *ngIf="lenderShortName == 'MWISE'">
|
||||
<mat-card-header>
|
||||
<mat-card-title> Step 1 : -Excel Upload </mat-card-title>
|
||||
</mat-card-header>
|
||||
<div fxLayoutAlign="center" >
|
||||
<button [ngStyle.xs]="{'width':'100%'}" style="font-size: 1.5rem;width: 32%;" mat-raised-button color="primary" (click)="openExcelUploadModal()">
|
||||
Upload Excel <mat-icon>publish</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<br/>
|
||||
</div>
|
||||
<!-- [ngStyle]="{'background':lenderShortName == 'MWISE' ? 'gray' : ''}" -->
|
||||
<mat-card >
|
||||
<mat-card-header>
|
||||
<mat-card-title> PD Details </mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-form-field style="width: 28%">
|
||||
<mat-card-content fxLayout="row wrap" >
|
||||
<mat-form-field fxFlex="28%" fxFlex.xs="100%" *ngIf="lenderShortName !='MWISE'">
|
||||
<mat-select placeholder="Lender Name" formControlName="fk_lender_id" (selectionChange)="getContactPerson();getProCusType($event.value)">
|
||||
<!-- (selectionChange)="getBillingDetails(pdMain.fk_lender_id.value)" -->
|
||||
<mat-option> Select </mat-option>
|
||||
@ -28,7 +39,7 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 28%">
|
||||
<mat-form-field fxFlex="28%" fxFlex.xs="100%" *ngIf="lenderShortName !='MWISE'">
|
||||
<mat-select placeholder="Case Booked In" formControlName="sub_entity_id">
|
||||
<!-- (selectionChange)="getBillingDetails(pdMain.fk_lender_id.value)" -->
|
||||
<mat-option> Select </mat-option>
|
||||
@ -37,7 +48,7 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 28%">
|
||||
<mat-form-field fxFlex="28%" fxFlex.xs="100%">
|
||||
<mat-select placeholder="Branch" formControlName="pd_branch_id" (selectionChange)="getContactPerson()">
|
||||
<!-- (selectionChange)="getBillingDetails(pdMain.fk_lender_id.value)" -->
|
||||
<mat-option>
|
||||
@ -49,24 +60,24 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 28%">
|
||||
<mat-form-field fxFlex="28%" fxFlex.xs="100%">
|
||||
<input matInput autocomplete="off" placeholder=" Loan Application ID" formControlName="lender_applicant_id" type="text" (change)="checkExistPd($event.target.value,1)">
|
||||
<!-- <mat-error *ngIf="pdMain.lender_applicant_id.hasError('required')">Applicant ID Required</mat-error> -->
|
||||
</mat-form-field>
|
||||
<!-- <div *ngIf="sales_and_credit_enable"> -->
|
||||
<mat-form-field style="width: 28%" *ngIf="userDetails.short_name != 'IIB'">
|
||||
<mat-form-field fxFlex="28%" fxFlex.xs="100%" *ngIf="userDetails.short_name != 'IIB'">
|
||||
<mat-select placeholder="Lender Sales Person" formControlName="lender_sales_person">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let person of sales_and_credit_person.sales_person" [value]="person.userid">{{person.user_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 28%">
|
||||
<mat-form-field fxFlex="28%" fxFlex.xs="100%" *ngIf="lenderShortName != 'MWISE'">
|
||||
<mat-select placeholder="Lender Credit Person" formControlName="lender_credit_person">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let person of sales_and_credit_person.credit_person" [value]="person.userid">{{person.user_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 28%" *ngIf="sales_and_credit_enable">
|
||||
<mat-form-field fxFlex="28%" fxFlex.xs="100%" *ngIf="sales_and_credit_enable">
|
||||
<!-- <input matInput autocomplete="off" placeholder="Financial Institution" formControlName="imgc_fin_institute"> -->
|
||||
<mat-select placeholder="Financial Institution" formControlName="imgc_fin_institute">
|
||||
<mat-option>Select</mat-option>
|
||||
@ -75,16 +86,16 @@
|
||||
</mat-form-field><br/>
|
||||
<!-- </div> -->
|
||||
|
||||
<!-- <mat-form-field style="width: 28%">
|
||||
<!-- <mat-form-field fxFlex="28%" fxFlex.xs="100%">
|
||||
<input matInput autocomplete="off" placeholder="Lender Contact Person" formControlName="lender_contact_person" type="text" >
|
||||
<mat-error *ngIf="pdMain.lender_contact_person.hasError('required')">Lender Contact Person Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 28%">
|
||||
<mat-form-field fxFlex="28%" fxFlex.xs="100%">
|
||||
<input matInput autocomplete="off" placeholder="Lender's Mobile Number" formControlName="lender_contact_mobile" type="text" ForMobileNumbers maxlength="10" minlength="10">
|
||||
<mat-error *ngIf="pdMain.lender_contact_mobile.hasError('maxlength') || pdMain.lender_contact_mobile.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
|
||||
</mat-form-field> -->
|
||||
|
||||
<!--<mat-form-field style="width: 32%">
|
||||
<!--<mat-form-field fxFlex="32%">
|
||||
<input matInput autocomplete="off" placeholder="Lender Contact Number" formControlName="lender_contact_mobile" type="text" OnlyNumber maxlength="10" required>
|
||||
<mat-error *ngIf="pdMain.lender_contact_mobile.hasError('pattern') || pdMain.lender_contact_mobile.hasError('maxlength') || pdMain.lender_contact_mobile.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
|
||||
</mat-form-field>-->
|
||||
@ -98,7 +109,7 @@
|
||||
<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 style="width: 28%">
|
||||
<mat-form-field fxFlex="28%" fxFlex.xs="100%">
|
||||
<mat-select placeholder="Product Name" formControlName="fk_product_id" (selectionChange)="getSubproductList(pdMain.fk_product_id.value)">
|
||||
<mat-option>
|
||||
Select
|
||||
@ -111,7 +122,7 @@
|
||||
<!-- <mat-error *ngIf="pdMain.fk_product_id.hasError('required')">Product Required.</mat-error> -->
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="isSubproductShown" style="width: 28%">
|
||||
<mat-form-field *ngIf="isSubproductShown" fxFlex="28%" fxFlex.xs="100%">
|
||||
|
||||
<mat-select placeholder="Sub Product Name" formControlName="fk_subproduct_id">
|
||||
<mat-option>Select</mat-option>
|
||||
@ -123,7 +134,7 @@
|
||||
|
||||
</mat-form-field>
|
||||
<!-- {{customerSegmentList | json}} -->
|
||||
<mat-form-field style="width: 28%">
|
||||
<mat-form-field fxFlex="28%" fxFlex.xs="100%">
|
||||
<mat-select placeholder="Customer Segment" formControlName="fk_customer_segment" (selectionChange)="cusSegChange($event.value)">
|
||||
<mat-option>
|
||||
Select
|
||||
@ -135,7 +146,7 @@
|
||||
<!-- <mat-error *ngIf="pdMain.fk_customer_segment.hasError('required')">Customer Segment Required.</mat-error> -->
|
||||
</mat-form-field>
|
||||
<!-- {{pdMain.fk_customer_segment.value}} -->
|
||||
<!-- <mat-form-field style="width: 28%">
|
||||
<!-- <mat-form-field fxFlex="28%" fxFlex.xs="100%">
|
||||
<mat-select placeholder="PD Type" formControlName="fk_pd_type">
|
||||
<mat-option>
|
||||
Select
|
||||
@ -148,8 +159,9 @@
|
||||
|
||||
|
||||
</mat-form-field> -->
|
||||
<mat-form-field style="width: 60%">
|
||||
<input matInput autocomplete="off" placeholder="Loan Amount" formControlName="loan_amount" OnlyNumber required autocomplete="off">
|
||||
<mat-form-field fxFlex="60%%" fxFlex.xs="100%">
|
||||
<mat-label>{{lenderShortName == 'MWISE' ? "Loan amount applied for (Rs)" :'Loan Amount'}}</mat-label>
|
||||
<input matInput autocomplete="off" formControlName="loan_amount" OnlyNumber required autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="pdMain.loan_amount.value">{{"₹"}} {{pdMain.loan_amount.value | numberToWords}} Only</mat-hint>
|
||||
<!-- <mat-error *ngIf="pdMain.loan_amount.hasError('required')">Amount Required.</mat-error> -->
|
||||
<mat-error *ngIf="pdMain.loan_amount.hasError('pattern')">Enter valid amount. </mat-error>
|
||||
@ -162,15 +174,15 @@
|
||||
<mat-card-title>Address Details</mat-card-title>
|
||||
</mat-card-header>
|
||||
<div formArrayName="addresses" *ngFor="let addresses of pdAddresses.controls; let i = index;">
|
||||
<mat-card-content [formGroupName]="i">
|
||||
<mat-form-field style="width: 96%">
|
||||
<mat-card-content [formGroupName]="i" fxLayout="row wrap" fxLayout.xs="column">
|
||||
<mat-form-field fxFlex="100%">
|
||||
<textarea matInput autocomplete="off" placeholder="Address at which PD is to be done" formControlName="addressline1"
|
||||
[value]="addresses.get('addressline1').value | titlecase"></textarea>
|
||||
<!-- oninput="this.value = this.value.toUpperCase()" -->
|
||||
<!-- <mat-error *ngIf="pdAddresses.addressline1.hasError('required')">Address1 required.</mat-error> -->
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 32%">
|
||||
<mat-form-field fxFlex="32%">
|
||||
<mat-select placeholder="State" formControlName="fk_state" (selectionChange)="getCityList($event.value,i)">
|
||||
<mat-option>
|
||||
<ngx-mat-select-search formControlName="stateSearch" (keyup)="searchFun(addresses,i,'state')"
|
||||
@ -185,7 +197,7 @@
|
||||
</mat-select>
|
||||
<!-- <mat-error *ngIf="pdAddresses.fk_state.hasError('required')">State Required.</mat-error> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 32%">
|
||||
<mat-form-field fxFlex="32%">
|
||||
<mat-select placeholder="City" formControlName="fk_city">
|
||||
<mat-option>
|
||||
<ngx-mat-select-search formControlName="citySearch" (keyup)="searchFun(addresses,i,'city')"
|
||||
@ -199,7 +211,7 @@
|
||||
<!-- <mat-error *ngIf="pdAddresses.fk_city.hasError('required')">City Required.</mat-error> -->
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 24%">
|
||||
<mat-form-field fxFlex="24%">
|
||||
<mat-select placeholder="Pincode" formControlName="pincode" (selectionChange)="getPincode($event.value,i)">
|
||||
<mat-option>
|
||||
<ngx-mat-select-search formControlName="pinSearch" (keyup)="searchFun(addresses,i,'pin')"
|
||||
@ -210,7 +222,7 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 24%" *ngIf="pincodeflag[i]">
|
||||
<mat-form-field fxFlex="24%" *ngIf="pincodeflag[i]">
|
||||
<!-- *ngIf="pdAddresses.pincode.value == 1" -->
|
||||
<input matInput autocomplete="off" placeholder="Specify Pincode" formControlName="other_pincode" OnlyNumber>
|
||||
<!-- <mat-error *ngIf="pdAddresses.other_pincode.hasError('maxlength') || pdMain.other_pincode.hasError('minlength')">Enter Valid Pincode. </mat-error> -->
|
||||
@ -235,9 +247,9 @@
|
||||
<mat-card-header>
|
||||
<mat-card-title>Applicant Details</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<h5>Applicant 1</h5>
|
||||
<mat-form-field style="width: 12%">
|
||||
<mat-card-content fxLayout="row wrap" fxLayout.xs="column">
|
||||
<h5 fxFlex="100%">Applicant 1</h5><br/>
|
||||
<mat-form-field fxFlex="12%" fxFlex.xs="100%">
|
||||
<mat-select placeholder="Title" formControlName="applicant_title_name">
|
||||
<mat-option *ngFor="let tl of titleList" [value]="tl.title_id">
|
||||
{{tl.name}}
|
||||
@ -245,40 +257,40 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 38%">
|
||||
<mat-form-field fxFlex="38%" fxFlex.xs="100%">
|
||||
<input matInput autocomplete="off" placeholder="Name of Individual Applicant" formControlName="applicant_name"
|
||||
[value]="pdMain.applicant_name.value | titlecase" (change)="checkExistPd($event.target.value,2)">
|
||||
<!-- <mat-error *ngIf="pdMain.applicant_name.hasError('required')">Name is Required.</mat-error> -->
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 38%" *ngIf="pdMain.fk_customer_segment.value != '8'">
|
||||
<mat-form-field fxFlex="38%" fxFlex.xs="100%" *ngIf="pdMain.fk_customer_segment.value != '8'">
|
||||
<input matInput autocomplete="off" [placeholder]="cus_abbr_value == 'SEP_INDV' ? 'Nature of Service' : 'Company / Firm Name'" formControlName="company_name" type="text">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 38%">
|
||||
<mat-form-field fxFlex="38%" fxFlex.xs="100%">
|
||||
<input matInput autocomplete="off" placeholder="Mobile Number" formControlName="mobile_no" type="text" ForMobileNumbers maxlength="10" minlength="10" (change)="checkExistPd($event.target.value,2)">
|
||||
<mat-error *ngIf="pdMain.mobile_no.hasError('required')">Mobile No is Required . </mat-error>
|
||||
<mat-error *ngIf="pdMain.mobile_no.hasError('maxlength') || pdMain.mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 12%">
|
||||
<mat-form-field fxFlex="12%" fxFlex.xs="100%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="applicant_stdcode" type="text" ForMobileNumbers maxlength="5">
|
||||
<mat-error *ngIf="pdMain.applicant_stdcode.hasError('maxlength') || pdMain.applicant_stdcode.hasError('minlength')">Enter Valid STD Code Number. </mat-error>
|
||||
</mat-form-field> -
|
||||
<mat-form-field style="width: 22%">
|
||||
<mat-form-field fxFlex="22%" fxFlex.xs="100%">
|
||||
<input matInput autocomplete="off" placeholder="Landline Number" formControlName="applicant_landline" type="text" ForMobileNumbers maxlength="8">
|
||||
<mat-error *ngIf="pdMain.applicant_landline.hasError('maxlength') || pdMain.applicant_landline.hasError('minlength')">Enter Valid LandLine Number. </mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<div formArrayName="coapplicants" *ngFor="let coDetails of pdCoApplicant.controls; let i = index;">
|
||||
<div formArrayName="coapplicants">
|
||||
|
||||
<div class="row" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||
|
||||
<!-- <div class="row" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100"> -->
|
||||
<div *ngFor="let coDetails of pdCoApplicant.controls; let i = index;" fxLayout="row wrap" fxLayout.xs="column" [formGroupName]="i">
|
||||
|
||||
<h5>{{coDetails.controls.label.value}} {{i+2}}</h5>
|
||||
<h5 fxFlex="100%">{{coDetails.controls.label.value}} {{i+2}}</h5><br/>
|
||||
|
||||
<div [formGroupName]="i">
|
||||
<mat-form-field style="width: 12%">
|
||||
|
||||
<mat-form-field fxFlex="12%" fxFlex.xs="100%">
|
||||
<mat-select placeholder="Title" formControlName="applicant_title_name">
|
||||
<mat-option *ngFor="let tl of titleList" [value]="tl.title_id">
|
||||
{{tl.name}}
|
||||
@ -286,13 +298,13 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 38%">
|
||||
<mat-form-field fxFlex="38%" fxFlex.xs="100%">
|
||||
<input matInput autocomplete="off" placeholder="Name of Individual Applicant" formControlName="coapplicant_name" type="text"
|
||||
[value]="coDetails['controls'].coapplicant_name.value | titlecase" required>
|
||||
<!-- <mat-error *ngIf="pdMain.applicant_name.hasError('required')">Name is Required.</mat-error> -->
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 38%" *ngIf="pdMain.fk_customer_segment.value != '8'">
|
||||
<mat-form-field fxFlex="38%" fxFlex.xs="100%" *ngIf="pdMain.fk_customer_segment.value != '8'">
|
||||
<input matInput autocomplete="off" [placeholder]="cus_abbr_value == 'SEP_INDV' ? 'Nature of Service' : 'Company / Firm Name'" formControlName="company_name" type="text">
|
||||
</mat-form-field>
|
||||
|
||||
@ -300,24 +312,25 @@
|
||||
<input matInput placeholder="Name" formControlName="coapplicant_name" type="text" required>
|
||||
</mat-form-field> -->
|
||||
|
||||
<mat-form-field style="width: 38%">
|
||||
<mat-form-field fxFlex="38%" fxFlex.xs="100%">
|
||||
<input matInput placeholder="Mobile Number" formControlName="coapplicant_mobile_no" type="text" maxlength="10" ForMobileNumbers>
|
||||
<mat-error *ngIf="coDetails['controls'].coapplicant_mobile_no.hasError('maxlength') || coDetails['controls'].coapplicant_mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 12%">
|
||||
<mat-form-field fxFlex="12%" fxFlex.xs="100%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="coapplicant_stdcode" type="text" maxlength="5" ForMobileNumbers>
|
||||
<mat-error *ngIf="coDetails['controls'].coapplicant_stdcode.hasError('maxlength') || coDetails['controls'].coapplicant_stdcode.hasError('minlength')">Enter Valid STD Code. </mat-error>
|
||||
</mat-form-field> -
|
||||
<mat-form-field style="width: 22%">
|
||||
<mat-form-field fxFlex="22%" fxFlex.xs="100%">
|
||||
<input matInput autocomplete="off" placeholder="Landline Number" formControlName="coapplicant_landline" type="text" maxlength="8" ForMobileNumbers>
|
||||
<mat-error *ngIf="coDetails['controls'].coapplicant_landline.hasError('maxlength') || coDetails['controls'].coapplicant_landline.hasError('minlength')">Enter Valid Landline Number. </mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
<div align="end" >
|
||||
<button mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="removeCoApplicant(i)" type="button"><mat-icon>delete</mat-icon></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<!-- Phone field to be split into 2 parts. Mobile Number mandatory and optional land line number with std code. ---->
|
||||
</mat-card-content>
|
||||
@ -327,7 +340,7 @@
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
|
||||
<mat-card>
|
||||
<mat-card *ngIf="lenderShortName != 'MWISE'">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Credit Manager’s Specific Queries</mat-card-title>
|
||||
</mat-card-header>
|
||||
@ -351,7 +364,7 @@
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
|
||||
<mat-card>
|
||||
<mat-card *ngIf="lenderShortName != 'MWISE'">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Documents to be collected</mat-card-title>
|
||||
</mat-card-header>
|
||||
@ -375,7 +388,7 @@
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
|
||||
<mat-card formArrayName="documents">
|
||||
<mat-card formArrayName="documents" *ngIf="lenderShortName != 'MWISE'">
|
||||
<mat-card-header>
|
||||
<mat-card-title>
|
||||
Document
|
||||
|
||||
@ -13,6 +13,8 @@ import Swal from 'sweetalert2';
|
||||
import { UserService } from 'app/settings/service/user.service';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { Subject } from 'rxjs';
|
||||
import { MatDialog } from '@angular/material';
|
||||
import { ExcelUploadDialogComponent } from './excel-upload-dialog/excel-upload-dialog.component';
|
||||
@Component({
|
||||
selector: 'app-add-pd',
|
||||
templateUrl: './add-pd.component.html',
|
||||
@ -70,9 +72,10 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
pincodeData: any=[];
|
||||
billingtolist: any;
|
||||
removedControl: any = [];
|
||||
excel_file_id: any = null;
|
||||
constructor(notifier: NotifierService, private _fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router, private _pd: PdTrigerService, private _aws: AwsService, private ListPdComponent: ListPdComponent,
|
||||
private titleCase : TitleCasePipe,private userService:UserService) {
|
||||
private titleCase : TitleCasePipe,private userService:UserService,private matDialog:MatDialog) {
|
||||
this.notifier = notifier;
|
||||
this.disableAfterSubmit = false;
|
||||
}
|
||||
@ -159,7 +162,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
pd_branch_id: [null],
|
||||
lender_applicant_id: [null, Validators.compose([Validators.required])],
|
||||
lender_sales_person:[null],
|
||||
lender_credit_person:[{value:this.userDetails.userid,disabled:false} || ''],
|
||||
lender_credit_person:[{value:this.lenderShortName != 'MWISE' ? this.userDetails.userid : '',disabled:false} || ''],
|
||||
imgc_fin_institute:[null],
|
||||
// lender_contact_person: [null],
|
||||
// lender_contact_mobile: [null, Validators.compose([Validators.minLength(10), Validators.maxLength(12), Validators.pattern('^[0-9]*$')])],
|
||||
@ -214,6 +217,9 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
// console.log('lender',lender);
|
||||
this.lenderBranchList = temp_lender['branches'];
|
||||
this.lenderShortName = temp_lender['short_name'];
|
||||
if(this.lenderShortName == 'MWISE') {
|
||||
this._PDtriggerForm.controls['lender_credit_person'].setValue('')
|
||||
}
|
||||
// console.log(this.lenderShortName);
|
||||
this._PDtriggerForm.controls.pd_branch_id.setValue(null);
|
||||
|
||||
@ -735,7 +741,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
"lender_applicant_id": formValue.lender_applicant_id,
|
||||
"pd_branch_id": formValue.pd_branch_id,
|
||||
"lender_sales_person":formValue.lender_sales_person,
|
||||
"lender_credit_person":this._PDtriggerForm.controls['lender_credit_person'].value,
|
||||
"lender_credit_person":this.lenderShortName != 'MWISE' ? this._PDtriggerForm.controls['lender_credit_person'].value : '',
|
||||
"imgc_fin_institute":formValue.imgc_fin_institute,
|
||||
// "pd_contact_person": formValue.lender_contact_person,
|
||||
// "pd_contact_mobileno": formValue.lender_contact_mobile,
|
||||
@ -753,6 +759,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
"remarks": formValue.remarks,
|
||||
"pd_status": status,
|
||||
"fk_createdby": this._aws.getlocale(),
|
||||
"excel_file_id":this.excel_file_id
|
||||
};
|
||||
|
||||
|
||||
@ -1111,4 +1118,30 @@ searchFun(control:any,i:number,option){
|
||||
// this.stateList.filter(res => res.state_name.toLowerCase().indexOf(searchVal) > -1)
|
||||
// )
|
||||
}
|
||||
openExcelUploadModal() {
|
||||
const dialogRef = this.matDialog.open(ExcelUploadDialogComponent,{
|
||||
minWidth:'30vw',
|
||||
maxWidth:'75vw'
|
||||
})
|
||||
dialogRef.afterClosed().subscribe(result=>{
|
||||
this.excel_file_id = result.excel_file_id
|
||||
console.log(result,JSON.stringify(result));
|
||||
let formValues = {}
|
||||
let records = result.records
|
||||
if(records && records.length > 0) {
|
||||
records.forEach(val=>{
|
||||
if(val) {
|
||||
if(val.key_name == "fk_customer_segment") {
|
||||
let temp = this.customerSegmentList.filter(vv=>(vv.abbr).split(' ').join('') == (val.value).split(' ').join('') )
|
||||
if(temp && temp.length > 0 && temp[0].customer_segment_id) {
|
||||
val.value = temp[0].customer_segment_id
|
||||
}
|
||||
}
|
||||
formValues[val.key_name] = val.value
|
||||
}
|
||||
})
|
||||
this._PDtriggerForm.patchValue(formValues)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
<div fxLayout="row" fxLayoutAlign="center">
|
||||
<p style="color: red;margin: 0;">Allowed Format .xls, .xlsx</p>
|
||||
</div>
|
||||
<div fxLayout="row">
|
||||
<label class="custom-file-upload">
|
||||
<input type="file" id='excel-upload' accept=".xlsx, .xls" multiple="false"
|
||||
(change)="inputExcelOnClick($event)" />
|
||||
Choose Excel File
|
||||
</label>
|
||||
</div>
|
||||
<div fxLayout="row" *ngIf="sheetJsExcelName">
|
||||
<p style="font-size: 17px;font-weight: bold;white-space: pre-wrap;
|
||||
overflow: hidden;
|
||||
word-break: break-all;">{{sheetJsExcelName}}</p>
|
||||
</div>
|
||||
<div align="end" style="margin-top: 10px;">
|
||||
<button [disabled]="!sheetJsExcelName || !sheetBufferRender" mat-raised-button color="primary" (click)="uploadExcel()">Upload</button>
|
||||
</div>
|
||||
@ -0,0 +1,9 @@
|
||||
input[type="file"] {
|
||||
display: none;
|
||||
}
|
||||
.custom-file-upload {
|
||||
border: 1px solid #ccc;
|
||||
display: inline-block;
|
||||
padding: 6px 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ExcelUploadDialogComponent } from './excel-upload-dialog.component';
|
||||
|
||||
describe('ExcelUploadDialogComponent', () => {
|
||||
let component: ExcelUploadDialogComponent;
|
||||
let fixture: ComponentFixture<ExcelUploadDialogComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ExcelUploadDialogComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ExcelUploadDialogComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,86 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { MatDialogRef, MatSnackBar } from '@angular/material';
|
||||
import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service';
|
||||
import { LoaderService } from 'app/shared/loaderService/loader.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-excel-upload-dialog',
|
||||
templateUrl: './excel-upload-dialog.component.html',
|
||||
styleUrls: ['./excel-upload-dialog.component.scss']
|
||||
})
|
||||
export class ExcelUploadDialogComponent implements OnInit {
|
||||
sheetJsExcelName: any;
|
||||
sheetBufferRender: File;
|
||||
|
||||
constructor(private snackBar:MatSnackBar,private loaderService:LoaderService,private _pdService:PdTrigerService,
|
||||
private dialogRef:MatDialogRef<ExcelUploadDialogComponent>) { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
inputExcelOnClick(evt) {
|
||||
const target: HTMLInputElement = evt.target;
|
||||
if (target.files.length === 0) {
|
||||
this.openSnackBar("No files Choosen",'')
|
||||
this.sheetJsExcelName = ''
|
||||
throw new Error('未上傳');
|
||||
}
|
||||
if (target.files.length > 1) {
|
||||
this.openSnackBar("Please Upload Single Excel File",'')
|
||||
this.sheetJsExcelName = ''
|
||||
throw new Error('Cannot use multiple files');
|
||||
}
|
||||
let is_excel = this.checkFileExtension(evt.target.files.item(0).name)
|
||||
if(!is_excel) {
|
||||
this.openSnackBar("Please Upload the file with allowed format .xls or .xlsx",'')
|
||||
return
|
||||
}
|
||||
this.sheetJsExcelName = evt.target.files.item(0).name;
|
||||
|
||||
const reader: FileReader = new FileReader();
|
||||
// this.readerExcel(reader);
|
||||
reader.readAsArrayBuffer(target.files[0]);
|
||||
this.sheetBufferRender = target.files[0];
|
||||
console.log(this.sheetJsExcelName,this.sheetBufferRender)
|
||||
// this.isEmptyDrop = false;
|
||||
// this.isExcelDrop = true;
|
||||
}
|
||||
checkFileExtension(uploadpath) {
|
||||
var fileExtension = uploadpath.substring(uploadpath.lastIndexOf(".") + 1, uploadpath.length);
|
||||
if (fileExtension == "xls" || fileExtension == "xlsx") {
|
||||
//write code for success
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
//error code - select only excel files
|
||||
return false;
|
||||
}
|
||||
}
|
||||
openSnackBar(message: string, action: string) {
|
||||
this.snackBar.open(message, action, {
|
||||
duration: 2000,
|
||||
});
|
||||
}
|
||||
uploadExcel() {
|
||||
console.log("clicked")
|
||||
if(!this.sheetBufferRender || !this.sheetJsExcelName) {
|
||||
this.openSnackBar("File is missing please choose the file again",'')
|
||||
return;
|
||||
}
|
||||
this.loaderService.showMatSpinnerDialog("Upload is in progress.. Please wait..")
|
||||
this._pdService.uploadSMCDataFile(this.sheetBufferRender).subscribe(res=>{
|
||||
if(res['dataStatus']) {
|
||||
this.dialogRef.close(res)
|
||||
}
|
||||
else{
|
||||
this.openSnackBar("Something went wrong",'')
|
||||
}
|
||||
this.loaderService.closeMatSpinnerDialog()
|
||||
},err=>{
|
||||
this.loaderService.closeMatSpinnerDialog()
|
||||
console.log(err)
|
||||
this.openSnackBar("Network Error",'')
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { StartPdComponent } from './start-pd.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path:'',
|
||||
component:StartPdComponent
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class StartPdRoutingModule { }
|
||||
@ -0,0 +1,36 @@
|
||||
<mat-card class="parent_mat_card">
|
||||
<mat-card-header>
|
||||
<mat-card-title>
|
||||
<div fxFlex="33" align="left">
|
||||
<h4 class="mt-0">{{mainApplicantName}}</h4>
|
||||
<small>{{pdMasterList.customer_segment_name}}</small>
|
||||
</div>
|
||||
<div fxFlex="66" align="end">
|
||||
<h4 class="mt-0">{{pdMasterList.product_name}}<span *ngIf="pdMasterList.subproduct_name">/{{pdMasterList.subproduct_name}}</span>
|
||||
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Close" matTooltipPosition="above"
|
||||
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>
|
||||
</h4>
|
||||
<small style="padding-right: 6.5% !important;">{{pdMasterList.lender_full_name}}<span *ngIf="pdMasterList.lender_applicant_id">/{{pdMasterList.lender_applicant_id}}</span></small>
|
||||
</div>
|
||||
</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content style="max-height:100% !important;">
|
||||
<div fxLayout="row wrap" class="child_mat_card">
|
||||
<mat-card fxFlex.xs="80" fxFlex.sm="45" fxFlex.md="32" fxFlex.lg="32" fxFlex.xl="33" *ngFor="let formButton of categoryFormButtons;let quesIndex=index" [ngStyle]="{'background-color':formButton.isAnswered == false ? '#fff' : '#4caf50' ,'color':'#fff'}" (click)="OnSelectDirectForms(formButton)">
|
||||
<mat-card-header>
|
||||
<span style="padding: 17px 14px 3px 15px !important;border-radius: 0px 0px 0px 15px!important;width: 50px !important;" class="menu-badge mat-purple ng-star-inserted" align="center">{{quesIndex+1}}</span>
|
||||
<div fxFlex="100" align="left" style="padding:15px !important;">
|
||||
{{ formButton.form_name }}
|
||||
</div>
|
||||
<!--<div fxFlex="20" align="end">
|
||||
<span style="padding: 2px 9px 3px 9px !important;" class="menu-badge mat-purple ng-star-inserted" align="center">{{quesIndex+1}}</span>
|
||||
</div> -->
|
||||
</mat-card-header>
|
||||
</mat-card>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="end">
|
||||
<button matTooltip="Complete Discussion" matTooltipPosition="above" [disabled]="actualQuestions==0 || actualQuestions!=answeredQuestions || currentPDStatus===false" mat-raised-button color="primary" (click)="pdStatusDialogue(pdStatusCheck.COMPLETED,2);"><span>{{currentPDStatus === true ? 'COMPLETE':'COMPLETED' }}</span></button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
<notifier-container></notifier-container>
|
||||
@ -0,0 +1,84 @@
|
||||
// .child_mat_card mat-card {
|
||||
// margin: 2 0%;
|
||||
// }
|
||||
::ng-deep .mat-dialog-container{
|
||||
overflow: hidden !important;
|
||||
}
|
||||
::ng-deep .mat-card-header-text{
|
||||
margin:0px !important;
|
||||
}
|
||||
.mat-purple{
|
||||
background-color: gray !important;
|
||||
}
|
||||
.cdk-global-overlay-wrapper{
|
||||
justify-content: center !important;
|
||||
}
|
||||
mat-card.parent_mat_card > {
|
||||
mat-card-header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
mat-card-content {
|
||||
min-height:auto;
|
||||
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;
|
||||
// overflow: auto;
|
||||
// }
|
||||
// }
|
||||
// @media only screen and (min-width:320px) and (max-width:767px) {
|
||||
// mat-card-content {
|
||||
// max-height: 350px;
|
||||
// overflow: auto;
|
||||
// }
|
||||
// }
|
||||
// @media only screen and (min-width:768px) and (max-width:1023px) {
|
||||
// mat-card-content {
|
||||
// max-height: 350px;
|
||||
// overflow: auto;
|
||||
// }
|
||||
// }
|
||||
// @media only screen and (min-width:1024px) and (max-width:1899px) {
|
||||
// mat-card-content {
|
||||
// max-height: 400px;
|
||||
// overflow: auto;
|
||||
// }
|
||||
// }
|
||||
// @media only screen and (min-width:1900px) {
|
||||
// mat-card-content {
|
||||
// max-height: 500px;
|
||||
// overflow: auto;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
$base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important;
|
||||
mat-card .child_mat_card > mat-card {
|
||||
border-radius: 0px 0px 0px 15px;
|
||||
box-shadow: $base-card-box-shadow;
|
||||
transform: scale(0.95);
|
||||
transition: box-shadow 0.5s, transform 0.5s;
|
||||
border: 1px solid lavender;
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
// background-color: #e00201 !important;
|
||||
transform: scale(1);
|
||||
box-shadow: 5px 20px 30px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { StartPdComponent } from './start-pd.component';
|
||||
|
||||
describe('StartPdComponent', () => {
|
||||
let component: StartPdComponent;
|
||||
let fixture: ComponentFixture<StartPdComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ StartPdComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(StartPdComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,542 @@
|
||||
import {Component, OnInit, ViewEncapsulation, OnDestroy} from '@angular/core';
|
||||
import {FormBuilder} from '@angular/forms';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {MatDialog } from '@angular/material';
|
||||
import {NotifierService} from 'angular-notifier';
|
||||
import {ListPdComponent} from './../list-pd.component';
|
||||
import {PdTrigerService} from '../../../pd-service/pd-triger.service';
|
||||
import { PdStatusChangeDialogueComponent } from '../pd-status-change-dialogue/pd-status-change-dialogue.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-start-pd',
|
||||
templateUrl: './start-pd.component.html',
|
||||
styleUrls: ['./start-pd.component.scss']
|
||||
})
|
||||
export class StartPdComponent implements OnInit, OnDestroy {
|
||||
public startPD: string;
|
||||
public mainApplicantName: string;
|
||||
public randomString: string;
|
||||
//public remarks: string;
|
||||
errorMessage: any;
|
||||
selectedCategory: any = [];
|
||||
categoryList: any = [];
|
||||
pdMasterList: any = [];
|
||||
pdFullDetails:any=[];
|
||||
|
||||
// category static form buttons
|
||||
categoryFormButtons: any;
|
||||
formsCategoryEnable: boolean = false;
|
||||
selectedFormsCategory: any;
|
||||
// create values for status check
|
||||
pdStatusCheck: any = {
|
||||
"DRAFT": 'DRAFT',
|
||||
"TRIGGERED": 'TRIGGERED',
|
||||
"ALLOCATED": 'ALLOCATED',
|
||||
"SCHEDULED": 'SCHEDULED',
|
||||
"INPROGRESS": 'INPROGRESS',
|
||||
"COMPLETED": 'COMPLETED',
|
||||
"QC_COMPLETED": 'QC_COMPLETED',
|
||||
};
|
||||
currentPDStatus: boolean;
|
||||
actualQuestions: number;
|
||||
answeredQuestions: number;
|
||||
private notifier: NotifierService;
|
||||
vendor_status_arr: any = [];
|
||||
|
||||
constructor(notifier: NotifierService, private dialog: MatDialog, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private listPDComponent: ListPdComponent, private _pd: PdTrigerService) {
|
||||
this.startPD = this.route.snapshot.params['pdid'];
|
||||
this.randomString = this.route.snapshot.params['rdmstr'];
|
||||
// console.log(this.route.snapshot.params['pdid'],this.route.snapshot.params['rdmstr']);
|
||||
this.notifier = notifier;
|
||||
this.currentPDStatus = false;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
// start
|
||||
|
||||
// end
|
||||
this.listPDComponent.showListView(false);
|
||||
const elemSidebar = <HTMLElement>document.querySelector('.app-inner .mail-sidebar');
|
||||
const elemContent = <HTMLElement>document.querySelector('.app-inner .main-content');
|
||||
|
||||
if (window.matchMedia(`(min-width: 960px)`).matches && !this.isMac()) {
|
||||
// Ps.initialize(elemSidebar, { wheelSpeed: 2, suppressScrollX: true });
|
||||
// Ps.initialize(elemContent, { wheelSpeed: 2, suppressScrollX: true });
|
||||
}
|
||||
this.loadTemplates(this.startPD,1,this.randomString);
|
||||
// this.getCreditPDTemplate();
|
||||
|
||||
|
||||
}
|
||||
// getCreditPDTemplate() {
|
||||
// // let params = { "fk_entity_id":this.pddetails.fk_lender_id,"fk_product_id":this.pddetails.fk_product_id,"pd_form_id":this.pddetails.pd_id }
|
||||
// let params = { "fk_entity_id":"","fk_product_id":"","pd_form_id":"24","fk_pd_id": this.startPD }
|
||||
// this._pd.loadCreditPDTemplate(params).subscribe(result=> {
|
||||
// let creditTemplate:any = null;
|
||||
// if(result['dataStatus']) {
|
||||
// if(result.hasOwnProperty('records') && result['records']) {
|
||||
// creditTemplate = result['records'];
|
||||
// }
|
||||
// }
|
||||
// localStorage.setItem("dynamicQuesTemplate",JSON.stringify(creditTemplate));
|
||||
// })
|
||||
// }
|
||||
|
||||
isMac(): boolean {
|
||||
let bool = false;
|
||||
if (navigator.platform.toUpperCase().indexOf('MAC') >= 0 || navigator.platform.toUpperCase().indexOf('IPAD') >= 0) {
|
||||
bool = true;
|
||||
}
|
||||
return bool;
|
||||
}
|
||||
|
||||
isOver(): boolean {
|
||||
return window.matchMedia(`(max-width: 960px)`).matches;
|
||||
}
|
||||
|
||||
|
||||
// load templates details
|
||||
loadTemplates(startID:string,type:number,randomString:string){
|
||||
// console.log('start pd component inside - loadTemplates params are,',startID,type,randomString);
|
||||
this._pd.loadPDTemplates(startID,randomString).subscribe(
|
||||
data => {
|
||||
// console.log("after reponse = ", data);
|
||||
if (data.status == 200) {
|
||||
this.pdMasterList=data.records.pdmaster_details;
|
||||
// this.categoryList=data.records.question_answers;
|
||||
let filterApplicantName= data.records.pdapplicants_detials.filter(item => item.applicant_type == 1);
|
||||
this.mainApplicantName = filterApplicantName.length > 0 ? filterApplicantName[0].applicant_name : '';
|
||||
this.currentPDStatus = data.records.pdmaster_details.pd_status=='INPROGRESS' ? true : data.records.pdmaster_details.pd_status=='SCHEDULED' ? true :data.records.pdmaster_details.pd_status=='ALLOCATED' ? true : false;
|
||||
this.categoryFormButtons = Object.keys(data.records.template_forms).map((item)=>data.records.template_forms[item]).filter(item=>item.isAnswerable===true);
|
||||
// this.categoryFormButtons = this.categoryFormButtons.filter(item=>item.isAnswerable===true);
|
||||
this.actualQuestions = this.categoryFormButtons.length;
|
||||
let getAnsweredFormsCount = this.categoryFormButtons.filter(item=>item.isAnswered===true);
|
||||
this.answeredQuestions = getAnsweredFormsCount.length;
|
||||
this.pdFullDetails = data.records;
|
||||
// VENDOR FORM ANSWER FETCH STATUS START(SMART PD ONLY)
|
||||
// if(this.pdMasterList.fk_pd_type == '2') {
|
||||
// if(data.records.vendor_form_status && data.records.vendor_form_status.length > 0) {
|
||||
// this.vendor_form_status_arr = JSON.stringify(data.records.vendor_form_status)
|
||||
// localStorage.setItem("vendorFormStatus_arr",this.vendor_form_status_arr)
|
||||
// }
|
||||
// }
|
||||
if(this.pdMasterList.fk_pd_type == '2') {
|
||||
// let temp_vendor_status = localStorage.getItem("vendorFormStatus_arr")
|
||||
if(data.records.hasOwnProperty('vendor_form_status') && data.records.vendor_form_status && data.records.vendor_form_status.length > 0) {
|
||||
// temp_vendor_status = JSON.parse(temp_vendor_status)
|
||||
// if(temp_vendor_status && temp_vendor_status.length > 0 ) {
|
||||
this.vendor_status_arr = data.records.vendor_form_status
|
||||
// }
|
||||
}
|
||||
}
|
||||
// END OF VENDOR FORM ANSWER FETCH
|
||||
if(type==1 && (data.records.pdmaster_details.pd_status=='SCHEDULED' || data.records.pdmaster_details.pd_status=='ALLOCATED')) {
|
||||
this.pdStatusDialogue(this.pdStatusCheck.INPROGRESS,1)
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.pdMasterList = "";
|
||||
this.mainApplicantName = "";
|
||||
this.categoryList = [];
|
||||
this.currentPDStatus = false;
|
||||
}
|
||||
// this.getAnswers(serachQuestions);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// load pd status change dialogue
|
||||
pdStatusDialogue(status: string, checkType: number): void {
|
||||
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
|
||||
data: { pdid: this.startPD, pd_status: status ,random_string:this.randomString,pd_type:this.pdMasterList.fk_pd_type },
|
||||
disableClose: true,
|
||||
minWidth:'30%',
|
||||
maxWidth:'40%',
|
||||
});
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
if(dataresult.update_status==true){
|
||||
checkType==2 ? this.router.navigate(['../../viewpd', this.pdMasterList.parent_pd_id], {relativeTo: this.route}) : this.loadTemplates(this.startPD,2,this.randomString);
|
||||
}
|
||||
else {
|
||||
checkType==1 ? this.router.navigate(['../../viewpd', this.pdMasterList.parent_pd_id], {relativeTo: this.route}) : this.loadTemplates(this.startPD,2,this.randomString);
|
||||
}
|
||||
if(checkType == 2){
|
||||
this.loadTemplates(this.startPD,2,this.randomString);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// start
|
||||
// direct form based questions
|
||||
// OnSelectDirectForms(details: any) {
|
||||
// // console.log(details)
|
||||
// // this.formsCategoryEnable = true;
|
||||
// this.selectedFormsCategory = details;
|
||||
// let curr_vendor_ans_fetch_status = null
|
||||
// if(this.pdMasterList.fk_pd_type == '2') {
|
||||
// if(this.vendor_status_arr && this.vendor_status_arr.length > 0 && this.selectedFormsCategory.form_id != 13) {
|
||||
// console.log(this.vendor_status_arr,this.selectedFormsCategory)
|
||||
// curr_vendor_ans_fetch_status =this.vendor_status_arr.filter(val=>val.fk_form_id == String(this.selectedFormsCategory.form_id))
|
||||
// if(curr_vendor_ans_fetch_status.length > 0) {
|
||||
// curr_vendor_ans_fetch_status = curr_vendor_ans_fetch_status[0].form_status
|
||||
// }
|
||||
// else {
|
||||
// curr_vendor_ans_fetch_status = null
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// this.pdFullDetails.pdmaster_details.curr_vendor_ans_fetch_status = curr_vendor_ans_fetch_status
|
||||
// console.log(this.pdFullDetails);
|
||||
// if(this.selectedFormsCategory.form_id==1){
|
||||
// const dialogRef = this.dialog.open(SupplierInfoComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==2){
|
||||
// const dialogRef = this.dialog.open(ClientInfoComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==3){
|
||||
// const dialogRef = this.dialog.open(PersonalInfoComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==4){
|
||||
// const dialogRef = this.dialog.open(AssetsInfoComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==5){
|
||||
// const dialogRef = this.dialog.open(AddressComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==6){
|
||||
// const dialogRef = this.dialog.open(FamilyDetailsComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==7){
|
||||
// const dialogRef = this.dialog.open(BankingDetailsComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }
|
||||
// else
|
||||
// if(this.selectedFormsCategory.form_id==8){
|
||||
// const dialogRef = this.dialog.open(CurrentLoanComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }
|
||||
// else
|
||||
// if(this.selectedFormsCategory.form_id==9){
|
||||
// const dialogRef = this.dialog.open(OtherIncomeComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==10){
|
||||
// const dialogRef = this.dialog.open(LoanDetailsComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==11){
|
||||
// const dialogRef = this.dialog.open(StockComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==12){
|
||||
// const dialogRef = this.dialog.open(EmploymentInfoComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==13){
|
||||
// const dialogRef = this.dialog.open(BusinessInfoGroupComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==14){
|
||||
// const dialogRef = this.dialog.open(FinancialInfoComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==15){
|
||||
// const dialogRef = this.dialog.open(LenderRepresentativeComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }
|
||||
// else
|
||||
// if(this.selectedFormsCategory.form_id==17){
|
||||
// const dialogRef = this.dialog.open(RentalVerificationComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }
|
||||
// else if(this.selectedFormsCategory.form_id==18){
|
||||
// const generaldialogRef = this.dialog.open(GeneralInfoComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// generaldialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }
|
||||
// else if(this.selectedFormsCategory.form_id==19){
|
||||
// const generaldialogRef = this.dialog.open(NeighbourHoodComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// generaldialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }else if(this.selectedFormsCategory.form_id==20){
|
||||
// const generaldialogRef = this.dialog.open(FinalRemarksComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// generaldialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==22){
|
||||
// const dialogRef = this.dialog.open(BusinessAssetsInfoComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }
|
||||
// else
|
||||
// if(this.selectedFormsCategory.form_id==24){
|
||||
// const dialogRef = this.dialog.open(QueriesDocsComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// // position: { right: '0'},
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.listPDComponent.showListView(true);
|
||||
}
|
||||
// load pd view component
|
||||
loadPdViewCompoent() {
|
||||
this.router.navigate(['../../../../viewpd', this.pdMasterList.parent_pd_id,this.randomString], {relativeTo: this.route});
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
import { StartPdModule } from './start-pd.module';
|
||||
|
||||
describe('StartPdModule', () => {
|
||||
let startPdModule: StartPdModule;
|
||||
|
||||
beforeEach(() => {
|
||||
startPdModule = new StartPdModule();
|
||||
});
|
||||
|
||||
it('should create an instance', () => {
|
||||
expect(startPdModule).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,62 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { StartPdRoutingModule } from './start-pd-routing.module';
|
||||
import { StartPdComponent } from './start-pd.component';
|
||||
import { SharedModule } from 'app/shared/shared.module';
|
||||
import { DemoMaterialModule } from 'app/shared/demo.module';
|
||||
import { NotifierModule, NotifierOptions } from 'angular-notifier';
|
||||
|
||||
const pdCustomNotifierOptions: NotifierOptions = {
|
||||
position: {
|
||||
horizontal: {
|
||||
position: 'right',
|
||||
distance: 12
|
||||
},
|
||||
vertical: {
|
||||
position: 'top',
|
||||
distance: 32,
|
||||
gap: 10
|
||||
}
|
||||
},
|
||||
theme: 'material',
|
||||
behaviour: {
|
||||
autoHide: 2000,
|
||||
onClick: 'hide',
|
||||
onMouseover: 'pauseAutoHide',
|
||||
showDismissButton: true,
|
||||
stacking: 4
|
||||
},
|
||||
animations: {
|
||||
enabled: true,
|
||||
show: {
|
||||
preset: 'slide',
|
||||
speed: 300,
|
||||
easing: 'ease'
|
||||
},
|
||||
hide: {
|
||||
preset: 'fade',
|
||||
speed: 300,
|
||||
easing: 'ease',
|
||||
offset: 50
|
||||
},
|
||||
shift: {
|
||||
speed: 300,
|
||||
easing: 'ease'
|
||||
},
|
||||
overlap: 150
|
||||
}
|
||||
};
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
StartPdRoutingModule,
|
||||
SharedModule,
|
||||
DemoMaterialModule,
|
||||
NotifierModule.withConfig(pdCustomNotifierOptions),
|
||||
],
|
||||
declarations: [StartPdComponent],
|
||||
entryComponents:[]
|
||||
})
|
||||
export class StartPdModule { }
|
||||
@ -153,10 +153,11 @@
|
||||
<div fxFlex="40" align="left" style="color: #e00201">
|
||||
{{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Completed' : master.pd_status | titlecase}}
|
||||
</div>
|
||||
<!-- <div fxFlex="60" align="right">
|
||||
<span><button *ngIf="roleAccessDetails.trigger && addresses.assigned_pd==null || addresses.assigned_pd==''" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" [matTooltip]="master.fk_primary_address_id ? 'Initiate PD for this address' : 'Initiate Address for PD Process'" matTooltipPosition="above" (click)="initiateAddtionalPD(master,addresses,master.fk_primary_address_id ? true : false)"><mat-icon>where_to_vote</mat-icon></button></span>
|
||||
<button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && master.pd_status!=pdStatusCheck.ADD_ON_PENDING && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button>
|
||||
</div> -->
|
||||
<div fxFlex="60" align="right">
|
||||
<!-- <span><button *ngIf="roleAccessDetails.trigger && addresses.assigned_pd==null || addresses.assigned_pd==''" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" [matTooltip]="master.fk_primary_address_id ? 'Initiate PD for this address' : 'Initiate Address for PD Process'" matTooltipPosition="above" (click)="initiateAddtionalPD(master,addresses,master.fk_primary_address_id ? true : false)"><mat-icon>where_to_vote</mat-icon></button></span> -->
|
||||
<!-- <button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && master.pd_status!=pdStatusCheck.ADD_ON_PENDING && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button> -->
|
||||
<span ><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.TRIGGERED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,addresses.addtional_pd_data[0].pd_status)"><mat-icon>question_answer</mat-icon></button></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row nowrap">
|
||||
@ -196,7 +197,7 @@
|
||||
<div fxFlex="60" align="right">
|
||||
<!-- <span *ngIf="userRoleID == 10 || userRoleID == 3"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.COMPLETED && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.ADD_ON_PENDING && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button></span> -->
|
||||
<!-- <span *ngIf="userRoleID == 3 || userRoleID == 4 || userRoleID == 5 || userRoleID == 10 "><button *ngIf="roleAccessDetails.schedule && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.COMPLETED && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.ADD_ON_PENDING && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master,addresses)"><mat-icon>schedule</mat-icon></button></span> -->
|
||||
<!-- <span *ngIf="userRoleID == 3 || userRoleID == 4 || userRoleID == 5 || userRoleID == 10 "><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.TRIGGERED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,addresses.addtional_pd_data[0].pd_status)"><mat-icon>question_answer</mat-icon></button></span> -->
|
||||
<span ><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.TRIGGERED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,addresses.addtional_pd_data[0].pd_status)"><mat-icon>question_answer</mat-icon></button></span>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row nowrap">
|
||||
|
||||
@ -305,12 +305,12 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
if (dataresult.update_status == true) {
|
||||
this.router.navigate(['../../startpd',pdDetails.assigned_pd], { relativeTo: this.route });
|
||||
this.router.navigate(['../../../startpd',pdDetails.assigned_pd,this.masterRandomString], { relativeTo: this.route });
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.router.navigate(['../../startpd', pdDetails.assigned_pd], { relativeTo: this.route });
|
||||
this.router.navigate(['../../../startpd', pdDetails.assigned_pd,this.masterRandomString], { relativeTo: this.route });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -122,7 +122,8 @@ import { GetAnswerableFormsPipe } from './../pd-pipes/get-answerable-forms.pipe'
|
||||
// import { ManageRentalVerificationComponent } from './list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component';
|
||||
// import { FuturePlansAndBusinessEnvironmentComponent } from './list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component';
|
||||
// import { ImageCropComponent } from './list-pd/start-pd/forms/dialogue/image-crop/image-crop.component';
|
||||
import {AngularSplitModule} from 'angular-split'
|
||||
import {AngularSplitModule} from 'angular-split';
|
||||
import { ExcelUploadDialogComponent } from './list-pd/add-pd/excel-upload-dialog/excel-upload-dialog.component'
|
||||
|
||||
/**
|
||||
* Custom angular notifier options
|
||||
@ -169,7 +170,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
||||
};
|
||||
|
||||
@NgModule({
|
||||
declarations: [TelePdAllocationComponent, ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, PdReportComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, SearchRelationPipe, RupeeCurrencyFormatPipe, DeleteRecordsCountPipe, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent],
|
||||
declarations: [TelePdAllocationComponent, ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, PdReportComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, SearchRelationPipe, RupeeCurrencyFormatPipe, DeleteRecordsCountPipe, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent, ExcelUploadDialogComponent],
|
||||
imports: [
|
||||
CommonModule,
|
||||
ManagePdRoutingModule,
|
||||
@ -209,7 +210,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
||||
{provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]},
|
||||
{provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}, PdLocatedMapViewDirective],
|
||||
|
||||
entryComponents: [SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, ViewLocationComponent,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent],
|
||||
entryComponents: [SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, ViewLocationComponent,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent,ExcelUploadDialogComponent],
|
||||
})
|
||||
export class ManagePdModule {
|
||||
}
|
||||
@ -2,7 +2,6 @@ import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { ManagePdComponent } from './manage-pd.component';
|
||||
import { ListPdComponent } from './list-pd/list-pd.component';
|
||||
import { MapPdViewComponent } from './list-pd/map-pd-view/map-pd-view.component';
|
||||
import { AddPdComponent } from '../manage-pd/list-pd/add-pd/add-pd.component';
|
||||
import { ViewPdComponent } from '../manage-pd/list-pd/view-pd/view-pd.component';
|
||||
import { PdReportComponent } from './list-pd/pd-report/pd-report.component';
|
||||
@ -22,10 +21,10 @@ const routes: Routes = [
|
||||
path: 'pdlist',
|
||||
component: ListPdComponent,
|
||||
children: [
|
||||
{
|
||||
path: 'pdmaplist',
|
||||
component: MapPdViewComponent,
|
||||
},
|
||||
// {
|
||||
// path: 'pdmaplist',
|
||||
// component: MapPdViewComponent,
|
||||
// },
|
||||
{
|
||||
path: 'addpd',
|
||||
component: AddPdComponent,
|
||||
@ -37,7 +36,11 @@ const routes: Routes = [
|
||||
{
|
||||
path: 'pd_report/:pdid/:string',
|
||||
component: PdReportComponent,
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'startpd/:pdid/:rdmstr',
|
||||
loadChildren:'./list-pd/start-pd/start-pd.module#StartPdModule'
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@ -264,9 +264,9 @@ export class PdTrigerService {
|
||||
// }
|
||||
|
||||
//load pd template details
|
||||
loadPDTemplates(pdId: string): Observable<any> {
|
||||
loadPDTemplates(pdId: string,randString): Observable<any> {
|
||||
const options = pdId ?
|
||||
{ params: new HttpParams().set('pd_id', pdId) } : {};
|
||||
{ params: new HttpParams().set('pd_id', pdId).set('random_string',randString) } : {};
|
||||
return this._http.get<any[]>(this.apiUrl + "loadFullTemplate", options)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
@ -790,6 +790,13 @@ checkExistPDDetails(datas,entity_id){
|
||||
return this._http.post(this.apiUrl+'checkExistPDDetails',{records:datas,client:entity_id})
|
||||
.pipe(catchError(this.handleError("checkExistPDDetails",[])))
|
||||
}
|
||||
uploadSMCDataFile(file) {
|
||||
let records = {"rand_key":"qwerty1234"}
|
||||
let formData= new FormData()
|
||||
formData.append("pd_excel_data",file)
|
||||
formData.append("records",JSON.stringify(records))
|
||||
return this._http.post(this.apiUrl+'uploadSMCDataFile',formData)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -29,27 +29,27 @@ import { personalDiscussionRoutes } from './personal-discussion.routing';
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterModule.forChild(personalDiscussionRoutes),
|
||||
CKEditorModule,
|
||||
PdfViewerModule,
|
||||
ManagePdModule,
|
||||
MatCardModule,
|
||||
MatIconModule,
|
||||
MatInputModule,
|
||||
MatRadioModule,
|
||||
MatTableModule,
|
||||
MatPaginatorModule,
|
||||
MatButtonModule,
|
||||
MatProgressBarModule,
|
||||
MatToolbarModule,
|
||||
FlexLayoutModule,
|
||||
NgxDatatableModule,
|
||||
FormsModule,MatSlideToggleModule,
|
||||
MatSelectModule, MatListModule,MatGridListModule, MatTabsModule, MatBadgeModule, MatCheckboxModule,
|
||||
ReactiveFormsModule,
|
||||
FileUploadModule,
|
||||
TreeModule,
|
||||
MatDialogModule,MatSortModule,
|
||||
NgxMatSelectSearchModule,MatTooltipModule, MatExpansionModule,
|
||||
// CKEditorModule,
|
||||
// PdfViewerModule,
|
||||
// ManagePdModule,
|
||||
// MatCardModule,
|
||||
// MatIconModule,
|
||||
// MatInputModule,
|
||||
// MatRadioModule,
|
||||
// MatTableModule,
|
||||
// MatPaginatorModule,
|
||||
// MatButtonModule,
|
||||
// MatProgressBarModule,
|
||||
// MatToolbarModule,
|
||||
// FlexLayoutModule,
|
||||
// NgxDatatableModule,
|
||||
// FormsModule,MatSlideToggleModule,
|
||||
// MatSelectModule, MatListModule,MatGridListModule, MatTabsModule, MatBadgeModule, MatCheckboxModule,
|
||||
// ReactiveFormsModule,
|
||||
// FileUploadModule,
|
||||
// TreeModule,
|
||||
// MatDialogModule,MatSortModule,
|
||||
// NgxMatSelectSearchModule,MatTooltipModule, MatExpansionModule,
|
||||
]
|
||||
})
|
||||
export class PersonalDiscussionModule { }
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material';
|
||||
import { Subject } from 'rxjs';
|
||||
import { ProgressSpineerDialogComponent } from '../progress-spineer-dialog/progress-spineer-dialog.component';
|
||||
export interface LoaderState {
|
||||
show: boolean;
|
||||
}
|
||||
@ -9,11 +11,26 @@ export interface LoaderState {
|
||||
export class LoaderService {
|
||||
private loaderSubject = new Subject<LoaderState>();
|
||||
loaderState = this.loaderSubject.asObservable();
|
||||
constructor() { }
|
||||
spinnerdialogRef: any;
|
||||
constructor(private dialog:MatDialog) { }
|
||||
show() {
|
||||
this.loaderSubject.next(<LoaderState>{ show: true });
|
||||
}
|
||||
hide() {
|
||||
this.loaderSubject.next(<LoaderState>{ show: false });
|
||||
}
|
||||
showMatSpinnerDialog(message ?:String) {
|
||||
this.spinnerdialogRef = this.dialog.open(ProgressSpineerDialogComponent, {
|
||||
data:message,
|
||||
panelClass: 'transparent',
|
||||
// minHeight:'20%',
|
||||
minWidth:'20%',
|
||||
disableClose: true
|
||||
});
|
||||
}
|
||||
closeMatSpinnerDialog() {
|
||||
if(this.spinnerdialogRef) {
|
||||
this.spinnerdialogRef.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
<div fxLayout="column" fxLayoutAlign="center">
|
||||
<mat-spinner style="text-align: center;margin-left: 85px;" fxLayoutAlign="center"></mat-spinner>
|
||||
<p style="font-weight: bold;color: white;text-align: center;"> {{spinnerMsg}}</p>
|
||||
</div>
|
||||
@ -0,0 +1,5 @@
|
||||
::ng-deep {.transparent > .mat-dialog-container {
|
||||
box-shadow: none;
|
||||
background: rgba(0, 0, 0, 0.0);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ProgressSpineerDialogComponent } from './progress-spineer-dialog.component';
|
||||
|
||||
describe('ProgressSpineerDialogComponent', () => {
|
||||
let component: ProgressSpineerDialogComponent;
|
||||
let fixture: ComponentFixture<ProgressSpineerDialogComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ProgressSpineerDialogComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ProgressSpineerDialogComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,19 @@
|
||||
import { Component, Inject, OnInit } from '@angular/core';
|
||||
import { MAT_DIALOG_DATA } from '@angular/material';
|
||||
|
||||
@Component({
|
||||
selector: 'app-progress-spineer-dialog',
|
||||
templateUrl: './progress-spineer-dialog.component.html',
|
||||
styleUrls: ['./progress-spineer-dialog.component.scss']
|
||||
})
|
||||
export class ProgressSpineerDialogComponent implements OnInit {
|
||||
|
||||
spinnerMsg:String=''
|
||||
constructor(@Inject(MAT_DIALOG_DATA)private data:any) {
|
||||
this.spinnerMsg= this.data
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@ -8,8 +8,11 @@ import { RatingComponent} from './rating/rating.component';
|
||||
import { NumbersOnlyDirective } from './numbers-only/numbers-only.directive';
|
||||
import { ForMobileNumbersDirective } from './for-mobile-numbers/for-mobile-numbers.directive';
|
||||
import { NumberToWordsPipe } from 'app/personal-discussion/pd-pipes/number-to-words.pipe';
|
||||
import { ProgressSpineerDialogComponent } from './progress-spineer-dialog/progress-spineer-dialog.component';
|
||||
import { MatProgressSpinnerModule } from '@angular/material';
|
||||
|
||||
@NgModule({
|
||||
entryComponents:[ProgressSpineerDialogComponent],
|
||||
declarations: [
|
||||
AccordionAnchorDirective,
|
||||
AccordionLinkDirective,
|
||||
@ -18,8 +21,10 @@ import { NumberToWordsPipe } from 'app/personal-discussion/pd-pipes/number-to-wo
|
||||
RatingComponent,
|
||||
NumbersOnlyDirective,
|
||||
ForMobileNumbersDirective,
|
||||
NumberToWordsPipe
|
||||
NumberToWordsPipe,
|
||||
ProgressSpineerDialogComponent
|
||||
],
|
||||
imports:[MatProgressSpinnerModule],
|
||||
exports: [
|
||||
AccordionAnchorDirective,
|
||||
AccordionLinkDirective,
|
||||
@ -28,7 +33,8 @@ import { NumberToWordsPipe } from 'app/personal-discussion/pd-pipes/number-to-wo
|
||||
RatingComponent,
|
||||
NumbersOnlyDirective,
|
||||
ForMobileNumbersDirective,
|
||||
NumberToWordsPipe
|
||||
NumberToWordsPipe,
|
||||
ProgressSpineerDialogComponent
|
||||
],
|
||||
providers: [ MenuItems, HorizontalMenuItems ]
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user