Compare commits
16
Commits
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "admin",
|
||||
"version": "0.20.0",
|
||||
"version": "0.21.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "turbo run develop",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"name": "plane-api",
|
||||
"version": "0.20.0"
|
||||
"version": "0.21.0"
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"repository": "https://github.com/makeplane/plane.git",
|
||||
"version": "0.20.0",
|
||||
"version": "0.21.0",
|
||||
"license": "AGPL-3.0",
|
||||
"private": true,
|
||||
"workspaces": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@plane/constants",
|
||||
"version": "0.20.0",
|
||||
"version": "0.21.0",
|
||||
"private": true,
|
||||
"main": "./src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@plane/editor-core",
|
||||
"version": "0.20.0",
|
||||
"version": "0.21.0",
|
||||
"description": "Core Editor that powers Plane",
|
||||
"private": true,
|
||||
"main": "./dist/index.mjs",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@plane/document-editor",
|
||||
"version": "0.20.0",
|
||||
"version": "0.21.0",
|
||||
"description": "Package that powers Plane's Pages Editor",
|
||||
"main": "./dist/index.mjs",
|
||||
"module": "./dist/index.mjs",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@plane/editor-extensions",
|
||||
"version": "0.20.0",
|
||||
"version": "0.21.0",
|
||||
"description": "Package that powers Plane's Editor with extensions",
|
||||
"private": true,
|
||||
"main": "./dist/index.mjs",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@plane/lite-text-editor",
|
||||
"version": "0.20.0",
|
||||
"version": "0.21.0",
|
||||
"description": "Package that powers Plane's Comment Editor",
|
||||
"private": true,
|
||||
"main": "./dist/index.mjs",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@plane/rich-text-editor",
|
||||
"version": "0.20.0",
|
||||
"version": "0.21.0",
|
||||
"description": "Rich Text Editor that powers Plane",
|
||||
"private": true,
|
||||
"main": "./dist/index.mjs",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "eslint-config-custom",
|
||||
"private": true,
|
||||
"version": "0.20.0",
|
||||
"version": "0.21.0",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"devDependencies": {},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tailwind-config-custom",
|
||||
"version": "0.20.0",
|
||||
"version": "0.21.0",
|
||||
"description": "common tailwind configuration across monorepo",
|
||||
"main": "index.js",
|
||||
"private": true,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tsconfig",
|
||||
"version": "0.20.0",
|
||||
"version": "0.21.0",
|
||||
"private": true,
|
||||
"files": [
|
||||
"base.json",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@plane/types",
|
||||
"version": "0.20.0",
|
||||
"version": "0.21.0",
|
||||
"private": true,
|
||||
"main": "./src/index.d.ts"
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "@plane/ui",
|
||||
"description": "UI components shared across multiple apps internally",
|
||||
"private": true,
|
||||
"version": "0.20.0",
|
||||
"version": "0.21.0",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "space",
|
||||
"version": "0.20.0",
|
||||
"version": "0.21.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "turbo run develop",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "web",
|
||||
"version": "0.20.0",
|
||||
"version": "0.21.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "turbo run develop",
|
||||
|
||||
@@ -212,16 +212,15 @@ export class ProjectInboxStore implements IProjectInboxStore {
|
||||
createOrUpdateInboxIssue = (inboxIssues: TInboxIssue[], workspaceSlug: string, projectId: string) => {
|
||||
if (inboxIssues && inboxIssues.length > 0) {
|
||||
inboxIssues.forEach((inbox: TInboxIssue) => {
|
||||
const inboxIssueDetail = this.getIssueInboxByIssueId(inbox?.issue?.id);
|
||||
if (inboxIssueDetail)
|
||||
update(this.inboxIssues, [inbox?.issue?.id], (existingInboxIssue) => ({
|
||||
...existingInboxIssue,
|
||||
const existingInboxIssueDetail = this.getIssueInboxByIssueId(inbox?.issue?.id);
|
||||
if (existingInboxIssueDetail)
|
||||
Object.assign(existingInboxIssueDetail, {
|
||||
...inbox,
|
||||
issue: {
|
||||
...existingInboxIssue?.issue,
|
||||
...inbox?.issue,
|
||||
...existingInboxIssueDetail.issue,
|
||||
...inbox.issue,
|
||||
},
|
||||
}));
|
||||
});
|
||||
else
|
||||
set(this.inboxIssues, [inbox?.issue?.id], new InboxIssueStore(workspaceSlug, projectId, inbox, this.store));
|
||||
});
|
||||
|
||||
@@ -148,20 +148,20 @@ export class CycleIssues extends IssueHelperStore implements ICycleIssues {
|
||||
const cycleIssueIds = this.issues[cycleId];
|
||||
if (!cycleIssueIds) return;
|
||||
|
||||
const _issues = this.rootIssueStore.issues.getIssuesByIds(cycleIssueIds, "un-archived");
|
||||
if (!_issues) return [];
|
||||
const currentIssues = this.rootIssueStore.issues.getIssuesByIds(cycleIssueIds, "un-archived");
|
||||
if (!currentIssues) return [];
|
||||
|
||||
let issues: TGroupedIssues | TSubGroupedIssues | TUnGroupedIssues = [];
|
||||
|
||||
if (layout === "list" && orderBy) {
|
||||
if (groupBy) issues = this.groupedIssues(groupBy, orderBy, _issues);
|
||||
else issues = this.unGroupedIssues(orderBy, _issues);
|
||||
if (groupBy) issues = this.groupedIssues(groupBy, orderBy, currentIssues);
|
||||
else issues = this.unGroupedIssues(orderBy, currentIssues);
|
||||
} else if (layout === "kanban" && groupBy && orderBy) {
|
||||
if (subGroupBy) issues = this.subGroupedIssues(subGroupBy, groupBy, orderBy, _issues);
|
||||
else issues = this.groupedIssues(groupBy, orderBy, _issues);
|
||||
} else if (layout === "calendar") issues = this.groupedIssues("target_date", "target_date", _issues, true);
|
||||
else if (layout === "spreadsheet") issues = this.unGroupedIssues(orderBy ?? "-created_at", _issues);
|
||||
else if (layout === "gantt_chart") issues = this.unGroupedIssues(orderBy ?? "sort_order", _issues);
|
||||
if (subGroupBy) issues = this.subGroupedIssues(subGroupBy, groupBy, orderBy, currentIssues);
|
||||
else issues = this.groupedIssues(groupBy, orderBy, currentIssues);
|
||||
} else if (layout === "calendar") issues = this.groupedIssues("target_date", "target_date", currentIssues, true);
|
||||
else if (layout === "spreadsheet") issues = this.unGroupedIssues(orderBy ?? "-created_at", currentIssues);
|
||||
else if (layout === "gantt_chart") issues = this.unGroupedIssues(orderBy ?? "sort_order", currentIssues);
|
||||
|
||||
return issues;
|
||||
}
|
||||
@@ -301,14 +301,17 @@ export class CycleIssues extends IssueHelperStore implements ICycleIssues {
|
||||
});
|
||||
}
|
||||
|
||||
if (data.module_ids && data.module_ids.length > 0) {
|
||||
const currentModuleIds =
|
||||
data.module_ids && data.module_ids.length > 0 ? data.module_ids.filter((moduleId) => moduleId != "None") : [];
|
||||
|
||||
if (currentModuleIds.length > 0) {
|
||||
await this.rootStore.moduleIssues.changeModulesInIssue(
|
||||
workspaceSlug,
|
||||
projectId,
|
||||
response.id,
|
||||
data.module_ids,
|
||||
currentModuleIds,
|
||||
[]
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
this.rootIssueStore.rootStore.cycle.fetchCycleDetails(workspaceSlug, projectId, cycleId);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import concat from "lodash/concat";
|
||||
import pull from "lodash/pull";
|
||||
import isEmpty from "lodash/isEmpty";
|
||||
import set from "lodash/set";
|
||||
import uniq from "lodash/uniq";
|
||||
import update from "lodash/update";
|
||||
@@ -148,20 +147,20 @@ export class ModuleIssues extends IssueHelperStore implements IModuleIssues {
|
||||
const moduleIssueIds = this.issues[moduleId];
|
||||
if (!moduleIssueIds) return;
|
||||
|
||||
const _issues = this.rootIssueStore.issues.getIssuesByIds(moduleIssueIds, "un-archived");
|
||||
if (!_issues) return [];
|
||||
const currentIssues = this.rootIssueStore.issues.getIssuesByIds(moduleIssueIds, "un-archived");
|
||||
if (!currentIssues) return [];
|
||||
|
||||
let issues: TGroupedIssues | TSubGroupedIssues | TUnGroupedIssues = [];
|
||||
|
||||
if (layout === "list" && orderBy) {
|
||||
if (groupBy) issues = this.groupedIssues(groupBy, orderBy, _issues);
|
||||
else issues = this.unGroupedIssues(orderBy, _issues);
|
||||
if (groupBy) issues = this.groupedIssues(groupBy, orderBy, currentIssues);
|
||||
else issues = this.unGroupedIssues(orderBy, currentIssues);
|
||||
} else if (layout === "kanban" && groupBy && orderBy) {
|
||||
if (subGroupBy) issues = this.subGroupedIssues(subGroupBy, groupBy, orderBy, _issues);
|
||||
else issues = this.groupedIssues(groupBy, orderBy, _issues);
|
||||
} else if (layout === "calendar") issues = this.groupedIssues("target_date", "target_date", _issues, true);
|
||||
else if (layout === "spreadsheet") issues = this.unGroupedIssues(orderBy ?? "-created_at", _issues);
|
||||
else if (layout === "gantt_chart") issues = this.unGroupedIssues(orderBy ?? "sort_order", _issues);
|
||||
if (subGroupBy) issues = this.subGroupedIssues(subGroupBy, groupBy, orderBy, currentIssues);
|
||||
else issues = this.groupedIssues(groupBy, orderBy, currentIssues);
|
||||
} else if (layout === "calendar") issues = this.groupedIssues("target_date", "target_date", currentIssues, true);
|
||||
else if (layout === "spreadsheet") issues = this.unGroupedIssues(orderBy ?? "-created_at", currentIssues);
|
||||
else if (layout === "gantt_chart") issues = this.unGroupedIssues(orderBy ?? "sort_order", currentIssues);
|
||||
|
||||
return issues;
|
||||
}
|
||||
@@ -302,8 +301,9 @@ export class ModuleIssues extends IssueHelperStore implements IModuleIssues {
|
||||
});
|
||||
}
|
||||
|
||||
if (data.cycle_id && data.cycle_id !== "") {
|
||||
await this.rootStore.cycleIssues.addCycleToIssue(workspaceSlug, projectId, data.cycle_id, response.id)
|
||||
const currentCycleId = data.cycle_id !== "" && data.cycle_id === "None" ? undefined : data.cycle_id;
|
||||
if (currentCycleId) {
|
||||
await this.rootStore.cycleIssues.addCycleToIssue(workspaceSlug, projectId, currentCycleId, response.id);
|
||||
}
|
||||
|
||||
this.rootIssueStore.rootStore.module.fetchModuleDetails(workspaceSlug, projectId, moduleId);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import pull from "lodash/pull";
|
||||
import set from "lodash/set";
|
||||
import { action, observable, makeObservable, computed, runInAction } from "mobx";
|
||||
import { TIssue, TLoader, TGroupedIssues, TSubGroupedIssues, TUnGroupedIssues, ViewFlags } from "@plane/types";
|
||||
// base class
|
||||
import { IssueService } from "@/services/issue/issue.service";
|
||||
import { TIssue, TLoader, TGroupedIssues, TSubGroupedIssues, TUnGroupedIssues, ViewFlags } from "@plane/types";
|
||||
import { IssueHelperStore } from "../helpers/issue-helper.store";
|
||||
// services
|
||||
// types
|
||||
@@ -97,20 +97,20 @@ export class ProjectViewIssues extends IssueHelperStore implements IProjectViewI
|
||||
const viewIssueIds = this.issues[viewId];
|
||||
if (!viewIssueIds) return;
|
||||
|
||||
const _issues = this.rootStore.issues.getIssuesByIds(viewIssueIds, "un-archived");
|
||||
if (!_issues) return [];
|
||||
const currentIssues = this.rootStore.issues.getIssuesByIds(viewIssueIds, "un-archived");
|
||||
if (!currentIssues) return [];
|
||||
|
||||
let issues: TGroupedIssues | TSubGroupedIssues | TUnGroupedIssues = [];
|
||||
|
||||
if (layout === "list" && orderBy) {
|
||||
if (groupBy) issues = this.groupedIssues(groupBy, orderBy, _issues);
|
||||
else issues = this.unGroupedIssues(orderBy, _issues);
|
||||
if (groupBy) issues = this.groupedIssues(groupBy, orderBy, currentIssues);
|
||||
else issues = this.unGroupedIssues(orderBy, currentIssues);
|
||||
} else if (layout === "kanban" && groupBy && orderBy) {
|
||||
if (subGroupBy) issues = this.subGroupedIssues(subGroupBy, groupBy, orderBy, _issues);
|
||||
else issues = this.groupedIssues(groupBy, orderBy, _issues);
|
||||
} else if (layout === "calendar") issues = this.groupedIssues("target_date", "target_date", _issues, true);
|
||||
else if (layout === "spreadsheet") issues = this.unGroupedIssues(orderBy ?? "-created_at", _issues);
|
||||
else if (layout === "gantt_chart") issues = this.unGroupedIssues(orderBy ?? "sort_order", _issues);
|
||||
if (subGroupBy) issues = this.subGroupedIssues(subGroupBy, groupBy, orderBy, currentIssues);
|
||||
else issues = this.groupedIssues(groupBy, orderBy, currentIssues);
|
||||
} else if (layout === "calendar") issues = this.groupedIssues("target_date", "target_date", currentIssues, true);
|
||||
else if (layout === "spreadsheet") issues = this.unGroupedIssues(orderBy ?? "-created_at", currentIssues);
|
||||
else if (layout === "gantt_chart") issues = this.unGroupedIssues(orderBy ?? "sort_order", currentIssues);
|
||||
|
||||
return issues;
|
||||
}
|
||||
@@ -247,18 +247,25 @@ export class ProjectViewIssues extends IssueHelperStore implements IProjectViewI
|
||||
});
|
||||
}
|
||||
|
||||
if (data.cycle_id && data.cycle_id !== "") {
|
||||
await this.rootStore.cycleIssues.addCycleToIssue(workspaceSlug, projectId, data.cycle_id, response.id)
|
||||
const currentCycleId = data.cycle_id !== "" && data.cycle_id === "None" ? undefined : data.cycle_id;
|
||||
const currentModuleIds =
|
||||
data.module_ids && data.module_ids.length > 0 ? data.module_ids.filter((moduleId) => moduleId != "None") : [];
|
||||
|
||||
const multipleIssuePromises = [];
|
||||
if (currentCycleId) {
|
||||
multipleIssuePromises.push(
|
||||
this.rootStore.cycleIssues.addCycleToIssue(workspaceSlug, projectId, currentCycleId, response.id)
|
||||
);
|
||||
}
|
||||
|
||||
if (data.module_ids && data.module_ids.length > 0) {
|
||||
await this.rootStore.moduleIssues.changeModulesInIssue(
|
||||
workspaceSlug,
|
||||
projectId,
|
||||
response.id,
|
||||
data.module_ids,
|
||||
[]
|
||||
)
|
||||
if (currentModuleIds.length > 0) {
|
||||
multipleIssuePromises.push(
|
||||
this.rootStore.moduleIssues.changeModulesInIssue(workspaceSlug, projectId, response.id, currentModuleIds, [])
|
||||
);
|
||||
}
|
||||
|
||||
if (multipleIssuePromises && multipleIssuePromises.length > 0) {
|
||||
await Promise.all(multipleIssuePromises);
|
||||
}
|
||||
|
||||
return response;
|
||||
|
||||
@@ -103,20 +103,20 @@ export class ProjectIssues extends IssueHelperStore implements IProjectIssues {
|
||||
const projectIssueIds = this.issues[projectId];
|
||||
if (!projectIssueIds) return;
|
||||
|
||||
const _issues = this.rootStore.issues.getIssuesByIds(projectIssueIds, "un-archived");
|
||||
if (!_issues) return [];
|
||||
const currentIssues = this.rootStore.issues.getIssuesByIds(projectIssueIds, "un-archived");
|
||||
if (!currentIssues) return [];
|
||||
|
||||
let issues: TGroupedIssues | TSubGroupedIssues | TUnGroupedIssues = [];
|
||||
|
||||
if (layout === "list" && orderBy) {
|
||||
if (groupBy) issues = this.groupedIssues(groupBy, orderBy, _issues);
|
||||
else issues = this.unGroupedIssues(orderBy, _issues);
|
||||
if (groupBy) issues = this.groupedIssues(groupBy, orderBy, currentIssues);
|
||||
else issues = this.unGroupedIssues(orderBy, currentIssues);
|
||||
} else if (layout === "kanban" && groupBy && orderBy) {
|
||||
if (subGroupBy) issues = this.subGroupedIssues(subGroupBy, groupBy, orderBy, _issues);
|
||||
else issues = this.groupedIssues(groupBy, orderBy, _issues);
|
||||
} else if (layout === "calendar") issues = this.groupedIssues("target_date", "target_date", _issues, true);
|
||||
else if (layout === "spreadsheet") issues = this.unGroupedIssues(orderBy ?? "-created_at", _issues);
|
||||
else if (layout === "gantt_chart") issues = this.unGroupedIssues(orderBy ?? "sort_order", _issues);
|
||||
if (subGroupBy) issues = this.subGroupedIssues(subGroupBy, groupBy, orderBy, currentIssues);
|
||||
else issues = this.groupedIssues(groupBy, orderBy, currentIssues);
|
||||
} else if (layout === "calendar") issues = this.groupedIssues("target_date", "target_date", currentIssues, true);
|
||||
else if (layout === "spreadsheet") issues = this.unGroupedIssues(orderBy ?? "-created_at", currentIssues);
|
||||
else if (layout === "gantt_chart") issues = this.unGroupedIssues(orderBy ?? "sort_order", currentIssues);
|
||||
|
||||
return issues;
|
||||
}
|
||||
@@ -244,7 +244,7 @@ export class ProjectIssues extends IssueHelperStore implements IProjectIssues {
|
||||
const response = await this.createIssue(workspaceSlug, projectId, data);
|
||||
|
||||
const quickAddIssueIndex = this.issues[projectId].findIndex((_issueId) => _issueId === data.id);
|
||||
|
||||
|
||||
if (quickAddIssueIndex >= 0) {
|
||||
runInAction(() => {
|
||||
this.issues[projectId].splice(quickAddIssueIndex, 1);
|
||||
@@ -252,20 +252,27 @@ export class ProjectIssues extends IssueHelperStore implements IProjectIssues {
|
||||
});
|
||||
}
|
||||
|
||||
//TODO: error handling needs to be improved for rare cases
|
||||
if (data.cycle_id && data.cycle_id !== "") {
|
||||
await this.rootStore.cycleIssues.addCycleToIssue(workspaceSlug, projectId, data.cycle_id, response.id)
|
||||
const currentCycleId = data.cycle_id !== "" && data.cycle_id === "None" ? undefined : data.cycle_id;
|
||||
const currentModuleIds =
|
||||
data.module_ids && data.module_ids.length > 0 ? data.module_ids.filter((moduleId) => moduleId != "None") : [];
|
||||
|
||||
const multipleIssuePromises = [];
|
||||
if (currentCycleId) {
|
||||
multipleIssuePromises.push(
|
||||
this.rootStore.cycleIssues.addCycleToIssue(workspaceSlug, projectId, currentCycleId, response.id)
|
||||
);
|
||||
}
|
||||
|
||||
if (data.module_ids && data.module_ids.length > 0) {
|
||||
await this.rootStore.moduleIssues.changeModulesInIssue(
|
||||
workspaceSlug,
|
||||
projectId,
|
||||
response.id,
|
||||
data.module_ids,
|
||||
[]
|
||||
)
|
||||
if (currentModuleIds.length > 0) {
|
||||
multipleIssuePromises.push(
|
||||
this.rootStore.moduleIssues.changeModulesInIssue(workspaceSlug, projectId, response.id, currentModuleIds, [])
|
||||
);
|
||||
}
|
||||
|
||||
if (multipleIssuePromises && multipleIssuePromises.length > 0) {
|
||||
await Promise.all(multipleIssuePromises);
|
||||
}
|
||||
|
||||
return response;
|
||||
} catch (error) {
|
||||
this.fetchIssues(workspaceSlug, projectId, "mutation");
|
||||
|
||||
Reference in New Issue
Block a user