datetime temp commit
This commit is contained in:
+16
-10
@@ -1,19 +1,25 @@
|
||||
<ng-template #popTemplate>
|
||||
<div class="container" >
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<input type="text"
|
||||
<select class="custom-select" title="Choose one of the following..." [(ngModel)]="filterType" [ngModelOptions]="{standalone: true}">
|
||||
<option *ngFor="let filter of filterTypes" [value]="filter.value">{{filter.key}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="row mt-1 mb-1">
|
||||
<input *ngIf="filterType =='GreaterThan' || filterType == 'LessThan'" type="text"
|
||||
placeholder="Datepicker"
|
||||
class="form-control"
|
||||
bsDatepicker [(ngModel)]="filterValue">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<input type="text"
|
||||
placeholder="Daterangepicker"
|
||||
class="form-control"
|
||||
bsDaterangepicker>
|
||||
bsDatepicker [(ngModel)]="filterValue">
|
||||
</div>
|
||||
<div class="row mt-1 mb-1">
|
||||
<input *ngIf="filterType =='Equal'" type="text"
|
||||
placeholder="Daterangepicker"
|
||||
class="form-control"
|
||||
bsDaterangepicker [(ngModel)]="filterValue">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row mt-2">
|
||||
<button class="btn btn-primary mr-1" >Filter</button>
|
||||
<button type="button" class="btn btn-warning" *ngIf="!isFiltering" (click)="pop.hide()">Hide</button>
|
||||
|
||||
+5
-1
@@ -16,6 +16,10 @@ export class DataSourceDatetimeFilterComponent {
|
||||
filterType: string = 'Equal';
|
||||
filterTypes = [
|
||||
{key:'equal', value: 'Equal'},
|
||||
{key:'Greater Than', value: 'GreaterThan'},
|
||||
{key:'Less Than', value: 'LessThan'},
|
||||
{key:'Greater Than Equal', value: 'GreaterThanOrEqual'},
|
||||
{key:'Less Than Equal', value: 'LessThanOrEqual'},
|
||||
];
|
||||
|
||||
|
||||
@@ -31,7 +35,7 @@ export class DataSourceDatetimeFilterComponent {
|
||||
return "Filter by "+ this.path;
|
||||
}
|
||||
|
||||
applyFilter(){debugger;
|
||||
applyFilter(){
|
||||
this.isFiltering = true;
|
||||
const filters = this.dataSource.filters;
|
||||
const existingFilter = filters.find(t => (t as ISimpleFilter).path == this.path) as ISimpleFilter;
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row mt-1 mb-1">
|
||||
<input type="number" class="form-control" placeholder="column value" aria-label="number"
|
||||
<input type="number" class="form-control" placeholder="Value" aria-label="number"
|
||||
aria-describedby="basic-addon1" [(ngModel)]="filterValue" [ngModelOptions]="{standalone: true}">
|
||||
</div>
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row mt-1 mb-1">
|
||||
<input type="text" class="form-control" placeholder="column value" aria-label="Username"
|
||||
<input type="text" class="form-control" placeholder="Value" aria-label="Username"
|
||||
aria-describedby="basic-addon1" [(ngModel)]="filterValue" [ngModelOptions]="{standalone: true}" >
|
||||
</div>
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit, TemplateRef } from '@angular/core';
|
||||
import { Component, OnInit, TemplateRef, OnDestroy } from '@angular/core';
|
||||
import { BsModalRef } from 'ngx-bootstrap/modal';
|
||||
import { IDataSource } from '@poweredsoft/data';
|
||||
import { finalize } from 'rxjs/operators';
|
||||
@@ -10,7 +10,7 @@ import { FormGroup, FormControl } from '@angular/forms';
|
||||
templateUrl: './form-group-command-modal.component.html',
|
||||
styleUrls: ['./form-group-command-modal.component.scss']
|
||||
})
|
||||
export class FormGroupCommandModalComponent implements OnInit {
|
||||
export class FormGroupCommandModalComponent implements OnInit, OnDestroy {
|
||||
|
||||
|
||||
modelForm: FormGroup;
|
||||
|
||||
Reference in New Issue
Block a user