feat: implement bulk action framework, expand data table component, and update enterprise module configuration.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user