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>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user