fix: global issues properties updation issue resolved (#2974)

This commit is contained in:
guru_sainath 2023-12-02 18:19:29 +05:30 committed by Aaryan Khandelwal
parent 108fc27a6e
commit 4336cfa0a5

View File

@ -63,23 +63,23 @@ export const AllIssueLayoutRoot: React.FC<Props> = observer((props) => {
const issueActions = { const issueActions = {
[EIssueActions.UPDATE]: async (issue: IIssue) => { [EIssueActions.UPDATE]: async (issue: IIssue) => {
if (!workspaceSlug) return; const projectId = issue.project;
if (!workspaceSlug || !projectId) return;
await updateIssue(workspaceSlug, issue.project, issue.id, issue); await updateIssue(workspaceSlug, projectId, issue.id, issue, currentIssueView);
}, },
[EIssueActions.DELETE]: async (issue: IIssue) => { [EIssueActions.DELETE]: async (issue: IIssue) => {
if (!workspaceSlug) return; const projectId = issue.project;
if (!workspaceSlug || !projectId) return;
await removeIssue(workspaceSlug, issue.project, issue.id); await removeIssue(workspaceSlug, projectId, issue.id, currentIssueView);
}, },
}; };
const handleIssues = useCallback( const handleIssues = useCallback(
async (issue: IIssue, action: EIssueActions) => { async (issue: IIssue, action: EIssueActions) => {
if (issueActions && action && issue) { if (action === EIssueActions.UPDATE) await issueActions[action]!(issue);
if (action === EIssueActions.UPDATE) await issueActions[action]!(issue); if (action === EIssueActions.DELETE) await issueActions[action]!(issue);
if (action === EIssueActions.DELETE) await issueActions[action]!(issue);
}
}, },
[getIssues] [getIssues]
); );