info model

This commit is contained in:
byung eun park 2019-10-27 16:28:04 +09:00
parent 9461051e8f
commit 0b6cd50a1f
39 changed files with 427 additions and 386 deletions

View File

@ -234,20 +234,20 @@ export const navigation: FuseNavigation[] = [
url: '/pages/infos/management/free-board'
},
{
id: 'bet_rule',
id: 'betting_rule',
title: '배팅규정',
translate: 'NAV.INFO.BET_RULE.TITLE',
type: 'item',
icon: 'email',
url: '/pages/infos/management/bet-rule'
url: '/pages/infos/management/betting-rule'
},
{
id: 'popup_setting',
id: 'popup_config',
title: '팝업창',
translate: 'NAV.INFO.POPUP_SETTING.TITLE',
type: 'item',
icon: 'email',
url: '/pages/infos/management/popup-set'
url: '/pages/infos/management/popup-config'
},
{
id: 'main_event_regist',

View File

@ -1,4 +1,4 @@
<div id="bet-rule" class="page-layout carded fullwidth inner-scroll">
<div id="betting-rule" class="page-layout carded fullwidth inner-scroll">
<!-- TOP BACKGROUND -->
<div class="top-bg accent"></div>
<!-- / TOP BACKGROUND -->

View File

@ -1,6 +1,6 @@
@import "src/@fuse/scss/fuse";
#bet-rule {
#betting-rule {
.header {

View File

@ -5,13 +5,13 @@ import { takeUntil } from 'rxjs/operators';
import { fuseAnimations } from 'src/@fuse/animations';
@Component({
selector: 'app-bet-rule',
templateUrl: './bet-rule.component.html',
styleUrls: ['./bet-rule.component.scss'],
selector: 'app-betting-rule',
templateUrl: './betting-rule.component.html',
styleUrls: ['./betting-rule.component.scss'],
encapsulation: ViewEncapsulation.None,
animations: fuseAnimations
})
export class BetRuleComponent implements OnInit, OnDestroy {
export class BettingRuleComponent implements OnInit, OnDestroy {
private unsubscribeAll: Subject<any>;
constructor(private fb: FormBuilder) {

View File

@ -16,7 +16,7 @@ import { takeUntil } from 'rxjs/operators';
import { fuseAnimations } from 'src/@fuse/animations';
import { ServiceCenterService } from 'src/modules/infos/service-center/service/service-center.service';
import { ServiceCenterService } from 'src/modules/infos/service/service-center.service';
import { ServiceCenterDataSource } from './service-center.data-source';
@Component({
selector: 'app-free-board',

View File

@ -1,21 +1,21 @@
import { ServiceCenterComponent } from './service-center.component';
import { SendMessageComponent } from './send-message.component';
import { FreeBoardComponent } from './free-board.component';
import { BetRuleComponent } from './bet-rule.component';
import { PopupSetComponent } from './popup-set.component';
import { BettingRuleComponent } from './betting-rule.component';
import { PopupConfigComponent } from './popup-config.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';
import { PopupConfigDetailComponent } from './popup-config-detail.component';
export const COMPONENTS = [
ServiceCenterComponent,
SendMessageComponent,
FreeBoardComponent,
BetRuleComponent,
PopupSetComponent,
BettingRuleComponent,
PopupConfigComponent,
EventRegistComponent,
NoticeBoardComponent,
FreeBoardRegistComponent,
PopupSetDetailComponent
PopupConfigDetailComponent
];

View File

@ -1,4 +1,4 @@
<div id="popup-set-detail" class="page-layout carded fullwidth inner-scroll">
<div id="popup-config-detail" class="page-layout carded fullwidth inner-scroll">
<!-- TOP BACKGROUND -->
<div class="top-bg accent"></div>
<!-- / TOP BACKGROUND -->

View File

@ -1,6 +1,6 @@
@import "src/@fuse/scss/fuse";
#popup-set-detail {
#popup-config-detail {
.header {

View File

@ -5,13 +5,13 @@ import { takeUntil } from 'rxjs/operators';
import { fuseAnimations } from 'src/@fuse/animations';
@Component({
selector: 'app-popup-set-detail',
templateUrl: './popup-set-detail.component.html',
styleUrls: ['./popup-set-detail.component.scss'],
selector: 'app-popup-config-detail',
templateUrl: './popup-config-detail.component.html',
styleUrls: ['./popup-config-detail.component.scss'],
encapsulation: ViewEncapsulation.None,
animations: fuseAnimations
})
export class PopupSetDetailComponent implements OnInit, OnDestroy {
export class PopupConfigDetailComponent implements OnInit, OnDestroy {
private unsubscribeAll: Subject<any>;
constructor(private fb: FormBuilder) {

View File

@ -0,0 +1,221 @@
<div id="popup-config" class="page-layout carded fullwidth inner-scroll">
<!-- TOP BACKGROUND -->
<div class="top-bg accent"></div>
<!-- / TOP BACKGROUND -->
<!-- CENTER -->
<div class="center">
<!-- HEADER -->
<div
class="header accent"
fxLayout="column"
fxLayoutAlign="center center"
fxLayout.gt-xs="row"
fxLayoutAlign.gt-xs="space-between center"
>
<!-- APP TITLE -->
<div
class="logo mb-24 mb-sm-0"
fxLayout="row"
fxLayoutAlign="start center"
>
<mat-icon
class="logo-icon s-32 mr-16"
[@animate]="{ value: '*', params: { delay: '50ms', scale: '0.2' } }"
>
shopping_basket
</mat-icon>
<span
class="logo-text h1"
[@animate]="{ value: '*', params: { delay: '100ms', x: '-25px' } }"
>팝업관리</span
>
</div>
<!-- / APP TITLE -->
<!-- SEARCH
<div class="search-wrapper ml-sm-32">
<div class="search" fxFlex fxLayout="row" fxLayoutAlign="start center">
<mat-icon>search</mat-icon>
<input #filter placeholder="Search for an order" />
</div>
</div>-->
<!-- / SEARCH -->
</div>
<!-- / HEADER -->
<!-- CONTENT CARD -->
<div class="content-card">
<mat-table
class="popup-config-table"
#table
[dataSource]="dataSource"
matSort
[@animateStagger]="{ value: '50' }"
fusePerfectScrollbar
formArrayName="formarray"
>
<!-- idx Column -->
<ng-container matColumnDef="idx">
<mat-header-cell *matHeaderCellDef mat-sort-header
>번호</mat-header-cell
>
<mat-cell *matCellDef="let popup; let i = index" [formGroupName]="i">
<p class="text-truncate">{{ i + 1 }}</p>
<!-- <p class="text-truncate">1</p> -->
</mat-cell>
</ng-container>
<!-- thumbnail Column -->
<ng-container matColumnDef="thumbNail">
<mat-header-cell *matHeaderCellDef mat-sort-header fxHide fxShow.gt-sm
>썸네일</mat-header-cell
>
<mat-cell
*matCellDef="let popup; let i = index"
[formGroupName]="i"
fxHide
fxShow.gt-sm
>
<p class="text-truncate">{{ popup.thumbNail }}</p>
</mat-cell>
</ng-container>
<!-- title Column -->
<ng-container matColumnDef="title">
<mat-header-cell *matHeaderCellDef mat-sort-header
>제목</mat-header-cell
>
<mat-cell *matCellDef="let popup; let i = index" [formGroupName]="i">
<p class="text-truncate">
{{ popup.title }}
</p>
</mat-cell>
</ng-container>
<!-- imageWidth Price Column -->
<ng-container matColumnDef="imgWidth">
<mat-header-cell *matHeaderCellDef mat-sort-header fxHide fxShow.gt-md
>이미지 넒이</mat-header-cell
>
<mat-cell
*matCellDef="let popup; let i = index"
[formGroupName]="i"
fxHide
fxShow.gt-md
>
<p class="total-price text-truncate">
{{ popup.imgWidth }}
</p>
</mat-cell>
px
</ng-container>
<!-- imageHegith Column -->
<ng-container matColumnDef="imgHegith">
<mat-header-cell *matHeaderCellDef mat-sort-header fxHide fxShow.gt-sm
>이미지 높이</mat-header-cell
>
<mat-cell
*matCellDef="let popup; let i = index"
[formGroupName]="i"
fxHide
fxShow.gt-sm
>
<p class="text-truncate">
{{ popup.imgHeight }}
</p>
</mat-cell>
px
</ng-container>
<!-- imageX Column -->
<ng-container matColumnDef="imgX">
<mat-header-cell *matHeaderCellDef mat-sort-header
>이미지 X</mat-header-cell
>
<mat-cell *matCellDef="let popup; let i = index" [formGroupName]="i">
<p class="status text-truncate h6 p-4">
{{ popup.imgX }}
</p>
</mat-cell>
</ng-container>
<!-- imageY Column -->
<ng-container matColumnDef="imgY">
<mat-header-cell *matHeaderCellDef mat-sort-header fxHide fxShow.gt-sm
>이미지 Y</mat-header-cell
>
<mat-cell
*matCellDef="let popup; let i = index"
[formGroupName]="i"
fxHide
fxShow.gt-sm
>
<p class="text-truncate">
{{ popup.imgY }}
</p>
</mat-cell>
</ng-container>
<!-- openStatus Column -->
<ng-container matColumnDef="openStatus">
<mat-header-cell *matHeaderCellDef mat-sort-header fxHide fxShow.gt-sm
>상태</mat-header-cell
>
<mat-cell
*matCellDef="let popup; let i = index"
[formGroupName]="i"
fxHide
fxShow.gt-sm
>
<p class="text-truncate">
{{ popup.openStatus }}
</p>
</mat-cell>
</ng-container>
<!-- saveBtn Column -->
<ng-container matColumnDef="saveBtn">
<mat-header-cell *matHeaderCellDef mat-sort-header fxHide fxShow.gt-sm
>수정</mat-header-cell
>
<mat-cell
*matCellDef="let popup; let i = index"
[formGroupName]="i"
fxHide
fxShow.gt-sm
>
<p class="text-truncate">
6
</p>
</mat-cell>
</ng-container>
<mat-header-row
*matHeaderRowDef="displayedColumns; sticky: true"
></mat-header-row>
<!-- [routerLink]="'/pages/infos/management/popup-config/' + popup.id" -->
<mat-row
*matRowDef="let popup; columns: displayedColumns"
class="popup-config"
matRipple
[routerLink]="'/pages/infos/management/popup-config/' + popup.id"
>
</mat-row>
</mat-table>
<mat-paginator
#paginator
[length]="10"
[pageIndex]="0"
[pageSize]="10"
[pageSizeOptions]="[5, 10, 25, 100]"
>
</mat-paginator>
</div>
<!-- / CONTENT CARD -->
</div>
<!-- / CENTER -->
</div>

View File

@ -1,7 +1,7 @@
@import 'src/@fuse/scss/fuse';
app-popup-set {
#popup-set {
app-popup-config {
#popup-config {
.top-bg {
@include media-breakpoint('xs') {
height: 224px;
@ -56,7 +56,7 @@ app-popup-set {
max-width: 100%;
}
.popup-set-table {
.popup-config-table {
flex: 1 1 auto;
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
overflow: auto;
@ -66,7 +66,7 @@ app-popup-set {
min-height: 64px;
}
.popup-set {
.popup-config {
position: relative;
cursor: pointer;
height: 84px;

View File

@ -15,25 +15,27 @@ import { takeUntil } from 'rxjs/operators';
import { fuseAnimations } from 'src/@fuse/animations';
import { PopupSetService } from 'src/modules/infos/popup-set/service/popup-set.service';
import { PopupSetDataSource } from './popup-set.data-source';
import { PopupConfigService } from 'src/modules/infos/service/popup-config.service';
import { PopupConfigDataSource } from './popup-config.data-source';
@Component({
selector: 'app-popup-set',
templateUrl: './popup-set.component.html',
styleUrls: ['./popup-set.component.scss'],
selector: 'app-popup-config',
templateUrl: './popup-config.component.html',
styleUrls: ['./popup-config.component.scss'],
encapsulation: ViewEncapsulation.None,
animations: fuseAnimations
})
export class PopupSetComponent implements OnInit, OnDestroy {
dataSource: PopupSetDataSource = new PopupSetDataSource(this.popupSetService);
export class PopupConfigComponent implements OnInit, OnDestroy {
dataSource: PopupConfigDataSource = new PopupConfigDataSource(
this.popupConfigService
);
displayedColumns = [
'idx',
'thumbNail',
'title',
'imageWidth',
'imageHegith',
'imageX',
'imageY',
'imgWidth',
'imgHegith',
'imgX',
'imgY',
'openStatus',
'saveBtn'
];
@ -55,7 +57,7 @@ export class PopupSetComponent implements OnInit, OnDestroy {
constructor(
private fb: FormBuilder,
private popupSetService: PopupSetService
private popupConfigService: PopupConfigService
) {
// Set the private defaults
this.unsubscribeAll = new Subject();

View File

@ -5,63 +5,69 @@ 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 { PopupConfig } from 'src/modules/infos/model/popup-config.model';
import { PopupConfigService } from 'src/modules/infos/service/popup-config.service';
import { FormControl, FormGroup, Validators, FormArray } from '@angular/forms';
const ELEMENT_DATA: PopupSet[] = [
const ELEMENT_DATA: PopupConfig[] = [
{
id: 1,
thumbNail: '/images/thumbname/1.jpg',
title: '오픈기념 이벤트',
imageWidth: 200,
imageHeight: 200,
imageX: 100,
imageY: 100,
imgWidth: 200,
imgHeight: 200,
imgX: 100,
imgY: 100,
openStatus: true,
updatedAt: null,
createdAt: null
createdAt: null,
createdBy: null,
updatedBy: null
},
{
id: 2,
thumbNail: '/images/thumbname/2.jpg',
title: '첫충전 이벤트',
imageWidth: 200,
imageHeight: 200,
imageX: 100,
imageY: 100,
imgWidth: 200,
imgHeight: 200,
imgX: 100,
imgY: 100,
openStatus: true,
updatedAt: null,
createdAt: null
createdAt: null,
createdBy: null,
updatedBy: null
},
{
id: 3,
thumbNail: '/images/thumbname/3.jpg',
title: '친구초대 이벤트',
imageWidth: 200,
imageHeight: 200,
imageX: 100,
imageY: 100,
imgWidth: 200,
imgHeight: 200,
imgX: 100,
imgY: 100,
openStatus: true,
updatedAt: null,
createdAt: null
createdAt: null,
createdBy: null,
updatedBy: null
}
];
export class PopupSetDataSource extends DataSource<PopupSet> {
private _objectStore: PopupSet[] = [];
private _ObjectsSubject$ = new BehaviorSubject<PopupSet[]>([]);
export class PopupConfigDataSource extends DataSource<PopupConfig> {
private _objectStore: PopupConfig[] = [];
private _ObjectsSubject$ = new BehaviorSubject<PopupConfig[]>([]);
private _loadingSubject$ = new BehaviorSubject<boolean>(false);
public loading$ = this._loadingSubject$.asObservable();
public formg: FormGroup;
constructor(private fixBonusService: PopupSetService) {
constructor(private fixBonusService: PopupConfigService) {
super();
}
connect(collectionViewer: CollectionViewer): Observable<PopupSet[]> {
connect(collectionViewer: CollectionViewer): Observable<PopupConfig[]> {
// return this.fixBonusService.getAll().pipe(
// map(res => {
// res.forEach(m => this._objectStore.push(m as FixBonus));
@ -73,7 +79,7 @@ export class PopupSetDataSource extends DataSource<PopupSet> {
// );
return of(ELEMENT_DATA).pipe(
map(res => {
res.forEach(m => this._objectStore.push(m as PopupSet));
res.forEach(m => this._objectStore.push(m as PopupConfig));
this._ObjectsSubject$.next(this._objectStore);
let fa = <FormArray>this.formg.get('formarray');
res.forEach(r => fa.push(this.createRowFormGroup(r)));
@ -85,26 +91,28 @@ export class PopupSetDataSource extends DataSource<PopupSet> {
// id: 3,
// thumbNail: '/images/thumbname/3.jpg',
// title: '친구초대 이벤트',
// imageWidth: 200,
// imageHeight: 200,
// imageX: 100,
// imageY: 100,
// imgWidth: 200,
// imgHeight: 200,
// imgX: 100,
// imgY: 100,
// openStatus: true,
// updatedAt: null,
// createdAt: null
createRowFormGroup(r: PopupSet): FormGroup {
// createdAt: null,
// createdBy: null,
// updatedBy: null
createRowFormGroup(r: PopupConfig): 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'),
imgWidth: this.createNewFormContorl(r, 'imgWidth'),
imgHeight: this.createNewFormContorl(r, 'imgHeight'),
imgX: this.createNewFormContorl(r, 'imgX'),
imgY: this.createNewFormContorl(r, 'imgY'),
openStatus: this.createNewFormContorl(r, 'openStatus')
});
return f;
}
createNewFormContorl(r: PopupSet, propName: string): FormControl {
createNewFormContorl(r: PopupConfig, propName: string): FormControl {
let m = new FormControl(r[propName], Validators.required);
m.valueChanges.subscribe(val => {
r[propName] = val;

View File

@ -1,254 +0,0 @@
<div id="popup-set" class="page-layout carded fullwidth inner-scroll">
<!-- TOP BACKGROUND -->
<div class="top-bg accent"></div>
<!-- / TOP BACKGROUND -->
<!-- CENTER -->
<div class="center">
<!-- HEADER -->
<div
class="header accent"
fxLayout="column"
fxLayoutAlign="center center"
fxLayout.gt-xs="row"
fxLayoutAlign.gt-xs="space-between center"
>
<!-- APP TITLE -->
<div
class="logo mb-24 mb-sm-0"
fxLayout="row"
fxLayoutAlign="start center"
>
<mat-icon
class="logo-icon s-32 mr-16"
[@animate]="{ value: '*', params: { delay: '50ms', scale: '0.2' } }"
>
shopping_basket
</mat-icon>
<span
class="logo-text h1"
[@animate]="{ value: '*', params: { delay: '100ms', x: '-25px' } }"
>팝업관리</span
>
</div>
<!-- / APP TITLE -->
<!-- SEARCH
<div class="search-wrapper ml-sm-32">
<div class="search" fxFlex fxLayout="row" fxLayoutAlign="start center">
<mat-icon>search</mat-icon>
<input #filter placeholder="Search for an order" />
</div>
</div>-->
<!-- / SEARCH -->
</div>
<!-- / HEADER -->
<!-- CONTENT CARD -->
<div class="content-card">
<mat-table
class="popup-set-table"
#table
[dataSource]="dataSource"
matSort
[@animateStagger]="{ value: '50' }"
fusePerfectScrollbar
formArrayName="formarray"
>
<!-- idx Column -->
<ng-container matColumnDef="idx">
<mat-header-cell *matHeaderCellDef mat-sort-header
>번호</mat-header-cell
>
<mat-cell
*matCellDef="let popup; let i = index"
[formGroupName]="i"
>
<p class="text-truncate">{{ i + 1 }}</p>
<!-- <p class="text-truncate">1</p> -->
</mat-cell>
</ng-container>
<!-- thumbnail Column -->
<ng-container matColumnDef="thumbNail">
<mat-header-cell
*matHeaderCellDef
mat-sort-header
fxHide
fxShow.gt-sm
>썸네일</mat-header-cell
>
<mat-cell
*matCellDef="let popup; let i = index"
[formGroupName]="i"
fxHide
fxShow.gt-sm
>
<p class="text-truncate">{{ popup.thumbNail }}</p>
</mat-cell>
</ng-container>
<!-- title Column -->
<ng-container matColumnDef="title">
<mat-header-cell *matHeaderCellDef mat-sort-header
>제목</mat-header-cell
>
<mat-cell
*matCellDef="let popup; let i = index"
[formGroupName]="i"
>
<p class="text-truncate">
{{ popup.title }}
</p>
</mat-cell>
</ng-container>
<!-- imageWidth Price Column -->
<ng-container matColumnDef="imageWidth">
<mat-header-cell
*matHeaderCellDef
mat-sort-header
fxHide
fxShow.gt-md
>이미지 넒이</mat-header-cell
>
<mat-cell
*matCellDef="let popup; let i = index"
[formGroupName]="i"
fxHide
fxShow.gt-md
>
<p class="total-price text-truncate">
{{ popup.imageWidth }}
</p>
</mat-cell>
px
</ng-container>
<!-- imageHegith Column -->
<ng-container matColumnDef="imageHegith">
<mat-header-cell
*matHeaderCellDef
mat-sort-header
fxHide
fxShow.gt-sm
>이미지 높이</mat-header-cell
>
<mat-cell
*matCellDef="let popup; let i = index"
[formGroupName]="i"
fxHide
fxShow.gt-sm
>
<p class="text-truncate">
{{ popup.imageHeight }}
</p>
</mat-cell>
px
</ng-container>
<!-- imageX Column -->
<ng-container matColumnDef="imageX">
<mat-header-cell *matHeaderCellDef mat-sort-header
>이미지 X</mat-header-cell
>
<mat-cell
*matCellDef="let popup; let i = index"
[formGroupName]="i"
>
<p class="status text-truncate h6 p-4">
{{ popup.imageX }}
</p>
</mat-cell>
</ng-container>
<!-- imageY Column -->
<ng-container matColumnDef="imageY">
<mat-header-cell
*matHeaderCellDef
mat-sort-header
fxHide
fxShow.gt-sm
>이미지 Y</mat-header-cell
>
<mat-cell
*matCellDef="let popup; let i = index"
[formGroupName]="i"
fxHide
fxShow.gt-sm
>
<p class="text-truncate">
{{ popup.imageY }}
</p>
</mat-cell>
</ng-container>
<!-- openStatus Column -->
<ng-container matColumnDef="openStatus">
<mat-header-cell
*matHeaderCellDef
mat-sort-header
fxHide
fxShow.gt-sm
>상태</mat-header-cell
>
<mat-cell
*matCellDef="let popup; let i = index"
[formGroupName]="i"
fxHide
fxShow.gt-sm
>
<p class="text-truncate">
{{ popup.openStatus }}
</p>
</mat-cell>
</ng-container>
<!-- saveBtn Column -->
<ng-container matColumnDef="saveBtn">
<mat-header-cell
*matHeaderCellDef
mat-sort-header
fxHide
fxShow.gt-sm
>수정</mat-header-cell
>
<mat-cell
*matCellDef="let popup; let i = index"
[formGroupName]="i"
fxHide
fxShow.gt-sm
>
<p class="text-truncate">
6
</p>
</mat-cell>
</ng-container>
<mat-header-row
*matHeaderRowDef="displayedColumns; sticky: true"
></mat-header-row>
<!-- [routerLink]="'/pages/infos/management/popup-set/' + popup.id" -->
<mat-row
*matRowDef="let popup; columns: displayedColumns"
class="popup-set"
matRipple
[routerLink]="'/pages/infos/management/popup-set/' + popup.id"
>
</mat-row>
</mat-table>
<mat-paginator
#paginator
[length]="10"
[pageIndex]="0"
[pageSize]="10"
[pageSizeOptions]="[5, 10, 25, 100]"
>
</mat-paginator>
</div>
<!-- / CONTENT CARD -->
</div>
<!-- / CENTER -->
</div>

View File

@ -16,7 +16,7 @@ import { takeUntil } from 'rxjs/operators';
import { fuseAnimations } from 'src/@fuse/animations';
import { ServiceCenterService } from 'src/modules/infos/service-center/service/service-center.service';
import { ServiceCenterService } from 'src/modules/infos/service/service-center.service';
import { ServiceCenterDataSource } from './service-center.data-source';
@Component({

View File

@ -7,8 +7,8 @@ import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { CollectionViewer } from '@angular/cdk/collections';
import { ServiceCenter } from 'src/modules/infos/service-center/model/service-center.model';
import { ServiceCenterService } from 'src/modules/infos/service-center/service/service-center.service';
import { ServiceCenter } from 'src/modules/infos/model/service-center.model';
import { ServiceCenterService } from 'src/modules/infos/service/service-center.service';
export class ServiceCenterDataSource extends DataSource<ServiceCenter> {
private filterSubject = new BehaviorSubject('');

View File

@ -3,13 +3,13 @@ import { Routes, RouterModule } from '@angular/router';
import { ServiceCenterComponent } from './component/service-center.component';
import { SendMessageComponent } from './component/send-message.component';
import { FreeBoardComponent } from './component/free-board.component';
import { BetRuleComponent } from './component/bet-rule.component';
import { PopupSetComponent } from './component/popup-set.component';
import { BettingRuleComponent } from './component/betting-rule.component';
import { PopupConfigComponent } from './component/popup-config.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';
import { PopupConfigDetailComponent } from './component/popup-config-detail.component';
import { PopupConfigDetailResolver } from './resolver/popup-config-detail.resolver';
const routes: Routes = [
{
@ -25,18 +25,18 @@ const routes: Routes = [
component: FreeBoardComponent
},
{
path: 'bet-rule',
component: BetRuleComponent
path: 'betting-rule',
component: BettingRuleComponent
},
{
path: 'popup-set',
component: PopupSetComponent
path: 'popup-config',
component: PopupConfigComponent
},
{
path: 'popup-set/:id',
component: PopupSetDetailComponent,
path: 'popup-config/:id',
component: PopupConfigDetailComponent,
resolve: {
popupSet: PopupSetDetailResolver
popupSet: PopupConfigDetailResolver
}
},
{

View File

@ -1,3 +1,3 @@
import { PopupSetDetailResolver } from './popup-set-detail.resolver';
import { PopupConfigDetailResolver } from './popup-config-detail.resolver';
export const RESOLVERS = [PopupSetDetailResolver];
export const RESOLVERS = [PopupConfigDetailResolver];

View File

@ -5,15 +5,15 @@ import {
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';
import { PopupConfig } from 'src/modules/infos/model/popup-config.model';
import { PopupConfigService } from 'src/modules/infos/service/popup-config.service';
@Injectable()
export class PopupSetDetailResolver implements Resolve<PopupSet> {
export class PopupConfigDetailResolver implements Resolve<PopupConfig> {
/**
* Constructor
*/
constructor(private popupSetService: PopupSetService) {}
constructor(private popupConfigService: PopupConfigService) {}
/**
* Resolver
@ -21,7 +21,7 @@ export class PopupSetDetailResolver implements Resolve<PopupSet> {
resolve(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<PopupSet> | Promise<PopupSet> | any {
): Observable<PopupConfig> | Promise<PopupConfig> | any {
const id = route.params.id;
if ('0' === id) {
return of({});

View File

@ -1,7 +1,7 @@
import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';
import { POPUP_SET_SERVICES } from './popup-set/service';
import { SERVICE_CENTER_SERVICES } from './service-center/service';
import { SERVICES } from './service/index';
@NgModule({
imports: [],
@ -18,7 +18,7 @@ export class InfosModule {
public static forRoot(): ModuleWithProviders<InfosRootModule> {
return {
ngModule: InfosRootModule,
providers: [POPUP_SET_SERVICES, SERVICE_CENTER_SERVICES]
providers: [SERVICES]
};
}
}

View File

@ -0,0 +1,7 @@
import { UserDateAuditEntity } from 'src/modules/common/data/model/audit';
export interface BettingRule extends UserDateAuditEntity {
id?: number;
title?: string;
contents?: string;
}

View File

@ -0,0 +1,8 @@
import { UserDateAuditEntity } from 'src/modules/common/data/model/audit';
export interface FreeBoard extends UserDateAuditEntity {
id?: number;
title?: string;
contents?: string;
attachFile?: number;
}

View File

@ -0,0 +1,7 @@
import { UserDateAuditEntity } from 'src/modules/common/data/model/audit';
export interface MainEvent extends UserDateAuditEntity {
id?: number;
openState?: boolean;
attachFile?: number;
}

View File

@ -0,0 +1,9 @@
import { UserDateAuditEntity } from 'src/modules/common/data/model/audit';
import { MessageStateName } from '../type/message-state.type';
export interface Message extends UserDateAuditEntity {
id?: number;
title?: string;
contents?: string;
stateName?: MessageStateName;
}

View File

@ -0,0 +1,10 @@
import { UserDateAuditEntity } from 'src/modules/common/data/model/audit';
import { NoticeStateName } from '../type/notice-state.type';
export interface NoticeBoard extends UserDateAuditEntity {
id?: number;
title?: string;
contents?: string;
attachFile?: number;
noticeType?: NoticeStateName;
}

View File

@ -0,0 +1,13 @@
import { UserDateAuditEntity } from 'src/modules/common/data/model/audit';
export interface PopupConfig extends UserDateAuditEntity {
id?: number;
thumbNail?: string;
title?: string;
imgWidth?: number;
imgHeight?: number;
imgX?: number;
imgY?: number;
openStatus?: boolean;
popupEffect?: number;
}

View File

@ -0,0 +1,8 @@
import { UserDateAuditEntity } from 'src/modules/common/data/model/audit';
export interface Reply extends UserDateAuditEntity {
id?: number;
title?: string;
contents?: string;
freeBoard?: number;
}

View File

@ -0,0 +1,12 @@
import { DateAudit } from 'src/modules/common/data/model/audit';
import { AnswerStateName } from '../type/answer-state.type';
import { QuestionStateName } from '../type/question-state.type';
export interface ServiceCenter extends DateAudit {
id?: number;
title?: string;
contents?: string;
attachFile?: number;
answerStatus?: AnswerStateName;
questionStatus?: QuestionStateName;
}

View File

@ -1,13 +0,0 @@
import { DateAudit } from 'src/modules/common/data/model/audit';
export interface PopupSet extends DateAudit {
id?: number;
thumbNail?: string;
title?: string;
imageWidth?: number;
imageHeight?: number;
imageX?: number;
imageY?: number;
openStatus?: boolean;
popupEffect?: number;
}

View File

@ -1,3 +0,0 @@
import { PopupSetService } from './popup-set.service';
export const POPUP_SET_SERVICES = [PopupSetService];

View File

@ -1,13 +0,0 @@
import { DateAudit } from 'src/modules/common/data/model/audit';
export interface ServiceCenter extends DateAudit {
id?: number;
thumbNail?: string;
title?: string;
imageWidth?: number;
imageHeight?: number;
imageX?: number;
imageY?: number;
openStatus?: boolean;
popupEffect?: number;
}

View File

@ -1,3 +0,0 @@
import { ServiceCenterService } from './service-center.service';
export const SERVICE_CENTER_SERVICES = [ServiceCenterService];

View File

@ -0,0 +1,4 @@
import { PopupConfigService } from './popup-config.service';
import { ServiceCenterService } from './service-center.service';
export const SERVICES = [PopupConfigService, ServiceCenterService];

View File

@ -3,7 +3,7 @@ import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs';
import { map, takeUntil } from 'rxjs/operators';
import { PopupSet } from '../model/popup-set.model';
import { PopupConfig } from '../model/popup-config.model';
import { API_BASE_URL } from 'src/modules/common/type/injection-token.type';
import { Page } from 'src/modules/common/data/model/page';
import { FormArray } from '@angular/forms';
@ -11,7 +11,7 @@ import { FormArray } from '@angular/forms';
@Injectable({
providedIn: 'root'
})
export class PopupSetService {
export class PopupConfigService {
constructor(
@Inject(API_BASE_URL) private apiBaseUrl: string,
private httpClient: HttpClient

View File

@ -0,0 +1,6 @@
export enum AnswerStateName {
UNANSWERED = 'UNANSWERED',
ANSWER_DONE = 'ANSWER_DONE',
CHECKING_USER = 'CHECKING_USER',
CONFIRMED_USER = 'CONFIRMED_USER'
}

View File

@ -0,0 +1,4 @@
export enum MessageStateName {
WAITING = 'WAITING',
READ = 'READ'
}

View File

@ -0,0 +1,4 @@
export enum NoticeStateName {
NOTICE = 'NOTICE',
EVENT = 'EVENT'
}

View File

@ -0,0 +1,4 @@
export enum QuestionStateName {
NORMAL = 'NORMAL',
BANK_ACCOUNT = 'BANK_ACCOUNT'
}