merge : kms

This commit is contained in:
gandhimathi 2018-12-24 19:46:19 +05:30
parent 62f354fd4a
commit 9df9e3d2a5
27 changed files with 617 additions and 294 deletions

View File

@ -56,7 +56,7 @@
<mat-icon style="color: white;">short_text</mat-icon>
</button>
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
<mat-card style="text-align:center;"> <button mat-raised-button color="red" *ngIf="reGenerateBtn" (click)="reGeneratePFReport()" style="padding: 0 58px !important;">Re-generate Report</button></mat-card>
<mat-card style="text-align:center;" *ngIf="qcStatus !== 'QC_COMPLETED'"> <button mat-raised-button color="red" *ngIf="reGenerateBtn" (click)="reGeneratePFReport()" style="padding: 0 58px !important;" >Re-generate Report</button></mat-card>
<button mat-menu-item *ngFor="let pd of pdReportVersionList" [ngClass]="{'active': selectedItem == item}" (click)="changeVersion(pd)" style="font-size: 0.9em !important;height:6% !important;line-height: normal !important;">
{{ pd.doc_name }}<span *ngIf="pd.is_latest == 1" [style.color]="'green'">( Current Version )</span><br>
<span style="color:rgba(117, 115, 115, 0.87)!important;font-size:13px !important;">{{pd.createdby}}</span><br>
@ -64,13 +64,14 @@
<hr>
</button>
<mat-card *ngIf="qcStatus === 'QC_COMPLETED'" style="text-align:center;position: absolute;
bottom: 10px;"> <button mat-raised-button color="red" *ngIf="reGenerateBtn" (click)="reportReview()" style="padding: 0 58px !important;">QC Review</button> </mat-card>
</mat-sidenav>
<div class="main-content" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
<figure>
{{qcStatus}}
<figure style="min-height: 240px;">
<div *ngIf="latestPDDetails">
<div style="margin: 12px;
@ -78,8 +79,8 @@
padding: 8px;">
<div style="text-align: right;" class="mb-1">
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Edit" matTooltipPosition="above"
*ngIf="latestPDDetails.is_latest == 1" (click)="addNewQuestion()"><mat-icon>edit</mat-icon></button>
<button mat-stroked-button *ngIf="latestPDDetails.is_latest == 0" (click)="changeDocumentEdit()">Restore</button>
*ngIf="latestPDDetails.is_latest == 1 && qcStatus !== 'QC_COMPLETED'" (click)="addNewQuestion()"><mat-icon>edit</mat-icon></button>
<button mat-stroked-button *ngIf="latestPDDetails.is_latest == 0 && qcStatus !== 'QC_COMPLETED'" (click)="changeDocumentEdit()">Restore</button>
</div>
<div *ngIf="reGenerateBtn">
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">

View File

@ -10,6 +10,7 @@ import { MatDialog,
MatDialogRef,
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';
/**sweet alert */
// import Swal from 'sweetalert2';
@ -117,12 +118,14 @@ export class PdReportComponent implements OnInit {
})
}
public qcStatus: string = '';
getPdReportVersionList(){
this.pdTrigerService.getPdDocVersionList(this.startPD).subscribe(data => {
if(data.status == 200 && data.dataStatus){
this.pdReportVersionList = [...data.records].reverse();
this.pdReportVersionList = [...data.records.reports_urls].reverse();
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));
this.reGenerateBtn = true;
} else {
@ -174,6 +177,22 @@ export class PdReportComponent implements OnInit {
console.log(this.latestPDDetails);
}
reportReview(): void {
const dialogRef = this.dialog.open(QcReviewComponent, {
data: { startId : this.startPD },
disableClose: true
});
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.getPdReportFinalTemplateDetails();
// this.getQuestionsMasters();
// this.getBranch();
// this.isPopupOpened = false;
});
}
changeDocumentEdit() : void{
@ -202,8 +221,6 @@ export class PdReportComponent implements OnInit {
});
// Swal('User Created');
// swal({
// title: 'Error!',

View File

@ -0,0 +1,23 @@
<h2 mat-dialog-title>QC Completed Review</h2>
<mat-dialog-content class="mat-typography">
<!--<h3>Develop across all platforms</h3>-->
<div style="margin: 12px; width: 340px;">
<form role="form" *ngIf="showForm" [formGroup]="ngForm" accept-charset="UTF-8" novalidate>
<div>
<mat-form-field appearance="outline" style="width: 100%">
<mat-label>Remarks</mat-label>
<textarea matInput placeholder="Remarks" formControlName="qc_remarks"></textarea>
</mat-form-field>
</div>
<div>
<app-rating [rating]="ngForm.get('qc_rating').value" (ratingClick)='ratingComponentClick($event)'></app-rating>
</div>
</form>
</div>
</mat-dialog-content>
<mat-dialog-actions align="end">
<button mat-button class="btn btn-primary" (click)="myClick()">Save</button>
<button mat-button mat-dialog-close>Cancel</button>
</mat-dialog-actions>

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { QcReviewComponent } from './qc-review.component';
describe('QcReviewComponent', () => {
let component: QcReviewComponent;
let fixture: ComponentFixture<QcReviewComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ QcReviewComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(QcReviewComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,87 @@
import { Component, OnInit, ViewChild , Input, Inject} from '@angular/core';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import { PdTrigerService } from '../../../../pd-service/pd-triger.service';
import { NotifierService } from "angular-notifier";
import {
MatDialog,
MatDialogRef,
MAT_DIALOG_DATA
} from '@angular/material';
@Component({
selector: 'app-qc-review',
templateUrl: './qc-review.component.html',
styleUrls: ['./qc-review.component.scss']
})
export class QcReviewComponent implements OnInit {
@Input() questionId: number;
ngForm: FormGroup;
recordData: any;
showForm: Boolean;
/**
* Notifier service
*/
private notifier: NotifierService;
constructor( private _formBuilder: FormBuilder,
private pdTrigerService: PdTrigerService,
notifier: NotifierService ,
private dialogRef: MatDialogRef<QcReviewComponent>,
@Inject(MAT_DIALOG_DATA) public data: any) {
this.notifier = notifier;
// this.mycontent = `<p>My html content</p>`;
}
ngOnInit() {
this.getQcCompleteReviewStatus();
}
getQcCompleteReviewStatus() {
this.pdTrigerService.getQCReportFinalReviewDetails(this.data.startId, "QC").subscribe(data => {
if(data['dataStatus']){
this.recordData = data.records[0];
this.ngForm = this._formBuilder.group({
qc_remarks: [this.recordData.qc_remarks],
qc_rating: [Number(this.recordData.qc_rating)],
pd_status: [this.recordData.pd_status],
})
this.showForm = true;
}
},err => {
});
}
onChange($event: any): void {
console.log('onChange');
// this.log += new Date() + "<br />";
}
myClick(): void {
let template = this.ngForm.value;
template.pd_id = this.data.startId;
console.log(JSON.stringify(template));
this.pdTrigerService.pdReviewStatusUpdate(template).subscribe(data=>{
this.notifier.notify('success', 'Your Changes Updated.!');
this.dialogRef.close();
}, err => {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
})
}
// =============================
ratingClicked: number;
itemIdRatingClicked: string;
rating : number = 1;
ratingComponentClick(e){
this.ngForm.controls.qc_rating.setValue(e.rating);
}
}

View File

@ -105,19 +105,21 @@
<mat-option value="no">No</mat-option>
</mat-select>
</mat-form-field>
<div *ngIf="addressForm.controls['bussiness_activity'].value == 'yes'" style="width: 60%">
</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 style="width: 40%">
<input matInput placeholder="Year(s)" formControlName="business_years" min='0'>
<mat-form-field>
<input matInput placeholder="Year(s)" formControlName="business_years">
</mat-form-field>
<mat-form-field style="width: 40%">
<input matInput placeholder="Month(s)" formControlName="business_month" min='0' max='12'>
<mat-form-field>
<input matInput placeholder="Month(s)" formControlName="business_month" (change)="ConvertMonthintoYear($event.target.value)">
</mat-form-field>
</div>
</div>
</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 )
<mat-form-field>
<mat-select placeholder="Customer Behaviour"

View File

@ -610,5 +610,18 @@ export class AddressComponent implements OnInit {
this.validateAllFormFields(control);
}
});
}
ConvertMonthintoYear(e){
let business_year = this.addressForm.controls.business_years.value;
let converted_month : number = e%12;
let converted_year : number = e/12;
this.addressForm.controls.business_years.setValue(+business_year + +Math.floor(converted_year));
this.addressForm.controls.business_month.setValue(Math.floor(converted_month));
}
}

View File

@ -42,7 +42,7 @@
<div [formGroupName]="s">
<div>
<mat-form-field style="width:100%">
<mat-select placeholder="Property Type" formControlName="property_type" required>
<mat-select placeholder="Property Type" formControlName="property_type" >
<mat-option *ngFor="let prop of m_propertyType" [value]="prop.id">{{ prop.name }}</mat-option>
</mat-select>
</mat-form-field>
@ -63,7 +63,7 @@
<div [formGroupName]="s">
<div>
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model_four_weeler" required autocomplete="off">
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model_four_weeler" autocomplete="off">
</mat-form-field>
</div>
</div>
@ -77,7 +77,7 @@
<div [formGroupName]="s">
<div>
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model_two_weeler" required autocomplete="off">
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model_two_weeler" autocomplete="off">
</mat-form-field>
</div>
</div>
@ -91,7 +91,7 @@
<div [formGroupName]="s">
<div>
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Description" formControlName="consumer_durable_description" required>
<input matInput placeholder="Description" formControlName="consumer_durable_description" >
</mat-form-field>
</div>
</div>
@ -106,26 +106,26 @@
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<div fxFlex="33">
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Premium Paid" formControlName="premium_paid" required (keypress)="keyPress($event)" autocomplete="off">
<input matInput placeholder="Premium Paid" formControlName="premium_paid" (keypress)="keyPress($event)" autocomplete="off">
</mat-form-field>
</div>
<div fxFlex="33">
<mat-form-field>
<mat-select placeholder="Frequency" formControlName="frequency_mode" required>
<mat-select placeholder="Frequency" formControlName="frequency_mode" >
<mat-option *ngFor="let freqn of m_freqOfPurchase" [value]="freqn.frequency_id">{{ freqn.name }}</mat-option>
</mat-select>
</mat-form-field>
</div>
<div fxFlex="33">
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Sum Assured" formControlName="sum_assured" required (keypress)="keyPress($event)" autocomplete="off">
<input matInput placeholder="Sum Assured" formControlName="sum_assured" (keypress)="keyPress($event)" autocomplete="off">
</mat-form-field>
</div>
</div>
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<div fxFlex="33">
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Members Covered" formControlName="members_coverd" required autocomplete="off">
<input matInput placeholder="Members Covered" formControlName="members_coverd" autocomplete="off">
</mat-form-field>
</div>
</div>
@ -141,7 +141,7 @@
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<div fxFlex="33">
<mat-form-field>
<mat-select placeholder="Type" formControlName="investments_type" required>
<mat-select placeholder="Type" formControlName="investments_type" >
<mat-option *ngFor="let ins_type of m_investmentType" [value]="ins_type.id">{{ ins_type.name }}</mat-option>
</mat-select>
</mat-form-field>
@ -153,12 +153,12 @@
</div>
<div fxFlex="33" >
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Amount of Investment" formControlName="amount_of_invest" required (keypress)="keyPress($event)" autocomplete="off">
<input matInput placeholder="Amount of Investment" formControlName="amount_of_invest" (keypress)="keyPress($event)" autocomplete="off">
</mat-form-field>
</div>
<div fxFlex="33">
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Bank Name" formControlName="bank_name" required autocomplete="off">
<input matInput placeholder="Bank Name" formControlName="bank_name" autocomplete="off">
</mat-form-field>
</div>
</div>
@ -174,16 +174,16 @@
<div [formGroupName]="s">
<div>
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Description of the Assets" formControlName="any_other_assets" required autocomplete="off">
<input matInput placeholder="Description of the Assets" formControlName="any_other_assets" autocomplete="off">
</mat-form-field>
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Value of the Assets" formControlName="any_other_asset_value" required autocomplete="off">
<input matInput placeholder="Value of the Assets" formControlName="any_other_asset_value" autocomplete="off">
</mat-form-field>
<!-- <mat-form-field class="ml-xs example-full-width"> -->
<!-- <input matInput placeholder="Is Any Loan" formControlName="any_other_asset_loan" required> -->
<!-- <input matInput placeholder="Is Any Loan" formControlName="any_other_asset_loan" > -->
<!-- </mat-form-field> -->
<mat-form-field class="ml-xs example-full-width">
<mat-select placeholder="Is there any asset loan?" formControlName="any_other_asset_loan" required>
<mat-select placeholder="Is there any asset loan?" formControlName="any_other_asset_loan" >
<mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option>
<mat-option value="nan">NA</mat-option>
@ -215,7 +215,7 @@
<div fxFlex="33">
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Name of the Owner" formControlName="business_name_of_the_owner" autocomplete="off">
<input matInput placeholder="Name of the Business Owner" formControlName="business_name_of_the_owner" autocomplete="off">
</mat-form-field>
</div>
@ -223,7 +223,7 @@
<mat-form-field class="ml-xs example-full-width">
<mat-select placeholder="Name of the Owner"
formControlName="business_name_of_the_owner" required>
formControlName="business_name_of_the_owner" >
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name}}</mat-option>
@ -238,7 +238,7 @@
</div>
<div fxFlex="33">
<mat-form-field class="ml-xs example-full-width">
<mat-select placeholder="Relation" formControlName="relation" required>
<mat-select placeholder="Relation" formControlName="relation" >
<mat-option value="{{relations.relationship_id}}"
*ngFor="let relations of m_relation">
{{relations.name}}
@ -343,7 +343,7 @@
<div [formGroupName]="s">
<div>
<mat-form-field style="width:100%">
<mat-select placeholder="Property Type" formControlName="property_type" required>
<mat-select placeholder="Property Type" formControlName="property_type" >
<mat-option *ngFor="let prop of m_propertyType" [value]="prop.id">{{ prop.name }}</mat-option>
</mat-select>
</mat-form-field>
@ -364,7 +364,7 @@
<div [formGroupName]="s">
<div>
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model_four_weeler" required autocomplete="off">
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model_four_weeler" autocomplete="off">
</mat-form-field>
</div>
</div>
@ -378,7 +378,7 @@
<div [formGroupName]="s">
<div>
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model_two_weeler" required autocomplete="off">
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model_two_weeler" autocomplete="off">
</mat-form-field>
</div>
</div>
@ -406,7 +406,7 @@
<div [formGroupName]="s">
<div>
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Description" formControlName="consumer_durable_description" required>
<input matInput placeholder="Description" formControlName="consumer_durable_description" >
</mat-form-field>
</div>
</div>
@ -421,33 +421,33 @@
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<!---- <div fxFlex="33">
<mat-form-field>
<mat-select placeholder="Type" formControlName="insurance_type" required>
<mat-select placeholder="Type" formControlName="insurance_type" >
<mat-option *ngFor="let ins_type of m_insuranceType" [value]="ins_type.id">{{ ins_type.name }}</mat-option>
</mat-select>
</mat-form-field>
</div>-->
<div fxFlex="33">
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Premium Paid" formControlName="premium_paid" required (keypress)="keyPress($event)" autocomplete="off">
<input matInput placeholder="Premium Paid" formControlName="premium_paid" (keypress)="keyPress($event)" autocomplete="off">
</mat-form-field>
</div>
<div fxFlex="33">
<mat-form-field>
<mat-select placeholder="Frequency" formControlName="frequency_mode" required>
<mat-select placeholder="Frequency" formControlName="frequency_mode" >
<mat-option *ngFor="let freqn of m_freqOfPurchase" [value]="freqn.frequency_id">{{ freqn.name }}</mat-option>
</mat-select>
</mat-form-field>
</div>
<div fxFlex="33">
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Sum Assured" formControlName="sum_assured" required (keypress)="keyPress($event)" autocomplete="off">
<input matInput placeholder="Sum Assured" formControlName="sum_assured" (keypress)="keyPress($event)" autocomplete="off">
</mat-form-field>
</div>
</div>
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<div fxFlex="33">
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Members Covered" formControlName="members_coverd" required autocomplete="off">
<input matInput placeholder="Members Covered" formControlName="members_coverd" autocomplete="off">
</mat-form-field>
</div>
</div>
@ -463,7 +463,7 @@
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<div fxFlex="33%" class="ml-xs example-full-width">
<mat-form-field>
<mat-select placeholder="Type" formControlName="investments_type" required>
<mat-select placeholder="Type" formControlName="investments_type" >
<mat-option *ngFor="let ins_type of m_investmentType" [value]="ins_type.id">{{ ins_type.name }}</mat-option>
</mat-select>
</mat-form-field>
@ -477,14 +477,14 @@
<!-- </div> -->
<div fxFlex="33%" >
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Amount of Investment" formControlName="amount_of_invest" required (keypress)="keyPress($event)" autocomplete="off">
<input matInput placeholder="Amount of Investment" formControlName="amount_of_invest" (keypress)="keyPress($event)" autocomplete="off">
</mat-form-field>
</div>
</div>
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<div fxFlex="33%">
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Bank Name" formControlName="bank_name" required autocomplete="off">
<input matInput placeholder="Bank Name" formControlName="bank_name" autocomplete="off">
</mat-form-field>
</div>
</div>
@ -499,14 +499,14 @@
<div [formGroupName]="s">
<div>
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Description of the Assets" formControlName="any_other_assets" required autocomplete="off">
<input matInput placeholder="Description of the Assets" formControlName="any_other_assets" autocomplete="off">
</mat-form-field>
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Value of the Assets" formControlName="any_other_asset_value" required autocomplete="off">
<input matInput placeholder="Value of the Assets" formControlName="any_other_asset_value" autocomplete="off">
</mat-form-field>
<mat-form-field class="ml-xs example-full-width">
<mat-select placeholder="Name of the Owner"
formControlName="name_of_the_owner" required>
formControlName="name_of_the_owner" >
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name}}</mat-option>
@ -520,7 +520,7 @@
</div>
<div>
<mat-form-field class="ml-xs example-full-width">
<mat-select placeholder="Relation" formControlName="relation" required>
<mat-select placeholder="Relation" formControlName="relation" >
<mat-option value="{{relations.relationship_id}}"
*ngFor="let relations of m_relation">
{{relations.name}}
@ -529,10 +529,10 @@
</mat-form-field>
</div>
<!-- <mat-form-field class="ml-xs example-full-width"> -->
<!-- <input matInput placeholder="Is Any Loan" formControlName="any_other_asset_loan" required> -->
<!-- <input matInput placeholder="Is Any Loan" formControlName="any_other_asset_loan" > -->
<!-- </mat-form-field> -->
<mat-form-field class="ml-xs example-full-width">
<mat-select placeholder="Is there any asset loan?" formControlName="any_other_asset_loan" required>
<mat-select placeholder="Is there any asset loan?" formControlName="any_other_asset_loan" >
<mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option>
<mat-option value="nan">NA</mat-option>
@ -569,7 +569,7 @@
<div fxFlex="33">
<mat-form-field class="ml-xs example-full-width">
<mat-select placeholder="Name of the Owner"
formControlName="name_of_the_owner" required>
formControlName="name_of_the_owner" >
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name}}</mat-option>
@ -584,7 +584,7 @@
</div>
<div fxFlex="33">
<mat-form-field class="ml-xs example-full-width">
<mat-select placeholder="Relation" formControlName="relation" required>
<mat-select placeholder="Relation" formControlName="relation" >
<mat-option value="{{relations.relationship_id}}"
*ngFor="let relations of m_relation">
{{relations.name}}

View File

@ -345,14 +345,14 @@ public m_investmentType = [];
// Dynamic Form field creation Functionality : START ===>
initDetails() {
return this._formBuilder.group({
assets_mode: ['', Validators.compose([Validators.required])],
assets_mode: [''],
details: this._formBuilder.array([]),
approximate_market_value: ['', Validators.compose([])],
name_of_the_owner: ['', Validators.compose([])],
approximate_market_value: [''],
name_of_the_owner: [''],
other_owner:[''],
relation: [''],
// purchase_year: ['', Validators.compose([])],
//purchase_month: ['', Validators.compose([])],
// purchase_year: [''],
//purchase_month: [''],
emi: [''],
emi_paid: [''],
original_loan_tenure: [''],
@ -363,14 +363,14 @@ public m_investmentType = [];
initBusinessDetails(data) {
return this._formBuilder.group({
business_assets_mode: ['', Validators.compose([Validators.required])],
business_assets_mode: [''],
business_details: this._formBuilder.array([]),
business_approximate_market_value: ['', Validators.compose([])],
business_approximate_market_value: [''],
business_name_of_the_owner: [data],
// other_owner:[''],
// relation:[''],
// purchase_year: ['', Validators.compose([])],
//purchase_month: ['', Validators.compose([])],
// purchase_year: [''],
//purchase_month: [''],
business_emi: [''],
business_emi_paid: [''],
business_original_loan_tenure: [''],
@ -458,26 +458,26 @@ public m_investmentType = [];
loadProperty() {
return this._formBuilder.group({
property_type: ['', Validators.compose([Validators.required])],
property_type: [''],
other_property_type: ['']
});
}
loadJwellDescription() {
return this._formBuilder.group({
jwell_description: ['', Validators.compose([])]
jwell_description: ['']
});
}
loadConsumerDurableDescription() {
return this._formBuilder.group({
consumer_durable_description: ['', Validators.compose([Validators.required])]
consumer_durable_description: ['']
});
}
otherAssetsDescription() {
return this._formBuilder.group({
any_other_assets: ['', Validators.compose([Validators.required])],
any_other_assets: [''],
name_of_the_owner:[''],
other_owner:[''],
relation:[''],
@ -490,7 +490,7 @@ public m_investmentType = [];
otherBusinessAssetsDescription() {
return this._formBuilder.group({
any_other_assets: ['', Validators.compose([Validators.required])],
any_other_assets: [''],
any_other_asset_value : [''],
any_other_asset_loan : [''],
other_asset_emi_amt : ['']
@ -500,32 +500,32 @@ public m_investmentType = [];
loadInsuranceDescription() {
return this._formBuilder.group({
//insurance_type: ['', Validators.compose([Validators.required])],
premium_paid: ['', Validators.compose([])],
frequency_mode: ['', Validators.compose([])],
sum_assured: ['', Validators.compose([])],
members_coverd: ['', Validators.compose([])]
//insurance_type: [''],
premium_paid: [''],
frequency_mode: [''],
sum_assured: [''],
members_coverd: ['']
});
}
loadInvestDescription() {
return this._formBuilder.group({
investments_type: ['', Validators.compose([])],
investments_type: [''],
other_investments_type:[''],
amount_of_invest: ['', Validators.compose([])],
bank_name: ['', Validators.compose([])]
amount_of_invest: [''],
bank_name: ['']
});
}
load_Four_Weeler() {
return this._formBuilder.group({
manufacturer_model_four_weeler: ['', Validators.compose([])]
manufacturer_model_four_weeler: ['']
});
}
load_Two_Weeler() {
return this._formBuilder.group({
manufacturer_model_two_weeler: ['', Validators.compose([Validators.required])]
manufacturer_model_two_weeler: ['']
});
}
@ -533,26 +533,26 @@ public m_investmentType = [];
loadPropertyWithData(data) {
return this._formBuilder.group({
property_type: [data.property_type, Validators.compose([Validators.required])]
property_type: [data.property_type]
//property_type:['']
});
}
loadJwellDescriptionWithData(data) {
return this._formBuilder.group({
jwell_description: [data.jwell_description, Validators.compose([Validators.required])]
jwell_description: [data.jwell_description]
});
}
loadConsumerDurableDescriptionWithData(data) {
return this._formBuilder.group({
consumer_durable_description: [data.consumer_durable_description, Validators.compose([Validators.required])]
consumer_durable_description: [data.consumer_durable_description]
});
}
otherAssetsDescriptionWithData(data) {
return this._formBuilder.group({
any_other_assets: [data.any_other_assets, Validators.compose([Validators.required])],
any_other_assets: [data.any_other_assets],
name_of_the_owner:[data.name_of_the_owner],
other_owner:[data.other_owner],
relation:[data.relation],
@ -564,7 +564,7 @@ public m_investmentType = [];
otherBusinessAssetsDescriptionWithData(data) {
return this._formBuilder.group({
any_other_assets: [data.any_other_assets, Validators.compose([Validators.required])],
any_other_assets: [data.any_other_assets],
any_other_asset_value : [data.any_other_asset_value],
any_other_asset_loan : [data.any_other_asset_loan],
other_asset_emi_amt : [data.other_asset_emi_amt]
@ -575,32 +575,32 @@ public m_investmentType = [];
loadInsuranceDescriptionWithData(data) {
return this._formBuilder.group({
//insurance_type: [data.insurance_type, Validators.compose([Validators.required])],
premium_paid: [data.premium_paid, Validators.compose([Validators.required])],
frequency_mode: [data.frequency_mode, Validators.compose([Validators.required])],
sum_assured: [data.sum_assured, Validators.compose([Validators.required])],
members_coverd: [data.members_coverd, Validators.compose([Validators.required])]
//insurance_type: [data.insurance_type],
premium_paid: [data.premium_paid],
frequency_mode: [data.frequency_mode],
sum_assured: [data.sum_assured],
members_coverd: [data.members_coverd]
});
}
loadInvestDescriptionWithData(data) {
return this._formBuilder.group({
investments_type: [data.investments_type, Validators.compose([Validators.required])],
investments_type: [data.investments_type],
other_investments_type : [data.other_investments_type],
amount_of_invest: [data.amount_of_invest, Validators.compose([Validators.required])],
bank_name: [data.bank_name, Validators.compose([Validators.required])]
amount_of_invest: [data.amount_of_invest],
bank_name: [data.bank_name]
});
}
load_Four_WeelerWithData(data) {
return this._formBuilder.group({
manufacturer_model_four_weeler: [data.manufacturer_model_four_weeler, Validators.compose([Validators.required])]
manufacturer_model_four_weeler: [data.manufacturer_model_four_weeler]
});
}
load_Two_WeelerWithData(data) {
return this._formBuilder.group({
manufacturer_model_two_weeler: [data.manufacturer_model_two_weeler, Validators.compose([Validators.required])]
manufacturer_model_two_weeler: [data.manufacturer_model_two_weeler]
});
}
@ -608,14 +608,14 @@ public m_investmentType = [];
initDetailsWithdata(data) {
return this._formBuilder.group({
assets_mode: [data.assets_mode, Validators.compose([Validators.required])],
assets_mode: [data.assets_mode],
details: this._formBuilder.array([]),
approximate_market_value: [data.approximate_market_value, Validators.compose([])],
name_of_the_owner: [data.name_of_the_owner, Validators.compose([])],
approximate_market_value: [data.approximate_market_value],
name_of_the_owner: [data.name_of_the_owner],
other_owner:[data.other_owner || ''],
relation: [data.relation || ''],
// purchase_year: [data.purchase_year, Validators.compose([])],
// purchase_month: [data.purchase_month, Validators.compose([])],
// purchase_year: [data.purchase_year],
// purchase_month: [data.purchase_month],
emi: [data.emi || 0],
emi_paid: [data.emi_paid || ''],
original_loan_tenure: [data.original_loan_tenure || ''],
@ -625,14 +625,14 @@ public m_investmentType = [];
}
initBusinessDetailsWithdata(data) {
return this._formBuilder.group({
business_assets_mode: [data.business_assets_mode, Validators.compose([Validators.required])],
business_assets_mode: [data.business_assets_mode],
business_details: this._formBuilder.array([]),
business_approximate_market_value: [data.business_approximate_market_value, Validators.compose([])],
business_name_of_the_owner: [data.business_name_of_the_owner, Validators.compose([])],
business_approximate_market_value: [data.business_approximate_market_value],
business_name_of_the_owner: [data.business_name_of_the_owner],
// other_owner:[data.other_owner || ''],
// relation: [data.relation || ''],
// purchase_year: [data.purchase_year, Validators.compose([])],
// purchase_month: [data.purchase_month, Validators.compose([])],
// purchase_year: [data.purchase_year],
// purchase_month: [data.purchase_month],
business_emi: [data.business_emi || 0],
business_emi_paid: [data.business_emi_paid || ''],
business_original_loan_tenure: [data.business_original_loan_tenure || ''],

View File

@ -22,7 +22,7 @@
<mat-card-content>
<mat-form-field style="width:60% !important;">
<mat-select (selectionChange)="selectedLoanChanges($event)" placeholder="Do you have any other existing loan"
formControlName="existing_loan" required>
formControlName="existing_loan" >
<mat-option value="Yes">Yes</mat-option>
<mat-option value="No">No</mat-option>
</mat-select>
@ -38,45 +38,51 @@
<!-- {{frequencyData | json}} -->
<mat-card-content class="matcard">
<mat-form-field>
<input matInput placeholder="Loan Amount" formControlName="loan_amount" (keypress)="keyPress($event)" required>
<input matInput autocomplete="off" placeholder="Loan Amount" formControlName="loan_amount" (keypress)="keyPress($event)" >
</mat-form-field>
<mat-form-field>
<mat-select (selectionChange)="selectedfrequency($event.value,i)" placeholder="Frequency"
formControlName="frequency" required>
formControlName="frequency" >
<mat-option *ngFor="let freq of frequencyData" value="{{freq.frequency_id}}">{{freq.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="details.get('frequency').value != ''" >
<input matInput [placeholder]="placeholderName[i] != '' ? placeholderName[i] : 'Instalment Amount' " formControlName="emi" (keypress)="keyPress($event)" required>
<input matInput autocomplete="off" [placeholder]="placeholderName[i] != '' ? placeholderName[i] : 'Instalment Amount' " formControlName="emi" (keypress)="keyPress($event)" >
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Loan Type" formControlName="loan_type" required>
<mat-select placeholder="Loan Type" formControlName="loan_type" >
<mat-option value="{{types.existing_loan_type_id}}" *ngFor="let types of loanTypeData">{{types.loan_type_name}}</mat-option>
</mat-select>
<!-- <input matInput autocomplete="off" placeholder="Loan Type" formControlName="loan_type" > -->
</mat-form-field>
<mat-form-field *ngIf="details.get('loan_type').value == 9 ">
<input matInput autocomplete="off" placeholder="Specify Others Loan Type" formControlName="others_loan_type">
</mat-form-field>
<mat-form-field>
<mat-select placeholder="Loan Taken By" formControlName="loan_taken_by" required>
<mat-select placeholder="Loan Taken By" formControlName="loan_taken_by">
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name}}</mat-option>
<mat-option value="Others">Others</mat-option>
<!-- <mat-option value= 0 >Others</mat-option> -->
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="details.get('loan_taken_by').value == 'Others'">
<input matInput placeholder="Specify Others Loan Taken" formControlName="others_loan_taken">
<mat-form-field *ngIf="details.get('loan_taken_by').value == 0">
<input matInput autocomplete="off" placeholder="Specify Others Loan Taken" formControlName="others_loan_taken">
</mat-form-field>
<mat-form-field>
<mat-select placeholder="Lender" formControlName="lender" required>
<mat-select placeholder="Lender" formControlName="lender" >
<mat-option *ngFor="let btLen of lenderData" [value]="btLen.bt_lender_list_id">{{ btLen.lender_name }}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="details.get('lender').value == 3">
<input matInput placeholder="Specify Others Loan Taken" formControlName="others_loan_taken">
<input matInput autocomplete="off" placeholder="Specify Others Lender" formControlName="others_lender" >
</mat-form-field>
<!-- <mat-form-field>
<input matInput placeholder="Lender" formControlName="lender" required>
<input matInput autocomplete="off" placeholder="Lender" formControlName="lender" >
</mat-form-field> -->
<mat-form-field>
<input matInput placeholder="Original Tenure in Months" formControlName="original_tenure" required>
<input matInput autocomplete="off" placeholder="Original Tenure in Months" formControlName="original_tenure" >
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Current Balance Tenure in Months" formControlName="current_balance_tenure" required>
<input matInput autocomplete="off" placeholder="Current Balance Tenure in Months" formControlName="current_balance_tenure" >
</mat-form-field>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Add More Loan Details" matTooltipPosition="above" color="primary" (click)="addLoanDetails()"
*ngIf="i==0">
@ -210,7 +216,7 @@
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
<mat-form-field appearance="outline" style="width: 100%">
<mat-label>Remarks</mat-label>
<textarea matInput placeholder="Remarks" formControlName="currentloan_remarks" required></textarea>
<textarea matInput autocomplete="off" placeholder="Remarks" formControlName="currentloan_remarks" ></textarea>
</mat-form-field>
</div>
<div fxFlex="40" align="end">
@ -231,7 +237,7 @@
<div fxFlex="60" class="pb-0 text-sm-left"> -->
<!-- <mat-form-field style="width:60% !important;">
<mat-select (selectionChange)="selectedLoanChanges($event)" placeholder="Do you have any other existing loan"
formControlName="existing_loan" required>
formControlName="existing_loan" >
<mat-option value="Yes">Yes</mat-option>
<mat-option value="No">No</mat-option>
</mat-select>
@ -250,45 +256,45 @@
<!-- {{frequencyData | json}} -->
<!-- <mat-card-content class="matcard">
<mat-form-field>
<input matInput placeholder="Loan Amount" formControlName="loan_amount" (keypress)="keyPress($event)" required>
<input matInput autocomplete="off" placeholder="Loan Amount" formControlName="loan_amount" (keypress)="keyPress($event)" >
</mat-form-field>
<mat-form-field>
<mat-select (selectionChange)="selectedfrequency($event.value,i)" placeholder="Frequency"
formControlName="frequency" required>
formControlName="frequency" >
<mat-option *ngFor="let freq of frequencyData" value="{{freq.frequency_id}}">{{freq.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<input matInput [placeholder]="placeholderName[i] != '' ? placeholderName[i] : 'Instalment Amount' " formControlName="emi" (keypress)="keyPress($event)" required>
<input matInput autocomplete="off" [placeholder]="placeholderName[i] != '' ? placeholderName[i] : 'Instalment Amount' " formControlName="emi" (keypress)="keyPress($event)" >
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Loan Type" formControlName="loan_type" required>
<input matInput autocomplete="off" placeholder="Loan Type" formControlName="loan_type" >
</mat-form-field>
<mat-form-field>
<mat-select placeholder="Loan Taken By" formControlName="loan_taken_by" required>
<mat-select placeholder="Loan Taken By" formControlName="loan_taken_by" >
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name}}</mat-option>
<mat-option value="Others">Others</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="details.get('loan_taken_by').value == 'Others'">
<input matInput placeholder="Specify Others Loan Taken" formControlName="others_loan_taken">
<mat-form-field *ngIf="details.get('loan_taken_by').value == 0">
<input matInput autocomplete="off" placeholder="Specify Others Loan Taken" formControlName="others_loan_taken">
</mat-form-field>
<mat-form-field>
<mat-select placeholder="Lender" formControlName="lender" required>
<mat-select placeholder="Lender" formControlName="lender" >
<mat-option *ngFor="let btLen of lenderData" [value]="btLen.bt_lender_list_id">{{ btLen.lender_name }}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="details.get('lender').value == 3">
<input matInput placeholder="Specify Others Loan Taken" formControlName="others_loan_taken">
<input matInput autocomplete="off" placeholder="Specify Others Loan Taken" formControlName="others_loan_taken">
</mat-form-field> -->
<!-- <mat-form-field>
<input matInput placeholder="Lender" formControlName="lender" required>
<input matInput autocomplete="off" placeholder="Lender" formControlName="lender" >
</mat-form-field> -->
<!-- <mat-form-field>
<input matInput placeholder="Original Tenure in Months" formControlName="original_tenure" required>
<input matInput autocomplete="off" placeholder="Original Tenure in Months" formControlName="original_tenure" >
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Current Balance Tenure in Months" formControlName="current_balance_tenure" required>
<input matInput autocomplete="off" placeholder="Current Balance Tenure in Months" formControlName="current_balance_tenure" >
</mat-form-field>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Add More Loan Details" matTooltipPosition="above" color="primary" (click)="addLoanDetails()"
*ngIf="i==0">
@ -306,7 +312,7 @@
<div fxFlex="60" class="pb-0 text-sm-left">
<mat-form-field appearance="outline" style="width: 100%">
<mat-label>Remarks</mat-label>
<textarea matInput placeholder="Remarks" formControlName="currentloan_remarks" required></textarea>
<textarea matInput autocomplete="off" placeholder="Remarks" formControlName="currentloan_remarks" ></textarea>
</mat-form-field>
</div>
</div>

View File

@ -40,9 +40,11 @@ export class CurrentLoanComponent implements OnInit {
//@Input() applicant_details: any;
lenderData: any = [];
frequencyData: any = [];
loanTypeData: any = [];
applicants: any;
placeholderName : any = [];
IDXval : any;
OtherFlag : boolean = false;
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
private router: Router,
@ -52,6 +54,7 @@ export class CurrentLoanComponent implements OnInit {
this.form_id = 8;
this.notifier = notifier;
this.applicants = this.pd_all_details.pdapplicants_detials;
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
}
public viewerOptions: any = {
navbar: false,
@ -75,6 +78,7 @@ export class CurrentLoanComponent implements OnInit {
ngOnInit() {
this.getMasterDetails('BTLENDERLIST',1);
this.getMasterDetails('FREQUENCY',2);
this.getMasterDetails('EXISTINGLOANTYPES',3);
this.initCurrentloanForm();
let params: any = {};
params.pd_id = this.pdid;
@ -96,6 +100,7 @@ export class CurrentLoanComponent implements OnInit {
result.forEach((val,index) => {
control.push(this.createLoanDetail());
this.selectedfrequency(val.frequency,index);
//this.selectedLoanTakenBy(val.loan_taken_by,index);
});
this.currentLoanForm.controls['loan_details'].setValue(result);
} else {
@ -110,8 +115,8 @@ export class CurrentLoanComponent implements OnInit {
}
public initCurrentloanForm(): void {
this.currentLoanForm = this.fb.group({
existing_loan: ['', Validators.compose([Validators.required])],
currentloan_remarks: ['', Validators.compose([Validators.required])],
existing_loan: [''],
currentloan_remarks: [''],
loan_details: this.fb.array([]),
});
}
@ -145,16 +150,17 @@ export class CurrentLoanComponent implements OnInit {
createLoanDetail() {
return this.fb.group({
loan_amount: ['', Validators.compose([Validators.required])],
frequency:['', Validators.compose([Validators.required])],
emi: ['', Validators.compose([Validators.required])],
loan_type: ['', Validators.compose([Validators.required])],
loan_amount: [''],
frequency:[''],
emi: [''],
loan_type: [''],
others_loan_type: [''],
loan_taken_by:[''],
others_loan_taken:[''],
lender: ['', Validators.compose([Validators.required])],
lender: [''],
others_lender:[''],
original_tenure: ['', Validators.compose([Validators.required])],
current_balance_tenure: ['', Validators.compose([Validators.required])],
original_tenure: [''],
current_balance_tenure: [''],
});
}
addLoanDetails() {
@ -206,6 +212,9 @@ export class CurrentLoanComponent implements OnInit {
else if(type==2 && val.isactive == 1){
this.frequencyData.push(val);
}
else if(type==3 && val.isactive == 1){
this.loanTypeData.push(val);
}
})
});
}

View File

@ -16,12 +16,7 @@
<div fxLayout="row wrap">
<div fxFlex="100">
<mat-card>
<!-- <mat-card-title>Address Details</mat-card-title> -->
<mat-card-content>
<!--<mat-form-field>
<input matInput placeholder="Number Of Family Members" formControlName="members" required>
</mat-form-field>-->
<div>
<mat-form-field>
<mat-select placeholder="Select a person" formControlName="selected_person" required>
@ -81,9 +76,6 @@
<mat-form-field>
<input matInput placeholder="Name" formControlName="family_member_name" required>
</mat-form-field>
<!--<mat-form-field>
<input matInput placeholder="Relationship" formControlName="family_member_relationship" required>
</mat-form-field>-->
<mat-form-field>
<mat-select placeholder="Relationship" formControlName="family_member_relationship" required>
<mat-option value="{{relation.relationship_id}}" *ngFor="let relation of relationData">
@ -105,7 +97,6 @@
</mat-form-field>
</div>
<div *ngIf="item.get('family_member_earning_status').value == 1">
<!--<pre>{{ customerSegData | json}}</pre>-->
<mat-form-field>
<mat-select placeholder="Segment" formControlName="earning_segment" required>
<mat-option value="{{segment.customer_segment_id}}" *ngFor="let segment of customerSegData">
@ -259,7 +250,6 @@
</mat-form-field>
</div>
<div fxFlex="40" align="end">
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="submit" matTooltip="Save" matTooltipPosition="above"><mat-icon>save</mat-icon></button> -->
<button type="submit" mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="submitFamily()"><mat-icon>save</mat-icon></button>
</div>
</mat-dialog-actions>

View File

@ -577,11 +577,11 @@ export class FamilyDetailsComponent implements OnInit {
// records.formid = '6';
// // records.fk_createdby = '251';
// console.log(JSON.stringify(records));
// this._pd.saveForm(records).subscribe(data => {
// this.notifier.notify('success', 'Saved Successfully.');
// }, error => {
// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
// });
// // this._pd.saveForm(records).subscribe(data => {
// // this.notifier.notify('success', 'Saved Successfully.');
// // }, error => {
// // this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
// // });
// }
// // validateAllFormFields(formGroup: FormGroup) {
// // Object.keys(formGroup.controls).forEach(field => {

View File

@ -23,11 +23,12 @@
<p>Data as Per Financial Statements<p>
</mat-card-header>
<mat-form-field>
<input matInput placeholder="Starting Financial Year" formControlName="staring_financial_year" required>
<input matInput autocomplete="off" placeholder="Starting Year Of Financial" formControlName="staring_financial_year" >
<mat-error> Please provide Correct Year Format. Format Should Be (YYYY)</mat-error>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Total Financial Year" formControlName="total_financial_year" required (change)="dynamicalFinYear($event)">
<input matInput autocomplete="off" placeholder="Number of Year in Financial" formControlName="total_financial_year" (change)="dynamicalFinYear($event)">
</mat-form-field>
<div *ngIf="total_financial_year != ''" formArrayName="date_per_financial">
<!-- <div formArrayName="date_per_financial"> -->
@ -35,45 +36,53 @@
[formGroupName]="i">
<mat-card-content class="matcard">
<mat-form-field>
<!-- <input matInput placeholder="Year (format: 2015-16)" formControlName="financial_year" required> -->
<input matInput placeholder="Latest Financial Year" formControlName="financial_year" required>
<!-- <input matInput autocomplete="off" placeholder="Year (format: 2015-16)" formControlName="financial_year" > -->
<input matInput autocomplete="off" placeholder="Latest Financial Year" formControlName="financial_year" >
</mat-form-field>
<mat-form-field>
<!-- <input matInput placeholder="Annual Sale" formControlName="financial_annual_sale" (change)="calMargin(i, details)" type="number" required> -->
<input matInput placeholder="Annual Sale" formControlName="financial_annual_sale" (change)="calMargin(i, details)" (keypress)="keyPress($event)" required>
<!-- <input matInput autocomplete="off" placeholder="Annual Sale" formControlName="financial_annual_sale" (change)="calMargin(i, details)" type="number" > -->
<input matInput autocomplete="off" placeholder="Annual Sale" formControlName="financial_annual_sale" (change)="calMargin(i, details)" (keypress)="keyPress($event)" >
</mat-form-field>
<mat-form-field>
<!-- <input matInput placeholder="Net Profit / Loss" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)" type="number" required> -->
<mat-select placeholder="Is there Net Profit or Net Loss?" formControlName="finanical_profit_or_loss" required>
<!-- <input matInput autocomplete="off" placeholder="Net Profit / Loss" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)" type="number" > -->
<mat-select placeholder="Is there Net Profit or Net Loss?" formControlName="finanical_profit_or_loss" >
<mat-option value="1" >Net Profit</mat-option>
<mat-option value="2" >Net Loss</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="details.get('finanical_profit_or_loss').value == 1 ">
<mat-form-field>
<!-- <input matInput placeholder="Net Profit to Sales %" formControlName="financial_margin" (keypress)="keyPress($event)" required> -->
<input matInput placeholder="Net Profit Amount" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)" (keypress)="keyPress($event)" required>
<!-- <input matInput autocomplete="off" placeholder="Net Profit to Sales %" formControlName="financial_margin" (keypress)="keyPress($event)" > -->
<input matInput autocomplete="off" placeholder="Net Profit Amount" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)" (keypress)="keyPress($event)" >
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Net Profit to Sales %" formControlName="financial_margin_of_profit" (keypress)="keyPress($event)" required>
<input matInput autocomplete="off" placeholder="Net Profit to Sales %" formControlName="financial_margin_of_profit" (keypress)="keyPress($event)" >
</mat-form-field>
</span>
<span *ngIf="details.get('finanical_profit_or_loss').value == 2 ">
<mat-form-field>
<input matInput placeholder="Net Loss Amount" formControlName="financial_net_loss" (change)="calMargin( i, details); calYearVariation( i, details)" (keypress)="keyPress($event)" required>
<input matInput autocomplete="off" placeholder="Net Loss Amount" formControlName="financial_net_loss" (change)="calMargin( i, details); calYearVariation( i, details)" (keypress)="keyPress($event)" >
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Net Loss to Sales %" formControlName="financial_margin_of_loss" (keypress)="keyPress($event)" required>
<input matInput autocomplete="off" placeholder="Net Loss to Sales %" formControlName="financial_margin_of_loss" (keypress)="keyPress($event)" >
</mat-form-field>
</span>
<mat-form-field *ngIf="i != 0" style="width:65%">
<input matInput [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" placeholder="Variation from Previous Year" formControlName="financial_variation" (keypress)="keyPress($event)">
<input matInput autocomplete="off" [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" placeholder="Variation from Previous Year" formControlName="financial_variation" (keypress)="keyPress($event)">
<!-- <mat-hint align="end" *ngIf="i != 0" [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" >{{SalesStatement[i]}}</mat-hint> -->
<mat-hint align="start">
{{details.get('variation').value <= 0 ? 'Decreases ' : 'Increases '}} in Sales in FY Over Sales in FY is % <!-- variation <= 0 ? ) + 'in Sales in FY ' + curr_year + ' Over Sales in FY '+ prev_year + ' is ' + variation.toFixed(2) + '%'; -->
<!-- {{details.get('variation').value <= 0 ? 'Decreases ' : 'Increases '}} in Sales in FY {{details.get('financial_year').value}} Over Sales in FY' {{details.get('financial_year').value}} 'is' {{details.get('variation').value}} % <!-- variation <= 0 ? ) + 'in Sales in FY ' + curr_year + ' Over Sales in FY '+ prev_year + ' is ' + variation.toFixed(2) + '%'; -->
</mat-hint>
<!-- this.SalesStatement[index] = ( variation <= 0 ? 'Decreases ' : 'Increases ' ) + 'in Sales in FY ' + curr_year + ' Over Sales in FY '+ prev_year + ' is ' + variation.toFixed(2) + '%'; -->
</mat-form-field>
<mat-form-field *ngIf="customerCommentsFlag" style="width:65%">
<!-- <input matInput placeholder="Reason For Major Difference" formControlName="financial_reason" required> -->
<input matInput placeholder="Customer Comments on variances in Financials" formControlName="financial_reason" required>
<!-- <input matInput autocomplete="off" placeholder="Reason For Major Difference" formControlName="financial_reason" > -->
<input matInput autocomplete="off" placeholder="Customer Comments on variances in Financials" formControlName="financial_reason" >
</mat-form-field>
<!-- <button type="button" mat-raised-button mat-icon-button (click)="addDate()"
@ -109,43 +118,43 @@
<mat-card-content class="matcard">
<mat-form-field>
<!-- <input matInput placeholder="Year (format: 2015-16)" formControlName="estimate_year" required> -->
<input matInput placeholder="Year" formControlName="estimate_year" required>
<!-- <input matInput autocomplete="off" placeholder="Year (format: 2015-16)" formControlName="estimate_year" > -->
<input matInput autocomplete="off" placeholder="Year" formControlName="estimate_year" >
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Annual Sale" formControlName="estimate_annual_sale" (change)="calMarginVal( i, details)" (keypress)="keyPress($event)" required>
<input matInput autocomplete="off" placeholder="Annual Sale" formControlName="estimate_annual_sale" (change)="calMarginVal( i, details)" (keypress)="keyPress($event)" >
</mat-form-field>
<mat-form-field>
<!-- <input matInput placeholder="Net Profit / Loss" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)" type="number" required> -->
<mat-select placeholder="Is there Net Profit or Net Loss?" formControlName="estimate_profit_or_loss" required>
<!-- <input matInput autocomplete="off" placeholder="Net Profit / Loss" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)" type="number" > -->
<mat-select placeholder="Is there Net Profit or Net Loss?" formControlName="estimate_profit_or_loss" >
<mat-option value="1" >Net Profit</mat-option>
<mat-option value="2" >Net Loss</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="details.get('estimate_profit_or_loss').value == 1 ">
<mat-form-field>
<input matInput placeholder="Net Profit Amount" formControlName="estimate_net_profit" (change)="calMarginVal( i, details); calVariation( i, details)" required>
<input matInput autocomplete="off" placeholder="Net Profit Amount" formControlName="estimate_net_profit" (change)="calMarginVal( i, details); calVariation( i, details)" >
</mat-form-field>
<mat-form-field>
<input matInput disabled placeholder="Margin" formControlName="estimate_margin_of_profit" (keypress)="keyPress($event)" required>
<input matInput autocomplete="off" disabled placeholder="Margin" formControlName="estimate_margin_of_profit" (keypress)="keyPress($event)" >
</mat-form-field>
</span>
<span *ngIf="details.get('estimate_profit_or_loss').value == 2 ">
<mat-form-field>
<input matInput placeholder="Net Loss" formControlName="estimate_net_loss" (change)="calMarginVal( i, details); calVariation( i, details)" required>
<input matInput autocomplete="off" placeholder="Net Loss" formControlName="estimate_net_loss" (change)="calMarginVal( i, details); calVariation( i, details)" >
</mat-form-field>
<mat-form-field>
<input matInput disabled placeholder="Margin" formControlName="estimate_margin_of_loss" (keypress)="keyPress($event)" (change)="calAmount(i, details); calVariation( i, details)" required>
<input matInput autocomplete="off" disabled placeholder="Margin" formControlName="estimate_margin_of_loss" (keypress)="keyPress($event)" (change)="calAmount(i, details); calVariation( i, details)" >
</mat-form-field>
</span>
<mat-form-field *ngIf="i != 0" style="width:65%">
<input matInput [ngClass]="{'highlight': details.controls['estimate_variation'].value >= 40 || details.controls['estimate_variation'].value >= -40}" placeholder="Variation from Previous Year" formControlName="estimate_variation" (keypress)="keyPress($event)">
<input matInput autocomplete="off" [ngClass]="{'highlight': details.controls['estimate_variation'].value >= 40 || details.controls['estimate_variation'].value >= -40}" placeholder="Variation from Previous Year" formControlName="estimate_variation" (keypress)="keyPress($event)">
<mat-hint align="end" [ngClass]="{'highlight': (details.controls['estimate_variation'].value >= 40) || (details.controls['estimate_variation'].value < -40)}" > {{details.controls['estimate_variation'].value}} {{details.controls['estimate_year'].value}}
<!-- 'details.controls['estimate_variation'].value <= 0' ? 'Decreases ' : 'Increases ' + 'in Sales in FY ' + curr_year + ' Over Sales in FY '+ prev_year + ' is ' + {{details.controls['estimate_variation'].value}} + '%'; -->
</mat-hint>
</mat-form-field>
<!--<mat-form-field>
<input matInput placeholder="Reason For Major Difference" formControlName="estimate_reason" required>
<input matInput autocomplete="off" placeholder="Reason For Major Difference" formControlName="estimate_reason" >
</mat-form-field>-->
<!-- <button type="button" mat-raised-button mat-icon-button (click)="addGoods()"
matTooltip="Add More Estimated Value" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="i==0">
@ -269,7 +278,7 @@
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
<mat-form-field appearance="outline" style="width: 100%">
<mat-label>Remarks</mat-label>
<textarea matInput placeholder="Remarks" formControlName="financial_remarks" required></textarea>
<textarea matInput autocomplete="off" placeholder="Remarks" formControlName="financial_remarks" ></textarea>
</mat-form-field>
</div>
<div fxFlex="40" align="end">
@ -295,22 +304,22 @@
[formGroupName]="i">
<mat-card-content class="matcard">
<mat-form-field>
<input matInput placeholder="Year (format: 2015-16)" formControlName="financial_year" required>
<input matInput autocomplete="off" placeholder="Year (format: 2015-16)" formControlName="financial_year" >
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Annual Sale" formControlName="financial_annual_sale" (change)="calMargin(i, details)" type="number" required>
<input matInput autocomplete="off" placeholder="Annual Sale" formControlName="financial_annual_sale" (change)="calMargin(i, details)" type="number" >
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Net Profit / Loss" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)" type="number" required>
<input matInput autocomplete="off" placeholder="Net Profit / Loss" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)" type="number" >
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Net Profit to Sales %" formControlName="financial_margin" (keypress)="keyPress($event)" required>
<input matInput autocomplete="off" placeholder="Net Profit to Sales %" formControlName="financial_margin" (keypress)="keyPress($event)" >
</mat-form-field>
<mat-form-field *ngIf="i != 0">
<input matInput [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" placeholder="Variation from Previous Year" formControlName="financial_variation" (keypress)="keyPress($event)">
<input matInput autocomplete="off" [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" placeholder="Variation from Previous Year" formControlName="financial_variation" (keypress)="keyPress($event)">
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Reason For Major Difference" formControlName="financial_reason" required>
<input matInput autocomplete="off" placeholder="Reason For Major Difference" formControlName="financial_reason" >
</mat-form-field>
<button type="button" mat-raised-button mat-icon-button (click)="addDate()"
@ -334,22 +343,22 @@
[formGroupName]="i">
<mat-card-content class="matcard">
<mat-form-field>
<input matInput placeholder="Year (format: 2015-16)" formControlName="estimate_year" required>
<input matInput autocomplete="off" placeholder="Year (format: 2015-16)" formControlName="estimate_year" >
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Annual Sale" formControlName="estimate_annual_sale" (change)="calMarginVal( i, details)" type="number" required>
<input matInput autocomplete="off" placeholder="Annual Sale" formControlName="estimate_annual_sale" (change)="calMarginVal( i, details)" type="number" >
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Net Profit / Loss" formControlName="estimate_net_profit" (change)="calMarginVal( i, details); calVariation( i, details)" type="number" required>
<input matInput autocomplete="off" placeholder="Net Profit / Loss" formControlName="estimate_net_profit" (change)="calMarginVal( i, details); calVariation( i, details)" type="number" >
</mat-form-field>
<mat-form-field>
<input matInput disabled placeholder="Margin" formControlName="estimate_margin" (keypress)="keyPress($event)" required>
<input matInput autocomplete="off" disabled placeholder="Margin" formControlName="estimate_margin" (keypress)="keyPress($event)" >
</mat-form-field>
<mat-form-field *ngIf="i != 0">
<input matInput [ngClass]="{'highlight': details.controls['estimate_variation'].value >= 40 || details.controls['estimate_variation'].value >= -40}" placeholder="Variation from Previous Year" formControlName="estimate_variation" (keypress)="keyPress($event)">
<input matInput autocomplete="off" [ngClass]="{'highlight': details.controls['estimate_variation'].value >= 40 || details.controls['estimate_variation'].value >= -40}" placeholder="Variation from Previous Year" formControlName="estimate_variation" (keypress)="keyPress($event)">
</mat-form-field>
<!--<mat-form-field>
<input matInput placeholder="Reason For Major Difference" formControlName="estimate_reason" required>
<input matInput autocomplete="off" placeholder="Reason For Major Difference" formControlName="estimate_reason" >
</mat-form-field>-->
<!-- <button type="button" mat-raised-button mat-icon-button (click)="addGoods()"
matTooltip="Add More Estimated Value" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="i==0">
@ -367,7 +376,7 @@
<div fxFlex="60" class="pb-0 text-sm-left">
<mat-form-field appearance="outline" style="width: 100%">
<mat-label>Remarks</mat-label>
<textarea matInput placeholder="Remarks" formControlName="financial_remarks" required></textarea>
<textarea matInput autocomplete="off" placeholder="Remarks" formControlName="financial_remarks" ></textarea>
</mat-form-field>
</div>
</div>

View File

@ -119,9 +119,9 @@ export class FinancialInfoComponent implements OnInit {
pdid: this.pdid,
formid: this.form_id,
fk_createdby: this.pdid,
financial_remarks: ['', Validators.compose([Validators.required])],
staring_financial_year : ['', Validators.compose([Validators.required])],
total_financial_year : ['', Validators.compose([Validators.required])],
financial_remarks: [''],
staring_financial_year : ['',Validators.compose([Validators.minLength(4),Validators.maxLength(4)])],
total_financial_year : [''],
same_as_financial_statements:[''],
date_per_financial: this.fb.array([]),
estimated_value: this.fb.array([])
@ -129,54 +129,54 @@ export class FinancialInfoComponent implements OnInit {
}
// createDate() {
// return this.fb.group({
// financial_year: ['', Validators.compose([Validators.required, Validators.pattern(/^[0-9]{4}-[0-9]{2}$/)])],
// financial_annual_sale: ['', Validators.compose([Validators.required, Validators.pattern(/^[0-9\(\)]+$/)])],
// financial_net_profit: ['', Validators.compose([Validators.required, Validators.pattern(/^-?[1-9]\d*|0$/)])],
// financial_margin: ['', Validators.compose([Validators.required])],
// financial_year: ['', Validators.compose([ Validators.pattern(/^[0-9]{4}-[0-9]{2}$/)])],
// financial_annual_sale: ['', Validators.compose([ Validators.pattern(/^[0-9\(\)]+$/)])],
// financial_net_profit: ['', Validators.compose([ Validators.pattern(/^-?[1-9]\d*|0$/)])],
// financial_margin: [''],
// financial_variation: [''],
// financial_reason: ['', Validators.compose([Validators.required])],
// financial_reason: [''],
// });
// }
createDate(date) {
return this.fb.group({
financial_year: [date, Validators.compose([Validators.required, Validators.pattern(/^[0-9]{4}-[0-9]{2}$/)])],
financial_annual_sale: ['', Validators.compose([Validators.required, Validators.pattern(/^[0-9\(\)]+$/)])],
finanical_profit_or_loss:['', Validators.compose([Validators.required])],
financial_year: [date, Validators.compose([Validators.pattern(/^[0-9]{4}-[0-9]{2}$/)])],
financial_annual_sale: ['', Validators.compose([Validators.pattern(/^[0-9\(\)]+$/)])],
finanical_profit_or_loss:[''],
financial_net_profit: ['', Validators.compose([Validators.pattern(/^-?[1-9]\d*|0$/)])],
financial_net_loss: ['', Validators.compose([Validators.pattern(/^-?[1-9]\d*|0$/)])],
financial_margin_of_profit: [''],
financial_margin_of_loss: [''],
financial_variation: [''],
financial_reason: ['', Validators.compose([Validators.required])],
financial_reason: [''],
});
}
createValue(date) {
return this.fb.group({
estimate_year: [date, Validators.compose([Validators.required, Validators.pattern(/^[0-9]{4}-[0-9]{2}$/)])],
estimate_annual_sale: ['', Validators.compose([Validators.required, Validators.pattern(/^[0-9\(\)]+$/)])],
estimate_profit_or_loss:['', Validators.compose([Validators.required])],
estimate_net_profit: ['', Validators.compose([Validators.required, Validators.pattern(/^-?[1-9]\d*|0$/)])],
estimate_year: [date, Validators.compose([Validators.pattern(/^[0-9]{4}-[0-9]{2}$/)])],
estimate_annual_sale: ['', Validators.compose([Validators.pattern(/^[0-9\(\)]+$/)])],
estimate_profit_or_loss:[''],
estimate_net_profit: ['', Validators.compose([Validators.pattern(/^-?[1-9]\d*|0$/)])],
estimate_net_loss: ['', Validators.compose([Validators.pattern(/^-?[1-9]\d*|0$/)])],
//estimate_margin: ['', Validators.compose([Validators.required])],
//estimate_margin: [''],
estimate_margin_of_profit: [''],
estimate_margin_of_loss: [''],
estimate_variation: [''],
// estimate_reason: ['', Validators.compose([Validators.required])],
// estimate_reason: [''],
});
}
createValuewithData(value) {
return this.fb.group({
estimate_year: [value.estimate_year, Validators.compose([Validators.required, Validators.pattern(/^[0-9]{4}-[0-9]{2}$/)])],
estimate_annual_sale: [value.estimate_annual_sale, Validators.compose([Validators.required, Validators.pattern(/^[0-9\(\)]+$/)])],
estimate_profit_or_loss:[value.estimate_profit_or_loss, Validators.compose([Validators.required])],
estimate_year: [value.estimate_year, Validators.compose([ Validators.pattern(/^[0-9]{4}-[0-9]{2}$/)])],
estimate_annual_sale: [value.estimate_annual_sale, Validators.compose([ Validators.pattern(/^[0-9\(\)]+$/)])],
estimate_profit_or_loss:[value.estimate_profit_or_loss],
estimate_net_loss: [value.estimate_net_loss, Validators.compose([Validators.pattern(/^-?[1-9]\d*|0$/)])],
estimate_net_profit: [value.estimate_net_profit, Validators.compose([Validators.required, Validators.pattern(/^-?[1-9]\d*|0$/)])],
//estimate_margin: [value., Validators.compose([Validators.required])],
estimate_net_profit: [value.estimate_net_profit, Validators.compose([ Validators.pattern(/^-?[1-9]\d*|0$/)])],
//estimate_margin: [value.],
estimate_margin_of_profit: [value.estimate_margin_of_profit],
estimate_margin_of_loss: [value.estimate_margin_of_loss],
estimate_variation: [value.estimate_variation],
// estimate_reason: ['', Validators.compose([Validators.required])],
// estimate_reason: [''],
});
}

View File

@ -104,7 +104,7 @@ public viewerOptions: any = {
}
}
} else {
control.push(this.createDetail());
//control.push(this.createDetail());
}
})
}

View File

@ -27,43 +27,43 @@
<mat-card-title> <p>{{a+1}} . Raw Material </p> </mat-card-title>
<mat-card-content class="matcard">
<mat-form-field style="width:30%">
<input matInput placeholder="Name" formControlName="raw_name" required>
<input matInput autocomplete="off" placeholder="Name" formControlName="raw_name" >
</mat-form-field>
<mat-form-field style="width:30%">
<mat-select placeholder="is the Stock is Observed ?" formControlName="stock_observed" required>
<mat-select placeholder="is the Stock is Observed ?" formControlName="stock_observed" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="mrm.get('stock_observed').value == 'no'" >
<mat-form-field style="width:30%">
<input matInput placeholder="Estimated Quantity" formControlName="raw_quantity" required>
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="raw_quantity" >
</mat-form-field>
<mat-form-field style="width:30%">
<mat-select placeholder="Unit of Mearsurement"
formControlName="raw_uom" required>
formControlName="raw_uom" >
<mat-option value="{{uom.uom_id}}" *ngFor="let uom of uomData">{{uom.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="mrm.get('raw_uom').value == 61" style="width:30%">
<input matInput placeholder="Specify Other UOM" formControlName="other_uom" required>
<input matInput autocomplete="off" placeholder="Specify Other UOM" formControlName="other_uom" >
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="raw_value" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" required>
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="raw_value" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" >
<mat-hint align="end" *ngIf="mrm.get('raw_value').value != ''">{{"&#8377;"}} {{M_rawValueInWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Value of raw materials as per latest financial Statements" formControlName="rawmaterial_value" (keypress)="keyPress($event)" required>
<input matInput autocomplete="off" placeholder="Value of raw materials as per latest financial Statements" formControlName="rawmaterial_value" (keypress)="keyPress($event)" >
</mat-form-field>
<mat-form-field style="width:90%">
<mat-select placeholder="Is the stock of Raw Materials observed, sufficient considering the size of operations" formControlName="is_sufficiant_raw" required>
<mat-select placeholder="Is the stock of Raw Materials observed, sufficient considering the size of operations" formControlName="is_sufficiant_raw" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="mrm.get('is_sufficiant_raw').value == 'no'" appearance="outline" style="width: 90%">
<mat-label>Please comment on the stock level observed?</mat-label>
<textarea matInput placeholder="Please comment on the stock level observed" formControlName="rawmaterial_remarks"></textarea>
<textarea matInput autocomplete="off" placeholder="Please comment on the stock level observed" formControlName="rawmaterial_remarks"></textarea>
</mat-form-field>
</span>
<button type="button" mat-raised-button mat-icon-button (click)="addRawMaterials(1)"
@ -83,34 +83,34 @@
<mat-card-title> <p> {{b+1}} Finished Goods </p> </mat-card-title>
<mat-card-content class="matcard">
<mat-form-field style="width:30%">
<input matInput placeholder="Name" formControlName="goods_name" required>
<input matInput autocomplete="off" placeholder="Name" formControlName="goods_name" >
</mat-form-field>
<mat-form-field style="width:30%">
<mat-select placeholder="is the Goods is Observed ?" formControlName="goods_observed" required>
<mat-select placeholder="is the Goods is Observed ?" formControlName="goods_observed" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="mfg.get('goods_observed').value == 'no'" >
<mat-form-field style="width:30%">
<input matInput placeholder="Estimated Quantity" formControlName="goods_quantity" required>
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="goods_quantity" >
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,2)" required>
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,2)" >
<mat-hint align="end" *ngIf="mfg.get('goods_value').value != ''">{{"&#8377;"}} {{M_goodsValueInWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" required>
<input matInput autocomplete="off" placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" >
</mat-form-field>
<mat-form-field style="width:90%">
<mat-select placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" required>
<mat-select placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="mfg.get('is_sufficiant_goods').value == 'no'" appearance="outline" style="width: 90%">
<mat-label>Please comment on the finished goods stock level observed?</mat-label>
<textarea matInput placeholder="Please comment on the finished goods observed" formControlName="finishedgoods_remarks"></textarea>
<textarea matInput autocomplete="off" placeholder="Please comment on the finished goods observed" formControlName="finishedgoods_remarks"></textarea>
</mat-form-field>
</span>
@ -131,35 +131,35 @@
<mat-card-title> <p>{{c+1}} Traded Goods </p> </mat-card-title>
<mat-card-content class="matcard">
<mat-form-field style="width:30%">
<input matInput placeholder="Name" formControlName="traded_goods_name" required>
<input matInput autocomplete="off" placeholder="Name" formControlName="traded_goods_name" >
</mat-form-field>
<mat-form-field style="width:30%">
<mat-select placeholder="is the Traded Goods is Observed ?" formControlName="traded_goods_observed" required >
<mat-select placeholder="is the Traded Goods is Observed ?" formControlName="traded_goods_observed" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="mtg.get('traded_goods_observed').value == 'no'" >
<mat-form-field style="width:30%">
<input matInput placeholder="Estimated Quantity" formControlName="traded_goods_quantity" required>
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" >
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,3)" required>
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,3)" >
<mat-hint align="end" *ngIf="mtg.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{M_tradedGoodsValueInWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" required>
<input matInput autocomplete="off" placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" >
</mat-form-field>
<mat-form-field style="width:90%">
<!-- <input matInput placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" required> -->
<mat-select placeholder="Is the stock of Traded goods observed ?" formControlName="is_sufficiant_traded_goods" required>
<!-- <input matInput autocomplete="off" placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" > -->
<mat-select placeholder="Is the stock of Traded goods observed ?" formControlName="is_sufficiant_traded_goods" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="mtg.get('is_sufficiant_traded_goods').value == 'no'" appearance="outline" style="width: 90%">
<mat-label>Please comment on the Traded Goods stock level observed?</mat-label>
<textarea matInput placeholder="Please comment on the traded goods stock level observed" formControlName="traded_goods_remarks"></textarea>
<textarea matInput autocomplete="off" placeholder="Please comment on the traded goods stock level observed" formControlName="traded_goods_remarks"></textarea>
</mat-form-field>
</span>
@ -191,35 +191,35 @@
<mat-card-title> <p>{{d+1}} Finished Goods </p> </mat-card-title>
<mat-card-content class="matcard">
<mat-form-field style="width:30%">
<input matInput placeholder="Name" formControlName="goods_name" required>
<input matInput autocomplete="off" placeholder="Name" formControlName="goods_name" >
</mat-form-field>
<mat-form-field style="width:30%">
<mat-select placeholder="is the Goods is Observed ?" formControlName="goods_observed" required>
<mat-select placeholder="is the Goods is Observed ?" formControlName="goods_observed" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="retailfg.get('goods_observed').value == 'no'" >
<mat-form-field style="width:30%">
<input matInput placeholder="Estimated Quantity" formControlName="goods_quantity" required>
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="goods_quantity" >
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,4)" required>
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,4)" >
<mat-hint align="end" *ngIf="retailfg.get('goods_value').value != ''">{{"&#8377;"}} {{R_goodsValueInWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" required>
<input matInput autocomplete="off" placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" >
</mat-form-field>
<mat-form-field style="width:90%">
<mat-select placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" required>
<mat-select placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="retailfg.get('is_sufficiant_goods').value == 'no'" appearance="outline" style="width: 90%">
<mat-label>Please comment on the finished goods stock level observed?</mat-label>
<textarea matInput placeholder="Please comment on the finished goods observed" formControlName="finishedgoods_remarks"></textarea>
<textarea matInput autocomplete="off" placeholder="Please comment on the finished goods observed" formControlName="finishedgoods_remarks"></textarea>
</mat-form-field>
</span>
@ -240,35 +240,35 @@
<mat-card-title> <p>{{e+1}} Traded Goods </p> </mat-card-title>
<mat-card-content class="matcard">
<mat-form-field style="width:30%">
<input matInput placeholder="Name" formControlName="traded_goods_name" required>
<input matInput autocomplete="off" placeholder="Name" formControlName="traded_goods_name" >
</mat-form-field>
<mat-form-field style="width:30%">
<mat-select placeholder="is the Traded Goods is Observed ?" formControlName="traded_goods_observed" required>
<mat-select placeholder="is the Traded Goods is Observed ?" formControlName="traded_goods_observed" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="item.get('traded_goods_observed').value == 'no'" >
<mat-form-field style="width:30%">
<input matInput placeholder="Estimated Quantity" formControlName="traded_goods_quantity" required>
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" >
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,5)" required>
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,5)" >
<mat-hint align="end" *ngIf="item.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{R_tradedGoodsValueInWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" required>
<input matInput autocomplete="off" placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" >
</mat-form-field>
<mat-form-field style="width:90%">
<mat-select placeholder="Is the stock of Traded goods observed ?" formControlName="is_sufficiant_traded_goods" required>
<mat-select placeholder="Is the stock of Traded goods observed ?" formControlName="is_sufficiant_traded_goods" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="item.get('is_sufficiant_traded_goods').value == 'no'" appearance="outline" style="width: 90%">
<mat-label>Please comment on the Traded Goods stock level observed?</mat-label>
<textarea matInput placeholder="Please comment on the traded goods stock level observed" formControlName="traded_goods_remarks"></textarea>
<textarea matInput autocomplete="off" placeholder="Please comment on the traded goods stock level observed" formControlName="traded_goods_remarks"></textarea>
</mat-form-field>
</span>
@ -301,35 +301,35 @@
<mat-card-title> <p>{{f+1}} Finished Goods </p> </mat-card-title>
<mat-card-content class="matcard">
<mat-form-field style="width:30%">
<input matInput placeholder="Name" formControlName="goods_name" required>
<input matInput autocomplete="off" placeholder="Name" formControlName="goods_name" >
</mat-form-field>
<mat-form-field style="width:30%">
<mat-select placeholder="is the Goods is Observed ?" formControlName="goods_observed" required >
<mat-select placeholder="is the Goods is Observed ?" formControlName="goods_observed" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="tradesubdetail.get('goods_observed').value == 'no'" >
<mat-form-field style="width:30%">
<input matInput placeholder="Estimated Quantity" formControlName="goods_quantity" required>
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="goods_quantity" >
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,6)" required>
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,6)" >
<mat-hint align="end" *ngIf="tradesubdetail.get('goods_value').value != ''">{{"&#8377;"}} {{T_goodsValueInWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" required>
<input matInput autocomplete="off" placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" >
</mat-form-field>
<mat-form-field style="width:90%">
<mat-select placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" required>
<mat-select placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="tradesubdetail.get('is_sufficiant_goods').value == 'no'" appearance="outline" style="width: 90%">
<mat-label>Please comment on the finished goods stock level observed?</mat-label>
<textarea matInput placeholder="Please comment on the finished goods observed" formControlName="finishedgoods_remarks"></textarea>
<textarea matInput autocomplete="off" placeholder="Please comment on the finished goods observed" formControlName="finishedgoods_remarks"></textarea>
</mat-form-field>
</span>
@ -351,35 +351,35 @@
<mat-card-title> <p>{{g+1}} Traded Goods </p> </mat-card-title>
<mat-card-content class="matcard">
<mat-form-field style="width:30%">
<input matInput placeholder="Name" formControlName="traded_goods_name" required>
<input matInput autocomplete="off" placeholder="Name" formControlName="traded_goods_name" >
</mat-form-field>
<mat-form-field style="width:30%">
<mat-select placeholder="is the Traded Goods is Observed ?" formControlName="traded_goods_observed" required>
<mat-select placeholder="is the Traded Goods is Observed ?" formControlName="traded_goods_observed" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="tradetg.get('traded_goods_observed').value == 'no'" >
<mat-form-field style="width:30%">
<input matInput placeholder="Estimated Quantity" formControlName="traded_goods_quantity" required>
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" >
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,7)" required>
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,7)" >
<mat-hint align="end" *ngIf="tradetg.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{T_tradedGoodsValueInWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" required>
<input matInput autocomplete="off" placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" >
</mat-form-field>
<mat-form-field style="width:90%">
<!-- <input matInput placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" required> -->
<mat-select placeholder="Is the stock of Traded goods observed ?" formControlName="is_sufficiant_traded_goods" required>
<!-- <input matInput autocomplete="off" placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" > -->
<mat-select placeholder="Is the stock of Traded goods observed ?" formControlName="is_sufficiant_traded_goods" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="tradetg.get('is_sufficiant_traded_goods').value == 'no'" appearance="outline" style="width: 90%">
<mat-label>Please comment on the Traded Goods stock level observed?</mat-label>
<textarea matInput placeholder="Please comment on the traded goods stock level observed" formControlName="traded_goods_remarks"></textarea>
<textarea matInput autocomplete="off" placeholder="Please comment on the traded goods stock level observed" formControlName="traded_goods_remarks"></textarea>
</mat-form-field>
</span>
@ -516,7 +516,7 @@
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
<mat-form-field appearance="outline" style="width: 100%">
<mat-label>Remarks</mat-label>
<textarea matInput placeholder="Remarks" formControlName="stock_remarks"></textarea>
<textarea matInput autocomplete="off" placeholder="Remarks" formControlName="stock_remarks"></textarea>
</mat-form-field>
</div>
<div fxFlex="40" align="end">

View File

@ -16,14 +16,15 @@
</mat-card-header>
<mat-card-content style="max-height:100% !important;">
<div fxLayout="row wrap" class="child_mat_card">
<mat-card fxFlex.xs="80" fxFlex.sm="45" fxFlex.md="30" fxFlex.lg="23" fxFlex.xl="23" *ngFor="let formButton of categoryFormButtons;let quesIndex=index" [ngStyle]="{'background-color':formButton.isAnswered == false ? '#fff' : '#4caf50' ,'color':'#fff'}" (click)="OnSelectDirectForms(formButton)">
<mat-card fxFlex.xs="80" fxFlex.sm="45" fxFlex.md="32" fxFlex.lg="32" fxFlex.xl="33" *ngFor="let formButton of categoryFormButtons;let quesIndex=index" [ngStyle]="{'background-color':formButton.isAnswered == false ? '#fff' : '#4caf50' ,'color':'#fff'}" (click)="OnSelectDirectForms(formButton)">
<mat-card-header>
<div fxFlex="90" align="left" style="padding:15px !important;">
{{ (formButton.form_name.length>17)? (formButton.form_name | slice:0:17)+'..':(formButton.form_name) }}
<span style="padding: 17px 14px 3px 15px !important;border-radius: 0px 0px 0px 15px!important;width: 50px !important;" class="menu-badge mat-purple ng-star-inserted" align="center">{{quesIndex+1}}</span>
<div fxFlex="100" align="left" style="padding:15px !important;">
{{ formButton.form_name }}
</div>
<div fxFlex="20" align="end">
<!--<div fxFlex="20" align="end">
<span style="padding: 2px 9px 3px 9px !important;" class="menu-badge mat-purple ng-star-inserted" align="center">{{quesIndex+1}}</span>
</div>
</div> -->
</mat-card-header>
</mat-card>
</div>

View File

@ -1,6 +1,12 @@
// .child_mat_card mat-card {
// margin: 2 0%;
// }
::ng-deep .mat-card-header-text{
margin:0px !important;
}
.mat-purple{
background-color: gray !important;
}
mat-card.parent_mat_card > {
mat-card-header {
display: flex;
@ -11,6 +17,8 @@ mat-card.parent_mat_card > {
max-height:52vh;
overflow:auto;
}
.user-thumb {
position: absolute;
bottom: -35%;
@ -66,3 +74,4 @@ mat-card .child_mat_card > mat-card {
}
}

View File

@ -87,6 +87,8 @@ import { NgxViewerModule } from 'ngx-viewer';
import { FinalRemarksComponent } from './list-pd/start-pd/forms/final-remarks/final-remarks.component';
import { BusinessOtherFamilyMemberComponent } from './list-pd/start-pd/forms/dialogue/business-other-family-member/business-other-family-member.component';
import { QcReviewComponent } from './list-pd/pd-report/qc-review/qc-review.component';
import { SharedModule } from "app/shared/shared.module";
/**
* Custom angular notifier options
@ -264,7 +266,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
// AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), OwlDateTimeModule,
// OwlNativeDateTimeModule,
// ],
declarations: [RentalInfoComponent, TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent],
declarations: [RentalInfoComponent, TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent],
// exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent],
// providers: [PdTrigerService, GetGeometricLocationService],
@ -273,6 +275,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
CommonModule,
ManagePdRoutingModule,
NgxViewerModule,
SharedModule,
NotifierModule.withConfig(pdCustomNotifierOptions),
CKEditorModule,
PdfViewerModule,
@ -307,7 +310,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
{provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}],
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, AllocationViewMoreComponent, PersonalInfoComponent,
ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent],
ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent],
})
export class ManagePdModule {

View File

@ -331,6 +331,23 @@ getTypeofActivityForSuppliedInfoForm(pd_id: any): Observable<any>{
)
}
getQCReportFinalReviewDetails(pd_id: any, flag : string ): Observable<any>{
return this._http.post<any>(this.apiUrl+"getQCLenderRemarks", {"records": { "pd_id" : pd_id, "flag" :flag }})
.pipe(
catchError(this.handleError('operation', []))
)
}
// pd review status update details
pdReviewStatusUpdate(editData: any): Observable<any> {
editData.fk_updatedby = this._aws.getlocale();
// editData.updatedon = currentdate;
return this._http.post<any>(this.apiUrl + "updatePDMaster", {records: editData})
.pipe(
catchError(this.handleError('operation', []))
)
}
// inWords(num) {

View File

@ -0,0 +1,16 @@
<fieldset class="rating">
<input type="radio" [name]="inputName" value="5" [checked]="rating===5" />
<label title="Rocks!" (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>
<input type="radio" [name]="inputName" value="3" [checked]="rating===3" />
<label title="Meh" (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>
<input type="radio" [name]="inputName" value="1" [checked]="rating===1" />
<label title="Sucks big time" (click)='onClick(1)'>1 star</label>
</fieldset>

View File

@ -0,0 +1,42 @@
.rating {
float:left;
}
.rating:not(:checked) > input {
position:absolute;
top:-9999px;
clip:rect(0,0,0,0);
}
.rating:not(:checked) > label {
float:right;
width:1em;
padding:0.1em;
overflow:hidden;
white-space:nowrap;
cursor:pointer;
font-size:200%;
line-height:1.2;
color:#ddd;
}
.rating:not(:checked) > label:before {
content: '';
}
.rating > input:checked ~ label {
color: #f70;
}
.rating:not(:checked) > label:hover,
.rating:not(:checked) > label:hover ~ label {
color: gold;
}
.rating > input:checked ~ label:hover,
.rating > input:checked ~ label:hover ~ label,
.rating > label:hover ~ input:checked ~ label {
color: #ea0;
}

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { RatingComponent } from './rating.component';
describe('RatingComponent', () => {
let component: RatingComponent;
let fixture: ComponentFixture<RatingComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ RatingComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(RatingComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,25 @@
import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
@Component({
selector: 'app-rating',
templateUrl: './rating.component.html',
styleUrls: ['./rating.component.scss']
})
export class RatingComponent implements OnInit {
@Input() rating: number;
@Input() itemId: number;
@Output() ratingClick: EventEmitter<any> = new EventEmitter<any>();
inputName: string;
ngOnInit() {
this.inputName = this.itemId + '_rating';
}
onClick(rating: number): void {
this.rating = rating;
this.ratingClick.emit({
itemId: this.itemId,
rating: rating
});
}
}

View File

@ -4,19 +4,22 @@ import { MenuItems } from './menu-items/menu-items';
import { HorizontalMenuItems } from './menu-items/horizontal-menu-items';
import { AccordionAnchorDirective, AccordionLinkDirective, AccordionDirective } from './accordion';
import { ToggleFullscreenDirective } from './fullscreen/toggle-fullscreen.directive';
import { RatingComponent} from './rating/rating.component';
@NgModule({
declarations: [
AccordionAnchorDirective,
AccordionLinkDirective,
AccordionDirective,
ToggleFullscreenDirective
ToggleFullscreenDirective,
RatingComponent
],
exports: [
AccordionAnchorDirective,
AccordionLinkDirective,
AccordionDirective,
ToggleFullscreenDirective
ToggleFullscreenDirective,
RatingComponent
],
providers: [ MenuItems, HorizontalMenuItems ]
})