refactoring: rename receivable & payables.

This commit is contained in:
elforjani3
2021-02-25 15:41:14 +02:00
parent ef13d018e5
commit 0842473bf4
2 changed files with 15 additions and 3 deletions

View File

@@ -13,7 +13,10 @@ import { FormattedMessage as T } from 'react-intl';
import { firstLettersArgs } from 'utils'; import { firstLettersArgs } from 'utils';
import { useAuthActions, useAuthUser } from 'hooks/state'; import { useAuthActions, useAuthUser } from 'hooks/state';
export default function DashboardTopbarUser() { import withDialogActions from 'containers/Dialog/withDialogActions';
import { compose } from 'utils';
function DashboardTopbarUser({ openDialog }) {
const history = useHistory(); const history = useHistory();
const { setLogout } = useAuthActions(); const { setLogout } = useAuthActions();
const user = useAuthUser(); const user = useAuthUser();
@@ -22,6 +25,10 @@ export default function DashboardTopbarUser() {
setLogout(); setLogout();
}; };
const onKeyboardShortcut = () => {
openDialog('keyboard-shortcuts');
};
return ( return (
<Popover <Popover
content={ content={
@@ -41,6 +48,10 @@ export default function DashboardTopbarUser() {
} }
/> />
<MenuDivider /> <MenuDivider />
<MenuItem
text={<T id={'keyboard_shortcuts'} />}
onClick={onKeyboardShortcut}
/>
<MenuItem <MenuItem
text={<T id={'preferences'} />} text={<T id={'preferences'} />}
onClick={() => history.push('/preferences')} onClick={() => history.push('/preferences')}
@@ -58,3 +69,4 @@ export default function DashboardTopbarUser() {
</Popover> </Popover>
); );
} }
export default compose(withDialogActions)(DashboardTopbarUser);

View File

@@ -161,11 +161,11 @@ export default [
href: '/financial-reports/profit-loss-sheet', href: '/financial-reports/profit-loss-sheet',
}, },
{ {
text: <T id={'receivable_aging_summary'} />, text: <T id={'receivable_a_r'} />,
href: '/financial-reports/receivable-aging-summary', href: '/financial-reports/receivable-aging-summary',
}, },
{ {
text: <T id={'payable_aging_summary'} />, text: <T id={'payable_a_p'} />,
href: '/financial-reports/payable-aging-summary', href: '/financial-reports/payable-aging-summary',
}, },
], ],