202 lines
4.5 KiB
TypeScript
202 lines
4.5 KiB
TypeScript
/**
|
|
* Copyright since 2025 Mifos Initiative
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
/** Keyboard Shortcuts Button Configuration */
|
|
export class KeyboardShortcutsConfiguration {
|
|
buttonsArray: {
|
|
title: string;
|
|
ctrlKey: boolean;
|
|
shiftKey: boolean;
|
|
altKey: boolean;
|
|
key: string;
|
|
route: string;
|
|
id?: string;
|
|
}[];
|
|
|
|
constructor() {
|
|
this.makeCombination();
|
|
}
|
|
|
|
makeCombination() {
|
|
this.buttonsArray = [
|
|
// Navigation Page - ctrl + n
|
|
{
|
|
title: 'Navigation Page',
|
|
ctrlKey: true,
|
|
shiftKey: false,
|
|
altKey: false,
|
|
key: 'n',
|
|
route: 'navigation',
|
|
id: 'navigation_page'
|
|
},
|
|
// Run Report - ctrl + t
|
|
{
|
|
title: 'Run Report',
|
|
ctrlKey: true,
|
|
shiftKey: false,
|
|
altKey: false,
|
|
key: 't',
|
|
route: '',
|
|
id: 'runReport'
|
|
},
|
|
// Checker Inbox & Pending Tasks - ctrl + i
|
|
{
|
|
title: 'Checker Inbox & Pending Tasks',
|
|
ctrlKey: true,
|
|
shiftKey: false,
|
|
altKey: false,
|
|
key: 'i',
|
|
route: 'checker-inbox-and-tasks/checker-inbox',
|
|
id: 'checker_inbox'
|
|
},
|
|
// Create Client - ctrl + c
|
|
{
|
|
title: 'Create Client',
|
|
ctrlKey: false,
|
|
shiftKey: false,
|
|
altKey: true,
|
|
key: 'c',
|
|
route: 'clients/create',
|
|
id: 'create_client'
|
|
},
|
|
// Create Group - ctrl + g
|
|
{
|
|
title: 'Create Group',
|
|
ctrlKey: true,
|
|
shiftKey: false,
|
|
altKey: false,
|
|
key: 'g',
|
|
route: 'groups/create',
|
|
id: 'create_group'
|
|
},
|
|
// Create Center - ctrl + q
|
|
{
|
|
title: 'Create Center',
|
|
ctrlKey: true,
|
|
shiftKey: false,
|
|
altKey: false,
|
|
key: 'q',
|
|
route: 'centers/create',
|
|
id: 'create_center'
|
|
},
|
|
// Frequent Posting - ctrl + f
|
|
{
|
|
title: 'Frequent Posting',
|
|
ctrlKey: true,
|
|
shiftKey: false,
|
|
altKey: false,
|
|
key: 'f',
|
|
route: 'accounting/journal-entries/frequent-postings',
|
|
id: 'frequent_posting'
|
|
},
|
|
// Closure Entries - ctrl + e
|
|
{
|
|
title: 'Closure Entries',
|
|
ctrlKey: true,
|
|
shiftKey: false,
|
|
altKey: false,
|
|
key: 'e',
|
|
route: 'accounting/closing-entries',
|
|
id: 'closure_entries'
|
|
},
|
|
// Journal Entry - ctrl + j
|
|
{
|
|
title: 'Journal Entry',
|
|
ctrlKey: true,
|
|
shiftKey: false,
|
|
altKey: false,
|
|
key: 'j',
|
|
route: 'accounting/journal-entries/create',
|
|
id: 'journal_entry'
|
|
},
|
|
// Reports - ctrl + r
|
|
{
|
|
title: 'Reports',
|
|
ctrlKey: true,
|
|
shiftKey: false,
|
|
altKey: false,
|
|
key: 'r',
|
|
route: 'reports',
|
|
id: 'reports_page'
|
|
},
|
|
// Accounting - ctrl + a
|
|
{
|
|
title: 'Accounting',
|
|
ctrlKey: false,
|
|
shiftKey: false,
|
|
altKey: true,
|
|
key: 'a',
|
|
route: 'accounting',
|
|
id: 'accounting_page'
|
|
},
|
|
// Save/Submit Forms - ctrl + s
|
|
{
|
|
title: 'Save/Submit Forms',
|
|
ctrlKey: false,
|
|
shiftKey: false,
|
|
altKey: true,
|
|
key: 's',
|
|
route: '',
|
|
id: 'submit'
|
|
},
|
|
// Cancel - ctrl + x
|
|
{
|
|
title: 'Cancel',
|
|
ctrlKey: false,
|
|
shiftKey: false,
|
|
altKey: true,
|
|
key: 'x',
|
|
route: '',
|
|
id: 'cancel'
|
|
},
|
|
// Help - ctrl + h
|
|
{
|
|
title: 'Help',
|
|
ctrlKey: false,
|
|
shiftKey: false,
|
|
altKey: true,
|
|
key: 'h',
|
|
route: '',
|
|
id: 'help'
|
|
},
|
|
// Pagination: Next - ctrl + n
|
|
// {
|
|
// title: 'Pagination: Next'
|
|
// ctrlKey: true,
|
|
// shiftKey: false,
|
|
// altKey: true,
|
|
// key: 'n,
|
|
// route: ''
|
|
// },
|
|
// Pagination: Previous - ctrl + p
|
|
// {
|
|
// title: 'Pagination: Previous'
|
|
// ctrlKey: true,
|
|
// shiftKey: false,
|
|
// altKey: true,
|
|
// key: 'p,
|
|
// route: ''
|
|
// },
|
|
// Logout - ctrl + l
|
|
{
|
|
title: 'Logout',
|
|
ctrlKey: true,
|
|
shiftKey: false,
|
|
altKey: false,
|
|
key: 'l',
|
|
route: '',
|
|
id: 'logout'
|
|
}
|
|
];
|
|
}
|
|
|
|
get buttonCombinations() {
|
|
return this.buttonsArray;
|
|
}
|
|
}
|