refactor: migrate and reorganize frontend module structures across web applications
This commit is contained in:
@@ -4,10 +4,10 @@ import { ThemeProvider } from '@repo/ui/provider';
|
||||
import { NotFound, Forbidden, Maintenance, ComingSoon, AgGridProvider } from '@repo/ui/components';
|
||||
import { LoadingScreen } from '../core/components/loading-screen';
|
||||
import { useThemeStore } from '../core/stores/theme.store';
|
||||
import { initializeAndPurgeHistoryBackground } from './modules/layouts/hooks/useHistoryTracker';
|
||||
import { initializeAndPurgeHistoryBackground } from './main/layouts/hooks/useHistoryTracker';
|
||||
|
||||
const AuthModule = lazy(() => import('./auth'));
|
||||
const AppModule = lazy(() => import('./modules'));
|
||||
const AppModule = lazy(() => import('./main'));
|
||||
|
||||
const router = createBrowserRouter([
|
||||
{ path: '/auth/*', element: <AuthModule /> },
|
||||
|
||||
@@ -2,10 +2,10 @@ import { lazy } from 'react';
|
||||
import { Navigate, Route, Routes } from 'react-router-dom';
|
||||
import ModuleLayout from './layouts/module.layout';
|
||||
|
||||
const ExampleModule = lazy(() => import('./example'));
|
||||
const SystemSetting = lazy(() => import('./system/setting'));
|
||||
const SystemInformation = lazy(() => import('./system/information'));
|
||||
const SystemNotification = lazy(() => import('./system/notification'));
|
||||
const ExampleModule = lazy(() => import('./modules/example'));
|
||||
const SystemSetting = lazy(() => import('./modules/system/setting'));
|
||||
const SystemInformation = lazy(() => import('./modules/system/information'));
|
||||
const SystemNotification = lazy(() => import('./modules/system/notification'));
|
||||
|
||||
export default function AppModule() {
|
||||
return (
|
||||
+1
-2
@@ -20,8 +20,7 @@ import { Link } from 'react-router-dom';
|
||||
import dayjs from 'dayjs';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
import type { SavedPageItem } from '../../types/saved-page.types';
|
||||
import type { SystemSettings } from '../../../system/setting/types/setting.types';
|
||||
import { DEFAULT_SYSTEM_SETTINGS } from '../../../system/setting/types/setting.types';
|
||||
import { SystemSettings, DEFAULT_SYSTEM_SETTINGS } from '../../../modules/system/setting/types/setting.types';
|
||||
|
||||
// Setup relative time formatting
|
||||
dayjs.extend(relativeTime);
|
||||
+1
-2
@@ -2,8 +2,7 @@ import { useEffect } from 'react';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
import { appDatabase, AppDatabaseKey } from '../../../../core/storage/local';
|
||||
import type { SavedPageItem } from '../types/saved-page.types';
|
||||
import type { SystemSettings } from '../../system/setting/types/setting.types';
|
||||
import { DEFAULT_SYSTEM_SETTINGS } from '../../system/setting/types/setting.types';
|
||||
import { SystemSettings, DEFAULT_SYSTEM_SETTINGS } from '../../modules/system/setting/types/setting.types';
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 1. In-Memory Cache & Broadcast Channel
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
* within the module share the same API client, configuration, and transformation logic.
|
||||
*/
|
||||
|
||||
import { apiClient } from '../../../../../../core/lib/api-client';
|
||||
import { apiClient } from '../../../../../../../core/lib/api-client';
|
||||
import { FullPageRemoteDataServices } from '../../data/full-page.remote.service';
|
||||
import { fullPageModuleConfig } from '../constants/full-page.constants';
|
||||
import { FullPageRemoteDataTransformer } from '../transformers/full-page.remote.transformer';
|
||||
+1
-1
@@ -5,9 +5,9 @@ import { useForm } from 'react-hook-form';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { z } from 'zod';
|
||||
import { FieldNumberInput, FieldSelect } from '@repo/ui/form';
|
||||
import { appDatabase, AppDatabaseKey } from '../../../../../core/storage/local';
|
||||
import type { SystemSettings, RetentionUnit } from '../types/setting.types';
|
||||
import { DEFAULT_SYSTEM_SETTINGS } from '../types/setting.types';
|
||||
import { appDatabase, AppDatabaseKey } from '../../../../../../core/storage/local';
|
||||
|
||||
const historySchema = z.object({
|
||||
historyRetentionValue: z.coerce.number().min(1, { message: 'Must be at least 1' }),
|
||||
Reference in New Issue
Block a user