diff --git a/apps/web/package.json b/apps/web/package.json index bb1468b..fc8add5 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -31,7 +31,8 @@ "react-i18next": "^15.4.0", "react-router-dom": "^7.11.0", "tailwindcss": "^4.1.18", - "zod": "^3.25.36" + "zod": "^3.25.36", + "zustand": "^5.0.14" }, "devDependencies": { "@repo/eslint-config": "workspace:*", diff --git a/apps/web/src/apps/index.tsx b/apps/web/src/apps/index.tsx index 5d6914d..9c10be8 100644 --- a/apps/web/src/apps/index.tsx +++ b/apps/web/src/apps/index.tsx @@ -1,8 +1,9 @@ import { lazy, Suspense, useState } from 'react'; import { BrowserRouter, Navigate, Route, Routes } from 'react-router-dom'; -import { ThemeProvider, ColorSchemeType, DensityType } from '@repo/ui/provider'; +import { ThemeProvider, DensityType } from '@repo/ui/provider'; import { NotFound, Forbidden, Maintenance, ComingSoon } from '@repo/ui/components'; import { LoadingScreen } from '../core/components/loading-screen'; +import { useThemeStore } from '../core/store/theme.store'; const AuthModule = lazy(() => import('./auth')); const AppModule = lazy(() => import('./modules')); @@ -10,7 +11,7 @@ const ShowcaseView = lazy(() => import('./showcase/showcase-view')); const ShellDemo = lazy(() => import('./showcase/shell-demo')); export default function App() { - const [colorScheme, setColorScheme] = useState('light'); + const colorScheme = useThemeStore((s) => s.colorScheme); const [density, setDensity] = useState('compact'); return ( @@ -20,20 +21,10 @@ export default function App() { } /> } /> - - } - /> + } /> } /> - } /> - } /> + } /> + } /> } /> } /> } /> diff --git a/apps/web/src/apps/modules/example/full-page/presentation/locales/en/full-page.json b/apps/web/src/apps/modules/example/full-page/presentation/locales/en/full-page.json index fe973f1..159078d 100644 --- a/apps/web/src/apps/modules/example/full-page/presentation/locales/en/full-page.json +++ b/apps/web/src/apps/modules/example/full-page/presentation/locales/en/full-page.json @@ -1,5 +1,6 @@ { - "title": "Full Page Management", + "title": "Full Page", + "description": "An example module of a <1>full page layout for detailed forms.", "fields": { "status": "Status", "name": "Name", diff --git a/apps/web/src/apps/modules/example/full-page/presentation/locales/id/full-page.json b/apps/web/src/apps/modules/example/full-page/presentation/locales/id/full-page.json index 0d7d6ac..7912506 100644 --- a/apps/web/src/apps/modules/example/full-page/presentation/locales/id/full-page.json +++ b/apps/web/src/apps/modules/example/full-page/presentation/locales/id/full-page.json @@ -1,5 +1,6 @@ { - "title": "Manajemen Halaman Penuh", + "title": "Halaman Penuh", + "description": "Contoh modul <1>tata letak halaman penuh untuk formulir detail.", "fields": { "status": "Status", "name": "Nama", diff --git a/apps/web/src/apps/modules/example/full-page/presentation/pages-backup/full-page.page.detail.tsx b/apps/web/src/apps/modules/example/full-page/presentation/pages-backup/full-page.page.detail.tsx new file mode 100644 index 0000000..c29969d --- /dev/null +++ b/apps/web/src/apps/modules/example/full-page/presentation/pages-backup/full-page.page.detail.tsx @@ -0,0 +1,131 @@ +import { Paper, SimpleGrid, Box, Text, Group, Badge, Divider, Breadcrumbs, Anchor, Flex, Title, ActionIcon, Button } from '@repo/ui/components'; +import { useEnterpriseModuleTranslationContext } from '@repo/ui/foundations'; +import { ChevronRight, CheckCircle2, Trash2, Edit2, Play } from 'lucide-react'; + +export default function FullPagePageDetail() { + const { t } = useEnterpriseModuleTranslationContext(); + + return ( + + {/* --- INLINED PAGE HEADER --- */} + + } + > + + Acme Corp + + + Infrastructure + + + Database Clusters + + + prod-db-01 + + + + + + + + + prod-db-01 + + } + style={{ textTransform: 'capitalize' }} + > + Running + + + + + PostgreSQL v15.4 · us-east-1 · Created Oct 12, 2023 + + + + + + + + + + + + + + + + {/* --- END INLINED PAGE HEADER --- */} + + + + General Information + + + View the complete details and configuration for this entity. + + + + + + + + {t('fields.code')} + + WID-001 + + + + {t('fields.name')} + + Dashboard Widget + + + + {t('fields.status')} + + + ACTIVE + + + + + {t('fields.description')} + + Main dashboard widget + + + + + ); +} diff --git a/apps/web/src/apps/modules/example/full-page/presentation/pages-backup/full-page.page.form.tsx b/apps/web/src/apps/modules/example/full-page/presentation/pages-backup/full-page.page.form.tsx new file mode 100644 index 0000000..fd05951 --- /dev/null +++ b/apps/web/src/apps/modules/example/full-page/presentation/pages-backup/full-page.page.form.tsx @@ -0,0 +1,110 @@ +import { Paper, Box, Text, Divider, TextInput, Select, Textarea, Stack, Breadcrumbs, Anchor, Flex, Title, Button, Group } from '@repo/ui/components'; +import { useEnterpriseModuleTranslationContext } from '@repo/ui/foundations'; +import { ChevronRight, Database } from 'lucide-react'; + +export default function FullPagePageForm({ formPageType }: { formPageType: 'edit' | 'create' | 'duplicate' }) { + const { t } = useEnterpriseModuleTranslationContext(); + + return ( + + {/* --- INLINED PAGE HEADER --- */} + + } + > + + Database Clusters + + + {formPageType === 'create' ? 'Create Cluster' : 'Edit Cluster'} + + + + + + + + {formPageType === 'create' ? 'Create New Cluster' : 'Edit Cluster Configuration'} + + + Configure and provision a new highly available database cluster. + + + + + + + + + + + + + {/* --- END INLINED PAGE HEADER --- */} + + + + {formPageType === 'create' ? 'Create Entity' : 'Edit Entity'} + + + Fill in the required information to configure your entity properly. Fields marked with * are required. + + + + + + + + +