synapse-react-client 4.0.31 → 4.0.32
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/SWC.index.js +1 -1
- package/dist/components/SynapseChat/SynapseChat.js +1 -1
- package/dist/components/SynapseChat/SynapseChat.js.map +1 -1
- package/dist/features/curator/dashboard/components/CurationTaskCardLayout.js +1 -1
- package/dist/features/curator/dashboard/components/CurationTaskCardLayout.js.map +1 -1
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js +131 -131
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js.map +1 -1
- package/dist/features/entity/metadata-task/create-task/useCurationTaskFormState.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/create-task/useCurationTaskFormState.js +21 -18
- package/dist/features/entity/metadata-task/create-task/useCurationTaskFormState.js.map +1 -1
- package/dist/features/entity/metadata-task/utils/dueDate.d.ts +1 -1
- package/dist/features/entity/metadata-task/utils/dueDate.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -17,155 +17,155 @@ import re from "../../../../components/WizardChoiceButton/WizardChoiceButtonGrou
|
|
|
17
17
|
import "../../../../components/styled/index.js";
|
|
18
18
|
import { useCreateCurationTask as ie, useDeleteCurationTask as ae, useGetCurationTaskStatus as oe, useUpdateCurationTask as se, useUpdateCurationTaskStatus as ce } from "../../../../synapse-queries/curation/task/useCurationTask.js";
|
|
19
19
|
import { AUTH_MODE_NONE_TITLE as le, AUTH_MODE_NONE_TOOLTIP as ue, AUTH_MODE_SESSION_OWNER_TITLE as de, AUTH_MODE_SESSION_OWNER_TOOLTIP as fe, AUTH_MODE_SOURCE_BENEFACTOR_TITLE as pe, AUTH_MODE_SOURCE_BENEFACTOR_TOOLTIP as me, COLLABORATORS_TOOLTIP as he, CREATE_CURATION_TASK_DIALOG_TITLE as ge, DELETE_CURATION_TASK_CONFIRMATION_PROMPT as _e, DELETE_CURATION_TASK_DIALOG_TITLE as ve, DELETE_CURATION_TASK_ERROR_TOAST_PREFIX as ye, DELETE_CURATION_TASK_GRID_SESSION_WARNING as be, DELETE_CURATION_TASK_SUCCESS_TOAST as xe, EDIT_CURATION_TASK_DIALOG_TITLE as Se, FILE_BASED_FILE_VIEW_INPUT_DESCRIPTION as Ce, FILE_BASED_TASK_DESCRIPTION as we, FILE_BASED_TASK_TITLE as Te, FILE_BASED_UPLOAD_FOLDER_INPUT_DESCRIPTION as Ee, FILE_VIEW_FINDER_PROMPT as De, FILE_VIEW_FINDER_TITLE as Oe, RECORD_BASED_RECORD_SET_INPUT_DESCRIPTION as ke, RECORD_BASED_TASK_DESCRIPTION as Ae, RECORD_BASED_TASK_TITLE as je, RECORD_SET_FINDER_PROMPT as Me, RECORD_SET_FINDER_TITLE as Ne, SELECT_TASK_TYPE_DESCRIPTION as Pe, TASK_INSTRUCTIONS_INPUT_DESCRIPTION as Fe, TASK_NAME_INPUT_DESCRIPTION as Ie, TASK_STATUS_CONFIG as Le, UPLOAD_FOLDER_FINDER_PROMPT as Re, UPLOAD_FOLDER_FINDER_TITLE as ze } from "../utils/constants.js";
|
|
20
|
-
import { dueDateInputToIso as Be, isoToDueDateInput as
|
|
21
|
-
import { instanceOfGridSupportedTaskProperties as
|
|
22
|
-
import
|
|
23
|
-
import { useState as
|
|
24
|
-
import { Alert as
|
|
25
|
-
import { Fragment as
|
|
26
|
-
import { TYPE_FILTER as
|
|
27
|
-
import { EntityType as
|
|
28
|
-
import { HelpTwoTone as
|
|
29
|
-
import
|
|
30
|
-
import
|
|
20
|
+
import { dueDateInputToIso as Be, isoToDueDateInput as Ve } from "../utils/dueDate.js";
|
|
21
|
+
import { instanceOfGridSupportedTaskProperties as l } from "../utils/types.js";
|
|
22
|
+
import u from "../../../../components/EntityFinder/EntityIdTextField.js";
|
|
23
|
+
import { useState as d } from "react";
|
|
24
|
+
import { Alert as f, Box as p, Button as m, FormControl as He, FormControlLabel as h, FormLabel as Ue, Grid as g, IconButton as We, InputLabel as _, MenuItem as Ge, Radio as v, RadioGroup as Ke, Select as qe, Stack as y, Tooltip as b, Typography as x } from "@mui/material";
|
|
25
|
+
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
26
|
+
import { TYPE_FILTER as T } from "@sage-bionetworks/synapse-types";
|
|
27
|
+
import { EntityType as E, FileBasedMetadataTaskPropertiesConcreteTypeEnum as D, RecordBasedMetadataTaskPropertiesConcreteTypeEnum as O, TaskStatusStateEnum as Je } from "@sage-bionetworks/synapse-client";
|
|
28
|
+
import { HelpTwoTone as k } from "@mui/icons-material";
|
|
29
|
+
import A from "lodash-es/noop";
|
|
30
|
+
import Ye from "@mui/icons-material/Close";
|
|
31
31
|
//#region src/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.tsx
|
|
32
|
-
var
|
|
33
|
-
function
|
|
32
|
+
var j = D.org_sagebionetworks_repo_model_curation_metadata_FileBasedMetadataTaskProperties, M = O.org_sagebionetworks_repo_model_curation_metadata_RecordBasedMetadataTaskProperties;
|
|
33
|
+
function Xe(e) {
|
|
34
34
|
return e === "SESSION_OWNER" || e === "SOURCE_BENEFACTOR" ? e : "NONE";
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
let { open:
|
|
36
|
+
function N(D) {
|
|
37
|
+
let { open: O, onCancel: N, onSuccess: P, onDeleteSuccess: Ze = A, projectId: F, task: I } = D, L = I !== void 0, { data: Qe } = n(F), $e = Qe?.canDelete && L && I?.taskId != null && D.onDeleteSuccess != null, [et, R] = d(!1), [tt, z] = d(() => I ? "COMMON_MUTABLE_FIELDS" : "SELECT_TYPE"), [B, nt] = d(() => {
|
|
38
38
|
let e = I?.taskProperties?.concreteType;
|
|
39
|
-
return e ===
|
|
40
|
-
}), [rt, it] =
|
|
39
|
+
return e === j || e === M ? e : null;
|
|
40
|
+
}), [rt, it] = d(() => I?.dataType ?? ""), [at, ot] = d(() => I?.instructions ?? ""), [st, ct] = d(() => I?.assigneePrincipalId), lt = I?.taskProperties && l(I?.taskProperties) ? Xe(I?.taskProperties?.suggestedAuthorizationMode) : "NONE", [V, ut] = d(lt), [dt] = d(lt), [H, ft] = d(() => {
|
|
41
41
|
let e = I?.taskProperties;
|
|
42
|
-
return e?.concreteType ===
|
|
43
|
-
}), [U, pt] =
|
|
42
|
+
return e?.concreteType === j ? e.uploadFolderId ?? "" : "";
|
|
43
|
+
}), [U, pt] = d(() => {
|
|
44
44
|
let e = I?.taskProperties;
|
|
45
|
-
return e?.concreteType ===
|
|
46
|
-
}), [W, mt] =
|
|
45
|
+
return e?.concreteType === j ? e.fileViewId ?? "" : "";
|
|
46
|
+
}), [W, mt] = d(() => {
|
|
47
47
|
let e = I?.taskProperties;
|
|
48
|
-
return e?.concreteType ===
|
|
49
|
-
}), [G, ht] =
|
|
48
|
+
return e?.concreteType === M ? e.recordSetId ?? "" : "";
|
|
49
|
+
}), [G, ht] = d(() => (I && I.taskProperties && l(I.taskProperties) ? I.taskProperties.collaboratorPrincipalIds : void 0) ?? []), [K, gt] = d(null), { data: q, isFetching: _t } = oe(I?.taskId ?? 0, { enabled: L && I?.taskId != null }), [J, vt] = d(void 0), yt = J ?? q?.state, [Y, bt] = d(void 0), xt = Y ?? (L ? Ve(I?.dueDate) : ""), { mutateAsync: St, isPending: Ct, error: wt } = ie(), { mutateAsync: Tt, isPending: Et, error: Dt } = se(), { mutateAsync: Ot, isPending: kt, error: At } = ce(), { mutate: jt, isPending: Mt } = ae({
|
|
50
50
|
onSuccess: () => {
|
|
51
|
-
e(xe, "success"), R(!1),
|
|
51
|
+
e(xe, "success"), R(!1), Ze();
|
|
52
52
|
},
|
|
53
53
|
onError: (t) => {
|
|
54
54
|
e(ye + t.message, "danger");
|
|
55
55
|
}
|
|
56
|
-
}), X =
|
|
57
|
-
function
|
|
56
|
+
}), X = Ct || Et || Mt || kt, Z = wt ?? Dt ?? At, Nt = B === j && H && U || B === M && W;
|
|
57
|
+
function Pt() {
|
|
58
58
|
let e = V === "NONE" ? void 0 : V, t = B, n, r = G.length > 0 ? G : void 0;
|
|
59
|
-
return n = t ===
|
|
60
|
-
concreteType:
|
|
59
|
+
return n = t === j ? {
|
|
60
|
+
concreteType: j,
|
|
61
61
|
uploadFolderId: H || void 0,
|
|
62
62
|
fileViewId: U || void 0,
|
|
63
63
|
suggestedAuthorizationMode: e,
|
|
64
64
|
collaboratorPrincipalIds: r
|
|
65
65
|
} : {
|
|
66
|
-
concreteType:
|
|
66
|
+
concreteType: M,
|
|
67
67
|
recordSetId: W || void 0,
|
|
68
68
|
suggestedAuthorizationMode: e,
|
|
69
69
|
collaboratorPrincipalIds: r
|
|
70
70
|
}, {
|
|
71
71
|
...L ? I : {},
|
|
72
|
-
projectId:
|
|
72
|
+
projectId: F,
|
|
73
73
|
dataType: rt || void 0,
|
|
74
74
|
instructions: at || void 0,
|
|
75
75
|
assigneePrincipalId: st || void 0,
|
|
76
|
+
dueDate: Y === void 0 ? I?.dueDate : Be(Y),
|
|
76
77
|
taskProperties: n
|
|
77
78
|
};
|
|
78
79
|
}
|
|
79
|
-
async function
|
|
80
|
-
let e =
|
|
80
|
+
async function Ft() {
|
|
81
|
+
let e = Pt();
|
|
81
82
|
if (L) {
|
|
82
|
-
let t = await
|
|
83
|
-
|
|
83
|
+
let t = await Tt(e);
|
|
84
|
+
J !== void 0 && J !== q?.state && q != null && await Ot({
|
|
84
85
|
...q,
|
|
85
86
|
state: J ?? q.state,
|
|
86
|
-
dueDate: Y === void 0 ? q.dueDate : Be(xt),
|
|
87
87
|
etag: t.etag
|
|
88
|
-
}),
|
|
89
|
-
} else
|
|
88
|
+
}), P(t);
|
|
89
|
+
} else P(await St(e));
|
|
90
90
|
}
|
|
91
|
-
let
|
|
91
|
+
let It = L && V !== dt, Lt = /* @__PURE__ */ w(He, { children: [/* @__PURE__ */ C(Ue, { children: "Authorization Mode" }), /* @__PURE__ */ w(Ke, {
|
|
92
92
|
value: V,
|
|
93
93
|
onChange: (e, t) => ut(t),
|
|
94
94
|
children: [
|
|
95
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ C(h, {
|
|
96
96
|
value: "NONE",
|
|
97
|
-
control: /* @__PURE__ */
|
|
98
|
-
label: /* @__PURE__ */
|
|
97
|
+
control: /* @__PURE__ */ C(v, {}),
|
|
98
|
+
label: /* @__PURE__ */ w(p, {
|
|
99
99
|
sx: {
|
|
100
100
|
display: "flex",
|
|
101
101
|
alignItems: "center",
|
|
102
102
|
gap: .5
|
|
103
103
|
},
|
|
104
|
-
children: [/* @__PURE__ */
|
|
104
|
+
children: [/* @__PURE__ */ C(x, {
|
|
105
105
|
variant: "body1",
|
|
106
106
|
children: le
|
|
107
|
-
}), /* @__PURE__ */
|
|
107
|
+
}), /* @__PURE__ */ C(b, {
|
|
108
108
|
title: ue,
|
|
109
|
-
children: /* @__PURE__ */
|
|
109
|
+
children: /* @__PURE__ */ C(k, { sx: { color: "grey.700" } })
|
|
110
110
|
})]
|
|
111
111
|
})
|
|
112
112
|
}),
|
|
113
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ C(h, {
|
|
114
114
|
value: "SESSION_OWNER",
|
|
115
|
-
control: /* @__PURE__ */
|
|
116
|
-
label: /* @__PURE__ */
|
|
115
|
+
control: /* @__PURE__ */ C(v, {}),
|
|
116
|
+
label: /* @__PURE__ */ w(p, {
|
|
117
117
|
sx: {
|
|
118
118
|
display: "flex",
|
|
119
119
|
alignItems: "center",
|
|
120
120
|
gap: .5
|
|
121
121
|
},
|
|
122
|
-
children: [/* @__PURE__ */
|
|
122
|
+
children: [/* @__PURE__ */ C(x, {
|
|
123
123
|
variant: "body1",
|
|
124
124
|
children: de
|
|
125
|
-
}), /* @__PURE__ */
|
|
125
|
+
}), /* @__PURE__ */ C(b, {
|
|
126
126
|
title: fe,
|
|
127
|
-
children: /* @__PURE__ */
|
|
127
|
+
children: /* @__PURE__ */ C(k, { sx: { color: "grey.700" } })
|
|
128
128
|
})]
|
|
129
129
|
})
|
|
130
130
|
}),
|
|
131
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ C(h, {
|
|
132
132
|
value: "SOURCE_BENEFACTOR",
|
|
133
|
-
control: /* @__PURE__ */
|
|
134
|
-
label: /* @__PURE__ */
|
|
133
|
+
control: /* @__PURE__ */ C(v, {}),
|
|
134
|
+
label: /* @__PURE__ */ w(p, {
|
|
135
135
|
sx: {
|
|
136
136
|
display: "flex",
|
|
137
137
|
alignItems: "center",
|
|
138
138
|
gap: .5
|
|
139
139
|
},
|
|
140
|
-
children: [/* @__PURE__ */
|
|
140
|
+
children: [/* @__PURE__ */ C(x, {
|
|
141
141
|
variant: "body1",
|
|
142
142
|
children: pe
|
|
143
|
-
}), /* @__PURE__ */
|
|
143
|
+
}), /* @__PURE__ */ C(b, {
|
|
144
144
|
title: me,
|
|
145
|
-
children: /* @__PURE__ */
|
|
145
|
+
children: /* @__PURE__ */ C(k, { sx: { color: "grey.700" } })
|
|
146
146
|
})]
|
|
147
147
|
})
|
|
148
148
|
})
|
|
149
149
|
]
|
|
150
|
-
})] }),
|
|
150
|
+
})] }), Rt = /* @__PURE__ */ w(p, { children: [/* @__PURE__ */ C(p, {
|
|
151
151
|
sx: {
|
|
152
152
|
display: "flex",
|
|
153
153
|
alignItems: "center",
|
|
154
154
|
gap: .5
|
|
155
155
|
},
|
|
156
|
-
children: /* @__PURE__ */
|
|
156
|
+
children: /* @__PURE__ */ C(_, {
|
|
157
157
|
htmlFor: "dlg-set-task-assignee",
|
|
158
158
|
children: "Assignee"
|
|
159
159
|
})
|
|
160
|
-
}), /* @__PURE__ */
|
|
160
|
+
}), /* @__PURE__ */ C(a, {
|
|
161
161
|
inputId: "dlg-set-task-assignee",
|
|
162
162
|
defaultValue: st,
|
|
163
163
|
onChange: (e) => ct(e ?? void 0),
|
|
164
|
-
typeFilter:
|
|
165
|
-
},
|
|
164
|
+
typeFilter: T.ALL
|
|
165
|
+
}, O.toString())] }), zt = /* @__PURE__ */ w(y, {
|
|
166
166
|
gap: 2,
|
|
167
167
|
children: [
|
|
168
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ C(i, {
|
|
169
169
|
label: "Task Name",
|
|
170
170
|
fullWidth: !0,
|
|
171
171
|
value: rt,
|
|
@@ -173,7 +173,7 @@ function P(O) {
|
|
|
173
173
|
required: !0,
|
|
174
174
|
description: Ie
|
|
175
175
|
}),
|
|
176
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ C(i, {
|
|
177
177
|
label: "Instructions",
|
|
178
178
|
fullWidth: !0,
|
|
179
179
|
multiline: !0,
|
|
@@ -182,33 +182,33 @@ function P(O) {
|
|
|
182
182
|
onChange: (e) => ot(e.target.value),
|
|
183
183
|
description: Fe
|
|
184
184
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ w(p, {
|
|
186
186
|
display: "none",
|
|
187
|
-
children: [/* @__PURE__ */
|
|
187
|
+
children: [/* @__PURE__ */ w(p, {
|
|
188
188
|
sx: {
|
|
189
189
|
display: "flex",
|
|
190
190
|
alignItems: "center",
|
|
191
191
|
gap: .5
|
|
192
192
|
},
|
|
193
|
-
children: [/* @__PURE__ */
|
|
193
|
+
children: [/* @__PURE__ */ C(_, { children: "Collaborators" }), /* @__PURE__ */ C(b, {
|
|
194
194
|
title: he,
|
|
195
|
-
children: /* @__PURE__ */
|
|
195
|
+
children: /* @__PURE__ */ C("div", { children: /* @__PURE__ */ C(k, { sx: { color: "grey.700" } }) })
|
|
196
196
|
})]
|
|
197
|
-
}), /* @__PURE__ */
|
|
197
|
+
}), /* @__PURE__ */ w(y, {
|
|
198
198
|
gap: 1,
|
|
199
|
-
children: [/* @__PURE__ */
|
|
199
|
+
children: [/* @__PURE__ */ w(y, {
|
|
200
200
|
direction: "row",
|
|
201
201
|
gap: 1,
|
|
202
202
|
alignItems: "center",
|
|
203
|
-
children: [/* @__PURE__ */
|
|
203
|
+
children: [/* @__PURE__ */ C(p, {
|
|
204
204
|
flex: 1,
|
|
205
|
-
children: /* @__PURE__ */
|
|
205
|
+
children: /* @__PURE__ */ C(a, {
|
|
206
206
|
value: K,
|
|
207
207
|
onChange: (e) => gt(e),
|
|
208
|
-
typeFilter:
|
|
208
|
+
typeFilter: T.ALL,
|
|
209
209
|
placeholder: "Search for a user or team"
|
|
210
210
|
})
|
|
211
|
-
}), /* @__PURE__ */
|
|
211
|
+
}), /* @__PURE__ */ C(m, {
|
|
212
212
|
variant: "outlined",
|
|
213
213
|
onClick: () => {
|
|
214
214
|
K && !G.includes(K) && ht((e) => [...e, K]), gt(null);
|
|
@@ -216,22 +216,22 @@ function P(O) {
|
|
|
216
216
|
disabled: !K,
|
|
217
217
|
children: "Add"
|
|
218
218
|
})]
|
|
219
|
-
}), G.map((e) => /* @__PURE__ */
|
|
219
|
+
}), G.map((e) => /* @__PURE__ */ w(y, {
|
|
220
220
|
direction: "row",
|
|
221
221
|
alignItems: "center",
|
|
222
222
|
justifyContent: "space-between",
|
|
223
|
-
children: [/* @__PURE__ */
|
|
223
|
+
children: [/* @__PURE__ */ C(ne, { principalId: e }), /* @__PURE__ */ C(We, {
|
|
224
224
|
size: "small",
|
|
225
225
|
onClick: () => ht((t) => t.filter((t) => t !== e)),
|
|
226
|
-
children: /* @__PURE__ */
|
|
226
|
+
children: /* @__PURE__ */ C(Ye, { fontSize: "small" })
|
|
227
227
|
})]
|
|
228
228
|
}, e))]
|
|
229
229
|
})]
|
|
230
230
|
})
|
|
231
231
|
]
|
|
232
|
-
}),
|
|
232
|
+
}), Bt = /* @__PURE__ */ w(y, {
|
|
233
233
|
gap: 2,
|
|
234
|
-
children: [/* @__PURE__ */
|
|
234
|
+
children: [/* @__PURE__ */ C(u, {
|
|
235
235
|
label: "Upload Folder ID",
|
|
236
236
|
value: H,
|
|
237
237
|
description: Ee,
|
|
@@ -250,7 +250,7 @@ function P(O) {
|
|
|
250
250
|
selectableTypes: t.CONTAINER
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
|
-
}), /* @__PURE__ */
|
|
253
|
+
}), /* @__PURE__ */ C(u, {
|
|
254
254
|
label: "File View ID",
|
|
255
255
|
value: U,
|
|
256
256
|
description: Ce,
|
|
@@ -266,11 +266,11 @@ function P(O) {
|
|
|
266
266
|
selectMultiple: !1,
|
|
267
267
|
treeOnly: !1,
|
|
268
268
|
versionSelection: o.DISALLOWED,
|
|
269
|
-
selectableTypes: [
|
|
269
|
+
selectableTypes: [E.entityview]
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
272
|
})]
|
|
273
|
-
}),
|
|
273
|
+
}), Vt = /* @__PURE__ */ C(u, {
|
|
274
274
|
label: "Record Set ID",
|
|
275
275
|
value: W,
|
|
276
276
|
description: ke,
|
|
@@ -286,72 +286,72 @@ function P(O) {
|
|
|
286
286
|
selectMultiple: !1,
|
|
287
287
|
treeOnly: !1,
|
|
288
288
|
versionSelection: o.DISALLOWED,
|
|
289
|
-
selectableTypes: [
|
|
289
|
+
selectableTypes: [E.recordset]
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
|
-
}),
|
|
292
|
+
}), Ht = /* @__PURE__ */ w(y, {
|
|
293
293
|
gap: 2,
|
|
294
|
-
children: [/* @__PURE__ */
|
|
294
|
+
children: [/* @__PURE__ */ C(x, {
|
|
295
295
|
variant: "body1",
|
|
296
296
|
children: Pe
|
|
297
|
-
}), /* @__PURE__ */
|
|
297
|
+
}), /* @__PURE__ */ w(re, { children: [/* @__PURE__ */ C(c, {
|
|
298
298
|
title: Te,
|
|
299
299
|
description: we,
|
|
300
300
|
onClick: () => {
|
|
301
|
-
nt(
|
|
301
|
+
nt(j), z("TYPE_SPECIFIC_FIELDS");
|
|
302
302
|
}
|
|
303
|
-
}), /* @__PURE__ */
|
|
303
|
+
}), /* @__PURE__ */ C(c, {
|
|
304
304
|
title: je,
|
|
305
305
|
description: Ae,
|
|
306
306
|
onClick: () => {
|
|
307
|
-
nt(
|
|
307
|
+
nt(M), z("TYPE_SPECIFIC_FIELDS");
|
|
308
308
|
}
|
|
309
309
|
})] })]
|
|
310
|
-
}),
|
|
310
|
+
}), Ut = /* @__PURE__ */ w(y, {
|
|
311
311
|
gap: 2,
|
|
312
|
-
children: [B ===
|
|
313
|
-
}),
|
|
312
|
+
children: [B === j && Bt, B === M && Vt]
|
|
313
|
+
}), Wt = /* @__PURE__ */ w(y, {
|
|
314
314
|
gap: 3,
|
|
315
315
|
children: [
|
|
316
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ w(g, {
|
|
317
317
|
container: !0,
|
|
318
318
|
spacing: 3,
|
|
319
319
|
alignItems: "flex-start",
|
|
320
|
-
children: [/* @__PURE__ */
|
|
320
|
+
children: [/* @__PURE__ */ C(g, {
|
|
321
321
|
size: {
|
|
322
322
|
xs: 12,
|
|
323
323
|
sm: 6
|
|
324
324
|
},
|
|
325
|
-
children: /* @__PURE__ */
|
|
325
|
+
children: /* @__PURE__ */ C(y, {
|
|
326
326
|
gap: 2,
|
|
327
|
-
children:
|
|
327
|
+
children: zt
|
|
328
328
|
})
|
|
329
|
-
}), /* @__PURE__ */
|
|
329
|
+
}), /* @__PURE__ */ C(g, {
|
|
330
330
|
size: {
|
|
331
331
|
xs: 12,
|
|
332
332
|
sm: 6
|
|
333
333
|
},
|
|
334
|
-
children: /* @__PURE__ */
|
|
334
|
+
children: /* @__PURE__ */ w(y, {
|
|
335
335
|
gap: 3,
|
|
336
336
|
children: [
|
|
337
|
-
L && /* @__PURE__ */
|
|
337
|
+
L && /* @__PURE__ */ w(te, {
|
|
338
338
|
fullWidth: !0,
|
|
339
|
-
children: [/* @__PURE__ */
|
|
339
|
+
children: [/* @__PURE__ */ C(_, {
|
|
340
340
|
id: "dlg-task-status-label",
|
|
341
341
|
children: "Status"
|
|
342
|
-
}), /* @__PURE__ */
|
|
342
|
+
}), /* @__PURE__ */ C(qe, {
|
|
343
343
|
labelId: "dlg-task-status-label",
|
|
344
344
|
value: yt ?? "",
|
|
345
345
|
label: "Status",
|
|
346
346
|
disabled: _t || q == null,
|
|
347
347
|
onChange: (e) => vt(e.target.value),
|
|
348
|
-
children: Object.values(
|
|
348
|
+
children: Object.values(Je).map((e) => /* @__PURE__ */ C(Ge, {
|
|
349
349
|
value: e,
|
|
350
350
|
children: Le[e].label
|
|
351
351
|
}, e))
|
|
352
352
|
})]
|
|
353
353
|
}),
|
|
354
|
-
L && /* @__PURE__ */
|
|
354
|
+
L && /* @__PURE__ */ C(p, { children: /* @__PURE__ */ C(i, {
|
|
355
355
|
label: "Due Date",
|
|
356
356
|
fullWidth: !0,
|
|
357
357
|
type: "date",
|
|
@@ -360,35 +360,35 @@ function P(O) {
|
|
|
360
360
|
disabled: _t,
|
|
361
361
|
slotProps: { inputLabel: { shrink: !0 } }
|
|
362
362
|
}) }),
|
|
363
|
-
|
|
364
|
-
|
|
363
|
+
Rt,
|
|
364
|
+
Lt
|
|
365
365
|
]
|
|
366
366
|
})
|
|
367
367
|
})]
|
|
368
368
|
}),
|
|
369
|
-
L && B === null && /* @__PURE__ */
|
|
369
|
+
L && B === null && /* @__PURE__ */ C(f, {
|
|
370
370
|
severity: "error",
|
|
371
371
|
children: "This task has an unrecognized task type and cannot be edited here."
|
|
372
372
|
}),
|
|
373
|
-
|
|
373
|
+
It && /* @__PURE__ */ C(f, {
|
|
374
374
|
severity: "warning",
|
|
375
375
|
children: "Changing the Authorization Mode will clear the active session ID on this task. Any in-progress grid session linked to this task will no longer be associated with it."
|
|
376
376
|
}),
|
|
377
|
-
Z && /* @__PURE__ */
|
|
377
|
+
Z && /* @__PURE__ */ C(f, {
|
|
378
378
|
severity: "error",
|
|
379
379
|
children: Z.reason ?? "An error occurred. Please try again."
|
|
380
380
|
})
|
|
381
381
|
]
|
|
382
|
-
}),
|
|
382
|
+
}), Gt = L ? Se : ge, Q = null;
|
|
383
383
|
switch (tt) {
|
|
384
384
|
case "SELECT_TYPE":
|
|
385
|
-
Q =
|
|
385
|
+
Q = Ht;
|
|
386
386
|
break;
|
|
387
387
|
case "TYPE_SPECIFIC_FIELDS":
|
|
388
|
-
Q =
|
|
388
|
+
Q = Ut;
|
|
389
389
|
break;
|
|
390
390
|
case "COMMON_MUTABLE_FIELDS":
|
|
391
|
-
Q =
|
|
391
|
+
Q = Wt;
|
|
392
392
|
break;
|
|
393
393
|
}
|
|
394
394
|
let $ = null;
|
|
@@ -397,66 +397,66 @@ function P(O) {
|
|
|
397
397
|
$ = null;
|
|
398
398
|
break;
|
|
399
399
|
case "TYPE_SPECIFIC_FIELDS":
|
|
400
|
-
$ = /* @__PURE__ */
|
|
400
|
+
$ = /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(m, {
|
|
401
401
|
variant: "outlined",
|
|
402
402
|
onClick: () => z("SELECT_TYPE"),
|
|
403
403
|
disabled: X,
|
|
404
404
|
children: "Back"
|
|
405
|
-
}), /* @__PURE__ */
|
|
405
|
+
}), /* @__PURE__ */ C(m, {
|
|
406
406
|
variant: "contained",
|
|
407
407
|
onClick: () => z("COMMON_MUTABLE_FIELDS"),
|
|
408
|
-
disabled: X || !
|
|
408
|
+
disabled: X || !Nt,
|
|
409
409
|
children: "Next"
|
|
410
410
|
})] });
|
|
411
411
|
break;
|
|
412
412
|
case "COMMON_MUTABLE_FIELDS":
|
|
413
|
-
$ = /* @__PURE__ */
|
|
413
|
+
$ = /* @__PURE__ */ w(S, { children: [!L && /* @__PURE__ */ C(m, {
|
|
414
414
|
variant: "outlined",
|
|
415
415
|
onClick: () => z("TYPE_SPECIFIC_FIELDS"),
|
|
416
416
|
disabled: X,
|
|
417
417
|
children: "Back"
|
|
418
|
-
}), /* @__PURE__ */
|
|
418
|
+
}), /* @__PURE__ */ C(m, {
|
|
419
419
|
variant: "contained",
|
|
420
|
-
onClick: () => void
|
|
420
|
+
onClick: () => void Ft().catch(A),
|
|
421
421
|
disabled: X || B === null,
|
|
422
422
|
children: "Save"
|
|
423
423
|
})] });
|
|
424
424
|
break;
|
|
425
425
|
}
|
|
426
|
-
return /* @__PURE__ */
|
|
427
|
-
open:
|
|
428
|
-
title:
|
|
426
|
+
return /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(r, {
|
|
427
|
+
open: O,
|
|
428
|
+
title: Gt,
|
|
429
429
|
maxWidth: "md",
|
|
430
430
|
fullWidth: !0,
|
|
431
|
-
onCancel:
|
|
431
|
+
onCancel: N,
|
|
432
432
|
content: Q,
|
|
433
|
-
actions: /* @__PURE__ */
|
|
433
|
+
actions: /* @__PURE__ */ w(y, {
|
|
434
434
|
direction: "row",
|
|
435
435
|
gap: 1,
|
|
436
436
|
justifyContent: "space-between",
|
|
437
437
|
alignItems: "center",
|
|
438
438
|
width: "100%",
|
|
439
|
-
children: [/* @__PURE__ */
|
|
439
|
+
children: [/* @__PURE__ */ C(p, { children: $e && /* @__PURE__ */ C(m, {
|
|
440
440
|
variant: "outlined",
|
|
441
441
|
color: "error",
|
|
442
442
|
onClick: () => R(!0),
|
|
443
443
|
disabled: X,
|
|
444
444
|
children: "Delete"
|
|
445
|
-
}) }), /* @__PURE__ */
|
|
445
|
+
}) }), /* @__PURE__ */ C(y, {
|
|
446
446
|
direction: "row",
|
|
447
447
|
gap: 1,
|
|
448
448
|
children: $
|
|
449
449
|
})]
|
|
450
450
|
})
|
|
451
|
-
}), /* @__PURE__ */
|
|
451
|
+
}), /* @__PURE__ */ C(ee, {
|
|
452
452
|
title: ve,
|
|
453
453
|
open: et,
|
|
454
|
-
content: /* @__PURE__ */
|
|
454
|
+
content: /* @__PURE__ */ w(y, {
|
|
455
455
|
gap: 2,
|
|
456
|
-
children: [/* @__PURE__ */
|
|
456
|
+
children: [/* @__PURE__ */ C(x, {
|
|
457
457
|
variant: "body1",
|
|
458
458
|
children: _e
|
|
459
|
-
}), /* @__PURE__ */
|
|
459
|
+
}), /* @__PURE__ */ C(f, {
|
|
460
460
|
severity: "warning",
|
|
461
461
|
children: be
|
|
462
462
|
})]
|
|
@@ -464,15 +464,15 @@ function P(O) {
|
|
|
464
464
|
confirmButtonProps: {
|
|
465
465
|
children: "Delete",
|
|
466
466
|
color: "error",
|
|
467
|
-
loading:
|
|
467
|
+
loading: Mt
|
|
468
468
|
},
|
|
469
469
|
onConfirm: () => {
|
|
470
|
-
I?.taskId != null &&
|
|
470
|
+
I?.taskId != null && jt(I.taskId);
|
|
471
471
|
},
|
|
472
472
|
onCancel: () => R(!1)
|
|
473
473
|
})] });
|
|
474
474
|
}
|
|
475
475
|
//#endregion
|
|
476
|
-
export {
|
|
476
|
+
export { N as default };
|
|
477
477
|
|
|
478
478
|
//# sourceMappingURL=CreateOrUpdateCurationTaskDialog.js.map
|