merge : kms
This commit is contained in:
parent
27349ed9ac
commit
9f83c77236
@ -30,6 +30,7 @@
|
|||||||
"@ngx-translate/http-loader": "^3.0.1",
|
"@ngx-translate/http-loader": "^3.0.1",
|
||||||
"@swimlane/ngx-charts": "^7.0.1",
|
"@swimlane/ngx-charts": "^7.0.1",
|
||||||
"@swimlane/ngx-datatable": "11.1.5",
|
"@swimlane/ngx-datatable": "11.1.5",
|
||||||
|
"@types/file-saver": "^2.0.0",
|
||||||
"amazon-cognito-identity-js": "^2.0.27",
|
"amazon-cognito-identity-js": "^2.0.27",
|
||||||
"angular-calendar": "0.23.3",
|
"angular-calendar": "0.23.3",
|
||||||
"angular-notifier": "^4.1.1",
|
"angular-notifier": "^4.1.1",
|
||||||
@ -39,6 +40,7 @@
|
|||||||
"core-js": "^2.5.5",
|
"core-js": "^2.5.5",
|
||||||
"d3": "^4.9.1",
|
"d3": "^4.9.1",
|
||||||
"dragula": "3.7.2",
|
"dragula": "3.7.2",
|
||||||
|
"file-saver": "^2.0.0",
|
||||||
"font-awesome": "4.7.0",
|
"font-awesome": "4.7.0",
|
||||||
"hammerjs": "2.0.8",
|
"hammerjs": "2.0.8",
|
||||||
"intl": "^1.2.4",
|
"intl": "^1.2.4",
|
||||||
|
|||||||
@ -89,7 +89,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 24%">
|
<mat-form-field style="width: 24%">
|
||||||
<!-- <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)" (change)="loanCalc()" required autocomplete="off">
|
<input matInput placeholder="Loan Amount" formControlName="loan_amount" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" required autocomplete="off">
|
||||||
<mat-hint align="end" *ngIf="pdMain.loan_amount.value != ''">{{"₹"}} {{loanAmtInWords}} Only</mat-hint>
|
<mat-hint align="end" *ngIf="pdMain.loan_amount.value != ''">{{"₹"}} {{loanAmtInWords}} Only</mat-hint>
|
||||||
<!-- <mat-error *ngIf="pdMain.loan_amount.hasError('required')">Amount Required.</mat-error> -->
|
<!-- <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>
|
<mat-error *ngIf="pdMain.loan_amount.hasError('pattern')">Enter valid amount. </mat-error>
|
||||||
@ -142,7 +142,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div fxFlex="30" align="end">
|
<div fxFlex="30" align="end">
|
||||||
<button *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" (click)="saveDraftPD(this._EditPDtriggerForm.value,pdStatusCheck.DRAFT)" type="button" matTooltip="Save As Draft" matTooltipPosition="above"><mat-icon>insert_drive_file</mat-icon></button>
|
<button *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" (click)="saveDraftPD(this._EditPDtriggerForm.value,pdStatusCheck.DRAFT)" type="button" matTooltip="Save As Draft" matTooltipPosition="above"><mat-icon>insert_drive_file</mat-icon></button>
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="PD Process" matTooltipPosition="above" type="button" (click)="triggerPD(_EditPDtriggerForm.value, pdStatusCheck.TRIGGERED)"><mat-icon>save</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Trigger PD" matTooltipPosition="above" type="button" (click)="triggerPD(_EditPDtriggerForm.value, pdStatusCheck.TRIGGERED)"><mat-icon>save</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
</mat-dialog-actions>
|
</mat-dialog-actions>
|
||||||
|
|
||||||
|
|||||||
@ -7,12 +7,16 @@
|
|||||||
<mat-card style="min-height:540px;">
|
<mat-card style="min-height:540px;">
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div align="end">
|
<div align="end">
|
||||||
<button mat-raised-button color="blue" (click)="reportReview('REMARKS')" style="padding: 0 28px !important;" [disabled]="qcStatus === 'QC_COMPLETED'">QC Remarks</button>
|
<button mat-raised-button color="blue" (click)="reportReview('REMARKS')" style="padding: 0 28px !important;" *ngIf="qcStatus !== 'QC_COMPLETED'">Notes</button>
|
||||||
<button mat-raised-button color="red" (click)="reportReview('COMPLETE')" style="padding: 0 28px !important;" [disabled]="qcStatus === 'QC_COMPLETED'">QC Complete</button>
|
<button mat-raised-button color="red" (click)="reportReview('COMPLETE')" style="padding: 0 28px !important;" *ngIf="qcStatus !== 'QC_COMPLETED'">QC Complete</button>
|
||||||
<!--{{ qcStatus }} -->
|
<!--{{ qcStatus }} -->
|
||||||
</div>
|
</div>
|
||||||
<mat-tab-group>
|
<mat-tab-group>
|
||||||
<mat-tab label="PD Data">
|
<mat-tab label="PD Data">
|
||||||
|
<div>
|
||||||
|
Export
|
||||||
|
<button (click)="export()">Export Excel</button>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<label>Billing Name : </label> {{pdReportRecords?.billing_name}}
|
<label>Billing Name : </label> {{pdReportRecords?.billing_name}}
|
||||||
|
|||||||
@ -1,16 +1,21 @@
|
|||||||
import { DomSanitizer, SafeResourceUrl, SafeUrl } from '@angular/platform-browser';
|
import { DomSanitizer, SafeResourceUrl, SafeUrl } from '@angular/platform-browser';
|
||||||
import {Component, ViewChild, OnInit, ViewEncapsulation, OnDestroy, Inject} from '@angular/core';
|
import { Component, ViewChild, OnInit, ViewEncapsulation, OnDestroy, Inject } from '@angular/core';
|
||||||
import {FormBuilder, FormGroup, Validators, FormControl, FormArray, AbstractControl} from '@angular/forms';
|
import { FormBuilder, FormGroup, Validators, FormControl, FormArray, AbstractControl } from '@angular/forms';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import {NotifierService} from 'angular-notifier';
|
import { NotifierService } from 'angular-notifier';
|
||||||
import {ListPdComponent} from './../list-pd.component';
|
import { ListPdComponent } from './../list-pd.component';
|
||||||
|
|
||||||
import {PdTrigerService} from '../../../pd-service/pd-triger.service';
|
import { saveAs as importedSaveAs } from "file-saver";
|
||||||
import { MatDialog,
|
|
||||||
|
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
||||||
|
import {
|
||||||
|
MatDialog,
|
||||||
MatDialogRef,
|
MatDialogRef,
|
||||||
MAT_DIALOG_DATA } from "@angular/material";
|
MAT_DIALOG_DATA
|
||||||
import { ModelEditPdReportComponent} from './model-edit-pd-report/model-edit-pd-report.component';
|
} from "@angular/material";
|
||||||
|
import { ModelEditPdReportComponent } from './model-edit-pd-report/model-edit-pd-report.component';
|
||||||
import { QcReviewComponent } from './qc-review/qc-review.component';
|
import { QcReviewComponent } from './qc-review/qc-review.component';
|
||||||
|
import { HttpResponse } from "@angular/common/http";
|
||||||
|
|
||||||
/**sweet alert */
|
/**sweet alert */
|
||||||
// import Swal from 'sweetalert2';
|
// import Swal from 'sweetalert2';
|
||||||
@ -21,7 +26,7 @@ import { QcReviewComponent } from './qc-review/qc-review.component';
|
|||||||
styleUrls: ['./pd-report.component.scss']
|
styleUrls: ['./pd-report.component.scss']
|
||||||
})
|
})
|
||||||
export class PdReportComponent implements OnInit {
|
export class PdReportComponent implements OnInit {
|
||||||
Url : SafeUrl;
|
Url: SafeUrl;
|
||||||
startPD: any;
|
startPD: any;
|
||||||
// public src = 'https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf';
|
// public src = 'https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf';
|
||||||
// public src = 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b';
|
// public src = 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b';
|
||||||
@ -31,68 +36,68 @@ export class PdReportComponent implements OnInit {
|
|||||||
public reGenerateBtn: Boolean = false;
|
public reGenerateBtn: Boolean = false;
|
||||||
public pdReportVersionList = [];
|
public pdReportVersionList = [];
|
||||||
// public src;
|
// public src;
|
||||||
pdReportRecords:any;
|
pdReportRecords: any;
|
||||||
latestPDDetails: any;
|
latestPDDetails: any;
|
||||||
message:any;
|
message: any;
|
||||||
|
|
||||||
private notifier: NotifierService;
|
private notifier: NotifierService;
|
||||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||||
private router: Router, public pdTrigerService: PdTrigerService, private listPDComponent: ListPdComponent,
|
private router: Router, public pdTrigerService: PdTrigerService, private listPDComponent: ListPdComponent,
|
||||||
private dialog: MatDialog, private sanitizer: DomSanitizer) {
|
private dialog: MatDialog, private sanitizer: DomSanitizer) {
|
||||||
this.startPD = this.route.snapshot.params['pdid'];
|
this.startPD = this.route.snapshot.params['pdid'];
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
// this.src = 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T073026Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=35aa183cbbfc835f96719a5e9aa552c79b3a1b7d8bca043f7d738d730755dcbb';
|
// this.src = 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T073026Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=35aa183cbbfc835f96719a5e9aa552c79b3a1b7d8bca043f7d738d730755dcbb';
|
||||||
// this.src = this.sanitizer.bypassSecurityTrustResourceUrl("https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b");
|
// this.src = this.sanitizer.bypassSecurityTrustResourceUrl("https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b");
|
||||||
// alert(JSON.stringify(this.src));
|
// alert(JSON.stringify(this.src));
|
||||||
// this.document = { name: 'Angular 2',
|
// this.document = { name: 'Angular 2',
|
||||||
// description: 'An amazing Angular 2 pdf',
|
// description: 'An amazing Angular 2 pdf',
|
||||||
// url: { url: 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b', withCredentials: true } };
|
// url: { url: 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b', withCredentials: true } };
|
||||||
// this.Url = this.sanitizer.bypassSecurityTrustResourceUrl("https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181207%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181207T122031Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=fac718f35d195ecb45d1dc7049fbaf0fa3158f237deeedac3bae60f8ec22e822");
|
// this.Url = this.sanitizer.bypassSecurityTrustResourceUrl("https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181207%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181207T122031Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=fac718f35d195ecb45d1dc7049fbaf0fa3158f237deeedac3bae60f8ec22e822");
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.listPDComponent.showListView(false);
|
this.listPDComponent.showListView(false);
|
||||||
this.getPdReportDetails();
|
this.getPdReportDetails();
|
||||||
this.getPdReportVersionList();
|
this.getPdReportVersionList();
|
||||||
// start
|
// start
|
||||||
|
|
||||||
// end
|
// end
|
||||||
const elemSidebar = <HTMLElement>document.querySelector('.app-inner .mail-sidebar');
|
const elemSidebar = <HTMLElement>document.querySelector('.app-inner .mail-sidebar');
|
||||||
const elemContent = <HTMLElement>document.querySelector('.app-inner .main-content');
|
const elemContent = <HTMLElement>document.querySelector('.app-inner .main-content');
|
||||||
|
|
||||||
if (window.matchMedia(`(min-width: 1560px)`).matches && !this.isMac()) {
|
if (window.matchMedia(`(min-width: 1560px)`).matches && !this.isMac()) {
|
||||||
// Ps.initialize(elemSidebar, { wheelSpeed: 2, suppressScrollX: true });
|
// Ps.initialize(elemSidebar, { wheelSpeed: 2, suppressScrollX: true });
|
||||||
// Ps.initialize(elemContent, { wheelSpeed: 2, suppressScrollX: true });
|
// Ps.initialize(elemContent, { wheelSpeed: 2, suppressScrollX: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
// this.loadTemplates(this.startPD);
|
// this.loadTemplates(this.startPD);
|
||||||
// this.next = 1;
|
// this.next = 1;
|
||||||
// this.previous = 2;
|
// this.previous = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
isMac(): boolean {
|
isMac(): boolean {
|
||||||
let bool = false;
|
let bool = false;
|
||||||
if (navigator.platform.toUpperCase().indexOf('MAC') >= 0 || navigator.platform.toUpperCase().indexOf('IPAD') >= 0) {
|
if (navigator.platform.toUpperCase().indexOf('MAC') >= 0 || navigator.platform.toUpperCase().indexOf('IPAD') >= 0) {
|
||||||
bool = true;
|
bool = true;
|
||||||
}
|
|
||||||
return bool;
|
|
||||||
}
|
}
|
||||||
|
return bool;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
isOver(): boolean {
|
isOver(): boolean {
|
||||||
return window.matchMedia(`(max-width: 1560px)`).matches;
|
return window.matchMedia(`(max-width: 1560px)`).matches;
|
||||||
}
|
}
|
||||||
|
|
||||||
reGeneratePFReport(){
|
reGeneratePFReport() {
|
||||||
let data = {
|
let data = {
|
||||||
"pd_id": this.startPD,
|
"pd_id": this.startPD,
|
||||||
"regenerate":"1"
|
"regenerate": "1"
|
||||||
};
|
};
|
||||||
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data=>{
|
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
|
||||||
if(data.dataStatus){
|
if (data.dataStatus) {
|
||||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||||
this.getPdReportVersionList();
|
this.getPdReportVersionList();
|
||||||
} else {
|
} else {
|
||||||
@ -103,11 +108,11 @@ export class PdReportComponent implements OnInit {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
generateNewPDReport() {
|
generateNewPDReport() {
|
||||||
let data = {
|
let data = {
|
||||||
"pd_id": this.startPD
|
"pd_id": this.startPD
|
||||||
};
|
};
|
||||||
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data=>{
|
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
|
||||||
if(data.dataStatus){
|
if (data.dataStatus) {
|
||||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||||
this.getPdReportVersionList();
|
this.getPdReportVersionList();
|
||||||
} else {
|
} else {
|
||||||
@ -119,33 +124,33 @@ export class PdReportComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public qcStatus: string = '';
|
public qcStatus: string = '';
|
||||||
getPdReportVersionList(){
|
getPdReportVersionList() {
|
||||||
this.pdTrigerService.getPdDocVersionList(this.startPD).subscribe(data => {
|
this.pdTrigerService.getPdDocVersionList(this.startPD).subscribe(data => {
|
||||||
if(data.status == 200 && data.dataStatus){
|
if (data.status == 200 && data.dataStatus) {
|
||||||
this.pdReportVersionList = [...data.records.reports_urls].reverse();
|
this.pdReportVersionList = [...data.records.reports_urls].reverse();
|
||||||
let datas = this.pdReportVersionList.filter((a)=>{return a.is_latest == 1;})
|
let datas = this.pdReportVersionList.filter((a) => { return a.is_latest == 1; })
|
||||||
this.latestPDDetails = datas[0];
|
this.latestPDDetails = datas[0];
|
||||||
this.qcStatus = data.records.pdstatus;
|
this.qcStatus = data.records.pdstatus;
|
||||||
// alert(JSON.stringify(this.latestPDDetails));
|
// alert(JSON.stringify(this.latestPDDetails));
|
||||||
this.reGenerateBtn = true;
|
this.reGenerateBtn = true;
|
||||||
} else {
|
} else {
|
||||||
// this.reGenerateBtn = true;
|
// this.reGenerateBtn = true;
|
||||||
this.generateBtn = true;
|
this.generateBtn = true;
|
||||||
this.message= data.msg;
|
this.message = data.msg;
|
||||||
}
|
}
|
||||||
}, err=> {
|
}, err => {
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
getPdReportDetails() {
|
getPdReportDetails() {
|
||||||
this.pdTrigerService.getPdFinalReportDetails(this.startPD).subscribe(data => {
|
this.pdTrigerService.getPdFinalReportDetails(this.startPD).subscribe(data => {
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
// this.pdReportRecords = data.records.question_answers;
|
// this.pdReportRecords = data.records.question_answers;
|
||||||
this.pdReportRecords = data.records;
|
this.pdReportRecords = data.records;
|
||||||
// this.pdReportRecords = data.records.qu;
|
// this.pdReportRecords = data.records.qu;
|
||||||
}
|
}
|
||||||
}, err=> {
|
}, err => {
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -154,13 +159,13 @@ export class PdReportComponent implements OnInit {
|
|||||||
|
|
||||||
// load pd view component
|
// load pd view component
|
||||||
loadPdViewCompoent() {
|
loadPdViewCompoent() {
|
||||||
this.router.navigate(['../../viewpd', this.startPD], {relativeTo: this.route});
|
this.router.navigate(['../../viewpd', this.startPD], { relativeTo: this.route });
|
||||||
}
|
}
|
||||||
|
|
||||||
// add questions popup model call
|
// add questions popup model call
|
||||||
addNewQuestion() {
|
addNewQuestion() {
|
||||||
const dialogRef = this.dialog.open(ModelEditPdReportComponent, {
|
const dialogRef = this.dialog.open(ModelEditPdReportComponent, {
|
||||||
data: { startId : this.startPD, version_id: this.latestPDDetails.doc_name},
|
data: { startId: this.startPD, version_id: this.latestPDDetails.doc_name },
|
||||||
disableClose: true
|
disableClose: true
|
||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
@ -172,56 +177,56 @@ export class PdReportComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
changeVersion(pd : any): void {
|
changeVersion(pd: any): void {
|
||||||
this.latestPDDetails = pd;
|
this.latestPDDetails = pd;
|
||||||
console.log(this.latestPDDetails);
|
console.log(this.latestPDDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
reportReview(status): void {
|
|
||||||
const dialogRef = this.dialog.open(QcReviewComponent, {
|
reportReview(status): void {
|
||||||
data: { startId : this.startPD, data_status: status },
|
const dialogRef = this.dialog.open(QcReviewComponent, {
|
||||||
disableClose: true
|
data: { startId: this.startPD, data_status: status },
|
||||||
});
|
disableClose: true
|
||||||
dialogRef.afterClosed()
|
});
|
||||||
.subscribe(dataresult => {
|
dialogRef.afterClosed()
|
||||||
// this.getPdReportFinalTemplateDetails();
|
.subscribe(dataresult => {
|
||||||
// this.getQuestionsMasters();
|
// this.getPdReportFinalTemplateDetails();
|
||||||
// this.getBranch();
|
// this.getQuestionsMasters();
|
||||||
// this.isPopupOpened = false;
|
// this.getBranch();
|
||||||
});
|
// this.isPopupOpened = false;
|
||||||
}
|
});
|
||||||
|
}
|
||||||
changeDocumentEdit() : void{
|
|
||||||
|
changeDocumentEdit(): void {
|
||||||
|
|
||||||
|
|
||||||
const dialogRef = this.dialog.open(DialogChangeCurrentVenrsion, {
|
const dialogRef = this.dialog.open(DialogChangeCurrentVenrsion, {
|
||||||
disableClose: true
|
disableClose: true
|
||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
if(dataresult) {
|
if (dataresult) {
|
||||||
let data = {
|
let data = {
|
||||||
"pd_id": this.startPD,
|
"pd_id": this.startPD,
|
||||||
"doc_name": this.latestPDDetails.doc_name
|
"doc_name": this.latestPDDetails.doc_name
|
||||||
};
|
};
|
||||||
this.pdTrigerService.swapOlderPDReportToLatest(data).subscribe(data => {
|
this.pdTrigerService.swapOlderPDReportToLatest(data).subscribe(data => {
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||||
this.getPdReportVersionList();
|
this.getPdReportVersionList();
|
||||||
} else {
|
} else {
|
||||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
}
|
}
|
||||||
}, err=> {
|
}, err => {
|
||||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// Swal('User Created');
|
|
||||||
|
// Swal('User Created');
|
||||||
// swal({
|
// swal({
|
||||||
// title: 'Error!',
|
// title: 'Error!',
|
||||||
// text: 'Do you want to continue',
|
// text: 'Do you want to continue',
|
||||||
@ -254,6 +259,27 @@ export class PdReportComponent implements OnInit {
|
|||||||
// }s
|
// }s
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export() {
|
||||||
|
this.pdTrigerService.pdReportExportExcel().subscribe((blob: HttpResponse<Blob>) => {
|
||||||
|
if (blob) {
|
||||||
|
console.log(blob);
|
||||||
|
let datass = blob.headers.get('content-disposition');
|
||||||
|
let fileName = datass.split(/"/)[1];
|
||||||
|
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||||
|
const blobs = new Blob([blob.body],
|
||||||
|
{ type: 'application/vnd.ms-excel' });
|
||||||
|
const file = new File([blobs], fileName,
|
||||||
|
{ type: 'application/vnd.ms-excel' });
|
||||||
|
console.log(file);
|
||||||
|
importedSaveAs(file);
|
||||||
|
} else {
|
||||||
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
}
|
||||||
|
}, err => {
|
||||||
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -289,7 +315,7 @@ export class DialogChangeCurrentVenrsion implements OnInit {
|
|||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
getConfirmation(confim : Boolean) {
|
getConfirmation(confim: Boolean) {
|
||||||
this.dialogRef.close(confim);
|
this.dialogRef.close(confim);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<!--<h3>Develop across all platforms</h3>-->
|
<!--<h3>Develop across all platforms</h3>-->
|
||||||
<div *ngIf="conformation === false" style="width: 220px;text-align: center; margin: 12px;">
|
<div *ngIf="conformation === false" style="width: 220px;text-align: center; margin: 12px;">
|
||||||
<p>
|
<p>
|
||||||
Because you've marked the document as QC Complete, you can't edit this document.
|
Once QC is Completed further edit will not be possible on this document.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="conformation" style="margin: 12px; width: 340px;">
|
<div *ngIf="conformation" style="margin: 12px; width: 340px;">
|
||||||
@ -29,7 +29,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="showStatus == 'REMARKS'">
|
<div *ngIf="showStatus == 'REMARKS'">
|
||||||
<h2 mat-dialog-title>QC Remarks</h2>
|
<h2 mat-dialog-title>QC Notes</h2>
|
||||||
<mat-dialog-content class="mat-typography">
|
<mat-dialog-content class="mat-typography">
|
||||||
<div style="margin: 12px; width: 340px;">
|
<div style="margin: 12px; width: 340px;">
|
||||||
<form role="form" *ngIf="showForm" [formGroup]="ngForm" accept-charset="UTF-8" novalidate>
|
<form role="form" *ngIf="showForm" [formGroup]="ngForm" accept-charset="UTF-8" novalidate>
|
||||||
|
|||||||
@ -19,105 +19,118 @@
|
|||||||
<mat-card>
|
<mat-card>
|
||||||
<!-- <mat-card-title>Address Details</mat-card-title> -->
|
<!-- <mat-card-title>Address Details</mat-card-title> -->
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div fxLayout="row wrap">
|
<div fxLayout="row wrap">
|
||||||
<div fxFlex="33">
|
|
||||||
|
<div fxFlex="33">
|
||||||
|
|
||||||
<mat-form-field style="width: 80%;">
|
<mat-form-field style="width: 80%;">
|
||||||
<!-- <input matInput placeholder="Name" formControlName="name_ans" type="text" required> -->
|
<!-- <input matInput placeholder="Name" formControlName="name_ans" type="text" required> -->
|
||||||
<input matInput placeholder="Address" formControlName="address" required autocomplete="off">
|
<input matInput placeholder="Address" formControlName="address" required autocomplete="off">
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="33">
|
|
||||||
<mat-form-field style="width: 80%;">
|
<div fxFlex="33">
|
||||||
<mat-select placeholder="Address Type" formControlName="address_type" required>
|
<mat-form-field style="width: 80%;">
|
||||||
<mat-option value="{{m_addressType.address_type_id}}"
|
<mat-select placeholder="Address Type" formControlName="address_type" required>
|
||||||
*ngFor="let m_addressType of addressData">{{m_addressType.address_type}}
|
<mat-option value="{{m_addressType.address_type_id}}"
|
||||||
</mat-option>
|
*ngFor="let m_addressType of addressData">{{m_addressType.address_type}}
|
||||||
</mat-select>
|
</mat-option>
|
||||||
</mat-form-field>
|
</mat-select>
|
||||||
<mat-form-field *ngIf="addressForm.controls['address_type'].value == 12" style="width: 80%;">
|
</mat-form-field>
|
||||||
<input matInput placeholder="Address Type Others" formControlName="address_type_others" autocomplete="off">
|
</div>
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
<div *ngIf="addressForm.controls['address_type'].value == 12" fxFlex="33">
|
||||||
<div fxFlex="33">
|
<mat-form-field style="width: 80%;">
|
||||||
<mat-form-field style="width: 80%;">
|
<input matInput placeholder="Specify Address Type" formControlName="address_type_others" autocomplete="off">
|
||||||
<mat-select placeholder="Locality" formControlName="locality" required>
|
</mat-form-field>
|
||||||
<mat-option value="{{m_locality.locality_id}}"
|
</div>
|
||||||
*ngFor="let m_locality of localityData">{{m_locality.locality_name}}
|
|
||||||
</mat-option>
|
<div fxFlex="33">
|
||||||
</mat-select>
|
<mat-form-field style="width: 80%;">
|
||||||
</mat-form-field>
|
<mat-select placeholder="Locality" formControlName="locality" required>
|
||||||
|
<mat-option value="{{m_locality.locality_id}}"
|
||||||
|
*ngFor="let m_locality of localityData">{{m_locality.locality_name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
<mat-form-field *ngIf="addressForm.controls.locality.value == 'Others'" style="width: 80%;">
|
<div *ngIf="addressForm.controls.locality.value == 7" fxFlex="33">
|
||||||
<input matInput placeholder="Specify Locality"
|
<mat-form-field style="width: 80%;">
|
||||||
formControlName="locality_others" autocomplete="off">
|
<input matInput placeholder="Specify Locality"
|
||||||
</mat-form-field>
|
formControlName="locality_others" autocomplete="off">
|
||||||
</div>
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
<div fxLayout="row wrap">
|
|
||||||
<div fxFlex="33">
|
|
||||||
<mat-form-field style="width: 80%;">
|
|
||||||
<mat-select placeholder="Approach to PD Location" formControlName="pd_location" required>
|
|
||||||
<mat-option value="{{data.pd_location_approach_id}}"
|
|
||||||
*ngFor="let data of locationdata">{{data.description}}
|
|
||||||
</mat-option>
|
|
||||||
</mat-select>
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
|
||||||
<div fxFlex="33">
|
|
||||||
<mat-form-field style="width: 80%;">
|
|
||||||
<mat-select placeholder="Comment on Locality" formControlName="comment_locality" required>
|
|
||||||
<mat-option value="{{data.comments_on_locality_id}}"
|
|
||||||
*ngFor="let data of commentData">{{data.rating}}
|
|
||||||
</mat-option>
|
|
||||||
</mat-select>
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
|
||||||
<div fxFlex="33">
|
|
||||||
<mat-form-field style="width: 80%;">
|
|
||||||
<mat-select placeholder="Ownership" formControlName="address_ownership">
|
|
||||||
<mat-option value="{{ownerShip.id}}"
|
|
||||||
*ngFor="let ownerShip of ownerShipData">
|
|
||||||
{{ownerShip.name}}
|
|
||||||
</mat-option>
|
|
||||||
</mat-select>
|
|
||||||
</mat-form-field>
|
|
||||||
|
|
||||||
<mat-form-field *ngIf="addressForm.controls['address_ownership'].value == 4 " style="width: 80%;">
|
|
||||||
<input matInput placeholder="Specify Other Ownership" formControlName="other_ownership" autocomplete="off">
|
|
||||||
</mat-form-field>
|
|
||||||
|
|
||||||
<mat-form-field *ngIf="addressForm.controls['address_ownership'].value == 3 " style="width: 80%;">
|
<div fxFlex="33">
|
||||||
<input matInput placeholder="What is the monthly rent paid?" formControlName="rent_amt" autocomplete="off">
|
<mat-form-field style="width: 80%;">
|
||||||
</mat-form-field>
|
<mat-select placeholder="Approach to PD Location" formControlName="pd_location" required>
|
||||||
|
<mat-option value="{{data.pd_location_approach_id}}"
|
||||||
|
*ngFor="let data of locationdata">{{data.description}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
<div fxFlex="33">
|
||||||
</div>
|
<mat-form-field style="width: 80%;">
|
||||||
<div fxLayout="row wrap">
|
<mat-select placeholder="Comment on Locality" formControlName="comment_locality" required>
|
||||||
<div fxFlex="33">
|
<mat-option value="{{data.comments_on_locality_id}}"
|
||||||
<mat-form-field style="width: 80%;">
|
*ngFor="let data of commentData">{{data.rating}}
|
||||||
<mat-select placeholder="Is there any business activity is being run?"
|
</mat-option>
|
||||||
formControlName="bussiness_activity" required>
|
</mat-select>
|
||||||
<mat-option value="yes">Yes</mat-option>
|
</mat-form-field>
|
||||||
<mat-option value="no">No</mat-option>
|
</div>
|
||||||
</mat-select>
|
|
||||||
</mat-form-field>
|
<div fxFlex="33">
|
||||||
</div>
|
<mat-form-field style="width: 80%;">
|
||||||
</div>
|
<mat-select placeholder="Ownership" formControlName="address_ownership">
|
||||||
<div fxLayout="row wrap" *ngIf="addressForm.controls['bussiness_activity'].value == 'yes'" style="width: 100%">
|
<mat-option value="{{ownerShip.id}}"
|
||||||
<div fxFlex="100">
|
*ngFor="let ownerShip of ownerShipData">
|
||||||
<label>How long has business been operated from this premise?</label>
|
{{ownerShip.name}}
|
||||||
<mat-form-field>
|
</mat-option>
|
||||||
<input matInput placeholder="Year(s)" formControlName="business_years">
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
</div>
|
||||||
<input matInput placeholder="Month(s)" formControlName="business_month" (change)="ConvertMonthintoYear($event.target.value)">
|
|
||||||
</mat-form-field>
|
<div *ngIf="addressForm.controls['address_ownership'].value == 4 " fxFlex="33">
|
||||||
</div>
|
|
||||||
</div>
|
<mat-form-field style="width: 80%;">
|
||||||
|
<input matInput placeholder="Specify Ownership" formControlName="other_ownership" autocomplete="off">
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="addressForm.controls['address_ownership'].value == 3 " fxFlex="33">
|
||||||
|
<mat-form-field style="width: 80%;">
|
||||||
|
<input matInput placeholder="What is the monthly rent paid?" formControlName="rent_amt" autocomplete="off">
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxLayout="row wrap">
|
||||||
|
<div fxFlex="100">
|
||||||
|
<label>How long has business been operated from this premise?</label>
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput autocomplete="off" placeholder="Year(s)" formControlName="business_years">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput autocomplete="off" placeholder="Month(s)" formControlName="business_month" (change)="ConvertMonthintoYear($event.target.value)">
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<div fxFlex="100">
|
||||||
|
<mat-form-field style="width: 80%;">
|
||||||
|
<mat-select placeholder="Is there any other premises from which business activity is being run?"
|
||||||
|
formControlName="bussiness_activity" required>
|
||||||
|
<mat-option value="yes">Yes</mat-option>
|
||||||
|
<mat-option value="no">No</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Don't Remove To replace atlast of the PD Completion and creating new form (Customer Behaviour 221118 review doc : s.no 3.e )
|
<!-- Don't Remove To replace atlast of the PD Completion and creating new form (Customer Behaviour 221118 review doc : s.no 3.e )
|
||||||
@ -151,9 +164,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<mat-form-field *ngIf="PremisesOtherFlag == true" style="width: 40%">
|
<!-- <mat-form-field *ngIf="PremisesOtherFlag == true" style="width: 40%">
|
||||||
<input matInput placeholder="Specify Other Premises Type" formControlName="bussiness_address_type_others" (change)="otherValueset()" autocomplete="off">
|
<input matInput placeholder="Specify Premises Type" formControlName="bussiness_address_type_others" (change)="otherValueset()" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field> -->
|
||||||
|
<span *ngIf="PremisesOtherFlag == true">
|
||||||
|
<br>
|
||||||
|
<mat-form-field style="width: 40%">
|
||||||
|
<input matInput placeholder="Specify Premises Type" formControlName="bussiness_address_type_others" (change)="otherValueset()" autocomplete="off">
|
||||||
|
</mat-form-field>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
|
||||||
<span formArrayName="additional_premises">
|
<span formArrayName="additional_premises">
|
||||||
<div
|
<div
|
||||||
*ngFor="let item of addressForm.controls.additional_premises['controls']; let i = index;" [formGroupName]="i">
|
*ngFor="let item of addressForm.controls.additional_premises['controls']; let i = index;" [formGroupName]="i">
|
||||||
@ -184,7 +205,7 @@
|
|||||||
|
|
||||||
<!-- <mat-form-field *ngIf="addressForm.controls['premises_ownership'].value == 4 "> -->
|
<!-- <mat-form-field *ngIf="addressForm.controls['premises_ownership'].value == 4 "> -->
|
||||||
<mat-form-field *ngIf="item.get('premises_ownership').value == 4" style="width: 40%;">
|
<mat-form-field *ngIf="item.get('premises_ownership').value == 4" style="width: 40%;">
|
||||||
<input matInput placeholder="Specify Other Ownership" formControlName="premises_ownership_others" autocomplete="off">
|
<input matInput placeholder="Specify Ownership" formControlName="premises_ownership_others" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field *ngIf="item.get('premises_ownership').value == 3" style="width: 40%;">
|
<mat-form-field *ngIf="item.get('premises_ownership').value == 3" style="width: 40%;">
|
||||||
<input matInput placeholder="What is the monthly rent paid?" formControlName="premises_rent_amt" autocomplete="off">
|
<input matInput placeholder="What is the monthly rent paid?" formControlName="premises_rent_amt" autocomplete="off">
|
||||||
@ -383,10 +404,4 @@
|
|||||||
</mat-dialog-actions>
|
</mat-dialog-actions>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -125,61 +125,15 @@ export class AddressComponent implements OnInit {
|
|||||||
this.addressForm.controls.comment_locality.setValue(data.records.comment_locality);
|
this.addressForm.controls.comment_locality.setValue(data.records.comment_locality);
|
||||||
// this.addressForm.controls.customer_behaviour.setValue(data.records.customer_behaviour);
|
// this.addressForm.controls.customer_behaviour.setValue(data.records.customer_behaviour);
|
||||||
this.addressForm.controls.locality.setValue(data.records.locality);
|
this.addressForm.controls.locality.setValue(data.records.locality);
|
||||||
|
if(data.records.locality == 7 ){
|
||||||
|
this.addressForm.controls.locality_others.setValue(data.records.locality_others);
|
||||||
|
}
|
||||||
this.addressForm.controls.address_form_remark.setValue(data.records.address_form_remark);
|
this.addressForm.controls.address_form_remark.setValue(data.records.address_form_remark);
|
||||||
this.addressForm.controls.address_ownership.setValue(data.records.address_ownership);
|
this.addressForm.controls.address_ownership.setValue(data.records.address_ownership);
|
||||||
this.addressForm.controls.other_ownership.setValue(data.records.other_ownership);
|
this.addressForm.controls.other_ownership.setValue(data.records.other_ownership);
|
||||||
this.addressForm.controls.rent_amt.setValue(data.records.rent_amt);
|
this.addressForm.controls.rent_amt.setValue(data.records.rent_amt);
|
||||||
this.addressForm.controls.bussiness_activity.setValue(data.records.bussiness_activity);
|
this.addressForm.controls.bussiness_activity.setValue(data.records.bussiness_activity);
|
||||||
|
|
||||||
// if(data.records.bussiness_activity == 'yes') {
|
|
||||||
|
|
||||||
// this.bussiness_address_type = [];
|
|
||||||
|
|
||||||
// this.bussiness_address_type = (Object.keys(data.records.bussiness_address_type).map(function(key)
|
|
||||||
// {
|
|
||||||
// return data.records.bussiness_address_type[key].premises_types;
|
|
||||||
// }))
|
|
||||||
|
|
||||||
// // console.log(bussiness_address_type);
|
|
||||||
|
|
||||||
|
|
||||||
// let selectedPremisesDBData = Object.keys(data.records.bussiness_address_type).map(function (key) {
|
|
||||||
// return data.records.bussiness_address_type[key];
|
|
||||||
// });
|
|
||||||
|
|
||||||
// let enduse: any = [];
|
|
||||||
// let existPremises: any =[];
|
|
||||||
|
|
||||||
// selectedPremisesDBData.forEach(val => {
|
|
||||||
// enduse.push(val.premises_types);
|
|
||||||
// existPremises.push(val);
|
|
||||||
// });
|
|
||||||
|
|
||||||
// this.formPremisesArray = existPremises;
|
|
||||||
|
|
||||||
|
|
||||||
// this.addressForm.controls.bussiness_address_type.setValue(enduse);
|
|
||||||
|
|
||||||
// var additionalPremisesResult = Object.keys(data.records.additional_premises).map(function (key) {
|
|
||||||
// return data.records.additional_premises[key];
|
|
||||||
// });
|
|
||||||
|
|
||||||
// this.additional_premises = additionalPremisesResult;
|
|
||||||
|
|
||||||
// if (additionalPremisesResult.length == 0) {
|
|
||||||
// additionalPremisesControl.push(this.createPremises());
|
|
||||||
// } else {
|
|
||||||
// additionalPremisesResult.forEach(datas => {
|
|
||||||
// additionalPremisesControl.push(this.createPremises());
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// if(data.records.bussiness_address_type == 12) {
|
|
||||||
// this.addressForm.controls.bussiness_address_type_others.setValue(data.records.bussiness_address_type_others);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
if(data.records.bussiness_activity == 'yes' && data.records.bussiness_address_type !=null) {
|
if(data.records.bussiness_activity == 'yes' && data.records.bussiness_address_type !=null) {
|
||||||
this.addressForm.controls.business_years.setValue(data.records.business_years);
|
this.addressForm.controls.business_years.setValue(data.records.business_years);
|
||||||
this.addressForm.controls.business_month.setValue(data.records.business_month);
|
this.addressForm.controls.business_month.setValue(data.records.business_month);
|
||||||
@ -198,8 +152,6 @@ export class AddressComponent implements OnInit {
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
// console.log(this.bussiness_address_type);
|
|
||||||
// console.log(this.additional_premises);
|
|
||||||
|
|
||||||
this.selectedValue(this.bussiness_address_type,this.additional_premises);
|
this.selectedValue(this.bussiness_address_type,this.additional_premises);
|
||||||
if (data.records.locality_others) {
|
if (data.records.locality_others) {
|
||||||
@ -333,8 +285,9 @@ export class AddressComponent implements OnInit {
|
|||||||
control.removeAt(index);
|
control.removeAt(index);
|
||||||
}*/
|
}*/
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
//console.log('form data', this.addressForm.value);
|
|
||||||
if (!this.addressForm.valid) {
|
if (!this.addressForm.valid) {
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -345,7 +298,7 @@ export class AddressComponent implements OnInit {
|
|||||||
records.address_type_others = this.addressForm.controls.address_type_others.value;
|
records.address_type_others = this.addressForm.controls.address_type_others.value;
|
||||||
}
|
}
|
||||||
records.locality = this.locality.value;
|
records.locality = this.locality.value;
|
||||||
if (this.locality.value == 'Others') {
|
if (this.locality.value == 7) {
|
||||||
records.locality_others = this.addressForm.controls.locality_others.value;
|
records.locality_others = this.addressForm.controls.locality_others.value;
|
||||||
}
|
}
|
||||||
records.pd_location = this.pdLocation.value;
|
records.pd_location = this.pdLocation.value;
|
||||||
@ -369,16 +322,16 @@ export class AddressComponent implements OnInit {
|
|||||||
records.bussiness_address_type_others = this.addressForm.controls.bussiness_address_type_others.value;
|
records.bussiness_address_type_others = this.addressForm.controls.bussiness_address_type_others.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log('this.addressForm.controls.additional_premises.value',this.addressForm.controls.additional_premises.value);
|
||||||
this.addressForm.controls.additional_premises.value.forEach((val,index)=>
|
this.addressForm.controls.additional_premises.value.forEach((val,index)=>
|
||||||
{
|
{
|
||||||
//console.log(val);
|
|
||||||
|
console.log('val.premises_city',val.premises_city);
|
||||||
if(val.premises_city != ''){
|
if(val.premises_city != '' && val.premises_city != null){
|
||||||
this.formPremisesCityArray = [];
|
this.formPremisesCityArray = [];
|
||||||
val.premises_city.forEach(option => {
|
val.premises_city.forEach(option => {
|
||||||
this.formPremisesCityArray.push({additional_premises_city: option});
|
this.formPremisesCityArray.push({additional_premises_city: option});
|
||||||
this.addressForm.controls.additional_premises.value[index].premises_city = this.formPremisesCityArray;
|
this.addressForm.controls.additional_premises.value[index].premises_city = this.formPremisesCityArray;
|
||||||
// console.log(val);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -390,15 +343,14 @@ export class AddressComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
|
|
||||||
records.additional_premises = this.addressForm.controls.additional_premises.value;
|
records.additional_premises = this.addressForm.controls.additional_premises.value;
|
||||||
// console.log(this.formPremisesCityArray);
|
|
||||||
// console.log(this.addressForm.controls.premises.value);
|
|
||||||
records.pdid = this.pdid;
|
records.pdid = this.pdid;
|
||||||
records.formid = '5';
|
records.formid = '5';
|
||||||
// records.fk_createdby = '250';
|
// records.fk_createdby = '250';
|
||||||
console.log('params', records);
|
|
||||||
|
|
||||||
this._pd.saveForm(records).subscribe(data => {
|
this._pd.saveForm(records).subscribe(data => {
|
||||||
//console.log('data', data);
|
|
||||||
this.notifier.notify('success', 'Saved Successfully.');
|
this.notifier.notify('success', 'Saved Successfully.');
|
||||||
}, error => {
|
}, error => {
|
||||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
@ -414,22 +366,22 @@ export class AddressComponent implements OnInit {
|
|||||||
SelectedPremises($event){
|
SelectedPremises($event){
|
||||||
|
|
||||||
let premisesData = $event.source.value;
|
let premisesData = $event.source.value;
|
||||||
//console.log(premisesData);
|
|
||||||
|
|
||||||
if($event.checked === true ){
|
if($event.checked === true ){
|
||||||
|
|
||||||
//this.formPremisesArray.push({member: $event.source.value});
|
//this.formPremisesArray.push({member: $event.source.value});
|
||||||
//this.selectedSegmentDatas.push(CustomerSegmentName.name);
|
//this.selectedSegmentDatas.push(CustomerSegmentName.name);
|
||||||
//console.log('true',premisesData);
|
|
||||||
|
|
||||||
//console.log(this.formPremisesArray);
|
|
||||||
|
|
||||||
this.formPremisesArray.push({premises_types: $event.source.value});
|
this.formPremisesArray.push({premises_types: $event.source.value});
|
||||||
|
|
||||||
//console.log(this.formPremisesArray);
|
|
||||||
const control = <FormArray>this.addressForm.controls['additional_premises'];
|
const control = <FormArray>this.addressForm.controls['additional_premises'];
|
||||||
let array = this.addressData.filter(data => data.address_type_id == premisesData)[0];
|
let array = this.addressData.filter(data => data.address_type_id == premisesData)[0];
|
||||||
//console.log(array);
|
|
||||||
if(premisesData == 12){
|
if(premisesData == 12){
|
||||||
this.PremisesOtherFlag = true;
|
this.PremisesOtherFlag = true;
|
||||||
// this.PremisesLabel[this.z] = this.pdQuestionAddress.get('bussiness_address_type_others').value;
|
// this.PremisesLabel[this.z] = this.pdQuestionAddress.get('bussiness_address_type_others').value;
|
||||||
@ -455,7 +407,7 @@ export class AddressComponent implements OnInit {
|
|||||||
if(premisesData == 12){
|
if(premisesData == 12){
|
||||||
this.PremisesOtherFlag = false;
|
this.PremisesOtherFlag = false;
|
||||||
}
|
}
|
||||||
//console.log(this.formPremisesArray);
|
|
||||||
let index = this.formPremisesArray.findIndex(form=>form.premises_types== $event.source.value);
|
let index = this.formPremisesArray.findIndex(form=>form.premises_types== $event.source.value);
|
||||||
//console.log(index);
|
//console.log(index);
|
||||||
const control = <FormArray>this.addressForm.controls['additional_premises'];
|
const control = <FormArray>this.addressForm.controls['additional_premises'];
|
||||||
@ -481,78 +433,9 @@ export class AddressComponent implements OnInit {
|
|||||||
let z = this.z;
|
let z = this.z;
|
||||||
this.PremisesLabel[z-1] = this.addressForm.get('bussiness_address_type_others').value;
|
this.PremisesLabel[z-1] = this.addressForm.get('bussiness_address_type_others').value;
|
||||||
}
|
}
|
||||||
// checkaddress(value)
|
|
||||||
// {
|
|
||||||
// // console.log(value);
|
|
||||||
// if(value=="OTHERS")
|
|
||||||
// {
|
|
||||||
// this.addressRemarksAccess = true;
|
|
||||||
// }else
|
|
||||||
// {
|
|
||||||
// this.addressRemarksAccess = false;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// SelectedPremises($event){
|
|
||||||
// console.log('event',$event);
|
|
||||||
|
|
||||||
// let premisesData = $event.source.value;
|
|
||||||
|
|
||||||
|
|
||||||
// if($event.source._selected === true ){
|
|
||||||
|
|
||||||
// //this.formPremisesArray.push({member: $event.source.value});
|
|
||||||
// //this.selectedSegmentDatas.push(CustomerSegmentName.name);
|
|
||||||
// //console.log('true',premisesData);
|
|
||||||
|
|
||||||
// //console.log(this.formPremisesArray);
|
|
||||||
|
|
||||||
// this.formPremisesArray.push({premises_types: $event.source.value});
|
|
||||||
|
|
||||||
// //console.log(this.formPremisesArray);
|
|
||||||
|
|
||||||
// let array = this.addressData.filter(data => data.address_type_id == premisesData);
|
|
||||||
|
|
||||||
// if(premisesData == 12){
|
|
||||||
// this.PremisesOtherFlag = true;
|
|
||||||
// this.PremisesLabel[this.z] = this.addressForm.get('bussiness_address_type_others').value;
|
|
||||||
// }
|
|
||||||
// else{
|
|
||||||
// this.PremisesLabel[this.z] = array[0].address_type;
|
|
||||||
// }
|
|
||||||
// this.z++;
|
|
||||||
|
|
||||||
|
|
||||||
// const control = <FormArray>this.addressForm.controls['additional_premises'];
|
|
||||||
// control.push(this.createPremises());
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// }
|
|
||||||
// else if($event.source._selected === false ){
|
|
||||||
|
|
||||||
// console.log('false',premisesData);
|
|
||||||
|
|
||||||
|
|
||||||
// if(premisesData == 12){
|
|
||||||
// this.PremisesOtherFlag = false;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// const control = <FormArray>this.addressForm.controls['additional_premises'];
|
|
||||||
// control.removeAt(this.z);
|
|
||||||
// this.z--;
|
|
||||||
// //let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName.name);
|
|
||||||
// //this.selectedSegmentDatas.splice(index,1);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
selectedValue(e,data)
|
selectedValue(e,data)
|
||||||
{
|
{
|
||||||
// console.log('501 function',);
|
|
||||||
// console.log('inside function in bussiness_address_type,',e);
|
|
||||||
// console.log('inside function in this.additional_premises,',data);
|
|
||||||
|
|
||||||
let premisesData = e ;
|
let premisesData = e ;
|
||||||
this.tempArr = [];
|
this.tempArr = [];
|
||||||
@ -562,12 +445,12 @@ export class AddressComponent implements OnInit {
|
|||||||
that.addressData[key].status = 0;
|
that.addressData[key].status = 0;
|
||||||
return that.addressData[key];
|
return that.addressData[key];
|
||||||
})
|
})
|
||||||
//console.log(this.addressData);
|
|
||||||
premisesData.forEach((val,index)=>
|
premisesData.forEach((val,index)=>
|
||||||
{
|
{
|
||||||
//console.log(val);
|
|
||||||
this.z++;
|
this.z++;
|
||||||
// console.log(this.addressTypes);
|
|
||||||
this.formPremisesArray.push({premises_types: val});
|
this.formPremisesArray.push({premises_types: val});
|
||||||
|
|
||||||
this.tempArr.push(this.addressData.filter(add=>add.address_type_id==val)[0]);
|
this.tempArr.push(this.addressData.filter(add=>add.address_type_id==val)[0]);
|
||||||
@ -579,6 +462,7 @@ export class AddressComponent implements OnInit {
|
|||||||
{
|
{
|
||||||
return data[index].premises_city[key].additional_premises_city;
|
return data[index].premises_city[key].additional_premises_city;
|
||||||
});
|
});
|
||||||
|
//data[index].premises_city = data[index].premises_city.additional_premises_city;
|
||||||
}
|
}
|
||||||
this.addressData.forEach(data=>
|
this.addressData.forEach(data=>
|
||||||
{
|
{
|
||||||
@ -621,7 +505,5 @@ export class AddressComponent implements OnInit {
|
|||||||
this.addressForm.controls.business_years.setValue(+business_year + +Math.floor(converted_year));
|
this.addressForm.controls.business_years.setValue(+business_year + +Math.floor(converted_year));
|
||||||
this.addressForm.controls.business_month.setValue(Math.floor(converted_month));
|
this.addressForm.controls.business_month.setValue(Math.floor(converted_month));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -17,7 +17,9 @@
|
|||||||
<mat-card style="margin: 12px;">
|
<mat-card style="margin: 12px;">
|
||||||
<h6 style="margin: 12px;">Raw Material #{{l+1}}</h6>
|
<h6 style="margin: 12px;">Raw Material #{{l+1}}</h6>
|
||||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
|
<!--<pre>{{m_manufacturingProducts[0] | json}}</pre>-->
|
||||||
<mat-form-field style="width:30%">
|
<mat-form-field style="width:30%">
|
||||||
|
<!--{{m_manufacturingProducts[0] | json}}-->
|
||||||
<mat-select placeholder="Manufacturing Product Name" formControlName="manufacturing_product_name">
|
<mat-select placeholder="Manufacturing Product Name" formControlName="manufacturing_product_name">
|
||||||
<mat-option *ngFor="let pm of m_manufacturingProducts[0]" [value]="pm.name">{{ pm.name }}</mat-option>
|
<mat-option *ngFor="let pm of m_manufacturingProducts[0]" [value]="pm.name">{{ pm.name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
|||||||
@ -168,31 +168,36 @@ export class ClientInfoComponent implements OnInit {
|
|||||||
// Load form details for manufacturing
|
// Load form details for manufacturing
|
||||||
let arr = record.filter(data => data.type_of_activity_id == 1);
|
let arr = record.filter(data => data.type_of_activity_id == 1);
|
||||||
if (arr.length > 0) {
|
if (arr.length > 0) {
|
||||||
let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (key) {
|
// let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (key) {
|
||||||
return dataForm.main_raw_materials[key];
|
// return dataForm.main_raw_materials[key];
|
||||||
});
|
// });
|
||||||
|
let api_main_raw_materials = dataForm.manufacturing_details[0].main_raw_materials;
|
||||||
|
|
||||||
this.initManufacturingProductsDetails(api_main_raw_materials);
|
this.initManufacturingProductsDetails(api_main_raw_materials);
|
||||||
this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(dataForm.main_raw_materials_total_payments_percent_on_credit || null);
|
this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(dataForm.manufacturing_details[0].main_raw_materials_total_payments_percent_on_credit || null);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load form details for the wholeshale trading details
|
// Load form details for the wholeshale trading details
|
||||||
let arr1 = record.filter(data => data.type_of_activity_id == 3);
|
let arr1 = record.filter(data => data.type_of_activity_id == 3);
|
||||||
if (arr1.length > 0) {
|
if (arr1.length > 0) {
|
||||||
let api_trading_products = Object.keys(dataForm.trading_products).map(function (key) {
|
// let api_trading_products = Object.keys(dataForm.trading_products).map(function (key) {
|
||||||
return dataForm.trading_products[key];
|
// return dataForm.trading_products[key];
|
||||||
});
|
// });
|
||||||
|
let api_trading_products = dataForm.trade_details[0].trading_products;
|
||||||
|
|
||||||
this.initTradingProductsDetails(api_trading_products);
|
this.initTradingProductsDetails(api_trading_products);
|
||||||
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(dataForm.trading_products_total_payments_percent_on_credit || null);
|
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(dataForm.trade_details[0].trading_products_total_payments_percent_on_credit || null);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load form details for the service provider prduct details
|
// Load form details for the service provider prduct details
|
||||||
let arr2 = record.filter(data => data.type_of_activity_id == 4);
|
let arr2 = record.filter(data => data.type_of_activity_id == 4);
|
||||||
if (arr2.length > 0) {
|
if (arr2.length > 0) {
|
||||||
let api_service_provider_products = Object.keys(dataForm.service_products).map(function (key) {
|
// let api_service_provider_products = Object.keys(dataForm.service_products).map(function (key) {
|
||||||
return dataForm.service_products[key];
|
// return dataForm.service_products[key];
|
||||||
});
|
// });
|
||||||
|
let api_service_provider_products = dataForm.service_provider_details[0].service_products;
|
||||||
this.initServiceProviderProductsDetails(api_service_provider_products);
|
this.initServiceProviderProductsDetails(api_service_provider_products);
|
||||||
this._supplierQuesFrom.controls['service_provider_details']['controls'][0].controls['service_products_total_payments_percent_on_credit'].setValue(dataForm.service_products_total_payments_percent_on_credit || null);
|
this._supplierQuesFrom.controls['service_provider_details']['controls'][0].controls['service_products_total_payments_percent_on_credit'].setValue(dataForm.service_provider_details[0].service_products_total_payments_percent_on_credit || null);
|
||||||
}
|
}
|
||||||
// Load form details for the retail trading details
|
// Load form details for the retail trading details
|
||||||
let arr3 = record.filter(data => data.type_of_activity_id == 2);
|
let arr3 = record.filter(data => data.type_of_activity_id == 2);
|
||||||
@ -218,7 +223,7 @@ export class ClientInfoComponent implements OnInit {
|
|||||||
let arr1 = record.filter(data => data.type_of_activity_id == 3);
|
let arr1 = record.filter(data => data.type_of_activity_id == 3);
|
||||||
if (arr1.length > 0) {
|
if (arr1.length > 0) {
|
||||||
this.initTradingProductsDetails(null);
|
this.initTradingProductsDetails(null);
|
||||||
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(dataForm.trading_products_total_payments_percent_on_credit || null);
|
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(null);
|
||||||
}
|
}
|
||||||
let arr2 = record.filter(data => data.type_of_activity_id == 4);
|
let arr2 = record.filter(data => data.type_of_activity_id == 4);
|
||||||
if (arr2.length > 0) {
|
if (arr2.length > 0) {
|
||||||
@ -226,7 +231,7 @@ export class ClientInfoComponent implements OnInit {
|
|||||||
return dataForm.service_products[key];
|
return dataForm.service_products[key];
|
||||||
});
|
});
|
||||||
this.initServiceProviderProductsDetails(api_service_provider_products);
|
this.initServiceProviderProductsDetails(api_service_provider_products);
|
||||||
this._supplierQuesFrom.controls['service_provider_details']['controls'][0].controls['service_products_total_payments_percent_on_credit'].setValue(dataForm.service_products_total_payments_percent_on_credit || null);
|
this._supplierQuesFrom.controls['service_provider_details']['controls'][0].controls['service_products_total_payments_percent_on_credit'].setValue(null);
|
||||||
}
|
}
|
||||||
// Load form details for the retail trading details
|
// Load form details for the retail trading details
|
||||||
let arr3 = record.filter(data => data.type_of_activity_id == 2);
|
let arr3 = record.filter(data => data.type_of_activity_id == 2);
|
||||||
@ -340,7 +345,7 @@ export class ClientInfoComponent implements OnInit {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
return this._formBuilder.group({
|
return this._formBuilder.group({
|
||||||
manufacturing_product_name: [records.manufacturing_raw_material_name || null],
|
manufacturing_product_name: [records.manufacturing_product_name || null],
|
||||||
manufacturing_client_name: [records.manufacturing_client_name || null],
|
manufacturing_client_name: [records.manufacturing_client_name || null],
|
||||||
manufacturing_contact_person_name: [records.manufacturing_contact_person_name || null],
|
manufacturing_contact_person_name: [records.manufacturing_contact_person_name || null],
|
||||||
manufacturing_contact_person_mobile_number: [records.manufacturing_contact_person_mobile_number || null],
|
manufacturing_contact_person_mobile_number: [records.manufacturing_contact_person_mobile_number || null],
|
||||||
|
|||||||
@ -90,6 +90,10 @@
|
|||||||
<input matInput placeholder="Top Up Amount" (keypress)="keyPress($event)" formControlName="topup_amount" (keyup)="inWords($event,5)" autocomplete="off">
|
<input matInput placeholder="Top Up Amount" (keypress)="keyPress($event)" formControlName="topup_amount" (keyup)="inWords($event,5)" autocomplete="off">
|
||||||
<mat-hint align="end" *ngIf="loanDetailsForm.controls['topup_amount'].value != ''">{{"₹"}} {{topUpAmtInWords}} Only</mat-hint>
|
<mat-hint align="end" *ngIf="loanDetailsForm.controls['topup_amount'].value != ''">{{"₹"}} {{topUpAmtInWords}} Only</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field *ngIf="loanDetailsForm.controls['is_topup'].value == 'yes' && loanDetailsForm.controls['is_topup'].value != '' " style="width: 30%">
|
||||||
|
<input matInput placeholder="End Use of Top Up" formControlName="end_use_topup" autocomplete="off">
|
||||||
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="loanDetailsForm.controls['is_transfer'].value != 'yes' && loanDetailsForm.controls['is_transfer'].value != '' ">
|
<div *ngIf="loanDetailsForm.controls['is_transfer'].value != 'yes' && loanDetailsForm.controls['is_transfer'].value != '' ">
|
||||||
|
|
||||||
@ -97,29 +101,41 @@
|
|||||||
<input matInput placeholder="Amount of Own Contribution" formControlName="own_contribution" (keypress)="keyPress($event)" required (keyup)="inWords($event,4)" autocomplete="off">
|
<input matInput placeholder="Amount of Own Contribution" formControlName="own_contribution" (keypress)="keyPress($event)" required (keyup)="inWords($event,4)" autocomplete="off">
|
||||||
<mat-hint align="end" *ngIf="loanDetailsForm.controls['own_contribution'].value != ''">{{"₹"}} {{ownContributionInWords}} Only</mat-hint>
|
<mat-hint align="end" *ngIf="loanDetailsForm.controls['own_contribution'].value != ''">{{"₹"}} {{ownContributionInWords}} Only</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width: 30%">
|
<mat-form-field style="width: 30%">
|
||||||
<mat-select placeholder="Source" formControlName="source" required>
|
<mat-select (selectionChange)="sourceChange($event.value)" placeholder="Source of Own Contribution" formControlName="source" required multiple>
|
||||||
<mat-option *ngFor="let sour of m_sourceofamount" [value]="sour.id">{{ sour.name }}</mat-option>
|
<mat-option *ngFor="let sour of m_sourceofamount" [value]="sour.id">{{ sour.name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
<!--<mat-select placeholder="Source"
|
<mat-form-field *ngIf="isPLSource" style="width: 30%">
|
||||||
|
<input matInput placeholder="Specify Personal Loan" formControlName="personal_loan_source" autocomplete="off">
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field *ngIf="isOtherSource" style="width: 30%">
|
||||||
|
<input matInput placeholder="Specify Other Sources" formControlName="other_source" autocomplete="off">
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
|
||||||
|
<!--<mat-form-field>
|
||||||
|
<mat-select placeholder="Source"
|
||||||
formControlName="source">
|
formControlName="source">
|
||||||
<mat-option value="borrowed">Borrowed from Relatives & Friends</mat-option>
|
<mat-option value="borrowed">Borrowed from Relatives & Friends</mat-option>
|
||||||
<mat-option value="own_money">Own money</mat-option>
|
<mat-option value="own_money">Own money</mat-option>
|
||||||
<mat-option value="other">Loan from another lender</mat-option>
|
<mat-option value="other">Loan from another lender</mat-option>
|
||||||
</mat-select>-->
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
</mat-form-field>
|
|
||||||
<mat-form-field *ngIf="loanDetailsForm.controls['source'].value =='other'" style="width: 35%">
|
<mat-form-field *ngIf="loanDetailsForm.controls['source'].value =='other'" style="width: 35%">
|
||||||
<input matInput placeholder="Specify Lender Name and Type" formControlName="lender_name_type" autocomplete="off">
|
<input matInput placeholder="Specify Lender Name and Type" formControlName="lender_name_type" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<mat-form-field style="width: 30%">
|
<mat-form-field style="width: 60%">
|
||||||
<input matInput placeholder="EMI Comfort Level" formControlName="emi_level" (keypress)="keyPress($event)" required autocomplete="off">
|
<input matInput placeholder="EMI Amount Comfortable Paying" formControlName="emi_level" (keypress)="keyPress($event)" (keyup)="inWords($event,6)" required autocomplete="off">
|
||||||
|
<mat-hint align="end" *ngIf="loanDetailsForm.controls['emi_level'].value != ''">{{"₹"}} {{emiAmtInWords}} Only</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<!-- <div *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "> -->
|
<!-- <div *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "> -->
|
||||||
<mat-card *ngIf="mortageCardAccess">
|
<mat-card *ngIf="mortageCardAccess">
|
||||||
@ -165,7 +181,7 @@
|
|||||||
|
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select placeholder="Status of Construction" formControlName="construction_status" required>
|
<mat-select placeholder="Status of Construction" formControlName="construction_status" required>
|
||||||
<mat-option *ngFor="let status of m_statusofCunstruction" [value]="status.id">{{ status.name }} {{status.id}}</mat-option>
|
<mat-option *ngFor="let status of m_statusofCunstruction" [value]="status.id">{{ status.name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
@ -183,7 +199,8 @@
|
|||||||
|
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Estimate Market Value as Per Customer"
|
<input matInput placeholder="Estimate Market Value as Per Customer"
|
||||||
formControlName="emv_per_customer" (keypress)="keyPress($event)" required autocomplete="off">
|
formControlName="emv_per_customer" (keypress)="keyPress($event)" (keyup)="inWords($event,7)" required autocomplete="off">
|
||||||
|
<mat-hint align="end" *ngIf="loanDetailsForm.controls['emv_per_customer'].value != ''">{{"₹"}} {{emvAmtInWords}} Only</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<!-- <mat-form-field>
|
<!-- <mat-form-field>
|
||||||
<input matInput placeholder="Value as Per Agreement"
|
<input matInput placeholder="Value as Per Agreement"
|
||||||
|
|||||||
@ -42,11 +42,13 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
subProductName: any;
|
subProductName: any;
|
||||||
|
|
||||||
isOtherPurpose: boolean = false;
|
isOtherPurpose: boolean = false;
|
||||||
isSource: boolean = false;
|
isOtherSource: boolean = false;
|
||||||
|
isPLSource: boolean = false;
|
||||||
mortageCheck : boolean = true;
|
mortageCheck : boolean = true;
|
||||||
OtherOwnerFlag : boolean;
|
OtherOwnerFlag : boolean;
|
||||||
|
|
||||||
endUserList: any = [];
|
endUserList: any = [];
|
||||||
|
sourceList : any = [];
|
||||||
ownerNames: any = [];
|
ownerNames: any = [];
|
||||||
m_endUseofLoad = [];
|
m_endUseofLoad = [];
|
||||||
m_sourceofamount = [];
|
m_sourceofamount = [];
|
||||||
@ -59,6 +61,8 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
valAsPerAgmtInWords : any;
|
valAsPerAgmtInWords : any;
|
||||||
ownContributionInWords : any;
|
ownContributionInWords : any;
|
||||||
topUpAmtInWords: any;
|
topUpAmtInWords: any;
|
||||||
|
emiAmtInWords : any;
|
||||||
|
emvAmtInWords : any;
|
||||||
pageTitle: string ="Loan Details";
|
pageTitle: string ="Loan Details";
|
||||||
|
|
||||||
mortageCardAccess: boolean;
|
mortageCardAccess: boolean;
|
||||||
@ -159,6 +163,9 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
this.loanDetailsForm.controls['topup_amount'].setValue(value.records.topup_amount);
|
this.loanDetailsForm.controls['topup_amount'].setValue(value.records.topup_amount);
|
||||||
this.topUpAmtInWords = this._pd.convertNumberToWords(value.records.topup_amount);
|
this.topUpAmtInWords = this._pd.convertNumberToWords(value.records.topup_amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.loanDetailsForm.controls['end_use_topup'].setValue(value.records.end_use_topup);
|
||||||
|
|
||||||
if (value.records.lender) {
|
if (value.records.lender) {
|
||||||
this.loanDetailsForm.controls['lender'].setValue(value.records.lender);
|
this.loanDetailsForm.controls['lender'].setValue(value.records.lender);
|
||||||
}
|
}
|
||||||
@ -166,17 +173,46 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
this.loanDetailsForm.controls['other_bt_lender'].setValue(value.records.other_bt_lender);
|
this.loanDetailsForm.controls['other_bt_lender'].setValue(value.records.other_bt_lender);
|
||||||
}
|
}
|
||||||
if(value.records.is_transfer != 'yes'){
|
if(value.records.is_transfer != 'yes'){
|
||||||
|
|
||||||
|
let source = Object.keys(value.records.source_group).map(function(key) {
|
||||||
|
return value.records.source_group[key];
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(source);
|
||||||
|
|
||||||
|
let dbsourcelist : any = [];
|
||||||
|
source.forEach(val => {
|
||||||
|
dbsourcelist.push(val.sources);
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log('sources',dbsourcelist);
|
||||||
|
|
||||||
this.loanDetailsForm.controls['own_contribution'].setValue(value.records.own_contribution);
|
this.loanDetailsForm.controls['own_contribution'].setValue(value.records.own_contribution);
|
||||||
if(value.records.own_contribution){ this.ownContributionInWords = this._pd.convertNumberToWords(value.records.own_contribution); }
|
if(value.records.own_contribution){ this.ownContributionInWords = this._pd.convertNumberToWords(value.records.own_contribution); }
|
||||||
|
|
||||||
this.loanDetailsForm.controls['source'].setValue(value.records.source);
|
this.loanDetailsForm.controls['source'].setValue(dbsourcelist);
|
||||||
|
this.sourceChange(dbsourcelist);
|
||||||
|
|
||||||
|
if(value.records.other_source) {
|
||||||
|
// this.isOtherSource = true;
|
||||||
|
this.loanDetailsForm.controls['other_source'].setValue(value.records.other_source);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(value.records.personal_loan_source) {
|
||||||
|
// this.isPLSource = true;
|
||||||
|
this.loanDetailsForm.controls['personal_loan_source'].setValue(value.records.personal_loan_source);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value.records.lender_name_type) {
|
// if (value.records.lender_name_type) {
|
||||||
this.loanDetailsForm.controls['lender_name_type'].setValue(value.records.lender_name_type);
|
// this.loanDetailsForm.controls['lender_name_type'].setValue(value.records.lender_name_type);
|
||||||
|
// }
|
||||||
|
|
||||||
|
if(value.records.emi_level){
|
||||||
|
this.loanDetailsForm.controls['emi_level'].setValue(value.records.emi_level);
|
||||||
|
this.emiAmtInWords = this._pd.convertNumberToWords(value.records.emi_level);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.loanDetailsForm.controls['emi_level'].setValue(value.records.emi_level);
|
|
||||||
this.loanDetailsForm.controls['property_type'].setValue(value.records.property_type);
|
this.loanDetailsForm.controls['property_type'].setValue(value.records.property_type);
|
||||||
this.propertyType = value.records.property_type;
|
this.propertyType = value.records.property_type;
|
||||||
//console.log(value.records.property_type);
|
//console.log(value.records.property_type);
|
||||||
@ -193,7 +229,11 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
else{
|
else{
|
||||||
this.loanDetailsForm.controls['percentage_of_construction'].setValue('');
|
this.loanDetailsForm.controls['percentage_of_construction'].setValue('');
|
||||||
}
|
}
|
||||||
this.loanDetailsForm.controls['emv_per_customer'].setValue(value.records.emv_per_customer);
|
if(value.records.emv_per_customer != ''){
|
||||||
|
this.loanDetailsForm.controls['emv_per_customer'].setValue(value.records.emv_per_customer);
|
||||||
|
this.emvAmtInWords = this._pd.convertNumberToWords(value.records.emv_per_customer);
|
||||||
|
}
|
||||||
|
|
||||||
// this.loanDetailsForm.controls['value_per_agreement'].setValue(value.records.value_per_agreement);
|
// this.loanDetailsForm.controls['value_per_agreement'].setValue(value.records.value_per_agreement);
|
||||||
// if(value.records.value_per_agreement){ this.valAsPerAgmtInWords = this._pd.convertNumberToWords(value.records.value_per_agreement); }
|
// if(value.records.value_per_agreement){ this.valAsPerAgmtInWords = this._pd.convertNumberToWords(value.records.value_per_agreement); }
|
||||||
this.loanDetailsForm.controls['loandetails_remarks'].setValue(value.records.loandetails_remarks);
|
this.loanDetailsForm.controls['loandetails_remarks'].setValue(value.records.loandetails_remarks);
|
||||||
@ -314,11 +354,14 @@ getM_sourceofamount() {
|
|||||||
is_topup: [''],
|
is_topup: [''],
|
||||||
balance_transfer_amount: [''],
|
balance_transfer_amount: [''],
|
||||||
topup_amount: [''],
|
topup_amount: [''],
|
||||||
|
end_use_topup:[''],
|
||||||
lender: [''],
|
lender: [''],
|
||||||
other_bt_lender : [''],
|
other_bt_lender : [''],
|
||||||
own_contribution: [''],
|
own_contribution: [''],
|
||||||
source: [''],
|
source: [''],
|
||||||
lender_name_type: [''],
|
other_source:[''],
|
||||||
|
personal_loan_source:[''],
|
||||||
|
//lender_name_type: [''],
|
||||||
emi_level: ['', Validators.compose([Validators.required])],
|
emi_level: ['', Validators.compose([Validators.required])],
|
||||||
property_type: ['', Validators.compose([Validators.required])],
|
property_type: ['', Validators.compose([Validators.required])],
|
||||||
property_type_others:[''],
|
property_type_others:[''],
|
||||||
@ -343,24 +386,48 @@ getM_sourceofamount() {
|
|||||||
|
|
||||||
endUserChange(event) {
|
endUserChange(event) {
|
||||||
this.endUserList = [];
|
this.endUserList = [];
|
||||||
|
let OthersAvaliable;
|
||||||
event.forEach(option => {
|
event.forEach(option => {
|
||||||
let othersData = this.m_endUseofLoad.filter(sub=>sub.subproduct_id==option)[0];
|
let othersData = this.m_endUseofLoad.filter(sub=>sub.subproduct_id==option)[0];
|
||||||
othersData = othersData.name.substr(0,6).toLowerCase();
|
OthersAvaliable = othersData.name.substr(0,6).toLowerCase();
|
||||||
|
console.log('other',othersData);
|
||||||
|
console.log('',OthersAvaliable);
|
||||||
|
|
||||||
this.endUserList.push({ end_use: option });
|
this.endUserList.push({ end_use: option });
|
||||||
if (othersData == 'others') {
|
|
||||||
this.isOtherPurpose = true;
|
|
||||||
return ;
|
|
||||||
}else
|
|
||||||
{
|
|
||||||
this.isOtherPurpose = false;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (OthersAvaliable == 'others') {
|
||||||
|
this.isOtherPurpose = true;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
this.isOtherPurpose = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('e',event);
|
||||||
|
|
||||||
|
//this.isOtherPurpose = event.some(e => e == 'others') // this return true or false Only;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sourceChange(evt) {
|
||||||
|
// console.log('source Changed Values',evt);
|
||||||
|
|
||||||
|
// this.isOtherSource = (evt.some(e => e == 4) == true) ? true : false ;
|
||||||
|
// this.isPLSource = (evt.some(e => e == 3) == true) ? true : false ;
|
||||||
|
|
||||||
|
this.isOtherSource = evt.some(e => e == 4) // this return true or false Only;
|
||||||
|
this.isPLSource = evt.some(e => e == 3) // this return true or false Only;
|
||||||
|
|
||||||
|
this.sourceList = [];
|
||||||
|
|
||||||
|
evt.forEach(option => {
|
||||||
|
this.sourceList.push({source: option});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
ownerNameChange(event) {
|
ownerNameChange(event) {
|
||||||
let EventValue;
|
let EventValue;
|
||||||
|
|
||||||
event.value.forEach(option => {
|
event.value.forEach(option => {
|
||||||
EventValue = option;
|
EventValue = option;
|
||||||
if(EventValue == 'Others'){
|
if(EventValue == 'Others'){
|
||||||
@ -397,7 +464,7 @@ getM_sourceofamount() {
|
|||||||
|
|
||||||
if (this.isOtherPurpose) {
|
if (this.isOtherPurpose) {
|
||||||
records.end_use_other = this.loanDetailsForm.controls['end_use_other'].value;
|
records.end_use_other = this.loanDetailsForm.controls['end_use_other'].value;
|
||||||
}
|
}else{ records.end_use_other = '' ;}
|
||||||
records.is_transfer = this.loanDetailsForm.controls['is_transfer'].value;
|
records.is_transfer = this.loanDetailsForm.controls['is_transfer'].value;
|
||||||
records.is_topup = this.loanDetailsForm.controls['is_topup'].value;
|
records.is_topup = this.loanDetailsForm.controls['is_topup'].value;
|
||||||
if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') {
|
if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') {
|
||||||
@ -405,14 +472,27 @@ getM_sourceofamount() {
|
|||||||
}
|
}
|
||||||
else if(this.loanDetailsForm.controls['is_transfer'].value == 'no') {
|
else if(this.loanDetailsForm.controls['is_transfer'].value == 'no') {
|
||||||
records.own_contribution = this.loanDetailsForm.controls['own_contribution'].value;
|
records.own_contribution = this.loanDetailsForm.controls['own_contribution'].value;
|
||||||
records.source = this.loanDetailsForm.controls['source'].value;
|
// records.source = this.loanDetailsForm.controls['source'].value;
|
||||||
if (this.loanDetailsForm.controls['source'].value == 'other') {
|
// if (this.loanDetailsForm.controls['source'].value == 'other') {
|
||||||
records.lender_name_type = this.loanDetailsForm.controls['lender_name_type'].value;
|
// records.lender_name_type = this.loanDetailsForm.controls['lender_name_type'].value;
|
||||||
}
|
// }
|
||||||
|
// if (this.loanDetailsForm.controls['source'].value == 4) {
|
||||||
|
// records.other_source = this.loanDetailsForm.controls['other_source'].value;
|
||||||
|
// }
|
||||||
|
|
||||||
|
let dataSource_list = [];
|
||||||
|
this.loanDetailsForm.controls['source'].value.forEach(element => {
|
||||||
|
dataSource_list.push({sources: element})
|
||||||
|
});
|
||||||
|
records.source_group = dataSource_list;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (this.loanDetailsForm.controls['is_topup'].value == 'yes') {
|
if (this.loanDetailsForm.controls['is_topup'].value == 'yes') {
|
||||||
records.topup_amount = this.loanDetailsForm.controls['topup_amount'].value;
|
records.topup_amount = this.loanDetailsForm.controls['topup_amount'].value;
|
||||||
}
|
}
|
||||||
|
records.end_use_topup = this.loanDetailsForm.controls['end_use_topup'].value;
|
||||||
|
|
||||||
if (this.loanDetailsForm.controls['is_topup'].value == 'yes' || this.loanDetailsForm.controls['is_transfer'].value == 'yes') {
|
if (this.loanDetailsForm.controls['is_topup'].value == 'yes' || this.loanDetailsForm.controls['is_transfer'].value == 'yes') {
|
||||||
records.lender = this.loanDetailsForm.controls['lender'].value;
|
records.lender = this.loanDetailsForm.controls['lender'].value;
|
||||||
}
|
}
|
||||||
@ -430,7 +510,19 @@ getM_sourceofamount() {
|
|||||||
dataOwner_name.push({owner_name: element})
|
dataOwner_name.push({owner_name: element})
|
||||||
});
|
});
|
||||||
records.owner_name_group = dataOwner_name;
|
records.owner_name_group = dataOwner_name;
|
||||||
records.other_owners_name = this.loanDetailsForm.controls['other_owners_name'].value;
|
|
||||||
|
if(this.OtherOwnerFlag){
|
||||||
|
records.other_owners_name = this.loanDetailsForm.controls['other_owners_name'].value;
|
||||||
|
}else{ records.other_owners_name = ''; }
|
||||||
|
|
||||||
|
if(this.isOtherSource){
|
||||||
|
records.other_source = this.loanDetailsForm.controls['other_source'].value;
|
||||||
|
}else{ records.other_source = ''; }
|
||||||
|
|
||||||
|
if(this.isPLSource){
|
||||||
|
records.personal_loan_source = this.loanDetailsForm.controls['personal_loan_source'].value;
|
||||||
|
}else{ records.personal_loan_source = ''; }
|
||||||
|
|
||||||
records.construction_status = this.loanDetailsForm.controls['construction_status'].value;
|
records.construction_status = this.loanDetailsForm.controls['construction_status'].value;
|
||||||
records.percentage_of_construction = this.loanDetailsForm.controls['percentage_of_construction'].value;
|
records.percentage_of_construction = this.loanDetailsForm.controls['percentage_of_construction'].value;
|
||||||
records.emv_per_customer = this.loanDetailsForm.controls['emv_per_customer'].value;
|
records.emv_per_customer = this.loanDetailsForm.controls['emv_per_customer'].value;
|
||||||
@ -510,6 +602,12 @@ getM_sourceofamount() {
|
|||||||
case 5 :
|
case 5 :
|
||||||
this.topUpAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
this.topUpAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||||
break;
|
break;
|
||||||
|
case 6 :
|
||||||
|
this.emiAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
this.emvAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -132,19 +132,22 @@ export class SupplierInfoComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
let arr = record.filter(data => data.type_of_activity_id == 1);
|
let arr = record.filter(data => data.type_of_activity_id == 1);
|
||||||
if(arr.length > 0) {
|
if(arr.length > 0) {
|
||||||
let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (key) {
|
// let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (key) {
|
||||||
return dataForm.main_raw_materials[key];
|
// return dataForm.main_raw_materials[key];
|
||||||
});
|
// });
|
||||||
|
let api_main_raw_materials = dataForm.manufacturing_details[0].main_raw_materials;
|
||||||
|
|
||||||
this.initManufacturingProductsDetails(api_main_raw_materials);
|
this.initManufacturingProductsDetails(api_main_raw_materials);
|
||||||
this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(dataForm.main_raw_materials_total_payments_percent_on_credit || null);
|
this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(dataForm.manufacturing_details[0].main_raw_materials_total_payments_percent_on_credit || null);
|
||||||
}
|
}
|
||||||
let arr1 = record.filter(data => data.type_of_activity_id == 2 || 3);
|
let arr1 = record.filter(data => data.type_of_activity_id == 2 || 3);
|
||||||
if(arr1.length > 0) {
|
if(arr1.length > 0) {
|
||||||
let api_trading_products = Object.keys(dataForm.trading_products).map(function (key) {
|
// let api_trading_products = Object.keys(dataForm.trading_products).map(function (key) {
|
||||||
return dataForm.trading_products[key];
|
// return dataForm.trading_products[key];
|
||||||
});
|
// });
|
||||||
|
let api_trading_products = dataForm.trade_details[0].trading_products;
|
||||||
this.initTradingProductsDetails(api_trading_products);
|
this.initTradingProductsDetails(api_trading_products);
|
||||||
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(dataForm.trading_products_total_payments_percent_on_credit || null);
|
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(dataForm.trade_details[0].trading_products_total_payments_percent_on_credit || null);
|
||||||
}
|
}
|
||||||
this.noRecordsFound = true;
|
this.noRecordsFound = true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above"
|
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>
|
(click)="getPDStart(viewID)"><mat-icon>question_answer</mat-icon></button>
|
||||||
|
|
||||||
<button *ngIf="master.pd_type_name && currentPDStatus===pdStatusCheck.QC_COMPLETED || pdStatusCheck.COMPLETED" mat-raised-button
|
<button *ngIf="master.pd_type_name && (currentPDStatus===pdStatusCheck.QC_COMPLETED || currentPDStatus===pdStatusCheck.COMPLETED)" mat-raised-button
|
||||||
mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above"
|
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>
|
(click)="getPDIDReport(viewID)"><mat-icon>ballot</mat-icon></button>
|
||||||
|
|
||||||
@ -191,24 +191,35 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="pdMasterData[0]?.pd_status === 'QC_COMPLETED'" class="m-gap p-gap" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50"
|
<div class="m-gap p-gap" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50"
|
||||||
fxFlex.lg="50" fxFlex.xl="50">
|
fxFlex.lg="50" fxFlex.xl="50">
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<div style="color:red !important;">
|
<div style="color:red !important;">
|
||||||
<h6>QC Remarks</h6>
|
<h6>QC Notes</h6>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
{{ pdMasterData[0].qc_remarks}}</p>
|
{{ pdMasterData[0]?.qc_remarks}}</p>
|
||||||
<p>
|
|
||||||
{{ pdMasterData[0]?.qc_feedback}}</p>
|
|
||||||
<div>
|
|
||||||
<p>
|
|
||||||
<app-rating [rating]="pd_QC_Rating"></app-rating>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="pdMasterData[0]?.pd_status === 'QC_COMPLETED'" class="m-gap p-gap" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50"
|
||||||
|
fxFlex.lg="50" fxFlex.xl="50">
|
||||||
|
<div style="color:red !important;">
|
||||||
|
<h6>QC Remarks</h6>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
{{ pdMasterData[0]?.qc_rating}}
|
||||||
|
<div>
|
||||||
|
<app-rating [rating]="pd_QC_Rating"></app-rating>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div style="display: inline-block;">
|
||||||
|
{{ pdMasterData[0]?.qc_feedback}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,15 +1,20 @@
|
|||||||
/** Common Import Section */
|
/** Common Import Section */
|
||||||
import {Injectable} from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import {Observable} from 'rxjs';//for Datatables
|
import { Observable } from 'rxjs';//for Datatables
|
||||||
import {HttpClient, HttpParams} from '@angular/common/http';
|
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||||
import {catchError, map} from 'rxjs/operators';
|
import { catchError, map } from 'rxjs/operators';
|
||||||
import {of} from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
|
|
||||||
/** Imported Service Files Are., */
|
/** Imported Service Files Are., */
|
||||||
import {AwsService} from '../../AwsService/aws.service';
|
import { AwsService } from '../../AwsService/aws.service';
|
||||||
|
|
||||||
/** Environment */
|
/** Environment */
|
||||||
import {environment} from 'environments/environment'
|
import { environment } from 'environments/environment'
|
||||||
|
import { RequestOptions } from "@angular/http";
|
||||||
|
import { ResponseContentType } from "@angular/http";
|
||||||
|
import { ResponseOptions } from "@angular/http";
|
||||||
|
import { HttpResponse } from "@angular/common/http";
|
||||||
|
import { tap } from "rxjs/internal/operators/tap";
|
||||||
|
|
||||||
const currentdate = new Date().toJSON().slice(0, 19).replace('T', ' ');
|
const currentdate = new Date().toJSON().slice(0, 19).replace('T', ' ');
|
||||||
|
|
||||||
@ -33,30 +38,30 @@ export class PdTrigerService {
|
|||||||
private apiUrl = environment.apiEndpoint;
|
private apiUrl = environment.apiEndpoint;
|
||||||
|
|
||||||
constructor(private _http: HttpClient,
|
constructor(private _http: HttpClient,
|
||||||
private _aws: AwsService) {
|
private _aws: AwsService) {
|
||||||
this.MAP_API_KEY = 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'
|
this.MAP_API_KEY = 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'
|
||||||
this.MAP_API_URL = `https://maps.googleapis.com/maps/api/geocode/json?key=${this.MAP_API_KEY}&address=`;
|
this.MAP_API_URL = `https://maps.googleapis.com/maps/api/geocode/json?key=${this.MAP_API_KEY}&address=`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// get add pd master details
|
// get add pd master details
|
||||||
getAllMasterDatas(TableName: string): Observable<any> {
|
getAllMasterDatas(TableName: string): Observable<any> {
|
||||||
return this._http.post(this.apiUrl + 'getListOfMaster', {"master_name": TableName})
|
return this._http.post(this.apiUrl + 'getListOfMaster', { "master_name": TableName })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
saveForm(records: any): Observable<any> {
|
saveForm(records: any): Observable<any> {
|
||||||
records.fk_createdby = this._aws.getlocale();
|
records.fk_createdby = this._aws.getlocale();
|
||||||
let params = {records}
|
let params = { records }
|
||||||
return this._http.post(this.apiUrl + 'savePDFormDetails', params)
|
return this._http.post(this.apiUrl + 'savePDFormDetails', params)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
retriveForm(params): Observable<any> {
|
retriveForm(params): Observable<any> {
|
||||||
return this._http.post(this.apiUrl + 'getPDFormDetails', params)
|
return this._http.post(this.apiUrl + 'getPDFormDetails', params)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,7 +69,7 @@ export class PdTrigerService {
|
|||||||
getProductsDetails(): Observable<any> {
|
getProductsDetails(): Observable<any> {
|
||||||
return this._http.get<any>(this.apiUrl + 'getListOfProducts')
|
return this._http.get<any>(this.apiUrl + 'getListOfProducts')
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,7 +77,7 @@ export class PdTrigerService {
|
|||||||
getLenderDetails(): Observable<any> {
|
getLenderDetails(): Observable<any> {
|
||||||
return this._http.get<any>(this.apiUrl + 'getListOfLenders')
|
return this._http.get<any>(this.apiUrl + 'getListOfLenders')
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,7 +85,7 @@ export class PdTrigerService {
|
|||||||
getCustomersDetails(): Observable<any> {
|
getCustomersDetails(): Observable<any> {
|
||||||
return this._http.get<any>(this.apiUrl + 'getListOfCustomerSegments')
|
return this._http.get<any>(this.apiUrl + 'getListOfCustomerSegments')
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +93,7 @@ export class PdTrigerService {
|
|||||||
getPDAllocationDetails(): Observable<any> {
|
getPDAllocationDetails(): Observable<any> {
|
||||||
return this._http.get<any>(this.apiUrl + 'getListOfPDAllocationTypes')
|
return this._http.get<any>(this.apiUrl + 'getListOfPDAllocationTypes')
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,7 +101,7 @@ export class PdTrigerService {
|
|||||||
getStateCityDetails(): Observable<any> {
|
getStateCityDetails(): Observable<any> {
|
||||||
return this._http.get<any>(this.apiUrl + 'getListOfStatesAndCities')
|
return this._http.get<any>(this.apiUrl + 'getListOfStatesAndCities')
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +109,7 @@ export class PdTrigerService {
|
|||||||
getPDTypeDetails(): Observable<any> {
|
getPDTypeDetails(): Observable<any> {
|
||||||
return this._http.get<any>(this.apiUrl + 'getListOfPDAllocationTypes')
|
return this._http.get<any>(this.apiUrl + 'getListOfPDAllocationTypes')
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,7 +117,7 @@ export class PdTrigerService {
|
|||||||
addPdDetails(pdForm: any): Observable<any> {
|
addPdDetails(pdForm: any): Observable<any> {
|
||||||
return this._http.post<any>(this.apiUrl + "triggerNewPD", pdForm)
|
return this._http.post<any>(this.apiUrl + "triggerNewPD", pdForm)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,17 +125,17 @@ export class PdTrigerService {
|
|||||||
getPdDetails(): Observable<any> {
|
getPdDetails(): Observable<any> {
|
||||||
return this._http.get<any>(this.apiUrl + "listLessPDDetails/get")
|
return this._http.get<any>(this.apiUrl + "listLessPDDetails/get")
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// get status based pd list
|
// get status based pd list
|
||||||
getTabStatusPdDetails(status: string): Observable<any> {
|
getTabStatusPdDetails(status: string): Observable<any> {
|
||||||
const tabStatus = status ?
|
const tabStatus = status ?
|
||||||
{params: new HttpParams().set('status', status)} : {};
|
{ params: new HttpParams().set('status', status) } : {};
|
||||||
return this._http.get<any[]>(this.apiUrl + "listLessPDDetails/get", tabStatus)
|
return this._http.get<any[]>(this.apiUrl + "listLessPDDetails/get", tabStatus)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,7 +144,7 @@ export class PdTrigerService {
|
|||||||
let httpParams = new HttpParams().set('pdid', editId);
|
let httpParams = new HttpParams().set('pdid', editId);
|
||||||
return this._http.post<any>(this.apiUrl + "getFullPDDetails", httpParams)
|
return this._http.post<any>(this.apiUrl + "getFullPDDetails", httpParams)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,11 +152,11 @@ export class PdTrigerService {
|
|||||||
editPdMasterDetails(editData: any, status: string): Observable<any> {
|
editPdMasterDetails(editData: any, status: string): Observable<any> {
|
||||||
editData.pd_status = status;
|
editData.pd_status = status;
|
||||||
editData.fk_updatedby = this._aws.getlocale();
|
editData.fk_updatedby = this._aws.getlocale();
|
||||||
// editData.updatedon = currentdate;
|
// editData.updatedon = currentdate;
|
||||||
return this._http.post<any>(this.apiUrl + "updatePDMaster", {records: editData})
|
return this._http.post<any>(this.apiUrl + "updatePDMaster", { records: editData })
|
||||||
|
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,48 +164,48 @@ export class PdTrigerService {
|
|||||||
updatePdApplicant(editData: any): Observable<any> {
|
updatePdApplicant(editData: any): Observable<any> {
|
||||||
// editData.fk_updatedby = this._aws.getlocale();
|
// editData.fk_updatedby = this._aws.getlocale();
|
||||||
// editData.updatedon = currentdate;
|
// editData.updatedon = currentdate;
|
||||||
return this._http.post<any>(this.apiUrl + "updatePDApplicants", {"pd_applicant_details": editData})
|
return this._http.post<any>(this.apiUrl + "updatePDApplicants", { "pd_applicant_details": editData })
|
||||||
|
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// get pd allocation to details
|
// get pd allocation to details
|
||||||
getPdOfficerList(pdID: string): Observable<any> {
|
getPdOfficerList(pdID: string): Observable<any> {
|
||||||
return this._http.post<any>(this.apiUrl + "getListPDOfficers", {"pdid": pdID})
|
return this._http.post<any>(this.apiUrl + "getListPDOfficers", { "pdid": pdID })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// update pd officer
|
// update pd officer
|
||||||
updatePdOfficer(updateData: any): Observable<any> {
|
updatePdOfficer(updateData: any): Observable<any> {
|
||||||
updateData.fk_updatedby = this._aws.getlocale();
|
updateData.fk_updatedby = this._aws.getlocale();
|
||||||
// updateData.updatedon = currentdate;
|
// updateData.updatedon = currentdate;
|
||||||
return this._http.post<any>(this.apiUrl + "allocatePD", {"records": updateData})
|
return this._http.post<any>(this.apiUrl + "allocatePD", { "records": updateData })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// update pd schedule
|
// update pd schedule
|
||||||
updateSchedule(updateData: any): Observable<any> {
|
updateSchedule(updateData: any): Observable<any> {
|
||||||
updateData.fk_scheduled_by = this._aws.getlocale();
|
updateData.fk_scheduled_by = this._aws.getlocale();
|
||||||
// updateData.createdon = currentdate;
|
// updateData.createdon = currentdate;
|
||||||
return this._http.post<any>(this.apiUrl + "schdulePD", {"records": updateData})
|
return this._http.post<any>(this.apiUrl + "schdulePD", { "records": updateData })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
//load pd template details
|
//load pd template details
|
||||||
loadPDTemplates(pdId: string): Observable<any> {
|
loadPDTemplates(pdId: string): Observable<any> {
|
||||||
const options = pdId ?
|
const options = pdId ?
|
||||||
{params: new HttpParams().set('pd_id', pdId)} : {};
|
{ params: new HttpParams().set('pd_id', pdId) } : {};
|
||||||
return this._http.get<any[]>(this.apiUrl + "loadFullTemplate", options)
|
return this._http.get<any[]>(this.apiUrl + "loadFullTemplate", options)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,7 +219,7 @@ export class PdTrigerService {
|
|||||||
|
|
||||||
return this._http.post<any[]>(this.apiUrl + "getAnswersForPD", httpParams)
|
return this._http.post<any[]>(this.apiUrl + "getAnswersForPD", httpParams)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,235 +236,254 @@ export class PdTrigerService {
|
|||||||
// )
|
// )
|
||||||
// }
|
// }
|
||||||
// get assessed income form details
|
// get assessed income form details
|
||||||
getAssessedIncomeFormDetails(formDetails):Observable<any> {
|
getAssessedIncomeFormDetails(formDetails): Observable<any> {
|
||||||
return this._http.post<any>(this.apiUrl+"getAssessedIncome",formDetails)
|
return this._http.post<any>(this.apiUrl + "getAssessedIncome", formDetails)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private handleError<T>(operation = 'operation', result?: T) {
|
private handleError<T>(operation = 'operation', result?: T) {
|
||||||
return (error: any): Observable<T> => {
|
return (error: any): Observable<T> => {
|
||||||
return of(result as T);
|
return of(result as T);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// common Pd form details get for the Pd Process
|
// common Pd form details get for the Pd Process
|
||||||
getPDFormDetailsWithID(pdID, formID ):Observable<any> {
|
getPDFormDetailsWithID(pdID, formID): Observable<any> {
|
||||||
return this._http.post<any>(this.apiUrl+"getPDFormDetails",{"pd_id":pdID,"pd_form_id" : formID})
|
return this._http.post<any>(this.apiUrl + "getPDFormDetails", { "pd_id": pdID, "pd_form_id": formID })
|
||||||
.pipe(
|
|
||||||
catchError(this.handleError('operation', []))
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
// save Pd form details
|
|
||||||
savePDFormDetailsWithID(saveData: any): Observable<any> {
|
|
||||||
saveData.fk_createdby = this._aws.getlocale();
|
|
||||||
// saveData[0].fk_updatedby = this._aws.getlocale();
|
|
||||||
// saveData[0].updatedon = currentdate;
|
|
||||||
|
|
||||||
return this._http.post<any>(this.apiUrl+"savePDFormDetails",{"records":saveData})
|
|
||||||
.pipe(
|
|
||||||
catchError(this.handleError('operation', []))
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
// save pd answers
|
|
||||||
savePDQuestions(saveData: any): Observable<any> {
|
|
||||||
saveData.createdby = this._aws.getlocale();
|
|
||||||
//saveData.fk_createdon = currentdate;
|
|
||||||
// saveData[0].fk_updatedby = this._aws.getlocale();
|
|
||||||
// saveData[0].updatedon = currentdate;
|
|
||||||
|
|
||||||
return this._http.post<any>(this.apiUrl+"savePDQuestions",{"records":saveData})
|
|
||||||
.pipe(
|
|
||||||
catchError(this.handleError('operation', []))
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// get Pd Final report Question Answer
|
|
||||||
|
|
||||||
getPdFinalReportDetails(pdId: number): Observable<any> {
|
|
||||||
return this._http.post<any>(this.apiUrl+"getFinalPDReportQuestions",{"pd_id":pdId})
|
|
||||||
.pipe(
|
|
||||||
catchError(this.handleError('operation', []))
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
getPDReportFinalDocument(pdId: any): Observable<any>{
|
|
||||||
pdId.fk_createdby = this._aws.getlocale();
|
|
||||||
return this._http.post<any>(this.apiUrl+"generatePDReport",{"records": pdId})
|
|
||||||
.pipe(
|
|
||||||
catchError(this.handleError('operation', []))
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
getActualPDReportModelTemplate(pdId: any) : Observable<any>{
|
|
||||||
return this._http.post<any>(this.apiUrl+"getLatestPDReportBlob ",{"records":{"pd_id":pdId}})
|
|
||||||
.pipe(
|
|
||||||
catchError(this.handleError('operation', []))
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
updatePDReportDetails(records: any): Observable<any>{
|
|
||||||
return this._http.post<any>(this.apiUrl+"saveNewVersionOfPDReport ",{"records": records})
|
|
||||||
.pipe(
|
|
||||||
catchError(this.handleError('operation', []))
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
getPdDocVersionList(pdId: number): Observable<any>{
|
|
||||||
return this._http.post<any>(this.apiUrl+"getListOfPDReportVersions",{"records":{"pd_id":pdId}})
|
|
||||||
.pipe(
|
|
||||||
catchError(this.handleError('operation', []))
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
swapOlderPDReportToLatest(pdId: any): Observable<any>{
|
|
||||||
pdId.fk_createdby = this._aws.getlocale();
|
|
||||||
alert(JSON.stringify(pdId));
|
|
||||||
return this._http.post<any>(this.apiUrl+"swapOlderPDReportToLatest",{"records": pdId})
|
|
||||||
.pipe(
|
|
||||||
catchError(this.handleError('operation', []))
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
getTypeofActivityForSuppliedInfoForm(pd_id: any): Observable<any>{
|
|
||||||
return this._http.post<any>(this.apiUrl+"getTypeOfActivetyFromBusinessForm", {"records": { "pd_id" : pd_id }})
|
|
||||||
.pipe(
|
|
||||||
catchError(this.handleError('operation', []))
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
getQCReportFinalReviewDetails(pd_id: any, flag : string ): Observable<any>{
|
|
||||||
return this._http.post<any>(this.apiUrl+"getQCLenderRemarks", {"records": { "pd_id" : pd_id, "flag" :flag }})
|
|
||||||
.pipe(
|
|
||||||
catchError(this.handleError('operation', []))
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
// pd review status update details
|
|
||||||
pdReviewStatusUpdate(editData: any): Observable<any> {
|
|
||||||
editData.fk_updatedby = this._aws.getlocale();
|
|
||||||
// editData.updatedon = currentdate;
|
|
||||||
return this._http.post<any>(this.apiUrl + "updatePDMaster", {records: editData})
|
|
||||||
|
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// save Pd form details
|
||||||
// inWords(num) {
|
savePDFormDetailsWithID(saveData: any): Observable<any> {
|
||||||
// let a : any = ['','one ','two ','three ','four ', 'five ','six ','seven ','eight ','nine ','ten ','eleven ','twelve ','thirteen ','fourteen ','fifteen ','sixteen ','seventeen ','eighteen ','nineteen '];
|
saveData.fk_createdby = this._aws.getlocale();
|
||||||
// let b : any = ['', '', 'twenty','thirty','forty','fifty', 'sixty','seventy','eighty','ninety'];
|
// saveData[0].fk_updatedby = this._aws.getlocale();
|
||||||
// if ((num = num.toString()).length > 9) return 'overflow';
|
// saveData[0].updatedon = currentdate;
|
||||||
// let n : any = ('000000000' + num).substr(-9).match(/^(\d{2})(\d{2})(\d{2})(\d{1})(\d{2})$/);
|
|
||||||
// if (!n) return; var str = '';
|
|
||||||
// str += (n[1] != 0) ? (a[Number(n[1])] || b[n[1][0]] + ' ' + a[n[1][1]]) + 'crore ' : '';
|
|
||||||
// str += (n[2] != 0) ? (a[Number(n[2])] || b[n[2][0]] + ' ' + a[n[2][1]]) + 'lakh ' : '';
|
|
||||||
// str += (n[3] != 0) ? (a[Number(n[3])] || b[n[3][0]] + ' ' + a[n[3][1]]) + 'thousand ' : '';
|
|
||||||
// str += (n[4] != 0) ? (a[Number(n[4])] || b[n[4][0]] + ' ' + a[n[4][1]]) + 'hundred ' : '';
|
|
||||||
// str += (n[5] != 0) ? ((str != '') ? 'and ' : '') + (a[Number(n[5])] || b[n[5][0]] + ' ' + a[n[5][1]]) + 'only ' : '';
|
|
||||||
// return str;
|
|
||||||
// }
|
|
||||||
|
|
||||||
convertNumberToWords(amount) {
|
return this._http.post<any>(this.apiUrl + "savePDFormDetails", { "records": saveData })
|
||||||
//let words : any = new Array();
|
.pipe(
|
||||||
let words :any = ['','One','Two','Three','Four','Five','Six','Seven','Eight','Nine','Ten','Eleven','Twelve','Thirteen','Fourteen','Fifteen','Sixteen','Seventeen','Eighteen','Nineteen','Twenty'];
|
catchError(this.handleError('operation', []))
|
||||||
words[30] = 'Thirty';
|
)
|
||||||
words[40] = 'Forty';
|
}
|
||||||
words[50] = 'Fifty';
|
|
||||||
words[60] = 'Sixty';
|
// save pd answers
|
||||||
words[70] = 'Seventy';
|
savePDQuestions(saveData: any): Observable<any> {
|
||||||
words[80] = 'Eighty';
|
saveData.createdby = this._aws.getlocale();
|
||||||
words[90] = 'Ninety';
|
//saveData.fk_createdon = currentdate;
|
||||||
amount = amount.toString();
|
// saveData[0].fk_updatedby = this._aws.getlocale();
|
||||||
let atemp = amount.split(".");
|
// saveData[0].updatedon = currentdate;
|
||||||
let number = atemp[0].split(",").join("");
|
|
||||||
let n_length = number.length;
|
return this._http.post<any>(this.apiUrl + "savePDQuestions", { "records": saveData })
|
||||||
let words_string = "";
|
.pipe(
|
||||||
let value : any;
|
catchError(this.handleError('operation', []))
|
||||||
if (n_length <= 9) {
|
)
|
||||||
var n_array = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0);
|
}
|
||||||
var received_n_array = new Array();
|
|
||||||
for (var i = 0; i < n_length; i++) {
|
|
||||||
received_n_array[i] = number.substr(i, 1);
|
// get Pd Final report Question Answer
|
||||||
}
|
|
||||||
for (var i = 9 - n_length, j = 0; i < 9; i++, j++) {
|
getPdFinalReportDetails(pdId: number): Observable<any> {
|
||||||
n_array[i] = received_n_array[j];
|
return this._http.post<any>(this.apiUrl + "getFinalPDReportQuestions", { "pd_id": pdId })
|
||||||
}
|
.pipe(
|
||||||
for (var i = 0, j = 1; i < 9; i++, j++) {
|
catchError(this.handleError('operation', []))
|
||||||
if (i == 0 || i == 2 || i == 4 || i == 7) {
|
)
|
||||||
if (n_array[i] == 1) {
|
}
|
||||||
n_array[j] = 10 + (+n_array[j]);
|
|
||||||
n_array[i] = 0;
|
getPDReportFinalDocument(pdId: any): Observable<any> {
|
||||||
|
pdId.fk_createdby = this._aws.getlocale();
|
||||||
|
return this._http.post<any>(this.apiUrl + "generatePDReport", { "records": pdId })
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('operation', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
getActualPDReportModelTemplate(pdId: any): Observable<any> {
|
||||||
|
return this._http.post<any>(this.apiUrl + "getLatestPDReportBlob ", { "records": { "pd_id": pdId } })
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('operation', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
updatePDReportDetails(records: any): Observable<any> {
|
||||||
|
return this._http.post<any>(this.apiUrl + "saveNewVersionOfPDReport ", { "records": records })
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('operation', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
getPdDocVersionList(pdId: number): Observable<any> {
|
||||||
|
return this._http.post<any>(this.apiUrl + "getListOfPDReportVersions", { "records": { "pd_id": pdId } })
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('operation', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
swapOlderPDReportToLatest(pdId: any): Observable<any> {
|
||||||
|
pdId.fk_createdby = this._aws.getlocale();
|
||||||
|
alert(JSON.stringify(pdId));
|
||||||
|
return this._http.post<any>(this.apiUrl + "swapOlderPDReportToLatest", { "records": pdId })
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('operation', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
getTypeofActivityForSuppliedInfoForm(pd_id: any): Observable<any> {
|
||||||
|
return this._http.post<any>(this.apiUrl + "getTypeOfActivetyFromBusinessForm", { "records": { "pd_id": pd_id } })
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('operation', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
getQCReportFinalReviewDetails(pd_id: any, flag: string): Observable<any> {
|
||||||
|
return this._http.post<any>(this.apiUrl + "getQCLenderRemarks", { "records": { "pd_id": pd_id, "flag": flag } })
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('operation', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// pd review status update details
|
||||||
|
pdReviewStatusUpdate(editData: any): Observable<any> {
|
||||||
|
editData.fk_updatedby = this._aws.getlocale();
|
||||||
|
// editData.updatedon = currentdate;
|
||||||
|
return this._http.post<any>(this.apiUrl + "updatePDMaster", { records: editData })
|
||||||
|
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('operation', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
//pd report export excel
|
||||||
|
pdReportExportExcel(): Observable<HttpResponse<Blob>> {
|
||||||
|
// const options: any = {
|
||||||
|
// observe: 'response',
|
||||||
|
// responseType: 'blob' as 'json'
|
||||||
|
// };
|
||||||
|
return this._http.get<HttpResponse<Blob>>(this.apiUrl + "downloadExcel", {
|
||||||
|
observe: 'response',
|
||||||
|
responseType: 'blob' as 'json'
|
||||||
|
})
|
||||||
|
.pipe(
|
||||||
|
tap<HttpResponse<any>>(
|
||||||
|
res => res,
|
||||||
|
err => {
|
||||||
|
catchError(this.handleError('operation', []))
|
||||||
|
}
|
||||||
|
)
|
||||||
|
// catchError(this.handleError('operation', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// inWords(num) {
|
||||||
|
// let a : any = ['','one ','two ','three ','four ', 'five ','six ','seven ','eight ','nine ','ten ','eleven ','twelve ','thirteen ','fourteen ','fifteen ','sixteen ','seventeen ','eighteen ','nineteen '];
|
||||||
|
// let b : any = ['', '', 'twenty','thirty','forty','fifty', 'sixty','seventy','eighty','ninety'];
|
||||||
|
// if ((num = num.toString()).length > 9) return 'overflow';
|
||||||
|
// let n : any = ('000000000' + num).substr(-9).match(/^(\d{2})(\d{2})(\d{2})(\d{1})(\d{2})$/);
|
||||||
|
// if (!n) return; var str = '';
|
||||||
|
// str += (n[1] != 0) ? (a[Number(n[1])] || b[n[1][0]] + ' ' + a[n[1][1]]) + 'crore ' : '';
|
||||||
|
// str += (n[2] != 0) ? (a[Number(n[2])] || b[n[2][0]] + ' ' + a[n[2][1]]) + 'lakh ' : '';
|
||||||
|
// str += (n[3] != 0) ? (a[Number(n[3])] || b[n[3][0]] + ' ' + a[n[3][1]]) + 'thousand ' : '';
|
||||||
|
// str += (n[4] != 0) ? (a[Number(n[4])] || b[n[4][0]] + ' ' + a[n[4][1]]) + 'hundred ' : '';
|
||||||
|
// str += (n[5] != 0) ? ((str != '') ? 'and ' : '') + (a[Number(n[5])] || b[n[5][0]] + ' ' + a[n[5][1]]) + 'only ' : '';
|
||||||
|
// return str;
|
||||||
|
// }
|
||||||
|
|
||||||
|
convertNumberToWords(amount) {
|
||||||
|
//let words : any = new Array();
|
||||||
|
let words: any = ['', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten', 'Eleven', 'Twelve', 'Thirteen', 'Fourteen', 'Fifteen', 'Sixteen', 'Seventeen', 'Eighteen', 'Nineteen', 'Twenty'];
|
||||||
|
words[30] = 'Thirty';
|
||||||
|
words[40] = 'Forty';
|
||||||
|
words[50] = 'Fifty';
|
||||||
|
words[60] = 'Sixty';
|
||||||
|
words[70] = 'Seventy';
|
||||||
|
words[80] = 'Eighty';
|
||||||
|
words[90] = 'Ninety';
|
||||||
|
amount = amount.toString();
|
||||||
|
let atemp = amount.split(".");
|
||||||
|
let number = atemp[0].split(",").join("");
|
||||||
|
let n_length = number.length;
|
||||||
|
let words_string = "";
|
||||||
|
let value: any;
|
||||||
|
if (n_length <= 9) {
|
||||||
|
var n_array = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
var received_n_array = new Array();
|
||||||
|
for (var i = 0; i < n_length; i++) {
|
||||||
|
received_n_array[i] = number.substr(i, 1);
|
||||||
|
}
|
||||||
|
for (var i = 9 - n_length, j = 0; i < 9; i++ , j++) {
|
||||||
|
n_array[i] = received_n_array[j];
|
||||||
|
}
|
||||||
|
for (var i = 0, j = 1; i < 9; i++ , j++) {
|
||||||
|
if (i == 0 || i == 2 || i == 4 || i == 7) {
|
||||||
|
if (n_array[i] == 1) {
|
||||||
|
n_array[j] = 10 + (+n_array[j]);
|
||||||
|
n_array[i] = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
value = "";
|
||||||
|
for (var i = 0; i < 9; i++) {
|
||||||
|
if (i == 0 || i == 2 || i == 4 || i == 7) {
|
||||||
|
value = n_array[i] * 10;
|
||||||
|
} else {
|
||||||
|
value = n_array[i];
|
||||||
|
}
|
||||||
|
if (value != 0) {
|
||||||
|
words_string += words[value] + " ";
|
||||||
|
}
|
||||||
|
if ((i == 1 && value != 0) || (i == 0 && value != 0 && n_array[i + 1] == 0)) {
|
||||||
|
words_string += "Crores ";
|
||||||
|
}
|
||||||
|
if ((i == 3 && value != 0) || (i == 2 && value != 0 && n_array[i + 1] == 0)) {
|
||||||
|
words_string += "Lakhs ";
|
||||||
|
}
|
||||||
|
if ((i == 5 && value != 0) || (i == 4 && value != 0 && n_array[i + 1] == 0)) {
|
||||||
|
words_string += "Thousand ";
|
||||||
|
}
|
||||||
|
if (i == 6 && value != 0 && (n_array[i + 1] != 0 && n_array[i + 2] != 0)) {
|
||||||
|
words_string += "Hundred and ";
|
||||||
|
} else if (i == 6 && value != 0) {
|
||||||
|
words_string += "Hundred ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
words_string = words_string.split(" ").join(" ");
|
||||||
}
|
}
|
||||||
value = "";
|
return words_string;
|
||||||
for (var i = 0; i < 9; i++) {
|
|
||||||
if (i == 0 || i == 2 || i == 4 || i == 7) {
|
|
||||||
value = n_array[i] * 10;
|
|
||||||
} else {
|
|
||||||
value = n_array[i];
|
|
||||||
}
|
|
||||||
if (value != 0) {
|
|
||||||
words_string += words[value] + " ";
|
|
||||||
}
|
|
||||||
if ((i == 1 && value != 0) || (i == 0 && value != 0 && n_array[i + 1] == 0)) {
|
|
||||||
words_string += "Crores ";
|
|
||||||
}
|
|
||||||
if ((i == 3 && value != 0) || (i == 2 && value != 0 && n_array[i + 1] == 0)) {
|
|
||||||
words_string += "Lakhs ";
|
|
||||||
}
|
|
||||||
if ((i == 5 && value != 0) || (i == 4 && value != 0 && n_array[i + 1] == 0)) {
|
|
||||||
words_string += "Thousand ";
|
|
||||||
}
|
|
||||||
if (i == 6 && value != 0 && (n_array[i + 1] != 0 && n_array[i + 2] != 0)) {
|
|
||||||
words_string += "Hundred and ";
|
|
||||||
} else if (i == 6 && value != 0) {
|
|
||||||
words_string += "Hundred ";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
words_string = words_string.split(" ").join(" ");
|
|
||||||
}
|
}
|
||||||
return words_string;
|
|
||||||
}
|
|
||||||
|
|
||||||
// save additional requirements
|
// save additional requirements
|
||||||
saveAdditionalRequirements(saveData: any): Observable<any> {
|
saveAdditionalRequirements(saveData: any): Observable<any> {
|
||||||
saveData.createdby = this._aws.getlocale();
|
saveData.createdby = this._aws.getlocale();
|
||||||
|
|
||||||
return this._http.post<any>(this.apiUrl+"savePDAdditionalRequiremets",{"records":saveData})
|
return this._http.post<any>(this.apiUrl + "savePDAdditionalRequiremets", { "records": saveData })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
stockFormAccess(pdid: any): Observable<any> {
|
stockFormAccess(pdid: any): Observable<any> {
|
||||||
|
|
||||||
return this._http.post<any>(this.apiUrl+"getTypeOfActivetyFromBusinessForm",{"records":pdid})
|
|
||||||
.pipe(
|
|
||||||
catchError(this.handleError('operation', []))
|
|
||||||
)
|
|
||||||
}
|
|
||||||
// private handleError<T>(operation = 'operation', result?: T) {
|
|
||||||
// return (error: any): Observable<T> => {
|
|
||||||
// return of(result as T);
|
|
||||||
// };
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**Search Filter
|
return this._http.post<any>(this.apiUrl + "getTypeOfActivetyFromBusinessForm", { "records": pdid })
|
||||||
* Sriram
|
.pipe(
|
||||||
*/
|
|
||||||
|
|
||||||
overAllSearchFormDetails(searchItem)
|
|
||||||
{
|
|
||||||
let records = {'records':searchItem};
|
|
||||||
return this._http.post(this.apiUrl+'filterPDList',records).pipe(
|
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
|
// private handleError<T>(operation = 'operation', result?: T) {
|
||||||
|
// return (error: any): Observable<T> => {
|
||||||
|
// return of(result as T);
|
||||||
|
// };
|
||||||
|
// }
|
||||||
|
|
||||||
|
/**Search Filter
|
||||||
|
* Sriram
|
||||||
|
*/
|
||||||
|
|
||||||
|
overAllSearchFormDetails(searchItem) {
|
||||||
|
let records = { 'records': searchItem };
|
||||||
|
return this._http.post(this.apiUrl + 'filterPDList', records).pipe(
|
||||||
|
catchError(this.handleError('operation', []))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +1,16 @@
|
|||||||
<fieldset class="rating">
|
<fieldset class="rating">
|
||||||
<input type="radio" [name]="inputName" value="5" [checked]="rating===5" />
|
<input type="radio" [name]="inputName" value="5" [checked]="rating===5" />
|
||||||
<label title="Rocks!" (click)='onClick(5)'>5 stars</label>
|
<label title="Excellant" (mouseover)='over("Excellant")' (click)='onClick(5)'>5 stars</label>
|
||||||
|
|
||||||
<input type="radio" [name]="inputName" value="4" [checked]="rating===4" />
|
<input type="radio" [name]="inputName" value="4" [checked]="rating===4" />
|
||||||
<label title="Pretty good" (click)='onClick(4)'>4 stars</label>
|
<label title="Pretty good" (mouseover)='over("Pretty Good")' (click)='onClick(4)'>4 stars</label>
|
||||||
|
|
||||||
<input type="radio" [name]="inputName" value="3" [checked]="rating===3" />
|
<input type="radio" [name]="inputName" value="3" [checked]="rating===3" />
|
||||||
<label title="Meh" (click)='onClick(3)'>3 stars</label>
|
<label title="good" (mouseover)='over("Good")' (click)='onClick(3)'>3 stars</label>
|
||||||
|
|
||||||
<input type="radio" [name]="inputName" value="2" [checked]="rating===2" />
|
<input type="radio" [name]="inputName" value="2" [checked]="rating===2" />
|
||||||
<label title="Kinda bad" (click)='onClick(2)'>2 stars</label>
|
<label title="ok" (mouseover)='over("Ok")' (click)='onClick(2)'>2 stars</label>
|
||||||
|
|
||||||
<input type="radio" [name]="inputName" value="1" [checked]="rating===1" />
|
<input type="radio" [name]="inputName" value="1" [checked]="rating===1" />
|
||||||
<label title="Sucks big time" (click)='onClick(1)'>1 star</label>
|
<label title="not ok" (mouseover)='over("Not Ok")' (click)='onClick(1)'>1 star</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
.rating {
|
.rating {
|
||||||
float:left;
|
float:left;
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rating:not(:checked) > input {
|
.rating:not(:checked) > input {
|
||||||
@ -39,4 +40,9 @@
|
|||||||
.rating > input:checked ~ label:hover ~ label,
|
.rating > input:checked ~ label:hover ~ label,
|
||||||
.rating > label:hover ~ input:checked ~ label {
|
.rating > label:hover ~ input:checked ~ label {
|
||||||
color: #ea0;
|
color: #ea0;
|
||||||
}
|
}
|
||||||
|
// .rating::after {
|
||||||
|
// content: "";
|
||||||
|
// clear: both;
|
||||||
|
// display: table;
|
||||||
|
// }
|
||||||
|
|||||||
@ -21,5 +21,10 @@ export class RatingComponent implements OnInit {
|
|||||||
rating: rating
|
rating: rating
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lableVal: string = '';
|
||||||
|
over(val): void {
|
||||||
|
this.lableVal = val;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user