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"
|
||||
[formGroupName]="i">
|
||||
<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"
|
||||
formControlName="reason_for_positive">
|
||||
<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
|
||||
matTooltip="Delete" matTooltipPosition="above" (click)="deleteRecommendationPositive(i)"
|
||||
*ngIf="_finalRemarkForm.get('recommendation_positive').controls.length > 1">
|
||||
|
||||
@ -2,7 +2,9 @@ import {
|
||||
Component,
|
||||
OnInit,
|
||||
Inject,
|
||||
Input
|
||||
Input,
|
||||
NgZone,
|
||||
ViewChild
|
||||
} from '@angular/core';
|
||||
|
||||
import {
|
||||
@ -24,6 +26,7 @@ import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { analyzeAndValidateNgModules } from '@angular/compiler';
|
||||
import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
|
||||
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
||||
|
||||
@Component({
|
||||
selector: 'app-final-remarks',
|
||||
@ -56,6 +59,7 @@ export class FinalRemarksComponent implements OnInit {
|
||||
|
||||
constructor(
|
||||
notifier: NotifierService,
|
||||
private _ngZone: NgZone,
|
||||
private _formBuilder: FormBuilder,
|
||||
private pdTrigerService: PdTrigerService,
|
||||
private dialogRef: MatDialogRef<FinalRemarksComponent>,
|
||||
@ -125,6 +129,7 @@ export class FinalRemarksComponent implements OnInit {
|
||||
this.getM_Recommendation();
|
||||
this.image_doc_params={pdid:this.pdid,form_id:this.form_id,company_id:''}
|
||||
}
|
||||
@ViewChild('autosize') autosize: CdkTextareaAutosize;
|
||||
|
||||
CreateRecommendationPositive(data) {
|
||||
return this._formBuilder.group({
|
||||
|
||||
@ -21,15 +21,23 @@
|
||||
<mat-card style="margin-left: 15px;margin-right: 15px;">
|
||||
<mat-card-content formArrayName="addtional_requirements">
|
||||
<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-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>
|
||||
<!-- <button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button
|
||||
matTooltip="Delete" matTooltipPosition="above">
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button
|
||||
matTooltip="Delete" matTooltipPosition="above" (click)="deleteAdditionalQuestion(e)">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button> -->
|
||||
</button>
|
||||
</div>
|
||||
<!-- <div *ngIf="qu.value.isactive == 1">
|
||||
<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)">
|
||||
@ -82,7 +90,12 @@
|
||||
</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> -->
|
||||
<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>
|
||||
</div>
|
||||
</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 { FormBuilder, FormArray, FormControl, Validators, FormGroup } from '@angular/forms';
|
||||
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 { LoanDetailsComponent } from '../loan-details/loan-details.component';
|
||||
import { AwsService } from 'app/AwsService/aws.service';
|
||||
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
||||
import { take } from 'rxjs/operators';
|
||||
|
||||
@Component({
|
||||
selector: 'app-queries-docs',
|
||||
@ -30,6 +32,7 @@ export class QueriesDocsComponent implements OnInit {
|
||||
disableAfterSubmit: boolean;
|
||||
|
||||
constructor(notifier: NotifierService,
|
||||
private _ngZone: NgZone,
|
||||
private fb: FormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
@ -51,6 +54,7 @@ export class QueriesDocsComponent implements OnInit {
|
||||
this.lenderShortName = this.pd_all_details.pdmaster_details.lender_short_name;
|
||||
|
||||
}
|
||||
@ViewChild('autosize') autosize: CdkTextareaAutosize;
|
||||
|
||||
ngOnInit() {
|
||||
this.docsCollectedForm=this.fb.group({
|
||||
@ -219,6 +223,16 @@ export class QueriesDocsComponent implements OnInit {
|
||||
// if(this.docsCollectedForm.value.link == ""){
|
||||
// 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=>{
|
||||
if(res['dataStatus']){
|
||||
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.disableAfterSubmit = false;})
|
||||
// })
|
||||
|
||||
//isactive save form
|
||||
|
||||
|
||||
}
|
||||
|
||||
docs_change_fun(index,value){
|
||||
@ -271,5 +289,14 @@ export class QueriesDocsComponent implements OnInit {
|
||||
// // let control = disableDetails.controls.isactive
|
||||
// // 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_count_id: any;
|
||||
private notifier: NotifierService;
|
||||
countproperty: any[] = [];
|
||||
|
||||
constructor(notifier: NotifierService,private _pd: PdTrigerService, @Inject(MAT_DIALOG_DATA) public data: any, private dialog: MatDialog) {
|
||||
this.parentData = this.data;
|
||||
@ -159,26 +160,35 @@ export class RentalVerificationComponent implements OnInit {
|
||||
|
||||
// add more RI Details
|
||||
addMoreRIDetails(): void {
|
||||
let passValues: any = {
|
||||
manage_status: 1,
|
||||
parentData: this.parentData,
|
||||
masterData: this.masterData,
|
||||
existing_rental_count_id: this.existing_rental_count_id + 1,
|
||||
}
|
||||
const dialogRef = this.dialog.open(ManageRentalVerificationComponent, {
|
||||
data: passValues,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
disableClose: true
|
||||
});
|
||||
dialogRef.afterClosed().subscribe(dataresult => {
|
||||
if (dataresult.update_status == true) {
|
||||
this.existing_rental_list = [];
|
||||
this.loadFormData();
|
||||
}
|
||||
});
|
||||
|
||||
let params: any = {};
|
||||
// console.log('add params',params);
|
||||
params.pdid = this.pdid;
|
||||
this._pd.getPropertyCount(this.pdid).subscribe(data => {
|
||||
if (data.status == 200){
|
||||
let passValues: any = {
|
||||
manage_status: 1,
|
||||
parentData: this.parentData,
|
||||
masterData: this.masterData,
|
||||
existing_rental_count_id: data.records,
|
||||
}
|
||||
const dialogRef = this.dialog.open(ManageRentalVerificationComponent, {
|
||||
data: passValues,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
disableClose: true
|
||||
});
|
||||
dialogRef.afterClosed().subscribe(dataresult => {
|
||||
if (dataresult.update_status == true) {
|
||||
this.existing_rental_list = [];
|
||||
this.loadFormData();
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
editRIDetails(RentalDatas: any) {
|
||||
|
||||
@ -70,6 +70,15 @@ export class PdTrigerService {
|
||||
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., */
|
||||
retriveFile(PDID,FormID,CompanyID): Observable<any> {
|
||||
@ -353,6 +362,7 @@ export class PdTrigerService {
|
||||
|
||||
// save Pd form details
|
||||
savePDFormDetailsWithID(saveData: any): Observable<any> {
|
||||
console.log('save data',saveData);
|
||||
saveData.fk_createdby = this._aws.getlocale();
|
||||
// saveData[0].fk_updatedby = this._aws.getlocale();
|
||||
// saveData[0].updatedon = currentdate;
|
||||
@ -562,6 +572,14 @@ export class PdTrigerService {
|
||||
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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user