72 lines
1.6 KiB
TypeScript
72 lines
1.6 KiB
TypeScript
import {
|
|
Component,
|
|
ElementRef,
|
|
OnDestroy,
|
|
OnInit,
|
|
ViewChild,
|
|
ViewEncapsulation,
|
|
AfterViewInit
|
|
} from '@angular/core';
|
|
import { MatPaginator } from '@angular/material/paginator';
|
|
import { MatSort } from '@angular/material/sort';
|
|
|
|
import { fromEvent, Subject } from 'rxjs';
|
|
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
|
|
|
import { fuseAnimations } from 'src/@fuse/animations';
|
|
|
|
@Component({
|
|
selector: 'app-point-log-list',
|
|
templateUrl: './point-log.component.html',
|
|
styleUrls: ['./point-log.component.scss'],
|
|
animations: fuseAnimations,
|
|
encapsulation: ViewEncapsulation.None
|
|
})
|
|
export class PointLogComponent implements OnInit, OnDestroy, AfterViewInit {
|
|
displayedColumns = [
|
|
'idx',
|
|
'title',
|
|
'contents',
|
|
'register',
|
|
'createdAt',
|
|
'contactStatus'
|
|
];
|
|
|
|
@ViewChild(MatPaginator, { static: true })
|
|
paginator: MatPaginator;
|
|
|
|
@ViewChild('filter', { static: true })
|
|
filter: ElementRef;
|
|
|
|
@ViewChild(MatSort, { static: true })
|
|
sort: MatSort;
|
|
|
|
// Private
|
|
private _unsubscribeAll: Subject<any>;
|
|
|
|
constructor() {
|
|
// Set the private defaults
|
|
this._unsubscribeAll = new Subject();
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------------------------------
|
|
// @ Lifecycle hooks
|
|
// -----------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
* On init
|
|
*/
|
|
ngOnInit() {}
|
|
|
|
/**
|
|
* On destroy
|
|
*/
|
|
ngOnDestroy(): void {
|
|
// Unsubscribe from all subscriptions
|
|
this._unsubscribeAll.next();
|
|
this._unsubscribeAll.complete();
|
|
}
|
|
|
|
ngAfterViewInit(): void {}
|
|
}
|