datetime temp commit
This commit is contained in:
parent
5d0cb30a48
commit
66d34d1019
@ -1,4 +1,4 @@
|
|||||||
import { Component, OnInit, ContentChild, ViewChild, Input, Output, EventEmitter, ChangeDetectorRef, forwardRef } from '@angular/core';
|
import { Component, OnInit, ContentChild, ViewChild, Input, Output, EventEmitter, ChangeDetectorRef, forwardRef, OnDestroy } from '@angular/core';
|
||||||
import { SelectLabelTemplateDirective } from '../select-label-template.directive';
|
import { SelectLabelTemplateDirective } from '../select-label-template.directive';
|
||||||
import { IDataSource, ISimpleFilter } from '@poweredsoft/data';
|
import { IDataSource, ISimpleFilter } from '@poweredsoft/data';
|
||||||
import { Observable, Subject, Subscription } from 'rxjs';
|
import { Observable, Subject, Subscription } from 'rxjs';
|
||||||
@ -17,7 +17,7 @@ import { SelectOptionTemplateDirective } from '../select-option-template.directi
|
|||||||
}],
|
}],
|
||||||
styleUrls: ['./multi-select.component.scss']
|
styleUrls: ['./multi-select.component.scss']
|
||||||
})
|
})
|
||||||
export class MultiSelectComponent implements OnInit {
|
export class MultiSelectComponent implements OnInit,OnDestroy {
|
||||||
|
|
||||||
|
|
||||||
@ContentChild(SelectOptionTemplateDirective) optionTemplate: SelectOptionTemplateDirective;
|
@ContentChild(SelectOptionTemplateDirective) optionTemplate: SelectOptionTemplateDirective;
|
||||||
@ -74,9 +74,6 @@ export class MultiSelectComponent implements OnInit {
|
|||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.dataFetching();
|
this.dataFetching();
|
||||||
this.detectLoading();
|
this.detectLoading();
|
||||||
|
|
||||||
console.log(this.serverFiltering);
|
|
||||||
|
|
||||||
if(this.serverFiltering){
|
if(this.serverFiltering){
|
||||||
this.searchOnServer();
|
this.searchOnServer();
|
||||||
}else{
|
}else{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Component, OnInit, ContentChild, ViewChild, Input, Output, EventEmitter, ChangeDetectorRef, forwardRef } from '@angular/core';
|
import { Component, OnInit, ContentChild, ViewChild, Input, Output, EventEmitter, ChangeDetectorRef, forwardRef, OnDestroy } from '@angular/core';
|
||||||
import { SelectLabelTemplateDirective } from '../select-label-template.directive';
|
import { SelectLabelTemplateDirective } from '../select-label-template.directive';
|
||||||
import { IDataSource, ISimpleFilter } from '@poweredsoft/data';
|
import { IDataSource, ISimpleFilter } from '@poweredsoft/data';
|
||||||
import { Observable, Subject, Subscription } from 'rxjs';
|
import { Observable, Subject, Subscription } from 'rxjs';
|
||||||
@ -19,7 +19,7 @@ import { NotFoundTemplateDirective } from '../not-found-template.directive';
|
|||||||
}],
|
}],
|
||||||
styleUrls: ['./ng-select.component.scss']
|
styleUrls: ['./ng-select.component.scss']
|
||||||
})
|
})
|
||||||
export class NgSelectComponent implements OnInit {
|
export class NgSelectComponent implements OnInit,OnDestroy {
|
||||||
|
|
||||||
@ContentChild(SelectOptionTemplateDirective) optionTemplate: SelectOptionTemplateDirective;
|
@ContentChild(SelectOptionTemplateDirective) optionTemplate: SelectOptionTemplateDirective;
|
||||||
@ContentChild(SelectLabelTemplateDirective) labelTemplate: SelectLabelTemplateDirective;
|
@ContentChild(SelectLabelTemplateDirective) labelTemplate: SelectLabelTemplateDirective;
|
||||||
@ -80,8 +80,6 @@ export class NgSelectComponent implements OnInit {
|
|||||||
this.dataFetching();
|
this.dataFetching();
|
||||||
this.detectLoading();
|
this.detectLoading();
|
||||||
|
|
||||||
console.log(this.serverFiltering);
|
|
||||||
|
|
||||||
if(this.serverFiltering){
|
if(this.serverFiltering){
|
||||||
this.searchOnServer();
|
this.searchOnServer();
|
||||||
}else{
|
}else{
|
||||||
|
@ -1,19 +1,25 @@
|
|||||||
<ng-template #popTemplate>
|
<ng-template #popTemplate>
|
||||||
<div class="container" >
|
<div class="container" >
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group">
|
<select class="custom-select" title="Choose one of the following..." [(ngModel)]="filterType" [ngModelOptions]="{standalone: true}">
|
||||||
<input type="text"
|
<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"
|
placeholder="Datepicker"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
bsDatepicker [(ngModel)]="filterValue">
|
bsDatepicker [(ngModel)]="filterValue">
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<input type="text"
|
|
||||||
placeholder="Daterangepicker"
|
|
||||||
class="form-control"
|
|
||||||
bsDaterangepicker>
|
|
||||||
</div>
|
</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">
|
<div class="row mt-2">
|
||||||
<button class="btn btn-primary mr-1" >Filter</button>
|
<button class="btn btn-primary mr-1" >Filter</button>
|
||||||
<button type="button" class="btn btn-warning" *ngIf="!isFiltering" (click)="pop.hide()">Hide</button>
|
<button type="button" class="btn btn-warning" *ngIf="!isFiltering" (click)="pop.hide()">Hide</button>
|
||||||
|
@ -16,6 +16,10 @@ export class DataSourceDatetimeFilterComponent {
|
|||||||
filterType: string = 'Equal';
|
filterType: string = 'Equal';
|
||||||
filterTypes = [
|
filterTypes = [
|
||||||
{key:'equal', value: 'Equal'},
|
{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;
|
return "Filter by "+ this.path;
|
||||||
}
|
}
|
||||||
|
|
||||||
applyFilter(){debugger;
|
applyFilter(){
|
||||||
this.isFiltering = true;
|
this.isFiltering = true;
|
||||||
const filters = this.dataSource.filters;
|
const filters = this.dataSource.filters;
|
||||||
const existingFilter = filters.find(t => (t as ISimpleFilter).path == this.path) as ISimpleFilter;
|
const existingFilter = filters.find(t => (t as ISimpleFilter).path == this.path) as ISimpleFilter;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mt-1 mb-1">
|
<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}">
|
aria-describedby="basic-addon1" [(ngModel)]="filterValue" [ngModelOptions]="{standalone: true}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mt-1 mb-1">
|
<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}" >
|
aria-describedby="basic-addon1" [(ngModel)]="filterValue" [ngModelOptions]="{standalone: true}" >
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -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 { BsModalRef } from 'ngx-bootstrap/modal';
|
||||||
import { IDataSource } from '@poweredsoft/data';
|
import { IDataSource } from '@poweredsoft/data';
|
||||||
import { finalize } from 'rxjs/operators';
|
import { finalize } from 'rxjs/operators';
|
||||||
@ -10,7 +10,7 @@ import { FormGroup, FormControl } from '@angular/forms';
|
|||||||
templateUrl: './form-group-command-modal.component.html',
|
templateUrl: './form-group-command-modal.component.html',
|
||||||
styleUrls: ['./form-group-command-modal.component.scss']
|
styleUrls: ['./form-group-command-modal.component.scss']
|
||||||
})
|
})
|
||||||
export class FormGroupCommandModalComponent implements OnInit {
|
export class FormGroupCommandModalComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
|
|
||||||
modelForm: FormGroup;
|
modelForm: FormGroup;
|
||||||
|
@ -1,23 +1,28 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||||
import { IDataSource } from '@poweredsoft/data';
|
import { IDataSource } from '@poweredsoft/data';
|
||||||
import { IMerchant } from 'src/app/data/services/IMerchant';
|
import { IMerchant } from 'src/app/data/services/IMerchant';
|
||||||
import { MerchantService } from 'src/app/data/services/merchant.service';
|
import { MerchantService } from 'src/app/data/services/merchant.service';
|
||||||
import { BsModalRef } from 'ngx-bootstrap/modal';
|
import { BsModalRef } from 'ngx-bootstrap/modal';
|
||||||
|
import { Subscription } from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ps-command-modal-demo',
|
selector: 'ps-command-modal-demo',
|
||||||
templateUrl: './command-modal-demo.component.html',
|
templateUrl: './command-modal-demo.component.html',
|
||||||
styleUrls: ['./command-modal-demo.component.scss']
|
styleUrls: ['./command-modal-demo.component.scss']
|
||||||
})
|
})
|
||||||
export class CommandModalDemoComponent implements OnInit {
|
export class CommandModalDemoComponent implements OnInit,OnDestroy {
|
||||||
|
|
||||||
columns = ['id','name', 'address', 'commands'];
|
columns = ['id','name', 'address', 'commands'];
|
||||||
pages:any;
|
pages:any;
|
||||||
merchantDataSource: IDataSource<IMerchant>;
|
merchantDataSource: IDataSource<IMerchant>;
|
||||||
|
private _dataSubscription: Subscription;
|
||||||
constructor(private merchantService: MerchantService){
|
constructor(private merchantService: MerchantService){
|
||||||
this.merchantDataSource = this.createDataSource();
|
this.merchantDataSource = this.createDataSource();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
this._dataSubscription.unsubscribe();
|
||||||
|
}
|
||||||
|
|
||||||
newMerchant(name: string) {
|
newMerchant(name: string) {
|
||||||
this.merchantDataSource.executeCommandByName('addMerchant', {
|
this.merchantDataSource.executeCommandByName('addMerchant', {
|
||||||
|
@ -1,22 +1,27 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||||
import { DataSource, IDataSource, IQueryExecutionResult, IQueryExecutionGroupResult } from '@poweredsoft/data';
|
import { DataSource, IDataSource, IQueryExecutionResult, IQueryExecutionGroupResult } from '@poweredsoft/data';
|
||||||
import { IMerchant } from 'src/app/data/services/IMerchant';
|
import { IMerchant } from 'src/app/data/services/IMerchant';
|
||||||
import { MerchantService } from 'src/app/data/services/merchant.service';
|
import { MerchantService } from 'src/app/data/services/merchant.service';
|
||||||
|
import { Subscription } from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ps-data-grid-demo-home',
|
selector: 'ps-data-grid-demo-home',
|
||||||
templateUrl: './data-grid-demo-home.component.html',
|
templateUrl: './data-grid-demo-home.component.html',
|
||||||
styleUrls: ['./data-grid-demo-home.component.scss']
|
styleUrls: ['./data-grid-demo-home.component.scss']
|
||||||
})
|
})
|
||||||
export class DataGridDemoHomeComponent implements OnInit {
|
export class DataGridDemoHomeComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
title = 'cdkDemo';
|
title = 'cdkDemo';
|
||||||
columns = ['id','name', 'address', 'commands']
|
columns = ['id','name', 'address', 'commands']
|
||||||
merchantDataSource: IDataSource<IMerchant>;
|
merchantDataSource: IDataSource<IMerchant>;
|
||||||
|
private _dataSubscription: Subscription;
|
||||||
constructor(private merchantService: MerchantService){
|
constructor(private merchantService: MerchantService){
|
||||||
this.merchantDataSource = this.createDataSource();
|
this.merchantDataSource = this.createDataSource();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
this._dataSubscription.unsubscribe();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||||
import { IDataSource } from '@poweredsoft/data';
|
import { IDataSource } from '@poweredsoft/data';
|
||||||
import { IMerchant } from 'src/app/data/services/IMerchant';
|
import { IMerchant } from 'src/app/data/services/IMerchant';
|
||||||
import { MerchantService } from 'src/app/data/services/merchant.service';
|
import { MerchantService } from 'src/app/data/services/merchant.service';
|
||||||
import { FormGroup, FormControl, FormBuilder, Validators } from '@angular/forms';
|
import { FormGroup, FormControl, FormBuilder, Validators } from '@angular/forms';
|
||||||
import { IModelFormCreateEvent } from 'projects/poweredsoft/ngx-bootstrap/src/public-api';
|
import { IModelFormCreateEvent } from 'projects/poweredsoft/ngx-bootstrap/src/public-api';
|
||||||
|
import { Subscription } from 'rxjs';
|
||||||
|
import { THIS_EXPR } from '@angular/compiler/src/output/output_ast';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ps-form-group-modal-demo',
|
selector: 'ps-form-group-modal-demo',
|
||||||
templateUrl: './form-group-modal-demo.component.html',
|
templateUrl: './form-group-modal-demo.component.html',
|
||||||
styleUrls: ['./form-group-modal-demo.component.scss']
|
styleUrls: ['./form-group-modal-demo.component.scss']
|
||||||
})
|
})
|
||||||
export class FormGroupModalDemoComponent implements OnInit {
|
export class FormGroupModalDemoComponent implements OnInit,OnDestroy {
|
||||||
|
|
||||||
createDataSource(): IDataSource<IMerchant> {
|
createDataSource(): IDataSource<IMerchant> {
|
||||||
return this.merchantService.createDataSource();
|
return this.merchantService.createDataSource();
|
||||||
@ -18,10 +20,14 @@ export class FormGroupModalDemoComponent implements OnInit {
|
|||||||
|
|
||||||
pages:any;
|
pages:any;
|
||||||
merchantDataSource: IDataSource<IMerchant>;
|
merchantDataSource: IDataSource<IMerchant>;
|
||||||
|
private _dataSubscription: Subscription;
|
||||||
columns = ['id','name', 'address', 'actions'];
|
columns = ['id','name', 'address', 'actions'];
|
||||||
constructor(private merchantService: MerchantService, private fb: FormBuilder) {
|
constructor(private merchantService: MerchantService, private fb: FormBuilder) {
|
||||||
this.merchantDataSource = this.createDataSource();
|
this.merchantDataSource = this.createDataSource();
|
||||||
}
|
}
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
this._dataSubscription.unsubscribe();
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.merchantDataSource.refresh();
|
this.merchantDataSource.refresh();
|
||||||
|
@ -15,7 +15,6 @@ export class GridFilterDemoComponent implements OnInit {
|
|||||||
merchantDataSource: IDataSource<IMerchant>;
|
merchantDataSource: IDataSource<IMerchant>;
|
||||||
constructor(private merchantService: MerchantService){
|
constructor(private merchantService: MerchantService){
|
||||||
this.merchantDataSource = this.createDataSource();
|
this.merchantDataSource = this.createDataSource();
|
||||||
console.log(this.merchantDataSource);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pages:any;
|
pages:any;
|
||||||
|
@ -1,22 +1,27 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||||
import { IDataSource } from '@poweredsoft/data';
|
import { IDataSource } from '@poweredsoft/data';
|
||||||
import { IMerchant } from 'src/app/data/services/IMerchant';
|
import { IMerchant } from 'src/app/data/services/IMerchant';
|
||||||
import { MerchantService } from 'src/app/data/services/merchant.service';
|
import { MerchantService } from 'src/app/data/services/merchant.service';
|
||||||
import { FormBuilder, Validators } from '@angular/forms';
|
import { FormBuilder, Validators } from '@angular/forms';
|
||||||
import { ConfirmModalService } from '@poweredsoft/ngx-bootstrap';
|
import { ConfirmModalService } from '@poweredsoft/ngx-bootstrap';
|
||||||
|
import { Subscription } from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ps-pagination',
|
selector: 'ps-pagination',
|
||||||
templateUrl: './pagination-demo.component.html',
|
templateUrl: './pagination-demo.component.html',
|
||||||
styleUrls: ['./pagination-demo.component.scss']
|
styleUrls: ['./pagination-demo.component.scss']
|
||||||
})
|
})
|
||||||
export class PaginationDemoComponent implements OnInit {
|
export class PaginationDemoComponent implements OnInit, OnDestroy {
|
||||||
columns = ['id','name', 'address','commands']
|
columns = ['id','name', 'address','commands']
|
||||||
merchantDataSource: IDataSource<IMerchant>;
|
merchantDataSource: IDataSource<IMerchant>;
|
||||||
|
private _dataSubscription: Subscription;
|
||||||
constructor(private merchantService: MerchantService, private confirmModalService: ConfirmModalService){
|
constructor(private merchantService: MerchantService, private confirmModalService: ConfirmModalService){
|
||||||
this.merchantDataSource = this.createDataSource();
|
this.merchantDataSource = this.createDataSource();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
this._dataSubscription.unsubscribe();
|
||||||
|
}
|
||||||
|
|
||||||
pages:any;
|
pages:any;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user