Merge branch 'feature/BETERAN-BACKEND-APP-BROWSER-init' of https://gitlab.loafle.net/bet/beteran-backend-app-browser into feature/BETERAN-BACKEND-APP-BROWSER-init

This commit is contained in:
Park Byung Eun 2022-07-07 10:47:10 +00:00
commit 0aa7a47aca
58 changed files with 5683 additions and 78 deletions

View File

@ -150,6 +150,13 @@ export const appRoutes: Route[] = [
(m: any) => m.UserModule
),
},
{
path: 'casinomoney',
loadChildren: () =>
import(
'app/modules/admin/member/casinomoney/casinomoney.module'
).then((m: any) => m.CasinomoneyModule),
},
],
},
{
@ -181,6 +188,27 @@ export const appRoutes: Route[] = [
(m: any) => m.PowerballModule
),
},
{
path: 'casino',
loadChildren: () =>
import('app/modules/admin/game/casino/casino.module').then(
(m: any) => m.CasinoModule
),
},
{
path: 'evolution',
loadChildren: () =>
import('app/modules/admin/game/evolution/evolution.module').then(
(m: any) => m.EvolutionModule
),
},
{
path: 'slot',
loadChildren: () =>
import('app/modules/admin/game/slot/slot.module').then(
(m: any) => m.SlotModule
),
},
],
},
],

View File

@ -13,7 +13,7 @@ export const deposits = [
registrationDate: '2022-06-18 13:14',
processDate: '000-0-0 0:0',
deposit: 41200000,
withdrawal: 19000000,
withdraw: 19000000,
total: 22200000,
gameMoney: 67131,
highRank: '[매장]kgon5',
@ -31,7 +31,7 @@ export const deposits = [
registrationDate: '2022-06-13 12:57',
processDate: '2022-06-13 12:58',
deposit: 200000,
withdrawal: 0,
withdraw: 0,
total: 200000,
gameMoney: 0,
highRank: '[매장]on04',
@ -49,7 +49,7 @@ export const deposits = [
registrationDate: '2022-06-13 12:56',
processDate: '2022-06-13 12:57',
deposit: 200000,
withdrawal: 0,
withdraw: 0,
total: 200000,
gameMoney: 0,
highRank: '[매장]on04',

View File

@ -12,7 +12,7 @@ export const withdraws = [
registrationDate: '2022-06-10 16:51',
processDate: '2022-06-10 16:51',
deposit: 41200000,
withdrawal: 19000000,
withdraw: 19000000,
total: 22200000,
highRank: '[매장]kgon5',
state: '완료',
@ -28,7 +28,7 @@ export const withdraws = [
registrationDate: '2022-06-08 18:31',
processDate: '2022-06-08 20:13',
deposit: 41200000,
withdrawal: 19000000,
withdraw: 19000000,
total: 22200000,
highRank: '[매장]kgon5',
state: '완료',
@ -44,7 +44,7 @@ export const withdraws = [
registrationDate: '2022-06-08 01:22',
processDate: '2022-06-08 01:22',
deposit: 10000000,
withdrawal: 10000,
withdraw: 10000,
total: 9990000,
highRank: '[매장]kgon5',
state: '완료',

View File

@ -0,0 +1,214 @@
import { Injectable } from '@angular/core';
import { assign, cloneDeep } from 'lodash-es';
import { FuseMockApiService, FuseMockApiUtils } from '@fuse/lib/mock-api';
import { casinos as casinosData } from './data';
@Injectable({
providedIn: 'root',
})
export class GameCasinoMockApi {
private _casinos: any[] = casinosData;
/**
* Constructor
*/
constructor(private _fuseMockApiService: FuseMockApiService) {
// Register Mock API handlers
this.registerHandlers();
}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Register Mock API handlers
*/
registerHandlers(): void {
// -----------------------------------------------------------------------------------------------------
// @ Casinos - GET
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
.onGet('api/apps/game/casino/casinos', 300)
.reply(({ request }) => {
// Get available queries
const search = request.params.get('search');
const sort = request.params.get('sort') || 'name';
const order = request.params.get('order') || 'asc';
const page = parseInt(request.params.get('page') ?? '1', 10);
const size = parseInt(request.params.get('size') ?? '10', 10);
// Clone the casinos
let casinos: any[] | null = cloneDeep(this._casinos);
// Sort the casinos
if (sort === 'sku' || sort === 'name' || sort === 'active') {
casinos.sort((a, b) => {
const fieldA = a[sort].toString().toUpperCase();
const fieldB = b[sort].toString().toUpperCase();
return order === 'asc'
? fieldA.localeCompare(fieldB)
: fieldB.localeCompare(fieldA);
});
} else {
casinos.sort((a, b) =>
order === 'asc' ? a[sort] - b[sort] : b[sort] - a[sort]
);
}
// If search exists...
if (search) {
// Filter the casinos
casinos = casinos.filter(
(contact: any) =>
contact.name &&
contact.name.toLowerCase().includes(search.toLowerCase())
);
}
// Paginate - Start
const casinosLength = casinos.length;
// Calculate pagination details
const begin = page * size;
const end = Math.min(size * (page + 1), casinosLength);
const lastPage = Math.max(Math.ceil(casinosLength / size), 1);
// Prepare the pagination object
let pagination = {};
// If the requested page number is bigger than
// the last possible page number, return null for
// casinos but also send the last possible page so
// the app can navigate to there
if (page > lastPage) {
casinos = null;
pagination = {
lastPage,
};
} else {
// Paginate the results by size
casinos = casinos.slice(begin, end);
// Prepare the pagination mock-api
pagination = {
length: casinosLength,
size: size,
page: page,
lastPage: lastPage,
startIndex: begin,
endIndex: end - 1,
};
}
// Return the response
return [
200,
{
casinos,
pagination,
},
];
});
// -----------------------------------------------------------------------------------------------------
// @ Casino - GET
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
.onGet('api/apps/game/casino/casino')
.reply(({ request }) => {
// Get the id from the params
const id = request.params.get('id');
// Clone the casinos
const casinos = cloneDeep(this._casinos);
// Find the casino
const casino = casinos.find((item: any) => item.id === id);
// Return the response
return [200, casino];
});
// -----------------------------------------------------------------------------------------------------
// @ Casino - POST
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService.onPost('api/apps/gmae/casino/casino').reply(() => {
// Generate a new casino
const newCasino = {
id: FuseMockApiUtils.guid(),
startDate: '',
finishDate: '',
totalBetting: '',
winningMoney: '',
proceedingMoney: '',
calculate: '',
index: '',
division: '',
rank: '',
nickname: '',
bettingProgress: '',
odds: '',
bettingMoney: '',
hitMoney: '',
bettingTime: '',
result: '',
delete: '',
};
// Unshift the new casino
this._casinos.unshift(newCasino);
// Return the response
return [200, newCasino];
});
// -----------------------------------------------------------------------------------------------------
// @ Casino - PATCH
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
.onPatch('api/apps/game/casino/casino')
.reply(({ request }) => {
// Get the id and casino
const id = request.body.id;
const casino = cloneDeep(request.body.casino);
// Prepare the updated casino
let updatedCasino = null;
// Find the casino and update it
this._casinos.forEach((item, index, casinos) => {
if (item.id === id) {
// Update the casino
casinos[index] = assign({}, casinos[index], casino);
// Store the updated casino
updatedCasino = casinos[index];
}
});
// Return the response
return [200, updatedCasino];
});
// -----------------------------------------------------------------------------------------------------
// @ Casino - DELETE
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
.onDelete('api/apps/game/casino/casino')
.reply(({ request }) => {
// Get the id
const id = request.params.get('id');
// Find the casino and delete it
this._casinos.forEach((item, index) => {
if (item.id === id) {
this._casinos.splice(index, 1);
}
});
// Return the response
return [200, true];
});
}
}

View File

@ -0,0 +1,57 @@
/* eslint-disable */
export const casinos = [
{
startDate: '2022-06-01 00:00',
finishDate: '2022-06-21 23:59',
availableBetting: 12440000,
bettingMoney: 12751000,
winningMoney: 12198950,
cancel: 10000,
betWinCancel: 542050,
mainofficeRolling: 60202,
branchRolling: 36390,
divisionRolling: 24828,
officeRolling: 24752,
storeRolling: 13451,
memberRolling: 81037,
totalrolling: 240660,
highRank: '[매장]kgon5',
gameId: 'ks1_1007',
siteId: 'aa100',
nickname: 'aa100',
gameName: '에볼류션 카지노',
gameInfo1: 'Speed Baccarat J',
gameInfo2: '62ae9beb396a5971c3921297',
gameInfo3: '62ae9bdd396a5971c3921033',
form: '패',
beforeWinning: 69831,
winning: 0,
afterWinning: 69831,
bettingInfo1: 'Banker',
bettingInfo2: 8000,
bettingInfo3: 0,
data: '데이터확인',
comp: '-',
mainofficeName: '',
mainofficePercent: '',
mainofficePoint: '',
branchName: '',
branchPercent: '',
branchPoint: '',
divisionName: '',
divisionPercent: '',
divisionPoint: '',
officeName: '',
officePercent: '',
officePoint: '',
storeName: '',
storePercent: '',
storePoint: '',
memberName: '',
memberPercent: '',
memberPoint: '',
bettingTime: '2022-06-01 23:22',
registrationTime: '2022-06-01 23:22',
},
];

View File

@ -0,0 +1,216 @@
import { Injectable } from '@angular/core';
import { assign, cloneDeep } from 'lodash-es';
import { FuseMockApiService, FuseMockApiUtils } from '@fuse/lib/mock-api';
import { evolutions as evolutionsData } from './data';
@Injectable({
providedIn: 'root',
})
export class GameEvolutionMockApi {
private _evolutions: any[] = evolutionsData;
/**
* Constructor
*/
constructor(private _fuseMockApiService: FuseMockApiService) {
// Register Mock API handlers
this.registerHandlers();
}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Register Mock API handlers
*/
registerHandlers(): void {
// -----------------------------------------------------------------------------------------------------
// @ Evolutions - GET
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
.onGet('api/apps/game/evolution/evolutions', 300)
.reply(({ request }) => {
// Get available queries
const search = request.params.get('search');
const sort = request.params.get('sort') || 'name';
const order = request.params.get('order') || 'asc';
const page = parseInt(request.params.get('page') ?? '1', 10);
const size = parseInt(request.params.get('size') ?? '10', 10);
// Clone the evolutions
let evolutions: any[] | null = cloneDeep(this._evolutions);
// Sort the evolutions
if (sort === 'sku' || sort === 'name' || sort === 'active') {
evolutions.sort((a, b) => {
const fieldA = a[sort].toString().toUpperCase();
const fieldB = b[sort].toString().toUpperCase();
return order === 'asc'
? fieldA.localeCompare(fieldB)
: fieldB.localeCompare(fieldA);
});
} else {
evolutions.sort((a, b) =>
order === 'asc' ? a[sort] - b[sort] : b[sort] - a[sort]
);
}
// If search exists...
if (search) {
// Filter the evolutions
evolutions = evolutions.filter(
(contact: any) =>
contact.name &&
contact.name.toLowerCase().includes(search.toLowerCase())
);
}
// Paginate - Start
const evolutionsLength = evolutions.length;
// Calculate pagination details
const begin = page * size;
const end = Math.min(size * (page + 1), evolutionsLength);
const lastPage = Math.max(Math.ceil(evolutionsLength / size), 1);
// Prepare the pagination object
let pagination = {};
// If the requested page number is bigger than
// the last possible page number, return null for
// evolutions but also send the last possible page so
// the app can navigate to there
if (page > lastPage) {
evolutions = null;
pagination = {
lastPage,
};
} else {
// Paginate the results by size
evolutions = evolutions.slice(begin, end);
// Prepare the pagination mock-api
pagination = {
length: evolutionsLength,
size: size,
page: page,
lastPage: lastPage,
startIndex: begin,
endIndex: end - 1,
};
}
// Return the response
return [
200,
{
evolutions,
pagination,
},
];
});
// -----------------------------------------------------------------------------------------------------
// @ Evolution - GET
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
.onGet('api/apps/game/evolution/evolution')
.reply(({ request }) => {
// Get the id from the params
const id = request.params.get('id');
// Clone the evolutions
const evolutions = cloneDeep(this._evolutions);
// Find the evolution
const evolution = evolutions.find((item: any) => item.id === id);
// Return the response
return [200, evolution];
});
// -----------------------------------------------------------------------------------------------------
// @ Evolution - POST
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
.onPost('api/apps/gmae/evolution/evolution')
.reply(() => {
// Generate a new evolution
const newEvolution = {
id: FuseMockApiUtils.guid(),
startDate: '',
finishDate: '',
totalBetting: '',
winningMoney: '',
proceedingMoney: '',
calculate: '',
index: '',
division: '',
rank: '',
nickname: '',
bettingProgress: '',
odds: '',
bettingMoney: '',
hitMoney: '',
bettingTime: '',
result: '',
delete: '',
};
// Unshift the new evolution
this._evolutions.unshift(newEvolution);
// Return the response
return [200, newEvolution];
});
// -----------------------------------------------------------------------------------------------------
// @ Evolution - PATCH
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
.onPatch('api/apps/game/evolution/evolution')
.reply(({ request }) => {
// Get the id and evolution
const id = request.body.id;
const evolution = cloneDeep(request.body.evolution);
// Prepare the updated evolution
let updatedEvolution = null;
// Find the evolution and update it
this._evolutions.forEach((item, index, evolutions) => {
if (item.id === id) {
// Update the evolution
evolutions[index] = assign({}, evolutions[index], evolution);
// Store the updated evolution
updatedEvolution = evolutions[index];
}
});
// Return the response
return [200, updatedEvolution];
});
// -----------------------------------------------------------------------------------------------------
// @ Evolution - DELETE
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
.onDelete('api/apps/game/evolution/evolution')
.reply(({ request }) => {
// Get the id
const id = request.params.get('id');
// Find the evolution and delete it
this._evolutions.forEach((item, index) => {
if (item.id === id) {
this._evolutions.splice(index, 1);
}
});
// Return the response
return [200, true];
});
}
}

View File

@ -0,0 +1,62 @@
/* eslint-disable */
export const evolutions = [
{
startDate: '2022-06-01 00:00',
finishDate: '2022-06-21 23:59',
availableBetting: 11545000,
bettingMoney: 11811000,
winningMoney: 11405200,
cancel: 0,
betWinCancel: 405800,
mainofficeRolling: 58114,
branchRolling: 34514,
divisionRolling: 23058,
officeRolling: 22982,
storeRolling: 11787,
memberRolling: 80295,
totalrolling: 230750,
highRank: '[매장]kgon5',
gameId: 'ks1_1007',
id: 'aa100',
nickname: 'aa100',
gameName: '에볼류션 카지노',
gameInfo1: 'Speed Baccarat J',
gameInfo2: '',
gameInfo3: '62ae9bdd396a5971c3921033',
form: '',
betting: 8000,
profitLoss: -8000,
beforeWinning: 69831,
winning: 0,
afterWinning: 69831,
beforeBetting: 77831,
afterBetting: 69831,
finalMoney: 69831,
bettingInfo1: 'Banker',
bettingInfo2: 8000,
bettingInfo3: 0,
data: '데이터확인',
comp: 'Y',
mainofficeName: 'kgon1',
mainofficePercent: '0.50',
mainofficePoint: '40.00',
branchName: 'kgon2',
branchPercent: '0.30',
branchPoint: '24.00',
divisionName: 'kgon3',
divisionPercent: '0.20',
divisionPoint: '16.00',
officeName: 'kgon4',
officePercent: '0.20',
officePoint: '16.00',
storeName: 'kgon5',
storePercent: '0.10',
storePoint: '8.00',
memberName: 'aa100',
memberPercent: '0.70',
memberPoint: '56.00',
bettingTime: '2022-06-19 12:44:33',
registrationTime: '2022-06-19 12:47:02',
},
];

View File

@ -0,0 +1,214 @@
import { Injectable } from '@angular/core';
import { assign, cloneDeep } from 'lodash-es';
import { FuseMockApiService, FuseMockApiUtils } from '@fuse/lib/mock-api';
import { slots as slotsData } from './data';
@Injectable({
providedIn: 'root',
})
export class GameSlotMockApi {
private _slots: any[] = slotsData;
/**
* Constructor
*/
constructor(private _fuseMockApiService: FuseMockApiService) {
// Register Mock API handlers
this.registerHandlers();
}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Register Mock API handlers
*/
registerHandlers(): void {
// -----------------------------------------------------------------------------------------------------
// @ Slots - GET
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
.onGet('api/apps/game/slot/slots', 300)
.reply(({ request }) => {
// Get available queries
const search = request.params.get('search');
const sort = request.params.get('sort') || 'name';
const order = request.params.get('order') || 'asc';
const page = parseInt(request.params.get('page') ?? '1', 10);
const size = parseInt(request.params.get('size') ?? '10', 10);
// Clone the slots
let slots: any[] | null = cloneDeep(this._slots);
// Sort the slots
if (sort === 'sku' || sort === 'name' || sort === 'active') {
slots.sort((a, b) => {
const fieldA = a[sort].toString().toUpperCase();
const fieldB = b[sort].toString().toUpperCase();
return order === 'asc'
? fieldA.localeCompare(fieldB)
: fieldB.localeCompare(fieldA);
});
} else {
slots.sort((a, b) =>
order === 'asc' ? a[sort] - b[sort] : b[sort] - a[sort]
);
}
// If search exists...
if (search) {
// Filter the slots
slots = slots.filter(
(contact: any) =>
contact.name &&
contact.name.toLowerCase().includes(search.toLowerCase())
);
}
// Paginate - Start
const slotsLength = slots.length;
// Calculate pagination details
const begin = page * size;
const end = Math.min(size * (page + 1), slotsLength);
const lastPage = Math.max(Math.ceil(slotsLength / size), 1);
// Prepare the pagination object
let pagination = {};
// If the requested page number is bigger than
// the last possible page number, return null for
// slots but also send the last possible page so
// the app can navigate to there
if (page > lastPage) {
slots = null;
pagination = {
lastPage,
};
} else {
// Paginate the results by size
slots = slots.slice(begin, end);
// Prepare the pagination mock-api
pagination = {
length: slotsLength,
size: size,
page: page,
lastPage: lastPage,
startIndex: begin,
endIndex: end - 1,
};
}
// Return the response
return [
200,
{
slots,
pagination,
},
];
});
// -----------------------------------------------------------------------------------------------------
// @ Slot - GET
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
.onGet('api/apps/game/slot/slot')
.reply(({ request }) => {
// Get the id from the params
const id = request.params.get('id');
// Clone the slots
const slots = cloneDeep(this._slots);
// Find the slot
const slot = slots.find((item: any) => item.id === id);
// Return the response
return [200, slot];
});
// -----------------------------------------------------------------------------------------------------
// @ Slot - POST
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService.onPost('api/apps/gmae/slot/slot').reply(() => {
// Generate a new slot
const newSlot = {
id: FuseMockApiUtils.guid(),
startDate: '',
finishDate: '',
totalBetting: '',
winningMoney: '',
proceedingMoney: '',
calculate: '',
index: '',
division: '',
rank: '',
nickname: '',
bettingProgress: '',
odds: '',
bettingMoney: '',
hitMoney: '',
bettingTime: '',
result: '',
delete: '',
};
// Unshift the new slot
this._slots.unshift(newSlot);
// Return the response
return [200, newSlot];
});
// -----------------------------------------------------------------------------------------------------
// @ Slot - PATCH
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
.onPatch('api/apps/game/slot/slot')
.reply(({ request }) => {
// Get the id and slot
const id = request.body.id;
const slot = cloneDeep(request.body.slot);
// Prepare the updated slot
let updatedSlot = null;
// Find the slot and update it
this._slots.forEach((item, index, slots) => {
if (item.id === id) {
// Update the slot
slots[index] = assign({}, slots[index], slot);
// Store the updated slot
updatedSlot = slots[index];
}
});
// Return the response
return [200, updatedSlot];
});
// -----------------------------------------------------------------------------------------------------
// @ Slot - DELETE
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
.onDelete('api/apps/game/slot/slot')
.reply(({ request }) => {
// Get the id
const id = request.params.get('id');
// Find the slot and delete it
this._slots.forEach((item, index) => {
if (item.id === id) {
this._slots.splice(index, 1);
}
});
// Return the response
return [200, true];
});
}
}

View File

@ -0,0 +1,62 @@
/* eslint-disable */
export const slots = [
{
startDate: '2022-06-01 00:00',
finishDate: '2022-06-21 23:59',
availableBetting: 11545000,
bettingMoney: 11811000,
winningMoney: 11405200,
cancel: 0,
betWinCancel: 405800,
mainofficeRolling: 58114,
branchRolling: 34514,
divisionRolling: 23058,
officeRolling: 22982,
storeRolling: 11787,
memberRolling: 80295,
totalrolling: 230750,
highRank: '[매장]kgon5',
gameId: 'ks1_1007',
id: 'aa100',
nickname: 'aa100',
gameName: '프라그마틱슬롯',
gameInfo1: '스타라이트 프린세스',
gameInfo2: '',
gameInfo3: '62afded8114e77723a93caa2',
form: '배팅',
betting: 800,
profitLoss: 0,
beforeWinning: 69831,
winning: 0,
afterWinning: 69831,
beforeBetting: 187730,
afterBetting: 186903,
finalMoney: 69831,
bettingInfo1: 'Banker',
bettingInfo2: 8000,
bettingInfo3: 0,
data: '',
comp: 'Y',
mainofficeName: 'kgon1',
mainofficePercent: '2.80',
mainofficePoint: '22.40',
branchName: 'kgon2',
branchPercent: '0.20',
branchPoint: '1.60',
divisionName: 'kgon3',
divisionPercent: '0.20',
divisionPoint: '1.60',
officeName: 'kgon4',
officePercent: '0.30',
officePoint: '2.40',
storeName: 'kgon5',
storePercent: '1.50',
storePoint: '12.00',
memberName: '',
memberPercent: '',
memberPoint: '',
bettingTime: '2022-06-20 11:43:37',
registrationTime: '2022-06-20 11:45:02',
},
];

View File

@ -0,0 +1,217 @@
import { Injectable } from '@angular/core';
import { assign, cloneDeep } from 'lodash-es';
import { FuseMockApiService, FuseMockApiUtils } from '@fuse/lib/mock-api';
import { casinomoneys as casinomoneysData } from './data';
@Injectable({
providedIn: 'root',
})
export class MemberCasinomoneyMockApi {
private _casinomoneys: any[] = casinomoneysData;
/**
* Constructor
*/
constructor(private _fuseMockApiService: FuseMockApiService) {
// Register Mock API handlers
this.registerHandlers();
}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Register Mock API handlers
*/
registerHandlers(): void {
// -----------------------------------------------------------------------------------------------------
// @ Casinomoneys - GET
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
.onGet('api/apps/member/casinomoney/casinomoneys', 300)
.reply(({ request }) => {
// Get available queries
const search = request.params.get('search');
const sort = request.params.get('sort') || 'name';
const order = request.params.get('order') || 'asc';
const page = parseInt(request.params.get('page') ?? '1', 10);
const size = parseInt(request.params.get('size') ?? '10', 10);
// Clone the casinomoneys
let casinomoneys: any[] | null = cloneDeep(this._casinomoneys);
// Sort the casinomoneys
if (sort === 'sku' || sort === 'name' || sort === 'active') {
casinomoneys.sort((a, b) => {
const fieldA = a[sort].toString().toUpperCase();
const fieldB = b[sort].toString().toUpperCase();
return order === 'asc'
? fieldA.localeCompare(fieldB)
: fieldB.localeCompare(fieldA);
});
} else {
casinomoneys.sort((a, b) =>
order === 'asc' ? a[sort] - b[sort] : b[sort] - a[sort]
);
}
// If search exists...
if (search) {
// Filter the casinomoneys
casinomoneys = casinomoneys.filter(
(contact: any) =>
contact.name &&
contact.name.toLowerCase().includes(search.toLowerCase())
);
}
// Paginate - Start
const casinomoneysLength = casinomoneys.length;
// Calculate pagination details
const begin = page * size;
const end = Math.min(size * (page + 1), casinomoneysLength);
const lastPage = Math.max(Math.ceil(casinomoneysLength / size), 1);
// Prepare the pagination object
let pagination = {};
// If the requested page number is bigger than
// the last possible page number, return null for
// casinomoneys but also send the last possible page so
// the app can navigate to there
if (page > lastPage) {
casinomoneys = null;
pagination = {
lastPage,
};
} else {
// Paginate the results by size
casinomoneys = casinomoneys.slice(begin, end);
// Prepare the pagination mock-api
pagination = {
length: casinomoneysLength,
size: size,
page: page,
lastPage: lastPage,
startIndex: begin,
endIndex: end - 1,
};
}
// Return the response
return [
200,
{
casinomoneys,
pagination,
},
];
});
// -----------------------------------------------------------------------------------------------------
// @ Casinomoney - GET
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
.onGet('api/apps/member/casinomoney/casinomoney')
.reply(({ request }) => {
// Get the id from the params
const id = request.params.get('id');
// Clone the casinomoneys
const casinomoneys = cloneDeep(this._casinomoneys);
// Find the casinomoney
const casinomoney = casinomoneys.find((item: any) => item.id === id);
// Return the response
return [200, casinomoney];
});
// -----------------------------------------------------------------------------------------------------
// @ Casinomoney - POST
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
.onPost('api/apps/member/casinomoney/casinomoney')
.reply(() => {
// Generate a new casinomoney
const newCasinomoney = {
id: FuseMockApiUtils.guid(),
category: '',
name: 'A New User',
description: '',
tags: [],
sku: '',
barcode: '',
brand: '',
vendor: '',
stock: '',
reserved: '',
cost: '',
basePrice: '',
taxPercent: '',
price: '',
weight: '',
thumbnail: '',
images: [],
active: false,
};
// Unshift the new casinomoney
this._casinomoneys.unshift(newCasinomoney);
// Return the response
return [200, newCasinomoney];
});
// -----------------------------------------------------------------------------------------------------
// @ Casinomoney - PATCH
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
.onPatch('api/apps/member/casinomoney/casinomoney')
.reply(({ request }) => {
// Get the id and casinomoney
const id = request.body.id;
const casinomoney = cloneDeep(request.body.casinomoney);
// Prepare the updated casinomoney
let updatedCasinomoney = null;
// Find the casinomoney and update it
this._casinomoneys.forEach((item, index, casinomoneys) => {
if (item.id === id) {
// Update the casinomoney
casinomoneys[index] = assign({}, casinomoneys[index], casinomoney);
// Store the updated casinomoney
updatedCasinomoney = casinomoneys[index];
}
});
// Return the response
return [200, updatedCasinomoney];
});
// -----------------------------------------------------------------------------------------------------
// @ Casinomoney - DELETE
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
.onDelete('api/apps/member/casinomoney/casinomoney')
.reply(({ request }) => {
// Get the id
const id = request.params.get('id');
// Find the casinomoney and delete it
this._casinomoneys.forEach((item, index) => {
if (item.id === id) {
this._casinomoneys.splice(index, 1);
}
});
// Return the response
return [200, true];
});
}
}

View File

@ -0,0 +1,714 @@
/* eslint-disable */
export const casinomoneys = [
{
id: 'dsa01233',
category: 'b899ec30-b85a-40ab-bb1f-18a596d5c6de',
name: 'Benton Mens Automatic Watch 44mm 5 ATM',
description:
'Velit irure deserunt aliqua officia. Eiusmod quis sunt magna laboris aliquip non dolor consequat cupidatat dolore esse. Consectetur mollit officia laborum fugiat nulla duis ad excepteur do aliqua fugiat. Fugiat non laboris exercitation ipsum in incididunt.',
tags: [
'167190fa-51b4-45fc-a742-8ce1b33d24ea',
'0fc39efd-f640-41f8-95a5-3f1d749df200',
'8837b93f-388b-43cc-851d-4ca8f23f3a61',
'2300ac48-f268-466a-b765-8b878b6e14a7',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'ADH-1921',
barcode: '8808746892183',
brand: 'e1789f32-9475-43e7-9256-451d2e3a2282',
vendor: '987dd10a-43b1-49f9-bfd9-05bb2dbc7029',
stock: 30,
reserved: 3,
cost: 390.63,
basePrice: 950,
taxPercent: 10,
price: 1045,
weight: 0.76,
thumbnail: null,
images: [
'assets/images/apps/ecommerce/products/watch-03-01.jpg',
'assets/images/apps/ecommerce/products/watch-03-02.jpg',
'assets/images/apps/ecommerce/products/watch-03-03.jpg',
],
active: false,
highRank: '[매장]xcxc2233',
rank: '회원',
level: 1,
nickname: '아메리카노',
accountHolder: '홍길동',
contact: '01012341234',
cash: 0,
comp: 60020,
coupon: 0,
gameMoney: 364750,
todayComp: 0,
deposit: 500000,
withdraw: 0,
margin: 500000,
accession: '2022-04-23 15:42',
final: '',
ip: '',
state: '2022-06-07',
top: '정상',
},
{
id: '8fcce528-d878-4cc8-99f7-bd3451ed5405',
category: 'b899ec30-b85a-40ab-bb1f-18a596d5c6de',
name: 'Capmia Mens Chronograph Watch 44mm 10 ATM',
description:
'Velit nisi proident cupidatat exercitation occaecat et adipisicing nostrud id ex nostrud sint. Qui fugiat velit minim amet reprehenderit voluptate velit exercitation proident Lorem nisi culpa. Commodo quis officia officia eiusmod mollit aute fugiat duis quis minim culpa in. Exercitation laborum fugiat ex excepteur officia reprehenderit magna ipsum. Laboris dolore nostrud id labore sint consectetur aliqua tempor ea aute do.',
tags: [
'167190fa-51b4-45fc-a742-8ce1b33d24ea',
'7d6dd47e-7472-4f8b-93d4-46c114c44533',
'8837b93f-388b-43cc-851d-4ca8f23f3a61',
'0b11b742-3125-4d75-9a6f-84af7fde1969',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'EAP-7752',
barcode: '8866355574164',
brand: '61d52c2a-8947-4a2c-8c35-f36baef45b96',
vendor: '987dd10a-43b1-49f9-bfd9-05bb2dbc7029',
stock: 37,
reserved: 4,
cost: 395.37,
basePrice: 839,
taxPercent: 30,
price: 1090.7,
weight: 0.62,
thumbnail: 'assets/images/apps/ecommerce/products/watch-04-thumb.jpg',
images: [
'assets/images/apps/ecommerce/products/watch-04-01.jpg',
'assets/images/apps/ecommerce/products/watch-04-02.jpg',
'assets/images/apps/ecommerce/products/watch-04-03.jpg',
],
active: true,
},
{
id: 'onon6',
category: '07986d93-d4eb-4de1-9448-2538407f7254',
name: 'Benton Ladies Automatic Watch 40mm 5 ATM',
description:
'Pariatur proident labore commodo consequat qui et. Ad labore fugiat consectetur ea magna dolore mollit consequat reprehenderit laborum ad mollit eiusmod. Esse laboris voluptate ullamco occaecat labore esse laboris enim ipsum aliquip ipsum. Ea ea proident eu enim anim mollit non consequat enim nulla.',
tags: [
'3baea410-a7d6-4916-b79a-bdce50c37f95',
'0fc39efd-f640-41f8-95a5-3f1d749df200',
'8f868ddb-d4a2-461d-bc3b-d7c8668687c3',
'2300ac48-f268-466a-b765-8b878b6e14a7',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'ADP-5745',
barcode: '8390590339828',
brand: 'e1789f32-9475-43e7-9256-451d2e3a2282',
vendor: '05ebb527-d733-46a9-acfb-a4e4ec960024',
stock: 12,
reserved: 3,
cost: 442.61,
basePrice: 961,
taxPercent: 20,
price: 1153.2,
weight: 0.67,
thumbnail: 'assets/images/apps/ecommerce/products/watch-05-thumb.jpg',
images: [
'assets/images/apps/ecommerce/products/watch-05-01.jpg',
'assets/images/apps/ecommerce/products/watch-05-02.jpg',
'assets/images/apps/ecommerce/products/watch-05-03.jpg',
],
active: false,
highRank: '[총판]on03',
rank: '매장',
level: 1,
nickname: '가가가',
accountHolder: '가가가',
contact: '1111',
cash: 0,
comp: 0,
coupon: 0,
gameMoney: 0,
todayComp: 0,
deposit: 200000,
withdraw: 0,
margin: 200000,
accession: '2022-06-12 16:02',
final: '2022-06-20 15:41',
ip: '175.198.74.36',
},
{
id: 'd7a47d7c-4cdf-4319-bbaa-37ade38c622c',
category: 'b899ec30-b85a-40ab-bb1f-18a596d5c6de',
name: 'Benton Mens Chronograph Watch 44mm 10 ATM',
description:
'Nulla enim reprehenderit proident ut Lorem laborum cillum eiusmod est ex anim. Nisi non non laboris excepteur ullamco elit do duis anim esse labore aliqua adipisicing velit. Deserunt magna exercitation cillum amet.',
tags: [
'167190fa-51b4-45fc-a742-8ce1b33d24ea',
'7d6dd47e-7472-4f8b-93d4-46c114c44533',
'8837b93f-388b-43cc-851d-4ca8f23f3a61',
'0b11b742-3125-4d75-9a6f-84af7fde1969',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'ATV-2569',
barcode: '8238990048137',
brand: 'e1789f32-9475-43e7-9256-451d2e3a2282',
vendor: '987dd10a-43b1-49f9-bfd9-05bb2dbc7029',
stock: 36,
reserved: 2,
cost: 563.43,
basePrice: 1370,
taxPercent: 30,
price: 1781,
weight: 0.62,
thumbnail: 'assets/images/apps/ecommerce/products/watch-06-thumb.jpg',
images: [
'assets/images/apps/ecommerce/products/watch-06-01.jpg',
'assets/images/apps/ecommerce/products/watch-06-02.jpg',
'assets/images/apps/ecommerce/products/watch-06-03.jpg',
],
active: true,
},
{
id: 'ecf0b3df-38c3-45dc-972b-c509a3dc053e',
category: 'b899ec30-b85a-40ab-bb1f-18a596d5c6de',
name: 'Benton Mens Chronograph Watch 44mm 10 ATM',
description:
'Esse culpa ut ullamco dolore quis adipisicing. Minim veniam quis magna officia non. In pariatur nostrud nisi eiusmod minim anim id. Commodo ex incididunt dolor ad id aliqua incididunt minim in Lorem reprehenderit. Commodo ullamco consectetur aliqua Lorem cupidatat esse veniam consectetur sint veniam duis commodo.',
tags: [
'167190fa-51b4-45fc-a742-8ce1b33d24ea',
'7d6dd47e-7472-4f8b-93d4-46c114c44533',
'8837b93f-388b-43cc-851d-4ca8f23f3a61',
'0b11b742-3125-4d75-9a6f-84af7fde1969',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'EAH-2563',
barcode: '8638426908385',
brand: 'e1789f32-9475-43e7-9256-451d2e3a2282',
vendor: '987dd10a-43b1-49f9-bfd9-05bb2dbc7029',
stock: 35,
reserved: 5,
cost: 705.26,
basePrice: 1721,
taxPercent: 20,
price: 2065.2,
weight: 0.67,
thumbnail: 'assets/images/apps/ecommerce/products/watch-07-thumb.jpg',
images: [
'assets/images/apps/ecommerce/products/watch-07-01.jpg',
'assets/images/apps/ecommerce/products/watch-07-02.jpg',
'assets/images/apps/ecommerce/products/watch-07-03.jpg',
],
active: false,
},
{
id: '5765080a-aaee-40b9-86be-c18b9d79c73c',
category: 'ad12aa94-3863-47f8-acab-a638ef02a3e9',
name: 'Benton Unisex Automatic Watch 40mm 10 ATM',
description:
'Anim duis nisi ut ex amet reprehenderit cillum consequat pariatur ipsum elit voluptate excepteur non. Anim enim proident laboris pariatur mollit quis incididunt labore. Incididunt tempor aliquip ex labore ad consequat cillum est sunt anim dolor. Dolore adipisicing non nulla cillum Lorem deserunt. Nostrud incididunt amet sint velit.',
tags: [
'8ec8f60d-552f-4216-9f11-462b95b1d306',
'0fc39efd-f640-41f8-95a5-3f1d749df200',
'8f868ddb-d4a2-461d-bc3b-d7c8668687c3',
'0b11b742-3125-4d75-9a6f-84af7fde1969',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'ATH-6399',
barcode: '8881883828441',
brand: 'e1789f32-9475-43e7-9256-451d2e3a2282',
vendor: '05ebb527-d733-46a9-acfb-a4e4ec960024',
stock: 17,
reserved: 5,
cost: 624.12,
basePrice: 1448,
taxPercent: 10,
price: 1592.8,
weight: 0.55,
thumbnail: 'assets/images/apps/ecommerce/products/watch-08-thumb.jpg',
images: [
'assets/images/apps/ecommerce/products/watch-08-01.jpg',
'assets/images/apps/ecommerce/products/watch-08-02.jpg',
'assets/images/apps/ecommerce/products/watch-08-03.jpg',
],
active: false,
},
{
id: '6e71be88-b225-474c-91e5-111ced7d6220',
category: '07986d93-d4eb-4de1-9448-2538407f7254',
name: 'Premera Ladies Chronograph Watch 40mm 5 ATM',
description:
'Velit fugiat adipisicing ut quis anim deserunt ex culpa nostrud laborum. Consectetur duis velit esse commodo voluptate magna dolor in enim exercitation. Ea aliquip cupidatat aute dolor tempor magna id laboris nulla eiusmod ut amet. Veniam irure ex incididunt officia commodo eiusmod nostrud ad consequat commodo ad voluptate.',
tags: [
'3baea410-a7d6-4916-b79a-bdce50c37f95',
'7d6dd47e-7472-4f8b-93d4-46c114c44533',
'8f868ddb-d4a2-461d-bc3b-d7c8668687c3',
'2300ac48-f268-466a-b765-8b878b6e14a7',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'ELH-2495',
barcode: '8268777127281',
brand: '5913ee46-a497-41db-a118-ee506011529f',
vendor: '05ebb527-d733-46a9-acfb-a4e4ec960024',
stock: 49,
reserved: 5,
cost: 738.91,
basePrice: 1848,
taxPercent: 30,
price: 2402.4,
weight: 0.54,
thumbnail: 'assets/images/apps/ecommerce/products/watch-09-thumb.jpg',
images: [
'assets/images/apps/ecommerce/products/watch-09-01.jpg',
'assets/images/apps/ecommerce/products/watch-09-02.jpg',
'assets/images/apps/ecommerce/products/watch-09-03.jpg',
],
active: false,
},
{
id: '51242500-6983-4a78-bff3-d278eb4e3a57',
category: 'b899ec30-b85a-40ab-bb1f-18a596d5c6de',
name: 'Lara Mens Automatic Watch 44mm 10 ATM',
description:
'Enim laboris ut non elit dolore est consectetur. Duis irure minim elit velit anim incididunt minim ipsum ullamco ad dolore sunt. Proident aute proident velit elit ex reprehenderit ut. Lorem laborum excepteur elit proident sunt ipsum incididunt id do. Occaecat proident proident qui aute officia cupidatat aliqua aliqua nostrud proident laboris est ad qui. Magna eiusmod amet ut pariatur esse nisi aliquip deserunt minim ad et ea occaecat. Sunt enim cupidatat id eiusmod ea aute quis excepteur irure commodo dolore excepteur.',
tags: [
'167190fa-51b4-45fc-a742-8ce1b33d24ea',
'0fc39efd-f640-41f8-95a5-3f1d749df200',
'8837b93f-388b-43cc-851d-4ca8f23f3a61',
'0b11b742-3125-4d75-9a6f-84af7fde1969',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'ATT-6019',
barcode: '8452763551765',
brand: 'f9987124-7ada-4b93-bef7-35280b3ddbd7',
vendor: '998b0c07-abfd-4ba3-8de1-7563ef3c4d57',
stock: 24,
reserved: 4,
cost: 688.89,
basePrice: 1502,
taxPercent: 8,
price: 1622.16,
weight: 0.76,
thumbnail: 'assets/images/apps/ecommerce/products/watch-10-thumb.jpg',
images: [
'assets/images/apps/ecommerce/products/watch-10-01.jpg',
'assets/images/apps/ecommerce/products/watch-10-02.jpg',
'assets/images/apps/ecommerce/products/watch-10-03.jpg',
],
active: true,
},
{
id: '844a4395-233f-4ffb-85bd-7baa0e490a88',
category: 'b899ec30-b85a-40ab-bb1f-18a596d5c6de',
name: 'Lara Mens Chronograph Watch 44mm 5 ATM',
description:
'Labore irure qui sunt consectetur. Elit nulla id cillum duis. Nulla nulla eu occaecat eiusmod duis irure id do esse. Ad eu incididunt voluptate amet nostrud ullamco mollit dolore occaecat cupidatat nisi reprehenderit. Proident fugiat laborum sit velit ea voluptate.',
tags: [
'167190fa-51b4-45fc-a742-8ce1b33d24ea',
'7d6dd47e-7472-4f8b-93d4-46c114c44533',
'8837b93f-388b-43cc-851d-4ca8f23f3a61',
'2300ac48-f268-466a-b765-8b878b6e14a7',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'ADH-2335',
barcode: '8385907318041',
brand: 'f9987124-7ada-4b93-bef7-35280b3ddbd7',
vendor: '05ebb527-d733-46a9-acfb-a4e4ec960024',
stock: 44,
reserved: 3,
cost: 708.41,
basePrice: 1467,
taxPercent: 18,
price: 1731.06,
weight: 0.7,
thumbnail: 'assets/images/apps/ecommerce/products/watch-11-thumb.jpg',
images: [
'assets/images/apps/ecommerce/products/watch-11-01.jpg',
'assets/images/apps/ecommerce/products/watch-11-02.jpg',
'assets/images/apps/ecommerce/products/watch-11-03.jpg',
],
active: false,
},
{
id: '7520f1b6-3c45-46ef-a4d5-881971212d1e',
category: 'ad12aa94-3863-47f8-acab-a638ef02a3e9',
name: 'Benton Unisex Automatic Watch 40mm 10 ATM',
description:
'Esse nisi amet occaecat culpa aliqua est ad ea velit. Consectetur in voluptate sit pariatur eiusmod exercitation eu aute occaecat in duis. Voluptate consectetur eu commodo proident id sunt labore irure.',
tags: [
'8ec8f60d-552f-4216-9f11-462b95b1d306',
'0fc39efd-f640-41f8-95a5-3f1d749df200',
'8f868ddb-d4a2-461d-bc3b-d7c8668687c3',
'0b11b742-3125-4d75-9a6f-84af7fde1969',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'ATH-3064',
barcode: '8608510561856',
brand: 'e1789f32-9475-43e7-9256-451d2e3a2282',
vendor: '998b0c07-abfd-4ba3-8de1-7563ef3c4d57',
stock: 25,
reserved: 2,
cost: 731.94,
basePrice: 1743,
taxPercent: 10,
price: 1917.3,
weight: 0.47,
thumbnail: 'assets/images/apps/ecommerce/products/watch-12-thumb.jpg',
images: [
'assets/images/apps/ecommerce/products/watch-12-01.jpg',
'assets/images/apps/ecommerce/products/watch-12-02.jpg',
'assets/images/apps/ecommerce/products/watch-12-03.jpg',
],
active: false,
},
{
id: '683e41d8-6ebc-4e6a-a7c1-9189ca52ef19',
category: 'b899ec30-b85a-40ab-bb1f-18a596d5c6de',
name: 'Zeon Mens Chronograph Watch 44mm 10 ATM',
description:
'Eu irure do cupidatat esse in. Aliqua laborum deserunt qui Lorem deserunt minim fugiat deserunt voluptate minim. Anim nulla tempor eiusmod ad exercitation reprehenderit officia. Nisi proident labore eu anim excepteur aliqua occaecat. Laboris nostrud ipsum commodo cupidatat.',
tags: [
'167190fa-51b4-45fc-a742-8ce1b33d24ea',
'7d6dd47e-7472-4f8b-93d4-46c114c44533',
'8837b93f-388b-43cc-851d-4ca8f23f3a61',
'0b11b742-3125-4d75-9a6f-84af7fde1969',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'ADV-3188',
barcode: '8334758988643',
brand: '2c4d98d8-f334-4125-9596-862515f5526b',
vendor: '987dd10a-43b1-49f9-bfd9-05bb2dbc7029',
stock: 14,
reserved: 5,
cost: 375.76,
basePrice: 786,
taxPercent: 30,
price: 1021.8,
weight: 0.53,
thumbnail: 'assets/images/apps/ecommerce/products/watch-13-thumb.jpg',
images: [
'assets/images/apps/ecommerce/products/watch-13-01.jpg',
'assets/images/apps/ecommerce/products/watch-13-02.jpg',
'assets/images/apps/ecommerce/products/watch-13-03.jpg',
],
active: false,
},
{
id: 'd4e52238-292d-462b-b9bb-1751030132e2',
category: 'ad12aa94-3863-47f8-acab-a638ef02a3e9',
name: 'Lara Unisex Chronograph Watch 40mm 5 ATM',
description:
'Nulla nostrud aliquip consequat laborum ut enim exercitation. Aute dolor duis aliquip consequat minim officia. Nisi labore et magna et sunt consectetur id anim pariatur officia et esse ut. Ullamco dolor cillum consequat velit eiusmod consectetur. Ullamco reprehenderit tempor minim dolore officia do nisi cupidatat adipisicing fugiat velit.',
tags: [
'8ec8f60d-552f-4216-9f11-462b95b1d306',
'7d6dd47e-7472-4f8b-93d4-46c114c44533',
'8f868ddb-d4a2-461d-bc3b-d7c8668687c3',
'2300ac48-f268-466a-b765-8b878b6e14a7',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'ATT-7423',
barcode: '8417153336369',
brand: 'f9987124-7ada-4b93-bef7-35280b3ddbd7',
vendor: '998b0c07-abfd-4ba3-8de1-7563ef3c4d57',
stock: 33,
reserved: 2,
cost: 743.93,
basePrice: 1793,
taxPercent: 8,
price: 1936.44,
weight: 0.86,
thumbnail: 'assets/images/apps/ecommerce/products/watch-14-thumb.jpg',
images: [
'assets/images/apps/ecommerce/products/watch-14-01.jpg',
'assets/images/apps/ecommerce/products/watch-14-02.jpg',
'assets/images/apps/ecommerce/products/watch-14-03.jpg',
],
active: false,
},
{
id: '98861dfc-0d21-4fd5-81aa-49785d003d95',
category: 'b899ec30-b85a-40ab-bb1f-18a596d5c6de',
name: 'Premera Mens Automatic Watch 44mm 10 ATM',
description:
'Veniam sint aliquip aliquip aliquip amet Lorem irure proident laborum et eiusmod aliqua. Aliquip deserunt voluptate magna ut quis magna dolor in dolore. Commodo adipisicing excepteur occaecat aute nisi in. Est aute ad ut incididunt anim ea commodo. Sunt excepteur duis sunt est laborum magna Lorem ullamco exercitation dolore irure.',
tags: [
'167190fa-51b4-45fc-a742-8ce1b33d24ea',
'0fc39efd-f640-41f8-95a5-3f1d749df200',
'8837b93f-388b-43cc-851d-4ca8f23f3a61',
'0b11b742-3125-4d75-9a6f-84af7fde1969',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'AAT-6453',
barcode: '8501386761670',
brand: '5913ee46-a497-41db-a118-ee506011529f',
vendor: '987dd10a-43b1-49f9-bfd9-05bb2dbc7029',
stock: 38,
reserved: 3,
cost: 364.64,
basePrice: 806,
taxPercent: 18,
price: 951.08,
weight: 0.59,
thumbnail: 'assets/images/apps/ecommerce/products/watch-15-thumb.jpg',
images: [
'assets/images/apps/ecommerce/products/watch-15-01.jpg',
'assets/images/apps/ecommerce/products/watch-15-02.jpg',
'assets/images/apps/ecommerce/products/watch-15-03.jpg',
],
active: false,
},
{
id: 'a71f9b10-e884-4aad-9810-29fe10ce6d42',
category: '07986d93-d4eb-4de1-9448-2538407f7254',
name: 'Lara Ladies Chronograph Watch 40mm 5 ATM',
description:
'Deserunt non deserunt ut do labore cupidatat duis veniam in non adipisicing officia esse id. Adipisicing Lorem sint excepteur culpa labore consequat incididunt nulla minim amet. Sint do et fugiat laborum exercitation reprehenderit ut non nostrud occaecat nisi et qui dolore. Amet eiusmod nulla est officia ad magna cillum non dolor ullamco officia incididunt.',
tags: [
'3baea410-a7d6-4916-b79a-bdce50c37f95',
'7d6dd47e-7472-4f8b-93d4-46c114c44533',
'8f868ddb-d4a2-461d-bc3b-d7c8668687c3',
'2300ac48-f268-466a-b765-8b878b6e14a7',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'AAP-4902',
barcode: '8847387136582',
brand: 'f9987124-7ada-4b93-bef7-35280b3ddbd7',
vendor: '987dd10a-43b1-49f9-bfd9-05bb2dbc7029',
stock: 40,
reserved: 3,
cost: 525.3,
basePrice: 1303,
taxPercent: 10,
price: 1433.3,
weight: 0.69,
thumbnail: 'assets/images/apps/ecommerce/products/watch-16-thumb.jpg',
images: [
'assets/images/apps/ecommerce/products/watch-16-01.jpg',
'assets/images/apps/ecommerce/products/watch-16-02.jpg',
'assets/images/apps/ecommerce/products/watch-16-03.jpg',
],
active: false,
},
{
id: '149e6db5-4ecc-4021-bc56-08b27514a746',
category: '07986d93-d4eb-4de1-9448-2538407f7254',
name: 'Lara Ladies Chronograph Watch 40mm 5 ATM',
description:
'Occaecat proident fugiat consectetur ullamco est. Duis non minim eiusmod magna dolor reprehenderit ad deserunt et qui amet. Tempor cillum dolore veniam Lorem sit ad pariatur et sint. Sunt anim et cupidatat Lorem proident fugiat incididunt incididunt minim non sint. Eiusmod quis et ullamco cillum et veniam do tempor officia sint.',
tags: [
'3baea410-a7d6-4916-b79a-bdce50c37f95',
'7d6dd47e-7472-4f8b-93d4-46c114c44533',
'8f868ddb-d4a2-461d-bc3b-d7c8668687c3',
'2300ac48-f268-466a-b765-8b878b6e14a7',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'ALV-194',
barcode: '8860845382207',
brand: 'f9987124-7ada-4b93-bef7-35280b3ddbd7',
vendor: '05ebb527-d733-46a9-acfb-a4e4ec960024',
stock: 20,
reserved: 2,
cost: 670.87,
basePrice: 1537,
taxPercent: 8,
price: 1659.96,
weight: 0.66,
thumbnail: 'assets/images/apps/ecommerce/products/watch-17-thumb.jpg',
images: [
'assets/images/apps/ecommerce/products/watch-17-01.jpg',
'assets/images/apps/ecommerce/products/watch-17-02.jpg',
'assets/images/apps/ecommerce/products/watch-17-03.jpg',
],
active: false,
},
{
id: '655287de-2e24-41f3-a82f-8b08548ecc39',
category: 'b899ec30-b85a-40ab-bb1f-18a596d5c6de',
name: 'Zeon Mens Automatic Watch 44mm 10 ATM',
description:
'Eiusmod magna tempor est est quis eu. Minim irure magna anim mollit non adipisicing aute. Nostrud aute consectetur eu in non laboris excepteur esse esse occaecat officia.',
tags: [
'167190fa-51b4-45fc-a742-8ce1b33d24ea',
'0fc39efd-f640-41f8-95a5-3f1d749df200',
'8837b93f-388b-43cc-851d-4ca8f23f3a61',
'0b11b742-3125-4d75-9a6f-84af7fde1969',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'ADH-5492',
barcode: '8611606513571',
brand: '2c4d98d8-f334-4125-9596-862515f5526b',
vendor: '987dd10a-43b1-49f9-bfd9-05bb2dbc7029',
stock: 47,
reserved: 2,
cost: 645.13,
basePrice: 1581,
taxPercent: 10,
price: 1739.1,
weight: 0.54,
thumbnail: 'assets/images/apps/ecommerce/products/watch-18-thumb.jpg',
images: [
'assets/images/apps/ecommerce/products/watch-18-01.jpg',
'assets/images/apps/ecommerce/products/watch-18-02.jpg',
'assets/images/apps/ecommerce/products/watch-18-03.jpg',
],
active: true,
},
{
id: 'c215b427-d840-4537-aea1-a9bdfa49441b',
category: 'ad12aa94-3863-47f8-acab-a638ef02a3e9',
name: 'Lara Unisex Automatic Watch 40mm 10 ATM',
description:
'Excepteur enim non qui consequat sunt exercitation laborum ipsum sunt. Sunt pariatur fugiat voluptate ipsum consectetur do magna culpa labore. Cupidatat non ex labore incididunt aliquip commodo est in. Consectetur mollit nisi aliquip cupidatat do laborum est ullamco velit aliqua fugiat qui adipisicing. Aute reprehenderit quis id sint nulla.',
tags: [
'8ec8f60d-552f-4216-9f11-462b95b1d306',
'0fc39efd-f640-41f8-95a5-3f1d749df200',
'8f868ddb-d4a2-461d-bc3b-d7c8668687c3',
'0b11b742-3125-4d75-9a6f-84af7fde1969',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'AAT-6702',
barcode: '8330223562386',
brand: 'f9987124-7ada-4b93-bef7-35280b3ddbd7',
vendor: '05ebb527-d733-46a9-acfb-a4e4ec960024',
stock: 21,
reserved: 3,
cost: 704.26,
basePrice: 1733,
taxPercent: 10,
price: 1906.3,
weight: 0.84,
thumbnail: 'assets/images/apps/ecommerce/products/watch-19-thumb.jpg',
images: [
'assets/images/apps/ecommerce/products/watch-19-01.jpg',
'assets/images/apps/ecommerce/products/watch-19-02.jpg',
'assets/images/apps/ecommerce/products/watch-19-03.jpg',
],
active: true,
},
{
id: '8b1d9366-891e-49cd-aafb-ac65ce2741e2',
category: '07986d93-d4eb-4de1-9448-2538407f7254',
name: 'Zeon Ladies Automatic Watch 40mm 10 ATM',
description:
'Reprehenderit magna reprehenderit ex mollit Lorem labore ut. Duis consectetur aliqua cillum occaecat quis ex excepteur fugiat nulla nisi dolor minim. Elit voluptate exercitation nulla et ut adipisicing esse eu nisi amet eu. Ut cillum ipsum quis fugiat proident Lorem est aute ipsum sint dolore consequat.',
tags: [
'3baea410-a7d6-4916-b79a-bdce50c37f95',
'0fc39efd-f640-41f8-95a5-3f1d749df200',
'8f868ddb-d4a2-461d-bc3b-d7c8668687c3',
'0b11b742-3125-4d75-9a6f-84af7fde1969',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'EDH-5599',
barcode: '8309212335274',
brand: '2c4d98d8-f334-4125-9596-862515f5526b',
vendor: '05ebb527-d733-46a9-acfb-a4e4ec960024',
stock: 35,
reserved: 2,
cost: 712.66,
basePrice: 1711,
taxPercent: 30,
price: 2224.3,
weight: 0.47,
thumbnail: 'assets/images/apps/ecommerce/products/watch-20-thumb.jpg',
images: [
'assets/images/apps/ecommerce/products/watch-20-01.jpg',
'assets/images/apps/ecommerce/products/watch-20-02.jpg',
'assets/images/apps/ecommerce/products/watch-20-03.jpg',
],
active: false,
},
{
id: '54e29534-518b-4006-b72a-f21fac6c4d5e',
category: 'b899ec30-b85a-40ab-bb1f-18a596d5c6de',
name: 'Lara Mens Chronograph Watch 44mm 10 ATM',
description:
'Officia eu magna eu amet fugiat qui ullamco eu. Occaecat dolore minim ad tempor consequat adipisicing non Lorem consequat. In nostrud incididunt adipisicing in. Irure occaecat aliquip deserunt minim officia ad excepteur do commodo magna.',
tags: [
'167190fa-51b4-45fc-a742-8ce1b33d24ea',
'7d6dd47e-7472-4f8b-93d4-46c114c44533',
'8837b93f-388b-43cc-851d-4ca8f23f3a61',
'0b11b742-3125-4d75-9a6f-84af7fde1969',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'ADP-3719',
barcode: '8879167838673',
brand: 'f9987124-7ada-4b93-bef7-35280b3ddbd7',
vendor: '998b0c07-abfd-4ba3-8de1-7563ef3c4d57',
stock: 28,
reserved: 3,
cost: 374.38,
basePrice: 749,
taxPercent: 8,
price: 808.92,
weight: 0.52,
thumbnail: 'assets/images/apps/ecommerce/products/watch-21-thumb.jpg',
images: [
'assets/images/apps/ecommerce/products/watch-21-01.jpg',
'assets/images/apps/ecommerce/products/watch-21-02.jpg',
'assets/images/apps/ecommerce/products/watch-21-03.jpg',
],
active: false,
},
{
id: '6a5726e8-c467-45ea-92ab-d83235a06405',
category: 'b899ec30-b85a-40ab-bb1f-18a596d5c6de',
name: 'Premera Mens Chronograph Watch 44mm 10 ATM',
description:
'Duis id consequat ex officia nisi. Et reprehenderit tempor sunt nostrud. Duis dolore tempor anim non duis qui aute magna officia. Ullamco proident esse enim amet nostrud occaecat veniam. Nostrud ea eiusmod laborum id laborum veniam nulla. Voluptate proident ullamco exercitation id consequat dolore id pariatur esse nulla consectetur.',
tags: [
'167190fa-51b4-45fc-a742-8ce1b33d24ea',
'7d6dd47e-7472-4f8b-93d4-46c114c44533',
'8837b93f-388b-43cc-851d-4ca8f23f3a61',
'0b11b742-3125-4d75-9a6f-84af7fde1969',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'ATH-3399',
barcode: '8356410903599',
brand: '5913ee46-a497-41db-a118-ee506011529f',
vendor: '987dd10a-43b1-49f9-bfd9-05bb2dbc7029',
stock: 20,
reserved: 2,
cost: 444.68,
basePrice: 1103,
taxPercent: 18,
price: 1301.54,
weight: 0.56,
thumbnail: 'assets/images/apps/ecommerce/products/watch-22-thumb.jpg',
images: [
'assets/images/apps/ecommerce/products/watch-22-01.jpg',
'assets/images/apps/ecommerce/products/watch-22-02.jpg',
'assets/images/apps/ecommerce/products/watch-22-03.jpg',
],
active: false,
},
{
id: 'd7d1d6df-e91f-4c53-982a-2720bc2b4cdd',
category: 'ad12aa94-3863-47f8-acab-a638ef02a3e9',
name: 'Capmia Unisex Automatic Watch 40mm 10 ATM',
description:
'Voluptate consectetur nisi aliquip cupidatat sunt labore. Adipisicing voluptate tempor sunt eu irure cupidatat laboris. Enim aliquip aute sit non laborum Lorem in enim duis eu deserunt. Laboris magna irure aute ut proident fugiat laborum aliquip tempor nostrud id. Et esse cupidatat sunt ullamco reprehenderit enim dolore ea in do esse esse id.',
tags: [
'8ec8f60d-552f-4216-9f11-462b95b1d306',
'0fc39efd-f640-41f8-95a5-3f1d749df200',
'8f868ddb-d4a2-461d-bc3b-d7c8668687c3',
'0b11b742-3125-4d75-9a6f-84af7fde1969',
'b1286f3a-e2d0-4237-882b-f0efc0819ec3',
],
sku: 'EAV-4030',
barcode: '8545771786193',
brand: '61d52c2a-8947-4a2c-8c35-f36baef45b96',
vendor: '998b0c07-abfd-4ba3-8de1-7563ef3c4d57',
stock: 23,
reserved: 3,
cost: 538.72,
basePrice: 1213,
taxPercent: 10,
price: 1334.3,
weight: 0.75,
thumbnail: 'assets/images/apps/ecommerce/products/watch-23-thumb.jpg',
images: [
'assets/images/apps/ecommerce/products/watch-23-01.jpg',
'assets/images/apps/ecommerce/products/watch-23-02.jpg',
'assets/images/apps/ecommerce/products/watch-23-03.jpg',
],
active: true,
},
];

View File

@ -46,6 +46,13 @@ export const defaultNavigation: FuseNavigationItem[] = [
icon: 'heroicons_outline:academic-cap',
link: '/member/user',
},
{
id: 'member.casinomoney',
title: 'Casinomoney',
type: 'basic',
icon: 'heroicons_outline:academic-cap',
link: '/member/casinomoney',
},
],
},
{
@ -85,6 +92,27 @@ export const defaultNavigation: FuseNavigationItem[] = [
icon: 'heroicons_outline:academic-cap',
link: '/game/powerball',
},
{
id: 'game.casino',
title: 'Casino',
type: 'basic',
icon: 'heroicons_outline:academic-cap',
link: '/game/casino',
},
{
id: 'game.evolution',
title: 'Evolution',
type: 'basic',
icon: 'heroicons_outline:academic-cap',
link: '/game/evolution',
},
{
id: 'game.slot',
title: 'Slot',
type: 'basic',
icon: 'heroicons_outline:academic-cap',
link: '/game/slot',
},
],
},
];

View File

@ -12,6 +12,7 @@ import { HelpCenterMockApi } from 'app/mock-api/apps/help-center/api';
import { IconsMockApi } from 'app/mock-api/ui/icons/api';
import { MailboxMockApi } from 'app/mock-api/apps/mailbox/api';
import { MemberUserMockApi } from 'app/mock-api/apps/member/user/api';
import { MemberCasinomoneyMockApi } from './apps/member/casinomoney/api';
import { MessagesMockApi } from 'app/mock-api/common/messages/api';
import { NavigationMockApi } from 'app/mock-api/common/navigation/api';
import { NotesMockApi } from 'app/mock-api/apps/notes/api';
@ -23,7 +24,11 @@ import { ShortcutsMockApi } from 'app/mock-api/common/shortcuts/api';
import { TasksMockApi } from 'app/mock-api/apps/tasks/api';
import { UserMockApi } from 'app/mock-api/common/user/api';
import { BankDepositMockApi } from './apps/bank/deposit/api';
import { BankWithdrawMockApi } from './apps/bank/withdraw/api';
import { GamePowerballMockApi } from './apps/game/powerball/api';
import { GameCasinoMockApi } from './apps/game/casino/api';
import { GameEvolutionMockApi } from './apps/game/evolution/api';
import { GameSlotMockApi } from './apps/game/slot/api';
export const mockApiServices = [
AcademyMockApi,
@ -40,6 +45,7 @@ export const mockApiServices = [
IconsMockApi,
MailboxMockApi,
MemberUserMockApi,
MemberCasinomoneyMockApi,
MessagesMockApi,
NavigationMockApi,
NotesMockApi,
@ -51,5 +57,9 @@ export const mockApiServices = [
TasksMockApi,
UserMockApi,
BankDepositMockApi,
BankWithdrawMockApi,
GamePowerballMockApi,
GameCasinoMockApi,
GameEvolutionMockApi,
GameSlotMockApi,
];

View File

@ -23,7 +23,7 @@
<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>
@ -135,7 +135,7 @@
class="hidden sm:block"
[mat-sort-header]="'bettingInfomation'"
>
팅정보
팅정보
</div>
<div class="hidden sm:block" [mat-sort-header]="'delete'">
삭제
@ -211,7 +211,7 @@
<!-- depositWithdrawal -->
<div class="hidden sm:block truncate">
{{ deposit.deposit }}원 {{ deposit.withdrawal }}원
{{ deposit.deposit }}원 {{ deposit.withdraw }}원
{{ deposit.total }}원
</div>
@ -252,7 +252,7 @@
<!-- bettingInformation -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
팅리스트
팅리스트
</button>
</div>

View File

@ -1,21 +1,21 @@
export interface Deposit {
id: string;
rank: string;
level: string;
nickname: string;
paymentDue: number;
calculateType: string;
accountHolder: string;
note: string;
registrationDate: string;
processDate: string;
deposit: number;
withdrawal: number;
total: number;
gameMoney: number;
highRank: string;
state: string;
memberInformation: string;
bettingInformation: string;
delete: string;
id?: string;
rank?: string;
level?: string;
nickname?: string;
paymentDue?: number;
calculateType?: string;
accountHolder?: string;
note?: string;
registrationDate?: string;
processDate?: string;
deposit?: number;
withdraw?: number;
total?: number;
gameMoney?: number;
highRank?: string;
state?: string;
memberInformation?: string;
bettingInformation?: string;
delete?: string;
}

View File

@ -23,7 +23,7 @@
<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>
@ -123,7 +123,7 @@
class="hidden sm:block"
[mat-sort-header]="'bettingInfomation'"
>
팅정보
팅정보
</div>
<div class="hidden sm:block" [mat-sort-header]="'delete'">
삭제
@ -227,7 +227,7 @@
<!-- bettingInformation -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
팅리스트
팅리스트
</button>
</div>

View File

@ -1,19 +1,19 @@
export interface Withdraw {
rank: string;
id: string;
nickname: string;
exchangeApplication: number;
calculateType: string;
accountHolder: string;
note: string;
registrationDate: string;
processDate: string;
deposit: number;
withdraw: number;
total: number;
highRank: string;
state: string;
memberInformation: string;
bettingInformation: string;
delete: string;
rank?: string;
id?: string;
nickname?: string;
exchangeApplication?: number;
calculateType?: string;
accountHolder?: string;
note?: string;
registrationDate?: string;
processDate?: string;
deposit?: number;
withdraw?: number;
total?: number;
highRank?: string;
state?: string;
memberInformation?: string;
bettingInformation?: string;
delete?: string;
}

View File

@ -2,14 +2,14 @@ import { Route } from '@angular/router';
import { ListComponent } from './components/list.component';
// import { DepositResolver } from './resolvers/deposit.resolver';
import { WithdrawsResolver } from './resolvers/withdraw.resolver';
export const withdrawRoutes: Route[] = [
{
path: '',
component: ListComponent,
// resolve: {
// deposits: DepositResolver,
// },
resolve: {
withdraws: WithdrawsResolver,
},
},
];

View File

@ -0,0 +1,42 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { MatButtonModule } from '@angular/material/button';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatRippleModule } from '@angular/material/core';
import { MatSortModule } from '@angular/material/sort';
import { MatSelectModule } from '@angular/material/select';
import { MatTooltipModule } from '@angular/material/tooltip';
import { TranslocoModule } from '@ngneat/transloco';
import { SharedModule } from 'app/shared/shared.module';
import { COMPONENTS } from './components';
import { casinoRoutes } from './casino.routing';
@NgModule({
declarations: [COMPONENTS],
imports: [
TranslocoModule,
SharedModule,
RouterModule.forChild(casinoRoutes),
MatButtonModule,
MatFormFieldModule,
MatIconModule,
MatInputModule,
MatPaginatorModule,
MatProgressBarModule,
MatRippleModule,
MatSortModule,
MatSelectModule,
MatTooltipModule,
],
})
export class CasinoModule {}

View File

@ -0,0 +1,15 @@
import { Route } from '@angular/router';
import { ListComponent } from './components/list.component';
import { CasinosResolver } from './resolvers/casino.resolver';
export const casinoRoutes: Route[] = [
{
path: '',
component: ListComponent,
resolve: {
deposits: CasinosResolver,
},
},
];

View File

@ -0,0 +1,3 @@
import { ListComponent } from './list.component';
export const COMPONENTS = [ListComponent];

View File

@ -0,0 +1,369 @@
<div
class="sm:absolute sm:inset-0 flex flex-col flex-auto min-w-0 sm:overflow-hidden bg-card dark:bg-transparent"
>
<!-- Header -->
<div
class="relative flex flex-col sm:flex-row flex-0 sm:items-center sm:justify-between py-8 px-6 md:px-8 border-b"
>
<!-- Loader -->
<div class="absolute inset-x-0 bottom-0" *ngIf="isLoading">
<mat-progress-bar [mode]="'indeterminate'"></mat-progress-bar>
</div>
<!-- Title -->
<div class="text-4xl font-extrabold tracking-tight">Casino</div>
<!-- Actions -->
<div class="flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4">
<!-- Memo -->
<!-- <mat-form-field>
<ng-container *ngIf="casinos$ | async as casinos">
<ng-container *ngFor="let casino of casinos; trackBy: __trackByFn">
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<fieldset>
{{ casino.startDate }}~{{ casino.finishDate }}까지의 총
유효배팅:{{ casino.availableBetting }}원, 배팅금액:{{
casino.bettingMoney
}}원, 당첨:{{ casino.winning }}원, 취소:{{ casino.cancel }}원,
배팅-당첨-취소:{{ casino.betWinCancel }}원, 본사롤링:{{
casino.mainofficeRolling
}}원, 대본롤링:{{ casino.branchRolling }}원, 부본롤링:{{
casino.divisionRolling
}}원, 총판롤링:{{ casino.officeRolling }}원, 매장롤링:{{
casino.storeRolling
}}원, 회원롤링:{{ casino.memberRolling }}원, 롤링합계:{{
casino.totalrolling
}}원
</fieldset>
</div>
</ng-container>
</ng-container>
</mat-form-field> -->
<!-- SelectBox -->
<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-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="">CQ9 카지노</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="">배팅100만미만</mat-option>
<mat-option value="">배팅100-300만</mat-option>
<mat-option value="">배팅300-500만</mat-option>
<mat-option value="">배팅500만이상</mat-option>
<mat-option value="">당첨1000만초과</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>
<!-- Search -->
<mat-form-field
class="fuse-mat-dense fuse-mat-no-subscript fuse-mat-rounded min-w-64"
>
<mat-icon
class="icon-size-5"
matPrefix
[svgIcon]="'heroicons_solid:search'"
></mat-icon>
<input
matInput
[formControl]="searchInputControl"
[autocomplete]="'off'"
[placeholder]="'Search'"
/>
</mat-form-field>
<!-- Search button -->
<button
class="ml-4"
mat-flat-button
[color]="'primary'"
(click)="__createProduct()"
>
<!-- <mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon> -->
<span class="ml-2 mr-1">검색하기</span>
</button>
</div>
</div>
<!-- Main -->
<div class="flex flex-auto overflow-hidden">
<!-- Products list -->
<div
class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto"
>
<ng-container *ngIf="casinos$ | async as casinos">
<ng-container *ngIf="casinos.length > 0; else noCasino">
<div class="grid">
<!-- Header -->
<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"
matSort
matSortDisableClear
>
<div></div>
<div class="hidden sm:block" [mat-sort-header]="'highRank'">
상위
</div>
<div class="hidden sm:block" [mat-sort-header]="'userInfo'">
유저
</div>
<div class="hidden sm:block" [mat-sort-header]="'gameInfo'">
게임
</div>
<div class="hidden sm:block" [mat-sort-header]="'form'">형식</div>
<div class="hidden sm:block" [mat-sort-header]="'money'">
금액
</div>
<div class="hidden sm:block" [mat-sort-header]="'betting'">
배팅
</div>
<div class="hidden sm:block" [mat-sort-header]="'data'">
데이터
</div>
<div class="hidden sm:block" [mat-sort-header]="'comp'">콤프</div>
<div class="hidden sm:block" [mat-sort-header]="'rolling'">
롤링
</div>
<div class="hidden sm:block" [mat-sort-header]="'time'">
배팅시간 등록시간
</div>
<!-- <div class="hidden md:block" [mat-sort-header]="'sku'">SKU</div>
<div [mat-sort-header]="'name'">Name</div>
<div class="hidden sm:block" [mat-sort-header]="'price'">
Price
</div>
<div class="hidden lg:block" [mat-sort-header]="'stock'">
Stock
</div>
<div class="hidden lg:block" [mat-sort-header]="'active'">
Active
</div>
<div class="hidden sm:block">Details</div> -->
</div>
<!-- Rows -->
<ng-container *ngIf="casinos$ | async as casinos">
<ng-container
*ngFor="let casino of casinos; trackBy: __trackByFn"
>
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<!-- highRank -->
<div class="hidden sm:block truncate">
{{ casino.highRank }}
</div>
<!-- userInfo -->
<div class="hidden sm:block truncate">
{{ casino.id }}
{{ casino.siteId }}
{{ casino.nickname }}
</div>
<!-- game -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ casino.gameName }}
</button>
{{ casino.gameInfo1 }}
{{ casino.gameInfo2 }}
{{ casino.gameInfo3 }}
</div>
<!-- form -->
<div class="hidden sm:block truncate">
{{ casino.form }}
</div>
<!-- money -->
<div class="hidden sm:block truncate">
당첨전{{ casino.beforeWinning }} 당첨{{
casino.winning
}}
당첨후{{ casino.afterWinning }}
</div>
<!-- betting -->
<div class="hidden sm:block truncate">
{{ casino.bettingInfo1 }}
{{ casino.bettingInfo2 }}
{{ casino.bettingInfo3 }}
</div>
<!-- data -->
<div class="hidden sm:block truncate">
{{ casino.data }}
</div>
<!-- comp -->
<div class="hidden sm:block truncate">
{{ casino.comp }}
</div>
<!-- rolling -->
<div class="hidden sm:block truncate">
본사:{{ casino.mainofficeName }}({{
casino.mainofficePercent
}}%,{{ casino.mainofficePoint }}P) 대본:{{
casino.branchName
}}({{ casino.branchPercent }}%,{{ casino.branchPoint }}P)
부본:{{ casino.divisionName }}({{
casino.divisionPercent
}}%,{{ casino.divisionPoint }}P) 총판:{{
casino.officeName
}}({{ casino.officePercent }}%,{{ casino.officePoint }}P)
매장:{{ casino.storeName }}({{ casino.storePercent }}%,{{
casino.storePoint
}}P) 회원:{{ casino.memberName }}({{
casino.memberPercent
}}%,{{ casino.memberPoint }}P)
</div>
<!-- bettingTime -->
<div class="hidden sm:block truncate">
{{ casino.bettingTime }}
{{ casino.registrationTime }}
</div>
<!-- Image -->
<!-- <div class="flex items-center">
<div
class="relative flex flex-0 items-center justify-center w-12 h-12 mr-6 rounded overflow-hidden border"
>
<img
class="w-8"
*ngIf="user.thumbnail"
[alt]="'Product thumbnail image'"
[src]="user.thumbnail"
/>
<div
class="flex items-center justify-center w-full h-full text-xs font-semibold leading-none text-center uppercase"
*ngIf="!user.thumbnail"
>
NO THUMB
</div>
</div>
</div> -->
<!-- SKU -->
<!-- <div class="hidden md:block truncate">
{{ user.sku }}
</div> -->
<!-- Name -->
<!-- <div class="truncate">
{{ user.name }}
</div> -->
<!-- Price -->
<!-- <div class="hidden sm:block">
{{ user.price | currency: "USD":"symbol":"1.2-2" }}
</div> -->
<!-- Stock -->
<!-- <div class="hidden lg:flex items-center">
<div class="min-w-4">{{ user.stock }}</div> -->
<!-- Low stock -->
<!-- <div
class="flex items-end ml-2 w-1 h-4 bg-red-200 rounded overflow-hidden"
*ngIf="user.stock < 20"
>
<div class="flex w-full h-1/3 bg-red-600"></div>
</div> -->
<!-- Medium stock -->
<!-- <div
class="flex items-end ml-2 w-1 h-4 bg-orange-200 rounded overflow-hidden"
*ngIf="user.stock >= 20 && user.stock < 30"
>
<div class="flex w-full h-2/4 bg-orange-400"></div>
</div> -->
<!-- High stock -->
<!-- <div
class="flex items-end ml-2 w-1 h-4 bg-green-100 rounded overflow-hidden"
*ngIf="user.stock >= 30"
>
<div class="flex w-full h-full bg-green-400"></div>
</div>
</div> -->
<!-- Active -->
<!-- <div class="hidden lg:block">
<ng-container *ngIf="user.active">
<mat-icon
class="text-green-400 icon-size-5"
[svgIcon]="'heroicons_solid:check'"
></mat-icon>
</ng-container>
<ng-container *ngIf="!user.active">
<mat-icon
class="text-gray-400 icon-size-5"
[svgIcon]="'heroicons_solid:x'"
></mat-icon>
</ng-container>
</div> -->
<!-- Details button -->
<!-- <div>
<button
class="min-w-10 min-h-7 h-7 px-2 leading-6"
mat-stroked-button
(click)="__toggleDetails(user.id)"
>
<mat-icon
class="icon-size-5"
[svgIcon]="
selectedUser?.id === user.id
? 'heroicons_solid:chevron-up'
: 'heroicons_solid:chevron-down'
"
></mat-icon>
</button>
</div> -->
</div>
</ng-container>
</ng-container>
</div>
<mat-paginator
class="sm:absolute sm:inset-x-0 sm:bottom-0 border-b sm:border-t sm:border-b-0 z-10 bg-gray-50 dark:bg-transparent"
[ngClass]="{ 'pointer-events-none': isLoading }"
[length]="pagination?.length"
[pageIndex]="pagination?.page"
[pageSize]="pagination?.size"
[pageSizeOptions]="[5, 10, 25, 100]"
[showFirstLastButtons]="true"
></mat-paginator>
</ng-container>
</ng-container>
<ng-template #noCasino>
<div
class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center"
>
There are no casino!
</div>
</ng-template>
</div>
</div>
</div>

View File

@ -0,0 +1,190 @@
import {
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
OnDestroy,
OnInit,
ViewChild,
ViewEncapsulation,
} from '@angular/core';
import {
FormBuilder,
FormControl,
FormGroup,
Validators,
} from '@angular/forms';
import { MatCheckboxChange } from '@angular/material/checkbox';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import {
debounceTime,
map,
merge,
Observable,
Subject,
switchMap,
takeUntil,
} from 'rxjs';
import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation';
import { Casino } from '../models/casino';
import { CasinoPagination } from '../models/casino-pagination';
import { CasinoService } from '../services/casino.service';
@Component({
selector: 'casino-list',
templateUrl: './list.component.html',
styles: [
/* language=SCSS */
`
.inventory-grid {
grid-template-columns: 60px auto 40px;
@screen sm {
grid-template-columns: 60px auto 60px 72px;
}
@screen md {
grid-template-columns: 60px 60px auto 112px 72px;
}
@screen lg {
grid-template-columns: 60px 60px auto 112px 96px 96px 72px;
}
}
`,
],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
animations: fuseAnimations,
})
export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
casinos$!: Observable<Casino[] | undefined>;
isLoading = false;
searchInputControl = new FormControl();
selectedCasino?: Casino;
pagination?: CasinoPagination;
private _unsubscribeAll: Subject<any> = new Subject<any>();
/**
* Constructor
*/
constructor(
private _changeDetectorRef: ChangeDetectorRef,
private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder,
private _casinoService: CasinoService
) {}
// -----------------------------------------------------------------------------------------------------
// @ Lifecycle hooks
// -----------------------------------------------------------------------------------------------------
/**
* On init
*/
ngOnInit(): void {
// Get the pagination
this._casinoService.pagination$
.pipe(takeUntil(this._unsubscribeAll))
.subscribe((pagination: CasinoPagination | undefined) => {
// Update the pagination
this.pagination = pagination;
// Mark for check
this._changeDetectorRef.markForCheck();
});
// Get the products
this.casinos$ = this._casinoService.casinos$;
}
/**
* After view init
*/
ngAfterViewInit(): void {
if (this._sort && this._paginator) {
// Set the initial sort
this._sort.sort({
id: 'nickname',
start: 'asc',
disableClear: true,
});
// Mark for check
this._changeDetectorRef.markForCheck();
// If the casino changes the sort order...
this._sort.sortChange
.pipe(takeUntil(this._unsubscribeAll))
.subscribe(() => {
// Reset back to the first page
this._paginator.pageIndex = 0;
});
// Get products if sort or page changes
merge(this._sort.sortChange, this._paginator.page)
.pipe(
switchMap(() => {
this.isLoading = true;
return this._casinoService.getCasinos(
this._paginator.pageIndex,
this._paginator.pageSize,
this._sort.active,
this._sort.direction
);
}),
map(() => {
this.isLoading = false;
})
)
.subscribe();
}
}
/**
* On destroy
*/
ngOnDestroy(): void {
// Unsubscribe from all subscriptions
this._unsubscribeAll.next(null);
this._unsubscribeAll.complete();
}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------------
// @ Private methods
// -----------------------------------------------------------------------------------------------------
/**
* Create product
*/
__createProduct(): void {}
/**
* Toggle product details
*
* @param productId
*/
__toggleDetails(productId: string): void {}
/**
* Track by function for ngFor loops
*
* @param index
* @param item
*/
__trackByFn(index: number, item: any): any {
return item.id || index;
}
}

View File

@ -0,0 +1,8 @@
export interface CasinoPagination {
length: number;
size: number;
page: number;
lastPage: number;
startIndex: number;
endIndex: number;
}

View File

@ -0,0 +1,53 @@
export interface Casino {
id?: string;
startDate?: string;
finishDate?: string;
availableBetting?: number;
bettingMoney?: number;
winningMoney?: number;
cancel?: number;
betWinCancel?: number;
mainofficeRolling?: number;
branchRolling?: number;
divisionRolling?: number;
officeRolling?: number;
storeRolling?: number;
memberRolling?: number;
totalrolling?: number;
highRank?: string;
siteId?: string;
nickname?: string;
gameName?: string;
gameInfo1?: string;
gameInfo2?: string;
gameInfo3?: string;
form?: string;
beforeWinning?: number;
winning?: number;
afterWinning?: number;
bettingInfo1?: string;
bettingInfo2?: number;
bettingInfo3?: number;
data?: string;
comp?: string;
mainofficeName?: string;
mainofficePercent?: number;
mainofficePoint?: number;
branchName?: string;
branchPercent?: number;
branchPoint?: number;
divisionName?: string;
divisionPercent?: number;
divisionPoint?: number;
officeName?: string;
officePercent?: number;
officePoint?: number;
storeName?: string;
storePercent?: number;
storePoint?: number;
memberName?: string;
memberPercent?: number;
memberPoint?: number;
bettingTime?: string;
registrationTime?: string;
}

View File

@ -0,0 +1,84 @@
import { Injectable } from '@angular/core';
import {
ActivatedRouteSnapshot,
Resolve,
Router,
RouterStateSnapshot,
} from '@angular/router';
import { catchError, Observable, throwError } from 'rxjs';
import { Casino } from '../models/casino';
import { CasinoPagination } from '../models/casino-pagination';
import { CasinoService } from '../services/casino.service';
@Injectable({
providedIn: 'root',
})
export class CasinoResolver implements Resolve<any> {
/**
* Constructor
*/
constructor(private _casinoService: CasinoService, private _router: Router) {}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Resolver
*
* @param route
* @param state
*/
resolve(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<Casino | undefined> {
return this._casinoService.getCasinoById(route.paramMap.get('id')).pipe(
// Error here means the requested product is not available
catchError((error) => {
// Log the error
console.error(error);
// Get the parent url
const parentUrl = state.url.split('/').slice(0, -1).join('/');
// Navigate to there
this._router.navigateByUrl(parentUrl);
// Throw an error
return throwError(error);
})
);
}
}
@Injectable({
providedIn: 'root',
})
export class CasinosResolver implements Resolve<any> {
/**
* Constructor
*/
constructor(private _casinoService: CasinoService) {}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Resolver
*
* @param route
* @param state
*/
resolve(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<{
pagination: CasinoPagination;
casinos: Casino[];
}> {
return this._casinoService.getCasinos();
}
}

View File

@ -0,0 +1,151 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import {
BehaviorSubject,
filter,
map,
Observable,
of,
switchMap,
take,
tap,
throwError,
} from 'rxjs';
import { Casino } from '../models/casino';
import { CasinoPagination } from '../models/casino-pagination';
@Injectable({
providedIn: 'root',
})
export class CasinoService {
// Private
private __pagination = new BehaviorSubject<CasinoPagination | undefined>(
undefined
);
private __casino = new BehaviorSubject<Casino | undefined>(undefined);
private __casinos = new BehaviorSubject<Casino[] | undefined>(undefined);
/**
* Constructor
*/
constructor(private _httpClient: HttpClient) {}
// -----------------------------------------------------------------------------------------------------
// @ Accessors
// -----------------------------------------------------------------------------------------------------
/**
* Getter for pagination
*/
get pagination$(): Observable<CasinoPagination | undefined> {
return this.__pagination.asObservable();
}
/**
* Getter for casino
*/
get casino$(): Observable<Casino | undefined> {
return this.__casino.asObservable();
}
/**
* Getter for casinos
*/
get casinos$(): Observable<Casino[] | undefined> {
return this.__casinos.asObservable();
}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Get casinos
*
*
* @param page
* @param size
* @param sort
* @param order
* @param search
*/
getCasinos(
page: number = 0,
size: number = 10,
sort: string = 'nickname',
order: 'asc' | 'desc' | '' = 'asc',
search: string = ''
): Observable<{
pagination: CasinoPagination;
casinos: Casino[];
}> {
return this._httpClient
.get<{ pagination: CasinoPagination; casinos: Casino[] }>(
'api/apps/game/casino/casinos',
{
params: {
page: '' + page,
size: '' + size,
sort,
order,
search,
},
}
)
.pipe(
tap((response) => {
this.__pagination.next(response.pagination);
this.__casinos.next(response.casinos);
})
);
}
/**
* Get product by id
*/
getCasinoById(id: string | null): Observable<Casino> {
return this.__casinos.pipe(
take(1),
map((casinos) => {
// Find the product
const casino = casinos?.find((item) => item.id === id) || undefined;
// Update the product
this.__casino.next(casino);
// Return the product
return casino;
}),
switchMap((product) => {
if (!product) {
return throwError('Could not found product with id of ' + id + '!');
}
return of(product);
})
);
}
/**
* Create product
*/
createCasino(): Observable<Casino> {
return this.casinos$.pipe(
take(1),
switchMap((casinos) =>
this._httpClient.post<Casino>('api/apps/game/casino/product', {}).pipe(
map((newCasino) => {
// Update the casinos with the new product
if (!!casinos) {
this.__casinos.next([newCasino, ...casinos]);
}
// Return the new product
return newCasino;
})
)
)
);
}
}

View File

@ -0,0 +1,3 @@
import { ListComponent } from './list.component';
export const COMPONENTS = [ListComponent];

View File

@ -0,0 +1,368 @@
<div
class="sm:absolute sm:inset-0 flex flex-col flex-auto min-w-0 sm:overflow-hidden bg-card dark:bg-transparent"
>
<!-- Header -->
<div
class="relative flex flex-col sm:flex-row flex-0 sm:items-center sm:justify-between py-8 px-6 md:px-8 border-b"
>
<!-- Loader -->
<div class="absolute inset-x-0 bottom-0" *ngIf="isLoading">
<mat-progress-bar [mode]="'indeterminate'"></mat-progress-bar>
</div>
<!-- Title -->
<div class="text-4xl font-extrabold tracking-tight">Evolution</div>
<!-- Actions -->
<div class="flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4">
<!-- Memo -->
<!-- <mat-form-field>
<ng-container *ngIf="evolutions$ | async as evolutions">
<ng-container *ngFor="let evolution of evolutions; trackBy: __trackByFn">
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<fieldset>
{{ evolution.startDate }}~{{ evolution.finishDate }}까지의 총
유효배팅:{{ evolution.availableBetting }}원, 배팅금액:{{
evolution.bettingMoney
}}원, 당첨:{{ evolution.winning }}원, 취소:{{ evolution.cancel }}원,
배팅-당첨-취소:{{ evolution.betWinCancel }}원, 본사롤링:{{
evolution.mainofficeRolling
}}원, 대본롤링:{{ evolution.branchRolling }}원, 부본롤링:{{
evolution.divisionRolling
}}원, 총판롤링:{{ evolution.officeRolling }}원, 매장롤링:{{
evolution.storeRolling
}}원, 회원롤링:{{ evolution.memberRolling }}원, 롤링합계:{{
evolution.totalrolling
}}원
</fieldset>
</div>
</ng-container>
</ng-container>
</mat-form-field> -->
<!-- SelectBox -->
<mat-form-field>
<mat-select placeholder="전체금액">
<mat-option value="">전체금액</mat-option>
<mat-option value="">배팅100만미만</mat-option>
<mat-option value="">배팅100-300만</mat-option>
<mat-option value="">배팅300-500만</mat-option>
<mat-option value="">배팅500만이상</mat-option>
<mat-option value="">당첨1000만초과</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>
<!-- Search -->
<mat-form-field
class="fuse-mat-dense fuse-mat-no-subscript fuse-mat-rounded min-w-64"
>
<mat-icon
class="icon-size-5"
matPrefix
[svgIcon]="'heroicons_solid:search'"
></mat-icon>
<input
matInput
[formControl]="searchInputControl"
[autocomplete]="'off'"
[placeholder]="'Search'"
/>
</mat-form-field>
<!-- Search button -->
<button
class="ml-4"
mat-flat-button
[color]="'primary'"
(click)="__createProduct()"
>
<!-- <mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon> -->
<span class="ml-2 mr-1">검색하기</span>
</button>
</div>
</div>
<!-- Main -->
<div class="flex flex-auto overflow-hidden">
<!-- Products list -->
<div
class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto"
>
<ng-container *ngIf="evolutions$ | async as evolutions">
<ng-container *ngIf="evolutions.length > 0; else noEvolution">
<div class="grid">
<!-- Header -->
<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"
matSort
matSortDisableClear
>
<div></div>
<div class="hidden sm:block" [mat-sort-header]="'highRank'">
상위
</div>
<div class="hidden sm:block" [mat-sort-header]="'userInfo'">
유저
</div>
<div class="hidden sm:block" [mat-sort-header]="'gameInfo'">
게임
</div>
<div class="hidden sm:block" [mat-sort-header]="'form'">형식</div>
<div class="hidden sm:block" [mat-sort-header]="'money'">
금액
</div>
<div class="hidden sm:block" [mat-sort-header]="'money'">
최종금액
</div>
<div class="hidden sm:block" [mat-sort-header]="'betting'">
배팅
</div>
<div class="hidden sm:block" [mat-sort-header]="'data'">
데이터
</div>
<div class="hidden sm:block" [mat-sort-header]="'comp'">콤프</div>
<div class="hidden sm:block" [mat-sort-header]="'rolling'">
롤링
</div>
<div class="hidden sm:block" [mat-sort-header]="'time'">
배팅시간 등록시간
</div>
<!-- <div class="hidden md:block" [mat-sort-header]="'sku'">SKU</div>
<div [mat-sort-header]="'name'">Name</div>
<div class="hidden sm:block" [mat-sort-header]="'price'">
Price
</div>
<div class="hidden lg:block" [mat-sort-header]="'stock'">
Stock
</div>
<div class="hidden lg:block" [mat-sort-header]="'active'">
Active
</div>
<div class="hidden sm:block">Details</div> -->
</div>
<!-- Rows -->
<ng-container *ngIf="evolutions$ | async as evolutions">
<ng-container
*ngFor="let evolution of evolutions; trackBy: __trackByFn"
>
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<!-- highRank -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ evolution.highRank }}
</button>
</div>
<!-- userInfo -->
<div class="hidden sm:block truncate">
{{ evolution.gameId }}
{{ evolution.id }}
{{ evolution.nickname }}
</div>
<!-- game -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ evolution.gameName }}
</button>
{{ evolution.gameInfo1 }}
{{ evolution.gameInfo2 }}
{{ evolution.gameInfo3 }}
</div>
<!-- form -->
<!-- <div class="hidden sm:block truncate">
{{ evolution.form }}
</div> -->
<!-- money -->
<div class="hidden sm:block truncate">
배팅{{ evolution.betting }} 당첨{{
evolution.winning
}}
손익{{ evolution.profitLoss }}
</div>
<!-- finalMoney -->
<div class="hidden sm:block truncate">
배팅 전{{ evolution.beforeBetting }} 배팅 후{{
evolution.afterBetting
}}
최종금액{{ evolution.finalMoney }}
</div>
<!-- betting -->
<div class="hidden sm:block truncate">
{{ evolution.bettingInfo1 }}
{{ evolution.bettingInfo2 }}
{{ evolution.bettingInfo3 }}
</div>
<!-- data -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ evolution.data }}
</button>
</div>
<!-- comp -->
<div class="hidden sm:block truncate">
{{ evolution.comp }}
</div>
<!-- rolling -->
<div class="hidden sm:block truncate">
본사:{{ evolution.mainofficeName }}({{
evolution.mainofficePercent
}}%,{{ evolution.mainofficePoint }}P) 대본:{{
evolution.branchName
}}({{ evolution.branchPercent }}%,{{
evolution.branchPoint
}}P) 부본:{{ evolution.divisionName }}({{
evolution.divisionPercent
}}%,{{ evolution.divisionPoint }}P) 총판:{{
evolution.officeName
}}({{ evolution.officePercent }}%,{{
evolution.officePoint
}}P) 매장:{{ evolution.storeName }}({{
evolution.storePercent
}}%,{{ evolution.storePoint }}P) 회원:{{
evolution.memberName
}}({{ evolution.memberPercent }}%,{{
evolution.memberPoint
}}P)
</div>
<!-- bettingTime -->
<div class="hidden sm:block truncate">
{{ evolution.bettingTime }}
{{ evolution.registrationTime }}
</div>
<!-- Image -->
<!-- <div class="flex items-center">
<div
class="relative flex flex-0 items-center justify-center w-12 h-12 mr-6 rounded overflow-hidden border"
>
<img
class="w-8"
*ngIf="user.thumbnail"
[alt]="'Product thumbnail image'"
[src]="user.thumbnail"
/>
<div
class="flex items-center justify-center w-full h-full text-xs font-semibold leading-none text-center uppercase"
*ngIf="!user.thumbnail"
>
NO THUMB
</div>
</div>
</div> -->
<!-- SKU -->
<!-- <div class="hidden md:block truncate">
{{ user.sku }}
</div> -->
<!-- Name -->
<!-- <div class="truncate">
{{ user.name }}
</div> -->
<!-- Price -->
<!-- <div class="hidden sm:block">
{{ user.price | currency: "USD":"symbol":"1.2-2" }}
</div> -->
<!-- Stock -->
<!-- <div class="hidden lg:flex items-center">
<div class="min-w-4">{{ user.stock }}</div> -->
<!-- Low stock -->
<!-- <div
class="flex items-end ml-2 w-1 h-4 bg-red-200 rounded overflow-hidden"
*ngIf="user.stock < 20"
>
<div class="flex w-full h-1/3 bg-red-600"></div>
</div> -->
<!-- Medium stock -->
<!-- <div
class="flex items-end ml-2 w-1 h-4 bg-orange-200 rounded overflow-hidden"
*ngIf="user.stock >= 20 && user.stock < 30"
>
<div class="flex w-full h-2/4 bg-orange-400"></div>
</div> -->
<!-- High stock -->
<!-- <div
class="flex items-end ml-2 w-1 h-4 bg-green-100 rounded overflow-hidden"
*ngIf="user.stock >= 30"
>
<div class="flex w-full h-full bg-green-400"></div>
</div>
</div> -->
<!-- Active -->
<!-- <div class="hidden lg:block">
<ng-container *ngIf="user.active">
<mat-icon
class="text-green-400 icon-size-5"
[svgIcon]="'heroicons_solid:check'"
></mat-icon>
</ng-container>
<ng-container *ngIf="!user.active">
<mat-icon
class="text-gray-400 icon-size-5"
[svgIcon]="'heroicons_solid:x'"
></mat-icon>
</ng-container>
</div> -->
<!-- Details button -->
<!-- <div>
<button
class="min-w-10 min-h-7 h-7 px-2 leading-6"
mat-stroked-button
(click)="__toggleDetails(user.id)"
>
<mat-icon
class="icon-size-5"
[svgIcon]="
selectedUser?.id === user.id
? 'heroicons_solid:chevron-up'
: 'heroicons_solid:chevron-down'
"
></mat-icon>
</button>
</div> -->
</div>
</ng-container>
</ng-container>
</div>
<mat-paginator
class="sm:absolute sm:inset-x-0 sm:bottom-0 border-b sm:border-t sm:border-b-0 z-10 bg-gray-50 dark:bg-transparent"
[ngClass]="{ 'pointer-events-none': isLoading }"
[length]="pagination?.length"
[pageIndex]="pagination?.page"
[pageSize]="pagination?.size"
[pageSizeOptions]="[5, 10, 25, 100]"
[showFirstLastButtons]="true"
></mat-paginator>
</ng-container>
</ng-container>
<ng-template #noEvolution>
<div
class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center"
>
There are no evolution!
</div>
</ng-template>
</div>
</div>
</div>

View File

@ -0,0 +1,190 @@
import {
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
OnDestroy,
OnInit,
ViewChild,
ViewEncapsulation,
} from '@angular/core';
import {
FormBuilder,
FormControl,
FormGroup,
Validators,
} from '@angular/forms';
import { MatCheckboxChange } from '@angular/material/checkbox';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import {
debounceTime,
map,
merge,
Observable,
Subject,
switchMap,
takeUntil,
} from 'rxjs';
import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation';
import { Evolution } from '../models/evolution';
import { EvolutionPagination } from '../models/evolution-pagination';
import { EvolutionService } from '../services/evolution.service';
@Component({
selector: 'evolution-list',
templateUrl: './list.component.html',
styles: [
/* language=SCSS */
`
.inventory-grid {
grid-template-columns: 60px auto 40px;
@screen sm {
grid-template-columns: 60px auto 60px 72px;
}
@screen md {
grid-template-columns: 60px 60px auto 112px 72px;
}
@screen lg {
grid-template-columns: 60px 60px auto 112px 96px 96px 72px;
}
}
`,
],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
animations: fuseAnimations,
})
export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
evolutions$!: Observable<Evolution[] | undefined>;
isLoading = false;
searchInputControl = new FormControl();
selectedEvolution?: Evolution;
pagination?: EvolutionPagination;
private _unsubscribeAll: Subject<any> = new Subject<any>();
/**
* Constructor
*/
constructor(
private _changeDetectorRef: ChangeDetectorRef,
private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder,
private _evolutionService: EvolutionService
) {}
// -----------------------------------------------------------------------------------------------------
// @ Lifecycle hooks
// -----------------------------------------------------------------------------------------------------
/**
* On init
*/
ngOnInit(): void {
// Get the pagination
this._evolutionService.pagination$
.pipe(takeUntil(this._unsubscribeAll))
.subscribe((pagination: EvolutionPagination | undefined) => {
// Update the pagination
this.pagination = pagination;
// Mark for check
this._changeDetectorRef.markForCheck();
});
// Get the products
this.evolutions$ = this._evolutionService.evolutions$;
}
/**
* After view init
*/
ngAfterViewInit(): void {
if (this._sort && this._paginator) {
// Set the initial sort
this._sort.sort({
id: 'nickname',
start: 'asc',
disableClear: true,
});
// Mark for check
this._changeDetectorRef.markForCheck();
// If the evolution changes the sort order...
this._sort.sortChange
.pipe(takeUntil(this._unsubscribeAll))
.subscribe(() => {
// Reset back to the first page
this._paginator.pageIndex = 0;
});
// Get products if sort or page changes
merge(this._sort.sortChange, this._paginator.page)
.pipe(
switchMap(() => {
this.isLoading = true;
return this._evolutionService.getEvolutions(
this._paginator.pageIndex,
this._paginator.pageSize,
this._sort.active,
this._sort.direction
);
}),
map(() => {
this.isLoading = false;
})
)
.subscribe();
}
}
/**
* On destroy
*/
ngOnDestroy(): void {
// Unsubscribe from all subscriptions
this._unsubscribeAll.next(null);
this._unsubscribeAll.complete();
}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------------
// @ Private methods
// -----------------------------------------------------------------------------------------------------
/**
* Create product
*/
__createProduct(): void {}
/**
* Toggle product details
*
* @param productId
*/
__toggleDetails(productId: string): void {}
/**
* Track by function for ngFor loops
*
* @param index
* @param item
*/
__trackByFn(index: number, item: any): any {
return item.id || index;
}
}

View File

@ -0,0 +1,42 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { MatButtonModule } from '@angular/material/button';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatRippleModule } from '@angular/material/core';
import { MatSortModule } from '@angular/material/sort';
import { MatSelectModule } from '@angular/material/select';
import { MatTooltipModule } from '@angular/material/tooltip';
import { TranslocoModule } from '@ngneat/transloco';
import { SharedModule } from 'app/shared/shared.module';
import { COMPONENTS } from './components';
import { evolutionRoutes } from './evolution.routing';
@NgModule({
declarations: [COMPONENTS],
imports: [
TranslocoModule,
SharedModule,
RouterModule.forChild(evolutionRoutes),
MatButtonModule,
MatFormFieldModule,
MatIconModule,
MatInputModule,
MatPaginatorModule,
MatProgressBarModule,
MatRippleModule,
MatSortModule,
MatSelectModule,
MatTooltipModule,
],
})
export class EvolutionModule {}

View File

@ -0,0 +1,15 @@
import { Route } from '@angular/router';
import { ListComponent } from './components/list.component';
import { EvolutionsResolver } from './resolvers/evolution.resolver';
export const evolutionRoutes: Route[] = [
{
path: '',
component: ListComponent,
resolve: {
deposits: EvolutionsResolver,
},
},
];

View File

@ -0,0 +1,8 @@
export interface EvolutionPagination {
length: number;
size: number;
page: number;
lastPage: number;
startIndex: number;
endIndex: number;
}

View File

@ -0,0 +1,58 @@
export interface Evolution {
id?: string;
startDate?: string;
finishDate?: string;
availableBetting?: number;
bettingMoney?: number;
winningMoney?: number;
cancel?: number;
betWinCancel?: number;
mainofficeRolling?: number;
branchRolling?: number;
divisionRolling?: number;
officeRolling?: number;
storeRolling?: number;
memberRolling?: number;
totalrolling?: number;
highRank?: string;
gameId?: string;
nickname?: string;
gameName?: string;
gameInfo1?: string;
gameInfo2?: string;
gameInfo3?: string;
form?: string;
betting?: number;
profitLoss?: number;
beforeWinning?: number;
winning?: number;
afterWinning?: number;
beforeBetting?: number;
afterBetting?: number;
finalMoney?: number;
bettingInfo1?: string;
bettingInfo2?: number;
bettingInfo3?: number;
data?: string;
comp?: string;
mainofficeName?: string;
mainofficePercent?: number;
mainofficePoint?: number;
branchName?: string;
branchPercent?: number;
branchPoint?: number;
divisionName?: string;
divisionPercent?: number;
divisionPoint?: number;
officeName?: string;
officePercent?: number;
officePoint?: number;
storeName?: string;
storePercent?: number;
storePoint?: number;
memberName?: string;
memberPercent?: number;
memberPoint?: number;
bettingTime?: string;
registrationTime?: string;
}

View File

@ -0,0 +1,89 @@
import { Injectable } from '@angular/core';
import {
ActivatedRouteSnapshot,
Resolve,
Router,
RouterStateSnapshot,
} from '@angular/router';
import { catchError, Observable, throwError } from 'rxjs';
import { Evolution } from '../models/evolution';
import { EvolutionPagination } from '../models/evolution-pagination';
import { EvolutionService } from '../services/evolution.service';
@Injectable({
providedIn: 'root',
})
export class EvolutionResolver implements Resolve<any> {
/**
* Constructor
*/
constructor(
private _evolutionService: EvolutionService,
private _router: Router
) {}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Resolver
*
* @param route
* @param state
*/
resolve(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<Evolution | undefined> {
return this._evolutionService
.getEvolutionById(route.paramMap.get('id'))
.pipe(
// Error here means the requested product is not available
catchError((error) => {
// Log the error
console.error(error);
// Get the parent url
const parentUrl = state.url.split('/').slice(0, -1).join('/');
// Navigate to there
this._router.navigateByUrl(parentUrl);
// Throw an error
return throwError(error);
})
);
}
}
@Injectable({
providedIn: 'root',
})
export class EvolutionsResolver implements Resolve<any> {
/**
* Constructor
*/
constructor(private _evolutionService: EvolutionService) {}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Resolver
*
* @param route
* @param state
*/
resolve(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<{
pagination: EvolutionPagination;
evolutions: Evolution[];
}> {
return this._evolutionService.getEvolutions();
}
}

View File

@ -0,0 +1,156 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import {
BehaviorSubject,
filter,
map,
Observable,
of,
switchMap,
take,
tap,
throwError,
} from 'rxjs';
import { Evolution } from '../models/evolution';
import { EvolutionPagination } from '../models/evolution-pagination';
@Injectable({
providedIn: 'root',
})
export class EvolutionService {
// Private
private __pagination = new BehaviorSubject<EvolutionPagination | undefined>(
undefined
);
private __evolution = new BehaviorSubject<Evolution | undefined>(undefined);
private __evolutions = new BehaviorSubject<Evolution[] | undefined>(
undefined
);
/**
* Constructor
*/
constructor(private _httpClient: HttpClient) {}
// -----------------------------------------------------------------------------------------------------
// @ Accessors
// -----------------------------------------------------------------------------------------------------
/**
* Getter for pagination
*/
get pagination$(): Observable<EvolutionPagination | undefined> {
return this.__pagination.asObservable();
}
/**
* Getter for evolution
*/
get evolution$(): Observable<Evolution | undefined> {
return this.__evolution.asObservable();
}
/**
* Getter for evolutions
*/
get evolutions$(): Observable<Evolution[] | undefined> {
return this.__evolutions.asObservable();
}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Get evolutions
*
*
* @param page
* @param size
* @param sort
* @param order
* @param search
*/
getEvolutions(
page: number = 0,
size: number = 10,
sort: string = 'nickname',
order: 'asc' | 'desc' | '' = 'asc',
search: string = ''
): Observable<{
pagination: EvolutionPagination;
evolutions: Evolution[];
}> {
return this._httpClient
.get<{ pagination: EvolutionPagination; evolutions: Evolution[] }>(
'api/apps/game/evolution/evolutions',
{
params: {
page: '' + page,
size: '' + size,
sort,
order,
search,
},
}
)
.pipe(
tap((response) => {
this.__pagination.next(response.pagination);
this.__evolutions.next(response.evolutions);
})
);
}
/**
* Get product by id
*/
getEvolutionById(id: string | null): Observable<Evolution> {
return this.__evolutions.pipe(
take(1),
map((evolutions) => {
// Find the product
const evolution =
evolutions?.find((item) => item.id === id) || undefined;
// Update the product
this.__evolution.next(evolution);
// Return the product
return evolution;
}),
switchMap((product) => {
if (!product) {
return throwError('Could not found product with id of ' + id + '!');
}
return of(product);
})
);
}
/**
* Create product
*/
createEvolution(): Observable<Evolution> {
return this.evolutions$.pipe(
take(1),
switchMap((evolutions) =>
this._httpClient
.post<Evolution>('api/apps/game/evolution/product', {})
.pipe(
map((newEvolution) => {
// Update the evolutions with the new product
if (!!evolutions) {
this.__evolutions.next([newEvolution, ...evolutions]);
}
// Return the new product
return newEvolution;
})
)
)
);
}
}

View File

@ -24,7 +24,7 @@
>
<fieldset>
{{ powerball.startDate }}~{{ powerball.finishDate }}까지의 총
팅금액:{{ powerball.totalBetting }}원, 당첨금액:{{
팅금액:{{ powerball.totalBetting }}원, 당첨금액:{{
powerball.winningMoney
}}원, 진행중금액:{{ powerball.proceedingMoney }}원, 정산:{{
powerball.calculate
@ -84,7 +84,7 @@
<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>
<!-- Search -->
@ -144,19 +144,19 @@
class="hidden sm:block"
[mat-sort-header]="'bettingProgress'"
>
팅진행내역
팅진행내역
</div>
<div class="hidden sm:block" [mat-sort-header]="'odds'">
배당률
</div>
<div class="hidden sm:block" [mat-sort-header]="'bettingMoney'">
팅액
팅액
</div>
<div class="hidden sm:block" [mat-sort-header]="'hitMoney'">
배당적중금
</div>
<div class="hidden sm:block" [mat-sort-header]="'bettingTime'">
팅시간
팅시간
</div>
<div class="hidden sm:block" [mat-sort-header]="'result'">
결과

View File

@ -1,20 +1,20 @@
export interface Powerball {
id: string;
nickname: string;
startDate: string;
finishDate: string;
totalBetting: string;
winningMoney: number;
proceedingMoney: number;
calculate: number;
index: string;
division: string;
rank: string;
bettingProgress: string;
odds: number;
bettingMoney: number;
hitMoney: number;
bettingTime: string;
result: string;
delete: string;
id?: string;
nickname?: string;
startDate?: string;
finishDate?: string;
totalBetting?: string;
winningMoney?: number;
proceedingMoney?: number;
calculate?: number;
index?: string;
division?: string;
rank?: string;
bettingProgress?: string;
odds?: number;
bettingMoney?: number;
hitMoney?: number;
bettingTime?: string;
result?: string;
delete?: string;
}

View File

@ -0,0 +1,3 @@
import { ListComponent } from './list.component';
export const COMPONENTS = [ListComponent];

View File

@ -0,0 +1,390 @@
<div
class="sm:absolute sm:inset-0 flex flex-col flex-auto min-w-0 sm:overflow-hidden bg-card dark:bg-transparent"
>
<!-- Header -->
<div
class="relative flex flex-col sm:flex-row flex-0 sm:items-center sm:justify-between py-8 px-6 md:px-8 border-b"
>
<!-- Loader -->
<div class="absolute inset-x-0 bottom-0" *ngIf="isLoading">
<mat-progress-bar [mode]="'indeterminate'"></mat-progress-bar>
</div>
<!-- Title -->
<div class="text-4xl font-extrabold tracking-tight">Slot</div>
<!-- Actions -->
<div class="flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4">
<!-- Memo -->
<!-- <mat-form-field>
<ng-container *ngIf="slots$ | async as slots">
<ng-container *ngFor="let slot of slots; trackBy: __trackByFn">
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<fieldset>
{{ slot.startDate }}~{{ slot.finishDate }}까지의 총
유효배팅:{{ slot.availableBetting }}원, 배팅금액:{{
slot.bettingMoney
}}원, 당첨:{{ slot.winning }}원, 취소:{{ slot.cancel }}원,
배팅-당첨-취소:{{ slot.betWinCancel }}원, 본사롤링:{{
slot.mainofficeRolling
}}원, 대본롤링:{{ slot.branchRolling }}원, 부본롤링:{{
slot.divisionRolling
}}원, 총판롤링:{{ slot.officeRolling }}원, 매장롤링:{{
slot.storeRolling
}}원, 회원롤링:{{ slot.memberRolling }}원, 롤링합계:{{
slot.totalrolling
}}원
</fieldset>
</div>
</ng-container>
</ng-container>
</mat-form-field> -->
<!-- SelectBox -->
<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-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-option value="">레드레이크</mat-option>
<mat-option value="">릴렉스</mat-option>
<mat-option value="">블루프린트</mat-option>
<mat-option value="">ELK</mat-option>
<mat-option value="">아시안게이밍 슬롯</mat-option>
<mat-option value="">CQ9 슬롯</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="">배팅100만미만</mat-option>
<mat-option value="">배팅100-300만</mat-option>
<mat-option value="">배팅300-500만</mat-option>
<mat-option value="">배팅500만이상</mat-option>
<mat-option value="">당첨1000만초과</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>
<!-- Search -->
<mat-form-field
class="fuse-mat-dense fuse-mat-no-subscript fuse-mat-rounded min-w-64"
>
<mat-icon
class="icon-size-5"
matPrefix
[svgIcon]="'heroicons_solid:search'"
></mat-icon>
<input
matInput
[formControl]="searchInputControl"
[autocomplete]="'off'"
[placeholder]="'Search'"
/>
</mat-form-field>
<!-- Search button -->
<button
class="ml-4"
mat-flat-button
[color]="'primary'"
(click)="__createProduct()"
>
<!-- <mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon> -->
<span class="ml-2 mr-1">검색하기</span>
</button>
</div>
</div>
<!-- Main -->
<div class="flex flex-auto overflow-hidden">
<!-- Products list -->
<div
class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto"
>
<ng-container *ngIf="slots$ | async as slots">
<ng-container *ngIf="slots.length > 0; else noSlot">
<div class="grid">
<!-- Header -->
<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"
matSort
matSortDisableClear
>
<div></div>
<div class="hidden sm:block" [mat-sort-header]="'highRank'">
상위
</div>
<div class="hidden sm:block" [mat-sort-header]="'userInfo'">
유저
</div>
<div class="hidden sm:block" [mat-sort-header]="'gameInfo'">
게임
</div>
<div class="hidden sm:block" [mat-sort-header]="'form'">형식</div>
<div class="hidden sm:block" [mat-sort-header]="'money'">
금액
</div>
<div class="hidden sm:block" [mat-sort-header]="'money'">
최종금액
</div>
<div class="hidden sm:block" [mat-sort-header]="'betting'">
배팅
</div>
<div class="hidden sm:block" [mat-sort-header]="'data'">
데이터
</div>
<div class="hidden sm:block" [mat-sort-header]="'comp'">콤프</div>
<div class="hidden sm:block" [mat-sort-header]="'rolling'">
롤링
</div>
<div class="hidden sm:block" [mat-sort-header]="'time'">
배팅시간 등록시간
</div>
<!-- <div class="hidden md:block" [mat-sort-header]="'sku'">SKU</div>
<div [mat-sort-header]="'name'">Name</div>
<div class="hidden sm:block" [mat-sort-header]="'price'">
Price
</div>
<div class="hidden lg:block" [mat-sort-header]="'stock'">
Stock
</div>
<div class="hidden lg:block" [mat-sort-header]="'active'">
Active
</div>
<div class="hidden sm:block">Details</div> -->
</div>
<!-- Rows -->
<ng-container *ngIf="slots$ | async as slots">
<ng-container *ngFor="let slot of slots; trackBy: __trackByFn">
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<!-- highRank -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ slot.highRank }}
</button>
</div>
<!-- userInfo -->
<div class="hidden sm:block truncate">
{{ slot.gameId }}
{{ slot.id }}
{{ slot.nickname }}
</div>
<!-- game -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ slot.gameName }}
</button>
{{ slot.gameInfo1 }}
{{ slot.gameInfo2 }}
{{ slot.gameInfo3 }}
</div>
<!-- form -->
<!-- <div class="hidden sm:block truncate">
{{ evolution.form }}
</div> -->
<!-- money -->
<div class="hidden sm:block truncate">
배팅{{ slot.betting }} 당첨{{ slot.winning }} 손익{{
slot.profitLoss
}}
</div>
<!-- finalMoney -->
<div class="hidden sm:block truncate">
배팅 전{{ slot.beforeBetting }} 배팅 후{{
slot.afterBetting
}}
최종금액{{ slot.finalMoney }}
</div>
<!-- betting -->
<div class="hidden sm:block truncate">
{{ slot.bettingInfo1 }}
{{ slot.bettingInfo2 }}
{{ slot.bettingInfo3 }}
</div>
<!-- data -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ slot.data }}
</button>
</div>
<!-- comp -->
<div class="hidden sm:block truncate">
{{ slot.comp }}
</div>
<!-- rolling -->
<div class="hidden sm:block truncate">
본사:{{ slot.mainofficeName }}({{
slot.mainofficePercent
}}%,{{ slot.mainofficePoint }}P) 대본:{{
slot.branchName
}}({{ slot.branchPercent }}%,{{ slot.branchPoint }}P)
부본:{{ slot.divisionName }}({{ slot.divisionPercent }}%,{{
slot.divisionPoint
}}P) 총판:{{ slot.officeName }}({{ slot.officePercent }}%,{{
slot.officePoint
}}P) 매장:{{ slot.storeName }}({{ slot.storePercent }}%,{{
slot.storePoint
}}P) 회원:{{ slot.memberName }}({{ slot.memberPercent }}%,{{
slot.memberPoint
}}P)
</div>
<!-- bettingTime -->
<div class="hidden sm:block truncate">
{{ slot.bettingTime }}
{{ slot.registrationTime }}
</div>
<!-- Image -->
<!-- <div class="flex items-center">
<div
class="relative flex flex-0 items-center justify-center w-12 h-12 mr-6 rounded overflow-hidden border"
>
<img
class="w-8"
*ngIf="user.thumbnail"
[alt]="'Product thumbnail image'"
[src]="user.thumbnail"
/>
<div
class="flex items-center justify-center w-full h-full text-xs font-semibold leading-none text-center uppercase"
*ngIf="!user.thumbnail"
>
NO THUMB
</div>
</div>
</div> -->
<!-- SKU -->
<!-- <div class="hidden md:block truncate">
{{ user.sku }}
</div> -->
<!-- Name -->
<!-- <div class="truncate">
{{ user.name }}
</div> -->
<!-- Price -->
<!-- <div class="hidden sm:block">
{{ user.price | currency: "USD":"symbol":"1.2-2" }}
</div> -->
<!-- Stock -->
<!-- <div class="hidden lg:flex items-center">
<div class="min-w-4">{{ user.stock }}</div> -->
<!-- Low stock -->
<!-- <div
class="flex items-end ml-2 w-1 h-4 bg-red-200 rounded overflow-hidden"
*ngIf="user.stock < 20"
>
<div class="flex w-full h-1/3 bg-red-600"></div>
</div> -->
<!-- Medium stock -->
<!-- <div
class="flex items-end ml-2 w-1 h-4 bg-orange-200 rounded overflow-hidden"
*ngIf="user.stock >= 20 && user.stock < 30"
>
<div class="flex w-full h-2/4 bg-orange-400"></div>
</div> -->
<!-- High stock -->
<!-- <div
class="flex items-end ml-2 w-1 h-4 bg-green-100 rounded overflow-hidden"
*ngIf="user.stock >= 30"
>
<div class="flex w-full h-full bg-green-400"></div>
</div>
</div> -->
<!-- Active -->
<!-- <div class="hidden lg:block">
<ng-container *ngIf="user.active">
<mat-icon
class="text-green-400 icon-size-5"
[svgIcon]="'heroicons_solid:check'"
></mat-icon>
</ng-container>
<ng-container *ngIf="!user.active">
<mat-icon
class="text-gray-400 icon-size-5"
[svgIcon]="'heroicons_solid:x'"
></mat-icon>
</ng-container>
</div> -->
<!-- Details button -->
<!-- <div>
<button
class="min-w-10 min-h-7 h-7 px-2 leading-6"
mat-stroked-button
(click)="__toggleDetails(user.id)"
>
<mat-icon
class="icon-size-5"
[svgIcon]="
selectedUser?.id === user.id
? 'heroicons_solid:chevron-up'
: 'heroicons_solid:chevron-down'
"
></mat-icon>
</button>
</div> -->
</div>
</ng-container>
</ng-container>
</div>
<mat-paginator
class="sm:absolute sm:inset-x-0 sm:bottom-0 border-b sm:border-t sm:border-b-0 z-10 bg-gray-50 dark:bg-transparent"
[ngClass]="{ 'pointer-events-none': isLoading }"
[length]="pagination?.length"
[pageIndex]="pagination?.page"
[pageSize]="pagination?.size"
[pageSizeOptions]="[5, 10, 25, 100]"
[showFirstLastButtons]="true"
></mat-paginator>
</ng-container>
</ng-container>
<ng-template #noSlot>
<div
class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center"
>
There are no slot!
</div>
</ng-template>
</div>
</div>
</div>

View File

@ -0,0 +1,190 @@
import {
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
OnDestroy,
OnInit,
ViewChild,
ViewEncapsulation,
} from '@angular/core';
import {
FormBuilder,
FormControl,
FormGroup,
Validators,
} from '@angular/forms';
import { MatCheckboxChange } from '@angular/material/checkbox';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import {
debounceTime,
map,
merge,
Observable,
Subject,
switchMap,
takeUntil,
} from 'rxjs';
import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation';
import { Slot } from '../models/slot';
import { SlotPagination } from '../models/slot-pagination';
import { SlotService } from '../services/slot.service';
@Component({
selector: 'slot-list',
templateUrl: './list.component.html',
styles: [
/* language=SCSS */
`
.inventory-grid {
grid-template-columns: 60px auto 40px;
@screen sm {
grid-template-columns: 60px auto 60px 72px;
}
@screen md {
grid-template-columns: 60px 60px auto 112px 72px;
}
@screen lg {
grid-template-columns: 60px 60px auto 112px 96px 96px 72px;
}
}
`,
],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
animations: fuseAnimations,
})
export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
slots$!: Observable<Slot[] | undefined>;
isLoading = false;
searchInputControl = new FormControl();
selectedSlot?: Slot;
pagination?: SlotPagination;
private _unsubscribeAll: Subject<any> = new Subject<any>();
/**
* Constructor
*/
constructor(
private _changeDetectorRef: ChangeDetectorRef,
private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder,
private _slotService: SlotService
) {}
// -----------------------------------------------------------------------------------------------------
// @ Lifecycle hooks
// -----------------------------------------------------------------------------------------------------
/**
* On init
*/
ngOnInit(): void {
// Get the pagination
this._slotService.pagination$
.pipe(takeUntil(this._unsubscribeAll))
.subscribe((pagination: SlotPagination | undefined) => {
// Update the pagination
this.pagination = pagination;
// Mark for check
this._changeDetectorRef.markForCheck();
});
// Get the products
this.slots$ = this._slotService.slots$;
}
/**
* After view init
*/
ngAfterViewInit(): void {
if (this._sort && this._paginator) {
// Set the initial sort
this._sort.sort({
id: 'nickname',
start: 'asc',
disableClear: true,
});
// Mark for check
this._changeDetectorRef.markForCheck();
// If the slot changes the sort order...
this._sort.sortChange
.pipe(takeUntil(this._unsubscribeAll))
.subscribe(() => {
// Reset back to the first page
this._paginator.pageIndex = 0;
});
// Get products if sort or page changes
merge(this._sort.sortChange, this._paginator.page)
.pipe(
switchMap(() => {
this.isLoading = true;
return this._slotService.getSlots(
this._paginator.pageIndex,
this._paginator.pageSize,
this._sort.active,
this._sort.direction
);
}),
map(() => {
this.isLoading = false;
})
)
.subscribe();
}
}
/**
* On destroy
*/
ngOnDestroy(): void {
// Unsubscribe from all subscriptions
this._unsubscribeAll.next(null);
this._unsubscribeAll.complete();
}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------------
// @ Private methods
// -----------------------------------------------------------------------------------------------------
/**
* Create product
*/
__createProduct(): void {}
/**
* Toggle product details
*
* @param productId
*/
__toggleDetails(productId: string): void {}
/**
* Track by function for ngFor loops
*
* @param index
* @param item
*/
__trackByFn(index: number, item: any): any {
return item.id || index;
}
}

View File

@ -0,0 +1,8 @@
export interface SlotPagination {
length: number;
size: number;
page: number;
lastPage: number;
startIndex: number;
endIndex: number;
}

View File

@ -0,0 +1,58 @@
export interface Slot {
id?: string;
startDate?: string;
finishDate?: string;
availableBetting?: number;
bettingMoney?: number;
winningMoney?: number;
cancel?: number;
betWinCancel?: number;
mainofficeRolling?: number;
branchRolling?: number;
divisionRolling?: number;
officeRolling?: number;
storeRolling?: number;
memberRolling?: number;
totalrolling?: number;
highRank?: string;
gameId?: string;
nickname?: string;
gameName?: string;
gameInfo1?: string;
gameInfo2?: string;
gameInfo3?: string;
form?: string;
betting?: number;
profitLoss?: number;
beforeWinning?: number;
winning?: number;
afterWinning?: number;
beforeBetting?: number;
afterBetting?: number;
finalMoney?: number;
bettingInfo1?: string;
bettingInfo2?: number;
bettingInfo3?: number;
data?: string;
comp?: string;
mainofficeName?: string;
mainofficePercent?: number;
mainofficePoint?: number;
branchName?: string;
branchPercent?: number;
branchPoint?: number;
divisionName?: string;
divisionPercent?: number;
divisionPoint?: number;
officeName?: string;
officePercent?: number;
officePoint?: number;
storeName?: string;
storePercent?: number;
storePoint?: number;
memberName?: string;
memberPercent?: number;
memberPoint?: number;
bettingTime?: string;
registrationTime?: string;
}

View File

@ -0,0 +1,84 @@
import { Injectable } from '@angular/core';
import {
ActivatedRouteSnapshot,
Resolve,
Router,
RouterStateSnapshot,
} from '@angular/router';
import { catchError, Observable, throwError } from 'rxjs';
import { Slot } from '../models/slot';
import { SlotPagination } from '../models/slot-pagination';
import { SlotService } from '../services/slot.service';
@Injectable({
providedIn: 'root',
})
export class SlotResolver implements Resolve<any> {
/**
* Constructor
*/
constructor(private _slotService: SlotService, private _router: Router) {}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Resolver
*
* @param route
* @param state
*/
resolve(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<Slot | undefined> {
return this._slotService.getSlotById(route.paramMap.get('id')).pipe(
// Error here means the requested product is not available
catchError((error) => {
// Log the error
console.error(error);
// Get the parent url
const parentUrl = state.url.split('/').slice(0, -1).join('/');
// Navigate to there
this._router.navigateByUrl(parentUrl);
// Throw an error
return throwError(error);
})
);
}
}
@Injectable({
providedIn: 'root',
})
export class SlotsResolver implements Resolve<any> {
/**
* Constructor
*/
constructor(private _slotService: SlotService) {}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Resolver
*
* @param route
* @param state
*/
resolve(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<{
pagination: SlotPagination;
slots: Slot[];
}> {
return this._slotService.getSlots();
}
}

View File

@ -0,0 +1,151 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import {
BehaviorSubject,
filter,
map,
Observable,
of,
switchMap,
take,
tap,
throwError,
} from 'rxjs';
import { Slot } from '../models/slot';
import { SlotPagination } from '../models/slot-pagination';
@Injectable({
providedIn: 'root',
})
export class SlotService {
// Private
private __pagination = new BehaviorSubject<SlotPagination | undefined>(
undefined
);
private __slot = new BehaviorSubject<Slot | undefined>(undefined);
private __slots = new BehaviorSubject<Slot[] | undefined>(undefined);
/**
* Constructor
*/
constructor(private _httpClient: HttpClient) {}
// -----------------------------------------------------------------------------------------------------
// @ Accessors
// -----------------------------------------------------------------------------------------------------
/**
* Getter for pagination
*/
get pagination$(): Observable<SlotPagination | undefined> {
return this.__pagination.asObservable();
}
/**
* Getter for slot
*/
get slot$(): Observable<Slot | undefined> {
return this.__slot.asObservable();
}
/**
* Getter for slots
*/
get slots$(): Observable<Slot[] | undefined> {
return this.__slots.asObservable();
}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Get slots
*
*
* @param page
* @param size
* @param sort
* @param order
* @param search
*/
getSlots(
page: number = 0,
size: number = 10,
sort: string = 'nickname',
order: 'asc' | 'desc' | '' = 'asc',
search: string = ''
): Observable<{
pagination: SlotPagination;
slots: Slot[];
}> {
return this._httpClient
.get<{ pagination: SlotPagination; slots: Slot[] }>(
'api/apps/game/slot/slots',
{
params: {
page: '' + page,
size: '' + size,
sort,
order,
search,
},
}
)
.pipe(
tap((response) => {
this.__pagination.next(response.pagination);
this.__slots.next(response.slots);
})
);
}
/**
* Get product by id
*/
getSlotById(id: string | null): Observable<Slot> {
return this.__slots.pipe(
take(1),
map((slots) => {
// Find the product
const slot = slots?.find((item) => item.id === id) || undefined;
// Update the product
this.__slot.next(slot);
// Return the product
return slot;
}),
switchMap((product) => {
if (!product) {
return throwError('Could not found product with id of ' + id + '!');
}
return of(product);
})
);
}
/**
* Create product
*/
createSlot(): Observable<Slot> {
return this.slots$.pipe(
take(1),
switchMap((slots) =>
this._httpClient.post<Slot>('api/apps/game/slot/product', {}).pipe(
map((newSlot) => {
// Update the slots with the new product
if (!!slots) {
this.__slots.next([newSlot, ...slots]);
}
// Return the new product
return newSlot;
})
)
)
);
}
}

View File

@ -0,0 +1,42 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { MatButtonModule } from '@angular/material/button';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatRippleModule } from '@angular/material/core';
import { MatSortModule } from '@angular/material/sort';
import { MatSelectModule } from '@angular/material/select';
import { MatTooltipModule } from '@angular/material/tooltip';
import { TranslocoModule } from '@ngneat/transloco';
import { SharedModule } from 'app/shared/shared.module';
import { COMPONENTS } from './components';
import { slotRoutes } from './slot.routing';
@NgModule({
declarations: [COMPONENTS],
imports: [
TranslocoModule,
SharedModule,
RouterModule.forChild(slotRoutes),
MatButtonModule,
MatFormFieldModule,
MatIconModule,
MatInputModule,
MatPaginatorModule,
MatProgressBarModule,
MatRippleModule,
MatSortModule,
MatSelectModule,
MatTooltipModule,
],
})
export class SlotModule {}

View File

@ -0,0 +1,15 @@
import { Route } from '@angular/router';
import { ListComponent } from './components/list.component';
import { SlotsResolver } from './resolvers/slot.resolver';
export const slotRoutes: Route[] = [
{
path: '',
component: ListComponent,
resolve: {
deposits: SlotsResolver,
},
},
];

View File

@ -0,0 +1,48 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { MatButtonModule } from '@angular/material/button';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatRippleModule } from '@angular/material/core';
import { MatSortModule } from '@angular/material/sort';
import { MatSelectModule } from '@angular/material/select';
import { MatTooltipModule } from '@angular/material/tooltip';
import { MatGridListModule } from '@angular/material/grid-list';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import { MatRadioModule } from '@angular/material/radio';
import { TranslocoModule } from '@ngneat/transloco';
import { SharedModule } from 'app/shared/shared.module';
import { COMPONENTS } from './components';
import { casinomoneyRoutes } from './casinomoney.routing';
@NgModule({
declarations: [COMPONENTS],
imports: [
TranslocoModule,
SharedModule,
RouterModule.forChild(casinomoneyRoutes),
MatButtonModule,
MatFormFieldModule,
MatIconModule,
MatInputModule,
MatPaginatorModule,
MatProgressBarModule,
MatRippleModule,
MatSortModule,
MatSelectModule,
MatTooltipModule,
MatGridListModule,
MatSlideToggleModule,
MatRadioModule,
],
})
export class CasinomoneyModule {}

View File

@ -0,0 +1,15 @@
import { Route } from '@angular/router';
import { ListComponent } from './components/list.component';
import { CasinomoneysResolver } from './resolvers/casinomoney.resolver';
export const casinomoneyRoutes: Route[] = [
{
path: '',
component: ListComponent,
resolve: {
casinomoneyrs: CasinomoneysResolver,
},
},
];

View File

@ -0,0 +1,3 @@
import { ListComponent } from './list.component';
export const COMPONENTS = [ListComponent];

View File

@ -0,0 +1,432 @@
<div
class="sm:absolute sm:inset-0 flex flex-col flex-auto min-w-0 sm:overflow-hidden bg-card dark:bg-transparent"
>
<!-- Header -->
<div
class="relative flex flex-col sm:flex-row flex-0 sm:items-center sm:justify-between py-8 px-6 md:px-8 border-b"
>
<!-- Loader -->
<div class="absolute inset-x-0 bottom-0" *ngIf="isLoading">
<mat-progress-bar [mode]="'indeterminate'"></mat-progress-bar>
</div>
<!-- Title -->
<div class="text-4xl font-extrabold tracking-tight">Casino 머니파악</div>
<!-- Actions -->
<div class="flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4">
<!-- Memo -->
<!-- <mat-form-field>
<input matInput type="text" />
</mat-form-field>
<button mat-flat-button [color]="'primary'">메모저장</button> -->
<!-- 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-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 -->
<mat-form-field
class="fuse-mat-dense fuse-mat-no-subscript fuse-mat-rounded min-w-64"
>
<mat-icon
class="icon-size-5"
matPrefix
[svgIcon]="'heroicons_solid:search'"
></mat-icon>
<input
matInput
[formControl]="searchInputControl"
[autocomplete]="'off'"
[placeholder]="'Search user'"
/>
</mat-form-field>
<!-- Add user button -->
<button
class="ml-4"
mat-flat-button
[color]="'primary'"
(click)="__createProduct()"
>
<mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon>
<span class="ml-2 mr-1">Add</span>
</button>
</div>
</div>
<!-- Main -->
<div class="flex flex-auto overflow-hidden">
<!-- Products list -->
<div
class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto"
>
<ng-container *ngIf="casinomoneys$ | async as casinomoneys">
<ng-container *ngIf="casinomoneys.length > 0; else noCasinomoney">
<div class="grid">
<!-- Header -->
<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"
matSort
matSortDisableClear
>
<div></div>
<div class="hidden sm:block" [mat-sort-header]="'management'">
관리
</div>
<div class="hidden sm:block" [mat-sort-header]="'id'">아이디</div>
<div class="hidden sm:block" [mat-sort-header]="'nickname'">
닉네임
</div>
<div class="hidden sm:block" [mat-sort-header]="'accountHolder'">
예금주
</div>
<div class="hidden sm:block" [mat-sort-header]="'contact'">
연락처
</div>
<div class="hidden sm:block" [mat-sort-header]="'reserve'">
보유금
</div>
<div class="hidden sm:block" [mat-sort-header]="'gameMoney'">
게임중머니
</div>
<div class="hidden sm:block" [mat-sort-header]="'casinoCash'">
카지노->캐쉬
</div>
<div class="hidden sm:block" [mat-sort-header]="'todayComp'">
금일콤프
</div>
<div class="hidden sm:block" [mat-sort-header]="'total'">
총입출
</div>
<div class="hidden sm:block" [mat-sort-header]="'log'">로그</div>
<div class="hidden sm:block" [mat-sort-header]="'state'">
상태
</div>
<div class="hidden sm:block" [mat-sort-header]="'top'">상부</div>
<!-- <div class="hidden md:block" [mat-sort-header]="'sku'">SKU</div>
<div [mat-sort-header]="'name'">Name</div>
<div class="hidden sm:block" [mat-sort-header]="'price'">
Price
</div>
<div class="hidden lg:block" [mat-sort-header]="'stock'">
Stock
</div>
<div class="hidden lg:block" [mat-sort-header]="'active'">
Active
</div>
<div class="hidden sm:block">Details</div> -->
</div>
<!-- Rows -->
<ng-container *ngIf="casinomoneys$ | async as casinomoneys">
<ng-container
*ngFor="let casinomoney of casinomoneys; trackBy: __trackByFn"
>
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<!-- management -->
<!-- rate -->
<div class="hidden sm:block truncate">
<button
mat-button
color="primary"
matTooltip="요율확인
카지노-바카라: 0%
카지노-룰렛: 0%
카지노-드레곤타이거: 0%
카지노-그외: 0%
슬롯: 0%
카지노루징: 0%
슬롯루징: 0%"
>
요율
</button>
<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>
<!-- highRank -->
<div class="hidden sm:block truncate">
<button
mat-button
color="primary"
matTooltip="상부트리
[본사]
[대본]
[부본]
[총판]
[매장]"
>
{{ casinomoney.highRank }}
</button>
</div>
<!-- rank -->
<div class="hidden sm:block truncate">
{{ casinomoney.rank }}
</div>
<!-- level -->
<div class="hidden sm:block truncate">
LV.{{ casinomoney.level }}
</div>
</div>
<!-- id -->
<div class="hidden sm:block truncate">
{{ casinomoney.id }}
</div>
<!-- nickname -->
<div class="hidden sm:block truncate">
{{ casinomoney.nickname }}
</div>
<!-- accountHolder -->
<div class="hidden sm:block truncate">
{{ casinomoney.accountHolder }}
</div>
<!-- contact -->
<div class="hidden sm:block truncate">
{{ casinomoney.contact }}
</div>
<!-- reserve -->
<div class="hidden sm:block truncate">
캐쉬{{ casinomoney.cash }} 콤프{{ casinomoney.comp }} 쿠폰{{
casinomoney.coupon
}}
</div>
<!-- gameMoney -->
<div class="hidden sm:block truncate">
{{ casinomoney.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">
{{ casinomoney.todayComp }}P
</div>
<!-- total -->
<div class="hidden sm:block truncate">
입금{{ casinomoney.deposit }} 출금{{
casinomoney.withdraw
}}
차익{{ casinomoney.margin }}
</div>
<!-- log -->
<div class="hidden sm:block truncate">
가입{{ casinomoney.accession }} 최종{{
casinomoney.final
}}
IP{{ casinomoney.ip }}
</div>
<!-- state -->
<div class="hidden sm:block truncate">
{{ casinomoney.state }}
</div>
<!-- top -->
<div class="hidden sm:block truncate">
{{ casinomoney.top }}
</div>
<!-- Image -->
<!-- <div class="flex items-center">
<div
class="relative flex flex-0 items-center justify-center w-12 h-12 mr-6 rounded overflow-hidden border"
>
<img
class="w-8"
*ngIf="user.thumbnail"
[alt]="'Product thumbnail image'"
[src]="user.thumbnail"
/>
<div
class="flex items-center justify-center w-full h-full text-xs font-semibold leading-none text-center uppercase"
*ngIf="!user.thumbnail"
>
NO THUMB
</div>
</div>
</div> -->
<!-- SKU -->
<!-- <div class="hidden md:block truncate">
{{ user.sku }}
</div> -->
<!-- Name -->
<!-- <div class="truncate">
{{ user.name }}
</div> -->
<!-- Price -->
<!-- <div class="hidden sm:block">
{{ user.price | currency: "USD":"symbol":"1.2-2" }}
</div> -->
<!-- Stock -->
<!-- <div class="hidden lg:flex items-center">
<div class="min-w-4">{{ user.stock }}</div> -->
<!-- Low stock -->
<!-- <div
class="flex items-end ml-2 w-1 h-4 bg-red-200 rounded overflow-hidden"
*ngIf="user.stock < 20"
>
<div class="flex w-full h-1/3 bg-red-600"></div>
</div> -->
<!-- Medium stock -->
<!-- <div
class="flex items-end ml-2 w-1 h-4 bg-orange-200 rounded overflow-hidden"
*ngIf="user.stock >= 20 && user.stock < 30"
>
<div class="flex w-full h-2/4 bg-orange-400"></div>
</div> -->
<!-- High stock -->
<!-- <div
class="flex items-end ml-2 w-1 h-4 bg-green-100 rounded overflow-hidden"
*ngIf="user.stock >= 30"
>
<div class="flex w-full h-full bg-green-400"></div>
</div>
</div> -->
<!-- Active -->
<!-- <div class="hidden lg:block">
<ng-container *ngIf="user.active">
<mat-icon
class="text-green-400 icon-size-5"
[svgIcon]="'heroicons_solid:check'"
></mat-icon>
</ng-container>
<ng-container *ngIf="!user.active">
<mat-icon
class="text-gray-400 icon-size-5"
[svgIcon]="'heroicons_solid:x'"
></mat-icon>
</ng-container>
</div> -->
<!-- Details button -->
<!-- <div>
<button
class="min-w-10 min-h-7 h-7 px-2 leading-6"
mat-stroked-button
(click)="__toggleDetails(user.id)"
>
<mat-icon
class="icon-size-5"
[svgIcon]="
selectedUser?.id === user.id
? 'heroicons_solid:chevron-up'
: 'heroicons_solid:chevron-down'
"
></mat-icon>
</button>
</div> -->
</ng-container>
</ng-container>
</div>
<mat-paginator
class="sm:absolute sm:inset-x-0 sm:bottom-0 border-b sm:border-t sm:border-b-0 z-10 bg-gray-50 dark:bg-transparent"
[ngClass]="{ 'pointer-events-none': isLoading }"
[length]="pagination?.length"
[pageIndex]="pagination?.page"
[pageSize]="pagination?.size"
[pageSizeOptions]="[5, 10, 25, 100]"
[showFirstLastButtons]="true"
></mat-paginator>
</ng-container>
</ng-container>
<ng-template #noCasinomoney>
<div
class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center"
>
There are no casinomoneys!
</div>
</ng-template>
</div>
</div>
</div>

View File

@ -0,0 +1,196 @@
import {
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
OnDestroy,
OnInit,
ViewChild,
ViewEncapsulation,
} from '@angular/core';
import {
FormBuilder,
FormControl,
FormGroup,
Validators,
} from '@angular/forms';
import { MatCheckboxChange } from '@angular/material/checkbox';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import {
debounceTime,
map,
merge,
Observable,
Subject,
switchMap,
takeUntil,
} from 'rxjs';
import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation';
import { Casinomoney } from '../models/casinomoney';
import { CasinomoneyPagination } from '../models/casinomoney-pagination';
import { CasinomoneyService } from '../services/casinomoney.service';
import { Router } from '@angular/router';
@Component({
selector: 'casinomoney-list',
templateUrl: './list.component.html',
styles: [
/* language=SCSS */
`
.inventory-grid {
grid-template-columns: 60px auto 40px;
@screen sm {
grid-template-columns: 60px auto 60px 72px;
}
@screen md {
grid-template-columns: 60px 60px auto 112px 72px;
}
@screen lg {
grid-template-columns: 60px 60px auto 112px 96px 96px 72px;
}
}
`,
],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
animations: fuseAnimations,
})
export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
casinomoneys$!: Observable<Casinomoney[] | undefined>;
isLoading = false;
searchInputControl = new FormControl();
selectedCasinomoney?: Casinomoney;
pagination?: CasinomoneyPagination;
private _unsubscribeAll: Subject<any> = new Subject<any>();
/**
* Constructor
*/
constructor(
private _changeDetectorRef: ChangeDetectorRef,
private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder,
private _casinomoneyService: CasinomoneyService,
private router: Router
) {}
// -----------------------------------------------------------------------------------------------------
// @ Lifecycle hooks
// -----------------------------------------------------------------------------------------------------
/**
* On init
*/
ngOnInit(): void {
// Get the pagination
this._casinomoneyService.pagination$
.pipe(takeUntil(this._unsubscribeAll))
.subscribe((pagination: CasinomoneyPagination | undefined) => {
// Update the pagination
this.pagination = pagination;
// Mark for check
this._changeDetectorRef.markForCheck();
});
// Get the products
this.casinomoneys$ = this._casinomoneyService.casinomoneys$;
}
/**
* After view init
*/
ngAfterViewInit(): void {
if (this._sort && this._paginator) {
// Set the initial sort
this._sort.sort({
id: 'name',
start: 'asc',
disableClear: true,
});
// Mark for check
this._changeDetectorRef.markForCheck();
// If the casinomoney changes the sort order...
this._sort.sortChange
.pipe(takeUntil(this._unsubscribeAll))
.subscribe(() => {
// Reset back to the first page
this._paginator.pageIndex = 0;
});
// Get products if sort or page changes
merge(this._sort.sortChange, this._paginator.page)
.pipe(
switchMap(() => {
this.isLoading = true;
return this._casinomoneyService.getCasinomoneys(
this._paginator.pageIndex,
this._paginator.pageSize,
this._sort.active,
this._sort.direction
);
}),
map(() => {
this.isLoading = false;
})
)
.subscribe();
}
}
/**
* On destroy
*/
ngOnDestroy(): void {
// Unsubscribe from all subscriptions
this._unsubscribeAll.next(null);
this._unsubscribeAll.complete();
}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
viewCasinomoneyDetail(id: string): void {
let url: string = 'member/casinomoney/' + id;
this.router.navigateByUrl(url);
}
// -----------------------------------------------------------------------------------------------------
// @ Private methods
// -----------------------------------------------------------------------------------------------------
/**
* Create product
*/
__createProduct(): void {}
/**
* Toggle product details
*
* @param productId
*/
__toggleDetails(productId: string): void {}
/**
* Track by function for ngFor loops
*
* @param index
* @param item
*/
__trackByFn(index: number, item: any): any {
return item.id || index;
}
}

View File

@ -0,0 +1,8 @@
export interface CasinomoneyPagination {
length: number;
size: number;
page: number;
lastPage: number;
startIndex: number;
endIndex: number;
}

View File

@ -0,0 +1,41 @@
export interface Casinomoney {
id?: string;
category?: string;
name: string;
description?: string;
tags?: string[];
sku?: string | null;
barcode?: string | null;
brand?: string | null;
vendor?: string | null;
stock?: number;
reserved?: number;
cost?: number;
basePrice?: number;
taxPercent?: number;
price?: number;
weight?: number;
thumbnail?: string;
images?: string[];
active?: boolean;
nickname?: string;
highRank?: string;
rank?: string;
level?: string;
accountHolder?: string;
contact?: string;
cash?: number;
comp?: number;
coupon?: number;
gameMoney?: number;
todayComp?: number;
deposit?: number;
withdraw?: number;
margin?: number;
accession?: string;
final?: string;
ip?: string;
state?: string;
top?: string;
}

View File

@ -0,0 +1,89 @@
import { Injectable } from '@angular/core';
import {
ActivatedRouteSnapshot,
Resolve,
Router,
RouterStateSnapshot,
} from '@angular/router';
import { catchError, Observable, throwError } from 'rxjs';
import { Casinomoney } from '../models/casinomoney';
import { CasinomoneyPagination } from '../models/casinomoney-pagination';
import { CasinomoneyService } from '../services/casinomoney.service';
@Injectable({
providedIn: 'root',
})
export class CasinomoneyResolver implements Resolve<any> {
/**
* Constructor
*/
constructor(
private _casinomoneyService: CasinomoneyService,
private _router: Router
) {}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Resolver
*
* @param route
* @param state
*/
resolve(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<Casinomoney | undefined> {
return this._casinomoneyService
.getCasinomoneyById(route.paramMap.get('id'))
.pipe(
// Error here means the requested product is not available
catchError((error) => {
// Log the error
console.error(error);
// Get the parent url
const parentUrl = state.url.split('/').slice(0, -1).join('/');
// Navigate to there
this._router.navigateByUrl(parentUrl);
// Throw an error
return throwError(error);
})
);
}
}
@Injectable({
providedIn: 'root',
})
export class CasinomoneysResolver implements Resolve<any> {
/**
* Constructor
*/
constructor(private _casinomoneyService: CasinomoneyService) {}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Resolver
*
* @param route
* @param state
*/
resolve(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<{
pagination: CasinomoneyPagination;
casinomoneys: Casinomoney[];
}> {
return this._casinomoneyService.getCasinomoneys();
}
}

View File

@ -0,0 +1,158 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import {
BehaviorSubject,
filter,
map,
Observable,
of,
switchMap,
take,
tap,
throwError,
} from 'rxjs';
import { Casinomoney } from '../models/casinomoney';
import { CasinomoneyPagination } from '../models/casinomoney-pagination';
@Injectable({
providedIn: 'root',
})
export class CasinomoneyService {
// Private
private __pagination = new BehaviorSubject<CasinomoneyPagination | undefined>(
undefined
);
private __casinomoney = new BehaviorSubject<Casinomoney | undefined>(
undefined
);
private __casinomoneys = new BehaviorSubject<Casinomoney[] | undefined>(
undefined
);
/**
* Constructor
*/
constructor(private _httpClient: HttpClient) {}
// -----------------------------------------------------------------------------------------------------
// @ Accessors
// -----------------------------------------------------------------------------------------------------
/**
* Getter for pagination
*/
get pagination$(): Observable<CasinomoneyPagination | undefined> {
return this.__pagination.asObservable();
}
/**
* Getter for casinomoney
*/
get casinomoney$(): Observable<Casinomoney | undefined> {
return this.__casinomoney.asObservable();
}
/**
* Getter for casinomoneys
*/
get casinomoneys$(): Observable<Casinomoney[] | undefined> {
return this.__casinomoneys.asObservable();
}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Get casinomoneys
*
*
* @param page
* @param size
* @param sort
* @param order
* @param search
*/
getCasinomoneys(
page: number = 0,
size: number = 10,
sort: string = 'name',
order: 'asc' | 'desc' | '' = 'asc',
search: string = ''
): Observable<{
pagination: CasinomoneyPagination;
casinomoneys: Casinomoney[];
}> {
return this._httpClient
.get<{ pagination: CasinomoneyPagination; casinomoneys: Casinomoney[] }>(
'api/apps/member/casinomoney/casinomoneys',
{
params: {
page: '' + page,
size: '' + size,
sort,
order,
search,
},
}
)
.pipe(
tap((response) => {
this.__pagination.next(response.pagination);
this.__casinomoneys.next(response.casinomoneys);
})
);
}
/**
* Get product by id
*/
getCasinomoneyById(id: string | null): Observable<Casinomoney> {
return this.__casinomoneys.pipe(
take(1),
map((casinomoneys) => {
// Find the product
const casinomoney =
casinomoneys?.find((item) => item.id === id) || undefined;
// Update the product
this.__casinomoney.next(casinomoney);
// Return the product
return casinomoney;
}),
switchMap((product) => {
if (!product) {
return throwError('Could not found product with id of ' + id + '!');
}
return of(product);
})
);
}
/**
* Create product
*/
createCasinomoney(): Observable<Casinomoney> {
return this.casinomoneys$.pipe(
take(1),
switchMap((casinomoneys) =>
this._httpClient
.post<Casinomoney>('api/apps/member/casinomoney/product', {})
.pipe(
map((newCasinomoney) => {
// Update the casinomoneys with the new product
if (!!casinomoneys) {
this.__casinomoneys.next([newCasinomoney, ...casinomoneys]);
}
// Return the new product
return newCasinomoney;
})
)
)
);
}
}

View File

@ -3,10 +3,14 @@
"Dashboards": "Dashboards",
"Member": "Member",
"User": "User",
"Casinomoney": "Casinomoney",
"Project": "Project",
"Partner": "Partner",
"Analytics": "Analytics",
"Deposit": "Deposit",
"Withdraw": "Withdraw",
"Powerball": "Powerball"
"Powerball": "Powerball",
"Casino": "Casino",
"Evolution": "Evolution",
"Slot": "Slot"
}

View File

@ -3,10 +3,14 @@
"Dashboards": "대쉬보드",
"Member": "회원",
"User": "사용자",
"Casinomoney": "CASINO 머니파악",
"Project": "프로젝트",
"Partner": "파트너",
"Analytics": "Analytics",
"Deposit": "입금관리",
"Withdraw": "출금관리",
"Powerball": "파워볼"
"Powerball": "파워볼",
"Casino": "카지노배팅리스트",
"Evolution": "에볼루션배팅리스트",
"Slot": "슬롯배팅리스트"
}