feat: add time entry form.

This commit is contained in:
elforjani13
2022-06-15 16:08:50 +02:00
parent f443a1b106
commit 9cf1b993dd
15 changed files with 514 additions and 2 deletions

View File

@@ -14,6 +14,7 @@ import {
} from 'components';
import withSettings from '../../../Settings/withSettings';
import withSettingsActions from '../../../Settings/withSettingsActions';
import withDialogActions from 'containers/Dialog/withDialogActions';
import { compose } from 'utils';
@@ -22,6 +23,9 @@ import { compose } from 'utils';
* @returns
*/
function ProjectDetailActionsBar({
// #withDialogActions
openDialog,
// #withSettings
timesheetsTableSize,
@@ -36,6 +40,10 @@ function ProjectDetailActionsBar({
addSetting('timesheets', 'tableSize', size);
};
const handleTimeEntryBtnClick = () => {
openDialog('time-entry-form');
};
// Handle the refresh button click.
const handleRefreshBtnClick = () => {};
@@ -51,7 +59,7 @@ function ProjectDetailActionsBar({
<Button
className={Classes.MINIMAL}
text={<T id={'projcet_details.action.log_time'} />}
// onClick={}
onClick={handleTimeEntryBtnClick}
/>
<Button
className={Classes.MINIMAL}
@@ -94,6 +102,7 @@ function ProjectDetailActionsBar({
);
}
export default compose(
withDialogActions,
withSettingsActions,
withSettings(({ timesheetsSettings }) => ({
timesheetsTableSize: timesheetsSettings?.tableSize,