diff --git a/src/frontend/components/ErrorDataTable.tsx b/src/frontend/components/ErrorDataTable.tsx index 34d7924..d543e93 100644 --- a/src/frontend/components/ErrorDataTable.tsx +++ b/src/frontend/components/ErrorDataTable.tsx @@ -15,6 +15,7 @@ import { } from '@mantine/core' import { useDisclosure } from '@mantine/hooks' import { useState } from 'react' +import { Link } from '@tanstack/react-router' import { TbMessageReport, TbHistory, TbExternalLink, TbBug } from 'react-icons/tb' const mockErrors = [ @@ -85,7 +86,7 @@ export function ErrorDataTable() { LATEST ERROR REPORTS - diff --git a/src/frontend/config/appMenus.ts b/src/frontend/config/appMenus.ts index ae77749..2af209b 100644 --- a/src/frontend/config/appMenus.ts +++ b/src/frontend/config/appMenus.ts @@ -1,5 +1,5 @@ import { IconType } from 'react-icons' -import { TbChartBar, TbHistory, TbAlertTriangle, TbSettings, TbShoppingCart, TbPackage, TbCreditCard } from 'react-icons/tb' +import { TbChartBar, TbHistory, TbAlertTriangle, TbSettings, TbShoppingCart, TbPackage, TbCreditCard, TbBuilding } from 'react-icons/tb' export interface MenuItem { value: string @@ -22,7 +22,7 @@ export const APP_CONFIGS: Record = { { value: 'overview', label: 'Overview', icon: TbChartBar, to: '/apps/desa-plus' }, { value: 'logs', label: 'Log Activity', icon: TbHistory, to: '/apps/desa-plus/logs' }, { value: 'errors', label: 'Error Reports', icon: TbAlertTriangle, to: '/apps/desa-plus/errors' }, - { value: 'manage', label: 'Manage', icon: TbSettings, to: '/apps/desa-plus/manage' }, + { value: 'villages', label: 'Villages', icon: TbBuilding, to: '/apps/desa-plus/villages' }, ], }, 'e-commerce': { diff --git a/src/frontend/routes/apps.$appId.index.tsx b/src/frontend/routes/apps.$appId.index.tsx index a206fd1..47f7525 100644 --- a/src/frontend/routes/apps.$appId.index.tsx +++ b/src/frontend/routes/apps.$appId.index.tsx @@ -1,36 +1,22 @@ +import { VillageActivityLineChart, VillageComparisonBarChart } from '@/frontend/components/DashboardCharts' +import { ErrorDataTable } from '@/frontend/components/ErrorDataTable' +import { SummaryCard } from '@/frontend/components/SummaryCard' import { - Badge, - Button, - Card, + ActionIcon, Group, SimpleGrid, Stack, Text, - Title, - Paper, - Box, - ThemeIcon, - Select, - ActionIcon, - Container, - Divider, + Title } from '@mantine/core' -import { createFileRoute, Link, useParams } from '@tanstack/react-router' -import { - TbUsers, - TbActivity, - TbRefresh, - TbAlertTriangle, - TbCalendar, - TbFilter, - TbChevronRight, - TbArrowUpRight, +import { createFileRoute, useParams } from '@tanstack/react-router' +import { + TbActivity, + TbAlertTriangle, TbBuildingCommunity, + TbRefresh, TbVersions } from 'react-icons/tb' -import { SummaryCard } from '@/frontend/components/SummaryCard' -import { VillageActivityLineChart, VillageComparisonBarChart } from '@/frontend/components/DashboardCharts' -import { ErrorDataTable } from '@/frontend/components/ErrorDataTable' export const Route = createFileRoute('/apps/$appId/')({ component: AppOverviewPage, @@ -43,66 +29,59 @@ function AppOverviewPage() { return ( {/* 🔝 HEADER SECTION */} - - - - Overview - - }> - APP: {isDesaPlus ? 'DESA+' : appId.toUpperCase()} - - LAST UPDATED: JUST NOW - - + {/* */} + + + Overview + Last updated: Just now + - - } radius="md" w={140} - /> - - - - - + */} - + + {/* */} {/* 📊 1. SUMMARY CARDS */} - - - - - + {appName} @@ -35,7 +36,9 @@ function AppDetailLayout() { - + + + diff --git a/src/frontend/routes/apps.$appId.manage.tsx b/src/frontend/routes/apps.$appId.villages.tsx similarity index 98% rename from src/frontend/routes/apps.$appId.manage.tsx rename to src/frontend/routes/apps.$appId.villages.tsx index 1dfb05c..ef065c6 100644 --- a/src/frontend/routes/apps.$appId.manage.tsx +++ b/src/frontend/routes/apps.$appId.villages.tsx @@ -34,8 +34,8 @@ import { } from 'react-icons/tb' import { StatsCard } from '@/frontend/components/StatsCard' -export const Route = createFileRoute('/apps/$appId/manage')({ - component: AppManagePage, +export const Route = createFileRoute('/apps/$appId/villages')({ + component: AppVillagesPage, }) const mockDevelopers = [ @@ -45,7 +45,7 @@ const mockDevelopers = [ { value: 'rahmat', label: 'Rahmat Hidayat', avatar: null }, ] -function AppManagePage() { +function AppVillagesPage() { const { appId } = useParams({ from: '/apps/$appId' }) const [initModalOpened, { open: openInit, close: closeInit }] = useDisclosure(false) const [assignModalOpened, { open: openAssign, close: closeAssign }] = useDisclosure(false)