initial commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// Component Imports
|
||||
import AcademyDashboard from '../../apps/academy/dashboard/page'
|
||||
|
||||
const DashboardAcademy = async () => {
|
||||
return <AcademyDashboard />
|
||||
}
|
||||
|
||||
export default DashboardAcademy
|
||||
@@ -0,0 +1,77 @@
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
|
||||
// Components Imports
|
||||
import WebsiteAnalyticsSlider from '@views/dashboards/analytics/WebsiteAnalyticsSlider'
|
||||
import LineAreaDailySalesChart from '@views/dashboards/analytics/LineAreaDailySalesChart'
|
||||
import SalesOverview from '@views/dashboards/analytics/SalesOverview'
|
||||
import EarningReports from '@views/dashboards/analytics/EarningReports'
|
||||
import SupportTracker from '@views/dashboards/analytics/SupportTracker'
|
||||
import SalesByCountries from '@views/dashboards/analytics/SalesByCountries'
|
||||
import TotalEarning from '@views/dashboards/analytics/TotalEarning'
|
||||
import MonthlyCampaignState from '@views/dashboards/analytics/MonthlyCampaignState'
|
||||
import SourceVisits from '@views/dashboards/analytics/SourceVisits'
|
||||
import ProjectsTable from '@views/dashboards/analytics/ProjectsTable'
|
||||
|
||||
// Data Imports
|
||||
import { getProfileData } from '@/app/server/actions'
|
||||
|
||||
/**
|
||||
* ! If you need data using an API call, uncomment the below API code, update the `process.env.API_URL` variable in the
|
||||
* ! `.env` file found at root of your project and also update the API endpoints like `/pages/profile` in below example.
|
||||
* ! Also, remove the above server action import and the action itself from the `src/app/server/actions.ts` file to clean up unused code
|
||||
* ! because we've used the server action for getting our static data.
|
||||
*/
|
||||
|
||||
/* const getProfileData = async () => {
|
||||
// Vars
|
||||
const res = await fetch(`${process.env.API_URL}/pages/profile`)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Failed to fetch profileData')
|
||||
}
|
||||
|
||||
return res.json()
|
||||
} */
|
||||
|
||||
const DashboardAnalytics = async () => {
|
||||
// Vars
|
||||
const data = await getProfileData()
|
||||
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12, lg: 6 }}>
|
||||
<WebsiteAnalyticsSlider />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, lg: 3 }}>
|
||||
<LineAreaDailySalesChart />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, lg: 3 }}>
|
||||
<SalesOverview />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<EarningReports />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<SupportTracker />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<SalesByCountries />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<TotalEarning />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<MonthlyCampaignState />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<SourceVisits />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, lg: 8 }}>
|
||||
<ProjectsTable projectTable={data?.users.profile.projectTable} />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default DashboardAnalytics
|
||||
@@ -0,0 +1,88 @@
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
|
||||
// Component Imports
|
||||
import DistributedBarChartOrder from '@views/dashboards/crm/DistributedBarChartOrder'
|
||||
import LineAreaYearlySalesChart from '@views/dashboards/crm/LineAreaYearlySalesChart'
|
||||
import CardStatVertical from '@/components/card-statistics/Vertical'
|
||||
import BarChartRevenueGrowth from '@views/dashboards/crm/BarChartRevenueGrowth'
|
||||
import EarningReportsWithTabs from '@views/dashboards/crm/EarningReportsWithTabs'
|
||||
import RadarSalesChart from '@views/dashboards/crm/RadarSalesChart'
|
||||
import SalesByCountries from '@views/dashboards/crm/SalesByCountries'
|
||||
import ProjectStatus from '@views/dashboards/crm/ProjectStatus'
|
||||
import ActiveProjects from '@views/dashboards/crm/ActiveProjects'
|
||||
import LastTransaction from '@views/dashboards/crm/LastTransaction'
|
||||
import ActivityTimeline from '@views/dashboards/crm/ActivityTimeline'
|
||||
|
||||
// Server Action Imports
|
||||
import { getServerMode } from '@core/utils/serverHelpers'
|
||||
|
||||
const DashboardCRM = async () => {
|
||||
// Vars
|
||||
const serverMode = await getServerMode()
|
||||
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4, lg: 2 }}>
|
||||
<DistributedBarChartOrder />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4, lg: 2 }}>
|
||||
<LineAreaYearlySalesChart />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4, lg: 2 }}>
|
||||
<CardStatVertical
|
||||
title='Total Profit'
|
||||
subtitle='Last Week'
|
||||
stats='1.28k'
|
||||
avatarColor='error'
|
||||
avatarIcon='tabler-credit-card'
|
||||
avatarSkin='light'
|
||||
avatarSize={44}
|
||||
chipText='-12.2%'
|
||||
chipColor='error'
|
||||
chipVariant='tonal'
|
||||
/>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4, lg: 2 }}>
|
||||
<CardStatVertical
|
||||
title='Total Sales'
|
||||
subtitle='Last Week'
|
||||
stats='24.67k'
|
||||
avatarColor='success'
|
||||
avatarIcon='tabler-currency-dollar'
|
||||
avatarSkin='light'
|
||||
avatarSize={44}
|
||||
chipText='+24.67%'
|
||||
chipColor='success'
|
||||
chipVariant='tonal'
|
||||
/>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 8, lg: 4 }}>
|
||||
<BarChartRevenueGrowth />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, lg: 8 }}>
|
||||
<EarningReportsWithTabs />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<RadarSalesChart />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<SalesByCountries />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<ProjectStatus />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<ActiveProjects />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<LastTransaction serverMode={serverMode} />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<ActivityTimeline />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default DashboardCRM
|
||||
@@ -0,0 +1,7 @@
|
||||
import EcommerceDashboard from '../../apps/ecommerce/dashboard/page'
|
||||
|
||||
const DashboardECommerce = () => {
|
||||
return <EcommerceDashboard />
|
||||
}
|
||||
|
||||
export default DashboardECommerce
|
||||
@@ -0,0 +1,7 @@
|
||||
import LogisticsDashboard from '../../apps/logistics/dashboard/page'
|
||||
|
||||
const DashboardLogistics = () => {
|
||||
return <LogisticsDashboard />
|
||||
}
|
||||
|
||||
export default DashboardLogistics
|
||||
Reference in New Issue
Block a user