@burdenoff/microfe-planmagnet 2026.1123.2 → 2026.1126.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/wspace-types.d.ts +125 -0
- package/dist/planmagnet/automation/WorkflowSelect.d.ts +19 -0
- package/dist/planmagnet/automation/WorkflowSelect.js +131 -57
- package/dist/planmagnet/create/CreateDialogs.js +1 -1
- package/dist/planmagnet/dashboards/cards/RiskSeverityCard.js +1 -1
- package/dist/planmagnet/pages/RisksRiskDetailPagePage.js +1 -1
- package/dist/planmagnet/pages/RisksRiskRegisterPagePage.js +5 -1
- package/dist/planmagnet/pages/TemplatesEditTemplatePagePage.js +124 -124
- package/dist/planmagnet/pages/TemplatesTemplatesPagePage.js +1 -1
- package/dist/planmagnet/releases/ReleaseReadinessCard.js +1 -1
- package/package.json +1 -1
|
@@ -914,6 +914,7 @@ export type Mutation = {
|
|
|
914
914
|
planmagnetCreateProject: PlanmagnetProject;
|
|
915
915
|
/** Create a new project template */
|
|
916
916
|
planmagnetCreateProjectTemplate: ProjectTemplate;
|
|
917
|
+
planmagnetCreateProjectTemplateRecord: PlanmagnetProjectTemplate;
|
|
917
918
|
/** Create a new quality gate */
|
|
918
919
|
planmagnetCreateQualityGate: QualityGate;
|
|
919
920
|
/** Create a new release */
|
|
@@ -938,6 +939,7 @@ export type Mutation = {
|
|
|
938
939
|
planmagnetCreateTeam: Team;
|
|
939
940
|
/** Create a template from an existing project */
|
|
940
941
|
planmagnetCreateTemplateFromProject: ProjectTemplate;
|
|
942
|
+
planmagnetCreateTemplateRecordFromProject: PlanmagnetProjectTemplate;
|
|
941
943
|
/** Create a new time entry */
|
|
942
944
|
planmagnetCreateTimeEntry: PlanmagnetTimeEntry;
|
|
943
945
|
/** Create a new timesheet */
|
|
@@ -1557,6 +1559,7 @@ export type Mutation = {
|
|
|
1557
1559
|
planmagnetUpdateProject: PlanmagnetProject;
|
|
1558
1560
|
/** Update an existing project template */
|
|
1559
1561
|
planmagnetUpdateProjectTemplate: ProjectTemplate;
|
|
1562
|
+
planmagnetUpdateProjectTemplateRecord: PlanmagnetProjectTemplate;
|
|
1560
1563
|
/** Change a project's workflow */
|
|
1561
1564
|
planmagnetUpdateProjectWorkflow: PlanmagnetProjectWorkflow;
|
|
1562
1565
|
/** Update an existing quality gate */
|
|
@@ -1803,6 +1806,9 @@ export type MutationPlanmagnetCreateProjectArgs = {
|
|
|
1803
1806
|
export type MutationPlanmagnetCreateProjectTemplateArgs = {
|
|
1804
1807
|
input: PlanmagnetCreateProjectTemplateInput;
|
|
1805
1808
|
};
|
|
1809
|
+
export type MutationPlanmagnetCreateProjectTemplateRecordArgs = {
|
|
1810
|
+
input: PlanmagnetCreateProjectTemplateInput;
|
|
1811
|
+
};
|
|
1806
1812
|
export type MutationPlanmagnetCreateQualityGateArgs = {
|
|
1807
1813
|
input: PlanmagnetCreateQualityGateInput;
|
|
1808
1814
|
};
|
|
@@ -1841,6 +1847,11 @@ export type MutationPlanmagnetCreateTemplateFromProjectArgs = {
|
|
|
1841
1847
|
name: Scalars['String']['input'];
|
|
1842
1848
|
projectId: Scalars['ID']['input'];
|
|
1843
1849
|
};
|
|
1850
|
+
export type MutationPlanmagnetCreateTemplateRecordFromProjectArgs = {
|
|
1851
|
+
description?: InputMaybe<Scalars['String']['input']>;
|
|
1852
|
+
name: Scalars['String']['input'];
|
|
1853
|
+
projectId: Scalars['ID']['input'];
|
|
1854
|
+
};
|
|
1844
1855
|
export type MutationPlanmagnetCreateTimeEntryArgs = {
|
|
1845
1856
|
input: PlanmagnetCreateTimeEntryInput;
|
|
1846
1857
|
};
|
|
@@ -2482,6 +2493,10 @@ export type MutationPlanmagnetUpdateProjectTemplateArgs = {
|
|
|
2482
2493
|
id: Scalars['ID']['input'];
|
|
2483
2494
|
input: PlanmagnetUpdateProjectTemplateInput;
|
|
2484
2495
|
};
|
|
2496
|
+
export type MutationPlanmagnetUpdateProjectTemplateRecordArgs = {
|
|
2497
|
+
id: Scalars['ID']['input'];
|
|
2498
|
+
input: PlanmagnetUpdateProjectTemplateInput;
|
|
2499
|
+
};
|
|
2485
2500
|
export type MutationPlanmagnetUpdateProjectWorkflowArgs = {
|
|
2486
2501
|
input: PlanmagnetUpdateProjectWorkflowInput;
|
|
2487
2502
|
projectId: Scalars['ID']['input'];
|
|
@@ -6506,6 +6521,52 @@ export declare enum PlanmagnetProjectStatus {
|
|
|
6506
6521
|
OnHold = "ON_HOLD",
|
|
6507
6522
|
Planning = "PLANNING"
|
|
6508
6523
|
}
|
|
6524
|
+
/** Project template types for consumers migrating to prefixed federation entities. */
|
|
6525
|
+
export type PlanmagnetProjectTemplate = {
|
|
6526
|
+
__typename?: 'PlanmagnetProjectTemplate';
|
|
6527
|
+
/** Board layout configuration */
|
|
6528
|
+
boardConfig?: Maybe<Scalars['JSON']['output']>;
|
|
6529
|
+
/** Template category */
|
|
6530
|
+
category?: Maybe<Scalars['String']['output']>;
|
|
6531
|
+
/** Template configuration (JSON - project settings, work item types, etc.) */
|
|
6532
|
+
configuration: Scalars['JSON']['output'];
|
|
6533
|
+
/** Context information */
|
|
6534
|
+
context?: Maybe<Scalars['JSON']['output']>;
|
|
6535
|
+
/** Creation timestamp */
|
|
6536
|
+
createdAt: Scalars['DateTime']['output'];
|
|
6537
|
+
/** Actor who created this template */
|
|
6538
|
+
createdBy: Scalars['String']['output'];
|
|
6539
|
+
/** Custom field definitions to create */
|
|
6540
|
+
customFieldsConfig?: Maybe<Scalars['JSON']['output']>;
|
|
6541
|
+
/** Soft-delete timestamp */
|
|
6542
|
+
deletedAt?: Maybe<Scalars['DateTime']['output']>;
|
|
6543
|
+
/** Template description */
|
|
6544
|
+
description?: Maybe<Scalars['String']['output']>;
|
|
6545
|
+
/** Unique identifier */
|
|
6546
|
+
id: Scalars['ID']['output'];
|
|
6547
|
+
/** Whether this is a built-in system template */
|
|
6548
|
+
isBuiltIn: Scalars['Boolean']['output'];
|
|
6549
|
+
/** Whether this template is published and available */
|
|
6550
|
+
isPublished: Scalars['Boolean']['output'];
|
|
6551
|
+
/** Arbitrary metadata */
|
|
6552
|
+
metadata?: Maybe<Scalars['JSON']['output']>;
|
|
6553
|
+
/** Template name */
|
|
6554
|
+
name: Scalars['String']['output'];
|
|
6555
|
+
/** Actor on whose behalf this was created */
|
|
6556
|
+
onBehalfOf?: Maybe<Scalars['String']['output']>;
|
|
6557
|
+
/** Default sprint configuration */
|
|
6558
|
+
sprintConfig?: Maybe<Scalars['JSON']['output']>;
|
|
6559
|
+
/** Tags for categorization */
|
|
6560
|
+
tags: Array<Scalars['String']['output']>;
|
|
6561
|
+
/** Last update timestamp */
|
|
6562
|
+
updatedAt: Scalars['DateTime']['output'];
|
|
6563
|
+
/** Actor who last updated this template */
|
|
6564
|
+
updatedBy?: Maybe<Scalars['String']['output']>;
|
|
6565
|
+
/** Number of times this template has been applied */
|
|
6566
|
+
usageCount: Scalars['Int']['output'];
|
|
6567
|
+
/** Associated workspace ID */
|
|
6568
|
+
workspaceId: Scalars['String']['output'];
|
|
6569
|
+
};
|
|
6509
6570
|
export type PlanmagnetProjectTemplateFilter = {
|
|
6510
6571
|
category?: InputMaybe<Scalars['String']['input']>;
|
|
6511
6572
|
isBuiltIn?: InputMaybe<Scalars['Boolean']['input']>;
|
|
@@ -6518,6 +6579,12 @@ export type PlanmagnetProjectTemplateList = {
|
|
|
6518
6579
|
pageInfo: PlanmagnetPageInfo;
|
|
6519
6580
|
totalCount: Scalars['Int']['output'];
|
|
6520
6581
|
};
|
|
6582
|
+
export type PlanmagnetProjectTemplateRecordList = {
|
|
6583
|
+
__typename?: 'PlanmagnetProjectTemplateRecordList';
|
|
6584
|
+
items: Array<PlanmagnetProjectTemplate>;
|
|
6585
|
+
pageInfo: PlanmagnetPageInfo;
|
|
6586
|
+
totalCount: Scalars['Int']['output'];
|
|
6587
|
+
};
|
|
6521
6588
|
/**
|
|
6522
6589
|
* One project's slice of the work breakdown. `open`/`done` above are totals across EVERY live work item in the
|
|
6523
6590
|
* project (every type, epics themselves included) — the epic rollups below are a further breakdown of that same
|
|
@@ -7089,6 +7156,36 @@ export type PlanmagnetReviewQualityGateInput = {
|
|
|
7089
7156
|
reviewNotes?: InputMaybe<Scalars['String']['input']>;
|
|
7090
7157
|
status: QualityGateStatus;
|
|
7091
7158
|
};
|
|
7159
|
+
/** The PlanMagnet-owned risk entity for clients adopting prefixed type names. */
|
|
7160
|
+
export type PlanmagnetRisk = {
|
|
7161
|
+
__typename?: 'PlanmagnetRisk';
|
|
7162
|
+
category?: Maybe<Scalars['String']['output']>;
|
|
7163
|
+
context?: Maybe<Scalars['JSON']['output']>;
|
|
7164
|
+
contingencyPlan?: Maybe<Scalars['String']['output']>;
|
|
7165
|
+
createdAt: Scalars['DateTime']['output'];
|
|
7166
|
+
createdBy: Scalars['String']['output'];
|
|
7167
|
+
deletedAt?: Maybe<Scalars['DateTime']['output']>;
|
|
7168
|
+
description?: Maybe<Scalars['String']['output']>;
|
|
7169
|
+
dueDate?: Maybe<Scalars['DateTime']['output']>;
|
|
7170
|
+
id: Scalars['ID']['output'];
|
|
7171
|
+
impact: Scalars['Int']['output'];
|
|
7172
|
+
likelihood: Scalars['Int']['output'];
|
|
7173
|
+
metadata?: Maybe<Scalars['JSON']['output']>;
|
|
7174
|
+
mitigationPlan?: Maybe<Scalars['String']['output']>;
|
|
7175
|
+
onBehalfOf?: Maybe<Scalars['String']['output']>;
|
|
7176
|
+
ownerId?: Maybe<Scalars['String']['output']>;
|
|
7177
|
+
project?: Maybe<PlanmagnetProject>;
|
|
7178
|
+
projectId: Scalars['String']['output'];
|
|
7179
|
+
resolvedAt?: Maybe<Scalars['DateTime']['output']>;
|
|
7180
|
+
riskScore: Scalars['Int']['output'];
|
|
7181
|
+
severity: RiskSeverity;
|
|
7182
|
+
status: RiskStatus;
|
|
7183
|
+
tags: Array<Scalars['String']['output']>;
|
|
7184
|
+
title: Scalars['String']['output'];
|
|
7185
|
+
updatedAt: Scalars['DateTime']['output'];
|
|
7186
|
+
updatedBy?: Maybe<Scalars['String']['output']>;
|
|
7187
|
+
workspaceId: Scalars['String']['output'];
|
|
7188
|
+
};
|
|
7092
7189
|
/**
|
|
7093
7190
|
* Sum of likelihood x impact over the project's OPEN risks (status not RESOLVED/CLOSED), with the top 3
|
|
7094
7191
|
* by exposure.
|
|
@@ -7189,6 +7286,12 @@ export type PlanmagnetRiskMatrix = {
|
|
|
7189
7286
|
/** Total number of risks */
|
|
7190
7287
|
totalRisks: Scalars['Int']['output'];
|
|
7191
7288
|
};
|
|
7289
|
+
export type PlanmagnetRiskRecordList = {
|
|
7290
|
+
__typename?: 'PlanmagnetRiskRecordList';
|
|
7291
|
+
items: Array<PlanmagnetRisk>;
|
|
7292
|
+
pageInfo: PlanmagnetPageInfo;
|
|
7293
|
+
totalCount: Scalars['Int']['output'];
|
|
7294
|
+
};
|
|
7192
7295
|
/**
|
|
7193
7296
|
* A comment on a roadmap, or on one specific item of it (PRM-11). Visible to
|
|
7194
7297
|
* everyone who can read the roadmap; only its author can edit or delete it —
|
|
@@ -10117,6 +10220,8 @@ export type Query = {
|
|
|
10117
10220
|
planmagnetProjectRiskSummary: PlanmagnetProjectRiskSummary;
|
|
10118
10221
|
/** Get a single project template by ID */
|
|
10119
10222
|
planmagnetProjectTemplate?: Maybe<ProjectTemplate>;
|
|
10223
|
+
planmagnetProjectTemplateRecord?: Maybe<PlanmagnetProjectTemplate>;
|
|
10224
|
+
planmagnetProjectTemplateRecords: PlanmagnetProjectTemplateRecordList;
|
|
10120
10225
|
/** List project templates in a workspace */
|
|
10121
10226
|
planmagnetProjectTemplates: PlanmagnetProjectTemplateList;
|
|
10122
10227
|
/** A project's workflow */
|
|
@@ -10173,6 +10278,10 @@ export type Query = {
|
|
|
10173
10278
|
planmagnetRisk?: Maybe<Risk>;
|
|
10174
10279
|
/** Get the risk matrix for a project */
|
|
10175
10280
|
planmagnetRiskMatrix: PlanmagnetRiskMatrix;
|
|
10281
|
+
/** Read one risk using the prefixed entity. */
|
|
10282
|
+
planmagnetRiskRecord?: Maybe<PlanmagnetRisk>;
|
|
10283
|
+
/** List workspace risks using the prefixed entity. */
|
|
10284
|
+
planmagnetRiskRecords: PlanmagnetRiskRecordList;
|
|
10176
10285
|
/** List risks in a workspace */
|
|
10177
10286
|
planmagnetRisks: PlanmagnetRiskList;
|
|
10178
10287
|
/** Get a single roadmap by ID */
|
|
@@ -10699,6 +10808,14 @@ export type QueryPlanmagnetProjectRiskSummaryArgs = {
|
|
|
10699
10808
|
export type QueryPlanmagnetProjectTemplateArgs = {
|
|
10700
10809
|
id: Scalars['ID']['input'];
|
|
10701
10810
|
};
|
|
10811
|
+
export type QueryPlanmagnetProjectTemplateRecordArgs = {
|
|
10812
|
+
id: Scalars['ID']['input'];
|
|
10813
|
+
};
|
|
10814
|
+
export type QueryPlanmagnetProjectTemplateRecordsArgs = {
|
|
10815
|
+
filter?: InputMaybe<PlanmagnetProjectTemplateFilter>;
|
|
10816
|
+
pagination?: InputMaybe<PlanmagnetPaginationInput>;
|
|
10817
|
+
workspaceId: Scalars['ID']['input'];
|
|
10818
|
+
};
|
|
10702
10819
|
export type QueryPlanmagnetProjectTemplatesArgs = {
|
|
10703
10820
|
filter?: InputMaybe<PlanmagnetProjectTemplateFilter>;
|
|
10704
10821
|
pagination?: InputMaybe<PlanmagnetPaginationInput>;
|
|
@@ -10770,6 +10887,14 @@ export type QueryPlanmagnetRiskArgs = {
|
|
|
10770
10887
|
export type QueryPlanmagnetRiskMatrixArgs = {
|
|
10771
10888
|
projectId: Scalars['ID']['input'];
|
|
10772
10889
|
};
|
|
10890
|
+
export type QueryPlanmagnetRiskRecordArgs = {
|
|
10891
|
+
id: Scalars['ID']['input'];
|
|
10892
|
+
};
|
|
10893
|
+
export type QueryPlanmagnetRiskRecordsArgs = {
|
|
10894
|
+
filter?: InputMaybe<PlanmagnetRiskFilter>;
|
|
10895
|
+
pagination?: InputMaybe<PlanmagnetPaginationInput>;
|
|
10896
|
+
workspaceId: Scalars['ID']['input'];
|
|
10897
|
+
};
|
|
10773
10898
|
export type QueryPlanmagnetRisksArgs = {
|
|
10774
10899
|
filter?: InputMaybe<PlanmagnetRiskFilter>;
|
|
10775
10900
|
pagination?: InputMaybe<PlanmagnetPaginationInput>;
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/** Rows per request. Well under the engine's cap of 100 so every request is one bounded page. */
|
|
2
|
+
export declare const WORKFLOW_PAGE_SIZE = 50;
|
|
3
|
+
/** How long the search box waits after the last keystroke before it asks the server. */
|
|
4
|
+
export declare const WORKFLOW_SEARCH_DEBOUNCE_MS = 300;
|
|
5
|
+
export interface WorkflowOption {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
workflowKey: string;
|
|
9
|
+
version: string;
|
|
10
|
+
}
|
|
11
|
+
/** The variables for one page of active workflows. A blank search is no search. */
|
|
12
|
+
export declare function workflowPageInput(search: string, offset: number): {
|
|
13
|
+
search?: string | undefined;
|
|
14
|
+
status: string;
|
|
15
|
+
limit: number;
|
|
16
|
+
offset: number;
|
|
17
|
+
};
|
|
18
|
+
/** Appends a page to the rows already shown, dropping any row a shifted offset returns twice. */
|
|
19
|
+
export declare function appendWorkflowPage(shown: readonly WorkflowOption[], page: readonly WorkflowOption[]): WorkflowOption[];
|
|
1
20
|
export declare function WorkflowSelect({ value, onChange, }: {
|
|
2
21
|
value: string;
|
|
3
22
|
onChange: (workflowDefinitionId: string) => void;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useEffect as e, useState as t } from "react";
|
|
2
|
+
import { gql as n } from "@apollo/client";
|
|
3
|
+
import { useApolloClient as r, useQuery as i } from "@apollo/client/react";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
4
5
|
// src/planmagnet/automation/WorkflowSelect.tsx
|
|
5
|
-
var
|
|
6
|
+
var s = n`
|
|
6
7
|
query AutomationRunnableWorkflows($input: ListWorkflowDefinitionsInput!) {
|
|
7
8
|
workflowDefinitions(input: $input) {
|
|
8
9
|
items {
|
|
@@ -11,63 +12,136 @@ var i = e`
|
|
|
11
12
|
workflowKey
|
|
12
13
|
version
|
|
13
14
|
}
|
|
14
|
-
total
|
|
15
15
|
hasMore
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
`,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
`, c = n`
|
|
19
|
+
query AutomationSelectedWorkflow($id: ID!) {
|
|
20
|
+
workflowDefinition(id: $id) {
|
|
21
|
+
id
|
|
22
|
+
name
|
|
23
|
+
workflowKey
|
|
24
|
+
version
|
|
25
|
+
status
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
function l(e, t) {
|
|
30
|
+
let n = e.trim();
|
|
31
|
+
return {
|
|
32
|
+
status: "ACTIVE",
|
|
33
|
+
limit: 50,
|
|
34
|
+
offset: t,
|
|
35
|
+
...n ? { search: n } : {}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function u(e, t) {
|
|
39
|
+
let n = new Set(e.map((e) => e.id));
|
|
40
|
+
return [...e, ...t.filter((e) => !n.has(e.id))];
|
|
41
|
+
}
|
|
42
|
+
var d = "w-full rounded-md border border-input bg-background px-3 py-2 text-sm disabled:opacity-60", f = "w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground", p = "rounded-md border border-input bg-background px-2 py-1 text-xs hover:bg-muted disabled:opacity-60";
|
|
43
|
+
function m(n, r) {
|
|
44
|
+
let [i, a] = t(n);
|
|
45
|
+
return e(() => {
|
|
46
|
+
let e = setTimeout(() => a(n), r);
|
|
47
|
+
return () => clearTimeout(e);
|
|
48
|
+
}, [n, r]), i;
|
|
49
|
+
}
|
|
50
|
+
function h({ value: e, onChange: n }) {
|
|
51
|
+
let h = r(), [g, _] = t(""), v = m(g, 300).trim(), [y, b] = t(null), [x, S] = t(!1), [C, w] = t(null), { data: T, loading: E, error: D } = i(s, {
|
|
52
|
+
variables: { input: l(v, 0) },
|
|
26
53
|
fetchPolicy: "cache-and-network"
|
|
27
|
-
}),
|
|
28
|
-
|
|
54
|
+
}), O = y && y.search === v ? y : null, k = T?.workflowDefinitions, A = u(k?.items ?? [], O?.items ?? []), j = O ? O.hasMore : k?.hasMore ?? !1, M = O ? O.nextOffset : k?.items.length ?? 0, N = e === "" || A.some((t) => t.id === e), { data: P, error: F } = i(c, {
|
|
55
|
+
variables: { id: e },
|
|
56
|
+
skip: N || !T,
|
|
57
|
+
fetchPolicy: "cache-first"
|
|
58
|
+
}), I = N ? null : P?.workflowDefinition, L = I?.status === "ACTIVE", R = !N && (!!F || P !== void 0 && !L);
|
|
59
|
+
async function z() {
|
|
60
|
+
S(!0), w(null);
|
|
61
|
+
try {
|
|
62
|
+
let e = (await h.query({
|
|
63
|
+
query: s,
|
|
64
|
+
variables: { input: l(v, M) },
|
|
65
|
+
fetchPolicy: "network-only"
|
|
66
|
+
})).data?.workflowDefinitions;
|
|
67
|
+
if (!e) throw Error("The next page of workflows was empty.");
|
|
68
|
+
b({
|
|
69
|
+
search: v,
|
|
70
|
+
items: u(O?.items ?? [], e.items),
|
|
71
|
+
hasMore: e.hasMore,
|
|
72
|
+
nextOffset: M + e.items.length
|
|
73
|
+
});
|
|
74
|
+
} catch (e) {
|
|
75
|
+
w(e instanceof Error ? e.message : String(e));
|
|
76
|
+
} finally {
|
|
77
|
+
S(!1);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
let B = E && !T ? "Loading workflows…" : D ? "Workflows could not be loaded" : A.length === 0 ? v ? "No active workflows match this search" : "No active workflows yet" : "Choose a workflow";
|
|
81
|
+
return /* @__PURE__ */ o("div", {
|
|
29
82
|
className: "space-y-1",
|
|
30
|
-
children: [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
className:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ a("input", {
|
|
85
|
+
type: "search",
|
|
86
|
+
"aria-label": "Search workflows",
|
|
87
|
+
"data-testid": "automation-workflow-search",
|
|
88
|
+
className: f,
|
|
89
|
+
placeholder: "Search active workflows by name",
|
|
90
|
+
value: g,
|
|
91
|
+
onChange: (e) => _(e.target.value)
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ o("select", {
|
|
94
|
+
"aria-label": "Workflow",
|
|
95
|
+
"data-testid": "automation-workflow-select",
|
|
96
|
+
className: d,
|
|
97
|
+
value: e,
|
|
98
|
+
onChange: (e) => n(e.target.value),
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ a("option", {
|
|
101
|
+
value: "",
|
|
102
|
+
children: B
|
|
103
|
+
}),
|
|
104
|
+
!N && /* @__PURE__ */ a("option", {
|
|
105
|
+
value: e,
|
|
106
|
+
children: I && L ? `${I.name} (v${I.version})` : R ? "Unavailable workflow (no longer active)" : "Saved workflow"
|
|
107
|
+
}),
|
|
108
|
+
A.map((e) => /* @__PURE__ */ a("option", {
|
|
109
|
+
value: e.id,
|
|
110
|
+
children: `${e.name} (v${e.version})`
|
|
111
|
+
}, e.id))
|
|
112
|
+
]
|
|
113
|
+
}),
|
|
114
|
+
j && /* @__PURE__ */ o("div", {
|
|
115
|
+
className: "flex items-center gap-2",
|
|
116
|
+
children: [/* @__PURE__ */ a("button", {
|
|
117
|
+
type: "button",
|
|
118
|
+
"data-testid": "automation-workflow-load-more",
|
|
119
|
+
className: p,
|
|
120
|
+
disabled: x,
|
|
121
|
+
onClick: () => void z(),
|
|
122
|
+
children: x ? "Loading…" : "Load more workflows"
|
|
123
|
+
}), /* @__PURE__ */ a("span", {
|
|
124
|
+
className: "text-xs text-muted-foreground",
|
|
125
|
+
children: `${A.length} shown. Search to find a workflow faster.`
|
|
126
|
+
})]
|
|
127
|
+
}),
|
|
128
|
+
D || C ? /* @__PURE__ */ o("p", {
|
|
129
|
+
role: "alert",
|
|
130
|
+
className: "text-xs text-destructive",
|
|
131
|
+
children: ["The workflow list could not be loaded: ", D?.message ?? C]
|
|
132
|
+
}) : /* @__PURE__ */ o("p", {
|
|
133
|
+
className: "text-xs text-muted-foreground",
|
|
134
|
+
children: [
|
|
135
|
+
"Starts a run of this workflow with the PlanMagnet event as its trigger data. The workflow needs a \"Trigger manually\" or \"When called by another workflow\" start node.",
|
|
136
|
+
" ",
|
|
137
|
+
/* @__PURE__ */ a("a", {
|
|
138
|
+
href: "/workflows",
|
|
139
|
+
className: "text-primary underline underline-offset-2",
|
|
140
|
+
children: "Build and activate workflows"
|
|
141
|
+
})
|
|
142
|
+
]
|
|
143
|
+
})
|
|
144
|
+
]
|
|
71
145
|
});
|
|
72
146
|
}
|
|
73
|
-
export {
|
|
147
|
+
export { h as WorkflowSelect, u as appendWorkflowPage, l as workflowPageInput };
|
|
@@ -309,7 +309,7 @@ function L({ onCreated: e }) {
|
|
|
309
309
|
}
|
|
310
310
|
var R = d`
|
|
311
311
|
mutation CreateDialogTemplateFromProject($projectId: ID!, $name: String!, $description: String) {
|
|
312
|
-
planmagnetCreateTemplateFromProject(
|
|
312
|
+
planmagnetCreateTemplateFromProject: planmagnetCreateTemplateRecordFromProject(
|
|
313
313
|
projectId: $projectId
|
|
314
314
|
name: $name
|
|
315
315
|
description: $description
|
|
@@ -8,7 +8,7 @@ import { useI18n as s } from "@burdenoff/fe-libs/shared/providers/shell/I18nProv
|
|
|
8
8
|
// src/planmagnet/dashboards/cards/RiskSeverityCard.tsx
|
|
9
9
|
var c = n`
|
|
10
10
|
query DashboardProjectRisks($workspaceId: ID!, $projectId: String!) {
|
|
11
|
-
planmagnetRisks(
|
|
11
|
+
planmagnetRisks: planmagnetRiskRecords(
|
|
12
12
|
workspaceId: $workspaceId
|
|
13
13
|
filter: { projectId: $projectId }
|
|
14
14
|
pagination: { first: 100 }
|
|
@@ -12,7 +12,7 @@ import { Badge as h, Card as g, CardContent as _, CardHeader as v, CardTitle as
|
|
|
12
12
|
// src/planmagnet/pages/RisksRiskDetailPagePage.tsx
|
|
13
13
|
var b = d`
|
|
14
14
|
query GetRiskDetail($id: ID!) {
|
|
15
|
-
planmagnetRisk(id: $id) {
|
|
15
|
+
planmagnetRisk: planmagnetRiskRecord(id: $id) {
|
|
16
16
|
id
|
|
17
17
|
projectId
|
|
18
18
|
project {
|
|
@@ -21,7 +21,11 @@ var S = m`
|
|
|
21
21
|
}
|
|
22
22
|
`, C = m`
|
|
23
23
|
query GetRisks($workspaceId: ID!, $filter: PlanmagnetRiskFilter) {
|
|
24
|
-
planmagnetRisks
|
|
24
|
+
planmagnetRisks: planmagnetRiskRecords(
|
|
25
|
+
workspaceId: $workspaceId
|
|
26
|
+
filter: $filter
|
|
27
|
+
pagination: { first: 100 }
|
|
28
|
+
) {
|
|
25
29
|
items {
|
|
26
30
|
id
|
|
27
31
|
title
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { useEntityId as e } from "../hooks/useEntityId.js";
|
|
2
2
|
import { throwOnError as t } from "../utils/mutationResult.js";
|
|
3
3
|
import { ErrorLine as n } from "../controls/ConfirmButton.js";
|
|
4
|
-
import {
|
|
5
|
-
import { useState as
|
|
6
|
-
import { LayoutTemplate as
|
|
7
|
-
import { gql as
|
|
8
|
-
import { useMutation as
|
|
9
|
-
import { jsx as
|
|
10
|
-
import { Badge as
|
|
4
|
+
import { TemplateDeleteButton as r } from "../controls/TemplateControls.js";
|
|
5
|
+
import { useState as i } from "react";
|
|
6
|
+
import { LayoutTemplate as a, Save as o } from "lucide-react";
|
|
7
|
+
import { gql as s } from "@apollo/client";
|
|
8
|
+
import { useMutation as c, useQuery as l } from "@apollo/client/react";
|
|
9
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
10
|
+
import { Badge as f, Button as p, Card as m, CardContent as h, CardHeader as g, CardTitle as _, Input as v, Switch as y } from "@burdenoff/fe-libs/ui";
|
|
11
11
|
// src/planmagnet/pages/TemplatesEditTemplatePagePage.tsx
|
|
12
|
-
var
|
|
12
|
+
var b = s`
|
|
13
13
|
query GetTemplate($id: ID!) {
|
|
14
|
-
planmagnetProjectTemplate(id: $id) {
|
|
14
|
+
planmagnetProjectTemplate: planmagnetProjectTemplateRecord(id: $id) {
|
|
15
15
|
id
|
|
16
16
|
name
|
|
17
17
|
description
|
|
@@ -26,9 +26,9 @@ var x = c`
|
|
|
26
26
|
customFieldsConfig
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
`,
|
|
29
|
+
`, x = s`
|
|
30
30
|
mutation UpdateProjectTemplate($id: ID!, $input: PlanmagnetUpdateProjectTemplateInput!) {
|
|
31
|
-
planmagnetUpdateProjectTemplate(id: $id, input: $input) {
|
|
31
|
+
planmagnetUpdateProjectTemplate: planmagnetUpdateProjectTemplateRecord(id: $id, input: $input) {
|
|
32
32
|
id
|
|
33
33
|
name
|
|
34
34
|
description
|
|
@@ -41,8 +41,8 @@ var x = c`
|
|
|
41
41
|
customFieldsConfig
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
`,
|
|
45
|
-
function
|
|
44
|
+
`, S = (e) => e == null ? "" : JSON.stringify(e, null, 2);
|
|
45
|
+
function C(e) {
|
|
46
46
|
if (e.trim() === "") return {
|
|
47
47
|
ok: !0,
|
|
48
48
|
value: null
|
|
@@ -59,18 +59,18 @@ function w(e) {
|
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
return /* @__PURE__ */
|
|
64
|
-
/* @__PURE__ */
|
|
62
|
+
function w({ id: e, label: t, hint: r, value: i, onChange: a, error: o }) {
|
|
63
|
+
return /* @__PURE__ */ d("div", { children: [
|
|
64
|
+
/* @__PURE__ */ u("label", {
|
|
65
65
|
htmlFor: e,
|
|
66
66
|
className: "text-sm font-medium",
|
|
67
67
|
children: t
|
|
68
68
|
}),
|
|
69
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ u("p", {
|
|
70
70
|
className: "text-xs text-muted-foreground",
|
|
71
71
|
children: r
|
|
72
72
|
}),
|
|
73
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ u("textarea", {
|
|
74
74
|
id: e,
|
|
75
75
|
spellCheck: !1,
|
|
76
76
|
className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-xs min-h-[100px] disabled:opacity-60",
|
|
@@ -78,166 +78,166 @@ function T({ id: e, label: t, hint: r, value: i, onChange: a, error: o }) {
|
|
|
78
78
|
onChange: (e) => a(e.target.value),
|
|
79
79
|
"aria-invalid": !!o
|
|
80
80
|
}),
|
|
81
|
-
o && /* @__PURE__ */
|
|
81
|
+
o && /* @__PURE__ */ u(n, { message: o })
|
|
82
82
|
] });
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
let
|
|
86
|
-
variables: { id:
|
|
87
|
-
skip: !
|
|
84
|
+
function T() {
|
|
85
|
+
let s = e(), { data: T, loading: E, error: D } = l(b, {
|
|
86
|
+
variables: { id: s ?? "" },
|
|
87
|
+
skip: !s,
|
|
88
88
|
fetchPolicy: "cache-and-network"
|
|
89
|
-
}), [
|
|
90
|
-
if (
|
|
91
|
-
name:
|
|
92
|
-
description:
|
|
93
|
-
category:
|
|
94
|
-
tags:
|
|
95
|
-
isPublished:
|
|
96
|
-
configuration:
|
|
97
|
-
boardConfig:
|
|
98
|
-
sprintConfig:
|
|
99
|
-
customFieldsConfig:
|
|
100
|
-
})), !
|
|
89
|
+
}), [O, { loading: k }] = c(x, { refetchQueries: [b] }), A = T?.planmagnetProjectTemplate ?? null, [j, M] = i(null), [N, P] = i(null), [F, I] = i(!1), [L, R] = i(null);
|
|
90
|
+
if (A && L !== A.id && (R(A.id), M({
|
|
91
|
+
name: A.name,
|
|
92
|
+
description: A.description ?? "",
|
|
93
|
+
category: A.category ?? "",
|
|
94
|
+
tags: A.tags.join(", "),
|
|
95
|
+
isPublished: A.isPublished,
|
|
96
|
+
configuration: S(A.configuration),
|
|
97
|
+
boardConfig: S(A.boardConfig),
|
|
98
|
+
sprintConfig: S(A.sprintConfig),
|
|
99
|
+
customFieldsConfig: S(A.customFieldsConfig)
|
|
100
|
+
})), !s) return /* @__PURE__ */ u("div", {
|
|
101
101
|
className: "p-6 text-muted-foreground",
|
|
102
102
|
children: "No template selected. Open one from the list."
|
|
103
103
|
});
|
|
104
|
-
if (
|
|
104
|
+
if (E && !T) return /* @__PURE__ */ u("div", {
|
|
105
105
|
className: "flex items-center justify-center p-12",
|
|
106
|
-
children: /* @__PURE__ */
|
|
106
|
+
children: /* @__PURE__ */ u("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
|
|
107
107
|
});
|
|
108
|
-
if (
|
|
108
|
+
if (D) return /* @__PURE__ */ d("div", {
|
|
109
109
|
className: "p-6 text-destructive",
|
|
110
|
-
children: ["Template could not be loaded: ",
|
|
110
|
+
children: ["Template could not be loaded: ", D.message]
|
|
111
111
|
});
|
|
112
|
-
if (!
|
|
112
|
+
if (!A || !j) return /* @__PURE__ */ u("div", {
|
|
113
113
|
className: "p-6 text-muted-foreground",
|
|
114
114
|
children: "Template not found."
|
|
115
115
|
});
|
|
116
|
-
let
|
|
116
|
+
let z = C(j.configuration), B = C(j.boardConfig), V = C(j.sprintConfig), H = C(j.customFieldsConfig), U = [
|
|
117
|
+
z,
|
|
117
118
|
B,
|
|
118
119
|
V,
|
|
119
|
-
H
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
if (F(null), L(!1), W > 0 || !B.ok || !V.ok || !H.ok || !U.ok) return;
|
|
120
|
+
H
|
|
121
|
+
].filter((e) => !e.ok).length, W = async () => {
|
|
122
|
+
if (P(null), I(!1), U > 0 || !z.ok || !B.ok || !V.ok || !H.ok) return;
|
|
123
123
|
let e = {};
|
|
124
|
-
|
|
125
|
-
let n =
|
|
126
|
-
if (JSON.stringify(n) !== JSON.stringify(
|
|
124
|
+
j.name.trim() !== A.name && (e.name = j.name.trim()), j.description.trim() !== (A.description ?? "") && (e.description = j.description.trim() || null), j.category.trim() !== (A.category ?? "") && (e.category = j.category.trim() || null), j.isPublished !== A.isPublished && (e.isPublished = j.isPublished);
|
|
125
|
+
let n = j.tags.split(",").map((e) => e.trim()).filter(Boolean);
|
|
126
|
+
if (JSON.stringify(n) !== JSON.stringify(A.tags) && (e.tags = n), j.configuration !== S(A.configuration) && (e.configuration = z.value), j.boardConfig !== S(A.boardConfig) && (e.boardConfig = B.value), j.sprintConfig !== S(A.sprintConfig) && (e.sprintConfig = V.value), j.customFieldsConfig !== S(A.customFieldsConfig) && (e.customFieldsConfig = H.value), Object.keys(e).length === 0) I(!0);
|
|
127
127
|
else try {
|
|
128
|
-
await t(
|
|
129
|
-
id:
|
|
128
|
+
await t(O({ variables: {
|
|
129
|
+
id: A.id,
|
|
130
130
|
input: e
|
|
131
|
-
} })),
|
|
131
|
+
} })), I(!0);
|
|
132
132
|
} catch (e) {
|
|
133
|
-
|
|
133
|
+
P(e instanceof Error ? e.message : "The template could not be saved.");
|
|
134
134
|
}
|
|
135
135
|
};
|
|
136
|
-
return /* @__PURE__ */
|
|
136
|
+
return /* @__PURE__ */ d("div", {
|
|
137
137
|
className: "space-y-6 p-6 max-w-3xl",
|
|
138
138
|
children: [
|
|
139
|
-
/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ d("div", {
|
|
140
140
|
className: "flex flex-wrap items-start justify-between gap-3",
|
|
141
|
-
children: [/* @__PURE__ */
|
|
141
|
+
children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("div", {
|
|
142
142
|
className: "flex items-center gap-2",
|
|
143
|
-
children: [/* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ u("h1", {
|
|
144
144
|
className: "text-2xl font-semibold",
|
|
145
|
-
children:
|
|
146
|
-
}),
|
|
145
|
+
children: A.name
|
|
146
|
+
}), A.isBuiltIn && /* @__PURE__ */ u(f, {
|
|
147
147
|
variant: "secondary",
|
|
148
148
|
children: "Built-in"
|
|
149
149
|
})]
|
|
150
|
-
}), /* @__PURE__ */
|
|
150
|
+
}), /* @__PURE__ */ d("p", {
|
|
151
151
|
className: "text-sm text-muted-foreground",
|
|
152
152
|
children: [
|
|
153
153
|
"Used ",
|
|
154
|
-
|
|
154
|
+
A.usageCount,
|
|
155
155
|
" time",
|
|
156
|
-
|
|
156
|
+
A.usageCount === 1 ? "" : "s"
|
|
157
157
|
]
|
|
158
|
-
})] }), /* @__PURE__ */
|
|
159
|
-
templateId:
|
|
160
|
-
name:
|
|
161
|
-
isBuiltIn:
|
|
158
|
+
})] }), /* @__PURE__ */ u(r, {
|
|
159
|
+
templateId: A.id,
|
|
160
|
+
name: A.name,
|
|
161
|
+
isBuiltIn: A.isBuiltIn
|
|
162
162
|
})]
|
|
163
163
|
}),
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
N && /* @__PURE__ */ u(n, { message: N }),
|
|
165
|
+
F && !N && /* @__PURE__ */ u("p", {
|
|
166
166
|
className: "text-sm text-muted-foreground",
|
|
167
167
|
children: "Saved."
|
|
168
168
|
}),
|
|
169
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ d(m, { children: [/* @__PURE__ */ u(g, { children: /* @__PURE__ */ d(_, {
|
|
170
170
|
className: "flex items-center gap-2",
|
|
171
|
-
children: [/* @__PURE__ */
|
|
172
|
-
}) }), /* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ u(a, { className: "h-4 w-4" }), "Template details"]
|
|
172
|
+
}) }), /* @__PURE__ */ d(h, {
|
|
173
173
|
className: "space-y-4",
|
|
174
174
|
children: [
|
|
175
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
176
176
|
htmlFor: "template-name",
|
|
177
177
|
className: "text-sm font-medium",
|
|
178
178
|
children: "Name"
|
|
179
|
-
}), /* @__PURE__ */
|
|
179
|
+
}), /* @__PURE__ */ u(v, {
|
|
180
180
|
id: "template-name",
|
|
181
181
|
className: "mt-1",
|
|
182
|
-
value:
|
|
183
|
-
onChange: (e) =>
|
|
184
|
-
...
|
|
182
|
+
value: j.name,
|
|
183
|
+
onChange: (e) => M({
|
|
184
|
+
...j,
|
|
185
185
|
name: e.target.value
|
|
186
186
|
})
|
|
187
187
|
})] }),
|
|
188
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
189
189
|
htmlFor: "template-description",
|
|
190
190
|
className: "text-sm font-medium",
|
|
191
191
|
children: "Description"
|
|
192
|
-
}), /* @__PURE__ */
|
|
192
|
+
}), /* @__PURE__ */ u("textarea", {
|
|
193
193
|
id: "template-description",
|
|
194
194
|
className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[72px]",
|
|
195
|
-
value:
|
|
196
|
-
onChange: (e) =>
|
|
197
|
-
...
|
|
195
|
+
value: j.description,
|
|
196
|
+
onChange: (e) => M({
|
|
197
|
+
...j,
|
|
198
198
|
description: e.target.value
|
|
199
199
|
})
|
|
200
200
|
})] }),
|
|
201
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ d("div", {
|
|
202
202
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
203
|
-
children: [/* @__PURE__ */
|
|
203
|
+
children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
204
204
|
htmlFor: "template-category",
|
|
205
205
|
className: "text-sm font-medium",
|
|
206
206
|
children: "Category"
|
|
207
|
-
}), /* @__PURE__ */
|
|
207
|
+
}), /* @__PURE__ */ u(v, {
|
|
208
208
|
id: "template-category",
|
|
209
209
|
className: "mt-1",
|
|
210
|
-
value:
|
|
211
|
-
onChange: (e) =>
|
|
212
|
-
...
|
|
210
|
+
value: j.category,
|
|
211
|
+
onChange: (e) => M({
|
|
212
|
+
...j,
|
|
213
213
|
category: e.target.value
|
|
214
214
|
}),
|
|
215
215
|
placeholder: "e.g. Engineering"
|
|
216
|
-
})] }), /* @__PURE__ */
|
|
216
|
+
})] }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
217
217
|
htmlFor: "template-tags",
|
|
218
218
|
className: "text-sm font-medium",
|
|
219
219
|
children: "Tags (comma-separated)"
|
|
220
|
-
}), /* @__PURE__ */
|
|
220
|
+
}), /* @__PURE__ */ u(v, {
|
|
221
221
|
id: "template-tags",
|
|
222
222
|
className: "mt-1",
|
|
223
|
-
value:
|
|
224
|
-
onChange: (e) =>
|
|
225
|
-
...
|
|
223
|
+
value: j.tags,
|
|
224
|
+
onChange: (e) => M({
|
|
225
|
+
...j,
|
|
226
226
|
tags: e.target.value
|
|
227
227
|
}),
|
|
228
228
|
placeholder: "agile, web"
|
|
229
229
|
})] })]
|
|
230
230
|
}),
|
|
231
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ d("div", {
|
|
232
232
|
className: "flex items-center gap-2",
|
|
233
|
-
children: [/* @__PURE__ */
|
|
233
|
+
children: [/* @__PURE__ */ u(y, {
|
|
234
234
|
id: "template-published",
|
|
235
|
-
checked:
|
|
236
|
-
onCheckedChange: (e) =>
|
|
237
|
-
...
|
|
235
|
+
checked: j.isPublished,
|
|
236
|
+
onCheckedChange: (e) => M({
|
|
237
|
+
...j,
|
|
238
238
|
isPublished: e
|
|
239
239
|
})
|
|
240
|
-
}), /* @__PURE__ */
|
|
240
|
+
}), /* @__PURE__ */ u("label", {
|
|
241
241
|
htmlFor: "template-published",
|
|
242
242
|
className: "text-sm",
|
|
243
243
|
children: "Published — available to start new projects from"
|
|
@@ -245,66 +245,66 @@ function E() {
|
|
|
245
245
|
})
|
|
246
246
|
]
|
|
247
247
|
})] }),
|
|
248
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ d(m, { children: [/* @__PURE__ */ u(g, { children: /* @__PURE__ */ u(_, { children: "Advanced configuration" }) }), /* @__PURE__ */ d(h, {
|
|
249
249
|
className: "space-y-4",
|
|
250
250
|
children: [
|
|
251
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ u(w, {
|
|
252
252
|
id: "template-configuration",
|
|
253
253
|
label: "Configuration",
|
|
254
254
|
hint: "Project settings and work item types applied when this template is used.",
|
|
255
|
-
value:
|
|
256
|
-
onChange: (e) =>
|
|
257
|
-
...
|
|
255
|
+
value: j.configuration,
|
|
256
|
+
onChange: (e) => M({
|
|
257
|
+
...j,
|
|
258
258
|
configuration: e
|
|
259
259
|
}),
|
|
260
|
-
error:
|
|
260
|
+
error: z.ok ? null : z.error
|
|
261
261
|
}),
|
|
262
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ u(w, {
|
|
263
263
|
id: "template-board-config",
|
|
264
264
|
label: "Board layout",
|
|
265
265
|
hint: "Optional. Leave empty to clear.",
|
|
266
|
-
value:
|
|
267
|
-
onChange: (e) =>
|
|
268
|
-
...
|
|
266
|
+
value: j.boardConfig,
|
|
267
|
+
onChange: (e) => M({
|
|
268
|
+
...j,
|
|
269
269
|
boardConfig: e
|
|
270
270
|
}),
|
|
271
|
-
error:
|
|
271
|
+
error: B.ok ? null : B.error
|
|
272
272
|
}),
|
|
273
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ u(w, {
|
|
274
274
|
id: "template-sprint-config",
|
|
275
275
|
label: "Default sprint configuration",
|
|
276
276
|
hint: "Optional. Leave empty to clear.",
|
|
277
|
-
value:
|
|
278
|
-
onChange: (e) =>
|
|
279
|
-
...
|
|
277
|
+
value: j.sprintConfig,
|
|
278
|
+
onChange: (e) => M({
|
|
279
|
+
...j,
|
|
280
280
|
sprintConfig: e
|
|
281
281
|
}),
|
|
282
|
-
error:
|
|
282
|
+
error: V.ok ? null : V.error
|
|
283
283
|
}),
|
|
284
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ u(w, {
|
|
285
285
|
id: "template-custom-fields-config",
|
|
286
286
|
label: "Custom field definitions",
|
|
287
287
|
hint: "Optional. Leave empty to clear.",
|
|
288
|
-
value:
|
|
289
|
-
onChange: (e) =>
|
|
290
|
-
...
|
|
288
|
+
value: j.customFieldsConfig,
|
|
289
|
+
onChange: (e) => M({
|
|
290
|
+
...j,
|
|
291
291
|
customFieldsConfig: e
|
|
292
292
|
}),
|
|
293
|
-
error:
|
|
293
|
+
error: H.ok ? null : H.error
|
|
294
294
|
})
|
|
295
295
|
]
|
|
296
296
|
})] }),
|
|
297
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ u("div", {
|
|
298
298
|
className: "flex justify-end",
|
|
299
|
-
children: /* @__PURE__ */
|
|
299
|
+
children: /* @__PURE__ */ d(p, {
|
|
300
300
|
size: "sm",
|
|
301
|
-
onClick: () => void
|
|
302
|
-
disabled:
|
|
301
|
+
onClick: () => void W(),
|
|
302
|
+
disabled: k || U > 0,
|
|
303
303
|
"data-testid": "template-save",
|
|
304
|
-
children: [/* @__PURE__ */
|
|
304
|
+
children: [/* @__PURE__ */ u(o, { className: "mr-1 h-4 w-4" }), k ? "Saving…" : "Save changes"]
|
|
305
305
|
})
|
|
306
306
|
})
|
|
307
307
|
]
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
|
-
export {
|
|
310
|
+
export { T as TemplatesEditTemplatePagePage };
|
|
@@ -15,7 +15,7 @@ var x = p`
|
|
|
15
15
|
$filter: PlanmagnetProjectTemplateFilter
|
|
16
16
|
$pagination: PlanmagnetPaginationInput
|
|
17
17
|
) {
|
|
18
|
-
planmagnetProjectTemplates(
|
|
18
|
+
planmagnetProjectTemplates: planmagnetProjectTemplateRecords(
|
|
19
19
|
workspaceId: $workspaceId
|
|
20
20
|
filter: $filter
|
|
21
21
|
pagination: $pagination
|