쿠폰발행로그 수정

This commit is contained in:
이담 정 2022-07-24 13:57:45 +00:00
parent 1d13797e55
commit b0e5604bec
9 changed files with 195 additions and 402 deletions

View File

@ -42,7 +42,11 @@ export class MemberCouponLogMockApi {
let couponLogs: any[] | null = cloneDeep(this._couponLogs); let couponLogs: any[] | null = cloneDeep(this._couponLogs);
// Sort the couponLogs // Sort the couponLogs
if (sort === 'sku' || sort === 'name' || sort === 'active') { if (
sort === 'issuedCouponId' ||
sort === 'couponGroupNumber' ||
sort === 'couponTitle'
) {
couponLogs.sort((a, b) => { couponLogs.sort((a, b) => {
const fieldA = a[sort].toString().toUpperCase(); const fieldA = a[sort].toString().toUpperCase();
const fieldB = b[sort].toString().toUpperCase(); const fieldB = b[sort].toString().toUpperCase();

View File

@ -2,32 +2,15 @@
export const couponLogs = [ export const couponLogs = [
{ {
id: 'on00', id: '7eb7c859-1347-4317-96b6-9476a7e2ba3c',
totalPartnerCount: '5', idx: 4,
totalHoldingMoney: 303675, issuedCouponId: 'on04',
totalComp: 108933, couponGroupNumber: 'Y071294JYS9AIYL4',
total: 412608, couponTitle: '쿠폰테스트',
branchCount: 1, issuedCouponMoney: 50000,
divisionCount: 1, couponContents: '파트너페이지에서 쿠폰생성',
officeCount: 1, issuedCouponDate: '2022-06-12 16:22',
storeCount: 1, couponBeforeMoney: 50000,
memberCount: 1, couponAfterMoney: 0,
nickname: 'on00',
accountHolder: '11',
phoneNumber: '010-1111-1111',
calculateType: '롤링',
ownCash: 50000,
ownComp: 1711,
ownCoupon: 50000,
gameMoney: 0,
todayComp: 0,
totalDeposit: 0,
totalWithdraw: 0,
balance: 0,
registDate: '2022-06-12 15:38',
finalSigninDate: '',
ip: '',
state: '정상',
note: '',
}, },
]; ];

View File

@ -5,8 +5,8 @@ export const coupons = [
id: '7eb7c859-1347-4317-96b6-9476a7e2ba3c', id: '7eb7c859-1347-4317-96b6-9476a7e2ba3c',
issuedCouponId: 'on04', issuedCouponId: 'on04',
issuedCouponNickname: 'on04', issuedCouponNickname: 'on04',
receiveCouponId: 'onon6', takeCouponId: 'onon6',
receiveCouponNickname: '가가가', tkaeCouponNickname: '가가가',
couponGroupNumber: '6L03ER50103AZOVS', couponGroupNumber: '6L03ER50103AZOVS',
couponSerialNumber: '3GWL2T6RQJ4WJLRTQMBIRFEO', couponSerialNumber: '3GWL2T6RQJ4WJLRTQMBIRFEO',
issuedCoupons: '1/1', issuedCoupons: '1/1',

View File

@ -13,111 +13,23 @@
<div class="text-4xl font-extrabold tracking-tight">쿠폰발행로그</div> <div class="text-4xl font-extrabold tracking-tight">쿠폰발행로그</div>
<!-- Actions --> <!-- Actions -->
<div class="flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4"> <div class="flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4">
<!-- Memo -->
<!-- <mat-form-field>
<ng-container *ngIf="couponLogs$ | async as couponLogs">
<ng-container
*ngFor="let couponLog of couponLogs; trackBy: __trackByFn"
>
<div <div
class="inventory-grid grid items-center gap-4 py-3 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"
></div>
<!-- Search -->
<button mat-icon-button (click)="__onClickSearch()">
<mat-icon [svgIcon]="'heroicons_outline:search'"></mat-icon>
</button>
<div
*ngIf="__isSearchOpened"
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"
> >
<fieldset> <!-- Actions -->
총 파트너수:{{ couponLog.totalPartnerCount }} <div fxLayout="row wrap" class="items-center mt-6 sm:mt-0 sm:ml-0">
총 보유머니:{{
couponLog.totalHoldingMoney
}}
총 콤프:{{ couponLog.totalComp }} 총 합계:{{
couponLog.total
}}
</fieldset>
</div>
</ng-container>
</ng-container>
</mat-form-field> -->
<!-- SelectBox -->
<mat-form-field>
<mat-select placeholder="리스트수">
<mat-option value="40">40</mat-option>
<mat-option value="60">60</mat-option>
<mat-option value="80">80</mat-option>
<mat-option value="100">100</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="레벨">
<mat-option value="level1">LV.1</mat-option>
<mat-option value="level2">LV.2</mat-option>
<mat-option value="level3">LV.3</mat-option>
<mat-option value="level4">LV.4</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="상태">
<mat-option value="">정상</mat-option>
<mat-option value="">대기</mat-option>
<mat-option value="">탈퇴</mat-option>
<mat-option value="">휴면</mat-option>
<mat-option value="">블랙</mat-option>
<mat-option value="">정지</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="제한">
<mat-option value="">카지노제한</mat-option>
<mat-option value="">슬롯제한</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="입금">
<mat-option value="">계좌입금</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="내용">
<mat-option value="">카지노콤프</mat-option>
<mat-option value="">슬롯콤프</mat-option>
<mat-option value="">배팅콤프</mat-option>
<mat-option value="">첫충콤프</mat-option>
</mat-select>
</mat-form-field>
<!-- <mat-form-field>
<mat-select placeholder="입금">
<mat-option value="">계좌입금</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="아이디">
<mat-option value="">아이디</mat-option>
<mat-option value="">닉네임</mat-option>
<mat-option value="">이름</mat-option>
<mat-option value="">사이트</mat-option>
<mat-option value="">파트너수동지급</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="가입일 정렬">
<mat-option value="">가입일 정렬</mat-option>
<mat-option value="">아이디 정렬</mat-option>
<mat-option value="">닉네임 정렬</mat-option>
<mat-option value="">캐쉬 정렬</mat-option>
<mat-option value="">콤프 정렬</mat-option>
<mat-option value="">쿠폰 정렬</mat-option>
<mat-option value="">입금 정렬</mat-option>
<mat-option value="">출금 정렬</mat-option>
<mat-option value="">차익 정렬</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="내림차순">
<mat-option value="">내림차순</mat-option>
<mat-option value="">오름차순</mat-option>
</mat-select>
</mat-form-field> -->
<!-- Search --> <!-- Search -->
<mat-form-field <mat-form-field
class="fuse-mat-dense fuse-mat-no-subscript fuse-mat-rounded min-w-64" fxFlex
class="fuse-mat-rounded min-w-64 bet-mat-form-field-wrapper-mb-0 mr-2"
> >
<mat-icon <mat-icon
class="icon-size-5" class="icon-size-5"
@ -128,21 +40,20 @@
matInput matInput
[formControl]="searchInputControl" [formControl]="searchInputControl"
[autocomplete]="'off'" [autocomplete]="'off'"
[placeholder]="'Search'" [placeholder]="'Search ID'"
/> />
</mat-form-field> </mat-form-field>
<!-- Add user button --> <!-- Add user button -->
<button <button
class="ml-4" fxFlex
mat-flat-button mat-flat-button
style="position: fixed; margin-top: 4px"
[color]="'primary'" [color]="'primary'"
(click)="__createProduct()" (click)="__createProduct()"
> >
<!-- <mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon> --> <mat-icon [svgIcon]="'heroicons_outline:search'"></mat-icon>
<span class="ml-2 mr-1">검색하기</span> <span class="ml-2 mr-1">Search</span>
</button> </button>
<button>엑셀저장</button>
<button>카지노머니확인</button>
</div> </div>
</div> </div>
@ -158,29 +69,16 @@
<!-- Header --> <!-- Header -->
<div <div
class="inventory-grid z-10 sticky top-0 grid gap-4 py-4 px-6 md:px-8 shadow text-md font-semibold text-secondary bg-gray-50 dark:bg-black dark:bg-opacity-5" class="inventory-grid z-10 sticky top-0 grid gap-4 py-4 px-6 md:px-8 shadow text-md font-semibold text-secondary bg-gray-50 dark:bg-black dark:bg-opacity-5"
matSort
matSortDisableClear
> >
<div class="hidden sm:block"><mat-checkbox></mat-checkbox></div> <div>번호</div>
<div class="hidden sm:block">요율</div> <div>발행아이디</div>
<div class="hidden sm:block">상부트리</div> <div>쿠폰그룹번호</div>
<div class="hidden sm:block">관리</div> <div class="hidden sm:block">쿠폰제목</div>
<div class="hidden sm:block">매장수</div> <div class="hidden md:block">이전쿠폰금액</div>
<div class="hidden sm:block">회원수</div> <div class="hidden md:block">발행쿠폰금액</div>
<div class="hidden sm:block">아이디</div> <div class="hidden md:block">이후쿠폰금액</div>
<div class="hidden sm:block">닉네임</div> <div class="hidden lg:block">내용</div>
<div class="hidden sm:block">예금주</div> <div class="hidden lg:block">발행시간</div>
<div class="hidden sm:block">연락처</div>
<div class="hidden sm:block">정산</div>
<div class="hidden sm:block">보유금</div>
<div class="hidden sm:block">게임중머니</div>
<div class="hidden sm:block">카지노->캐쉬</div>
<div class="hidden sm:block">금일콤프</div>
<div class="hidden sm:block">총입출</div>
<div class="hidden sm:block">로그</div>
<div class="hidden sm:block">상태</div>
<div class="hidden sm:block">회원수</div>
<div class="hidden sm:block">비고</div>
</div> </div>
<!-- Rows --> <!-- Rows -->
<ng-container *ngIf="couponLogs$ | async as couponLogs"> <ng-container *ngIf="couponLogs$ | async as couponLogs">
@ -190,143 +88,30 @@
<div <div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b" class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
> >
<div class="hidden sm:block truncate"> <div>{{ couponLog.idx }}</div>
<mat-checkbox></mat-checkbox> <div>
{{ couponLog.issuedCouponId }}
</div> </div>
<!-- rate --> <div>
<div class="hidden sm:block truncate"> {{ couponLog.couponGroupNumber }}
<button
mat-button
color="primary"
matTooltip="요율확인
카지노-바카라: 0%
카지노-룰렛: 0%
카지노-드레곤타이거: 0%
카지노-그외: 0%
슬롯: 0%
카지노루징: 0%
슬롯루징: 0%"
>
요율
</button>
<div class="hidden sm:block truncate">
<!-- 관리 -->
<button mat-flat-button [color]="'primary'">
<mat-form-field>
<mat-select placeholder="관리">
<mat-option value="">보유금지급/회수</mat-option>
<mat-option value="">수수료설정</mat-option>
<mat-option value="">콤프지급/회수</mat-option>
<mat-option value="">쿠폰머니지급/회수</mat-option>
<mat-option value="">쪽지보내기</mat-option>
<mat-option value="">베팅리스트</mat-option>
<mat-option value="">강제로그아웃</mat-option>
</mat-select>
</mat-form-field>
</button>
</div> </div>
<div class="hidden sm:block">
{{ couponLog.couponTitle }}
</div> </div>
<!-- 매장수 --> <div class="hidden md:block">
<div class="hidden sm:block truncate"> {{ couponLog.couponBeforeMoney }}
<button mat-flat-button [color]="'primary'">
{{ couponLog.branchCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ couponLog.divisionCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ couponLog.officeCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ couponLog.storeCount }}
</button>
</div> </div>
<!-- 회원수 --> <div class="hidden md:block">
<div class="hidden sm:block truncate"> {{ couponLog.issuedCouponMoney }}
<button mat-flat-button [color]="'primary'">
{{ couponLog.memberCount }}
</button>
</div> </div>
<!-- id --> <div class="hidden md:block">
<ng-container *ngIf="users$ | async as users"> {{ couponLog.couponAfterMoney }}
<ng-container
*ngFor="let user of users; trackBy: __trackByFn"
>
<div
class="hidden sm:block truncate"
(click)="viewUserDetail(user.id!)"
>
{{ couponLog.id }}
</div> </div>
</ng-container> <div class="hidden lg:block">
</ng-container> {{ couponLog.couponContents }}
<!-- nickname -->
<div class="hidden sm:block truncate">
{{ couponLog.nickname }}
</div> </div>
<!-- accountHolder --> <div class="hidden lg:block">
<div class="hidden sm:block truncate"> {{ couponLog.issuedCouponDate }}
{{ couponLog.accountHolder }}
</div>
<!-- 연락처 -->
<div class="hidden sm:block truncate">
{{ couponLog.phoneNumber }}
</div>
<!-- 정산 -->
<div class="hidden sm:block truncate">
{{ couponLog.calculateType }}
</div>
<!-- 보유금 -->
<div class="hidden sm:block truncate">
캐쉬{{ couponLog.ownCash }} 콤프{{
couponLog.ownComp
}}
쿠폰{{ couponLog.ownCoupon }}
</div>
<!-- gameMoney -->
<div class="hidden sm:block truncate">
{{ couponLog.gameMoney }}
</div>
<!-- casinoCash -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
게임머니확인
</button>
<button mat-flat-button [color]="'primary'">
게임머니회수
</button>
</div>
<!-- todayComp -->
<div class="hidden sm:block truncate">
{{ couponLog.todayComp }}P
</div>
<!-- 총입출 -->
<div class="hidden sm:block truncate">
입금{{ couponLog.totalDeposit }} 출금{{
couponLog.totalWithdraw
}}
차익{{ couponLog.balance }}
</div>
<!-- log -->
<div class="hidden sm:block truncate">
가입{{ couponLog.registDate }} 최종{{
couponLog.finalSigninDate
}}
IP{{ couponLog.ip }}
</div>
<!-- state -->
<div class="hidden sm:block truncate">
{{ couponLog.state }}
</div>
<!-- 회원수 -->
<div class="hidden sm:block truncate">
{{ couponLog.memberCount }}
</div>
<!-- 비고 -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ couponLog.note }}
</button>
</div> </div>
</div> </div>
</ng-container> </ng-container>
@ -349,9 +134,11 @@
<div <div
class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center" class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center"
> >
There are no coupon logs! There are no coupon log!
</div> </div>
</ng-template> </ng-template>
</div> </div>
</div> </div>
</div> </div>
</div>
</div>

View File

@ -42,18 +42,22 @@ import { Router } from '@angular/router';
/* language=SCSS */ /* language=SCSS */
` `
.inventory-grid { .inventory-grid {
grid-template-columns: 60px auto 40px; /* 번호 발행 그룹 제목 이전 */
grid-template-columns: 40px 140px auto 140px 140px;
@screen sm { @screen sm {
grid-template-columns: 60px 60px 60px 60px 60px 60px auto 60px; /* 번호 발행 그룹 제목 이전 발행 */
grid-template-columns: 40px 140px auto 140px 140px 140px;
} }
@screen md { @screen md {
grid-template-columns: 60px 60px 60px 60px 60px 60px auto 60px 60px; /* 번호 발행 그룹 제목 이전 발행 이후 내용 */
grid-template-columns: 40px 140px auto 140px 140px 140px 40px 140px;
} }
@screen lg { @screen lg {
grid-template-columns: 60px 70px 70px 70px 70px 100px 60px 60px auto 60px 60px 60px 60px; /* 번호 발행 그룹 제목 이전 발행 이후 내용 시간*/
grid-template-columns: 40px 140px auto 140px 140px 140px 40px 200px 140px;
} }
} }
`, `,
@ -69,6 +73,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
couponLogs$!: Observable<CouponLog[] | undefined>; couponLogs$!: Observable<CouponLog[] | undefined>;
users$!: Observable<User[] | undefined>; users$!: Observable<User[] | undefined>;
__isSearchOpened = false;
isLoading = false; isLoading = false;
searchInputControl = new FormControl(); searchInputControl = new FormControl();
selectedCouponLog?: CouponLog; selectedCouponLog?: CouponLog;
@ -186,6 +191,14 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
*/ */
__toggleDetails(productId: string): void {} __toggleDetails(productId: string): void {}
/**
* toggle the search
* Used in 'bar'
*/
__onClickSearch(): void {
this.__isSearchOpened = !this.__isSearchOpened;
}
/** /**
* Track by function for ngFor loops * Track by function for ngFor loops
* *

View File

@ -1,29 +1,12 @@
export interface CouponLog { export interface CouponLog {
id?: string; id: string;
totalPartnerCount?: number; idx?: number;
totalHoldingMoney?: number; issuedCouponId?: string;
totalComp?: number; couponGroupNumber?: string;
total?: number; couponTitle?: string;
branchCount?: number; issuedCouponMoney?: number;
divisionCount?: number; couponContents?: string;
officeCount?: number; issuedCouponDate?: Date;
storeCount?: number; couponBeforeMoney?: number; // 쿠폰이전금액
memberCount?: number; couponAfterMoney?: number; // 쿠폰이후금액
nickname?: string;
accountHolder?: string;
phoneNumber?: string;
calculateType?: string;
ownCash?: number;
ownComp?: number;
ownCoupon?: number;
gameMoney?: number;
todayComp?: number;
totalDeposit?: number;
totalWithdraw?: number;
balance?: number;
registDate?: string;
finalSigninDate?: string;
ip?: string;
state?: string;
note?: string;
} }

View File

@ -13,7 +13,13 @@
<div class="text-4xl font-extrabold tracking-tight">쿠폰발행리스트</div> <div class="text-4xl font-extrabold tracking-tight">쿠폰발행리스트</div>
<!-- Actions --> <!-- Actions -->
<div class="flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4"> <div class="flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4">
<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"
></div>
<!-- Search --> <!-- Search -->
<button mat-icon-button (click)="__onClickSearch()">
<mat-icon [svgIcon]="'heroicons_outline:search'"></mat-icon>
</button>
<div <div
*ngIf="__isSearchOpened" *ngIf="__isSearchOpened"
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"
@ -134,9 +140,9 @@
{{ coupon.issuedCoupons }} {{ coupon.issuedCoupons }}
</div> </div>
<div class="hidden sm:block"> <div class="hidden sm:block">
{{ coupon.receiveCouponId }} {{ coupon.takeCouponId }}
<hr style="margin: 7px 0px" /> <hr style="margin: 7px 0px" />
{{ coupon.receiveCouponNickname }} {{ coupon.takeCouponNickname }}
</div> </div>
<div class="hidden md:block"> <div class="hidden md:block">
{{ coupon.couponStartDate }} {{ coupon.couponStartDate }}

View File

@ -191,6 +191,14 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
*/ */
__toggleDetails(productId: string): void {} __toggleDetails(productId: string): void {}
/**
* toggle the search
* Used in 'bar'
*/
__onClickSearch(): void {
this.__isSearchOpened = !this.__isSearchOpened;
}
/** /**
* Track by function for ngFor loops * Track by function for ngFor loops
* *

View File

@ -2,8 +2,8 @@ export interface Coupon {
id: string; id: string;
issuedCouponId?: string; // 쿠폰생성아이디 issuedCouponId?: string; // 쿠폰생성아이디
issuedCouponNickname?: string; // 쿠폰생성닉네임 issuedCouponNickname?: string; // 쿠폰생성닉네임
receiveCouponId?: string; // 쿠폰지급아이디 takeCouponId?: string; // 쿠폰지급 받은아이디
receiveCouponNickname?: string; // 쿠폰지급닉네임 takeCouponNickname?: string; // 쿠폰지급 받은닉네임
couponGroupNumber?: string; // 쿠폰그룹번호 couponGroupNumber?: string; // 쿠폰그룹번호
couponSerialNumber?: string; // 쿠폰시리얼넘버 couponSerialNumber?: string; // 쿠폰시리얼넘버
issuedCoupons?: string; // 쿠폰발행수 issuedCoupons?: string; // 쿠폰발행수
@ -15,3 +15,12 @@ export interface Coupon {
modifyCouponDate?: Date; // 쿠폰수정일 modifyCouponDate?: Date; // 쿠폰수정일
useCouponDate?: Date; // 쿠폰사용일 useCouponDate?: Date; // 쿠폰사용일
} }
// issued
// 생성, 발행
// give - take
// 쿠폰지급 - 쿠폰지급 받음
// use - retrieve
// 쿠폰사용 - 쿠폰회수