add date type from filter

This commit is contained in:
gayathri1990 2021-05-20 09:17:10 +05:30
parent 0f931e79d9
commit deb7beaa94
7 changed files with 34 additions and 7 deletions

Binary file not shown.

View File

@ -32,6 +32,12 @@
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
<mat-datepicker #picker1></mat-datepicker>
</mat-form-field>
<mat-form-field style="width:20%" class="matfieldblock">
<mat-select formControlName="date_type" [(ngModel)]="modeselect" placeholder="Date Type">
<mat-option value="1">PD Trigger Date</mat-option>
<mat-option value="2">PD Completed Date</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:30%" class="matfieldblock">
<mat-select multiple formControlName="pd_products" placeholder="Products">
<mat-option *ngFor="let pro of PRODUCTS" [value]="pro.product_id">{{pro.name}}</mat-option>

View File

@ -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 } from '@angular/forms';
import { FormGroup, FormBuilder ,FormsModule} from '@angular/forms';
import { DatePipe } from '@angular/common';
import { NotifierService } from 'angular-notifier';
import { AwsService } from 'app/AwsService/aws.service';
@ -30,6 +30,7 @@ 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'];
@ -43,7 +44,7 @@ export class AllPdComponent implements OnInit, OnChanges {
// data source variable details
PdListData:any[] = [];
// pagination variable details
length = 0;
pageIndex = 0;
@ -58,6 +59,7 @@ export class AllPdComponent implements OnInit, OnChanges {
startIndex: number;
endIndex: any;
filtered_raw_data: any[];
constructor(private _pd: PdTrigerService,private _fb:FormBuilder,notifier: NotifierService,private userService:UserService,
private _aws:AwsService,private loaderService:LoaderService) {
this.LenderRoleID = localStorage.getItem('LenderRoleID');
@ -69,6 +71,7 @@ export class AllPdComponent implements OnInit, OnChanges {
pd_status:[null],
pd_from_date:[null],
pd_to_date:[null],
date_type:[null],
pd_city:[null],
pd_products:[null],
pd_lender:[null],
@ -95,6 +98,7 @@ export class AllPdComponent implements OnInit, OnChanges {
}
ngOnInit() {
this.userService.getroles().subscribe(res=>{
let len_id=res['records'][0].fk_entity_id
this.searchForm.controls['pd_lender'].setValue(len_id)
@ -287,7 +291,8 @@ console.log(this.displayedColumns)
searchItem()
{
if(this.searchForm.value.pd_type !=null)
{

View File

@ -34,6 +34,12 @@
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
<mat-datepicker #picker1></mat-datepicker>
</mat-form-field>
<mat-form-field style="width:30%" class="matfieldblock">
<mat-select formControlName="date_type" [(ngModel)]="modeselect" placeholder="Date Type">
<mat-option value="1">PD Trigger Date</mat-option>
<mat-option value="2">PD Completed Date</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:30%">
<mat-select multiple formControlName="pd_products" placeholder="Products">
<mat-option *ngFor="let pro of PRODUCTS" [value]="pro.product_id">{{pro.name}}</mat-option>

View File

@ -10,7 +10,7 @@ import { LoaderService } from 'app/shared/loaderService/loader.service';
import { ReplaySubject } from 'rxjs';
@Component({
selector: 'app-completed-pd',
selector: 'app-completed-pd',
templateUrl: './completed-pd.component.html',
styleUrls: ['./completed-pd.component.scss'],
encapsulation: ViewEncapsulation.None
@ -29,6 +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();
@ -68,6 +69,7 @@ export class CompletedPdComponent implements OnInit, OnChanges {
pd_status:['COMPLETED'],
pd_from_date:[null],
pd_to_date:[null],
date_type:[null],
pd_city:[null],
pd_products:[null],
pd_lender:[null],

View File

@ -9,7 +9,7 @@
<span>Advance Filter</span>
</mat-toolbar-row>
</mat-panel-title>
</mat-expansion-panel-header>
<mat-list class="m-gap p-gap">
<div [formGroup]="searchForm">
@ -33,6 +33,12 @@
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
<mat-datepicker #picker1></mat-datepicker>
</mat-form-field>
<mat-form-field style="width:30%" class="matfieldblock">
<mat-select formControlName="date_type" [(ngModel)]="modeselect" placeholder="Date Type">
<mat-option value="1">PD Trigger Date</mat-option>
<mat-option value="2">PD Completed Date</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:30%">
<mat-select multiple formControlName="pd_products" placeholder="Products">
<mat-option *ngFor="let pro of PRODUCTS" [value]="pro.product_id">{{pro.name}}</mat-option>

View File

@ -13,7 +13,7 @@ import { ReplaySubject } from 'rxjs';
selector: 'app-inprogress-pd',
templateUrl: './inprogress-pd.component.html',
styleUrls: ['./inprogress-pd.component.scss'],
encapsulation: ViewEncapsulation.None
encapsulation: ViewEncapsulation.None
})
export class InprogressPdComponent implements OnInit, OnChanges {
xpandStatus: boolean = false;
@ -25,6 +25,7 @@ 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;
@ -66,6 +67,7 @@ export class InprogressPdComponent implements OnInit, OnChanges {
pd_status:['INPROGRESS'],
pd_from_date:[null],
pd_to_date:[null],
date_type:[null],
pd_city:[null],
pd_products:[null],
pd_lender:[null],
@ -243,7 +245,7 @@ public LenderRoleID : string = localStorage.getItem('LenderRoleID');
}
searchItem()
{
console.log(this.searchForm.value);
if(this.searchForm.value.pd_type !=null)
{