advance filter change

This commit is contained in:
gayathri1990 2021-01-05 21:15:37 +05:30
parent d60bd75186
commit b4776e85ee
2 changed files with 11 additions and 8 deletions

View File

@ -20,17 +20,17 @@
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:20%" touchUi>
<mat-form-field style="width:20%" >
<input matInput [matDatepicker]="picker" [max]="todaydate"
formControlName="pd_from_date" placeholder="Choose a From date" >
<mat-datepicker-toggle matSuffix [for]="picker" ></mat-datepicker-toggle>
<mat-datepicker #picker></mat-datepicker>
<mat-datepicker touchUi=true #picker ></mat-datepicker>
</mat-form-field>
<mat-form-field style="width:20%" touchUi>
<mat-form-field style="width:20%" >
<input matInput [matDatepicker]="picker1" [min]="searchForm.get('pd_from_date').value" [max]="todaydate"
formControlName="pd_to_date" placeholder="Choose a To date" >
<mat-datepicker-toggle matSuffix [for]="picker1" ></mat-datepicker-toggle>
<mat-datepicker #picker1></mat-datepicker>
<mat-datepicker touchUi=true #picker1 ></mat-datepicker>
</mat-form-field>
<mat-form-field style="width:20%">
<mat-select multiple formControlName="pd_products" placeholder="Products">

View File

@ -31,6 +31,7 @@ export class AdvanceFilterComponent implements OnInit {
let entity_id=localStorage.getItem('LocalSetEntity');
this.searchForm=this._fb.group({
pd_status:[''],
pd_typefilter:[''],
pd_from_date:[''],
pd_to_date:[''],
pd_products:[''],
@ -99,7 +100,9 @@ export class AdvanceFilterComponent implements OnInit {
searchItem(){
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.stringifythis.searchForm.value);
// console.log(this.searchForm.value);
//console.log('testing');
this.xpandStatus=true;
this.salesPDService.advancedFilter(this.searchForm.value).subscribe(res=>{
if(res.dataStatus){