PageSourceSearch

https://app.clariumhealth.com/assets/preference-cards._cardId.tasks-BYCTMU-k.js

js clariumhealth.com collected 2026-09-25 15:17:35 UTC 13,791 bytes, 332 lines download raw bytes

1import { o as __toESM } from "./chunk-6z4oVpB-.js";
2import "./capitalize-YV0fqYBS.js";
3import { t as require_react } from "./react-CCT1erMQ.js";
4import "./prop-types-BP3O0vhg.js";
5import { t as require_jsx_runtime } from "./jsx-runtime-6ToSbptA.js";
6import "./hoist-non-react-statics.cjs-aYVW55CP.js";
7import "./clsx-BbsgvS4T.js";
8import "./Stack-DHo_Jfjl.js";
9import "./setPrototypeOf-BJGl62Ep.js";
10import "./chainPropTypes-Bly6swO2.js";
11import "./SvgIcon-C1SXqgmo.js";
12import "./typeof-CtObx4yR.js";
13import "./Amplify-ydFdTLPK.js";
14import "./objectWithoutProperties-Cgp7QKOy.js";
15import "./types-CQ-ki0qK.js";
16import "./amplifyUrl-DhBXUoj8.js";
17import "./tslib.es6-CGMJRn24.js";
18import "./api-BN7R4l5b.js";
19import "./createCognitoUserPoolEndpointResolver-DIsnsOMn.js";
20import "./auth-D-8td4-a.js";
21import "./helpers-BQW8LNh3.js";
22import "./getCurrentUser-CO2hH9tr.js";
23import "./_baseGetTag-CcQT-b-8.js";
24import "./errors-CJ9PkTii.js";
25import "./isArray-tvs1KjBA.js";
26import "./isObjectLike-C0C335kY.js";
27import "./shim-BLxGA08a.js";
28import "./use-isomorphic-layout-effect.browser.esm-BDjLKVP-.js";
29import "./_arrayMap-DGTSv05P.js";
30import "./isSymbol-BD-EcKMA.js";
31import "./toString-udoFnoNk.js";
32import "./_basePropertyOf-CQxcbbYL.js";
33import "./dist-Cz4mcmaa.js";
34import "./dist-DaeMORX8.js";
35import "./react-dom-Dddidh9b.js";
36import "./dist-DetJSI7l.js";
37import "./dist-Dsgwk-jH.js";
38import "./classPrivateFieldGet2-D2HqlEEJ.js";
39import "./dist-javwCbI7.js";
40import "./dist-DjKy_3Dj.js";
41import "./Combination-CE9BhVA8.js";
42import "./dist-BHtPb5hX.js";
43import "./dist-C5RjQM0F.js";
44import "./dist-SbNcsVrs.js";
45import "./dist-BnVQncHy.js";
46import "./dropdown-menu-NIFzDEaK.js";
47import "./select-8FJ_dY_9.js";
48import "./dist-BpwkAU0Q.js";
49import "./esm-BezjtZdK.js";
50import { F as useSearchParams, P as useRouteLoaderData, j as useParams, o as Outlet } from "./chunk-62JRHF6Z-z8JX8DDB.js";
51import "./exports-PpHA8CsK.js";
52import "./extends-7lTa5GQE.js";
53import "./notifyManager-Bch6NZ-h.js";
54import "./useBaseQuery-1WImwwVq.js";
55import "./useInfiniteQuery-CX5ozztk.js";
56import "./useMutation-k2qXTuOE.js";
57import "./QueryClientProvider-DBT_lM_H.js";
58import "./useQuery-DLS21iiV.js";
59import "./constants-TZTPDohO.js";
60import "./session-BF1M_iJk.js";
61import "./iconPropTypes-C5chbmyn-CpVo52O4.js";
62import "./bucket-0-Uq1JG5fZ.js";
63import "./bucket-2-CVYBMIP9.js";
64import "./bucket-3-DKA1ROBB.js";
65import "./bucket-9-D-nsYl-Y.js";
66import "./bucket-11-GVcTW-Tz.js";
67import "./bucket-15-CpBPyEaO.js";
68import "./bucket-16-Cecn6FLo.js";
69import "./dist-W5s9RbHT.js";
70import "./dist-DCv7IJcI.js";
71import "./createLucideIcon-DENnxagg.js";
72import "./arrow-up-C7XEOEee.js";
73import "./check-BFnH1yl0.js";
74import "./chevron-left-CKzRxx1E.js";
75import "./chevron-right-CEcbN75N.js";
76import "./loader-2-BkUAzF6M.js";
77import "./more-horizontal-YhMMdRGy.js";
78import "./search-BZG3c53g.js";
79import "./utils-DL_RvPHk.js";
80import "./use-toast-CIbRNZGg.js";
81import "./mixpanel.module-D03As0KW.js";
82import "./subDays-vez96V8M.js";
83import "./format-D9Zwzn3m.js";
84import "./addMonths-C0iKCEqw.js";
85import "./addYears-Bn-DGJck.js";
86import "./endOfMonth-h_W7cRKV.js";
87import "./roundingMethods-DuMrTbDg.js";
88import "./differenceInWeeks-B00-N4lk.js";
89import "./startOfYear-Ism273EP.js";
90import "./isValid-x2ON1UYB.js";
91import "./addLeadingZeros-6PHdxbUP.js";
92import "./isSameYear-DmJrnTov.js";
93import "./startOfMonth-BzVxPkxJ.js";
94import "./vanilla-CF1b6_qj.js";
95import "./react-YGktOqY1.js";
96import "./button-BgUr9YaP.js";
97import "./breadcrumb-6xRYYWrd.js";
98import "./tooltip-BQPMLsOF.js";
99import "./LongText-Chh0tzMc.js";
100import "./badge-BfOudBXs.js";
101import "./module-icon-BXSrG_dD.js";
102import "./modules.api-IyEUmc8P.js";
103import "./dynamic-breadcrumbs-DqfqKIts.js";
104import "./xstate-react.esm-DX2qQh45.js";
105import "./utils-DBLTsd0N.js";
106import "./atoms-rqPguuWn.js";
107import "./dynamic-breadcrumbs.utils-ncCMCfgZ.js";
108import "./Button-BBS-SiZR.js";
109import "./Typography-l0CVJQ2v.js";
110import "./Link-BjqzfEsO.js";
111import "./ErrorPage-BcFaH7ir.js";
112import "./useSessionQuery-CydkiRrr.js";
113import { n as checkForModuleInLoader } from "./bootstrap-BQ86EXdW.js";
114import "./avatar-CIgO6Y5X.js";
115import { t as invariantResponse } from "./invariantResponse-yE9E8lPB.js";
116import "./command-Bs-4k7Pe.js";
117import "./dist-C_Pp4NuF.js";
118import "./dialog-odsl4nrF.js";
119import "./useDebounce-4Thlngbw.js";
120import "./useEntityQueryResults-CH2zI-NY.js";
121import "./svg-icon-tPYESOnr.js";
122import "./EntityIcon-t0t2cVJk.js";
123import "./IconRM-BPWjarnN.js";
124import "./track-BOLPaScP.js";
125import "./calendar-CrxLzYjP.js";
126import "./utils-BFgzP0mr.js";
127import "./comments-Z3QCdchs.js";
128import "./base-path-CtfbOIOI.js";
129import "./zod-McvqnZjg.js";
130import "./input-wPGsBI9X.js";
131import "./separator-BIFfjU4z.js";
132import "./skeleton-DlrxaJwT.js";
133import { t as LogErrorBoundary } from "./LogErrorBoundary-CEgwOwnc.js";
134import { i as getCoreRowModel, n as useReactTable, r as createColumnHelper } from "./lib-BmE5oXwC.js";
135import "./controlled-pagination-B2SWmftf.js";
136import { t as Table } from "./table-BhizvUWs.js";
137import "./reset-to-first-page-Buz3wC4q.js";
138import "./filter-search-params-CGhr97jh.js";
139import "./use-table-context-DYyO1Fg2.js";
140import { i as TableProvider, n as TableHeader, t as TableBody } from "./TableContext-E1dvnDuG.js";
141import "./status-icon-U8dUggqg.js";
142import "./label-DQ77xjEK.js";
143import "./breadcrumb-DbPOw08v.js";
144import "./tmpDataManipulation-CGo_11JM.js";
145import { n as fullWidthTableCellMeta, r as leftTableCellMeta, t as centerTableCellMeta } from "./table-meta-props-CymYiuHt.js";
146import "./Trigger-BS4533c6.js";
147import "./dist-C2D8DSus.js";
148import "./popover-SmfnFw8c.js";
149import "./pluralize-n8kj14aO.js";
150import "./switch-SQQyR68p.js";
151import "./date-picker-Clwf-M_x.js";
152import "./useRouteMatch-LZpClifv.js";
153import "./queries-CNLh7_n8.js";
154import "./api-CKgnfoq_.js";
155import "./unescape-DYXpaoFa.js";
156import "./textarea-HOzOod_m.js";
157import "./clinicalLocations-CYUXrtPG.js";
158import "./utils-BxFPodYr.js";
159import "./bootstrap-JJX1Z3EH.js";
160import "./utils-B9b8WLvJ.js";
161import "./hooks-BTtOXOTS.js";
162import { i as CreateTaskDialog, n as ClinicalLocationSelect, r as AssigneeSelect, t as StatusSelect } from "./status-select-BIP3nMyg.js";
163import "./select-button-DF-adjn1.js";
164import { t as LinkedEntityButton } from "./linked-entity-select-DwgN1tj6.js";
165import { n as PrioritySelect, r as DueDateSelect, t as createFormHelper } from "./utils-BItGE110.js";
166import "./clarium-status-DCoemswP.js";
167import "./atoms-C_Yc83N2.js";
168import "./detail-tabs-DjhDuSZE.js";
169import "./tabs-BDS97iPQ.js";
170import { t as CardDetailHeader } from "./card-detail-header-iqP8zsrh.js";
171import { n as PriorityIconTooltip, t as TableSortHeader } from "./table-sort-header-zcV204Qd.js";
172import { t as SelectStatusFilter } from "./select-status-filter-IPdTRx5w.js";
173import { n as useTaskManagerQuery, t as TaskStatusSelectCell } from "./task-status-select-cell-_z14lfgP.js";
174import { n as AssigneeAvatarCell, t as Title } from "./title-cell-BsTuNJ9q.js";
175import { t as RequestorAvatarCell } from "./requestor-avatar-cell-CVU1gHk1.js";
176import { t as TaskIdCell } from "./task-id-cell-CQi9N7mA.js";
177var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
178var import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime(), 1);
179function LinkedEntitySelect() {
180	const { details } = useRouteLoaderData("co-card");
181	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LinkedEntityButton, { defaultLinkedEntities: import_react.useMemo(() => [{
182		entity_description: details.procedure_name,
183		entity_id: details.preference_card_id,
184		entity_name: details.client_card_id,
185		entity_type: "card"
186	}], [details]) });
187}
188var formHelper = createFormHelper();
189const formConfig = [
190	formHelper.field("status", () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusSelect, {})),
191	formHelper.field("priority", () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PrioritySelect, {})),
192	formHelper.field("assignee", () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AssigneeSelect, {})),
193	formHelper.field("due_date", () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DueDateSelect, {})),
194	formHelper.field("linked_entities", () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LinkedEntitySelect, {})),
195	formHelper.field("clinical_locations", () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ClinicalLocationSelect, {}))
196];
197function CreateTaskDialogWrapper({ trigger }) {
198	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
199		className: "flex gap-2",
200		children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CreateTaskDialog, {
201			formConfig,
202			trigger
203		})
204	});
205}
206var columnHelper = createColumnHelper();
207const columns = [
208	columnHelper.accessor("task_priority_name", {
209		id: "task_priority_name",
210		header: () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableSortHeader, {
211			title: "",
212			attr: "priority"
213		}),
214		meta: centerTableCellMeta,
215		cell: ({ row }) => {
216			const priority = row.original.task_priority_name;
217			const displayName = row.original.display_priority;
218			return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PriorityIconTooltip, {
219				priority,
220				displayName
221			});
222		}
223	}),
224	columnHelper.accessor("task_display_id", {
225		id: "task_display_id",
226		header: () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableSortHeader, {
227			title: "ID",
228			attr: "task_display_id"
229		}),
230		meta: leftTableCellMeta,
231		cell: (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TaskIdCell, { taskDisplayId: props.row.original.task_display_id })
232	}),
233	columnHelper.accessor("title", {
234		id: "title",
235		header: () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableSortHeader, {
236			title: "Title",
237			attr: "title"
238		}),
239		meta: fullWidthTableCellMeta,
240		cell: (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Title, {
241			taskId: props.row.original.task_id,
242			title: props.row.original.title
243		})
244	}),
245	columnHelper.accessor("task_status_name", {
246		id: "task_status_name",
247		header: () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableSortHeader, {
248			title: "Status",
249			attr: "status"
250		}),
251		meta: leftTableCellMeta,
252		cell: (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TaskStatusSelectCell, {
253			taskId: props.row.original.task_id,
254			taskTypeId: props.row.original.task_type_id,
255			currentClientStatusId: props.row.original.client_task_status_id
256		})
257	}),
258	columnHelper.accessor("assignee_user_name", {
259		id: "assignee_user_name",
260		header: () => "Assignee",
261		meta: leftTableCellMeta,
262		cell: (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AssigneeAvatarCell, { assignee: props.row.original.assignee_user_name })
263	}),
264	columnHelper.accessor("requesting_user_name", {
265		id: "requesting_user_name",
266		header: () => "Requestor",
267		meta: leftTableCellMeta,
268		cell: (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RequestorAvatarCell, { requestor: props.row.original.requesting_user_name })
269	})
270];
271function TasksTable() {
272	const { cardId } = useParams();
273	const { data, isLoading } = useTaskManagerQuery({ for_preference_card: cardId });
274	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableProvider, {
275		table: useReactTable({
276			data: (data === null || data === void 0 ? void 0 : data.items) || [],
277			getRowId: (row) => row.task_id,
278			columns,
279			getCoreRowModel: getCoreRowModel(),
280			manualFiltering: true,
281			manualSorting: true,
282			manualPagination: true
283		}),
284		isLoading,
285		children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Table, {
286			containerClassName: "max-h-full overflow-auto",
287			children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHeader, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableBody, {})]
288		})
289	});
290}
291async function loader() {
292	invariantResponse(await checkForModuleInLoader("task_manager"), "Forbidden", { status: 403 });
293	return { ok: true };
294}
295function Component() {
296	const { details } = useRouteLoaderData("co-card");
297	const [searchParams, setSearchParams] = useSearchParams();
298	const forStatus = searchParams.get("for_status");
299	const defaultValues = import_react.useMemo(() => ["UNSTARTED", "STARTED"], []);
300	import_react.useEffect(function setDefaultStatusFilterInSearchParams() {
301		if (defaultValues && defaultValues.length > 0 && !forStatus) {
302			const newSearchParams = new URLSearchParams(searchParams);
303			newSearchParams.set("for_status", defaultValues.join(","));
304			setSearchParams(newSearchParams, { replace: true });
305		}
306	}, [defaultValues]);
307	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
308		className: "flex h-[--app-viewport-height] min-h-full w-full flex-col overflow-y-hidden",
309		children: [
310			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardDetailHeader, { details }),
311			/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
312				className: "h-full px-6 py-2",
313				children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
314					className: "flex max-h-full min-h-0 grow-0 flex-col overflow-hidden rounded bg-zinc-50 p-1",
315					children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
316						className: "flex justify-between pb-1",
317						children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectStatusFilter, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CreateTaskDialogWrapper, {})]
318					}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
319						className: "w-full flex-1 overflow-y-auto",
320						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TasksTable, {})
321					})]
322				})
323			}),
324			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Outlet, {})
325		]
326	});
327}
328Component.displayName = "PreferenceCardTasksRoute";
329const ErrorBoundary = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LogErrorBoundary, { routeComponent: "PreferenceCardTasksRoute" });
330export { Component, ErrorBoundary, loader };
331
332//# sourceMappingURL=preference-cards._cardId.tasks-BYCTMU-k.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.