Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sweepstake
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arjun Jhukal
sweepstake
Commits
413162cc
Commit
413162cc
authored
Oct 06, 2025
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated the transaction table for dashboard as well
parent
b8138d45
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
13 deletions
+27
-13
DashboardProvider.tsx
...pp/(dashboard)/(user)/(outsideAuth)/DashboardProvider.tsx
+4
-1
index.tsx
...pages/dashboard/adminDashboard/games/GameDetail/index.tsx
+6
-2
index.tsx
...s/dashboard/adminDashboard/players/playerDetail/index.tsx
+7
-3
TransactionTable.tsx
...dashboard/adminDashboard/transaction/TransactionTable.tsx
+9
-6
index.tsx
...ts/pages/dashboard/userDashboard/depositHistory/index.tsx
+1
-1
No files found.
src/app/(dashboard)/(user)/(outsideAuth)/DashboardProvider.tsx
View file @
413162cc
"use client"
import
TransactionTable
from
'@/components/pages/dashboard/adminDashboard/transaction/TransactionTable'
;
import
{
useAppSelector
}
from
'@/hooks/hook'
import
React
from
'react'
export
default
function
DashboardProvider
({
children
}:
{
children
:
React
.
ReactNode
})
{
const
[
search
,
setSearch
]
=
React
.
useState
(
""
);
const
user
=
useAppSelector
(
state
=>
state
.
auth
.
user
);
if
(
user
?.
role
&&
user
.
role
.
toUpperCase
()
===
"ADMIN"
)
{
return
<>
<
h1
>
Admin Dashboard
</
h1
>
<
h1
className=
"text-[24px] leading-[120%] mb-6"
>
Dashboard
</
h1
>
<
TransactionTable
search=
{
search
}
/>
</>
}
return
(
...
...
src/components/pages/dashboard/adminDashboard/games/GameDetail/index.tsx
View file @
413162cc
...
...
@@ -10,11 +10,12 @@ import { useGetGameByIdQuery } from '@/services/gameApi';
import
{
PATH
}
from
'@/routes/PATH'
;
import
{
renderHTML
}
from
'@/utils/RenderHTML'
;
import
TransactionTable
from
'../../transaction/TransactionTable'
;
import
TableHeader
from
'@/components/molecules/TableHeader'
;
export
default
function
GameDetailPage
()
{
const
params
=
useParams
();
const
id
=
params
.
slug
;
const
[
search
,
setSearch
]
=
React
.
useState
(
""
);
const
{
data
,
isLoading
}
=
useGetGameByIdQuery
({
id
:
Number
(
id
)
})
const
screenshots
=
data
?.
data
?.
screenshots
||
[];
...
...
@@ -118,7 +119,10 @@ export default function GameDetailPage() {
All Transactions
</
h2
>
</
div
>
{
data
?.
data
?.
id
?
<
TransactionTable
game_id=
{
data
?.
data
?.
id
}
/>
:
""
}
<
div
className=
"border-gray border-solid border-[1px] rounded-[8px] lg:rounded-[16px]"
>
<
TableHeader
search=
{
search
}
setSearch=
{
setSearch
}
onDownloadCSV=
{
()
=>
{
}
}
/>
{
data
?.
data
?.
id
?
<
TransactionTable
game_id=
{
data
?.
data
?.
id
}
search=
{
search
}
/>
:
""
}
</
div
>
</>
)
...
...
src/components/pages/dashboard/adminDashboard/players/playerDetail/index.tsx
View file @
413162cc
...
...
@@ -10,6 +10,7 @@ import TransactionTable from '../../transaction/TransactionTable'
import
{
useAppSelector
}
from
'@/hooks/hook'
import
{
formatDateTime
}
from
'@/utils/formatDateTime'
import
{
useGetPlayerBalanceByIdQuery
,
useGetPlayerByIdQuery
}
from
'@/services/playerApi'
import
TableHeader
from
'@/components/molecules/TableHeader'
const
games
=
[
{
...
...
@@ -39,7 +40,7 @@ const games = [
];
export
default
function
PlayerDetailPage
({
id
}:
{
id
:
number
})
{
const
[
search
,
setSearch
]
=
React
.
useState
(
""
);
const
{
data
,
isLoading
}
=
useGetPlayerByIdQuery
({
id
},
{
skip
:
!
id
})
...
...
@@ -171,8 +172,11 @@ export default function PlayerDetailPage({ id }: { id: number }) {
All Transactions
</
h2
>
</
div
>
{
data
?.
data
?.
id
?
<
TransactionTable
user_id=
{
data
?.
data
?.
id
}
/>
:
""
}
{
/* <GameTransactionTable /> */
}
<
div
className=
"border-gray border-solid border-[1px] rounded-[8px] lg:rounded-[16px]"
>
<
TableHeader
search=
{
search
}
setSearch=
{
setSearch
}
onDownloadCSV=
{
()
=>
{
}
}
/>
{
data
?.
data
?.
id
?
<
TransactionTable
search=
{
search
}
user_id=
{
data
?.
data
?.
id
}
/>
:
""
}
{
/* <GameTransactionTable /> */
}
</
div
>
</>
)
}
src/components/pages/dashboard/adminDashboard/transaction/TransactionTable.tsx
View file @
413162cc
...
...
@@ -15,8 +15,8 @@ import {
}
from
'@tanstack/react-table'
;
import
React
,
{
useMemo
,
useState
}
from
'react'
;
export
default
function
TransactionTable
({
user_id
,
game_id
}:
{
user_id
?:
string
;
game_id
?:
number
})
{
const
[
search
,
setSearch
]
=
useState
(
""
);
export
default
function
TransactionTable
({
user_id
,
game_id
,
search
}:
{
user_id
?:
string
;
game_id
?:
number
,
search
:
string
})
{
const
[
sorting
,
setSorting
]
=
useState
<
{
id
:
string
;
desc
:
boolean
}[]
>
([]);
const
[
page
,
setPage
]
=
useState
(
1
);
const
[
pageSize
,
setPageSize
]
=
useState
(
10
);
...
...
@@ -83,7 +83,7 @@ export default function TransactionTable({ user_id, game_id }: { user_id?: strin
return
(
<
span
className=
{
`px-2 py-1 max-w-[
5
0px] block lg:text-[10px] text-white status rounded-[8px] text-center ${status}`
}
className=
{
`px-2 py-1 max-w-[
6
0px] block lg:text-[10px] text-white status rounded-[8px] text-center ${status}`
}
>
{
display
}
</
span
>
...
...
@@ -124,8 +124,11 @@ export default function TransactionTable({ user_id, game_id }: { user_id?: strin
});
return
(
<
div
className=
"border-gray border-solid border-[1px] rounded-[8px] lg:rounded-[16px]"
>
<
TableHeader
search=
{
search
}
setSearch=
{
setSearch
}
onDownloadCSV=
{
()
=>
{
}
}
/>
// <div className="border-gray border-solid border-[1px] rounded-[8px] lg:rounded-[16px]">
// <TableHeader search={search} setSearch={setSearch} onDownloadCSV={() => { }} />
// </div>
<>
<
CustomTable
key=
{
`${page}-${pageSize}-${search}-${game_id}-${user_id}`
}
table=
{
table
}
loading=
{
loadingTransaction
}
/>
...
...
@@ -154,6 +157,6 @@ export default function TransactionTable({ user_id, game_id }: { user_id?: strin
sx=
{
{
gap
:
"8px"
}
}
/>
</
div
>
:
""
}
</
div
>
</>
);
}
src/components/pages/dashboard/userDashboard/depositHistory/index.tsx
View file @
413162cc
...
...
@@ -44,7 +44,7 @@ export default function DepositHistoryPage() {
const
display
=
status
.
charAt
(
0
).
toUpperCase
()
+
status
.
slice
(
1
);
return
(
<
span
className=
{
`px-2 py-1 max-w-[
5
0px] block lg:text-[10px] text-white status rounded-[8px] text-center ${status}`
}
>
<
span
className=
{
`px-2 py-1 max-w-[
6
0px] block lg:text-[10px] text-white status rounded-[8px] text-center ${status}`
}
>
{
display
}
</
span
>
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment