fix: clean folder
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
|
||||
// Component Imports
|
||||
import Details from '@views/apps/academy/course-details/Details'
|
||||
import Sidebar from '@views/apps/academy/course-details/Sidebar'
|
||||
|
||||
// Data Imports
|
||||
import { getAcademyData } 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 `/apps/academy` 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 getAcademyData = async () => {
|
||||
// Vars
|
||||
const res = await fetch(`${process.env.API_URL}/apps/academy`)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Failed to fetch academy data')
|
||||
}
|
||||
|
||||
return res.json()
|
||||
} */
|
||||
|
||||
const CourseDetailsPage = async () => {
|
||||
// Vars
|
||||
const data = await getAcademyData()
|
||||
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12, md: 8 }}>
|
||||
<Details data={data?.courseDetails} />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 4 }}>
|
||||
<div className='sticky top-[94px]'>
|
||||
<Sidebar content={data?.courseDetails.content} />
|
||||
</div>
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default CourseDetailsPage
|
||||
@@ -1,65 +0,0 @@
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
|
||||
// Component Imports
|
||||
import WelcomeCard from '@views/apps/academy/dashboard/WelcomeCard'
|
||||
import InterestedTopics from '@views/apps/academy/dashboard/InterestedTopics'
|
||||
import PopularInstructors from '@views/apps/academy/dashboard/PopularInstructors'
|
||||
import TopCourses from '@views/apps/academy/dashboard/TopCourses'
|
||||
import UpcomingWebinar from '@views/apps/academy/dashboard/UpcomingWebinar'
|
||||
import AssignmentProgress from '@views/apps/academy/dashboard/AssignmentProgress'
|
||||
import CourseTable from '@views/apps/academy/dashboard/CourseTable'
|
||||
|
||||
// Data Imports
|
||||
import { getAcademyData } 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 `/apps/academy` 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 getAcademyData = async () => {
|
||||
// Vars
|
||||
const res = await fetch(`${process.env.API_URL}/apps/academy`)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Failed to fetch academy data')
|
||||
}
|
||||
|
||||
return res.json()
|
||||
} */
|
||||
|
||||
const AcademyDashboard = async () => {
|
||||
// Vars
|
||||
const data = await getAcademyData()
|
||||
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<WelcomeCard />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 8 }}>
|
||||
<InterestedTopics />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<PopularInstructors />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<TopCourses />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<UpcomingWebinar />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<AssignmentProgress />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<CourseTable courseData={data?.courses} />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default AcademyDashboard
|
||||
@@ -1,36 +0,0 @@
|
||||
// Component Imports
|
||||
import AcademyMyCourse from '@/views/apps/academy/my-courses'
|
||||
|
||||
// Server Action Imports
|
||||
import { getServerMode } from '@core/utils/serverHelpers'
|
||||
|
||||
// Data Imports
|
||||
import { getAcademyData } 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 `/apps/academy` 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 getAcademyData = async () => {
|
||||
// Vars
|
||||
const res = await fetch(`${process.env.API_URL}/apps/academy`)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Failed to fetch academy data')
|
||||
}
|
||||
|
||||
return res.json()
|
||||
} */
|
||||
|
||||
const MyCoursePage = async () => {
|
||||
// Vars
|
||||
const mode = await getServerMode()
|
||||
const data = await getAcademyData()
|
||||
|
||||
return <AcademyMyCourse mode={mode} courseData={data?.courses} />
|
||||
}
|
||||
|
||||
export default MyCoursePage
|
||||
@@ -1,20 +0,0 @@
|
||||
// MUI Imports
|
||||
import Card from '@mui/material/Card'
|
||||
|
||||
// Component Imports
|
||||
import CalendarWrapper from '@views/apps/calendar/CalendarWrapper'
|
||||
|
||||
// Styled Component Imports
|
||||
import AppFullCalendar from '@/libs/styles/AppFullCalendar'
|
||||
|
||||
const CalendarApp = () => {
|
||||
return (
|
||||
<Card className='overflow-visible'>
|
||||
<AppFullCalendar className='app-calendar'>
|
||||
<CalendarWrapper />
|
||||
</AppFullCalendar>
|
||||
</Card>
|
||||
)
|
||||
}
|
||||
|
||||
export default CalendarApp
|
||||
@@ -1,8 +0,0 @@
|
||||
// Component Imports
|
||||
import ChatWrapper from '@views/apps/chat'
|
||||
|
||||
const ChatApp = () => {
|
||||
return <ChatWrapper />
|
||||
}
|
||||
|
||||
export default ChatApp
|
||||
@@ -1,46 +0,0 @@
|
||||
// Next Imports
|
||||
import { redirect } from 'next/navigation'
|
||||
|
||||
// Type Imports
|
||||
import type { Customer } from '@/types/apps/ecommerceTypes'
|
||||
|
||||
// Component Imports
|
||||
import CustomerDetails from '@/views/apps/ecommerce/customers/details'
|
||||
|
||||
// Data Imports
|
||||
import { getEcommerceData } 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 `/apps/ecommerce` 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 getEcommerceData = async () => {
|
||||
// Vars
|
||||
const res = await fetch(`${process.env.API_URL}/apps/ecommerce`)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Failed to fetch ecommerce data')
|
||||
}
|
||||
|
||||
return res.json()
|
||||
} */
|
||||
|
||||
const CustomerDetailsPage = async (props: { params: Promise<{ id: string }> }) => {
|
||||
const params = await props.params
|
||||
|
||||
// Vars
|
||||
const data = await getEcommerceData()
|
||||
|
||||
const filteredData = data?.customerData.filter((item: Customer) => item.customerId === params.id)[0]
|
||||
|
||||
if (!filteredData) {
|
||||
redirect('/not-found')
|
||||
}
|
||||
|
||||
return filteredData ? <CustomerDetails customerData={filteredData} customerId={params.id} /> : null
|
||||
}
|
||||
|
||||
export default CustomerDetailsPage
|
||||
@@ -1,8 +1,5 @@
|
||||
import CustomerListTable from '@views/apps/ecommerce/customers/list/CustomerListTable'
|
||||
|
||||
// Data Imports
|
||||
import { getEcommerceData } 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 `/apps/ecommerce` in below example.
|
||||
@@ -22,10 +19,7 @@ import { getEcommerceData } from '@/app/server/actions'
|
||||
} */
|
||||
|
||||
const CustomerListTablePage = async () => {
|
||||
// Vars
|
||||
const data = await getEcommerceData()
|
||||
|
||||
return <CustomerListTable customerData={data?.customerData} />
|
||||
return <CustomerListTable />
|
||||
}
|
||||
|
||||
export default CustomerListTablePage
|
||||
|
||||
@@ -14,9 +14,6 @@ import Orders from '@views/apps/ecommerce/dashboard/Orders'
|
||||
import Transactions from '@views/apps/ecommerce/dashboard/Transactions'
|
||||
import InvoiceListTable from '@views/apps/ecommerce/dashboard/InvoiceListTable'
|
||||
|
||||
// Data Imports
|
||||
import { getInvoiceData } 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 `/apps/invoice` in below example.
|
||||
@@ -37,9 +34,6 @@ import { getInvoiceData } from '@/app/server/actions'
|
||||
*/
|
||||
|
||||
const EcommerceDashboard = async () => {
|
||||
// Vars
|
||||
const invoiceData = await getInvoiceData()
|
||||
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12, md: 4 }}>
|
||||
@@ -77,7 +71,7 @@ const EcommerceDashboard = async () => {
|
||||
<Transactions />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, lg: 8 }}>
|
||||
<InvoiceListTable invoiceData={invoiceData} />
|
||||
<InvoiceListTable invoiceData={[]} />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
|
||||
// Component Imports
|
||||
import TotalReviews from '@views/apps/ecommerce/manage-reviews/TotalReviews'
|
||||
import ReviewsStatistics from '@views/apps/ecommerce/manage-reviews/ReviewsStatistics'
|
||||
import ManageReviewsTable from '@views/apps/ecommerce/manage-reviews/ManageReviewsTable'
|
||||
|
||||
// Data Imports
|
||||
import { getEcommerceData } 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 `/apps/ecommerce` 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 getEcommerceData = async () => {
|
||||
// Vars
|
||||
const res = await fetch(`${process.env.API_URL}/apps/ecommerce`)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Failed to fetch ecommerce data')
|
||||
}
|
||||
|
||||
return res.json()
|
||||
} */
|
||||
|
||||
const eCommerceManageReviews = async () => {
|
||||
// Vars
|
||||
const data = await getEcommerceData()
|
||||
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<TotalReviews />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<ReviewsStatistics />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<ManageReviewsTable reviewsData={data?.reviews} />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default eCommerceManageReviews
|
||||
@@ -1,46 +0,0 @@
|
||||
// Next Imports
|
||||
import { redirect } from 'next/navigation'
|
||||
|
||||
// Type Imports
|
||||
import type { OrderType } from '@/types/apps/ecommerceTypes'
|
||||
|
||||
// Component Imports
|
||||
import OrderDetails from '@views/apps/ecommerce/orders/details'
|
||||
|
||||
// Data Imports
|
||||
import { getEcommerceData } 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 `/apps/ecommerce` 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 getEcommerceData = async () => {
|
||||
// Vars
|
||||
const res = await fetch(`${process.env.API_URL}/apps/ecommerce`)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Failed to fetch ecommerce data')
|
||||
}
|
||||
|
||||
return res.json()
|
||||
} */
|
||||
|
||||
const OrderDetailsPage = async (props: { params: Promise<{ id: string }> }) => {
|
||||
const params = await props.params
|
||||
|
||||
// Vars
|
||||
const data = await getEcommerceData()
|
||||
|
||||
const filteredData = data?.orderData.filter((item: OrderType) => item.order === params.id)[0]
|
||||
|
||||
if (!filteredData) {
|
||||
redirect('/not-found')
|
||||
}
|
||||
|
||||
return filteredData ? <OrderDetails orderData={filteredData} order={params.id} /> : null
|
||||
}
|
||||
|
||||
export default OrderDetailsPage
|
||||
@@ -1,72 +0,0 @@
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
|
||||
// Component Imports
|
||||
import HorizontalStatisticsCard from '@views/apps/ecommerce/referrals/HorizontalStatisticsCard'
|
||||
import IconStepsCard from '@views/apps/ecommerce/referrals/IconStepsCard'
|
||||
import InviteAndShare from '@views/apps/ecommerce/referrals/InviteAndShare'
|
||||
import ReferredUsersTable from '@views/apps/ecommerce/referrals/ReferredUsersTable'
|
||||
|
||||
// Data Imports
|
||||
import { getEcommerceData, getStatisticsData } 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/widget-examples` 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 getStatisticsData = async () => {
|
||||
// Vars
|
||||
const res = await fetch(`${process.env.API_URL}/pages/widget-examples`)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Failed to fetch statistics data')
|
||||
}
|
||||
|
||||
return res.json()
|
||||
} */
|
||||
|
||||
/**
|
||||
* ! 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 `/apps/ecommerce` 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 getEcommerceData = async () => {
|
||||
// Vars
|
||||
const res = await fetch(`${process.env.API_URL}/apps/ecommerce`)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Failed to fetch ecommerce data')
|
||||
}
|
||||
|
||||
return res.json()
|
||||
} */
|
||||
|
||||
const eCommerceReferrals = async () => {
|
||||
// Vars
|
||||
const statsData = await getStatisticsData()
|
||||
const ecommerceData = await getEcommerceData()
|
||||
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<HorizontalStatisticsCard data={statsData?.statsHorizontalWithAvatar} />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 8 }}>
|
||||
<IconStepsCard />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 4 }}>
|
||||
<InviteAndShare />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<ReferredUsersTable referralsData={ecommerceData?.referrals} />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default eCommerceReferrals
|
||||
@@ -1,10 +0,0 @@
|
||||
// Component Imports
|
||||
import EmailWrapper from '@views/apps/email'
|
||||
|
||||
const EmailFolderPage = async (props: { params: Promise<{ folder: string }> }) => {
|
||||
const params = await props.params
|
||||
|
||||
return <EmailWrapper folder={params.folder} />
|
||||
}
|
||||
|
||||
export default EmailFolderPage
|
||||
@@ -1,10 +0,0 @@
|
||||
// Component Imports
|
||||
import EmailWrapper from '@views/apps/email'
|
||||
|
||||
const EmailLabelPage = async (props: { params: Promise<{ label: string }> }) => {
|
||||
const params = await props.params
|
||||
|
||||
return <EmailWrapper label={params.label} />
|
||||
}
|
||||
|
||||
export default EmailLabelPage
|
||||
@@ -1,8 +0,0 @@
|
||||
// Component Imports
|
||||
import EmailWrapper from '@views/apps/email'
|
||||
|
||||
const EmailPage = () => {
|
||||
return <EmailWrapper folder='inbox' />
|
||||
}
|
||||
|
||||
export default EmailPage
|
||||
@@ -1,45 +0,0 @@
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
|
||||
// Component Imports
|
||||
import AddCard from '@views/apps/invoice/add/AddCard'
|
||||
import AddActions from '@views/apps/invoice/add/AddActions'
|
||||
|
||||
// Data Imports
|
||||
import { getInvoiceData } 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 `/apps/invoice` 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 getInvoiceData = async () => {
|
||||
// Vars
|
||||
const res = await fetch(`${process.env.API_URL}/apps/invoice`)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Failed to fetch invoice data')
|
||||
}
|
||||
|
||||
return res.json()
|
||||
}
|
||||
*/
|
||||
const InvoiceAdd = async () => {
|
||||
// Vars
|
||||
const data = await getInvoiceData()
|
||||
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12, md: 9 }}>
|
||||
<AddCard invoiceData={data} />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 3 }}>
|
||||
<AddActions />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default InvoiceAdd
|
||||
@@ -1,59 +0,0 @@
|
||||
// Next Imports
|
||||
import { redirect } from 'next/navigation'
|
||||
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
|
||||
// Type Imports
|
||||
import type { InvoiceType } from '@/types/apps/invoiceTypes'
|
||||
|
||||
// Component Imports
|
||||
import EditCard from '@views/apps/invoice/edit/EditCard'
|
||||
import EditActions from '@views/apps/invoice/edit/EditActions'
|
||||
|
||||
// Data Imports
|
||||
import { getInvoiceData } 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 `/apps/invoice` 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 getInvoiceData = async () => {
|
||||
// Vars
|
||||
const res = await fetch(`${process.env.API_URL}/apps/invoice`)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Failed to fetch invoice data')
|
||||
}
|
||||
|
||||
return res.json()
|
||||
} */
|
||||
|
||||
const EditPage = async (props: { params: Promise<{ id: string }> }) => {
|
||||
const params = await props.params
|
||||
|
||||
// Vars
|
||||
const data = await getInvoiceData()
|
||||
|
||||
const filteredData = data?.filter((invoice: InvoiceType) => invoice.id === params.id)[0]
|
||||
|
||||
if (!filteredData) {
|
||||
redirect('/not-found')
|
||||
}
|
||||
|
||||
return filteredData ? (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12, md: 9 }}>
|
||||
<EditCard data={data} invoiceData={filteredData} id={params.id} />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 3 }}>
|
||||
<EditActions id={params.id} />
|
||||
</Grid>
|
||||
</Grid>
|
||||
) : null
|
||||
}
|
||||
|
||||
export default EditPage
|
||||
@@ -1,41 +0,0 @@
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
|
||||
// Component Imports
|
||||
import InvoiceList from '@views/apps/invoice/list'
|
||||
|
||||
// Data Imports
|
||||
import { getInvoiceData } 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 `/apps/invoice` 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 getInvoiceData = async () => {
|
||||
// Vars
|
||||
const res = await fetch(`${process.env.API_URL}/apps/invoice`)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Failed to fetch invoice data')
|
||||
}
|
||||
|
||||
return res.json()
|
||||
} */
|
||||
|
||||
const InvoiceApp = async () => {
|
||||
// Vars
|
||||
const data = await getInvoiceData()
|
||||
|
||||
return (
|
||||
<Grid container>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<InvoiceList invoiceData={data} />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default InvoiceApp
|
||||
@@ -1,46 +0,0 @@
|
||||
// Next Imports
|
||||
import { redirect } from 'next/navigation'
|
||||
|
||||
// Type Imports
|
||||
import type { InvoiceType } from '@/types/apps/invoiceTypes'
|
||||
|
||||
// Component Imports
|
||||
import Preview from '@views/apps/invoice/preview'
|
||||
|
||||
// Data Imports
|
||||
import { getInvoiceData } 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 `/apps/invoice` 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 getInvoiceData = async () => {
|
||||
// Vars
|
||||
const res = await fetch(`${process.env.API_URL}/apps/invoice`)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Failed to fetch invoice data')
|
||||
}
|
||||
|
||||
return res.json()
|
||||
} */
|
||||
|
||||
const PreviewPage = async (props: { params: Promise<{ id: string }> }) => {
|
||||
const params = await props.params
|
||||
|
||||
// Vars
|
||||
const data = await getInvoiceData()
|
||||
|
||||
const filteredData = data?.filter((invoice: InvoiceType) => invoice.id === params.id)[0]
|
||||
|
||||
if (!filteredData) {
|
||||
redirect('/not-found')
|
||||
}
|
||||
|
||||
return filteredData ? <Preview invoiceData={filteredData} id={params.id} /> : null
|
||||
}
|
||||
|
||||
export default PreviewPage
|
||||
@@ -1,27 +0,0 @@
|
||||
// Third-party Imports
|
||||
import classnames from 'classnames'
|
||||
|
||||
// Component Imports
|
||||
import KanbanBoard from '@views/apps/kanban/KanbanBoard'
|
||||
|
||||
// Util Imports
|
||||
import { commonLayoutClasses } from '@layouts/utils/layoutClasses'
|
||||
|
||||
// Styles Imports
|
||||
import styles from '@views/apps/kanban/styles.module.css'
|
||||
|
||||
const KanbanPage = () => {
|
||||
return (
|
||||
<div
|
||||
className={classnames(
|
||||
commonLayoutClasses.contentHeightFixed,
|
||||
styles.scroll,
|
||||
'is-full overflow-auto pis-2 -mis-2'
|
||||
)}
|
||||
>
|
||||
<KanbanBoard />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default KanbanPage
|
||||
@@ -1,84 +0,0 @@
|
||||
//MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
|
||||
//Component Imports
|
||||
import LogisticsStatisticsCard from '@views/apps/logistics/dashboard/LogisticsStatisticsCard'
|
||||
import LogisticsVehicleOverview from '@views/apps/logistics/dashboard/LogisticsVehicleOverview'
|
||||
import LogisticsShipmentStatistics from '@views/apps/logistics/dashboard/LogisticsShipmentStatistics'
|
||||
import LogisticsDeliveryPerformance from '@views/apps/logistics/dashboard/LogisticsDeliveryPerformance'
|
||||
import LogisticsDeliveryExceptions from '@views/apps/logistics/dashboard/LogisticsDeliveryExceptions'
|
||||
import LogisticsOrdersByCountries from '@/views/apps/logistics/dashboard/LogisticsOrdersByCountries'
|
||||
import LogisticsOverviewTable from '@views/apps/logistics/dashboard/LogisticsOverviewTable'
|
||||
|
||||
//Data Imports
|
||||
import { getLogisticsData, getStatisticsData } 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/widget-examples` 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 getStatisticsData = async () => {
|
||||
// Vars
|
||||
const res = await fetch(`${process.env.API_URL}/pages/widget-examples`)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Failed to fetch statisticsData')
|
||||
}
|
||||
|
||||
return res.json()
|
||||
} */
|
||||
|
||||
/**
|
||||
* ! 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 `/apps/logistics` 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 getLogisticsData = async () => {
|
||||
// Vars
|
||||
const res = await fetch(`${process.env.API_URL}/apps/logistics`)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Failed to fetch logistics data')
|
||||
}
|
||||
|
||||
return res.json()
|
||||
} */
|
||||
|
||||
const LogisticsDashboard = async () => {
|
||||
// Vars
|
||||
const data = await getStatisticsData()
|
||||
const vehicleData = await getLogisticsData()
|
||||
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<LogisticsStatisticsCard data={data?.statsHorizontalWithBorder} />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<LogisticsVehicleOverview />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<LogisticsShipmentStatistics />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 4 }}>
|
||||
<LogisticsDeliveryPerformance />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 4 }}>
|
||||
<LogisticsDeliveryExceptions />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 4 }}>
|
||||
<LogisticsOrdersByCountries />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<LogisticsOverviewTable vehicleData={vehicleData?.vehicles} />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default LogisticsDashboard
|
||||
@@ -1,8 +0,0 @@
|
||||
// Component Imports
|
||||
import Fleet from '@views/apps/logistics/fleet'
|
||||
|
||||
const FleetPage = () => {
|
||||
return <Fleet mapboxAccessToken={process.env.MAPBOX_ACCESS_TOKEN!} />
|
||||
}
|
||||
|
||||
export default FleetPage
|
||||
@@ -2,7 +2,6 @@
|
||||
import Permissions from '@views/apps/permissions'
|
||||
|
||||
// Data Imports
|
||||
import { getPermissionsData } 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
|
||||
@@ -23,10 +22,8 @@ import { getPermissionsData } from '@/app/server/actions'
|
||||
} */
|
||||
|
||||
const PermissionsApp = async () => {
|
||||
// Vars
|
||||
const data = await getPermissionsData()
|
||||
|
||||
return <Permissions permissionsData={data} />
|
||||
return <Permissions permissionsData={[]} />
|
||||
}
|
||||
|
||||
export default PermissionsApp
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
import Roles from '@views/apps/roles'
|
||||
|
||||
// Data Imports
|
||||
import { getUserData } 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
|
||||
@@ -23,10 +22,8 @@ import { getUserData } from '@/app/server/actions'
|
||||
} */
|
||||
|
||||
const RolesApp = async () => {
|
||||
// Vars
|
||||
const data = await getUserData()
|
||||
|
||||
return <Roles userData={data} />
|
||||
return <Roles userData={[]} />
|
||||
}
|
||||
|
||||
export default RolesApp
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
// Component Imports
|
||||
import UserList from '@views/apps/user/list'
|
||||
|
||||
// Data Imports
|
||||
import { getUserData } 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 `/apps/user-list` in below example.
|
||||
@@ -23,10 +20,8 @@ import { getUserData } from '@/app/server/actions'
|
||||
} */
|
||||
|
||||
const UserListApp = async () => {
|
||||
// Vars
|
||||
const data = await getUserData()
|
||||
|
||||
return <UserList userData={data} />
|
||||
return <UserList userData={[]} />
|
||||
}
|
||||
|
||||
export default UserListApp
|
||||
|
||||
@@ -14,9 +14,6 @@ import type { PricingPlanType } from '@/types/pages/pricingTypes'
|
||||
import UserLeftOverview from '@views/apps/user/view/user-left-overview'
|
||||
import UserRight from '@views/apps/user/view/user-right'
|
||||
|
||||
// Data Imports
|
||||
import { getPricingData } from '@/app/server/actions'
|
||||
|
||||
const OverViewTab = dynamic(() => import('@views/apps/user/view/user-right/overview'))
|
||||
const SecurityTab = dynamic(() => import('@views/apps/user/view/user-right/security'))
|
||||
const BillingPlans = dynamic(() => import('@views/apps/user/view/user-right/billing-plans'))
|
||||
@@ -51,16 +48,13 @@ const tabContentList = (data?: PricingPlanType[]): { [key: string]: ReactElement
|
||||
} */
|
||||
|
||||
const UserViewTab = async () => {
|
||||
// Vars
|
||||
const data = await getPricingData()
|
||||
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12, lg: 4, md: 5 }}>
|
||||
<UserLeftOverview />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, lg: 8, md: 7 }}>
|
||||
<UserRight tabContentList={tabContentList(data)} />
|
||||
<UserRight tabContentList={tabContentList([])} />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
// Next Imports
|
||||
import Link from 'next/link'
|
||||
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
import Typography from '@mui/material/Typography'
|
||||
|
||||
// Component Imports
|
||||
import ApexBarChart from '@views/charts/apex/ApexBarChart'
|
||||
import ApexAreaChart from '@views/charts/apex/ApexAreaChart'
|
||||
import ApexLineChart from '@views/charts/apex/ApexLineChart'
|
||||
import ApexRadarChart from '@views/charts/apex/ApexRadarChart'
|
||||
import ApexDonutChart from '@views/charts/apex/ApexDonutChart'
|
||||
import ApexColumnChart from '@views/charts/apex/ApexColumnChart'
|
||||
import ApexScatterChart from '@views/charts/apex/ApexScatterChart'
|
||||
import ApexHeatmapChart from '@views/charts/apex/ApexHeatmapChart'
|
||||
import ApexRadialBarChart from '@views/charts/apex/ApexRadialBarChart'
|
||||
import ApexCandlestickChart from '@views/charts/apex/ApexCandlestickChart'
|
||||
|
||||
const ApexCharts = () => {
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<Typography variant='h4'>ApexCharts</Typography>
|
||||
<Typography>
|
||||
<code>react-apexcharts</code> is a third-party library. Please refer to its{' '}
|
||||
<Link
|
||||
href='https://apexcharts.com'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
className='no-underline text-primary'
|
||||
>
|
||||
official documentation
|
||||
</Link>{' '}
|
||||
for more details.
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<ApexAreaChart />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<ApexColumnChart />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<ApexScatterChart />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<ApexLineChart />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<ApexBarChart />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<ApexCandlestickChart />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<ApexHeatmapChart />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<ApexRadialBarChart />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<ApexRadarChart />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<ApexDonutChart />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default ApexCharts
|
||||
@@ -1,56 +0,0 @@
|
||||
// Next Imports
|
||||
import Link from 'next/link'
|
||||
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
import Typography from '@mui/material/Typography'
|
||||
|
||||
// Component Imports
|
||||
import RechartsBarChart from '@views/charts/recharts/RechartsBarChart'
|
||||
import RechartsPieChart from '@views/charts/recharts/RechartsPieChart'
|
||||
import RechartsLineChart from '@views/charts/recharts/RechartsLineChart'
|
||||
import RechartsAreaChart from '@views/charts/recharts/RechartsAreaChart'
|
||||
import RechartsRadarChart from '@views/charts/recharts/RechartsRadarChart'
|
||||
import RechartsScatterChart from '@views/charts/recharts/RechartsScatterChart'
|
||||
|
||||
const Recharts = () => {
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<Typography variant='h4'>Recharts</Typography>
|
||||
<Typography>
|
||||
<code>recharts</code> is a third-party library. Please refer to its{' '}
|
||||
<Link
|
||||
href='https://recharts.org'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
className='no-underline text-primary'
|
||||
>
|
||||
official documentation
|
||||
</Link>{' '}
|
||||
for more details.
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<RechartsLineChart />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<RechartsAreaChart />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<RechartsScatterChart />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<RechartsBarChart />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<RechartsRadarChart />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<RechartsPieChart />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default Recharts
|
||||
@@ -1,8 +0,0 @@
|
||||
// Component Imports
|
||||
import AcademyDashboard from '../../apps/academy/dashboard/page'
|
||||
|
||||
const DashboardAcademy = async () => {
|
||||
return <AcademyDashboard />
|
||||
}
|
||||
|
||||
export default DashboardAcademy
|
||||
@@ -13,9 +13,6 @@ import MonthlyCampaignState from '@views/dashboards/analytics/MonthlyCampaignSta
|
||||
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.
|
||||
@@ -35,8 +32,6 @@ import { getProfileData } from '@/app/server/actions'
|
||||
} */
|
||||
|
||||
const DashboardAnalytics = async () => {
|
||||
// Vars
|
||||
const data = await getProfileData()
|
||||
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
@@ -68,7 +63,7 @@ const DashboardAnalytics = async () => {
|
||||
<SourceVisits />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, lg: 8 }}>
|
||||
<ProjectsTable projectTable={data?.users.profile.projectTable} />
|
||||
<ProjectsTable projectTable={[]} />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
import LogisticsDashboard from '../../apps/logistics/dashboard/page'
|
||||
|
||||
const DashboardLogistics = () => {
|
||||
return <LogisticsDashboard />
|
||||
}
|
||||
|
||||
export default DashboardLogistics
|
||||
@@ -1,44 +0,0 @@
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
import Typography from '@mui/material/Typography'
|
||||
|
||||
// Component Imports
|
||||
import FormLayoutsBasic from '@views/forms/form-layouts/FormLayoutsBasic'
|
||||
import FormLayoutsIcon from '@views/forms/form-layouts/FormLayoutsIcons'
|
||||
import FormLayoutsSeparator from '@views/forms/form-layouts/FormLayoutsSeparator'
|
||||
import FormLayoutsTabs from '@views/forms/form-layouts/FormLayoutsTabs'
|
||||
import FormLayoutsCollapsible from '@views/forms/form-layouts/FormLayoutsCollapsible'
|
||||
import FormLayoutsAlignment from '@views/forms/form-layouts/FormLayoutsAlignment'
|
||||
|
||||
const FormLayouts = () => {
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<FormLayoutsBasic />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<FormLayoutsIcon />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<FormLayoutsSeparator />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<Typography variant='h5'>Form with Tabs</Typography>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<FormLayoutsTabs />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<Typography variant='h5'>Collapsible Sections</Typography>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<FormLayoutsCollapsible />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<FormLayoutsAlignment />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default FormLayouts
|
||||
@@ -1,44 +0,0 @@
|
||||
// Next Imports
|
||||
import Link from 'next/link'
|
||||
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
import Typography from '@mui/material/Typography'
|
||||
|
||||
// Component Imports
|
||||
import FormValidationBasic from '@views/forms/form-validation/FormValidationBasic'
|
||||
import FormValidationOnSchema from '@views/forms/form-validation/FormValidationSchema'
|
||||
import FormValidationAsyncSubmit from '@views/forms/form-validation/FormValidationAsyncSubmit'
|
||||
|
||||
const FormValidation = () => {
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<Typography variant='h4'>React Hook Form</Typography>
|
||||
<Typography>
|
||||
<code>react-hook-form</code> is a third-party library. Please refer to its{' '}
|
||||
<Link
|
||||
href='https://react-hook-form.com'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
className='no-underline text-primary'
|
||||
>
|
||||
official documentation
|
||||
</Link>{' '}
|
||||
for more details.
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<FormValidationBasic />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<FormValidationOnSchema />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<FormValidationAsyncSubmit />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default FormValidation
|
||||
@@ -1,77 +0,0 @@
|
||||
// Next Imports
|
||||
import Link from 'next/link'
|
||||
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
import Typography from '@mui/material/Typography'
|
||||
|
||||
// Component Imports
|
||||
import StepperLinearWithValidation from '@views/forms/form-wizard/StepperLinearWithValidation'
|
||||
import StepperAlternativeLabel from '@views/forms/form-wizard/StepperAlternativeLabel'
|
||||
import StepperVerticalWithNumbers from '@views/forms/form-wizard/StepperVerticalWithNumbers'
|
||||
import StepperVerticalWithoutNumbers from '@views/forms/form-wizard/StepperVerticalWithoutNumbers'
|
||||
import StepperCustomHorizontal from '@views/forms/form-wizard/StepperCustomHorizontal'
|
||||
import StepperCustomVertical from '@views/forms/form-wizard/StepperCustomVertical'
|
||||
|
||||
const FormWizard = () => {
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<Typography variant='h4'>Stepper</Typography>
|
||||
<Typography>
|
||||
Please refer to MUI's official docs for more details on component's{' '}
|
||||
<Link
|
||||
href='https://mui.com/material-ui/react-stepper'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
className='no-underline text-primary'
|
||||
>
|
||||
usage guide
|
||||
</Link>{' '}
|
||||
and{' '}
|
||||
<Link
|
||||
href='https://mui.com/material-ui/react-stepper/#api'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
className='no-underline text-primary'
|
||||
>
|
||||
API documentation
|
||||
</Link>
|
||||
.
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<Typography variant='h5'>Linear Stepper with Validation</Typography>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<StepperLinearWithValidation />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<Typography variant='h5'>Alternative Label</Typography>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<StepperAlternativeLabel />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<StepperVerticalWithNumbers />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<StepperVerticalWithoutNumbers />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<Typography variant='h5'>Custom Horizontal Stepper</Typography>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<StepperCustomHorizontal />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<Typography variant='h5'>Custom Vertical Stepper</Typography>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<StepperCustomVertical />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default FormWizard
|
||||
@@ -1,29 +0,0 @@
|
||||
// React Imports
|
||||
import type { ReactElement } from 'react'
|
||||
|
||||
// Next Imports
|
||||
import dynamic from 'next/dynamic'
|
||||
|
||||
// Component Imports
|
||||
import AccountSettings from '@views/pages/account-settings'
|
||||
|
||||
const AccountTab = dynamic(() => import('@views/pages/account-settings/account'))
|
||||
const SecurityTab = dynamic(() => import('@views/pages/account-settings/security'))
|
||||
const BillingPlansTab = dynamic(() => import('@views/pages/account-settings/billing-plans'))
|
||||
const NotificationsTab = dynamic(() => import('@views/pages/account-settings/notifications'))
|
||||
const ConnectionsTab = dynamic(() => import('@views/pages/account-settings/connections'))
|
||||
|
||||
// Vars
|
||||
const tabContentList = (): { [key: string]: ReactElement } => ({
|
||||
account: <AccountTab />,
|
||||
security: <SecurityTab />,
|
||||
'billing-plans': <BillingPlansTab />,
|
||||
notifications: <NotificationsTab />,
|
||||
connections: <ConnectionsTab />
|
||||
})
|
||||
|
||||
const AccountSettingsPage = () => {
|
||||
return <AccountSettings tabContentList={tabContentList()} />
|
||||
}
|
||||
|
||||
export default AccountSettingsPage
|
||||
@@ -1,77 +0,0 @@
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
|
||||
// Component Imports
|
||||
import DialogAddCard from '@views/pages/dialog-examples/DialogAddCard'
|
||||
import DialogEditUserInfo from '@views/pages/dialog-examples/DialogEditUserInfo'
|
||||
import DialogAuthentication from '@views/pages/dialog-examples/DialogAuthentication'
|
||||
import DialogAddNewAddress from '@views/pages/dialog-examples/DialogAddNewAddress'
|
||||
import DialogShareProject from '@views/pages/dialog-examples/DialogShareProject'
|
||||
import DialogReferEarn from '@views/pages/dialog-examples/DialogReferEarn'
|
||||
import DialogPaymentMethod from '@views/pages/dialog-examples/DialogPaymentMethod'
|
||||
import DialogPaymentProviders from '@views/pages/dialog-examples/DialogPaymentProviders'
|
||||
import DialogCreateApp from '@views/pages/dialog-examples/DialogCreateApp'
|
||||
import DialogPricing from '@views/pages/dialog-examples/DialogPricing'
|
||||
|
||||
// Data Imports
|
||||
import { getPricingData } 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/pricing` 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 getPricingData = async () => {
|
||||
// Vars
|
||||
const res = await fetch(`${process.env.API_URL}/pages/pricing`)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Failed to fetch data')
|
||||
}
|
||||
|
||||
return res.json()
|
||||
} */
|
||||
|
||||
const DialogExamples = async () => {
|
||||
// Vars
|
||||
const data = await getPricingData()
|
||||
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<DialogAddCard />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<DialogEditUserInfo />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<DialogAuthentication />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<DialogAddNewAddress />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<DialogShareProject />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<DialogReferEarn />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<DialogPaymentMethod />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<DialogPaymentProviders />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<DialogPricing data={data} />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<DialogCreateApp />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default DialogExamples
|
||||
@@ -1,32 +0,0 @@
|
||||
// Component Imports
|
||||
import FAQ from '@views/pages/faq'
|
||||
|
||||
// Data Imports
|
||||
import { getFaqData } 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/faq` 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 getFaqData = async () => {
|
||||
// Vars
|
||||
const res = await fetch(`${process.env.API_URL}/pages/faq`)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Failed to fetch faqData')
|
||||
}
|
||||
|
||||
return res.json()
|
||||
} */
|
||||
|
||||
const FAQPage = async () => {
|
||||
// Vars
|
||||
const data = await getFaqData()
|
||||
|
||||
return <FAQ data={data} />
|
||||
}
|
||||
|
||||
export default FAQPage
|
||||
@@ -1,32 +0,0 @@
|
||||
// Component Imports
|
||||
import Pricing from '@views/pages/pricing'
|
||||
|
||||
// Data Imports
|
||||
import { getPricingData } 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/pricing` 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 getPricingData = async () => {
|
||||
// Vars
|
||||
const res = await fetch(`${process.env.API_URL}/pages/pricing`)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Failed to fetch data')
|
||||
}
|
||||
|
||||
return res.json()
|
||||
} */
|
||||
|
||||
const PricePage = async () => {
|
||||
// Vars
|
||||
const data = await getPricingData()
|
||||
|
||||
return <Pricing data={data} />
|
||||
}
|
||||
|
||||
export default PricePage
|
||||
@@ -1,54 +0,0 @@
|
||||
// React Imports
|
||||
import type { ReactElement } from 'react'
|
||||
|
||||
// Next Imports
|
||||
import dynamic from 'next/dynamic'
|
||||
|
||||
// Type Imports
|
||||
import type { Data } from '@/types/pages/profileTypes'
|
||||
|
||||
// Component Imports
|
||||
import UserProfile from '@views/pages/user-profile'
|
||||
|
||||
// Data Imports
|
||||
import { getProfileData } from '@/app/server/actions'
|
||||
|
||||
const ProfileTab = dynamic(() => import('@views/pages/user-profile/profile'))
|
||||
const TeamsTab = dynamic(() => import('@views/pages/user-profile/teams'))
|
||||
const ProjectsTab = dynamic(() => import('@views/pages/user-profile/projects'))
|
||||
const ConnectionsTab = dynamic(() => import('@views/pages/user-profile/connections'))
|
||||
|
||||
// Vars
|
||||
const tabContentList = (data?: Data): { [key: string]: ReactElement } => ({
|
||||
profile: <ProfileTab data={data?.users.profile} />,
|
||||
teams: <TeamsTab data={data?.users.teams} />,
|
||||
projects: <ProjectsTab data={data?.users.projects} />,
|
||||
connections: <ConnectionsTab data={data?.users.connections} />
|
||||
})
|
||||
|
||||
/**
|
||||
* ! 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 ProfilePage = async () => {
|
||||
// Vars
|
||||
const data = await getProfileData()
|
||||
|
||||
return <UserProfile data={data} tabContentList={tabContentList(data)} />
|
||||
}
|
||||
|
||||
export default ProfilePage
|
||||
@@ -1,33 +0,0 @@
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
|
||||
// Components Imports
|
||||
import CardActionsTable from '@views/pages/widget-examples/actions/Table'
|
||||
import CardActionCollapsible from '@views/pages/widget-examples/actions/Collapsible'
|
||||
import CardActionRefreshContent from '@views/pages/widget-examples/actions/RefreshContent'
|
||||
import CardActionRemoveCard from '@views/pages/widget-examples/actions/RemoveCard'
|
||||
import CardActionAll from '@views/pages/widget-examples/actions/AllActions'
|
||||
|
||||
const Actions = () => {
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<CardActionsTable />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<CardActionCollapsible />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<CardActionRefreshContent />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<CardActionRemoveCard />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<CardActionAll />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default Actions
|
||||
@@ -1,95 +0,0 @@
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
|
||||
// Components Imports
|
||||
import MonthlyCampaignState from '@views/pages/widget-examples/advanced/MonthlyCampaignState'
|
||||
import ActiveProjects from '@views/pages/widget-examples/advanced/ActiveProjects'
|
||||
import SourceVisits from '@views/pages/widget-examples/advanced/SourceVisits'
|
||||
import SalesByCountries from '@views/pages/widget-examples/advanced/SalesByCountries'
|
||||
import EarningReports from '@views/pages/widget-examples/advanced/EarningReports'
|
||||
import BrowserStates from '@views/pages/widget-examples/advanced/BrowserStates'
|
||||
import Orders from '@views/pages/widget-examples/advanced/Orders'
|
||||
import Transactions from '@views/pages/widget-examples/advanced/Transactions'
|
||||
import PopularProducts from '@views/pages/widget-examples/advanced/PopularProducts'
|
||||
import TopCourses from '@views/pages/widget-examples/advanced/TopCourses'
|
||||
import UpcomingWebinar from '@views/pages/widget-examples/advanced/UpcomingWebinar'
|
||||
import AssignmentProgress from '@views/pages/widget-examples/advanced/AssignmentProgress'
|
||||
import DeliveryPerformance from '@views/pages/widget-examples/advanced/DeliveryPerformance'
|
||||
import VehicleCondition from '@views/pages/widget-examples/advanced/VehicleCondition'
|
||||
import PopularInstructors from '@views/pages/widget-examples/advanced/PopularInstructors'
|
||||
import LastTransaction from '@views/pages/widget-examples/advanced/LastTransaction'
|
||||
import ActivityTimeline from '@views/pages/widget-examples/advanced/ActivityTimeline'
|
||||
import WebsiteAnalyticsSlider from '@views/pages/widget-examples/advanced/WebsiteAnalyticsSlider'
|
||||
import Congratulations from '@/views/pages/widget-examples/advanced/Congratulations'
|
||||
|
||||
// Server Action Imports
|
||||
import { getServerMode } from '@core/utils/serverHelpers'
|
||||
|
||||
const Advanced = async () => {
|
||||
// Vars
|
||||
const serverMode = await getServerMode()
|
||||
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<MonthlyCampaignState />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<ActiveProjects />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<SourceVisits />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<SalesByCountries />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<EarningReports />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<BrowserStates />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, lg: 4 }}>
|
||||
<Orders />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<Transactions />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<PopularProducts />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<TopCourses />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<UpcomingWebinar />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<AssignmentProgress />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<DeliveryPerformance />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<VehicleCondition />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<PopularInstructors />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<LastTransaction serverMode={serverMode} />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<ActivityTimeline />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<WebsiteAnalyticsSlider />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<Congratulations />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default Advanced
|
||||
@@ -1,87 +0,0 @@
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
import Typography from '@mui/material/Typography'
|
||||
import Divider from '@mui/material/Divider'
|
||||
|
||||
// Components Imports
|
||||
import CardInfluencingInfluencerWithImg from '@views/pages/widget-examples/basic/CardInfluencingInfluencerWithImg'
|
||||
import CardUser from '@views/pages/widget-examples/basic/CardUser'
|
||||
import CardWithCollapse from '@views/pages/widget-examples/basic/CardWithCollapse'
|
||||
import CardMobile from '@views/pages/widget-examples/basic/CardMobile'
|
||||
import CardHorizontalRatings from '@views/pages/widget-examples/basic/CardHorizontalRatings'
|
||||
import CardWatch from '@views/pages/widget-examples/basic/CardWatch'
|
||||
import CardLifetimeMembership from '@views/pages/widget-examples/basic/CardLifetimeMembership'
|
||||
import CardInfluencingInfluencer from '@views/pages/widget-examples/basic/CardInfluencingInfluencer'
|
||||
import CardVerticalRatings from '@views/pages/widget-examples/basic/CardVerticalRatings'
|
||||
import CardSupport from '@views/pages/widget-examples/basic/CardSupport'
|
||||
import CardWithTabs from '@views/pages/widget-examples/basic/CardWithTabs'
|
||||
import CardWithTabsCenter from '@views/pages/widget-examples/basic/CardWithTabsCenter'
|
||||
import CardTwitter from '@views/pages/widget-examples/basic/CardTwitter'
|
||||
import CardFacebook from '@views/pages/widget-examples/basic/CardFacebook'
|
||||
import CardLinkedIn from '@views/pages/widget-examples/basic/CardLinkedIn'
|
||||
|
||||
const Basic = () => {
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<Typography variant='h3'>Basic Cards</Typography>
|
||||
<Divider />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<CardInfluencingInfluencerWithImg />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<CardUser />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<CardWithCollapse />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6 }}>
|
||||
<CardMobile />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6 }}>
|
||||
<CardHorizontalRatings />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<CardWatch />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 8 }}>
|
||||
<CardLifetimeMembership />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<CardInfluencingInfluencer />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<CardVerticalRatings />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<CardSupport />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }} className='pbs-12'>
|
||||
<Typography variant='h3'>Navigation Cards</Typography>
|
||||
<Divider />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<CardWithTabs />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<CardWithTabsCenter />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }} className='pbs-12'>
|
||||
<Typography variant='h3'>Solid Cards</Typography>
|
||||
<Divider />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<CardTwitter />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<CardFacebook />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
|
||||
<CardLinkedIn />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default Basic
|
||||
@@ -1,57 +0,0 @@
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
|
||||
// Components Imports
|
||||
import EarningReports from '@views/pages/widget-examples/charts/EarningReports'
|
||||
import SupportTracker from '@views/pages/widget-examples/charts/SupportTracker'
|
||||
import Sales from '@views/pages/widget-examples/charts/Sales'
|
||||
import RevenueReport from '@views/pages/widget-examples/charts/RevenueReport'
|
||||
import ProjectStatus from '@views/pages/widget-examples/charts/ProjectStatus'
|
||||
import EarningReportsWithTabs from '@views/pages/widget-examples/charts/EarningReportsWithTabs'
|
||||
import TotalEarning from '@views/pages/widget-examples/charts/TotalEarning'
|
||||
import CarrierPerformance from '@views/pages/widget-examples/charts/CarrierPerformance'
|
||||
import DeliveryExceptions from '@views/pages/widget-examples/charts/DeliveryExceptions'
|
||||
import VehicleOverview from '@views/pages/widget-examples/charts/VehicleOverview'
|
||||
import InterestedTopics from '@views/pages/widget-examples/charts/InterestedTopics'
|
||||
|
||||
const Charts = () => {
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<EarningReports />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<SupportTracker />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 4 }}>
|
||||
<Sales />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 8 }}>
|
||||
<RevenueReport />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 4 }}>
|
||||
<ProjectStatus />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 8 }}>
|
||||
<EarningReportsWithTabs />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 5, lg: 4 }}>
|
||||
<TotalEarning />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 7, lg: 8 }}>
|
||||
<CarrierPerformance />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<DeliveryExceptions />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 8 }}>
|
||||
<VehicleOverview />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<InterestedTopics />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default Charts
|
||||
@@ -1,121 +0,0 @@
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
|
||||
// Component Imports
|
||||
import StatisticsCard from '@views/pages/widget-examples/statistics/StatisticsCard'
|
||||
import Square from '@views/pages/widget-examples/statistics/Square'
|
||||
import DistributedBarChartOrder from '@/views/pages/widget-examples/statistics/DistributedBarChartOrder'
|
||||
import LineAreaYearlySalesChart from '@views/pages/widget-examples/statistics/LineAreaYearlySalesChart'
|
||||
import LineChartProfit from '@views/pages/widget-examples/statistics/LineChartProfit'
|
||||
import BarChartSessionsWithNegativeValues from '@views/pages/widget-examples/statistics/BarChartSessionsWithNegativeValues'
|
||||
import RadialBarChart from '@views/pages/widget-examples/statistics/RadialBarChart'
|
||||
import LineChartImpression from '@views/pages/widget-examples/statistics/LineChartImpression'
|
||||
import Horizontal from '@views/pages/widget-examples/statistics/Horizontal'
|
||||
import CardStatsLineAreaCharts from '@views/pages/widget-examples/statistics/CardStatsLineAreaCharts'
|
||||
import LineAreaDailySalesChart from '@views/pages/widget-examples/statistics/LineAreaDailySalesChart'
|
||||
import SalesOverview from '@views/pages/widget-examples/statistics/SalesOverview'
|
||||
import BarChartDailyTraffic from '@views/pages/widget-examples/statistics/BarChartDailyTraffic'
|
||||
import SubscribersOrders from '@views/pages/widget-examples/statistics/SubscribersOrders'
|
||||
import Vertical from '@views/pages/widget-examples/statistics/Vertical'
|
||||
import BarChartRevenueGrowth from '@views/pages/widget-examples/statistics/BarChartRevenueGrowth'
|
||||
import DonutChartGeneratedLeads from '@views/pages/widget-examples/statistics/DonutChartGeneratedLeads'
|
||||
import HorizontalStatisticsCard from '@views/pages/widget-examples/statistics/HorizontalStatisticsCard'
|
||||
import CustomerStatisticsCard from '@views/pages/widget-examples/statistics/CustomerStatisticsCard'
|
||||
import LogisticsStatisticsCard from '@views/apps/logistics/dashboard/LogisticsStatisticsCard'
|
||||
import UserListCards from '@views/pages/widget-examples/statistics/UserListCards'
|
||||
|
||||
// Data Imports
|
||||
import { getStatisticsData } 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/widget-examples` 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 getStatisticsData = async () => {
|
||||
// Vars
|
||||
const res = await fetch(`${process.env.API_URL}/pages/widget-examples`)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Failed to fetch statistics data')
|
||||
}
|
||||
|
||||
return res.json()
|
||||
} */
|
||||
|
||||
const Statistics = async () => {
|
||||
// Vars
|
||||
const statsData = await getStatisticsData()
|
||||
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12, md: 8 }}>
|
||||
<StatisticsCard />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 4 }}>
|
||||
<Square data={statsData.statsSquare} />
|
||||
</Grid>
|
||||
<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 }}>
|
||||
<LineChartProfit />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4, lg: 2 }}>
|
||||
<BarChartSessionsWithNegativeValues />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4, lg: 2 }}>
|
||||
<RadialBarChart />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4, lg: 2 }}>
|
||||
<LineChartImpression />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<LogisticsStatisticsCard data={statsData?.statsHorizontalWithBorder} />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<UserListCards />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<Horizontal data={statsData.statsHorizontal} />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<CardStatsLineAreaCharts data={statsData.statsWithAreaChart} />
|
||||
</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, sm: 6, lg: 3 }}>
|
||||
<BarChartDailyTraffic />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, lg: 3 }}>
|
||||
<SubscribersOrders />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<HorizontalStatisticsCard data={statsData?.statsHorizontalWithAvatar} />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<CustomerStatisticsCard customerStatData={statsData?.customerStats} />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<Vertical data={statsData.statsVertical} />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<BarChartRevenueGrowth />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6, lg: 4 }}>
|
||||
<DonutChartGeneratedLeads />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default Statistics
|
||||
@@ -1,8 +0,0 @@
|
||||
// Component Imports
|
||||
import CheckoutWizard from '@views/pages/wizard-examples/checkout'
|
||||
|
||||
const CheckoutPage = () => {
|
||||
return <CheckoutWizard />
|
||||
}
|
||||
|
||||
export default CheckoutPage
|
||||
@@ -1,8 +0,0 @@
|
||||
// Component Imports
|
||||
import CreateDeal from '@views/pages/wizard-examples/create-deal'
|
||||
|
||||
const CreateDealPage = () => {
|
||||
return <CreateDeal />
|
||||
}
|
||||
|
||||
export default CreateDealPage
|
||||
@@ -1,8 +0,0 @@
|
||||
// Component Imports
|
||||
import PropertyListing from '@views/pages/wizard-examples/property-listing'
|
||||
|
||||
const PropertyListingPage = () => {
|
||||
return <PropertyListing />
|
||||
}
|
||||
|
||||
export default PropertyListingPage
|
||||
@@ -1,52 +0,0 @@
|
||||
// Next Imports
|
||||
import Link from 'next/link'
|
||||
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
import Typography from '@mui/material/Typography'
|
||||
|
||||
// Component imports
|
||||
import BasicDataTables from '@views/react-table/BasicDataTables'
|
||||
import EditableDataTables from '@views/react-table/EditableDataTables'
|
||||
import ColumnVisibility from '@views/react-table/ColumnVisibility'
|
||||
import RowSelection from '@views/react-table/RowSelection'
|
||||
import KitchenSink from '@views/react-table/KitchenSink'
|
||||
|
||||
const Tables = () => {
|
||||
return (
|
||||
<Grid container spacing={6}>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<Typography variant='h4'>React Table</Typography>
|
||||
<Typography>
|
||||
<code>@tanstack/react-table</code> is a third-party library. Please refer to its{' '}
|
||||
<Link
|
||||
href='https://tanstack.com/table'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
className='no-underline text-primary'
|
||||
>
|
||||
official documentation
|
||||
</Link>{' '}
|
||||
for more details.
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<BasicDataTables />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<EditableDataTables />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<ColumnVisibility />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<RowSelection />
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<KitchenSink />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
export default Tables
|
||||
@@ -1,8 +0,0 @@
|
||||
// Component Imports
|
||||
import Checkout from '@views/front-pages/CheckoutPage'
|
||||
|
||||
const CheckoutPage = () => {
|
||||
return <Checkout />
|
||||
}
|
||||
|
||||
export default CheckoutPage
|
||||
@@ -1,8 +0,0 @@
|
||||
// Component Imports
|
||||
import Questions from '@views/front-pages/help-center/Questions'
|
||||
|
||||
const Article = () => {
|
||||
return <Questions />
|
||||
}
|
||||
|
||||
export default Article
|
||||
@@ -1,8 +0,0 @@
|
||||
// Component Imports
|
||||
import HelpCenterWrapper from '@views/front-pages/help-center'
|
||||
|
||||
function HelpCenterPage() {
|
||||
return <HelpCenterWrapper />
|
||||
}
|
||||
|
||||
export default HelpCenterPage
|
||||
@@ -1,14 +0,0 @@
|
||||
// Component Imports
|
||||
import LandingPageWrapper from '@views/front-pages/landing-page'
|
||||
|
||||
// Server Action Imports
|
||||
import { getServerMode } from '@core/utils/serverHelpers'
|
||||
|
||||
const LandingPage = async () => {
|
||||
// Vars
|
||||
const mode = await getServerMode()
|
||||
|
||||
return <LandingPageWrapper mode={mode} />
|
||||
}
|
||||
|
||||
export default LandingPage
|
||||
@@ -1,65 +0,0 @@
|
||||
// MUI Imports
|
||||
import Button from '@mui/material/Button'
|
||||
import InitColorSchemeScript from '@mui/material/InitColorSchemeScript'
|
||||
|
||||
// Third-party Imports
|
||||
import 'react-perfect-scrollbar/dist/css/styles.css'
|
||||
|
||||
// Type Imports
|
||||
import type { ChildrenType } from '@core/types'
|
||||
|
||||
// Context Imports
|
||||
import { IntersectionProvider } from '@/contexts/intersectionContext'
|
||||
|
||||
// Component Imports
|
||||
import Providers from '@components/Providers'
|
||||
import BlankLayout from '@layouts/BlankLayout'
|
||||
import FrontLayout from '@components/layout/front-pages'
|
||||
import ScrollToTop from '@core/components/scroll-to-top'
|
||||
|
||||
// Util Imports
|
||||
import { getSystemMode } from '@core/utils/serverHelpers'
|
||||
|
||||
// Style Imports
|
||||
import '@/app/globals.css'
|
||||
|
||||
// Generated Icon CSS Imports
|
||||
import '@assets/iconify-icons/generated-icons.css'
|
||||
|
||||
export const metadata = {
|
||||
title: 'Vuexy - MUI Next.js Admin Dashboard Template',
|
||||
description:
|
||||
'Vuexy - MUI Next.js Admin Dashboard Template - is the most developer friendly & highly customizable Admin Dashboard Template based on MUI v5.'
|
||||
}
|
||||
|
||||
const Layout = async ({ children }: ChildrenType) => {
|
||||
// Vars
|
||||
const systemMode = await getSystemMode()
|
||||
|
||||
return (
|
||||
<html id='__next' suppressHydrationWarning>
|
||||
<body className='flex is-full min-bs-full flex-auto flex-col'>
|
||||
<InitColorSchemeScript attribute='data' defaultMode={systemMode} />
|
||||
<Providers direction='ltr'>
|
||||
<BlankLayout systemMode={systemMode}>
|
||||
<IntersectionProvider>
|
||||
<FrontLayout>
|
||||
{children}
|
||||
<ScrollToTop className='mui-fixed'>
|
||||
<Button
|
||||
variant='contained'
|
||||
className='is-10 bs-10 rounded-full p-0 min-is-0 flex items-center justify-center'
|
||||
>
|
||||
<i className='tabler-arrow-up' />
|
||||
</Button>
|
||||
</ScrollToTop>
|
||||
</FrontLayout>
|
||||
</IntersectionProvider>
|
||||
</BlankLayout>
|
||||
</Providers>
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
|
||||
export default Layout
|
||||
@@ -1,14 +0,0 @@
|
||||
// Component Imports
|
||||
import Payment from '@views/front-pages/Payment'
|
||||
|
||||
// Data Imports
|
||||
import { getPricingData } from '@/app/server/actions'
|
||||
|
||||
const PaymentPage = async () => {
|
||||
// Vars
|
||||
const data = await getPricingData()
|
||||
|
||||
return <Payment data={data} />
|
||||
}
|
||||
|
||||
export default PaymentPage
|
||||
@@ -1,14 +0,0 @@
|
||||
// Component Imports
|
||||
import PricingWrapper from '@/views/front-pages/pricing'
|
||||
|
||||
// Data Imports
|
||||
import { getPricingData } from '@/app/server/actions'
|
||||
|
||||
const PricingPage = async () => {
|
||||
// Vars
|
||||
const data = await getPricingData()
|
||||
|
||||
return <PricingWrapper data={data} />
|
||||
}
|
||||
|
||||
export default PricingPage
|
||||
@@ -1,58 +0,0 @@
|
||||
/**
|
||||
* ! The server actions below are used to fetch the static data from the fake-db. If you're using an ORM
|
||||
* ! (Object-Relational Mapping) or a database, you can swap the code below with your own database queries.
|
||||
*/
|
||||
|
||||
'use server'
|
||||
|
||||
// Data Imports
|
||||
import { db as eCommerceData } from '@/fake-db/apps/ecommerce'
|
||||
import { db as academyData } from '@/fake-db/apps/academy'
|
||||
import { db as vehicleData } from '@/fake-db/apps/logistics'
|
||||
import { db as invoiceData } from '@/fake-db/apps/invoice'
|
||||
import { db as userData } from '@/fake-db/apps/userList'
|
||||
import { db as permissionData } from '@/fake-db/apps/permissions'
|
||||
import { db as profileData } from '@/fake-db/pages/userProfile'
|
||||
import { db as faqData } from '@/fake-db/pages/faq'
|
||||
import { db as pricingData } from '@/fake-db/pages/pricing'
|
||||
import { db as statisticsData } from '@/fake-db/pages/widgetExamples'
|
||||
|
||||
export const getEcommerceData = async () => {
|
||||
return eCommerceData
|
||||
}
|
||||
|
||||
export const getAcademyData = async () => {
|
||||
return academyData
|
||||
}
|
||||
|
||||
export const getLogisticsData = async () => {
|
||||
return vehicleData
|
||||
}
|
||||
|
||||
export const getInvoiceData = async () => {
|
||||
return invoiceData
|
||||
}
|
||||
|
||||
export const getUserData = async () => {
|
||||
return userData
|
||||
}
|
||||
|
||||
export const getPermissionsData = async () => {
|
||||
return permissionData
|
||||
}
|
||||
|
||||
export const getProfileData = async () => {
|
||||
return profileData
|
||||
}
|
||||
|
||||
export const getFaqData = async () => {
|
||||
return faqData
|
||||
}
|
||||
|
||||
export const getPricingData = async () => {
|
||||
return pricingData
|
||||
}
|
||||
|
||||
export const getStatisticsData = async () => {
|
||||
return statisticsData
|
||||
}
|
||||
Reference in New Issue
Block a user