{{ i }}
{{ serviceCenter.title }}
+{{ freeBoard.title }}
010-3004-2001
+{{ freeBoard.contents }}
+- - 1,000,000 -
+{{ freeBoard.createdBy }}
+- - 5000 + {{ freeBoard.createdDate | date: 'yyyy.MM.dd, HH:mm:ss' }}
- 브론즈 + 승인인증
diff --git a/src/app/pages/infos/info/component/free-board.component.scss b/src/app/pages/infos/info/component/free-board-list.component.scss
similarity index 98%
rename from src/app/pages/infos/info/component/free-board.component.scss
rename to src/app/pages/infos/info/component/free-board-list.component.scss
index 69e69f7..6feea0e 100644
--- a/src/app/pages/infos/info/component/free-board.component.scss
+++ b/src/app/pages/infos/info/component/free-board-list.component.scss
@@ -1,6 +1,6 @@
@import 'src/@fuse/scss/fuse';
-app-free-board {
+app-free-board-list {
#service-center {
.top-bg {
@include media-breakpoint('xs') {
diff --git a/src/app/pages/infos/info/component/free-board.component.ts b/src/app/pages/infos/info/component/free-board-list.component.ts
similarity index 73%
rename from src/app/pages/infos/info/component/free-board.component.ts
rename to src/app/pages/infos/info/component/free-board-list.component.ts
index 255aced..967a762 100644
--- a/src/app/pages/infos/info/component/free-board.component.ts
+++ b/src/app/pages/infos/info/component/free-board-list.component.ts
@@ -15,24 +15,25 @@ import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { fuseAnimations } from 'src/@fuse/animations';
+import { FreeBoardDataSource } from './free-board-list.data-source';
+import { FreeBoardService } from 'src/modules/infos/service/free-board.service';
-import { ServiceCenterService } from 'src/modules/infos/service/service-center.service';
-import { ServiceCenterDataSource } from './service-center.data-source';
@Component({
- selector: 'app-free-board',
- templateUrl: './free-board.component.html',
- styleUrls: ['./free-board.component.scss'],
+ selector: 'app-free-board-list',
+ templateUrl: './free-board-list.component.html',
+ styleUrls: ['./free-board-list.component.scss'],
encapsulation: ViewEncapsulation.None,
animations: fuseAnimations
})
-export class FreeBoardComponent implements OnInit, OnDestroy, AfterViewInit {
- dataSource: ServiceCenterDataSource | null;
+export class FreeBoardListComponent
+ implements OnInit, OnDestroy, AfterViewInit {
+ dataSource: FreeBoardDataSource | null;
displayedColumns = [
'idx',
'title',
'contents',
- 'register',
+ 'createdBy',
'createdAt',
'contactStatus'
];
@@ -49,7 +50,7 @@ export class FreeBoardComponent implements OnInit, OnDestroy, AfterViewInit {
constructor(
private fb: FormBuilder,
- private serviceCenterService: ServiceCenterService
+ private freeBoardService: FreeBoardService
) {
// Set the private defaults
this.unsubscribeAll = new Subject();
@@ -64,8 +65,8 @@ export class FreeBoardComponent implements OnInit, OnDestroy, AfterViewInit {
*/
ngOnInit(): void {
// Subscribe to update order on changes
- this.dataSource = new ServiceCenterDataSource(
- this.serviceCenterService,
+ this.dataSource = new FreeBoardDataSource(
+ this.freeBoardService,
this.paginator,
this.sort
);
diff --git a/src/app/pages/infos/info/component/free-board-list.data-source.ts b/src/app/pages/infos/info/component/free-board-list.data-source.ts
new file mode 100644
index 0000000..15fd4a6
--- /dev/null
+++ b/src/app/pages/infos/info/component/free-board-list.data-source.ts
@@ -0,0 +1,73 @@
+import { DataSource } from '@angular/cdk/table';
+
+import { BehaviorSubject, Observable, merge } from 'rxjs';
+import { switchMap, map } from 'rxjs/operators';
+
+import { MatPaginator } from '@angular/material/paginator';
+import { MatSort } from '@angular/material/sort';
+import { CollectionViewer } from '@angular/cdk/collections';
+
+import { FreeBoard } from 'src/modules/infos/model/free-board.model';
+import { FreeBoardService } from 'src/modules/infos/service/free-board.service';
+import { Page } from 'src/modules/common/data/model/page';
+
+export class FreeBoardDataSource extends DataSource