diff --git a/src/app/[lang]/(dashboard)/(private)/apps/report/page.tsx b/src/app/[lang]/(dashboard)/(private)/apps/report/page.tsx new file mode 100644 index 0000000..c6c2230 --- /dev/null +++ b/src/app/[lang]/(dashboard)/(private)/apps/report/page.tsx @@ -0,0 +1,7 @@ +import ReportList from '@/views/apps/report' + +const ReportPage = () => { + return +} + +export default ReportPage diff --git a/src/components/layout/vertical/VerticalMenu.tsx b/src/components/layout/vertical/VerticalMenu.tsx index 3c71659..00e3a3d 100644 --- a/src/components/layout/vertical/VerticalMenu.tsx +++ b/src/components/layout/vertical/VerticalMenu.tsx @@ -145,6 +145,14 @@ const VerticalMenu = ({ dictionary, scrollMenu }: Props) => { > {dictionary['navigation'].fixed_assets} + } + exactMatch={false} + activeUrl='/apps/report' + > + {dictionary['navigation'].reports} + }> {dictionary['navigation'].list} diff --git a/src/views/apps/report/ReportCard.tsx b/src/views/apps/report/ReportCard.tsx new file mode 100644 index 0000000..77e5e68 --- /dev/null +++ b/src/views/apps/report/ReportCard.tsx @@ -0,0 +1,87 @@ +import React from 'react' +import { Card, CardContent, Typography } from '@mui/material' +import Link from 'next/link' +import CustomAvatar, { CustomAvatarProps } from '@/@core/components/mui/Avatar' +import { ThemeColor } from '@/@core/types' + +interface ReportCardProps { + title: string + avatarIcon: string + href?: string + target?: '_blank' | '_self' | '_parent' | '_top' + avatarColor?: ThemeColor + avatarVariant?: CustomAvatarProps['variant'] + avatarSkin?: CustomAvatarProps['skin'] + avatarSize?: number +} + +const ReportCard = (props: ReportCardProps) => { + const { title, avatarIcon, href, target = '_self', avatarColor, avatarVariant, avatarSkin, avatarSize } = props + + const CardComponent = ( + + + + + +
+ + {title} + +
+
+
+ ) + + // If href is provided, wrap with Link + if (href) { + // Check if it's an external link + const isExternal = href.startsWith('http') || href.startsWith('mailto:') || href.startsWith('tel:') + + if (isExternal) { + return ( + + {CardComponent} + + ) + } + + // Internal link using Next.js Link + return ( + + {CardComponent} + + ) + } + + // No link, return card as is + return CardComponent +} + +export default ReportCard diff --git a/src/views/apps/report/ReportFinancialList.tsx b/src/views/apps/report/ReportFinancialList.tsx new file mode 100644 index 0000000..1dd7385 --- /dev/null +++ b/src/views/apps/report/ReportFinancialList.tsx @@ -0,0 +1,38 @@ +import { Container, Typography } from '@mui/material' +import Grid from '@mui/material/Grid2' +import ReportCard from './ReportCard' + +const ReportFinancialList: React.FC = () => { + const financialReports = [ + { + title: 'Arus Kas', + iconClass: 'tabler-cash' + }, + { + title: 'Laba Rugi', + iconClass: 'tabler-cash' + }, + { + title: 'Neraca', + iconClass: 'tabler-cash' + } + ] + + return ( +
+ + Finansial + + + + {financialReports.map((report, index) => ( + + + + ))} + +
+ ) +} + +export default ReportFinancialList diff --git a/src/views/apps/report/ReportHeader.tsx b/src/views/apps/report/ReportHeader.tsx new file mode 100644 index 0000000..005428e --- /dev/null +++ b/src/views/apps/report/ReportHeader.tsx @@ -0,0 +1,19 @@ +'use client' + +// MUI Imports +import Button from '@mui/material/Button' +import Typography from '@mui/material/Typography' + +const ReportHeader = () => { + return ( +
+
+ + Laporan + +
+
+ ) +} + +export default ReportHeader diff --git a/src/views/apps/report/index.tsx b/src/views/apps/report/index.tsx new file mode 100644 index 0000000..d99eebc --- /dev/null +++ b/src/views/apps/report/index.tsx @@ -0,0 +1,18 @@ +import Grid from '@mui/material/Grid2' +import ReportHeader from './ReportHeader' +import ReportFinancialList from './ReportFinancialList' + +const ReportList = () => { + return ( + + + + + + + + + ) +} + +export default ReportList