forked from github/plane
refactor: modules and states folder structure
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
export * from "./board-view";
|
||||
export * from "./comment";
|
||||
export * from "./sidebar-select";
|
||||
export * from "./activity";
|
||||
export * from "./delete-issue-modal";
|
||||
export * from "./description-form";
|
||||
|
||||
@@ -16,8 +16,6 @@ import issuesService from "services/issues.service";
|
||||
import useUser from "hooks/use-user";
|
||||
import useToast from "hooks/use-toast";
|
||||
// components
|
||||
import { CreateUpdateStateModal } from "components/states";
|
||||
import CreateUpdateCycleModal from "components/project/cycles/create-update-cycle-modal";
|
||||
import { IssueForm } from "components/issues";
|
||||
// common
|
||||
import { renderDateFormat } from "helpers/date-time.helper";
|
||||
@@ -206,15 +204,15 @@ export const CreateUpdateIssueModal: React.FC<IssuesModalProps> = ({
|
||||
};
|
||||
|
||||
const handleFormSubmit = async (formData: Partial<IIssue>) => {
|
||||
if (workspaceSlug && activeProject) {
|
||||
const payload: Partial<IIssue> = {
|
||||
...formData,
|
||||
target_date: formData.target_date ? renderDateFormat(formData.target_date ?? "") : null,
|
||||
};
|
||||
if (!workspaceSlug || !activeProject) return;
|
||||
|
||||
if (!data) await createIssue(payload);
|
||||
else await updateIssue(payload);
|
||||
}
|
||||
const payload: Partial<IIssue> = {
|
||||
...formData,
|
||||
target_date: formData.target_date ? renderDateFormat(formData.target_date ?? "") : null,
|
||||
};
|
||||
|
||||
if (!data) await createIssue(payload);
|
||||
else await updateIssue(payload);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -16,6 +16,7 @@ import useToast from "hooks/use-toast";
|
||||
import issuesServices from "services/issues.service";
|
||||
// components
|
||||
import {
|
||||
DeleteIssueModal,
|
||||
SidebarAssigneeSelect,
|
||||
SidebarBlockedSelect,
|
||||
SidebarBlockerSelect,
|
||||
@@ -23,8 +24,7 @@ import {
|
||||
SidebarParentSelect,
|
||||
SidebarPrioritySelect,
|
||||
SidebarStateSelect,
|
||||
} from "components/issues/sidebar-select";
|
||||
import { DeleteIssueModal } from "components/issues";
|
||||
} from "components/issues";
|
||||
// ui
|
||||
import { Input, Button, Spinner, CustomDatePicker } from "components/ui";
|
||||
// icons
|
||||
|
||||
Reference in New Issue
Block a user