refactor: update create/update issue modal to use currently active store's create/update method. (#3395)

* refactor: update `create/update issue` modal to use currently active store's create/update method.

* chore: add condition to avoid multiple API calls if the current store is MODULE or CYCLE.

* remove: console log

* chore: update `currentStore` to `storeType`.
This commit is contained in:
Prateek Shourya 2024-01-18 14:42:10 +05:30 committed by sriram veeraghanta
parent 3f07c48b35
commit f347c1cd69
29 changed files with 251 additions and 102 deletions

View file

@ -11,6 +11,8 @@ import { copyUrlToClipboard } from "helpers/string.helper";
// types
import { TIssue } from "@plane/types";
import { IQuickActionProps } from "../list/list-view-types";
// constants
import { EIssuesStoreType } from "constants/issue";
export const AllIssueQuickActions: React.FC<IQuickActionProps> = (props) => {
const { issue, handleDelete, handleUpdate, customActionButton, portalElement } = props;
@ -58,6 +60,7 @@ export const AllIssueQuickActions: React.FC<IQuickActionProps> = (props) => {
onSubmit={async (data) => {
if (issueToEdit && handleUpdate) await handleUpdate({ ...issueToEdit, ...data });
}}
storeType={EIssuesStoreType.PROJECT}
/>
<CustomMenu
placement="bottom-start"