chore: cycle and module sidebar analytics improvement (#3559)
* chore: cycle and module store update action updated * chore: cycle and module issue store actions updated * chore: cycle and module retrieve endpoints updated * fix: app sidebar z index and priority icon fix * chore: cycle and module sidebar and stats updated
This commit is contained in:
parent
efaba43494
commit
7d07afd59c
11 changed files with 70 additions and 68 deletions
|
|
@ -152,6 +152,7 @@ export class CycleIssues extends IssueHelperStore implements ICycleIssues {
|
|||
|
||||
const params = this.rootIssueStore?.cycleIssuesFilter?.appliedFilters;
|
||||
const response = await this.cycleService.getCycleIssuesWithParams(workspaceSlug, projectId, cycleId, params);
|
||||
this.rootIssueStore.rootStore.cycle.fetchCycleDetails(workspaceSlug, projectId, cycleId);
|
||||
|
||||
runInAction(() => {
|
||||
set(
|
||||
|
|
@ -182,6 +183,7 @@ export class CycleIssues extends IssueHelperStore implements ICycleIssues {
|
|||
|
||||
const response = await this.rootIssueStore.projectIssues.createIssue(workspaceSlug, projectId, data);
|
||||
await this.addIssueToCycle(workspaceSlug, projectId, cycleId, [response.id]);
|
||||
this.rootIssueStore.rootStore.cycle.fetchCycleDetails(workspaceSlug, projectId, cycleId);
|
||||
|
||||
return response;
|
||||
} catch (error) {
|
||||
|
|
@ -218,6 +220,7 @@ export class CycleIssues extends IssueHelperStore implements ICycleIssues {
|
|||
if (!cycleId) throw new Error("Cycle Id is required");
|
||||
|
||||
const response = await this.rootIssueStore.projectIssues.removeIssue(workspaceSlug, projectId, issueId);
|
||||
this.rootIssueStore.rootStore.cycle.fetchCycleDetails(workspaceSlug, projectId, cycleId);
|
||||
|
||||
const issueIndex = this.issues[cycleId].findIndex((_issueId) => _issueId === issueId);
|
||||
if (issueIndex >= 0)
|
||||
|
|
@ -246,6 +249,7 @@ export class CycleIssues extends IssueHelperStore implements ICycleIssues {
|
|||
});
|
||||
|
||||
const response = await this.createIssue(workspaceSlug, projectId, data, cycleId);
|
||||
this.rootIssueStore.rootStore.cycle.fetchCycleDetails(workspaceSlug, projectId, cycleId);
|
||||
|
||||
const quickAddIssueIndex = this.issues[cycleId].findIndex((_issueId) => _issueId === data.id);
|
||||
if (quickAddIssueIndex >= 0)
|
||||
|
|
@ -273,6 +277,7 @@ export class CycleIssues extends IssueHelperStore implements ICycleIssues {
|
|||
issueIds.forEach((issueId) => {
|
||||
this.rootStore.issues.updateIssue(issueId, { cycle_id: cycleId });
|
||||
});
|
||||
this.rootIssueStore.rootStore.cycle.fetchCycleDetails(workspaceSlug, projectId, cycleId);
|
||||
|
||||
return issueToCycle;
|
||||
} catch (error) {
|
||||
|
|
@ -289,6 +294,7 @@ export class CycleIssues extends IssueHelperStore implements ICycleIssues {
|
|||
this.rootStore.issues.updateIssue(issueId, { cycle_id: null });
|
||||
|
||||
const response = await this.issueService.removeIssueFromCycle(workspaceSlug, projectId, cycleId, issueId);
|
||||
this.rootIssueStore.rootStore.cycle.fetchCycleDetails(workspaceSlug, projectId, cycleId);
|
||||
|
||||
return response;
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue