From 1931ea0dc1e60767095b8eaf67742bafb462b9ef Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Fri, 8 Jul 2022 03:14:42 +0000 Subject: [PATCH 01/10] =?UTF-8?q?=EC=9E=85=EA=B8=88=EA=B4=80=EB=A6=AC,=20?= =?UTF-8?q?=20=ED=8C=8C=EC=9B=8C=EB=B3=BC,=20=EC=82=AC=EC=9A=A9=EC=9E=90?= =?UTF-8?q?=20=EB=B3=80=EC=88=98=EB=AA=85=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/bank/deposit/models/deposit.ts | 3 - .../powerball/components/list.component.html | 4 +- .../admin/game/powerball/models/powerball.ts | 5 +- .../modules/admin/member/user/models/user.ts | 62 +++++++++---------- 4 files changed, 35 insertions(+), 39 deletions(-) diff --git a/src/app/modules/admin/bank/deposit/models/deposit.ts b/src/app/modules/admin/bank/deposit/models/deposit.ts index 31e16f7..4ff3c39 100644 --- a/src/app/modules/admin/bank/deposit/models/deposit.ts +++ b/src/app/modules/admin/bank/deposit/models/deposit.ts @@ -15,7 +15,4 @@ export interface Deposit { gameMoney?: number; highRank?: string; state?: string; - memberInformation?: string; - bettingInformation?: string; - delete?: string; } diff --git a/src/app/modules/admin/game/powerball/components/list.component.html b/src/app/modules/admin/game/powerball/components/list.component.html index 5d57473..c80b4a7 100644 --- a/src/app/modules/admin/game/powerball/components/list.component.html +++ b/src/app/modules/admin/game/powerball/components/list.component.html @@ -25,7 +25,7 @@
{{ powerball.startDate }}~{{ powerball.finishDate }}까지의 총 배팅금액:{{ powerball.totalBetting }}원, 당첨금액:{{ - powerball.winningMoney + powerball.totalWinning }}원, 진행중금액:{{ powerball.proceedingMoney }}원, 정산:{{ powerball.calculate }}원 @@ -191,7 +191,7 @@ @@ -191,9 +191,9 @@ {{ casino.gameInfo3 }} - + @@ -213,12 +213,14 @@ - + @@ -243,7 +245,7 @@ diff --git a/src/app/modules/admin/game/casino/models/casino.ts b/src/app/modules/admin/game/casino/models/casino.ts index 2041c72..8550f1c 100644 --- a/src/app/modules/admin/game/casino/models/casino.ts +++ b/src/app/modules/admin/game/casino/models/casino.ts @@ -5,7 +5,7 @@ export interface Casino { availableBetting?: number; bettingMoney?: number; winningMoney?: number; - cancel?: number; + cancelMoney?: number; betWinCancel?: number; mainofficeRolling?: number; branchRolling?: number; @@ -15,21 +15,20 @@ export interface Casino { memberRolling?: number; totalrolling?: number; highRank?: string; - siteId?: string; + gameId?: string; nickname?: string; gameName?: string; gameInfo1?: string; gameInfo2?: string; gameInfo3?: string; - form?: string; + way?: string; beforeWinning?: number; winning?: number; afterWinning?: number; bettingInfo1?: string; bettingInfo2?: number; bettingInfo3?: number; - data?: string; - comp?: string; + compY?: string; mainofficeName?: string; mainofficePercent?: number; mainofficePoint?: number; @@ -49,5 +48,5 @@ export interface Casino { memberPercent?: number; memberPoint?: number; bettingTime?: string; - registrationTime?: string; + registrationDate?: string; } From 5051514261b9801b59aa66e7e2ce5cc8c16f2840 Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Fri, 8 Jul 2022 03:56:35 +0000 Subject: [PATCH 03/10] =?UTF-8?q?=EC=B6=9C=EA=B8=88=EA=B4=80=EB=A6=AC=20?= =?UTF-8?q?=EB=B3=80=EC=88=98=EB=AA=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/modules/admin/bank/withdraw/models/withdraw.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/app/modules/admin/bank/withdraw/models/withdraw.ts b/src/app/modules/admin/bank/withdraw/models/withdraw.ts index 9d1d5ed..46ae2d2 100644 --- a/src/app/modules/admin/bank/withdraw/models/withdraw.ts +++ b/src/app/modules/admin/bank/withdraw/models/withdraw.ts @@ -13,7 +13,4 @@ export interface Withdraw { total?: number; highRank?: string; state?: string; - memberInformation?: string; - bettingInformation?: string; - delete?: string; } From 260b68139a4ad6f295c7606f09df211190bd6f0d Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Fri, 8 Jul 2022 03:58:14 +0000 Subject: [PATCH 04/10] =?UTF-8?q?=ED=8C=8C=EC=9B=8C=EB=B3=BC=20=EB=B3=80?= =?UTF-8?q?=EC=88=98=EB=AA=85=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/mock-api/apps/game/powerball/data.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/mock-api/apps/game/powerball/data.ts b/src/app/mock-api/apps/game/powerball/data.ts index 9f9c609..03203dc 100644 --- a/src/app/mock-api/apps/game/powerball/data.ts +++ b/src/app/mock-api/apps/game/powerball/data.ts @@ -2,6 +2,7 @@ export const powerballs = [ { + id: 'dsa01233', startDate: '2022-01-01 00:00', finishDate: '2022-06-21 23:59', totalBetting: 800000, @@ -9,9 +10,8 @@ export const powerballs = [ proceedingMoney: 0, calculate: 410000, index: '4', - division: '단식', + way: '단식', rank: '회원', - id: 'dsa01233', nickname: '아메리카노', bettingProgress: '1166031회 일반볼 오버', odds: 1.95, From bd630337102dac43592c28de0c5b66cb3be7e5e7 Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Fri, 8 Jul 2022 06:25:40 +0000 Subject: [PATCH 05/10] =?UTF-8?q?=EC=B9=B4=EC=A7=80=EB=85=B8=EB=A8=B8?= =?UTF-8?q?=EB=8B=88=ED=8C=8C=EC=95=85=20=EB=B3=80=EC=88=98=EB=AA=85=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/mock-api/apps/game/casino/data.ts | 2 +- .../mock-api/apps/member/casinomoney/data.ts | 658 ------------------ .../components/list.component.html | 2 +- .../member/casinomoney/models/casinomoney.ts | 20 - 4 files changed, 2 insertions(+), 680 deletions(-) diff --git a/src/app/mock-api/apps/game/casino/data.ts b/src/app/mock-api/apps/game/casino/data.ts index 66e7ec0..462a5ea 100644 --- a/src/app/mock-api/apps/game/casino/data.ts +++ b/src/app/mock-api/apps/game/casino/data.ts @@ -24,7 +24,7 @@ export const casinos = [ gameInfo1: 'Speed Baccarat J', gameInfo2: '62ae9beb396a5971c3921297', gameInfo3: '62ae9bdd396a5971c3921033', - form: '패', + way: '패', beforeWinning: 69831, winning: 0, afterWinning: 69831, diff --git a/src/app/mock-api/apps/member/casinomoney/data.ts b/src/app/mock-api/apps/member/casinomoney/data.ts index 93925bc..12cda70 100644 --- a/src/app/mock-api/apps/member/casinomoney/data.ts +++ b/src/app/mock-api/apps/member/casinomoney/data.ts @@ -53,662 +53,4 @@ export const casinomoneys = [ 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, - }, ]; diff --git a/src/app/modules/admin/member/casinomoney/components/list.component.html b/src/app/modules/admin/member/casinomoney/components/list.component.html index 4b82959..b5533cc 100644 --- a/src/app/modules/admin/member/casinomoney/components/list.component.html +++ b/src/app/modules/admin/member/casinomoney/components/list.component.html @@ -316,7 +316,7 @@ From dded7ac3db771010d8f921641d2c5452168181b0 Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Fri, 8 Jul 2022 06:51:30 +0000 Subject: [PATCH 09/10] =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EC=97=90=EB=9F=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/member/unconnected/components/list.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/modules/admin/member/unconnected/components/list.component.html b/src/app/modules/admin/member/unconnected/components/list.component.html index 9105551..4fe85f9 100644 --- a/src/app/modules/admin/member/unconnected/components/list.component.html +++ b/src/app/modules/admin/member/unconnected/components/list.component.html @@ -132,7 +132,7 @@ > From 834b3207d91641e02573a1bd06819ae7dd33c437 Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Sat, 9 Jul 2022 11:56:11 +0000 Subject: [PATCH 10/10] =?UTF-8?q?=ED=98=84=EC=9E=AC=EC=A0=91=EC=86=8D?= =?UTF-8?q?=EC=9E=90=20=EC=AA=BD=EC=A7=80=EC=A0=84=EC=86=A1=20page=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/app.routing.ts | 7 + .../mock-api/apps/member/current-user/api.ts | 217 ++++++++++ .../mock-api/apps/member/current-user/data.ts | 16 + src/app/mock-api/common/navigation/data.ts | 7 + src/app/mock-api/index.ts | 2 + .../member/current-user/components/index.ts | 3 + .../components/list.component.html | 402 ++++++++++++++++++ .../current-user/components/list.component.ts | 198 +++++++++ .../current-user/current-user.module.ts | 49 +++ .../current-user/current-user.routing.ts | 24 ++ .../models/current-user-pagination.ts | 8 + .../current-user/models/current-user.ts | 13 + .../resolvers/current-user.resolver.ts | 89 ++++ .../services/current-user.service.ts | 158 +++++++ src/assets/i18n/en.json | 3 +- src/assets/i18n/ko.json | 3 +- 16 files changed, 1197 insertions(+), 2 deletions(-) create mode 100644 src/app/mock-api/apps/member/current-user/api.ts create mode 100644 src/app/mock-api/apps/member/current-user/data.ts create mode 100644 src/app/modules/admin/member/current-user/components/index.ts create mode 100644 src/app/modules/admin/member/current-user/components/list.component.html create mode 100644 src/app/modules/admin/member/current-user/components/list.component.ts create mode 100644 src/app/modules/admin/member/current-user/current-user.module.ts create mode 100644 src/app/modules/admin/member/current-user/current-user.routing.ts create mode 100644 src/app/modules/admin/member/current-user/models/current-user-pagination.ts create mode 100644 src/app/modules/admin/member/current-user/models/current-user.ts create mode 100644 src/app/modules/admin/member/current-user/resolvers/current-user.resolver.ts create mode 100644 src/app/modules/admin/member/current-user/services/current-user.service.ts diff --git a/src/app/app.routing.ts b/src/app/app.routing.ts index 4fab437..7c0dd24 100644 --- a/src/app/app.routing.ts +++ b/src/app/app.routing.ts @@ -164,6 +164,13 @@ export const appRoutes: Route[] = [ 'app/modules/admin/member/unconnected/unconnected.module' ).then((m: any) => m.UnconnectedModule), }, + { + path: 'current-user', + loadChildren: () => + import( + 'app/modules/admin/member/current-user/current-user.module' + ).then((m: any) => m.CurrentUserModule), + }, ], }, { diff --git a/src/app/mock-api/apps/member/current-user/api.ts b/src/app/mock-api/apps/member/current-user/api.ts new file mode 100644 index 0000000..5d7a357 --- /dev/null +++ b/src/app/mock-api/apps/member/current-user/api.ts @@ -0,0 +1,217 @@ +import { Injectable } from '@angular/core'; +import { assign, cloneDeep } from 'lodash-es'; +import { FuseMockApiService, FuseMockApiUtils } from '@fuse/lib/mock-api'; +import { currentUsers as currentUsersData } from './data'; + +@Injectable({ + providedIn: 'root', +}) +export class MemberCurrentUserMockApi { + private _currentUsers: any[] = currentUsersData; + + /** + * Constructor + */ + constructor(private _fuseMockApiService: FuseMockApiService) { + // Register Mock API handlers + this.registerHandlers(); + } + + // ----------------------------------------------------------------------------------------------------- + // @ Public methods + // ----------------------------------------------------------------------------------------------------- + + /** + * Register Mock API handlers + */ + registerHandlers(): void { + // ----------------------------------------------------------------------------------------------------- + // @ CurrentUsers - GET + // ----------------------------------------------------------------------------------------------------- + this._fuseMockApiService + .onGet('api/apps/member/current-user/current-users', 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 currentUsers + let currentUsers: any[] | null = cloneDeep(this._currentUsers); + + // Sort the currentUsers + if (sort === 'sku' || sort === 'name' || sort === 'active') { + currentUsers.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 { + currentUsers.sort((a, b) => + order === 'asc' ? a[sort] - b[sort] : b[sort] - a[sort] + ); + } + + // If search exists... + if (search) { + // Filter the currentUsers + currentUsers = currentUsers.filter( + (contact: any) => + contact.name && + contact.name.toLowerCase().includes(search.toLowerCase()) + ); + } + + // Paginate - Start + const currentUsersLength = currentUsers.length; + + // Calculate pagination details + const begin = page * size; + const end = Math.min(size * (page + 1), currentUsersLength); + const lastPage = Math.max(Math.ceil(currentUsersLength / size), 1); + + // Prepare the pagination object + let pagination = {}; + + // If the requested page number is bigger than + // the last possible page number, return null for + // currentUsers but also send the last possible page so + // the app can navigate to there + if (page > lastPage) { + currentUsers = null; + pagination = { + lastPage, + }; + } else { + // Paginate the results by size + currentUsers = currentUsers.slice(begin, end); + + // Prepare the pagination mock-api + pagination = { + length: currentUsersLength, + size: size, + page: page, + lastPage: lastPage, + startIndex: begin, + endIndex: end - 1, + }; + } + + // Return the response + return [ + 200, + { + currentUsers, + pagination, + }, + ]; + }); + + // ----------------------------------------------------------------------------------------------------- + // @ CurrentUsers - GET + // ----------------------------------------------------------------------------------------------------- + this._fuseMockApiService + .onGet('api/apps/member/current-user/current-user') + .reply(({ request }) => { + // Get the id from the params + const id = request.params.get('id'); + + // Clone the currentUsers + const currentUsers = cloneDeep(this._currentUsers); + + // Find the currentUser + const currentUser = currentUsers.find((item: any) => item.id === id); + + // Return the response + return [200, currentUser]; + }); + + // ----------------------------------------------------------------------------------------------------- + // @ CurrentUser - POST + // ----------------------------------------------------------------------------------------------------- + this._fuseMockApiService + .onPost('api/apps/member/current-user/current-user') + .reply(() => { + // Generate a new currentUser + const newCurrentUser = { + 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 currentUser + this._currentUsers.unshift(newCurrentUser); + + // Return the response + return [200, newCurrentUser]; + }); + + // ----------------------------------------------------------------------------------------------------- + // @ CurrentUser - PATCH + // ----------------------------------------------------------------------------------------------------- + this._fuseMockApiService + .onPatch('api/apps/member/current-user/current-user') + .reply(({ request }) => { + // Get the id and currentUser + const id = request.body.id; + const currentUser = cloneDeep(request.body.currentUser); + + // Prepare the updated currentUser + let updatedCurrentUser = null; + + // Find the currentUser and update it + this._currentUsers.forEach((item, index, currentUsers) => { + if (item.id === id) { + // Update the currentUser + currentUsers[index] = assign({}, currentUsers[index], currentUser); + + // Store the updated currentUser + updatedCurrentUser = currentUsers[index]; + } + }); + + // Return the response + return [200, updatedCurrentUser]; + }); + + // ----------------------------------------------------------------------------------------------------- + // @ CurrentUser - DELETE + // ----------------------------------------------------------------------------------------------------- + this._fuseMockApiService + .onDelete('api/apps/member/current-user/current-user') + .reply(({ request }) => { + // Get the id + const id = request.params.get('id'); + + // Find the currentUser and delete it + this._currentUsers.forEach((item, index) => { + if (item.id === id) { + this._currentUsers.splice(index, 1); + } + }); + + // Return the response + return [200, true]; + }); + } +} diff --git a/src/app/mock-api/apps/member/current-user/data.ts b/src/app/mock-api/apps/member/current-user/data.ts new file mode 100644 index 0000000..0286d3b --- /dev/null +++ b/src/app/mock-api/apps/member/current-user/data.ts @@ -0,0 +1,16 @@ +/* eslint-disable */ + +export const currentUsers = [ + { + id: 'aa100', + highRank: '[매장]kgon5', + rank: '회원', + level: 4, + nickname: 'aa100', + currentLocation: '메인', + cash: 0, + comp: 3111, + gameMoney: 0, + siteAddress: 'web4nova114.com', + }, +]; diff --git a/src/app/mock-api/common/navigation/data.ts b/src/app/mock-api/common/navigation/data.ts index 8ed54f4..93e8827 100644 --- a/src/app/mock-api/common/navigation/data.ts +++ b/src/app/mock-api/common/navigation/data.ts @@ -60,6 +60,13 @@ export const defaultNavigation: FuseNavigationItem[] = [ icon: 'heroicons_outline:academic-cap', link: '/member/unconnected', }, + { + id: 'member.current-user', + title: 'Current User', + type: 'basic', + icon: 'heroicons_outline:academic-cap', + link: '/member/current-user', + }, ], }, { diff --git a/src/app/mock-api/index.ts b/src/app/mock-api/index.ts index 4274d36..9cf809e 100644 --- a/src/app/mock-api/index.ts +++ b/src/app/mock-api/index.ts @@ -14,6 +14,7 @@ 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 { MemberUnconnectedMockApi } from './apps/member/unconnected/api'; +import { MemberCurrentUserMockApi } from './apps/member/current-user/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'; @@ -48,6 +49,7 @@ export const mockApiServices = [ MemberUserMockApi, MemberCasinomoneyMockApi, MemberUnconnectedMockApi, + MemberCurrentUserMockApi, MessagesMockApi, NavigationMockApi, NotesMockApi, diff --git a/src/app/modules/admin/member/current-user/components/index.ts b/src/app/modules/admin/member/current-user/components/index.ts new file mode 100644 index 0000000..04759eb --- /dev/null +++ b/src/app/modules/admin/member/current-user/components/index.ts @@ -0,0 +1,3 @@ +import { ListComponent } from './list.component'; + +export const COMPONENTS = [ListComponent]; diff --git a/src/app/modules/admin/member/current-user/components/list.component.html b/src/app/modules/admin/member/current-user/components/list.component.html new file mode 100644 index 0000000..6c6a499 --- /dev/null +++ b/src/app/modules/admin/member/current-user/components/list.component.html @@ -0,0 +1,402 @@ +
+ +
+ +
+ +
+ +
+ 현재접속자 & 쪽지전송 +
+ +
+ +
+ +
+ + +
+ +
+
+ + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + 현재 접속자 & 전체회원 쪽지보내기 + + + + + + + + + + +
+ + 제목 + + +
+
+ + 글쓴이 + + +
+
+ + 내용 + + +
+
+ + + +
+
+
+
+ +
+
+ + +
+ There are no currentUser! +
+
+
+
+
+
+
diff --git a/src/app/modules/admin/member/current-user/components/list.component.ts b/src/app/modules/admin/member/current-user/components/list.component.ts new file mode 100644 index 0000000..584df77 --- /dev/null +++ b/src/app/modules/admin/member/current-user/components/list.component.ts @@ -0,0 +1,198 @@ +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 { User } from '../../user/models/user'; +import { CurrentUser } from '../models/current-user'; +import { CurrentUserPagination } from '../models/current-user-pagination'; +import { CurrentUserService } from '../services/current-user.service'; +import { Router } from '@angular/router'; + +@Component({ + selector: 'currentUser-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; + + currentUsers$!: Observable; + users$!: Observable; + + isLoading = false; + searchInputControl = new FormControl(); + selectedCurrentUser?: CurrentUser; + pagination?: CurrentUserPagination; + + private _unsubscribeAll: Subject = new Subject(); + + /** + * Constructor + */ + constructor( + private _changeDetectorRef: ChangeDetectorRef, + private _fuseConfirmationService: FuseConfirmationService, + private _formBuilder: FormBuilder, + private _currentUserService: CurrentUserService, + private router: Router + ) {} + + // ----------------------------------------------------------------------------------------------------- + // @ Lifecycle hooks + // ----------------------------------------------------------------------------------------------------- + + /** + * On init + */ + ngOnInit(): void { + // Get the pagination + this._currentUserService.pagination$ + .pipe(takeUntil(this._unsubscribeAll)) + .subscribe((pagination: CurrentUserPagination | undefined) => { + // Update the pagination + this.pagination = pagination; + + // Mark for check + this._changeDetectorRef.markForCheck(); + }); + + // Get the products + this.currentUsers$ = this._currentUserService.currentUsers$; + } + + /** + * 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 currentUser 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._currentUserService.getCurrentUsers( + 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 + // ----------------------------------------------------------------------------------------------------- + + viewUserDetail(id: string): void { + let url: string = 'member/user/' + 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; + } +} diff --git a/src/app/modules/admin/member/current-user/current-user.module.ts b/src/app/modules/admin/member/current-user/current-user.module.ts new file mode 100644 index 0000000..72fdeb9 --- /dev/null +++ b/src/app/modules/admin/member/current-user/current-user.module.ts @@ -0,0 +1,49 @@ +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 { MatCardModule } from '@angular/material/card'; + +import { TranslocoModule } from '@ngneat/transloco'; + +import { SharedModule } from 'app/shared/shared.module'; + +import { COMPONENTS } from './components'; + +import { currentUserRoutes } from './current-user.routing'; +@NgModule({ + declarations: [COMPONENTS], + imports: [ + TranslocoModule, + SharedModule, + RouterModule.forChild(currentUserRoutes), + + MatButtonModule, + MatFormFieldModule, + MatIconModule, + MatInputModule, + MatPaginatorModule, + MatProgressBarModule, + MatRippleModule, + MatSortModule, + MatSelectModule, + MatTooltipModule, + MatGridListModule, + MatSlideToggleModule, + MatRadioModule, + MatCardModule, + ], +}) +export class CurrentUserModule {} diff --git a/src/app/modules/admin/member/current-user/current-user.routing.ts b/src/app/modules/admin/member/current-user/current-user.routing.ts new file mode 100644 index 0000000..8cb4efe --- /dev/null +++ b/src/app/modules/admin/member/current-user/current-user.routing.ts @@ -0,0 +1,24 @@ +import { Route } from '@angular/router'; + +import { ListComponent } from './components/list.component'; +import { ViewComponent } from '../user/components/view.component'; + +import { CurrentUsersResolver } from './resolvers/current-user.resolver'; +import { UserResolver } from '../user/resolvers/user.resolver'; + +export const currentUserRoutes: Route[] = [ + { + path: '', + component: ListComponent, + resolve: { + curretnUsers: CurrentUsersResolver, + }, + }, + { + path: ':id', + component: ViewComponent, + resolve: { + users: UserResolver, + }, + }, +]; diff --git a/src/app/modules/admin/member/current-user/models/current-user-pagination.ts b/src/app/modules/admin/member/current-user/models/current-user-pagination.ts new file mode 100644 index 0000000..2a2dadf --- /dev/null +++ b/src/app/modules/admin/member/current-user/models/current-user-pagination.ts @@ -0,0 +1,8 @@ +export interface CurrentUserPagination { + length: number; + size: number; + page: number; + lastPage: number; + startIndex: number; + endIndex: number; +} diff --git a/src/app/modules/admin/member/current-user/models/current-user.ts b/src/app/modules/admin/member/current-user/models/current-user.ts new file mode 100644 index 0000000..75d62cb --- /dev/null +++ b/src/app/modules/admin/member/current-user/models/current-user.ts @@ -0,0 +1,13 @@ +export interface CurrentUser { + id?: string; + index?: number; + nickname?: string; + highRank?: string; + rank?: string; + level?: string; + currentLocation?: string; + cash?: number; + gameMoney?: number; + comp?: number; + siteAddress?: string; +} diff --git a/src/app/modules/admin/member/current-user/resolvers/current-user.resolver.ts b/src/app/modules/admin/member/current-user/resolvers/current-user.resolver.ts new file mode 100644 index 0000000..ce539d8 --- /dev/null +++ b/src/app/modules/admin/member/current-user/resolvers/current-user.resolver.ts @@ -0,0 +1,89 @@ +import { Injectable } from '@angular/core'; +import { + ActivatedRouteSnapshot, + Resolve, + Router, + RouterStateSnapshot, +} from '@angular/router'; +import { catchError, Observable, throwError } from 'rxjs'; + +import { CurrentUser } from '../models/current-user'; +import { CurrentUserPagination } from '../models/current-user-pagination'; +import { CurrentUserService } from '../services/current-user.service'; + +@Injectable({ + providedIn: 'root', +}) +export class CurrentUserResolver implements Resolve { + /** + * Constructor + */ + constructor( + private _currentUserService: CurrentUserService, + private _router: Router + ) {} + + // ----------------------------------------------------------------------------------------------------- + // @ Public methods + // ----------------------------------------------------------------------------------------------------- + + /** + * Resolver + * + * @param route + * @param state + */ + resolve( + route: ActivatedRouteSnapshot, + state: RouterStateSnapshot + ): Observable { + return this._currentUserService + .getCurrentUserById(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 CurrentUsersResolver implements Resolve { + /** + * Constructor + */ + constructor(private _currentUserService: CurrentUserService) {} + + // ----------------------------------------------------------------------------------------------------- + // @ Public methods + // ----------------------------------------------------------------------------------------------------- + + /** + * Resolver + * + * @param route + * @param state + */ + resolve( + route: ActivatedRouteSnapshot, + state: RouterStateSnapshot + ): Observable<{ + pagination: CurrentUserPagination; + currentUsers: CurrentUser[]; + }> { + return this._currentUserService.getCurrentUsers(); + } +} diff --git a/src/app/modules/admin/member/current-user/services/current-user.service.ts b/src/app/modules/admin/member/current-user/services/current-user.service.ts new file mode 100644 index 0000000..0aabb7b --- /dev/null +++ b/src/app/modules/admin/member/current-user/services/current-user.service.ts @@ -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 { CurrentUser } from '../models/current-user'; +import { CurrentUserPagination } from '../models/current-user-pagination'; + +@Injectable({ + providedIn: 'root', +}) +export class CurrentUserService { + // Private + private __pagination = new BehaviorSubject( + undefined + ); + private __currentUser = new BehaviorSubject( + undefined + ); + private __currentUsers = new BehaviorSubject( + undefined + ); + + /** + * Constructor + */ + constructor(private _httpClient: HttpClient) {} + + // ----------------------------------------------------------------------------------------------------- + // @ Accessors + // ----------------------------------------------------------------------------------------------------- + + /** + * Getter for pagination + */ + get pagination$(): Observable { + return this.__pagination.asObservable(); + } + + /** + * Getter for currentUser + */ + get currentUser$(): Observable { + return this.__currentUser.asObservable(); + } + + /** + * Getter for currentUsers + */ + get currentUsers$(): Observable { + return this.__currentUsers.asObservable(); + } + + // ----------------------------------------------------------------------------------------------------- + // @ Public methods + // ----------------------------------------------------------------------------------------------------- + + /** + * Get currentUsers + * + * + * @param page + * @param size + * @param sort + * @param order + * @param search + */ + getCurrentUsers( + page: number = 0, + size: number = 10, + sort: string = 'name', + order: 'asc' | 'desc' | '' = 'asc', + search: string = '' + ): Observable<{ + pagination: CurrentUserPagination; + currentUsers: CurrentUser[]; + }> { + return this._httpClient + .get<{ pagination: CurrentUserPagination; currentUsers: CurrentUser[] }>( + 'api/apps/member/current-user/current-users', + { + params: { + page: '' + page, + size: '' + size, + sort, + order, + search, + }, + } + ) + .pipe( + tap((response) => { + this.__pagination.next(response.pagination); + this.__currentUsers.next(response.currentUsers); + }) + ); + } + + /** + * Get product by id + */ + getCurrentUserById(id: string | null): Observable { + return this.__currentUsers.pipe( + take(1), + map((currentUsers) => { + // Find the product + const currentUser = + currentUsers?.find((item) => item.id === id) || undefined; + + // Update the product + this.__currentUser.next(currentUser); + + // Return the product + return currentUser; + }), + switchMap((product) => { + if (!product) { + return throwError('Could not found product with id of ' + id + '!'); + } + + return of(product); + }) + ); + } + + /** + * Create product + */ + createCurrentUser(): Observable { + return this.currentUsers$.pipe( + take(1), + switchMap((currentUsers) => + this._httpClient + .post('api/apps/member/currentUser/product', {}) + .pipe( + map((newCurrentUser) => { + // Update the currentUsers with the new product + if (!!currentUsers) { + this.__currentUsers.next([newCurrentUser, ...currentUsers]); + } + + // Return the new product + return newCurrentUser; + }) + ) + ) + ); + } +} diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 068cfc3..7adc722 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -13,5 +13,6 @@ "Powerball": "Powerball", "Casino": "Casino", "Evolution": "Evolution", - "Slot": "Slot" + "Slot": "Slot", + "Current User": "Current User" } diff --git a/src/assets/i18n/ko.json b/src/assets/i18n/ko.json index 0c5c3eb..42edda1 100644 --- a/src/assets/i18n/ko.json +++ b/src/assets/i18n/ko.json @@ -13,5 +13,6 @@ "Powerball": "파워볼", "Casino": "카지노배팅리스트", "Evolution": "에볼루션배팅리스트", - "Slot": "슬롯배팅리스트" + "Slot": "슬롯배팅리스트", + "Current User": "현재접속자 & 쪽지전송" }