merge : kms
This commit is contained in:
parent
27349ed9ac
commit
9f83c77236
@ -30,6 +30,7 @@
|
||||
"@ngx-translate/http-loader": "^3.0.1",
|
||||
"@swimlane/ngx-charts": "^7.0.1",
|
||||
"@swimlane/ngx-datatable": "11.1.5",
|
||||
"@types/file-saver": "^2.0.0",
|
||||
"amazon-cognito-identity-js": "^2.0.27",
|
||||
"angular-calendar": "0.23.3",
|
||||
"angular-notifier": "^4.1.1",
|
||||
@ -39,6 +40,7 @@
|
||||
"core-js": "^2.5.5",
|
||||
"d3": "^4.9.1",
|
||||
"dragula": "3.7.2",
|
||||
"file-saver": "^2.0.0",
|
||||
"font-awesome": "4.7.0",
|
||||
"hammerjs": "2.0.8",
|
||||
"intl": "^1.2.4",
|
||||
|
||||
@ -89,7 +89,7 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 24%">
|
||||
<!-- <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-error *ngIf="pdMain.loan_amount.hasError('required')">Amount Required.</mat-error> -->
|
||||
<mat-error *ngIf="pdMain.loan_amount.hasError('pattern')">Enter valid amount. </mat-error>
|
||||
@ -142,7 +142,7 @@
|
||||
</div>
|
||||
<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 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>
|
||||
</mat-dialog-actions>
|
||||
|
||||
|
||||
@ -7,12 +7,16 @@
|
||||
<mat-card style="min-height:540px;">
|
||||
<mat-card-content>
|
||||
<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="red" (click)="reportReview('COMPLETE')" style="padding: 0 28px !important;" [disabled]="qcStatus === 'QC_COMPLETED'">QC Complete</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;" *ngIf="qcStatus !== 'QC_COMPLETED'">QC Complete</button>
|
||||
<!--{{ qcStatus }} -->
|
||||
</div>
|
||||
<mat-tab-group>
|
||||
<mat-tab label="PD Data">
|
||||
<div>
|
||||
Export
|
||||
<button (click)="export()">Export Excel</button>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<label>Billing Name : </label> {{pdReportRecords?.billing_name}}
|
||||
|
||||
@ -1,16 +1,21 @@
|
||||
import { DomSanitizer, SafeResourceUrl, SafeUrl } from '@angular/platform-browser';
|
||||
import {Component, ViewChild, OnInit, ViewEncapsulation, OnDestroy, Inject} from '@angular/core';
|
||||
import {FormBuilder, FormGroup, Validators, FormControl, FormArray, AbstractControl} from '@angular/forms';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {NotifierService} from 'angular-notifier';
|
||||
import {ListPdComponent} from './../list-pd.component';
|
||||
import { Component, ViewChild, OnInit, ViewEncapsulation, OnDestroy, Inject } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators, FormControl, FormArray, AbstractControl } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
import { ListPdComponent } from './../list-pd.component';
|
||||
|
||||
import {PdTrigerService} from '../../../pd-service/pd-triger.service';
|
||||
import { MatDialog,
|
||||
import { saveAs as importedSaveAs } from "file-saver";
|
||||
|
||||
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
||||
import {
|
||||
MatDialog,
|
||||
MatDialogRef,
|
||||
MAT_DIALOG_DATA } from "@angular/material";
|
||||
import { ModelEditPdReportComponent} from './model-edit-pd-report/model-edit-pd-report.component';
|
||||
MAT_DIALOG_DATA
|
||||
} from "@angular/material";
|
||||
import { ModelEditPdReportComponent } from './model-edit-pd-report/model-edit-pd-report.component';
|
||||
import { QcReviewComponent } from './qc-review/qc-review.component';
|
||||
import { HttpResponse } from "@angular/common/http";
|
||||
|
||||
/**sweet alert */
|
||||
// import Swal from 'sweetalert2';
|
||||
@ -21,7 +26,7 @@ import { QcReviewComponent } from './qc-review/qc-review.component';
|
||||
styleUrls: ['./pd-report.component.scss']
|
||||
})
|
||||
export class PdReportComponent implements OnInit {
|
||||
Url : SafeUrl;
|
||||
Url: SafeUrl;
|
||||
startPD: any;
|
||||
// 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';
|
||||
@ -31,9 +36,9 @@ export class PdReportComponent implements OnInit {
|
||||
public reGenerateBtn: Boolean = false;
|
||||
public pdReportVersionList = [];
|
||||
// public src;
|
||||
pdReportRecords:any;
|
||||
pdReportRecords: any;
|
||||
latestPDDetails: any;
|
||||
message:any;
|
||||
message: any;
|
||||
|
||||
private notifier: NotifierService;
|
||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
@ -86,13 +91,13 @@ export class PdReportComponent implements OnInit {
|
||||
return window.matchMedia(`(max-width: 1560px)`).matches;
|
||||
}
|
||||
|
||||
reGeneratePFReport(){
|
||||
reGeneratePFReport() {
|
||||
let data = {
|
||||
"pd_id": this.startPD,
|
||||
"regenerate":"1"
|
||||
"regenerate": "1"
|
||||
};
|
||||
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data=>{
|
||||
if(data.dataStatus){
|
||||
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
|
||||
if (data.dataStatus) {
|
||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||
this.getPdReportVersionList();
|
||||
} else {
|
||||
@ -106,8 +111,8 @@ export class PdReportComponent implements OnInit {
|
||||
let data = {
|
||||
"pd_id": this.startPD
|
||||
};
|
||||
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data=>{
|
||||
if(data.dataStatus){
|
||||
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
|
||||
if (data.dataStatus) {
|
||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||
this.getPdReportVersionList();
|
||||
} else {
|
||||
@ -119,11 +124,11 @@ export class PdReportComponent implements OnInit {
|
||||
}
|
||||
|
||||
public qcStatus: string = '';
|
||||
getPdReportVersionList(){
|
||||
getPdReportVersionList() {
|
||||
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();
|
||||
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.qcStatus = data.records.pdstatus;
|
||||
// alert(JSON.stringify(this.latestPDDetails));
|
||||
@ -131,9 +136,9 @@ export class PdReportComponent implements OnInit {
|
||||
} else {
|
||||
// this.reGenerateBtn = true;
|
||||
this.generateBtn = true;
|
||||
this.message= data.msg;
|
||||
this.message = data.msg;
|
||||
}
|
||||
}, err=> {
|
||||
}, err => {
|
||||
|
||||
})
|
||||
}
|
||||
@ -145,7 +150,7 @@ export class PdReportComponent implements OnInit {
|
||||
this.pdReportRecords = data.records;
|
||||
// this.pdReportRecords = data.records.qu;
|
||||
}
|
||||
}, err=> {
|
||||
}, err => {
|
||||
|
||||
})
|
||||
}
|
||||
@ -154,13 +159,13 @@ export class PdReportComponent implements OnInit {
|
||||
|
||||
// load pd view component
|
||||
loadPdViewCompoent() {
|
||||
this.router.navigate(['../../viewpd', this.startPD], {relativeTo: this.route});
|
||||
this.router.navigate(['../../viewpd', this.startPD], { relativeTo: this.route });
|
||||
}
|
||||
|
||||
// add questions popup model call
|
||||
addNewQuestion() {
|
||||
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
|
||||
});
|
||||
dialogRef.afterClosed()
|
||||
@ -172,7 +177,7 @@ export class PdReportComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
changeVersion(pd : any): void {
|
||||
changeVersion(pd: any): void {
|
||||
this.latestPDDetails = pd;
|
||||
console.log(this.latestPDDetails);
|
||||
}
|
||||
@ -181,7 +186,7 @@ export class PdReportComponent implements OnInit {
|
||||
|
||||
reportReview(status): void {
|
||||
const dialogRef = this.dialog.open(QcReviewComponent, {
|
||||
data: { startId : this.startPD, data_status: status },
|
||||
data: { startId: this.startPD, data_status: status },
|
||||
disableClose: true
|
||||
});
|
||||
dialogRef.afterClosed()
|
||||
@ -193,7 +198,7 @@ export class PdReportComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
changeDocumentEdit() : void{
|
||||
changeDocumentEdit(): void {
|
||||
|
||||
|
||||
const dialogRef = this.dialog.open(DialogChangeCurrentVenrsion, {
|
||||
@ -201,7 +206,7 @@ export class PdReportComponent implements OnInit {
|
||||
});
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
if(dataresult) {
|
||||
if (dataresult) {
|
||||
let data = {
|
||||
"pd_id": this.startPD,
|
||||
"doc_name": this.latestPDDetails.doc_name
|
||||
@ -213,7 +218,7 @@ export class PdReportComponent implements OnInit {
|
||||
} else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
}
|
||||
}, err=> {
|
||||
}, err => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
})
|
||||
} else {
|
||||
@ -254,6 +259,27 @@ export class PdReportComponent implements OnInit {
|
||||
// }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 {
|
||||
}
|
||||
|
||||
getConfirmation(confim : Boolean) {
|
||||
getConfirmation(confim: Boolean) {
|
||||
this.dialogRef.close(confim);
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<!--<h3>Develop across all platforms</h3>-->
|
||||
<div *ngIf="conformation === false" style="width: 220px;text-align: center; margin: 12px;">
|
||||
<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>
|
||||
</div>
|
||||
<div *ngIf="conformation" style="margin: 12px; width: 340px;">
|
||||
@ -29,7 +29,7 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="showStatus == 'REMARKS'">
|
||||
<h2 mat-dialog-title>QC Remarks</h2>
|
||||
<h2 mat-dialog-title>QC Notes</h2>
|
||||
<mat-dialog-content class="mat-typography">
|
||||
<div style="margin: 12px; width: 340px;">
|
||||
<form role="form" *ngIf="showForm" [formGroup]="ngForm" accept-charset="UTF-8" novalidate>
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
<!-- <mat-card-title>Address Details</mat-card-title> -->
|
||||
<mat-card-content>
|
||||
<div fxLayout="row wrap">
|
||||
|
||||
<div fxFlex="33">
|
||||
|
||||
<mat-form-field style="width: 80%;">
|
||||
@ -28,6 +29,7 @@
|
||||
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-select placeholder="Address Type" formControlName="address_type" required>
|
||||
@ -36,10 +38,14 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="addressForm.controls['address_type'].value == 12" style="width: 80%;">
|
||||
<input matInput placeholder="Address Type Others" formControlName="address_type_others" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<div *ngIf="addressForm.controls['address_type'].value == 12" fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<input matInput placeholder="Specify Address Type" formControlName="address_type_others" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-select placeholder="Locality" formControlName="locality" required>
|
||||
@ -48,16 +54,15 @@
|
||||
</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">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<input matInput placeholder="Specify Locality"
|
||||
formControlName="locality_others" autocomplete="off">
|
||||
</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>
|
||||
@ -67,6 +72,7 @@
|
||||
</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>
|
||||
@ -76,6 +82,7 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-select placeholder="Ownership" formControlName="address_ownership">
|
||||
@ -85,21 +92,36 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<mat-form-field *ngIf="addressForm.controls['address_ownership'].value == 4 " style="width: 80%;">
|
||||
<input matInput placeholder="Specify Other Ownership" formControlName="other_ownership" autocomplete="off">
|
||||
<div *ngIf="addressForm.controls['address_ownership'].value == 4 " fxFlex="33">
|
||||
|
||||
<mat-form-field style="width: 80%;">
|
||||
<input matInput placeholder="Specify Ownership" formControlName="other_ownership" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<mat-form-field *ngIf="addressForm.controls['address_ownership'].value == 3 " style="width: 80%;">
|
||||
<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="33">
|
||||
<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 business activity is being run?"
|
||||
<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>
|
||||
@ -107,17 +129,8 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row wrap" *ngIf="addressForm.controls['bussiness_activity'].value == 'yes'" style="width: 100%">
|
||||
<div fxFlex="100">
|
||||
<label>How long has business been operated from this premise?</label>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Year(s)" formControlName="business_years">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Month(s)" formControlName="business_month" (change)="ConvertMonthintoYear($event.target.value)">
|
||||
</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 )
|
||||
@ -151,9 +164,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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">
|
||||
<!-- <mat-form-field *ngIf="PremisesOtherFlag == true" style="width: 40%">
|
||||
<input matInput placeholder="Specify Premises Type" formControlName="bussiness_address_type_others" (change)="otherValueset()" autocomplete="off">
|
||||
</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">
|
||||
<div
|
||||
*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="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 *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">
|
||||
@ -384,9 +405,3 @@
|
||||
|
||||
</form>
|
||||
<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.customer_behaviour.setValue(data.records.customer_behaviour);
|
||||
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_ownership.setValue(data.records.address_ownership);
|
||||
this.addressForm.controls.other_ownership.setValue(data.records.other_ownership);
|
||||
this.addressForm.controls.rent_amt.setValue(data.records.rent_amt);
|
||||
this.addressForm.controls.bussiness_activity.setValue(data.records.bussiness_activity);
|
||||
|
||||
// if(data.records.bussiness_activity == 'yes') {
|
||||
|
||||
// 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) {
|
||||
this.addressForm.controls.business_years.setValue(data.records.business_years);
|
||||
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);
|
||||
if (data.records.locality_others) {
|
||||
@ -333,8 +285,9 @@ export class AddressComponent implements OnInit {
|
||||
control.removeAt(index);
|
||||
}*/
|
||||
onSubmit() {
|
||||
//console.log('form data', this.addressForm.value);
|
||||
|
||||
if (!this.addressForm.valid) {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -345,7 +298,7 @@ export class AddressComponent implements OnInit {
|
||||
records.address_type_others = this.addressForm.controls.address_type_others.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.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;
|
||||
}
|
||||
}
|
||||
console.log('this.addressForm.controls.additional_premises.value',this.addressForm.controls.additional_premises.value);
|
||||
this.addressForm.controls.additional_premises.value.forEach((val,index)=>
|
||||
{
|
||||
//console.log(val);
|
||||
|
||||
if(val.premises_city != ''){
|
||||
console.log('val.premises_city',val.premises_city);
|
||||
if(val.premises_city != '' && val.premises_city != null){
|
||||
this.formPremisesCityArray = [];
|
||||
val.premises_city.forEach(option => {
|
||||
this.formPremisesCityArray.push({additional_premises_city: option});
|
||||
this.addressForm.controls.additional_premises.value[index].premises_city = this.formPremisesCityArray;
|
||||
// console.log(val);
|
||||
});
|
||||
}
|
||||
else{
|
||||
@ -390,15 +343,14 @@ export class AddressComponent implements OnInit {
|
||||
});
|
||||
|
||||
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.formid = '5';
|
||||
// records.fk_createdby = '250';
|
||||
console.log('params', records);
|
||||
|
||||
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
//console.log('data', data);
|
||||
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
}, error => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
@ -414,22 +366,22 @@ export class AddressComponent implements OnInit {
|
||||
SelectedPremises($event){
|
||||
|
||||
let premisesData = $event.source.value;
|
||||
//console.log(premisesData);
|
||||
|
||||
|
||||
if($event.checked === true ){
|
||||
|
||||
//this.formPremisesArray.push({member: $event.source.value});
|
||||
//this.selectedSegmentDatas.push(CustomerSegmentName.name);
|
||||
//console.log('true',premisesData);
|
||||
|
||||
//console.log(this.formPremisesArray);
|
||||
|
||||
|
||||
|
||||
this.formPremisesArray.push({premises_types: $event.source.value});
|
||||
|
||||
//console.log(this.formPremisesArray);
|
||||
|
||||
const control = <FormArray>this.addressForm.controls['additional_premises'];
|
||||
let array = this.addressData.filter(data => data.address_type_id == premisesData)[0];
|
||||
//console.log(array);
|
||||
|
||||
if(premisesData == 12){
|
||||
this.PremisesOtherFlag = true;
|
||||
// this.PremisesLabel[this.z] = this.pdQuestionAddress.get('bussiness_address_type_others').value;
|
||||
@ -455,7 +407,7 @@ export class AddressComponent implements OnInit {
|
||||
if(premisesData == 12){
|
||||
this.PremisesOtherFlag = false;
|
||||
}
|
||||
//console.log(this.formPremisesArray);
|
||||
|
||||
let index = this.formPremisesArray.findIndex(form=>form.premises_types== $event.source.value);
|
||||
//console.log(index);
|
||||
const control = <FormArray>this.addressForm.controls['additional_premises'];
|
||||
@ -481,78 +433,9 @@ export class AddressComponent implements OnInit {
|
||||
let z = this.z;
|
||||
this.PremisesLabel[z-1] = this.addressForm.get('bussiness_address_type_others').value;
|
||||
}
|
||||
// checkaddress(value)
|
||||
// {
|
||||
// // console.log(value);
|
||||
// if(value=="OTHERS")
|
||||
// {
|
||||
// this.addressRemarksAccess = true;
|
||||
// }else
|
||||
// {
|
||||
// this.addressRemarksAccess = false;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// SelectedPremises($event){
|
||||
// console.log('event',$event);
|
||||
|
||||
// let premisesData = $event.source.value;
|
||||
|
||||
|
||||
// if($event.source._selected === true ){
|
||||
|
||||
// //this.formPremisesArray.push({member: $event.source.value});
|
||||
// //this.selectedSegmentDatas.push(CustomerSegmentName.name);
|
||||
// //console.log('true',premisesData);
|
||||
|
||||
// //console.log(this.formPremisesArray);
|
||||
|
||||
// this.formPremisesArray.push({premises_types: $event.source.value});
|
||||
|
||||
// //console.log(this.formPremisesArray);
|
||||
|
||||
// let array = this.addressData.filter(data => data.address_type_id == premisesData);
|
||||
|
||||
// if(premisesData == 12){
|
||||
// this.PremisesOtherFlag = true;
|
||||
// this.PremisesLabel[this.z] = this.addressForm.get('bussiness_address_type_others').value;
|
||||
// }
|
||||
// else{
|
||||
// this.PremisesLabel[this.z] = array[0].address_type;
|
||||
// }
|
||||
// this.z++;
|
||||
|
||||
|
||||
// const control = <FormArray>this.addressForm.controls['additional_premises'];
|
||||
// control.push(this.createPremises());
|
||||
|
||||
|
||||
|
||||
// }
|
||||
// else if($event.source._selected === false ){
|
||||
|
||||
// console.log('false',premisesData);
|
||||
|
||||
|
||||
// if(premisesData == 12){
|
||||
// this.PremisesOtherFlag = false;
|
||||
// }
|
||||
|
||||
// const control = <FormArray>this.addressForm.controls['additional_premises'];
|
||||
// control.removeAt(this.z);
|
||||
// this.z--;
|
||||
// //let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName.name);
|
||||
// //this.selectedSegmentDatas.splice(index,1);
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
selectedValue(e,data)
|
||||
{
|
||||
// console.log('501 function',);
|
||||
// console.log('inside function in bussiness_address_type,',e);
|
||||
// console.log('inside function in this.additional_premises,',data);
|
||||
|
||||
let premisesData = e ;
|
||||
this.tempArr = [];
|
||||
@ -562,12 +445,12 @@ export class AddressComponent implements OnInit {
|
||||
that.addressData[key].status = 0;
|
||||
return that.addressData[key];
|
||||
})
|
||||
//console.log(this.addressData);
|
||||
|
||||
premisesData.forEach((val,index)=>
|
||||
{
|
||||
//console.log(val);
|
||||
|
||||
this.z++;
|
||||
// console.log(this.addressTypes);
|
||||
|
||||
this.formPremisesArray.push({premises_types: val});
|
||||
|
||||
this.tempArr.push(this.addressData.filter(add=>add.address_type_id==val)[0]);
|
||||
@ -579,6 +462,7 @@ export class AddressComponent implements OnInit {
|
||||
{
|
||||
return data[index].premises_city[key].additional_premises_city;
|
||||
});
|
||||
//data[index].premises_city = data[index].premises_city.additional_premises_city;
|
||||
}
|
||||
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_month.setValue(Math.floor(converted_month));
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -17,7 +17,9 @@
|
||||
<mat-card style="margin: 12px;">
|
||||
<h6 style="margin: 12px;">Raw Material #{{l+1}}</h6>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<!--<pre>{{m_manufacturingProducts[0] | json}}</pre>-->
|
||||
<mat-form-field style="width:30%">
|
||||
<!--{{m_manufacturingProducts[0] | json}}-->
|
||||
<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-select>
|
||||
|
||||
@ -168,31 +168,36 @@ export class ClientInfoComponent implements OnInit {
|
||||
// Load form details for manufacturing
|
||||
let arr = record.filter(data => data.type_of_activity_id == 1);
|
||||
if (arr.length > 0) {
|
||||
let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (key) {
|
||||
return dataForm.main_raw_materials[key];
|
||||
});
|
||||
// let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (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._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
|
||||
let arr1 = record.filter(data => data.type_of_activity_id == 3);
|
||||
if (arr1.length > 0) {
|
||||
let api_trading_products = Object.keys(dataForm.trading_products).map(function (key) {
|
||||
return dataForm.trading_products[key];
|
||||
});
|
||||
// let api_trading_products = Object.keys(dataForm.trading_products).map(function (key) {
|
||||
// return dataForm.trading_products[key];
|
||||
// });
|
||||
let api_trading_products = dataForm.trade_details[0].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
|
||||
let arr2 = record.filter(data => data.type_of_activity_id == 4);
|
||||
if (arr2.length > 0) {
|
||||
let api_service_provider_products = Object.keys(dataForm.service_products).map(function (key) {
|
||||
return dataForm.service_products[key];
|
||||
});
|
||||
// let api_service_provider_products = Object.keys(dataForm.service_products).map(function (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._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
|
||||
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);
|
||||
if (arr1.length > 0) {
|
||||
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);
|
||||
if (arr2.length > 0) {
|
||||
@ -226,7 +231,7 @@ export class ClientInfoComponent implements OnInit {
|
||||
return dataForm.service_products[key];
|
||||
});
|
||||
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
|
||||
let arr3 = record.filter(data => data.type_of_activity_id == 2);
|
||||
@ -340,7 +345,7 @@ export class ClientInfoComponent implements OnInit {
|
||||
})
|
||||
} else {
|
||||
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_contact_person_name: [records.manufacturing_contact_person_name || 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">
|
||||
<mat-hint align="end" *ngIf="loanDetailsForm.controls['topup_amount'].value != ''">{{"₹"}} {{topUpAmtInWords}} Only</mat-hint>
|
||||
</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 *ngIf="loanDetailsForm.controls['is_transfer'].value != 'yes' && loanDetailsForm.controls['is_transfer'].value != '' ">
|
||||
|
||||
@ -99,27 +103,39 @@
|
||||
</mat-form-field>
|
||||
|
||||
<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-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">
|
||||
<mat-option value="borrowed">Borrowed from Relatives & Friends</mat-option>
|
||||
<mat-option value="own_money">Own money</mat-option>
|
||||
<mat-option value="other">Loan from another lender</mat-option>
|
||||
</mat-select>-->
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<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">
|
||||
</mat-form-field>
|
||||
</mat-form-field>-->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<mat-form-field style="width: 30%">
|
||||
<input matInput placeholder="EMI Comfort Level" formControlName="emi_level" (keypress)="keyPress($event)" required autocomplete="off">
|
||||
<mat-form-field style="width: 60%">
|
||||
<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>
|
||||
<!-- <div *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "> -->
|
||||
<mat-card *ngIf="mortageCardAccess">
|
||||
@ -165,7 +181,7 @@
|
||||
|
||||
<mat-form-field>
|
||||
<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-form-field>
|
||||
|
||||
@ -183,7 +199,8 @@
|
||||
|
||||
<mat-form-field>
|
||||
<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>
|
||||
<input matInput placeholder="Value as Per Agreement"
|
||||
|
||||
@ -42,11 +42,13 @@ export class LoanDetailsComponent implements OnInit {
|
||||
subProductName: any;
|
||||
|
||||
isOtherPurpose: boolean = false;
|
||||
isSource: boolean = false;
|
||||
isOtherSource: boolean = false;
|
||||
isPLSource: boolean = false;
|
||||
mortageCheck : boolean = true;
|
||||
OtherOwnerFlag : boolean;
|
||||
|
||||
endUserList: any = [];
|
||||
sourceList : any = [];
|
||||
ownerNames: any = [];
|
||||
m_endUseofLoad = [];
|
||||
m_sourceofamount = [];
|
||||
@ -59,6 +61,8 @@ export class LoanDetailsComponent implements OnInit {
|
||||
valAsPerAgmtInWords : any;
|
||||
ownContributionInWords : any;
|
||||
topUpAmtInWords: any;
|
||||
emiAmtInWords : any;
|
||||
emvAmtInWords : any;
|
||||
pageTitle: string ="Loan Details";
|
||||
|
||||
mortageCardAccess: boolean;
|
||||
@ -159,6 +163,9 @@ export class LoanDetailsComponent implements OnInit {
|
||||
this.loanDetailsForm.controls['topup_amount'].setValue(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) {
|
||||
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);
|
||||
}
|
||||
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);
|
||||
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.lender_name_type) {
|
||||
this.loanDetailsForm.controls['lender_name_type'].setValue(value.records.lender_name_type);
|
||||
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) {
|
||||
// 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['property_type'].setValue(value.records.property_type);
|
||||
this.propertyType = value.records.property_type;
|
||||
//console.log(value.records.property_type);
|
||||
@ -193,7 +229,11 @@ export class LoanDetailsComponent implements OnInit {
|
||||
else{
|
||||
this.loanDetailsForm.controls['percentage_of_construction'].setValue('');
|
||||
}
|
||||
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);
|
||||
// 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);
|
||||
@ -314,11 +354,14 @@ getM_sourceofamount() {
|
||||
is_topup: [''],
|
||||
balance_transfer_amount: [''],
|
||||
topup_amount: [''],
|
||||
end_use_topup:[''],
|
||||
lender: [''],
|
||||
other_bt_lender : [''],
|
||||
own_contribution: [''],
|
||||
source: [''],
|
||||
lender_name_type: [''],
|
||||
other_source:[''],
|
||||
personal_loan_source:[''],
|
||||
//lender_name_type: [''],
|
||||
emi_level: ['', Validators.compose([Validators.required])],
|
||||
property_type: ['', Validators.compose([Validators.required])],
|
||||
property_type_others:[''],
|
||||
@ -343,24 +386,48 @@ getM_sourceofamount() {
|
||||
|
||||
endUserChange(event) {
|
||||
this.endUserList = [];
|
||||
let OthersAvaliable;
|
||||
event.forEach(option => {
|
||||
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 });
|
||||
if (othersData == 'others') {
|
||||
|
||||
});
|
||||
|
||||
if (OthersAvaliable == 'others') {
|
||||
this.isOtherPurpose = true;
|
||||
return ;
|
||||
}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) {
|
||||
let EventValue;
|
||||
|
||||
event.value.forEach(option => {
|
||||
EventValue = option;
|
||||
if(EventValue == 'Others'){
|
||||
@ -397,7 +464,7 @@ getM_sourceofamount() {
|
||||
|
||||
if (this.isOtherPurpose) {
|
||||
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_topup = this.loanDetailsForm.controls['is_topup'].value;
|
||||
if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') {
|
||||
@ -405,14 +472,27 @@ getM_sourceofamount() {
|
||||
}
|
||||
else if(this.loanDetailsForm.controls['is_transfer'].value == 'no') {
|
||||
records.own_contribution = this.loanDetailsForm.controls['own_contribution'].value;
|
||||
records.source = this.loanDetailsForm.controls['source'].value;
|
||||
if (this.loanDetailsForm.controls['source'].value == 'other') {
|
||||
records.lender_name_type = this.loanDetailsForm.controls['lender_name_type'].value;
|
||||
}
|
||||
// records.source = this.loanDetailsForm.controls['source'].value;
|
||||
// if (this.loanDetailsForm.controls['source'].value == 'other') {
|
||||
// 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') {
|
||||
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') {
|
||||
records.lender = this.loanDetailsForm.controls['lender'].value;
|
||||
}
|
||||
@ -430,7 +510,19 @@ getM_sourceofamount() {
|
||||
dataOwner_name.push({owner_name: element})
|
||||
});
|
||||
records.owner_name_group = dataOwner_name;
|
||||
|
||||
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.percentage_of_construction = this.loanDetailsForm.controls['percentage_of_construction'].value;
|
||||
records.emv_per_customer = this.loanDetailsForm.controls['emv_per_customer'].value;
|
||||
@ -510,6 +602,12 @@ getM_sourceofamount() {
|
||||
case 5 :
|
||||
this.topUpAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 6 :
|
||||
this.emiAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 7:
|
||||
this.emvAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -8,23 +8,23 @@
|
||||
</h2>
|
||||
|
||||
<div *ngIf="noRecordsFound" style="max-width: 100vw !important;width: 100% !important;height: 95% !important;">
|
||||
<!-- <form [formGroup]="" class="address"> -->
|
||||
<form [formGroup]="stockForms" (submit)="submitDetails($event); false;">
|
||||
<mat-dialog-content>
|
||||
<mat-tab-group>
|
||||
<!-- <form [formGroup]="" class="address"> -->
|
||||
<form [formGroup]="stockForms" (submit)="submitDetails($event); false;">
|
||||
<mat-dialog-content>
|
||||
<mat-tab-group>
|
||||
<mat-tab label="Questions">
|
||||
<ng-template matTabContent>
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="100">
|
||||
<mat-card *ngIf="manufacturingForm">
|
||||
<mat-card-header>
|
||||
<p> Manufacturing Details</p>
|
||||
<mat-card-title><p> Manufacturing Details</p></mat-card-title>
|
||||
</mat-card-header>
|
||||
<div formArrayName="manufacturing_details">
|
||||
<div *ngFor="let md of stockForms.controls.manufacturing_details['controls']; let i=index" [formGroupName]="i">
|
||||
<div formArrayName="manufacturing_raw_materials">
|
||||
<div *ngFor="let mrm of md.controls.manufacturing_raw_materials['controls']; let a=index" [formGroupName]="a">
|
||||
<mat-card-title> <p>{{a+1}} . Raw Material </p> </mat-card-title>
|
||||
<mat-card-subtitle> <p>{{a+1}} . Raw Material </p> </mat-card-subtitle>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Name" formControlName="raw_name" >
|
||||
@ -80,7 +80,7 @@
|
||||
|
||||
<div formArrayName="manufacturing_finished_goods">
|
||||
<div *ngFor="let mfg of md.controls.manufacturing_finished_goods['controls']; let b=index" [formGroupName]="b">
|
||||
<mat-card-title> <p> {{b+1}} Finished Goods </p> </mat-card-title>
|
||||
<mat-card-subtitle> <p> {{b+1}} Finished Goods </p> </mat-card-subtitle>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Name" formControlName="goods_name" >
|
||||
@ -128,7 +128,7 @@
|
||||
|
||||
<div formArrayName="manufacturing_traded_goods">
|
||||
<div *ngFor="let mtg of md.controls.manufacturing_traded_goods['controls']; let c=index" [formGroupName]="c">
|
||||
<mat-card-title> <p>{{c+1}} Traded Goods </p> </mat-card-title>
|
||||
<mat-card-subtitle> <p>{{c+1}} Traded Goods </p> </mat-card-subtitle>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Name" formControlName="traded_goods_name" >
|
||||
@ -180,7 +180,7 @@
|
||||
|
||||
<mat-card *ngIf="retailForm">
|
||||
<mat-card-header>
|
||||
<p>Retail Details</p>
|
||||
<mat-card-title><p>Retail Details</p></mat-card-title>
|
||||
</mat-card-header>
|
||||
|
||||
<div formArrayName="retail_details">
|
||||
@ -188,7 +188,7 @@
|
||||
|
||||
<div formArrayName="retail_finished_goods">
|
||||
<div *ngFor="let retailfg of rd.controls.retail_finished_goods['controls']; let d=index" [formGroupName]="d">
|
||||
<mat-card-title> <p>{{d+1}} Finished Goods </p> </mat-card-title>
|
||||
<mat-card-subtitle> <p>{{d+1}} Finished Goods </p> </mat-card-subtitle>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Name" formControlName="goods_name" >
|
||||
@ -237,7 +237,7 @@
|
||||
|
||||
<div formArrayName="retail_traded_goods">
|
||||
<div *ngFor="let item of rd.controls.retail_traded_goods['controls']; let e=index" [formGroupName]="e">
|
||||
<mat-card-title> <p>{{e+1}} Traded Goods </p> </mat-card-title>
|
||||
<mat-card-subtitle> <p>{{e+1}} Traded Goods </p> </mat-card-subtitle>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Name" formControlName="traded_goods_name" >
|
||||
@ -291,14 +291,14 @@
|
||||
<mat-card *ngIf="tradingForm">
|
||||
|
||||
<mat-card-header>
|
||||
<p>Trading Details</p>
|
||||
<mat-card-title><p>Trading Details</p></mat-card-title>
|
||||
</mat-card-header>
|
||||
|
||||
<div formArrayName="trade_details">
|
||||
<div *ngFor="let td of stockForms.controls.trade_details['controls']; let k=index" [formGroupName]="k">
|
||||
<div formArrayName="trading_finished_goods">
|
||||
<div *ngFor="let tradesubdetail of td.controls.trading_finished_goods['controls']; let f=index" [formGroupName]="f">
|
||||
<mat-card-title> <p>{{f+1}} Finished Goods </p> </mat-card-title>
|
||||
<mat-card-subtitle> <p>{{f+1}} Finished Goods </p> </mat-card-subtitle>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Name" formControlName="goods_name" >
|
||||
@ -348,7 +348,7 @@
|
||||
|
||||
<div formArrayName="trading_traded_goods">
|
||||
<div *ngFor="let tradetg of td.controls.trading_traded_goods['controls']; let g=index" [formGroupName]="g">
|
||||
<mat-card-title> <p>{{g+1}} Traded Goods </p> </mat-card-title>
|
||||
<mat-card-subtitle> <p>{{g+1}} Traded Goods </p> </mat-card-subtitle>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Name" formControlName="traded_goods_name" >
|
||||
@ -509,10 +509,10 @@
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
|
||||
</mat-tab-group>
|
||||
</mat-dialog-content>
|
||||
</mat-tab-group>
|
||||
</mat-dialog-content>
|
||||
|
||||
<mat-dialog-actions>
|
||||
<mat-dialog-actions>
|
||||
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
<mat-label>Remarks</mat-label>
|
||||
@ -522,9 +522,9 @@
|
||||
<div fxFlex="40" align="end">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
</mat-dialog-actions>
|
||||
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<notifier-container></notifier-container>
|
||||
@ -532,6 +532,6 @@
|
||||
<p>Stock Details</p>
|
||||
<form [formGroup]="stockForms" class="address"> -->
|
||||
<!-- {{uomData | json}} -->
|
||||
<!-- <mat-card>
|
||||
<!-- <mat-card>
|
||||
=======
|
||||
<!-- {{uomData | json}} -->
|
||||
@ -1,27 +1,14 @@
|
||||
import {
|
||||
Component,
|
||||
OnInit,
|
||||
Inject,
|
||||
Input
|
||||
} from '@angular/core';
|
||||
import { Component,OnInit,Inject,Input } from '@angular/core';
|
||||
|
||||
import {
|
||||
FormBuilder,
|
||||
FormGroup,
|
||||
Validators,
|
||||
FormArray, FormControl,
|
||||
} from '@angular/forms';
|
||||
import { FormBuilder,FormGroup,Validators,FormArray, FormControl } from '@angular/forms';
|
||||
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
|
||||
import {
|
||||
MatDialog,
|
||||
MatDialogRef,
|
||||
MAT_DIALOG_DATA
|
||||
} from '@angular/material';
|
||||
import { MatDialog,MatDialogRef,MAT_DIALOG_DATA } from '@angular/material';
|
||||
|
||||
/** Service */
|
||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { analyzeAndValidateNgModules } from '@angular/compiler';
|
||||
|
||||
@Component({
|
||||
@ -29,9 +16,9 @@ import { analyzeAndValidateNgModules } from '@angular/compiler';
|
||||
templateUrl: './stock.component.html',
|
||||
styleUrls: ['./stock.component.scss']
|
||||
})
|
||||
|
||||
export class StockComponent implements OnInit {
|
||||
// @Input() pdid: number;
|
||||
// @Input() form_id: number;
|
||||
|
||||
pageTitle: string ="Stock Details";
|
||||
pdid: number;
|
||||
form_id: number;
|
||||
@ -83,7 +70,7 @@ export class StockComponent implements OnInit {
|
||||
flipHorizontal: 4,
|
||||
flipVertical: 4,
|
||||
}
|
||||
};
|
||||
};
|
||||
ngOnInit() {
|
||||
|
||||
// this._pd.stockFormsAccess({pd_id:this.pdid}).subscribe(data => {
|
||||
@ -122,7 +109,7 @@ export class StockComponent implements OnInit {
|
||||
}
|
||||
|
||||
public initstockForms(record){
|
||||
console.log(record);
|
||||
console.log(record);
|
||||
let params: any = {};
|
||||
params.pd_id = this.pdid;
|
||||
params.pd_form_id = this.form_id;
|
||||
@ -131,8 +118,9 @@ console.log(record);
|
||||
if (value.status == 200) {
|
||||
let dataForm = value.records;
|
||||
|
||||
if(dataForm !== undefined) {
|
||||
|
||||
if(dataForm !== undefined) {
|
||||
console.log(dataForm);
|
||||
this.stockForms = this.fb.group({
|
||||
pdid: [this.pdid],
|
||||
formid: [this.form_id],
|
||||
@ -142,89 +130,120 @@ console.log(record);
|
||||
trade_details: this.fb.array([this.tradingFormCreation(record)]),
|
||||
});
|
||||
|
||||
let arr0 = Object.keys(record).map(function (key) {
|
||||
return record[key];
|
||||
});
|
||||
let arr = record.filter(data => data.type_of_activity_id == 1);
|
||||
|
||||
console.log(133,arr.length);
|
||||
if(arr.length > 0) {
|
||||
let retail_finished_goods;
|
||||
let manufacturing_raw_materials;
|
||||
let manufacturing_finished_goods;
|
||||
let manufacturing_traded_goods;
|
||||
if(dataForm.manufacturing_raw_materials !==undefined){
|
||||
manufacturing_raw_materials = Object.keys(dataForm.manufacturing_raw_materials).map(function (key) {
|
||||
return dataForm.manufacturing_raw_materials[key];
|
||||
});
|
||||
}
|
||||
if(dataForm.manufacturing_finished_goods !==undefined){
|
||||
manufacturing_finished_goods = Object.keys(dataForm.manufacturing_finished_goods).map(function (key) {
|
||||
return dataForm.manufacturing_finished_goods[key];
|
||||
});
|
||||
}
|
||||
if(dataForm.manufacturing_traded_goods !==undefined){
|
||||
manufacturing_traded_goods = Object.keys(dataForm.manufacturing_traded_goods).map(function (key) {
|
||||
return dataForm.manufacturing_traded_goods[key];
|
||||
});
|
||||
}
|
||||
if(dataForm.retail_finished_goods !==undefined)
|
||||
{
|
||||
retail_finished_goods = Object.keys(dataForm.retail_finished_goods).map(function(key)
|
||||
{
|
||||
return dataForm.retail_finished_goods[key];
|
||||
})
|
||||
}
|
||||
// console.log(1,dataForm);
|
||||
// console.log(164,dataForm.manufacturing_details);
|
||||
// console.log(2,dataForm.retail_details);
|
||||
// console.log(3,dataForm.retail_details[0]);
|
||||
// console.log(4,dataForm.retail_details[0].retail_finished_goods);
|
||||
// console.log(5,dataForm.retail_details[0].retail_traded_goods);
|
||||
//let retail_finished_goods;
|
||||
// let manufacturing_raw_materials;
|
||||
// let manufacturing_finished_goods;
|
||||
// let manufacturing_traded_goods;
|
||||
// if(dataForm.manufacturing_raw_materials !==undefined){
|
||||
// manufacturing_raw_materials = Object.keys(dataForm.manufacturing_raw_materials).map(function (key) {
|
||||
// return dataForm.manufacturing_raw_materials[key];
|
||||
// });
|
||||
// }
|
||||
// if(dataForm.manufacturing_finished_goods !==undefined){
|
||||
// manufacturing_finished_goods = Object.keys(dataForm.manufacturing_finished_goods).map(function (key) {
|
||||
// return dataForm.manufacturing_finished_goods[key];
|
||||
// });
|
||||
// }
|
||||
// else{
|
||||
// manufacturing_finished_goods = null;
|
||||
// }
|
||||
// if(dataForm.manufacturing_traded_goods !==undefined){
|
||||
// manufacturing_traded_goods = Object.keys(dataForm.manufacturing_traded_goods).map(function (key) {
|
||||
// return dataForm.manufacturing_traded_goods[key];
|
||||
// });
|
||||
// }
|
||||
// else{
|
||||
// manufacturing_traded_goods = null;
|
||||
// }
|
||||
|
||||
//console.log(retail_finished_goods,manufacturing_traded_goods);
|
||||
// console.log(163,dataForm.manufacturing_details.manufacturing_raw_materials);
|
||||
// console.log(164,dataForm.manufacturing_details[0]);
|
||||
// console.log(164,dataForm.manufacturing_details[0].manufacturing_raw_materials);
|
||||
|
||||
let manufacturing_temparr = [];
|
||||
manufacturing_temparr['manufacturing_traded_goods'] = manufacturing_traded_goods;manufacturing_temparr['manufacturing_finished_goods'] = manufacturing_finished_goods;manufacturing_temparr['manufacturing_raw_materials'] = manufacturing_raw_materials;
|
||||
|
||||
manufacturing_temparr['manufacturing_raw_materials'] = dataForm.manufacturing_details[0].manufacturing_raw_materials;
|
||||
manufacturing_temparr['manufacturing_finished_goods'] = dataForm.manufacturing_details[0].manufacturing_finished_goods;
|
||||
manufacturing_temparr['manufacturing_traded_goods'] = dataForm.manufacturing_details[0].manufacturing_traded_goods;
|
||||
|
||||
this.initManufacturingDetails(manufacturing_temparr);
|
||||
//this.initManufacturingDetails(dataForm);
|
||||
|
||||
}
|
||||
|
||||
let arr1 = record.filter(data => data.type_of_activity_id == 2);
|
||||
if(arr1.length > 0) {
|
||||
let retail_finished_goods;
|
||||
let retail_traded_goods;
|
||||
// let retail_finished_goods;
|
||||
// let retail_traded_goods;
|
||||
|
||||
|
||||
if(dataForm.retail_traded_goods !==undefined){
|
||||
retail_traded_goods = Object.keys(dataForm.retail_traded_goods).map(function (key) {
|
||||
return dataForm.retail_traded_goods[key];
|
||||
});
|
||||
}
|
||||
if(dataForm.retail_finished_goods !==undefined)
|
||||
{
|
||||
retail_finished_goods = Object.keys(dataForm.retail_finished_goods).map(function(key)
|
||||
{
|
||||
return dataForm.retail_finished_goods[key];
|
||||
})
|
||||
}
|
||||
// if(dataForm.retail_traded_goods !==undefined){
|
||||
// retail_traded_goods = Object.keys(dataForm.retail_traded_goods).map(function (key) {
|
||||
// return dataForm.retail_traded_goods[key];
|
||||
// });
|
||||
// }
|
||||
// else{
|
||||
// retail_traded_goods = null;
|
||||
// }
|
||||
// if(dataForm.retail_finished_goods !==undefined)
|
||||
// {
|
||||
// retail_finished_goods = Object.keys(dataForm.retail_finished_goods).map(function(key)
|
||||
// {
|
||||
// return dataForm.retail_finished_goods[key];
|
||||
// })
|
||||
// }
|
||||
// else{
|
||||
// retail_finished_goods = null;
|
||||
// }
|
||||
// console.log(dataForm.retail_finished_goods);
|
||||
// console.log(dataForm.retail_traded_goods);
|
||||
|
||||
let retail_temparr = [];
|
||||
retail_temparr['retail_traded_goods'] = retail_traded_goods;
|
||||
retail_temparr['retail_finished_goods'] = retail_finished_goods;
|
||||
retail_temparr['retail_traded_goods'] = dataForm.retail_details[0].retail_traded_goods;
|
||||
retail_temparr['retail_finished_goods'] = dataForm.retail_details[0].retail_finished_goods;
|
||||
this.initRetailDetails(retail_temparr);
|
||||
//this.initRetailDetails(dataForm);
|
||||
//this.initRetailDetails(null);
|
||||
}
|
||||
|
||||
let arr2 = record.filter(data => data.type_of_activity_id == 3);
|
||||
if(arr2.length > 0) {
|
||||
let trading_finished_goods;
|
||||
let trading_traded_goods;
|
||||
// let trading_finished_goods;
|
||||
// let trading_traded_goods;
|
||||
|
||||
if(dataForm.trading_finished_goods !==undefined){
|
||||
// if(dataForm.trading_finished_goods !==undefined){
|
||||
|
||||
trading_finished_goods = Object.keys(dataForm.trading_finished_goods).map(function (key) {
|
||||
return dataForm.trading_finished_goods[key];
|
||||
});
|
||||
}
|
||||
if(dataForm.trading_traded_goods !==undefined)
|
||||
{
|
||||
trading_traded_goods = Object.keys(dataForm.trading_traded_goods).map(function(key)
|
||||
{
|
||||
return dataForm.trading_traded_goods[key];
|
||||
})
|
||||
}
|
||||
// trading_finished_goods = Object.keys(dataForm.trading_finished_goods).map(function (key) {
|
||||
// return dataForm.trading_finished_goods[key];
|
||||
// });
|
||||
// }
|
||||
// else{
|
||||
// trading_finished_goods = null;
|
||||
// }
|
||||
|
||||
|
||||
// if(dataForm.trading_traded_goods !==undefined)
|
||||
// {
|
||||
// trading_traded_goods = Object.keys(dataForm.trading_traded_goods).map(function(key)
|
||||
// {
|
||||
// return dataForm.trading_traded_goods[key];
|
||||
// })
|
||||
// }
|
||||
|
||||
let trading_temparr = [];
|
||||
trading_temparr['trading_finished_goods'] = trading_finished_goods;
|
||||
trading_temparr['trading_traded_goods'] = trading_traded_goods;
|
||||
trading_temparr['trading_finished_goods'] = dataForm.trade_details[0].trading_finished_goods;
|
||||
trading_temparr['trading_traded_goods'] = dataForm.trade_details[0].trading_traded_goods;
|
||||
//this.initTradingDetails(trading_temparr);
|
||||
this.initTradingDetails(trading_temparr);
|
||||
}
|
||||
let arr3 = record.filter(data => data.type_of_activity_id == 4);
|
||||
@ -316,10 +335,10 @@ console.log(record);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
retailForm: Boolean = false;
|
||||
retailFormCreation(val) {
|
||||
retailForm: Boolean = false;
|
||||
retailFormCreation(val) {
|
||||
|
||||
let arr = val.filter(data => data.type_of_activity_id == 2);
|
||||
if (arr.length > 0) {
|
||||
@ -332,10 +351,10 @@ console.log(record);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tradingForm: Boolean = false;
|
||||
tradingFormCreation(val) {
|
||||
tradingForm: Boolean = false;
|
||||
tradingFormCreation(val) {
|
||||
let arr = val.filter(data => data.type_of_activity_id == 3);
|
||||
if (arr.length > 0) {
|
||||
this.tradingForm = true;
|
||||
@ -346,7 +365,7 @@ console.log(record);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//setSku(sku: string, index: number) {
|
||||
// const faControl =
|
||||
@ -363,21 +382,27 @@ console.log(record);
|
||||
|
||||
if(datas === null){
|
||||
// console.log(299,'if');
|
||||
// rawMaterial.push(this.createRawmaterial(null));
|
||||
// finishedGoods.push(this.createGoods(null));
|
||||
// tradedGoods.push(this.createTradedGoods(null));
|
||||
rawMaterial.push(this.createRawmaterial(null));
|
||||
finishedGoods.push(this.createGoods(null));
|
||||
tradedGoods.push(this.createTradedGoods(null));
|
||||
|
||||
} else {
|
||||
// console.log(305,'else')
|
||||
// console.log(377,datas);
|
||||
// console.log(datas.manufacturing_raw_materials);
|
||||
if(datas.manufacturing_raw_materials != undefined){
|
||||
for (let val of datas.manufacturing_raw_materials) {
|
||||
// console.log(val);
|
||||
if(val.raw_value){
|
||||
this.M_rawValueInWords = this._pd.convertNumberToWords(val.raw_value);
|
||||
}
|
||||
rawMaterial.push(this.createRawmaterial(val));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
rawMaterial.push(this.createRawmaterial(null));
|
||||
}
|
||||
if(datas.manufacturing_finished_goods != undefined){
|
||||
for (let val of datas.manufacturing_finished_goods) {
|
||||
// console.log(val);
|
||||
if(val.goods_value){
|
||||
@ -386,6 +411,11 @@ console.log(record);
|
||||
finishedGoods.push(this.createGoods(val));
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
finishedGoods.push(this.createGoods(null));
|
||||
}
|
||||
if(datas.manufacturing_traded_goods !== undefined){
|
||||
for (let val of datas.manufacturing_traded_goods) {
|
||||
// console.log(val);
|
||||
if(val.estimated_traded_goods_value){
|
||||
@ -394,6 +424,10 @@ console.log(record);
|
||||
tradedGoods.push(this.createTradedGoods(val));
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
tradedGoods.push(this.createTradedGoods(null));
|
||||
}
|
||||
// console.log(310,rawMaterial);
|
||||
}
|
||||
}
|
||||
@ -456,7 +490,8 @@ console.log(record);
|
||||
tradedGoods.push(this.createTradedGoods(null));
|
||||
|
||||
} else {
|
||||
|
||||
//console.log(479,datas.retail_finished_goods);
|
||||
if(datas.retail_finished_goods != undefined){
|
||||
for (let val of datas.retail_finished_goods) {
|
||||
// console.log(val);
|
||||
|
||||
@ -466,6 +501,13 @@ console.log(record);
|
||||
finishedGoods.push(this.createGoods(val));
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
finishedGoods.push(this.createGoods(null));
|
||||
}
|
||||
|
||||
//console.log(495,datas.retail_traded_goods);
|
||||
if(datas.retail_traded_goods !== undefined){
|
||||
for (let val of datas.retail_traded_goods) {
|
||||
// console.log(val);
|
||||
if(val.estimated_traded_goods_value){
|
||||
@ -475,6 +517,10 @@ console.log(record);
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
tradedGoods.push(this.createTradedGoods(null));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
createGoods2() {
|
||||
@ -544,7 +590,8 @@ console.log(record);
|
||||
// tradedGoods.push(this.createTradedGoods(val.trading_traded_goods));
|
||||
|
||||
// }
|
||||
|
||||
if(datas.trading_finished_goods !==undefined)
|
||||
{
|
||||
for (let val of datas.trading_finished_goods) {
|
||||
// console.log(val);
|
||||
if(val.goods_value){
|
||||
@ -553,13 +600,22 @@ console.log(record);
|
||||
finishedGoods.push(this.createGoods(val));
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
finishedGoods.push(this.createGoods(null));
|
||||
}
|
||||
if(datas.trading_traded_goods !==undefined)
|
||||
{
|
||||
for (let val of datas.trading_traded_goods) {
|
||||
// console.log(val);
|
||||
if(val.estimated_traded_goods_value){
|
||||
this.T_tradedGoodsValueInWords = this._pd.convertNumberToWords(val.estimated_traded_goods_value);
|
||||
}
|
||||
tradedGoods.push(this.createTradedGoods(val));
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
tradedGoods.push(this.createTradedGoods(null));
|
||||
}
|
||||
|
||||
}
|
||||
@ -600,7 +656,6 @@ console.log(record);
|
||||
}
|
||||
|
||||
|
||||
|
||||
deleteRawMaterials(index,flag) {
|
||||
if(flag==1){
|
||||
const control = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['manufacturing_raw_materials'];
|
||||
|
||||
@ -132,19 +132,22 @@ export class SupplierInfoComponent implements OnInit {
|
||||
});
|
||||
let arr = record.filter(data => data.type_of_activity_id == 1);
|
||||
if(arr.length > 0) {
|
||||
let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (key) {
|
||||
return dataForm.main_raw_materials[key];
|
||||
});
|
||||
// let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (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._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);
|
||||
if(arr1.length > 0) {
|
||||
let api_trading_products = Object.keys(dataForm.trading_products).map(function (key) {
|
||||
return dataForm.trading_products[key];
|
||||
});
|
||||
// let api_trading_products = Object.keys(dataForm.trading_products).map(function (key) {
|
||||
// return dataForm.trading_products[key];
|
||||
// });
|
||||
let api_trading_products = dataForm.trade_details[0].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;
|
||||
} else {
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above"
|
||||
(click)="getPDStart(viewID)"><mat-icon>question_answer</mat-icon></button>
|
||||
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus===pdStatusCheck.QC_COMPLETED || 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"
|
||||
(click)="getPDIDReport(viewID)"><mat-icon>ballot</mat-icon></button>
|
||||
|
||||
@ -191,24 +191,35 @@
|
||||
</ng-template>
|
||||
|
||||
</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">
|
||||
<mat-card>
|
||||
<div style="color:red !important;">
|
||||
<h6>QC Remarks</h6>
|
||||
<h6>QC Notes</h6>
|
||||
</div>
|
||||
<p>
|
||||
{{ pdMasterData[0].qc_remarks}}</p>
|
||||
<p>
|
||||
{{ pdMasterData[0]?.qc_feedback}}</p>
|
||||
<div>
|
||||
<p>
|
||||
<app-rating [rating]="pd_QC_Rating"></app-rating>
|
||||
</p>
|
||||
</div>
|
||||
{{ pdMasterData[0]?.qc_remarks}}</p>
|
||||
|
||||
</mat-card>
|
||||
</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>
|
||||
</mat-card-content>
|
||||
</div>
|
||||
|
||||
@ -1,15 +1,20 @@
|
||||
/** Common Import Section */
|
||||
import {Injectable} from '@angular/core';
|
||||
import {Observable} from 'rxjs';//for Datatables
|
||||
import {HttpClient, HttpParams} from '@angular/common/http';
|
||||
import {catchError, map} from 'rxjs/operators';
|
||||
import {of} from 'rxjs';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';//for Datatables
|
||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||
import { catchError, map } from 'rxjs/operators';
|
||||
import { of } from 'rxjs';
|
||||
|
||||
/** Imported Service Files Are., */
|
||||
import {AwsService} from '../../AwsService/aws.service';
|
||||
import { AwsService } from '../../AwsService/aws.service';
|
||||
|
||||
/** 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', ' ');
|
||||
|
||||
@ -40,14 +45,14 @@ export class PdTrigerService {
|
||||
|
||||
// get add pd master details
|
||||
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(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
saveForm(records: any): Observable<any> {
|
||||
records.fk_createdby = this._aws.getlocale();
|
||||
let params = {records}
|
||||
let params = { records }
|
||||
return this._http.post(this.apiUrl + 'savePDFormDetails', params)
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
@ -127,7 +132,7 @@ export class PdTrigerService {
|
||||
// get status based pd list
|
||||
getTabStatusPdDetails(status: string): Observable<any> {
|
||||
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)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
@ -148,7 +153,7 @@ export class PdTrigerService {
|
||||
editData.pd_status = status;
|
||||
editData.fk_updatedby = this._aws.getlocale();
|
||||
// editData.updatedon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl + "updatePDMaster", {records: editData})
|
||||
return this._http.post<any>(this.apiUrl + "updatePDMaster", { records: editData })
|
||||
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
@ -159,7 +164,7 @@ export class PdTrigerService {
|
||||
updatePdApplicant(editData: any): Observable<any> {
|
||||
// editData.fk_updatedby = this._aws.getlocale();
|
||||
// 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(
|
||||
catchError(this.handleError('operation', []))
|
||||
@ -168,7 +173,7 @@ export class PdTrigerService {
|
||||
|
||||
// get pd allocation to details
|
||||
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(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
@ -178,7 +183,7 @@ export class PdTrigerService {
|
||||
updatePdOfficer(updateData: any): Observable<any> {
|
||||
updateData.fk_updatedby = this._aws.getlocale();
|
||||
// updateData.updatedon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl + "allocatePD", {"records": updateData})
|
||||
return this._http.post<any>(this.apiUrl + "allocatePD", { "records": updateData })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
@ -188,7 +193,7 @@ export class PdTrigerService {
|
||||
updateSchedule(updateData: any): Observable<any> {
|
||||
updateData.fk_scheduled_by = this._aws.getlocale();
|
||||
// updateData.createdon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl + "schdulePD", {"records": updateData})
|
||||
return this._http.post<any>(this.apiUrl + "schdulePD", { "records": updateData })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
@ -197,7 +202,7 @@ export class PdTrigerService {
|
||||
//load pd template details
|
||||
loadPDTemplates(pdId: string): Observable<any> {
|
||||
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)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
@ -231,8 +236,8 @@ export class PdTrigerService {
|
||||
// )
|
||||
// }
|
||||
// get assessed income form details
|
||||
getAssessedIncomeFormDetails(formDetails):Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl+"getAssessedIncome",formDetails)
|
||||
getAssessedIncomeFormDetails(formDetails): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getAssessedIncome", formDetails)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
@ -243,9 +248,9 @@ export class PdTrigerService {
|
||||
return of(result as T);
|
||||
};
|
||||
}
|
||||
// common Pd form details get for the Pd Process
|
||||
getPDFormDetailsWithID(pdID, formID ):Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl+"getPDFormDetails",{"pd_id":pdID,"pd_form_id" : formID})
|
||||
// common Pd form details get for the Pd Process
|
||||
getPDFormDetailsWithID(pdID, formID): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getPDFormDetails", { "pd_id": pdID, "pd_form_id": formID })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
@ -257,7 +262,7 @@ getPDFormDetailsWithID(pdID, formID ):Observable<any> {
|
||||
// saveData[0].fk_updatedby = this._aws.getlocale();
|
||||
// saveData[0].updatedon = currentdate;
|
||||
|
||||
return this._http.post<any>(this.apiUrl+"savePDFormDetails",{"records":saveData})
|
||||
return this._http.post<any>(this.apiUrl + "savePDFormDetails", { "records": saveData })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
@ -270,7 +275,7 @@ getPDFormDetailsWithID(pdID, formID ):Observable<any> {
|
||||
// saveData[0].fk_updatedby = this._aws.getlocale();
|
||||
// saveData[0].updatedon = currentdate;
|
||||
|
||||
return this._http.post<any>(this.apiUrl+"savePDQuestions",{"records":saveData})
|
||||
return this._http.post<any>(this.apiUrl + "savePDQuestions", { "records": saveData })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
@ -280,59 +285,59 @@ getPDFormDetailsWithID(pdID, formID ):Observable<any> {
|
||||
// get Pd Final report Question Answer
|
||||
|
||||
getPdFinalReportDetails(pdId: number): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl+"getFinalPDReportQuestions",{"pd_id":pdId})
|
||||
return this._http.post<any>(this.apiUrl + "getFinalPDReportQuestions", { "pd_id": pdId })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
getPDReportFinalDocument(pdId: any): Observable<any>{
|
||||
getPDReportFinalDocument(pdId: any): Observable<any> {
|
||||
pdId.fk_createdby = this._aws.getlocale();
|
||||
return this._http.post<any>(this.apiUrl+"generatePDReport",{"records": pdId})
|
||||
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}})
|
||||
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})
|
||||
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}})
|
||||
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>{
|
||||
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})
|
||||
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 }})
|
||||
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 }})
|
||||
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', []))
|
||||
)
|
||||
@ -342,31 +347,51 @@ getTypeofActivityForSuppliedInfoForm(pd_id: any): Observable<any>{
|
||||
pdReviewStatusUpdate(editData: any): Observable<any> {
|
||||
editData.fk_updatedby = this._aws.getlocale();
|
||||
// editData.updatedon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl + "updatePDMaster", {records: editData})
|
||||
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;
|
||||
// }
|
||||
// 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) {
|
||||
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'];
|
||||
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';
|
||||
@ -379,17 +404,17 @@ convertNumberToWords(amount) {
|
||||
let number = atemp[0].split(",").join("");
|
||||
let n_length = number.length;
|
||||
let words_string = "";
|
||||
let value : any;
|
||||
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++) {
|
||||
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++) {
|
||||
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]);
|
||||
@ -425,13 +450,13 @@ convertNumberToWords(amount) {
|
||||
words_string = words_string.split(" ").join(" ");
|
||||
}
|
||||
return words_string;
|
||||
}
|
||||
}
|
||||
|
||||
// save additional requirements
|
||||
saveAdditionalRequirements(saveData: any): Observable<any> {
|
||||
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(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
@ -439,7 +464,7 @@ convertNumberToWords(amount) {
|
||||
|
||||
stockFormAccess(pdid: any): Observable<any> {
|
||||
|
||||
return this._http.post<any>(this.apiUrl+"getTypeOfActivetyFromBusinessForm",{"records":pdid})
|
||||
return this._http.post<any>(this.apiUrl + "getTypeOfActivetyFromBusinessForm", { "records": pdid })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
@ -454,10 +479,9 @@ convertNumberToWords(amount) {
|
||||
* Sriram
|
||||
*/
|
||||
|
||||
overAllSearchFormDetails(searchItem)
|
||||
{
|
||||
let records = {'records':searchItem};
|
||||
return this._http.post(this.apiUrl+'filterPDList',records).pipe(
|
||||
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">
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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>
|
||||
@ -1,6 +1,7 @@
|
||||
|
||||
.rating {
|
||||
float:left;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.rating:not(:checked) > input {
|
||||
@ -40,3 +41,8 @@
|
||||
.rating > label:hover ~ input:checked ~ label {
|
||||
color: #ea0;
|
||||
}
|
||||
// .rating::after {
|
||||
// content: "";
|
||||
// clear: both;
|
||||
// display: table;
|
||||
// }
|
||||
|
||||
@ -22,4 +22,9 @@ export class RatingComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
lableVal: string = '';
|
||||
over(val): void {
|
||||
this.lableVal = val;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user