diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html index 32b2c4a..3a4d625 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html @@ -17,7 +17,7 @@ {{type.type_name}}     --> - + {{status.pd_status_name}} @@ -31,9 +31,9 @@ - +     - + PD Trigger Date PD Completed Date diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.ts index 7d2d708..e142a4d 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.ts @@ -1,7 +1,7 @@ import { Component,ViewChild, OnInit, ViewEncapsulation, Input, Output, EventEmitter, OnDestroy, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core'; import { PdTrigerService } from './../../../pd-service/pd-triger.service'; import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material'; -import { FormGroup, FormBuilder ,FormsModule} from '@angular/forms'; +import { FormGroup, FormBuilder} from '@angular/forms'; import { DatePipe } from '@angular/common'; import { NotifierService } from 'angular-notifier'; import { AwsService } from 'app/AwsService/aws.service'; @@ -30,7 +30,6 @@ export class AllPdComponent implements OnInit, OnChanges { recordStatus: boolean; errorMessage:any[]=[]; tabStatus:string="ALL"; - public modeselect = '1'; public dataLengthTab1: number; public dataSourceTab1 = new MatTableDataSource(); displayedColumns = ['PDType','Name','Lenderid','Address','Status','Action']; @@ -71,7 +70,7 @@ export class AllPdComponent implements OnInit, OnChanges { pd_status:[null], pd_from_date:[null], pd_to_date:[null], - date_type:[null], + date_type:['1'], pd_city:[null], pd_products:[null], pd_lender:[null], @@ -291,7 +290,7 @@ console.log(this.displayedColumns) searchItem() { - + if(this.searchForm.value.pd_type !=null) { @@ -312,6 +311,10 @@ console.log(this.displayedColumns) this.searchForm.value.pd_from_date = this.pipe.transform(this.searchForm.value.pd_from_date,'yyyy-MM-dd'); this.searchForm.value.pd_to_date = this.pipe.transform(this.searchForm.value.pd_to_date,'yyyy-MM-dd'); // console.log(JSON.stringify(this.searchForm.value)); + let dt =this.searchForm.value.date_type; + let ldt: number = +dt; + this.searchForm.value.date_type=ldt; + console.log(this.searchForm.value); this._pd.overAllSearchFormDetails(this.searchForm.value).subscribe(res=> { this.xpandStatus = false; @@ -351,6 +354,8 @@ console.log(this.displayedColumns) onReset(){ this.searchForm.reset(); + + this.searchForm.controls['date_type'].setValue('1'); this.loadPDDetails(); this.xpandStatus = false; } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html index 4c3f68e..f623676 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html @@ -33,9 +33,9 @@ - +     - + PD Trigger Date PD Completed Date diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.ts index 39cbac4..8b8f510 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.ts @@ -29,7 +29,7 @@ export class CompletedPdComponent implements OnInit, OnChanges { private notifier: NotifierService; recordStatus: boolean; errorMessage:any[]=[]; - public modeselect = '1'; + tabStatus:string="COMPLETED"; public dataLengthTab4: number; public dataSourceTab4 = new MatTableDataSource(); @@ -69,7 +69,7 @@ export class CompletedPdComponent implements OnInit, OnChanges { pd_status:['COMPLETED'], pd_from_date:[null], pd_to_date:[null], - date_type:[null], + date_type:['1'], pd_city:[null], pd_products:[null], pd_lender:[null], @@ -274,7 +274,10 @@ public LenderRoleID : any = localStorage.getItem('LenderRoleID'); this.searchForm.value.pd_from_date = this.pipe.transform(this.searchForm.value.pd_from_date,'yyyy-MM-dd'); this.searchForm.value.pd_to_date = this.pipe.transform(this.searchForm.value.pd_to_date,'yyyy-MM-dd'); - + let dt =this.searchForm.value.date_type; + let ldt: number = +dt; + this.searchForm.value.date_type=ldt; + console.log(this.searchForm.value); this._pd.overAllSearchFormDetails(this.searchForm.value).subscribe(res=> { this.xpandStatus = false; @@ -338,6 +341,7 @@ public LenderRoleID : any = localStorage.getItem('LenderRoleID'); } onReset(){ this.searchForm.reset(); + this.searchForm.controls['date_type'].setValue('1'); this.loadPDDetails(); this.xpandStatus = false; } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html index 642d144..a1ef558 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html @@ -32,9 +32,9 @@ - +     - + PD Trigger Date PD Completed Date diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.ts index eb55f42..bd61d3d 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.ts @@ -25,7 +25,6 @@ export class InprogressPdComponent implements OnInit, OnChanges { recordStatus: boolean; errorMessage:any[]=[]; tabStatus:string="INPROGRESS"; - public modeselect = '1'; pipe = new DatePipe('en-US'); todaydate:Date = new Date(); private notifier: NotifierService; @@ -67,7 +66,7 @@ export class InprogressPdComponent implements OnInit, OnChanges { pd_status:['INPROGRESS'], pd_from_date:[null], pd_to_date:[null], - date_type:[null], + date_type:['1'], pd_city:[null], pd_products:[null], pd_lender:[null], @@ -245,7 +244,7 @@ public LenderRoleID : string = localStorage.getItem('LenderRoleID'); } searchItem() { -console.log(this.searchForm.value); + if(this.searchForm.value.pd_type !=null) { @@ -264,7 +263,10 @@ console.log(this.searchForm.value); this.searchForm.value.pd_from_date = this.pipe.transform(this.searchForm.value.pd_from_date,'yyyy-MM-dd'); this.searchForm.value.pd_to_date = this.pipe.transform(this.searchForm.value.pd_to_date,'yyyy-MM-dd'); - + let dt =this.searchForm.value.date_type; + let ldt: number = +dt; + this.searchForm.value.date_type=ldt; + console.log(this.searchForm.value); this._pd.overAllSearchFormDetails(this.searchForm.value).subscribe(res=> { this.xpandStatus = false; @@ -328,6 +330,7 @@ console.log(this.searchForm.value); onReset(){ this.searchForm.reset(); + this.searchForm.controls['date_type'].setValue('1'); this.loadPDDetails(); this.xpandStatus = false; }