feat: implement bulk action framework, expand data table component, and update enterprise module configuration.

This commit is contained in:
Firman Ramdhani
2026-07-20 17:03:25 +07:00
parent 7cec05464a
commit a761ba05c9
5 changed files with 34 additions and 24 deletions
+19 -17
View File
@@ -1,7 +1,7 @@
import { lazy, Suspense, useEffect, useState } from 'react';
import { BrowserRouter, Navigate, Route, Routes } from 'react-router-dom';
import { ThemeProvider, DensityType } from '@repo/ui/provider';
import { NotFound, Forbidden, Maintenance, ComingSoon } from '@repo/ui/components';
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';
@@ -23,22 +23,24 @@ export default function App() {
return (
<ThemeProvider colorScheme={colorScheme} density={density}>
<BrowserRouter>
<Suspense fallback={<LoadingScreen />}>
<Routes>
<Route path="/auth/*" element={<AuthModule />} />
<Route path="/app/*" element={<AppModule />} />
<Route path="/showcase" element={<ShowcaseView density={density} setDensity={setDensity} />} />
<Route path="/shell-demo" element={<ShellDemo />} />
<Route path="/404" element={<NotFound homeUrl="/app" />} />
<Route path="/403" element={<Forbidden homeUrl="/app" />} />
<Route path="/maintenance" element={<Maintenance />} />
<Route path="/coming-soon" element={<ComingSoon />} />
<Route path="/" element={<Navigate to="/showcase" />} />
<Route path="*" element={<Navigate to="/404" />} />
</Routes>
</Suspense>
</BrowserRouter>
<AgGridProvider bypassLicense>
<BrowserRouter>
<Suspense fallback={<LoadingScreen />}>
<Routes>
<Route path="/auth/*" element={<AuthModule />} />
<Route path="/app/*" element={<AppModule />} />
<Route path="/showcase" element={<ShowcaseView density={density} setDensity={setDensity} />} />
<Route path="/shell-demo" element={<ShellDemo />} />
<Route path="/404" element={<NotFound homeUrl="/app" />} />
<Route path="/403" element={<Forbidden homeUrl="/app" />} />
<Route path="/maintenance" element={<Maintenance />} />
<Route path="/coming-soon" element={<ComingSoon />} />
<Route path="/" element={<Navigate to="/showcase" />} />
<Route path="*" element={<Navigate to="/404" />} />
</Routes>
</Suspense>
</BrowserRouter>
</AgGridProvider>
</ThemeProvider>
);
}
@@ -39,6 +39,7 @@
"expandAll": "Expand all menu",
"collapseAll": "Collapse all menu",
"searchMenu": "Search menu",
"searchData": "Search data",
"collapse": "Collapse",
"expandSidebar": "Expand Sidebar",
"actions": {
@@ -55,7 +56,9 @@
"rollback": "Rollback",
"hold": "Hold",
"back": "Back",
"reload": "Reload"
"reload": "Reload",
"filter": "Filter",
"setting": "Setting"
},
"confirmDialog": {
"delete": {
@@ -39,6 +39,7 @@
"expandAll": "Buka semua menu",
"collapseAll": "Tutup semua menu",
"searchMenu": "Cari menu",
"searchData": "Cari data",
"collapse": "Tutup",
"expandSidebar": "Perluas Sidebar",
"actions": {
@@ -55,7 +56,9 @@
"rollback": "Rollback",
"hold": "Hold",
"back": "Kembali",
"reload": "Muat Ulang"
"reload": "Muat Ulang",
"filter": "Filter",
"setting": "Pengaturan"
},
"confirmDialog": {
"delete": {
@@ -46,7 +46,7 @@ export const PageActions = memo(function PageActions({ actions = [], customButto
const ButtonWithDropdown = (
<Button
variant={action.variant || 'transparent'}
color={getIntentColor(action.intent)}
color={action?.color ? action.color : getIntentColor(action.intent)}
leftSection={action.icon}
rightSection={<ChevronDown size={14} />}
disabled={action.disabled}
@@ -78,7 +78,7 @@ export const PageActions = memo(function PageActions({ actions = [], customButto
<Menu.Item
key={child.key}
leftSection={child.icon}
color={getIntentColor(child.intent)}
color={action?.color ? action.color : getIntentColor(child.intent)}
disabled={child.disabled}
onClick={() => child.onClick?.(child.key || '')}
>
@@ -95,7 +95,7 @@ export const PageActions = memo(function PageActions({ actions = [], customButto
const StandaloneButton = (
<Button
variant={action.variant || 'transparent'}
color={getIntentColor(action.intent)}
color={action?.color ? action.color : getIntentColor(action.intent)}
leftSection={action.icon}
disabled={action.disabled}
onClick={() => action.onClick?.(action.key || '')}
@@ -142,7 +142,7 @@ export const PageActions = memo(function PageActions({ actions = [], customButto
<Menu.Item
key={child.key}
leftSection={child.icon}
color={getIntentColor(child.intent)}
color={action?.color ? action.color : getIntentColor(child.intent)}
disabled={child.disabled}
onClick={() => child.onClick?.(child.key || '')}
style={{ paddingLeft: '1.5rem' }}
@@ -157,7 +157,7 @@ export const PageActions = memo(function PageActions({ actions = [], customButto
);
}
const color = getIntentColor(action.intent);
const color = action?.color ? action.color : getIntentColor(action.intent);
const realColor = color === undefined ? 'brand' : color;
return (
@@ -23,6 +23,8 @@ export interface BaseAction {
/** Semantic context to determine visual emphasis (color mapping). */
intent?: ActionIntent;
color?: string;
/** Callback triggered upon action execution. */
onClick?: (key: string) => void;
}