Queries issue fix
This commit is contained in:
parent
11b73cc548
commit
e3c80d804b
@ -66,10 +66,19 @@
|
|||||||
<div *ngFor="let details of _finalRemarkForm.get('recommendation_positive').controls; let i=index; let last=last"
|
<div *ngFor="let details of _finalRemarkForm.get('recommendation_positive').controls; let i=index; let last=last"
|
||||||
[formGroupName]="i">
|
[formGroupName]="i">
|
||||||
<mat-form-field style="width:85%;">
|
<mat-form-field style="width:85%;">
|
||||||
|
<textarea matInput cdkTextareaAutosize
|
||||||
|
#autosize="cdkTextareaAutosize"
|
||||||
|
cdkAutosizeMinRows="1"
|
||||||
|
cdkAutosizeMaxRows="5"
|
||||||
|
autocomplete="off" placeholder="Reasons for marking PD status as Positive"
|
||||||
|
formControlName="reason_for_positive"></textarea>
|
||||||
|
<mat-error *ngIf="details.controls['reason_for_positive'].hasError('required')">Reasons Required</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
<!-- <mat-form-field style="width:85%;">
|
||||||
<input matInput autocomplete="off" placeholder="Reasons for marking PD status as Positive"
|
<input matInput autocomplete="off" placeholder="Reasons for marking PD status as Positive"
|
||||||
formControlName="reason_for_positive">
|
formControlName="reason_for_positive">
|
||||||
<mat-error *ngIf="details.controls['reason_for_positive'].hasError('required')">Reasons Required</mat-error>
|
<mat-error *ngIf="details.controls['reason_for_positive'].hasError('required')">Reasons Required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field> -->
|
||||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button
|
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button
|
||||||
matTooltip="Delete" matTooltipPosition="above" (click)="deleteRecommendationPositive(i)"
|
matTooltip="Delete" matTooltipPosition="above" (click)="deleteRecommendationPositive(i)"
|
||||||
*ngIf="_finalRemarkForm.get('recommendation_positive').controls.length > 1">
|
*ngIf="_finalRemarkForm.get('recommendation_positive').controls.length > 1">
|
||||||
|
|||||||
@ -2,7 +2,9 @@ import {
|
|||||||
Component,
|
Component,
|
||||||
OnInit,
|
OnInit,
|
||||||
Inject,
|
Inject,
|
||||||
Input
|
Input,
|
||||||
|
NgZone,
|
||||||
|
ViewChild
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@ -24,6 +26,7 @@ import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
|||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { analyzeAndValidateNgModules } from '@angular/compiler';
|
import { analyzeAndValidateNgModules } from '@angular/compiler';
|
||||||
import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
|
import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
|
||||||
|
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-final-remarks',
|
selector: 'app-final-remarks',
|
||||||
@ -56,6 +59,7 @@ export class FinalRemarksComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
notifier: NotifierService,
|
notifier: NotifierService,
|
||||||
|
private _ngZone: NgZone,
|
||||||
private _formBuilder: FormBuilder,
|
private _formBuilder: FormBuilder,
|
||||||
private pdTrigerService: PdTrigerService,
|
private pdTrigerService: PdTrigerService,
|
||||||
private dialogRef: MatDialogRef<FinalRemarksComponent>,
|
private dialogRef: MatDialogRef<FinalRemarksComponent>,
|
||||||
@ -125,6 +129,7 @@ export class FinalRemarksComponent implements OnInit {
|
|||||||
this.getM_Recommendation();
|
this.getM_Recommendation();
|
||||||
this.image_doc_params={pdid:this.pdid,form_id:this.form_id,company_id:''}
|
this.image_doc_params={pdid:this.pdid,form_id:this.form_id,company_id:''}
|
||||||
}
|
}
|
||||||
|
@ViewChild('autosize') autosize: CdkTextareaAutosize;
|
||||||
|
|
||||||
CreateRecommendationPositive(data) {
|
CreateRecommendationPositive(data) {
|
||||||
return this._formBuilder.group({
|
return this._formBuilder.group({
|
||||||
|
|||||||
@ -21,15 +21,23 @@
|
|||||||
<mat-card style="margin-left: 15px;margin-right: 15px;">
|
<mat-card style="margin-left: 15px;margin-right: 15px;">
|
||||||
<mat-card-content formArrayName="addtional_requirements">
|
<mat-card-content formArrayName="addtional_requirements">
|
||||||
<div *ngFor="let qu of docsCollectedForm.controls.addtional_requirements['controls'];let i=index;" [formGroupName]="i">
|
<div *ngFor="let qu of docsCollectedForm.controls.addtional_requirements['controls'];let i=index;" [formGroupName]="i">
|
||||||
<div *ngFor="let item of queries_docs">
|
<div *ngFor="let item of queries_docs;let e=index">
|
||||||
|
<div *ngIf="item.isactive == 1">
|
||||||
<mat-form-field style="width:90%">
|
<mat-form-field style="width:90%">
|
||||||
<mat-placeholder style="white-space: normal;">{{item.add_requirement}}</mat-placeholder>
|
<mat-placeholder style="white-space: normal;">{{item.add_requirement}}</mat-placeholder>
|
||||||
<input matInput type="text" [formControlName]="item.add_req_id">
|
<!-- <input matInput type="text" [formControlName]="item.add_req_id"> -->
|
||||||
|
<textarea matInput cdkTextareaAutosize
|
||||||
|
#autosize="cdkTextareaAutosize"
|
||||||
|
cdkAutosizeMinRows="1"
|
||||||
|
cdkAutosizeMaxRows="5"
|
||||||
|
type="text"
|
||||||
|
[formControlName]="item.add_req_id"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<!-- <button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button
|
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button
|
||||||
matTooltip="Delete" matTooltipPosition="above">
|
matTooltip="Delete" matTooltipPosition="above" (click)="deleteAdditionalQuestion(e)">
|
||||||
<mat-icon>delete</mat-icon>
|
<mat-icon>delete</mat-icon>
|
||||||
</button> -->
|
</button>
|
||||||
|
</div>
|
||||||
<!-- <div *ngIf="qu.value.isactive == 1">
|
<!-- <div *ngIf="qu.value.isactive == 1">
|
||||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button
|
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button
|
||||||
matTooltip="Delete" matTooltipPosition="above" (click)="enablequeries(e,qu,item.add_req_id)">
|
matTooltip="Delete" matTooltipPosition="above" (click)="enablequeries(e,qu,item.add_req_id)">
|
||||||
@ -82,7 +90,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- <button *ngIf="camera_btn[i] == true" ion-button slot="end" small float-right (click)="capture(i,item)">Capture<ion-icon name="md-camera"></ion-icon></button> -->
|
<!-- <button *ngIf="camera_btn[i] == true" ion-button slot="end" small float-right (click)="capture(i,item)">Capture<ion-icon name="md-camera"></ion-icon></button> -->
|
||||||
<mat-form-field *ngIf="item.controls['reason']" style="width: 80%">
|
<mat-form-field *ngIf="item.controls['reason']" style="width: 80%">
|
||||||
<input matInput type="text" formControlName="reason" placeholder="Enter the Reason">
|
<!-- <input matInput type="text" formControlName="reason" placeholder="Enter the Reason"> -->
|
||||||
|
<textarea matInput cdkTextareaAutosize
|
||||||
|
#autosize="cdkTextareaAutosize"
|
||||||
|
cdkAutosizeMinRows="1"
|
||||||
|
cdkAutosizeMaxRows="5"
|
||||||
|
type="text" formControlName="reason" placeholder="Enter the Reason"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { Component, OnInit, Inject } from '@angular/core';
|
import { Component, OnInit, Inject, NgZone, ViewChild } from '@angular/core';
|
||||||
import { NotifierService } from 'angular-notifier';
|
import { NotifierService } from 'angular-notifier';
|
||||||
import { FormBuilder, FormArray, FormControl, Validators, FormGroup } from '@angular/forms';
|
import { FormBuilder, FormArray, FormControl, Validators, FormGroup } from '@angular/forms';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
@ -6,6 +6,8 @@ import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.se
|
|||||||
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material';
|
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material';
|
||||||
import { LoanDetailsComponent } from '../loan-details/loan-details.component';
|
import { LoanDetailsComponent } from '../loan-details/loan-details.component';
|
||||||
import { AwsService } from 'app/AwsService/aws.service';
|
import { AwsService } from 'app/AwsService/aws.service';
|
||||||
|
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
||||||
|
import { take } from 'rxjs/operators';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-queries-docs',
|
selector: 'app-queries-docs',
|
||||||
@ -30,6 +32,7 @@ export class QueriesDocsComponent implements OnInit {
|
|||||||
disableAfterSubmit: boolean;
|
disableAfterSubmit: boolean;
|
||||||
|
|
||||||
constructor(notifier: NotifierService,
|
constructor(notifier: NotifierService,
|
||||||
|
private _ngZone: NgZone,
|
||||||
private fb: FormBuilder,
|
private fb: FormBuilder,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
@ -51,6 +54,7 @@ export class QueriesDocsComponent implements OnInit {
|
|||||||
this.lenderShortName = this.pd_all_details.pdmaster_details.lender_short_name;
|
this.lenderShortName = this.pd_all_details.pdmaster_details.lender_short_name;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ViewChild('autosize') autosize: CdkTextareaAutosize;
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.docsCollectedForm=this.fb.group({
|
this.docsCollectedForm=this.fb.group({
|
||||||
@ -219,6 +223,16 @@ export class QueriesDocsComponent implements OnInit {
|
|||||||
// if(this.docsCollectedForm.value.link == ""){
|
// if(this.docsCollectedForm.value.link == ""){
|
||||||
// this.docsCollectedForm.value.link = geoCoords
|
// this.docsCollectedForm.value.link = geoCoords
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
this._pd.istiveAdditionalRequirements({addtional_requirements:this.queries_docs},"savePDAdditionalRequiremets").subscribe(result => {
|
||||||
|
if (result.status == 200) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}, 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.!');
|
||||||
|
});
|
||||||
|
|
||||||
this.pdTriggerService.saveForm(this.docsCollectedForm.value).subscribe(res=>{
|
this.pdTriggerService.saveForm(this.docsCollectedForm.value).subscribe(res=>{
|
||||||
if(res['dataStatus']){
|
if(res['dataStatus']){
|
||||||
this.notifier.notify("success","Record Saved Successfully..")
|
this.notifier.notify("success","Record Saved Successfully..")
|
||||||
@ -234,6 +248,10 @@ export class QueriesDocsComponent 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.!');
|
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.!');
|
||||||
this.disableAfterSubmit = false;})
|
this.disableAfterSubmit = false;})
|
||||||
// })
|
// })
|
||||||
|
|
||||||
|
//isactive save form
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
docs_change_fun(index,value){
|
docs_change_fun(index,value){
|
||||||
@ -271,5 +289,14 @@ export class QueriesDocsComponent implements OnInit {
|
|||||||
// // let control = disableDetails.controls.isactive
|
// // let control = disableDetails.controls.isactive
|
||||||
// // control.disabled ? control.enable() : control.disable();
|
// // control.disabled ? control.enable() : control.disable();
|
||||||
// }
|
// }
|
||||||
|
deleteAdditionalQuestion(e) {
|
||||||
|
// let queries_docs: any = {};
|
||||||
|
console.log('e checking',e);
|
||||||
|
// return;
|
||||||
|
this.queries_docs[e].isactive = 0;
|
||||||
|
console.log(this.queries_docs)
|
||||||
|
this.notifier.notify("success","Deleted Successfully..")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,6 +35,7 @@ export class RentalVerificationComponent implements OnInit {
|
|||||||
existing_rental_list: any = [];
|
existing_rental_list: any = [];
|
||||||
existing_rental_count_id: any;
|
existing_rental_count_id: any;
|
||||||
private notifier: NotifierService;
|
private notifier: NotifierService;
|
||||||
|
countproperty: any[] = [];
|
||||||
|
|
||||||
constructor(notifier: NotifierService,private _pd: PdTrigerService, @Inject(MAT_DIALOG_DATA) public data: any, private dialog: MatDialog) {
|
constructor(notifier: NotifierService,private _pd: PdTrigerService, @Inject(MAT_DIALOG_DATA) public data: any, private dialog: MatDialog) {
|
||||||
this.parentData = this.data;
|
this.parentData = this.data;
|
||||||
@ -159,26 +160,35 @@ export class RentalVerificationComponent implements OnInit {
|
|||||||
|
|
||||||
// add more RI Details
|
// add more RI Details
|
||||||
addMoreRIDetails(): void {
|
addMoreRIDetails(): void {
|
||||||
let passValues: any = {
|
|
||||||
manage_status: 1,
|
let params: any = {};
|
||||||
parentData: this.parentData,
|
// console.log('add params',params);
|
||||||
masterData: this.masterData,
|
params.pdid = this.pdid;
|
||||||
existing_rental_count_id: this.existing_rental_count_id + 1,
|
this._pd.getPropertyCount(this.pdid).subscribe(data => {
|
||||||
}
|
if (data.status == 200){
|
||||||
const dialogRef = this.dialog.open(ManageRentalVerificationComponent, {
|
let passValues: any = {
|
||||||
data: passValues,
|
manage_status: 1,
|
||||||
maxWidth: '100vw',
|
parentData: this.parentData,
|
||||||
maxHeight: '100vh',
|
masterData: this.masterData,
|
||||||
height: '100%',
|
existing_rental_count_id: data.records,
|
||||||
width: '100%',
|
}
|
||||||
disableClose: true
|
const dialogRef = this.dialog.open(ManageRentalVerificationComponent, {
|
||||||
});
|
data: passValues,
|
||||||
dialogRef.afterClosed().subscribe(dataresult => {
|
maxWidth: '100vw',
|
||||||
if (dataresult.update_status == true) {
|
maxHeight: '100vh',
|
||||||
this.existing_rental_list = [];
|
height: '100%',
|
||||||
this.loadFormData();
|
width: '100%',
|
||||||
}
|
disableClose: true
|
||||||
});
|
});
|
||||||
|
dialogRef.afterClosed().subscribe(dataresult => {
|
||||||
|
if (dataresult.update_status == true) {
|
||||||
|
this.existing_rental_list = [];
|
||||||
|
this.loadFormData();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
editRIDetails(RentalDatas: any) {
|
editRIDetails(RentalDatas: any) {
|
||||||
|
|||||||
@ -70,6 +70,15 @@ export class PdTrigerService {
|
|||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
getPropertyCount(params :any): Observable<any> {
|
||||||
|
// let httpParams = new HttpParams().set('pdid', countpdid);
|
||||||
|
// httpParams = httpParams.append('random_string',randomString);
|
||||||
|
return this._http.get(this.apiUrl + 'getNextRentalCount?pdid=' +params)
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('role', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* To get Files., */
|
/* To get Files., */
|
||||||
retriveFile(PDID,FormID,CompanyID): Observable<any> {
|
retriveFile(PDID,FormID,CompanyID): Observable<any> {
|
||||||
@ -353,6 +362,7 @@ export class PdTrigerService {
|
|||||||
|
|
||||||
// save Pd form details
|
// save Pd form details
|
||||||
savePDFormDetailsWithID(saveData: any): Observable<any> {
|
savePDFormDetailsWithID(saveData: any): Observable<any> {
|
||||||
|
console.log('save data',saveData);
|
||||||
saveData.fk_createdby = this._aws.getlocale();
|
saveData.fk_createdby = this._aws.getlocale();
|
||||||
// saveData[0].fk_updatedby = this._aws.getlocale();
|
// saveData[0].fk_updatedby = this._aws.getlocale();
|
||||||
// saveData[0].updatedon = currentdate;
|
// saveData[0].updatedon = currentdate;
|
||||||
@ -562,6 +572,14 @@ export class PdTrigerService {
|
|||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
istiveAdditionalRequirements(saveData: any,apiName : any): Observable<any> {
|
||||||
|
saveData.createdby = this._aws.getlocale();
|
||||||
|
console.log('savedate',saveData);
|
||||||
|
return this._http.post<any>(this.apiUrl + apiName, { "records": saveData })
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('operation', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* To get TypeofActivity's Product From About Business,
|
/* To get TypeofActivity's Product From About Business,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user