mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-23 00:00:31 +00:00
feat: add project billable entries link & alert.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
// @ts-nocheck
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import * as R from 'ramda';
|
||||
|
||||
import { ButtonLink } from '@/components';
|
||||
import withDialogActions from '@/containers/Dialog/withDialogActions';
|
||||
|
||||
function ProjectBillableEntriesLinkComponent({
|
||||
// #ownProps
|
||||
children,
|
||||
projectId,
|
||||
className,
|
||||
|
||||
// #withDialogAction
|
||||
openDialog,
|
||||
}) {
|
||||
const handleBillableEntries = (event) => {
|
||||
openDialog('project-billable-entries', { projectId });
|
||||
event.preventDefault();
|
||||
};
|
||||
|
||||
return (
|
||||
<BillableEntriesLink className={className} onClick={handleBillableEntries}>
|
||||
{children}
|
||||
</BillableEntriesLink>
|
||||
);
|
||||
}
|
||||
|
||||
export const ProjectBillableEntriesLink = R.compose(withDialogActions)(
|
||||
ProjectBillableEntriesLinkComponent,
|
||||
);
|
||||
|
||||
const BillableEntriesLink = styled(ButtonLink)`
|
||||
font-size: 11px;
|
||||
margin-top: 6px;
|
||||
`;
|
||||
@@ -1,9 +1,10 @@
|
||||
// @ts-nocheck
|
||||
export * from './ExpenseSelect';
|
||||
export * from './ChangeTypesSelect';
|
||||
export * from './TaskSelect';
|
||||
export * from './ProjectTaskSelect';
|
||||
export * from './ProjectTaskChargeTypeSelect';
|
||||
export * from './ProjectsSelect';
|
||||
export * from './ProjectMultiSelect'
|
||||
export * from './ProjectMultiSelect';
|
||||
export * from './FInputGroupComponent';
|
||||
export * from './ProjectSuggestField'
|
||||
export * from './ProjectBillableTypeSuggestField'
|
||||
export * from './ProjectSuggestField';
|
||||
export * from './ProjectBillableTypeSuggestField';
|
||||
export * from './ProjectBillableEntriesLink';
|
||||
|
||||
@@ -1,9 +1,24 @@
|
||||
// @ts-nocheck
|
||||
import React from 'react';
|
||||
import moment from 'moment';
|
||||
import { Callout, Intent, Classes } from '@blueprintjs/core';
|
||||
import { CLASSES } from '@/constants/classes';
|
||||
import { FormattedMessage as T } from '@/components';
|
||||
|
||||
export const getDefaultQuery = () => {
|
||||
return {
|
||||
billableType: '',
|
||||
to_date: moment(new Date()).format('YYYY-MM-DD'),
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Empty status callout.
|
||||
* @returns {React.JSX}
|
||||
*/
|
||||
export function EmptyStatuCallout() {
|
||||
return (
|
||||
<div className={Classes.DIALOG_BODY}>
|
||||
<Callout intent={Intent.PRIMARY}>
|
||||
<p>
|
||||
<T
|
||||
id={'project_billable_entries.alert.there_is_no_billable_entries'}
|
||||
/>
|
||||
</p>
|
||||
</Callout>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user