mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
fix edit project.
This commit is contained in:
@@ -14,13 +14,19 @@ const ProjectDialogContent = React.lazy(
|
||||
*/
|
||||
function ProjectFormDialog({
|
||||
dialogName,
|
||||
payload: { projectId = null },
|
||||
payload: { projectId = null, action },
|
||||
isOpen,
|
||||
}) {
|
||||
return (
|
||||
<ProjectFormDialogRoot
|
||||
name={dialogName}
|
||||
title={<T id={'projects.label.new_project'} />}
|
||||
title={
|
||||
action === 'edit' ? (
|
||||
<T id="projects.dialog.edit_project" />
|
||||
) : (
|
||||
<T id={'projects.dialog.new_project'} />
|
||||
)
|
||||
}
|
||||
isOpen={isOpen}
|
||||
autoFocus={true}
|
||||
canEscapeKeyClose={true}
|
||||
|
||||
@@ -57,6 +57,7 @@ function ProjectsDataTable({
|
||||
const handleEditProject = (project) => {
|
||||
openDialog('project-form', {
|
||||
projectId: project.id,
|
||||
action: 'edit',
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -2059,6 +2059,8 @@
|
||||
"projects.label.cost_estimate": " • Estimate {value}",
|
||||
"projects.dialog.success_message": "The project has been created successfully.",
|
||||
"projects.dialog.edit_success_message": "The project has been edited successfully.",
|
||||
"projects.dialog.new_project": "New Project",
|
||||
"projects.dialog.edit_project": "Edit Project",
|
||||
"projects.alert.delete_message": "The deleted project has been deleted successfully.",
|
||||
"projects.alert.once_delete_this_project": "Once you delete this project, you won't be able to restore it later. Are you sure you want to delete this project?",
|
||||
"projects.empty_status.title":"",
|
||||
|
||||
Reference in New Issue
Block a user