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
aaff4469
Commit
aaff4469
authored
Oct 10, 2025
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made anylytics dynamic
parent
7f758c97
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
52 additions
and
6 deletions
+52
-6
AdminAnalytics.tsx
src/app/(dashboard)/(admin)/AdminAnalytics.tsx
+0
-0
index.tsx
src/components/organism/Header/AdminHeader/index.tsx
+1
-2
index.tsx
...s/dashboard/adminDashboard/players/playerDetail/index.tsx
+0
-1
BannerSlider.tsx
.../pages/dashboard/adminDashboard/settings/BannerSlider.tsx
+0
-1
TransactionTable.tsx
...dashboard/adminDashboard/transaction/TransactionTable.tsx
+0
-1
index.tsx
src/components/pages/menus/index.tsx
+0
-1
store.ts
src/hooks/store.ts
+3
-0
dashboardApi.ts
src/services/dashboardApi.ts
+28
-0
dashboard.ts
src/types/dashboard.ts
+20
-0
No files found.
src/app/(dashboard)/(admin)/AdminAnalytics.tsx
View file @
aaff4469
This diff is collapsed.
Click to expand it.
src/components/organism/Header/AdminHeader/index.tsx
View file @
aaff4469
...
@@ -19,13 +19,12 @@ export default function AdminHeader() {
...
@@ -19,13 +19,12 @@ export default function AdminHeader() {
const
[
page
,
setPage
]
=
React
.
useState
(
1
);
const
[
page
,
setPage
]
=
React
.
useState
(
1
);
const
[
pageSize
,
setPageSize
]
=
React
.
useState
(
10
);
const
[
pageSize
,
setPageSize
]
=
React
.
useState
(
10
);
const
{
data
}
=
useGetAllNotificationQuery
({
page
:
page
,
per_page
:
pageSize
});
const
{
data
}
=
useGetAllNotificationQuery
({
page
:
page
,
per_page
:
pageSize
});
console
.
log
(
data
);
return
(
return
(
<
Box
className=
'flex items-center gap-4 justify-between w-full'
>
<
Box
className=
'flex items-center gap-4 justify-between w-full'
>
<
AdminSearchBar
/>
<
AdminSearchBar
/>
<
div
className=
"right flex items-center gap-4"
>
<
div
className=
"right flex items-center gap-4"
>
<
CreatNewRecord
/>
<
CreatNewRecord
/>
<
NotificationPage
notifications=
{
data
?.
data
?.
data
||
[]
}
pagination=
{
data
?.
data
?.
pagination
}
/>
<
NotificationPage
notifications=
{
data
?.
data
?.
data
||
[]
}
pagination=
{
data
?.
data
?.
pagination
}
/>
<
Profile
/>
<
Profile
/>
</
div
>
</
div
>
</
Box
>
</
Box
>
...
...
src/components/pages/dashboard/adminDashboard/players/playerDetail/index.tsx
View file @
aaff4469
...
@@ -51,7 +51,6 @@ export default function PlayerDetailPage({ id }: { id: number }) {
...
@@ -51,7 +51,6 @@ export default function PlayerDetailPage({ id }: { id: number }) {
const
{
date
}
=
formatDateTime
(
data
?.
data
?.
registered_date
as
string
);
const
{
date
}
=
formatDateTime
(
data
?.
data
?.
registered_date
as
string
);
console
.
log
(
"user balance"
,
userBalance
);
return
(
return
(
<>
<>
<
section
className=
"player__detail__intro mb-12 lg:mb-16"
>
<
section
className=
"player__detail__intro mb-12 lg:mb-16"
>
...
...
src/components/pages/dashboard/adminDashboard/settings/BannerSlider.tsx
View file @
aaff4469
...
@@ -35,7 +35,6 @@ export default function BannerSlider() {
...
@@ -35,7 +35,6 @@ export default function BannerSlider() {
const
{
data
,
isLoading
}
=
useGetAllBannerQuery
();
const
{
data
,
isLoading
}
=
useGetAllBannerQuery
();
const
[
updateBanner
,
{
isLoading
:
updating
}]
=
useUpdateBannerMutation
();
const
[
updateBanner
,
{
isLoading
:
updating
}]
=
useUpdateBannerMutation
();
console
.
log
(
"banner data"
,
data
);
const
formik
=
useFormik
({
const
formik
=
useFormik
({
initialValues
:
{
initialValues
:
{
banners
:
data
?.
data
?.
length
banners
:
data
?.
data
?.
length
...
...
src/components/pages/dashboard/adminDashboard/transaction/TransactionTable.tsx
View file @
aaff4469
...
@@ -34,7 +34,6 @@ export default function TransactionTable({ user_id, game_id, search }: { user_id
...
@@ -34,7 +34,6 @@ export default function TransactionTable({ user_id, game_id, search }: { user_id
const
{
data
,
isLoading
:
loadingTransaction
}
=
useGetAllTransactionQuery
(
queryArgs
);
const
{
data
,
isLoading
:
loadingTransaction
}
=
useGetAllTransactionQuery
(
queryArgs
);
console
.
log
(
"all transaction"
,
data
);
const
tableData
=
useMemo
(()
=>
data
?.
data
?.
data
||
[],
[
data
]);
const
tableData
=
useMemo
(()
=>
data
?.
data
?.
data
||
[],
[
data
]);
const
columns
=
useMemo
<
ColumnDef
<
SingleDepositProps
>
[]
>
(()
=>
[
const
columns
=
useMemo
<
ColumnDef
<
SingleDepositProps
>
[]
>
(()
=>
[
...
...
src/components/pages/menus/index.tsx
View file @
aaff4469
...
@@ -17,7 +17,6 @@ export default function MenuPage() {
...
@@ -17,7 +17,6 @@ export default function MenuPage() {
const
dispatch
=
useAppDispatch
();
const
dispatch
=
useAppDispatch
();
const
[
selectedMenus
,
setSelectedMenus
]
=
React
.
useState
<
any
[]
>
([]);
const
[
selectedMenus
,
setSelectedMenus
]
=
React
.
useState
<
any
[]
>
([]);
console
.
log
(
"menus"
,
{
menus
,
selectedMenus
});
React
.
useEffect
(()
=>
{
React
.
useEffect
(()
=>
{
...
...
src/hooks/store.ts
View file @
aaff4469
...
@@ -12,6 +12,7 @@ import { settingApi } from "@/services/settingApi";
...
@@ -12,6 +12,7 @@ import { settingApi } from "@/services/settingApi";
import
{
pageApi
}
from
"@/services/pageApi"
;
import
{
pageApi
}
from
"@/services/pageApi"
;
import
{
notificationApi
}
from
"@/services/notificationApi"
;
import
{
notificationApi
}
from
"@/services/notificationApi"
;
import
{
menuApi
,
userMenuApi
}
from
"@/services/menuApi"
;
import
{
menuApi
,
userMenuApi
}
from
"@/services/menuApi"
;
import
{
dashboardApi
}
from
"@/services/dashboardApi"
;
export
const
store
=
configureStore
({
export
const
store
=
configureStore
({
reducer
:
{
reducer
:
{
...
@@ -29,6 +30,7 @@ export const store = configureStore({
...
@@ -29,6 +30,7 @@ export const store = configureStore({
[
notificationApi
.
reducerPath
]:
notificationApi
.
reducer
,
[
notificationApi
.
reducerPath
]:
notificationApi
.
reducer
,
[
menuApi
.
reducerPath
]:
menuApi
.
reducer
,
[
menuApi
.
reducerPath
]:
menuApi
.
reducer
,
[
userMenuApi
.
reducerPath
]:
userMenuApi
.
reducer
,
[
userMenuApi
.
reducerPath
]:
userMenuApi
.
reducer
,
[
dashboardApi
.
reducerPath
]:
dashboardApi
.
reducer
,
},
},
middleware
:
(
getDefaultMiddleware
)
=>
middleware
:
(
getDefaultMiddleware
)
=>
getDefaultMiddleware
()
getDefaultMiddleware
()
...
@@ -43,6 +45,7 @@ export const store = configureStore({
...
@@ -43,6 +45,7 @@ export const store = configureStore({
.
concat
(
notificationApi
.
middleware
)
.
concat
(
notificationApi
.
middleware
)
.
concat
(
menuApi
.
middleware
)
.
concat
(
menuApi
.
middleware
)
.
concat
(
userMenuApi
.
middleware
)
.
concat
(
userMenuApi
.
middleware
)
.
concat
(
dashboardApi
.
middleware
)
})
})
export
type
RootState
=
ReturnType
<
typeof
store
.
getState
>
;
export
type
RootState
=
ReturnType
<
typeof
store
.
getState
>
;
...
...
src/services/dashboardApi.ts
0 → 100644
View file @
aaff4469
import
{
createApi
}
from
"@reduxjs/toolkit/query/react"
;
import
{
baseQuery
}
from
"./baseQuery"
;
import
{
AnalyticsResponse
}
from
"@/types/dashboard"
;
export
const
dashboardApi
=
createApi
({
reducerPath
:
"dashboardApi"
,
baseQuery
:
baseQuery
,
tagTypes
:
[
"Analytics"
,
"Transactions"
],
endpoints
:
(
builder
)
=>
({
getAnalytics
:
builder
.
query
<
AnalyticsResponse
,
{
type
:
string
}
>
({
query
:
({
type
})
=>
({
url
:
`/api/admin/dashboard/overview?type=
${
type
}
`
,
method
:
"GET"
,
}),
providesTags
:
[
"Analytics"
],
}),
getAdminTransactions
:
builder
.
query
<
any
,
void
>
({
query
:
()
=>
({
url
:
`/api/admin/dashboard/deposits`
,
method
:
"GET"
,
}),
providesTags
:
[
"Transactions"
],
})
})
})
export
const
{
useGetAnalyticsQuery
,
useGetAdminTransactionsQuery
}
=
dashboardApi
;
\ No newline at end of file
src/types/dashboard.ts
0 → 100644
View file @
aaff4469
export
type
AnalyticsProps
=
{
name
:
string
,
start_date
:
string
,
end_date
:
string
,
current
:
number
,
previous
:
number
,
percent
:
number
,
profit
:
boolean
,
message
:
string
,
breakdown
:
number
[]
}
export
interface
AnalyticsResponse
{
data
:
{
total_deposits
:
AnalyticsProps
,
total_transactions
:
AnalyticsProps
,
total_users
:
AnalyticsProps
,
total_withdraw
:
AnalyticsProps
,
}
}
\ No newline at end of file
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