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