44 lines
1.2 KiB
TypeScript
44 lines
1.2 KiB
TypeScript
/**
|
|
* Central Configuration for Keyboard Shortcuts
|
|
*
|
|
* Standards:
|
|
* - Alt + Key: Global Navigation (Route switching)
|
|
* - Ctrl + Key: Local Actions (Context specific)
|
|
*/
|
|
|
|
export const GLOBAL_NAV = {
|
|
// Goods
|
|
'g': '/dashboard/goods/parts',
|
|
'c': '/dashboard/goods/fixed-asset-classes',
|
|
|
|
//Pediments
|
|
'p': '/dashboard/pedimentos',
|
|
't': '/dashboard/reference_data/pedimento_codes',
|
|
'm': '/dashboard/reference_data/payment_methods',
|
|
'r': '/dashboard/reference_data/pedimento_regimens',
|
|
'e': '/dashboard/reference_data/customs_sections#',
|
|
'd': '/dashboard/reference_data/customs_sections',
|
|
|
|
// Customs & Brokers
|
|
'a': '/dashboard/customs_brokers',
|
|
|
|
// Invoices
|
|
'i': '/dashboard/invoices',
|
|
|
|
// Common Actions
|
|
'b': 'SEARCH_FOCUS', // Special case for generic focus
|
|
'h': '/', // Home
|
|
} as const;
|
|
|
|
export const STANDARD_ACTIONS = {
|
|
's': 'SAVE',
|
|
'n': 'NEW',
|
|
'e': 'EXPORT',
|
|
'd': 'DELETE',
|
|
'f': 'FILTER',
|
|
'Escape': 'CANCEL' // Special case
|
|
} as const;
|
|
|
|
export type GlobalNavKey = keyof typeof GLOBAL_NAV;
|
|
export type ActionKey = keyof typeof STANDARD_ACTIONS;
|