mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
fix: rename project & task form dialog.
This commit is contained in:
@@ -40,8 +40,8 @@ import BranchActivateDialog from '../containers/Dialogs/BranchActivateDialog';
|
|||||||
import WarehouseActivateDialog from '../containers/Dialogs/WarehouseActivateDialog';
|
import WarehouseActivateDialog from '../containers/Dialogs/WarehouseActivateDialog';
|
||||||
import CustomerOpeningBalanceDialog from '../containers/Dialogs/CustomerOpeningBalanceDialog';
|
import CustomerOpeningBalanceDialog from '../containers/Dialogs/CustomerOpeningBalanceDialog';
|
||||||
import VendorOpeningBalanceDialog from '../containers/Dialogs/VendorOpeningBalanceDialog';
|
import VendorOpeningBalanceDialog from '../containers/Dialogs/VendorOpeningBalanceDialog';
|
||||||
import ProjectDialog from '../containers/Dialogs/ProjectDialog';
|
import ProjectFormDialog from '../containers/Projects/containers/ProjectFormDialog';
|
||||||
import TaskDialog from '../containers/Dialogs/TaskDialog';
|
import TaskFormDialog from '../containers/Projects/containers/TaskFormDialog';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dialogs container.
|
* Dialogs container.
|
||||||
@@ -92,8 +92,8 @@ export default function DialogsContainer() {
|
|||||||
<WarehouseActivateDialog dialogName={'warehouse-activate'} />
|
<WarehouseActivateDialog dialogName={'warehouse-activate'} />
|
||||||
<CustomerOpeningBalanceDialog dialogName={'customer-opening-balance'} />
|
<CustomerOpeningBalanceDialog dialogName={'customer-opening-balance'} />
|
||||||
<VendorOpeningBalanceDialog dialogName={'vendor-opening-balance'} />
|
<VendorOpeningBalanceDialog dialogName={'vendor-opening-balance'} />
|
||||||
<ProjectDialog dialogName={'project-form'} />
|
<ProjectFormDialog dialogName={'project-form'} />
|
||||||
<TaskDialog dialogName={'task-form'} />
|
<TaskFormDialog dialogName={'task-form'} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import { ProjectFormProvider } from './ProjectFormProvider';
|
|||||||
import ProjectForm from './ProjectForm';
|
import ProjectForm from './ProjectForm';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Project dialog content.
|
* Project form dialog content.
|
||||||
* @returns {ReactNode}
|
* @returns {ReactNode}
|
||||||
*/
|
*/
|
||||||
export default function ProjectDialogContent({
|
export default function ProjectFormDialogContent({
|
||||||
// #ownProps
|
// #ownProps
|
||||||
dialogName,
|
dialogName,
|
||||||
project,
|
project,
|
||||||
@@ -5,16 +5,16 @@ import withDialogRedux from 'components/DialogReduxConnect';
|
|||||||
import { compose } from 'utils';
|
import { compose } from 'utils';
|
||||||
|
|
||||||
const ProjectDialogContent = React.lazy(
|
const ProjectDialogContent = React.lazy(
|
||||||
() => import('./containers/ProjectDialogContent'),
|
() => import('./containers/ProjectFormDialogContent'),
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Project dialog.
|
* Project form dialog.
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
function ProjectDialog({ dialogName, payload: { projectId = null }, isOpen }) {
|
function ProjectFormDialog({ dialogName, payload: { projectId = null }, isOpen }) {
|
||||||
return (
|
return (
|
||||||
<ProjectDialogRoot
|
<ProjectFormDialogRoot
|
||||||
name={dialogName}
|
name={dialogName}
|
||||||
title={<T id={'projects.label.new_project'} />}
|
title={<T id={'projects.label.new_project'} />}
|
||||||
isOpen={isOpen}
|
isOpen={isOpen}
|
||||||
@@ -25,13 +25,13 @@ function ProjectDialog({ dialogName, payload: { projectId = null }, isOpen }) {
|
|||||||
<DialogSuspense>
|
<DialogSuspense>
|
||||||
<ProjectDialogContent dialogName={dialogName} project={projectId} />
|
<ProjectDialogContent dialogName={dialogName} project={projectId} />
|
||||||
</DialogSuspense>
|
</DialogSuspense>
|
||||||
</ProjectDialogRoot>
|
</ProjectFormDialogRoot>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default compose(withDialogRedux())(ProjectDialog);
|
export default compose(withDialogRedux())(ProjectFormDialog);
|
||||||
|
|
||||||
const ProjectDialogRoot = styled(Dialog)`
|
const ProjectFormDialogRoot = styled(Dialog)`
|
||||||
.bp3-dialog-body {
|
.bp3-dialog-body {
|
||||||
.bp3-form-group {
|
.bp3-form-group {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
@@ -6,7 +6,6 @@ import {
|
|||||||
NavbarDivider,
|
NavbarDivider,
|
||||||
Alignment,
|
Alignment,
|
||||||
} from '@blueprintjs/core';
|
} from '@blueprintjs/core';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Icon,
|
Icon,
|
||||||
AdvancedFilterPopover,
|
AdvancedFilterPopover,
|
||||||
@@ -20,9 +19,8 @@ import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar';
|
|||||||
|
|
||||||
import withProjects from './withProjects';
|
import withProjects from './withProjects';
|
||||||
import withProjectsActions from './withProjectsActions';
|
import withProjectsActions from './withProjectsActions';
|
||||||
|
import withSettings from '../../../Settings/withSettings';
|
||||||
import withSettings from '../../Settings/withSettings';
|
import withSettingsActions from '../../../Settings/withSettingsActions';
|
||||||
import withSettingsActions from '../../Settings/withSettingsActions';
|
|
||||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||||
|
|
||||||
import { compose } from 'utils';
|
import { compose } from 'utils';
|
||||||
@@ -1,18 +1,14 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { DataTable } from 'components';
|
import { DataTable } from 'components';
|
||||||
import { TABLES } from 'common/tables';
|
import { TABLES } from 'common/tables';
|
||||||
|
|
||||||
import TableSkeletonRows from 'components/Datatable/TableSkeletonRows';
|
import TableSkeletonRows from 'components/Datatable/TableSkeletonRows';
|
||||||
import TableSkeletonHeader from 'components/Datatable/TableHeaderSkeleton';
|
import TableSkeletonHeader from 'components/Datatable/TableHeaderSkeleton';
|
||||||
|
|
||||||
import { useProjectsListContext } from './ProjectsListProvider';
|
import { useProjectsListContext } from './ProjectsListProvider';
|
||||||
import { useMemorizedColumnsWidths } from 'hooks';
|
import { useMemorizedColumnsWidths } from 'hooks';
|
||||||
import { useProjectsListColumns, ActionsMenu } from '../components';
|
import { useProjectsListColumns, ActionsMenu } from './components';
|
||||||
|
|
||||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||||
import withProjectsActions from './withProjectsActions';
|
import withProjectsActions from './withProjectsActions';
|
||||||
import withSettings from '../../Settings/withSettings';
|
import withSettings from '../../../Settings/withSettings';
|
||||||
|
|
||||||
import { compose } from 'utils';
|
import { compose } from 'utils';
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ import { compose, transformTableStateToQuery } from 'utils';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Projects list.
|
* Projects list.
|
||||||
* @returns {React.TSX}
|
* @returns
|
||||||
*/
|
*/
|
||||||
function ProjectsList({
|
function ProjectsList({
|
||||||
// #withProjects
|
// #withProjects
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
//@ts-nocheck
|
//@ts-nocheck
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useResourceViews, useResourceMeta } from 'hooks/query';
|
import { useResourceViews, useResourceMeta } from 'hooks/query';
|
||||||
import DashboardInsider from '../../../components/Dashboard/DashboardInsider';
|
import DashboardInsider from '../../../../components/Dashboard/DashboardInsider';
|
||||||
|
|
||||||
const ProjectsListContext = React.createContext();
|
const ProjectsListContext = React.createContext();
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ import { compose, transfromViewsToTabs } from 'utils';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Projects views tabs.
|
* Projects views tabs.
|
||||||
* @returns {React.TSX}
|
* @returns
|
||||||
*/
|
*/
|
||||||
function ProjectsViewTabs({
|
function ProjectsViewTabs({
|
||||||
// #withProjects
|
// #withProjects
|
||||||
@@ -2,7 +2,7 @@ import { connect } from 'react-redux';
|
|||||||
import {
|
import {
|
||||||
getProjectsTableStateFactory,
|
getProjectsTableStateFactory,
|
||||||
isProjectsTableStateChangedFactory,
|
isProjectsTableStateChangedFactory,
|
||||||
} from '../../../store/Project/projects.selectors';
|
} from '../../../../store/Project/projects.selectors';
|
||||||
|
|
||||||
export default (mapState) => {
|
export default (mapState) => {
|
||||||
const getProjectsTableState = getProjectsTableStateFactory();
|
const getProjectsTableState = getProjectsTableStateFactory();
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
// import type { Dispatch } from 'redux';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
setProjectsTableState,
|
setProjectsTableState,
|
||||||
resetProjectsTableState,
|
resetProjectsTableState,
|
||||||
} from '../../../store/Project/projects.actions';
|
} from '../../../../store/Project/projects.actions';
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
setProjectsTableState: (state) => dispatch(setProjectsTableState(state)),
|
setProjectsTableState: (state) => dispatch(setProjectsTableState(state)),
|
||||||
@@ -3,9 +3,9 @@ import { TaskFormProvider } from './TaskFormProvider';
|
|||||||
import TaskForm from './TaskForm';
|
import TaskForm from './TaskForm';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Task dialog content.
|
* Task form dialog content.
|
||||||
*/
|
*/
|
||||||
export default function TaskDialogContent({
|
export default function TaskFormDialogContent({
|
||||||
// #ownProps
|
// #ownProps
|
||||||
dialogName,
|
dialogName,
|
||||||
task,
|
task,
|
||||||
@@ -5,15 +5,15 @@ import { Dialog, DialogSuspense, FormattedMessage as T } from 'components';
|
|||||||
import withDialogRedux from 'components/DialogReduxConnect';
|
import withDialogRedux from 'components/DialogReduxConnect';
|
||||||
import { compose } from 'utils';
|
import { compose } from 'utils';
|
||||||
|
|
||||||
const TaskDialogContent = React.lazy(
|
const TaskFormDialogContent = React.lazy(
|
||||||
() => import('./containers/TaskDialogContent'),
|
() => import('./containers/TaskFormDialogContent'),
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Task dialog.
|
* Task form dialog.
|
||||||
* @returns {ReactNode}
|
* @returns
|
||||||
*/
|
*/
|
||||||
function TaskDialog({ dialogName, payload: { taskId = null }, isOpen }) {
|
function TaskFormDialog({ dialogName, payload: { taskId = null }, isOpen }) {
|
||||||
return (
|
return (
|
||||||
<Dialog
|
<Dialog
|
||||||
name={dialogName}
|
name={dialogName}
|
||||||
@@ -24,11 +24,11 @@ function TaskDialog({ dialogName, payload: { taskId = null }, isOpen }) {
|
|||||||
style={{ width: '500px' }}
|
style={{ width: '500px' }}
|
||||||
>
|
>
|
||||||
<DialogSuspense>
|
<DialogSuspense>
|
||||||
<TaskDialogContent dialogName={dialogName} task={taskId} />
|
<TaskFormDialogContent dialogName={dialogName} task={taskId} />
|
||||||
</DialogSuspense>
|
</DialogSuspense>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export default compose(withDialogRedux())(TaskDialog);
|
export default compose(withDialogRedux())(TaskFormDialog);
|
||||||
|
|
||||||
const TaskDialogRoot = styled(Dialog)``;
|
const TaskFormDialogRoot = styled(Dialog)``;
|
||||||
@@ -2069,5 +2069,5 @@
|
|||||||
"task.schema.label.task_name": "Task name",
|
"task.schema.label.task_name": "Task name",
|
||||||
"task.schema.label.task_house": "Task house",
|
"task.schema.label.task_house": "Task house",
|
||||||
"task.schema.label.charge": "Charge",
|
"task.schema.label.charge": "Charge",
|
||||||
"task.schema.label.amount": "Amount",
|
"task.schema.label.amount": "Amount"
|
||||||
}
|
}
|
||||||
@@ -972,7 +972,7 @@ export const getDashboardRoutes = () => [
|
|||||||
{
|
{
|
||||||
path: '/projects',
|
path: '/projects',
|
||||||
component: lazy(() =>
|
component: lazy(() =>
|
||||||
import('../containers/Projects/containers/ProjectsList'),
|
import('../containers/Projects/containers/ProjectsLanding/ProjectsList'),
|
||||||
),
|
),
|
||||||
pageTitle: intl.get('sidebar.projects'),
|
pageTitle: intl.get('sidebar.projects'),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user