루징 관리 기본 데이터 상세 진행중

This commit is contained in:
Park Byung Eun 2022-08-02 09:54:09 +00:00
parent 2f491e7207
commit edb24ef08d
5 changed files with 175 additions and 121 deletions

View File

@ -123,7 +123,7 @@
mat-flat-button mat-flat-button
class="bet-mat-small-8" class="bet-mat-small-8"
[color]="'primary'" [color]="'primary'"
(click)="__viewLoosingDetail(info.id)" (click)="__viewLoosingDetail(info, '0')"
> >
상세보기 상세보기
</button></span </button></span
@ -153,7 +153,7 @@
mat-flat-button mat-flat-button
class="bet-mat-small-8" class="bet-mat-small-8"
[color]="'primary'" [color]="'primary'"
(click)="__viewLoosingDetail(info.id)" (click)="__viewLoosingDetail(info, '1')"
> >
상세보기 상세보기
</button></span </button></span

View File

@ -19,7 +19,11 @@ import { FuseConfirmationService } from '@fuse/services/confirmation';
import { Loosing } from '../models/loosing'; import { Loosing } from '../models/loosing';
import { LoosingService } from '../services/loosing.service'; import { LoosingService } from '../services/loosing.service';
import { Router } from '@angular/router'; import {
NavigationBehaviorOptions,
NavigationExtras,
Router,
} from '@angular/router';
import { MatTableDataSource } from '@angular/material/table'; import { MatTableDataSource } from '@angular/material/table';
@Component({ @Component({
@ -164,9 +168,16 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
// @ Private methods // @ Private methods
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
__viewLoosingDetail(loosing: Loosing): void { __viewLoosingDetail(loosing: Loosing, type: string): void {
let url: string = 'report/loosing/' + loosing.id; let url: string = 'report/loosing/' + loosing.id;
this.router.navigateByUrl(url); let extras: NavigationBehaviorOptions = {
state: {
viewType: type,
startDate: loosing.startDate,
endDate: loosing.endDate,
},
};
this.router.navigateByUrl(url, extras);
} }
__onClickRemoveBtn(event: MouseEvent, id: string): void { __onClickRemoveBtn(event: MouseEvent, id: string): void {

View File

@ -7,49 +7,13 @@
class="sm:col-span-6 flex flex-col flex-auto p-6 bg-card shadow rounded-2xl overflow-hidden" class="sm:col-span-6 flex flex-col flex-auto p-6 bg-card shadow rounded-2xl overflow-hidden"
> >
<div class="text-lg font-medium tracking-tight leading-6 truncate"> <div class="text-lg font-medium tracking-tight leading-6 truncate">
기본데이터 루징 관리
</div> </div>
<!-- Search --> <!-- Search -->
<div <div
class="relative flex flex-col sm:flex-row flex-0 sm:items-center sm:justify-between py-4 px-6 md:px-8 border-b" class="relative flex flex-col sm:flex-row flex-0 sm:items-center sm:justify-between py-4 px-6 md:px-8 border-b"
> >
<!-- Card inception -->
<div class="col-span-2 sm:col-span-1">
<mat-form-field
class="fuse-mat-no-subscript w-full"
[floatLabel]="'always'"
>
<input
matInput
[matDatepicker]="picker1"
[placeholder]="'Choose a date'"
/>
<mat-datepicker-toggle
matSuffix
[for]="picker1"
></mat-datepicker-toggle>
<mat-datepicker #picker1></mat-datepicker>
</mat-form-field>
</div>
<!-- Card expiration -->
<div class="col-span-2 sm:col-span-1">
<mat-form-field
class="fuse-mat-no-subscript w-full"
[floatLabel]="'always'"
>
<input
matInput
[matDatepicker]="picker2"
[placeholder]="'Choose a date'"
/>
<mat-datepicker-toggle
matSuffix
[for]="picker2"
></mat-datepicker-toggle>
<mat-datepicker #picker2></mat-datepicker>
</mat-form-field>
</div>
<!-- Actions --> <!-- Actions -->
<div fxLayout="row wrap" class="items-center mt-6 sm:mt-0 sm:ml-0"> <div fxLayout="row wrap" class="items-center mt-6 sm:mt-0 sm:ml-0">
<!-- Search --> <!-- Search -->
@ -61,7 +25,16 @@
(click)="__createProduct()" (click)="__createProduct()"
> >
<mat-icon [svgIcon]="'heroicons_outline:search'"></mat-icon> <mat-icon [svgIcon]="'heroicons_outline:search'"></mat-icon>
<span class="ml-2 mr-1">기본데이터생성</span> <span class="ml-2 mr-1">목록으로</span>
</button>
<button
mat-flat-button
[color]="'primary'"
fxFlex
(click)="__createProduct()"
>
<mat-icon [svgIcon]="'heroicons_outline:search'"></mat-icon>
<span class="ml-2 mr-1">루징데이터보기</span>
</button> </button>
</div> </div>
</div> </div>
@ -72,9 +45,11 @@
mat-table mat-table
[dataSource]="loosingDataSource" [dataSource]="loosingDataSource"
> >
<!-- Index --> <!-- 아이디 -->
<ng-container matColumnDef="index"> <ng-container matColumnDef="signinId">
<th mat-header-cell *matHeaderCellDef>번호</th> <th mat-header-cell *matHeaderCellDef [attr.rowspan]="2">
아이디
</th>
<td mat-cell *matCellDef="let info; let i = index"> <td mat-cell *matCellDef="let info; let i = index">
<span class="font-medium text-right"> <span class="font-medium text-right">
{{ i + 1 }} {{ i + 1 }}
@ -82,18 +57,22 @@
</td> </td>
</ng-container> </ng-container>
<!-- 시작일 --> <!-- 코드 -->
<ng-container matColumnDef="startDate"> <ng-container matColumnDef="code">
<th mat-header-cell *matHeaderCellDef>시작일</th> <th mat-header-cell *matHeaderCellDef [attr.rowspan]="2">
코드
</th>
<td mat-cell *matCellDef="let info"> <td mat-cell *matCellDef="let info">
<span class="font-medium text-right"> <span class="font-medium text-right">
{{ info.startDate }} {{ info.startDate }}
</span> </span>
</td> </td>
</ng-container> </ng-container>
<!-- 종료일 -->
<ng-container matColumnDef="endDate"> <!-- 카지노루징 시작-->
<th mat-header-cell *matHeaderCellDef>종료일</th> <!-- 베팅 -->
<ng-container matColumnDef="casinoBet">
<th mat-header-cell *matHeaderCellDef>베팅</th>
<td mat-cell *matCellDef="let info"> <td mat-cell *matCellDef="let info">
<span class="font-medium text-right"> <span class="font-medium text-right">
{{ info.endDate }} {{ info.endDate }}
@ -101,81 +80,141 @@
</td> </td>
</ng-container> </ng-container>
<!-- 기본데이터 --> <!-- 당첨 -->
<ng-container matColumnDef="defaultDataTotalCount"> <ng-container matColumnDef="casinoWin">
<th mat-header-cell *matHeaderCellDef colspan="2"> <th mat-header-cell *matHeaderCellDef>당첨</th>
기본데이터
</th>
<td mat-cell *matCellDef="let info"> <td mat-cell *matCellDef="let info">
<span class="font-medium text-right">{{ <span class="font-medium text-right">{{
info.defaultCount info.defaultCount
}}</span> }}</span>
</td> </td>
</ng-container> </ng-container>
<ng-container matColumnDef="defaultDataViewBtn">
<td
mat-cell
*matCellDef="let info"
style="border-left: 1px solid #e0e0e0"
>
<span class="font-medium text-right"
><button
mat-flat-button
class="bet-mat-small-8"
[color]="'primary'"
>
상세보기
</button></span
>
</td>
</ng-container>
<!-- 루징데이터 --> <!-- 윈로스 -->
<ng-container matColumnDef="loosingDataTotalCount"> <ng-container matColumnDef="casinoWinLoss">
<th mat-header-cell *matHeaderCellDef colspan="2"> <th mat-header-cell *matHeaderCellDef>윈로스</th>
루징데이터
</th>
<td mat-cell *matCellDef="let info"> <td mat-cell *matCellDef="let info">
<span class="font-medium text-right">{{ <span class="font-medium text-right">{{
info.loosingCount info.loosingCount
}}</span> }}</span>
</td> </td>
</ng-container> </ng-container>
<ng-container matColumnDef="loosingDataViewBtn">
<td
mat-cell
*matCellDef="let info"
style="border-left: 1px solid #e0e0e0"
>
<span class="font-medium text-right"
><button
mat-flat-button
class="bet-mat-small-8"
[color]="'primary'"
>
상세보기
</button></span
>
</td>
</ng-container>
<!-- 삭제 --> <!-- 롤링 -->
<ng-container matColumnDef="removeBtn"> <ng-container matColumnDef="casinoRolling">
<th mat-header-cell *matHeaderCellDef>삭제</th> <th mat-header-cell *matHeaderCellDef>롤링</th>
<td mat-cell *matCellDef="let info"> <td mat-cell *matCellDef="let info">
<span class="font-medium text-right" <span class="font-medium text-right">{{
><button info.loosingCount
mat-flat-button }}</span>
class="bet-mat-small-8"
[color]="'primary'"
>
삭제
</button></span
>
</td> </td>
</ng-container> </ng-container>
<tr mat-header-row *matHeaderRowDef="headerTableColumns"></tr> <!-- 루징요율 -->
<ng-container matColumnDef="casinoLoosing">
<th mat-header-cell *matHeaderCellDef>루징요율</th>
<td mat-cell *matCellDef="let info">
<span class="font-medium text-right">{{
info.loosingCount
}}</span>
</td>
</ng-container>
<!-- 본인 -->
<ng-container matColumnDef="casinoSelf">
<th mat-header-cell *matHeaderCellDef>본인</th>
<td mat-cell *matCellDef="let info">
<span class="font-medium text-right">{{
info.loosingCount
}}</span>
</td>
</ng-container>
<!-- 카지노루징 끝-->
<!-- 슬롯루징 시작-->
<!-- 베팅 -->
<ng-container matColumnDef="slotBet">
<th mat-header-cell *matHeaderCellDef>베팅</th>
<td mat-cell *matCellDef="let info">
<span class="font-medium text-right">
{{ info.endDate }}
</span>
</td>
</ng-container>
<!-- 당첨 -->
<ng-container matColumnDef="slotWin">
<th mat-header-cell *matHeaderCellDef>당첨</th>
<td mat-cell *matCellDef="let info">
<span class="font-medium text-right">{{
info.defaultCount
}}</span>
</td>
</ng-container>
<!-- 윈로스 -->
<ng-container matColumnDef="slotWinLoss">
<th mat-header-cell *matHeaderCellDef>윈로스</th>
<td mat-cell *matCellDef="let info">
<span class="font-medium text-right">{{
info.loosingCount
}}</span>
</td>
</ng-container>
<!-- 롤링 -->
<ng-container matColumnDef="slotRolling">
<th mat-header-cell *matHeaderCellDef>롤링</th>
<td mat-cell *matCellDef="let info">
<span class="font-medium text-right">{{
info.loosingCount
}}</span>
</td>
</ng-container>
<!-- 루징요율 -->
<ng-container matColumnDef="slotLoosing">
<th mat-header-cell *matHeaderCellDef>루징요율</th>
<td mat-cell *matCellDef="let info">
<span class="font-medium text-right">{{
info.loosingCount
}}</span>
</td>
</ng-container>
<!-- 본인 -->
<ng-container matColumnDef="slotSelf">
<th mat-header-cell *matHeaderCellDef>본인</th>
<td mat-cell *matCellDef="let info">
<span class="font-medium text-right">{{
info.loosingCount
}}</span>
</td>
</ng-container>
<!-- 슬롯루징 끝-->
<!-- Header row second group -->
<ng-container matColumnDef="header-row-casino-group">
<th mat-header-cell *matHeaderCellDef [attr.colspan]="6">
카지노루징
</th>
</ng-container>
<!-- Header row second group -->
<ng-container matColumnDef="header-row-slot-group">
<th mat-header-cell *matHeaderCellDef [attr.colspan]="6">
슬롯루징
</th>
</ng-container>
<tr
mat-header-row
*matHeaderRowDef="[
'signinId',
'code',
'header-row-casino-group',
'header-row-slot-group'
]"
></tr>
<tr mat-header-row *matHeaderRowDef="displayedTableColumns"></tr>
<tr <tr
mat-row mat-row
*matRowDef="let row; columns: displayedTableColumns" *matRowDef="let row; columns: displayedTableColumns"

View File

@ -70,14 +70,18 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
]; ];
displayedTableColumns: string[] = [ displayedTableColumns: string[] = [
'index', 'casinoBet',
'startDate', 'casinoWin',
'endDate', 'casinoWinLoss',
'defaultDataTotalCount', 'casinoRolling',
'defaultDataViewBtn', 'casinoLoosing',
'loosingDataTotalCount', 'casinoSelf',
'loosingDataViewBtn', 'slotBet',
'removeBtn', 'slotWin',
'slotWinLoss',
'slotRolling',
'slotLoosing',
'slotSelf',
]; ];
/** /**
@ -87,7 +91,7 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
private _changeDetectorRef: ChangeDetectorRef, private _changeDetectorRef: ChangeDetectorRef,
private _fuseConfirmationService: FuseConfirmationService, private _fuseConfirmationService: FuseConfirmationService,
private _loosingService: LoosingService, private _loosingService: LoosingService,
private router: Router private _router: Router
) {} ) {}
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------

View File

@ -19,8 +19,8 @@ export const loosingRoutes: Route[] = [
{ {
path: ':id', path: ':id',
component: ViewComponent, component: ViewComponent,
resolve: { // resolve: {
loosing: LoosingResolver, // loosing: LoosingResolver,
}, // },
}, },
]; ];