[WEB-1015] fix: kanban layout cycle and module quick add (#4252)

* fix: kanban layout cycle and module quick add

* fix: kanban layout cycle and module quick add
This commit is contained in:
Anmol Singh Bhatia 2024-04-23 13:07:20 +05:30 committed by GitHub
parent aee48f6fa4
commit f17e4c73a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 20 additions and 0 deletions

View File

@ -269,6 +269,10 @@ export class CycleIssues extends IssueHelperStore implements ICycleIssues {
});
const response = await this.createIssue(workspaceSlug, projectId, data, cycleId);
if (data.module_ids && data.module_ids.length > 0)
await this.rootStore.moduleIssues.addModulesToIssue(workspaceSlug, projectId, response.id, data.module_ids);
this.rootIssueStore.rootStore.cycle.fetchCycleDetails(workspaceSlug, projectId, cycleId);
const quickAddIssueIndex = this.issues[cycleId].findIndex((_issueId) => _issueId === data.id);

View File

@ -274,6 +274,10 @@ export class ModuleIssues extends IssueHelperStore implements IModuleIssues {
});
const response = await this.createIssue(workspaceSlug, projectId, data, moduleId);
if (data.cycle_id && data.cycle_id !== "")
await this.rootStore.cycleIssues.addIssueToCycle(workspaceSlug, projectId, data.cycle_id, [response.id]);
this.rootIssueStore.rootStore.module.fetchModuleDetails(workspaceSlug, projectId, moduleId);
const quickAddIssueIndex = this.issues[moduleId].findIndex((_issueId) => _issueId === data.id);

View File

@ -239,6 +239,12 @@ export class ProjectViewIssues extends IssueHelperStore implements IProjectViewI
const response = await this.createIssue(workspaceSlug, projectId, data, viewId);
if (data.cycle_id && data.cycle_id !== "")
await this.rootStore.cycleIssues.addIssueToCycle(workspaceSlug, projectId, data.cycle_id, [response.id]);
if (data.module_ids && data.module_ids.length > 0)
await this.rootStore.moduleIssues.addModulesToIssue(workspaceSlug, projectId, response.id, data.module_ids);
const quickAddIssueIndex = this.issues[viewId].findIndex((_issueId) => _issueId === data.id);
if (quickAddIssueIndex >= 0)
runInAction(() => {

View File

@ -223,6 +223,12 @@ export class ProjectIssues extends IssueHelperStore implements IProjectIssues {
const response = await this.createIssue(workspaceSlug, projectId, data);
if (data.cycle_id && data.cycle_id !== "")
await this.rootStore.cycleIssues.addIssueToCycle(workspaceSlug, projectId, data.cycle_id, [response.id]);
if (data.module_ids && data.module_ids.length > 0)
await this.rootStore.moduleIssues.addModulesToIssue(workspaceSlug, projectId, response.id, data.module_ids);
const quickAddIssueIndex = this.issues[projectId].findIndex((_issueId) => _issueId === data.id);
if (quickAddIssueIndex >= 0)
runInAction(() => {