АРХ - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: managedBy policy Launcher

This commit is contained in:
DCCONSTRUCTIONS
2026-05-09 12:49:09 +03:00
parent fd1d5baef3
commit 01e0988031
6 changed files with 140 additions and 20 deletions
+2
View File
@@ -1,10 +1,12 @@
export type ClientType = "company" | "person";
export type ClientStatus = "active" | "suspended" | "demo" | "expired";
export type TaskManagerWorkspaceManagedBy = "launcher" | "tasker";
export interface ClientTaskManagerWorkspaceBinding {
slug: string;
name?: string | null;
isPrimary?: boolean;
managedBy?: TaskManagerWorkspaceManagedBy;
}
export interface Client {
+2 -1
View File
@@ -1,5 +1,5 @@
import type { ServiceAccessException, ServiceAppRole, ServiceGrant } from "../../entities/access/types";
import type { Client } from "../../entities/client/types";
import type { Client, TaskManagerWorkspaceManagedBy } from "../../entities/client/types";
import type { Invite } from "../../entities/invite/types";
import type { Service } from "../../entities/service/types";
import type { SyncStatus } from "../../entities/sync/types";
@@ -35,6 +35,7 @@ export interface TaskManagerWorkspaceSummary {
id: string;
slug: string;
name: string;
managedBy?: TaskManagerWorkspaceManagedBy;
ownerEmail: string | null;
memberCount: number;
projects?: TaskManagerProjectSummary[];
+3 -1
View File
@@ -1,6 +1,6 @@
import { computeEffectiveAccess } from "../../entities/access/computeEffectiveAccess";
import type { EffectiveAccessResult, ServiceAccessException, ServiceGrant } from "../../entities/access/types";
import type { Client } from "../../entities/client/types";
import type { Client, TaskManagerWorkspaceManagedBy } from "../../entities/client/types";
import type { Invite } from "../../entities/invite/types";
import { getServiceLaunchLink } from "../../entities/service/links";
import type { LauncherServiceView, Service } from "../../entities/service/types";
@@ -72,6 +72,7 @@ export interface TaskManagerMembershipAssignment {
workspaceSlug: string;
workspaceName?: string | null;
role: "guest" | "member" | "admin";
managedBy?: TaskManagerWorkspaceManagedBy;
planeUserId?: string | null;
planeRole?: number | null;
updatedAt: string;
@@ -87,6 +88,7 @@ export interface TaskManagerProjectMembershipAssignment {
projectIdentifier?: string | null;
projectName?: string | null;
role: "guest" | "member" | "admin";
managedBy?: TaskManagerWorkspaceManagedBy;
planeUserId?: string | null;
planeRole?: number | null;
updatedAt: string;
+5 -1
View File
@@ -989,6 +989,7 @@ function getClientTaskManagerWorkspaces(client: Client): ClientTaskManagerWorksp
slug: workspace.slug,
name: workspace.name ?? null,
isPrimary: workspace.isPrimary === true,
managedBy: workspace.managedBy ?? "launcher",
});
}
@@ -997,6 +998,7 @@ function getClientTaskManagerWorkspaces(client: Client): ClientTaskManagerWorksp
slug: taskManager.workspaceSlug,
name: taskManager.workspaceName ?? null,
isPrimary: true,
managedBy: "launcher",
});
}
@@ -1055,6 +1057,7 @@ function normalizeClientTaskManagerWorkspaceDraft(workspaces: ClientTaskManagerW
slug: workspace.slug,
name: workspace.name ?? null,
isPrimary: workspace.isPrimary === true,
managedBy: workspace.managedBy ?? "launcher",
});
}
@@ -1781,6 +1784,7 @@ function ClientEditorModal({
slug: workspace.slug,
name: workspace.name,
isPrimary: currentWorkspaces.length === 0,
managedBy: "launcher",
},
];
@@ -1919,7 +1923,7 @@ function ClientEditorModal({
<span>
<strong>{workspace.name}</strong>
<small>
{workspace.slug} · {workspace.memberCount} участников
{workspace.slug} · {workspace.memberCount} участников · Launcher-managed
</small>
</span>
{selected ? (