fix: calendar view mutation (#1042)
This commit is contained in:
parent
dbbd9add99
commit
290318603d
11 changed files with 337 additions and 207 deletions
|
|
@ -1,13 +1,14 @@
|
|||
import { IAnalyticsParams, IJiraMetadata } from "types";
|
||||
|
||||
const paramsToKey = (params: any) => {
|
||||
const { state, priority, assignees, created_by, labels } = params;
|
||||
const { state, priority, assignees, created_by, labels, target_date } = params;
|
||||
|
||||
let stateKey = state ? state.split(",") : [];
|
||||
let priorityKey = priority ? priority.split(",") : [];
|
||||
let assigneesKey = assignees ? assignees.split(",") : [];
|
||||
let createdByKey = created_by ? created_by.split(",") : [];
|
||||
let labelsKey = labels ? labels.split(",") : [];
|
||||
const targetDateKey = target_date ?? "";
|
||||
const type = params.type ? params.type.toUpperCase() : "NULL";
|
||||
const groupBy = params.group_by ? params.group_by.toUpperCase() : "NULL";
|
||||
const orderBy = params.order_by ? params.order_by.toUpperCase() : "NULL";
|
||||
|
|
@ -19,7 +20,7 @@ const paramsToKey = (params: any) => {
|
|||
createdByKey = createdByKey.sort().join("_");
|
||||
labelsKey = labelsKey.sort().join("_");
|
||||
|
||||
return `${stateKey}_${priorityKey}_${assigneesKey}_${createdByKey}_${type}_${groupBy}_${orderBy}_${labelsKey}`;
|
||||
return `${stateKey}_${priorityKey}_${assigneesKey}_${createdByKey}_${type}_${groupBy}_${orderBy}_${labelsKey}_${targetDateKey}`;
|
||||
};
|
||||
|
||||
export const CURRENT_USER = "CURRENT_USER";
|
||||
|
|
@ -148,14 +149,6 @@ export const GITHUB_REPOSITORY_INFO = (workspaceSlug: string, repoName: string)
|
|||
export const SLACK_CHANNEL_INFO = (workspaceSlug: string, projectId: string) =>
|
||||
`SLACK_CHANNEL_INFO_${workspaceSlug.toString().toUpperCase()}_${projectId.toUpperCase()}`;
|
||||
|
||||
// Calendar
|
||||
export const PROJECT_CALENDAR_ISSUES = (projectId: string) =>
|
||||
`CALENDAR_ISSUES_${projectId.toUpperCase()}`;
|
||||
export const CYCLE_CALENDAR_ISSUES = (projectId: string, cycleId: string) =>
|
||||
`CALENDAR_ISSUES_${projectId.toUpperCase()}_${cycleId.toUpperCase()}`;
|
||||
export const MODULE_CALENDAR_ISSUES = (projectId: string, moduleId: string) =>
|
||||
`CALENDAR_ISSUES_${projectId.toUpperCase()}_${moduleId.toUpperCase()}`;
|
||||
|
||||
// Pages
|
||||
export const RECENT_PAGES_LIST = (projectId: string) =>
|
||||
`RECENT_PAGES_LIST_${projectId.toUpperCase()}`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue