Fairoj: Banking information ques added & issues Fixed

This commit is contained in:
venbatechnologies@gmail.com 2019-07-30 12:21:05 +05:30
parent 3a64838a61
commit eca2f5a079
18 changed files with 194 additions and 21 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"javascript.implicitProjectConfig.experimentalDecorators": true
}

View File

@ -87,6 +87,13 @@
<mat-tab label="Questions">
<mat-card>
<mat-card-content>
<mat-form-field style="width:60% !important;">
<mat-select placeholder="Is the Banking Infomation Available" formControlName="bank_info_available" (selectionChange)="onChangeAvailable($event.value)">
<mat-option>Select</mat-option>
<mat-option value="Yes">Yes</mat-option>
<mat-option value="No">No</mat-option>
</mat-select>
</mat-form-field>
<div formArrayName="itemRows" autocomplete="off">
<mat-accordion *ngFor="let itemrow of bankingForm.controls.itemRows['controls']; let i=index;let last=last"
[formGroupName]="i">

View File

@ -145,11 +145,14 @@ export class BankingDetailsComponent implements OnInit {
const control = <FormArray>this.bankingForm.controls['itemRows'];
if (data.status == 200) {
this.bankingForm.controls.banking_form_remark.setValue(data.records.banking_form_remark);
let bank_info=data.records.hasOwnProperty('bank_info_available') ? data.records.bank_info_available == true ? 'Yes' : 'No' : 'Yes'
console.log("bank_info",bank_info)
this.bankingForm.controls.bank_info_available.setValue(bank_info);
var result = Object.keys(data.records.banking_details).map(function (key) {
return data.records.banking_details[key];
});
if (result.length == 0) {
control.push(this.createBankarray());
// control.push(this.createBankarray());
} else {
result.forEach((datas, index) => {
// this.selectedBorrower(datas.applicant_name,index);
@ -160,7 +163,7 @@ export class BankingDetailsComponent implements OnInit {
this.bankingForm.controls.itemRows.setValue(result);
}
} else {
control.push(this.createBankarray());
// control.push(this.createBankarray());
}
});
@ -192,6 +195,7 @@ export class BankingDetailsComponent implements OnInit {
public initBankingForm(): void {
this.bankingForm = this.fb.group({
banking_form_remark: [''],
bank_info_available:[''],
itemRows: this.fb.array([])
});
}
@ -289,6 +293,7 @@ export class BankingDetailsComponent implements OnInit {
records.pdid = this.pdid;
records.formid = '7';
records.banking_form_remark = this.bankingForm.controls.banking_form_remark.value;
records.bank_info_available=this.bankingForm.controls.bank_info_available.value == 'Yes' ? true : this.bankingForm.controls.bank_info_available.value == 'No' ? false : ''
// records.fk_createdby = '252';
records.banking_details = this.bankingForm.controls['itemRows'].value;
@ -425,5 +430,18 @@ export class BankingDetailsComponent implements OnInit {
}
});
}
onChangeAvailable(value){
console.log(value)
const control = <FormArray>this.bankingForm.controls['itemRows'];
if(value == 'Yes'){
control.push(this.createBankarray())
}
else{
while(control.length!=0){
control.removeAt(0)
}
}
}
}

View File

@ -17,6 +17,13 @@
<mat-tab label="Questions">
<mat-card>
<mat-card-content>
<mat-form-field style="width:60% !important;">
<mat-select placeholder="Is the Banking Infomation Available" formControlName="bank_info_available" (selectionChange)="onChangeAvailable($event.value)">
<mat-option>Select</mat-option>
<mat-option value="Yes">Yes</mat-option>
<mat-option value="No">No</mat-option>
</mat-select>
</mat-form-field>
<div formArrayName="itemRows" autocomplete="off">
<mat-accordion *ngFor="let itemrow of bankingForm.controls.itemRows['controls']; let i=index;let last=last"
[formGroupName]="i">

View File

@ -143,11 +143,14 @@ export class BusinessBankingDetailsComponent implements OnInit {
const control = <FormArray>this.bankingForm.controls['itemRows'];
if (data.status == 200) {
this.bankingForm.controls.banking_form_remark.setValue(data.records.banking_form_remark);
let bank_info=data.records.hasOwnProperty('bank_info_available') ? data.records.bank_info_available == true ? 'Yes' : 'No' : 'Yes'
// console.log("bank_info",bank_info)
this.bankingForm.controls.bank_info_available.setValue(bank_info);
var result = Object.keys(data.records.banking_details).map(function (key) {
return data.records.banking_details[key];
});
if (result.length == 0) {
control.push(this.createBankarray());
// control.push(this.createBankarray());
} else {
result.forEach((datas, index) => {
@ -160,7 +163,7 @@ export class BusinessBankingDetailsComponent implements OnInit {
this.bankingForm.controls.itemRows.setValue(result);
}
} else {
control.push(this.createBankarray());
// control.push(this.createBankarray());
}
});
this.retriveFile();
@ -190,6 +193,7 @@ export class BusinessBankingDetailsComponent implements OnInit {
public initBankingForm(): void {
this.bankingForm = this.fb.group({
banking_form_remark: [''],
bank_info_available:[''],
itemRows: this.fb.array([])
});
}
@ -284,6 +288,7 @@ export class BusinessBankingDetailsComponent implements OnInit {
records.pdid = this.pdid;
records.formid = '21';
records.company_id = this.company_id; records.banking_form_remark = this.bankingForm.controls.banking_form_remark.value;
records.bank_info_available=this.bankingForm.controls.bank_info_available.value == 'Yes' ? true : this.bankingForm.controls.bank_info_available.value == 'No' ? false : ''
// records.fk_createdby = '252';
records.banking_details = this.bankingForm.controls['itemRows'].value;
@ -465,4 +470,17 @@ export class BusinessBankingDetailsComponent implements OnInit {
}
});
}
onChangeAvailable(value){
console.log(value)
const control = <FormArray>this.bankingForm.controls['itemRows'];
if(value == 'Yes'){
control.push(this.createBankarray())
}
else{
while(control.length!=0){
control.removeAt(0)
}
}
}
}

View File

@ -80,7 +80,7 @@
</mat-form-field>
<mat-form-field style="width: 35%" *ngIf="items.get('person_designation').value == 1">
<input matInput placeholder="Specify Person Designation" formControlName="other_person_designation">
<mat-error *ngIf="itemrow.controls['other_person_designation'].hasError('required')">Person Designatione Required</mat-error>
<mat-error *ngIf="items.controls['other_person_designation'].hasError('required')">Person Designatione Required</mat-error>
</mat-form-field>
</div>
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
@ -94,12 +94,12 @@
</mat-form-field>
<mat-form-field style="width: 15%">
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode"
type="text" OnlyNumber >
type="text" OnlyNumber >
<mat-error>Enter Valid STD Code Number.</mat-error>
</mat-form-field> &nbsp; - &nbsp;
<mat-form-field style="width: 35%">
<input matInput autocomplete="off" placeholder="Client Contact Person Landline Number"
formControlName="person_landline" type="text" OnlyNumber >
formControlName="person_landline" type="text" OnlyNumber maxlength="8">
<mat-error>Enter Valid LandLine Number.</mat-error>
</mat-form-field>
</div>
@ -354,7 +354,7 @@
</mat-form-field>
<mat-form-field style="width: 35%" *ngIf="items.get('person_designation').value == 1">
<input matInput placeholder="Specify Person Designation" formControlName="other_person_designation">
<mat-error *ngIf="itemrow.controls['other_person_designation'].hasError('required')">Person Designation Required</mat-error>
<mat-error *ngIf="items.controls['other_person_designation'].hasError('required')">Person Designation Required</mat-error>
</mat-form-field>
</div>
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">

View File

@ -111,13 +111,13 @@ export class FinalRemarksComponent implements OnInit {
this._finalRemarkForm.removeControl('sealing_activity');
this._finalRemarkForm.removeControl('demolition_activity');
}
if(this.product_abbr != 'LAEP'){
this._finalRemarkForm.controls['final_form_remarks'].setValidators(Validators.compose([Validators.required]))
}
else{
this._finalRemarkForm.controls['final_form_remarks'].clearValidators()
this._finalRemarkForm.controls['final_form_remarks'].updateValueAndValidity();
}
// if(this.product_abbr != 'LAEP'){
// this._finalRemarkForm.controls['final_form_remarks'].setValidators(Validators.compose([Validators.required]))
// }
// else{
// this._finalRemarkForm.controls['final_form_remarks'].clearValidators()
// this._finalRemarkForm.controls['final_form_remarks'].updateValueAndValidity();
// }
this.getM_Type();

View File

@ -379,7 +379,7 @@ export class LoanDetailsComponent implements OnInit {
return data;
}
else if (data.group_name == that.productAbbr && data.sub_group_name == null && data.isactive == 1) {
else if (data.group_name == that.productAbbr && data.sub_group_name == null || data.sub_group_name == '' && data.isactive == 1) {
return data;
}

View File

@ -97,13 +97,13 @@
</mat-form-field>
<mat-form-field style="width: 15%">
<input matInput autocomplete="off" placeholder="STD Code"
formControlName="person_stdcode" type="text" OnlyNumber>
formControlName="person_stdcode" type="text" OnlyNumber >
<mat-error>Enter Valid STD Code Number.</mat-error>
</mat-form-field> &nbsp; - &nbsp;
<mat-form-field style="width: 35%">
<input matInput autocomplete="off"
placeholder="Contact Person Landline Number"
formControlName="person_landline" type="text" OnlyNumber>
formControlName="person_landline" type="text" OnlyNumber maxlength="8">
<mat-error>Enter Valid LandLine Number.</mat-error>
</mat-form-field>
</div>

View File

@ -603,7 +603,7 @@ export class SupplierInfoComponent implements OnInit {
} else {
var answerFormValues = this._supplierQuesFrom.value;
this._supplierQuesFrom.value.supplier_info_available == 'Yes' ? answerFormValues.client_info_available = true : answerFormValues.client_info_available = false ;
this._supplierQuesFrom.value.supplier_info_available == 'Yes' ? answerFormValues.supplier_info_available = true : answerFormValues.supplier_info_available = false ;
this._supplierQuesFrom.value.bill_info == 'Yes' ? answerFormValues.bill_info = true: answerFormValues.bill_info = false ;
//To Remove The "Null" With Key also
Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]);

View File

@ -328,6 +328,40 @@
</mat-card-content>
</ng-template>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>Notes</ng-template>
<mat-form-field appearance="outline" style="width:85%">
<mat-label>Notes</mat-label>
<input matInput type="text" placeholder="Enter the Notes" [(ngModel)]="newNotes">
</mat-form-field>
<button mat-icon-button matTooltip="Save" matTooltipPosition="above" (click)="saveNotes()">
<mat-icon style="color:#e00201;font-size:30px;">send</mat-icon>
</button>
<div *ngIf="masterPdLogsData.length>0; else nohistory">
<div *ngFor="let master of display_new_notes;let even=even;let odd=odd">
<mat-list class="m-gap p-gap" [ngClass]="{odd:odd,even:even}">
<!-- <mat-card > -->
<mat-list-item >
<span style="font-size:15px;"><span style="color:#908f8f">{{master.log_time}}&nbsp;</span>
<span style="color:#908f8f"> <i> {{master.createdby}} </i> </span><br> <span>{{master.remark | titlecase}}</span>
<!-- <div *ngIf="master.meta_data && master.meta_data.length>0"> -->
<!-- <div *ngFor="let metadata of master.meta_data" style="color:#908f8f">
<i>{{metadata.display_name}} </i> : <span>{{metadata.display_value}}</span><br>
</div> -->
<!-- </div> -->
</span>
</mat-list-item>
<!-- </mat-card> -->
</mat-list>
</div>
</div>
<ng-template #nohistory>
<mat-card-content>
<p>No History</p>
</mat-card-content>
</ng-template>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>QC Notes</ng-template>
<div>

View File

@ -13,6 +13,20 @@
.metaDataStyle{
height:89px !important;
}
.odd{
padding: 10px;
background-color:rgb(235, 231, 231);
border-radius: 5px;
// // font-size: 34px;
}
.even{
padding: 10px;
// background-color:rgb(255, 242, 242);
background-color:rgb(243, 240, 240);
border-radius: 5px;
// font-size: 22px;
}
// .headerdesign{
// border-radius: 5px !important;

View File

@ -40,6 +40,8 @@ export class ViewPdComponent implements OnInit, OnDestroy {
FilteredFieldNames: any = [];
localcount: any;
localstring: any;
newNotes:any;
display_new_notes:any=[]
localMandatoryFields: any =
[{ 'backEnd_FieldName': "fk_lender_id", 'frontEnd_FieldName': "Lender Name" },
{ 'backEnd_FieldName': "lender_applicant_id", 'frontEnd_FieldName': "Loan Applicant ID" },
@ -104,9 +106,13 @@ export class ViewPdComponent implements OnInit, OnDestroy {
// this.viewID = this.route.snapshot.params['pdid'];
// this.masterRandomString = this.route.snapshot.params['rdmstr'];
this.viewPdDetails(this.viewID,this.masterRandomString);
this.getAllNotes();
}
pd_QC_Rating: Number;
viewPdDetails(editID: string,masterRandomString : string) {
// console.log('inside Function',masterRandomString);
this.pdMasterData = [];
@ -476,5 +482,29 @@ export class ViewPdComponent implements OnInit, OnDestroy {
}
}
getAllNotes(){ //for getting the value of Notes Tab
this._pd.getQCReportFinalReviewDetails(this.viewID,'ALL_REMARKS').subscribe(result=>{
this.display_new_notes=result['records']
let value=this.display_new_notes;
this.display_new_notes=[]
for(let i=value.length-1;i>=0;i--){
console.log("value",value[i]);
this.display_new_notes.push(value[i])
}
console.log("dis",this.display_new_notes)
})
}
saveNotes(){
console.log(this.newNotes);
let param={pd_id:this.viewID,remark:this.newNotes}
this._pd.savePDRemark(param).subscribe(res=>{
if(res['dataStatus']){
this.notifier.notify("success","Saved Successfully")
this.getAllNotes();
this.newNotes=''
}
})
}
}

View File

@ -743,5 +743,10 @@ export class PdTrigerService {
return this._http.post(this.apiUrl + 'updatePDPhoto', { "records":values })
.pipe(catchError(this.handleError('role', [])))
}
savePDRemark(values){
values.createdby=this._aws.getlocale();
return this._http.post(this.apiUrl+'savePDRemark',values)
.pipe(catchError(this.handleError('role',[])))
}
}

View File

@ -45,7 +45,8 @@
<span class="empty-spacer"></span>
<button mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Score" matTooltipPosition="above" (click)="showAction()" ><mat-icon>arrow_upward</mat-icon></button>
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Save" matTooltipPosition="above" (click)="getFrameContent(IFrameContent)" style="margin-right: 2px;"><mat-icon>save</mat-icon></button>
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Notes" matTooltipPosition="above" (click)="reportReview('REMARKS')" style="margin-right: 2px;"><mat-icon>notes</mat-icon></button>
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="QC Notes" matTooltipPosition="above" (click)="reportReview('REMARKS')" style="margin-right: 2px;"><mat-icon>notes</mat-icon></button>
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="PD Officer Notes" matTooltipPosition="above" (click)="reportReview('pd_officer_notes')" style="margin-right: 2px;"><mat-icon>bookmarks</mat-icon></button>
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="QC Complete" matTooltipPosition="above" (click)="reportReview('COMPLETE')" style="margin-right: 2px;"><mat-icon>done_all</mat-icon></button>
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Re-generate Report" matTooltipPosition="above" (click)="reGeneratePFReport()"><mat-icon>autorenew</mat-icon></button>

View File

@ -46,4 +46,24 @@
<button mat-button class="btn btn-primary" (click)="myClick()">Save</button>
<button mat-button mat-dialog-close>Cancel</button>
</mat-dialog-actions>
</div>
<div *ngIf="showStatus == 'pd_officer_notes'">
<h2 mat-dialog-title>PD Officer Notes</h2>
<mat-dialog-content class="mat-typography">
<div style="margin: 12px; width: 340px;">
<form role="form" *ngIf="showForm" [formGroup]="ngForm" accept-charset="UTF-8" novalidate>
<div>
<mat-form-field appearance="outline" style="width: 100%">
<mat-label>Remarks</mat-label>
<textarea matInput placeholder="Remarks" formControlName="pd_qc_note"></textarea>
</mat-form-field>
</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>
</div>

View File

@ -58,6 +58,21 @@ export class QcReviewComponent implements OnInit {
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
// alert(err.html_format);
});
}else if( this.showStatus === 'pd_officer_notes'){
type = 'OFFICER_REMARKS';
this.pdTrigerService.getQCReportFinalReviewDetails(this.data.startId, type).subscribe(data => {
if(data['dataStatus']){
this.recordData = data.records[0];
this.ngForm = this._formBuilder.group({
pd_qc_note: [this.recordData.pd_qc_note],
pd_status: [this.recordData.pd_status]
})
this.showForm = true;
}
}, error => {
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
// alert(err.html_format);
});
} else if(this.showStatus === 'COMPLETE') {
type = 'QC';
this.pdTrigerService.getQCReportFinalReviewDetails(this.data.startId, type).subscribe(data => {

View File

@ -34,7 +34,8 @@
</div>
</div>
<div fxLayout="row" fxLayoutAlign="center" class="pt-2">
<span class="bottom-sec"><a href="mailto:connect@sineedge.com">info@sineedge.com</a> | +91 9910112704 / +91 987104039</span>
<span class="bottom-sec"><a href="mailto:connect@sineedge.com">info@pdgenie.com</a></span>
<!-- | +91 9910112704 / +91 987104039 -->
</div>
</div>