diff --git a/src/app/layout/components/toolbar/toolbar.component.html b/src/app/layout/components/toolbar/toolbar.component.html
index 89b58dc..ac51b27 100644
--- a/src/app/layout/components/toolbar/toolbar.component.html
+++ b/src/app/layout/components/toolbar/toolbar.component.html
@@ -1,3 +1,4 @@
+
diff --git a/src/app/navigation/navigation.ts b/src/app/navigation/navigation.ts
index 05e61a7..bcba70c 100644
--- a/src/app/navigation/navigation.ts
+++ b/src/app/navigation/navigation.ts
@@ -378,41 +378,41 @@ export const navigation: FuseNavigation[] = [
url: '/pages/specials/management/check-notice'
}
]
- },
- {
- id: 'support_management',
- title: '받치기 관리',
- translate: 'NAV.SUPPORT.TITLE',
- type: 'collapsable',
- children: [
- {
- id: 'sample',
- title: 'Sample',
- translate: 'NAV.SAMPLE.TITLE',
- type: 'item',
- icon: 'email',
- url: '/sample',
- badge: {
- title: '25',
- translate: 'NAV.SAMPLE.BADGE',
- bg: '#F44336',
- fg: '#FFFFFF'
- }
- },
- {
- id: 'sample',
- title: 'Sample',
- translate: 'NAV.SAMPLE.TITLE',
- type: 'item',
- icon: 'email',
- url: '/sample',
- badge: {
- title: '25',
- translate: 'NAV.SAMPLE.BADGE',
- bg: '#F44336',
- fg: '#FFFFFF'
- }
- }
- ]
}
+ // {
+ // id: 'support_management',
+ // title: '받치기 관리',
+ // translate: 'NAV.SUPPORT.TITLE',
+ // type: 'collapsable',
+ // children: [
+ // {
+ // id: 'sample',
+ // title: 'Sample',
+ // translate: 'NAV.SAMPLE.TITLE',
+ // type: 'item',
+ // icon: 'email',
+ // url: '/sample',
+ // badge: {
+ // title: '25',
+ // translate: 'NAV.SAMPLE.BADGE',
+ // bg: '#F44336',
+ // fg: '#FFFFFF'
+ // }
+ // },
+ // {
+ // id: 'sample',
+ // title: 'Sample',
+ // translate: 'NAV.SAMPLE.TITLE',
+ // type: 'item',
+ // icon: 'email',
+ // url: '/sample',
+ // badge: {
+ // title: '25',
+ // translate: 'NAV.SAMPLE.BADGE',
+ // bg: '#F44336',
+ // fg: '#FFFFFF'
+ // }
+ // }
+ // ]
+ // }
];
diff --git a/src/app/pages/infos/info/component/index.ts b/src/app/pages/infos/info/component/index.ts
index 7dff52a..797d723 100644
--- a/src/app/pages/infos/info/component/index.ts
+++ b/src/app/pages/infos/info/component/index.ts
@@ -6,6 +6,7 @@ import { PopupSetComponent } from './popup-set.component';
import { EventRegistComponent } from './event-regist.component';
import { NoticeBoardComponent } from './notice-board.component';
import { FreeBoardRegistComponent } from './free-board-regist.component';
+import { PopupSetDetailComponent } from './popup-set-detail.component';
export const COMPONENTS = [
ServiceCenterComponent,
@@ -15,5 +16,6 @@ export const COMPONENTS = [
PopupSetComponent,
EventRegistComponent,
NoticeBoardComponent,
- FreeBoardRegistComponent
+ FreeBoardRegistComponent,
+ PopupSetDetailComponent
];
diff --git a/src/app/pages/infos/info/component/popup-set.component.html b/src/app/pages/infos/info/component/popup-set.component.html
index 22949f8..ab1bf0f 100644
--- a/src/app/pages/infos/info/component/popup-set.component.html
+++ b/src/app/pages/infos/info/component/popup-set.component.html
@@ -46,109 +46,200 @@
-
+
+
+ 번호
+
+ {{ i + 1 }}
+
+
+
+
+
+ 썸네일
+
+ {{ popup.thumbNail }}
+
+
+
+
+
+ 제목
+
+
+ {{ popup.title }}
+
+
+
+
+
+
+ 이미지 넒이
+
+
+ {{ popup.imageWidth }}
+
+
+ px
+
+
+
+
+ 이미지 높이
+
+
+ {{ popup.imageHeight }}
+
+
+ px
+
+
+
+
+ 이미지 X
+
+
+ {{ popup.imageX }}
+
+
+
+
+
+
+ 이미지 Y
+
+
+ {{ popup.imageY }}
+
+
+
+
+
+
+ 상태
+
+
+ {{ popup.openStatus }}
+
+
+
+
+
+
+ 수정
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
;
- constructor(private fb: FormBuilder) {
+ constructor(
+ private fb: FormBuilder,
+ private popupSetService: PopupSetService
+ ) {
// Set the private defaults
this.unsubscribeAll = new Subject();
}
@@ -60,6 +70,9 @@ export class PopupSetComponent implements OnInit, OnDestroy {
*/
ngOnInit(): void {
// Subscribe to update order on changes
+ this.mtformarray = this.fb.array([]);
+ this.mtformgroup = this.fb.group({ formarray: this.mtformarray });
+ this.dataSource.formg = this.mtformgroup;
}
/**
diff --git a/src/app/pages/infos/info/component/popup-set.data-source.ts b/src/app/pages/infos/info/component/popup-set.data-source.ts
new file mode 100644
index 0000000..80caf41
--- /dev/null
+++ b/src/app/pages/infos/info/component/popup-set.data-source.ts
@@ -0,0 +1,119 @@
+import { DataSource } from '@angular/cdk/table';
+
+import { BehaviorSubject, Observable, merge, of } from 'rxjs';
+import { map } from 'rxjs/operators';
+
+import { CollectionViewer } from '@angular/cdk/collections';
+
+import { PopupSet } from 'src/modules/infos/popup-set/model/popup-set.model';
+import { PopupSetService } from 'src/modules/infos/popup-set/service/popup-set.service';
+
+import { FormControl, FormGroup, Validators, FormArray } from '@angular/forms';
+
+const ELEMENT_DATA: PopupSet[] = [
+ {
+ id: 1,
+ thumbNail: '/images/thumbname/1.jpg',
+ title: '오픈기념 이벤트',
+ imageWidth: 200,
+ imageHeight: 200,
+ imageX: 100,
+ imageY: 100,
+ openStatus: true,
+ updatedAt: null,
+ createdAt: null
+ },
+ {
+ id: 2,
+ thumbNail: '/images/thumbname/2.jpg',
+ title: '첫충전 이벤트',
+ imageWidth: 200,
+ imageHeight: 200,
+ imageX: 100,
+ imageY: 100,
+ openStatus: true,
+ updatedAt: null,
+ createdAt: null
+ },
+ {
+ id: 3,
+ thumbNail: '/images/thumbname/3.jpg',
+ title: '친구초대 이벤트',
+ imageWidth: 200,
+ imageHeight: 200,
+ imageX: 100,
+ imageY: 100,
+ openStatus: true,
+ updatedAt: null,
+ createdAt: null
+ }
+];
+
+export class PopupSetDataSource extends DataSource {
+ private _objectStore: PopupSet[] = [];
+ private _ObjectsSubject$ = new BehaviorSubject([]);
+ private _loadingSubject$ = new BehaviorSubject(false);
+
+ public loading$ = this._loadingSubject$.asObservable();
+ public formg: FormGroup;
+
+ constructor(private fixBonusService: PopupSetService) {
+ super();
+ }
+
+ connect(collectionViewer: CollectionViewer): Observable {
+ // return this.fixBonusService.getAll().pipe(
+ // map(res => {
+ // res.forEach(m => this._objectStore.push(m as FixBonus));
+ // this._ObjectsSubject$.next(this._objectStore);
+ // let fa = this.formg.get('formarray');
+ // res.forEach(r => fa.push(this.createRowFormGroup(r)));
+ // return res;
+ // })
+ // );
+ return of(ELEMENT_DATA).pipe(
+ map(res => {
+ res.forEach(m => this._objectStore.push(m as PopupSet));
+ this._ObjectsSubject$.next(this._objectStore);
+ let fa = this.formg.get('formarray');
+ res.forEach(r => fa.push(this.createRowFormGroup(r)));
+ return res;
+ })
+ );
+ }
+
+ // id: 3,
+ // thumbNail: '/images/thumbname/3.jpg',
+ // title: '친구초대 이벤트',
+ // imageWidth: 200,
+ // imageHeight: 200,
+ // imageX: 100,
+ // imageY: 100,
+ // openStatus: true,
+ // updatedAt: null,
+ // createdAt: null
+ createRowFormGroup(r: PopupSet): FormGroup {
+ let f = new FormGroup({
+ title: this.createNewFormContorl(r, 'title'),
+ imageWidth: this.createNewFormContorl(r, 'imageWidth'),
+ imageHeight: this.createNewFormContorl(r, 'imageHeight'),
+ imageX: this.createNewFormContorl(r, 'imageX'),
+ imageY: this.createNewFormContorl(r, 'imageY'),
+ openStatus: this.createNewFormContorl(r, 'openStatus')
+ });
+ return f;
+ }
+
+ createNewFormContorl(r: PopupSet, propName: string): FormControl {
+ let m = new FormControl(r[propName], Validators.required);
+ m.valueChanges.subscribe(val => {
+ r[propName] = val;
+ });
+ return m;
+ }
+
+ disconnect(collectionViewer: CollectionViewer): void {
+ this._ObjectsSubject$.complete();
+ this._loadingSubject$.complete();
+ }
+}
diff --git a/src/app/pages/infos/info/info-routing.module.ts b/src/app/pages/infos/info/info-routing.module.ts
index 49b26fb..83ac31b 100644
--- a/src/app/pages/infos/info/info-routing.module.ts
+++ b/src/app/pages/infos/info/info-routing.module.ts
@@ -8,6 +8,8 @@ import { PopupSetComponent } from './component/popup-set.component';
import { EventRegistComponent } from './component/event-regist.component';
import { NoticeBoardComponent } from './component/notice-board.component';
import { FreeBoardRegistComponent } from './component/free-board-regist.component';
+import { PopupSetDetailComponent } from './component/popup-set-detail.component';
+import { PopupSetDetailResolver } from './resolver/popup-set-detail.resolver';
const routes: Routes = [
{
@@ -30,6 +32,13 @@ const routes: Routes = [
path: 'popup-set',
component: PopupSetComponent
},
+ {
+ path: 'popup-set/:id',
+ component: PopupSetDetailComponent,
+ resolve: {
+ popupSet: PopupSetDetailResolver
+ }
+ },
{
path: 'event-regist',
component: EventRegistComponent
diff --git a/src/app/pages/infos/info/info.module.ts b/src/app/pages/infos/info/info.module.ts
index 1030558..1b8306a 100644
--- a/src/app/pages/infos/info/info.module.ts
+++ b/src/app/pages/infos/info/info.module.ts
@@ -19,6 +19,7 @@ import { FuseWidgetModule } from 'src/@fuse/components/widget/widget.module';
import { InfoRoutingModule } from './info-routing.module';
import { COMPONENTS } from './component';
+import { RESOLVERS } from './resolver';
@NgModule({
imports: [
@@ -41,6 +42,6 @@ import { COMPONENTS } from './component';
InfoRoutingModule
],
declarations: [...COMPONENTS],
- providers: []
+ providers: [...RESOLVERS]
})
export class InfoModule {}
diff --git a/src/app/pages/infos/info/resolver/index.ts b/src/app/pages/infos/info/resolver/index.ts
new file mode 100644
index 0000000..01430ab
--- /dev/null
+++ b/src/app/pages/infos/info/resolver/index.ts
@@ -0,0 +1,3 @@
+import { PopupSetDetailResolver } from './popup-set-detail.resolver';
+
+export const RESOLVERS = [PopupSetDetailResolver];
diff --git a/src/app/pages/infos/info/resolver/popup-set-detail.resolver.ts b/src/app/pages/infos/info/resolver/popup-set-detail.resolver.ts
new file mode 100644
index 0000000..a2b9c25
--- /dev/null
+++ b/src/app/pages/infos/info/resolver/popup-set-detail.resolver.ts
@@ -0,0 +1,33 @@
+import { Injectable } from '@angular/core';
+import {
+ ActivatedRouteSnapshot,
+ Resolve,
+ RouterStateSnapshot
+} from '@angular/router';
+import { Observable, of } from 'rxjs';
+import { PopupSet } from 'src/modules/infos/popup-set/model/popup-set.model';
+import { PopupSetService } from 'src/modules/infos/popup-set/service/popup-set.service';
+
+@Injectable()
+export class PopupSetDetailResolver implements Resolve {
+ /**
+ * Constructor
+ */
+ constructor(private popupSetService: PopupSetService) {}
+
+ /**
+ * Resolver
+ */
+ resolve(
+ route: ActivatedRouteSnapshot,
+ state: RouterStateSnapshot
+ ): Observable | Promise | any {
+ const id = route.params.id;
+ if ('0' === id) {
+ return of({});
+ }
+ // return this.popupSetService.getUser(route.params.id);
+ console.log('dddddddddddddddd');
+ return null;
+ }
+}
diff --git a/src/modules/infos/popup-set/model/popup-set.model.ts b/src/modules/infos/popup-set/model/popup-set.model.ts
index c51b2be..d2503b1 100644
--- a/src/modules/infos/popup-set/model/popup-set.model.ts
+++ b/src/modules/infos/popup-set/model/popup-set.model.ts
@@ -2,8 +2,12 @@ import { DateAudit } from 'src/modules/common/data/model/audit';
export interface PopupSet extends DateAudit {
id?: number;
- name?: string;
- number?: string;
- holder?: string;
- description?: string;
+ thumbNail?: string;
+ title?: string;
+ imageWidth?: number;
+ imageHeight?: number;
+ imageX?: number;
+ imageY?: number;
+ openStatus?: boolean;
+ popupEffect?: number;
}