+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.ts
index 468a18374..d6f98e002 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.ts
@@ -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..")
+
+ }
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/rental-verification.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/rental-verification.component.ts
index 417eedf71..65803c5ff 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/rental-verification.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/rental-verification.component.ts
@@ -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) {
diff --git a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts
index 1e751441f..d3af8ebd1 100755
--- a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts
+++ b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts
@@ -70,6 +70,15 @@ export class PdTrigerService {
catchError(this.handleError('role', []))
)
}
+ getPropertyCount(params :any): Observable
{
+ // 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 {
@@ -353,6 +362,7 @@ export class PdTrigerService {
// save Pd form details
savePDFormDetailsWithID(saveData: any): Observable {
+ 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 {
+ saveData.createdby = this._aws.getlocale();
+ console.log('savedate',saveData);
+ return this._http.post(this.apiUrl + apiName, { "records": saveData })
+ .pipe(
+ catchError(this.handleError('operation', []))
+ )
+ }
/* To get TypeofActivity's Product From About Business,