@dragonmastery/dragoncore-vue 0.0.4 → 0.0.6

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.
Files changed (56) hide show
  1. package/dist/{CreateTeamForm-zVlGgmL9.js → CreateTeamForm-O_viMOrD.js} +5 -5
  2. package/dist/{CreateTeamMemberForm-DkCbsJDn.js → CreateTeamMemberForm-BzwDug0x.js} +5 -5
  3. package/dist/{CreditBalanceDashboard-BTW4IK66.js → CreditBalanceDashboard-CBaQsjyo.js} +5 -5
  4. package/dist/{CreditManagement-0JxmCIAd.js → CreditManagement-Bal5mbQC.js} +5 -5
  5. package/dist/CustomerCreateSupportTicketForm-CpnbsCqr.js +27 -0
  6. package/dist/{CustomerSupportTicketDetailPage-DQa_Zvfe.js → CustomerSupportTicketDetailPage-DZQCplSM.js} +197 -183
  7. package/dist/CustomerSupportTicketDetailPage-DZQCplSM.js.map +1 -0
  8. package/dist/CustomerSupportTicketList-CKf8Kyzu.js +27 -0
  9. package/dist/{CustomerSupportTicketParent-BOYIren9.js → CustomerSupportTicketParent-BnmTFigo.js} +1 -1
  10. package/dist/{CustomerSupportTicketParent-sT8hpgrA.js → CustomerSupportTicketParent-BzY4pmBk.js} +2 -2
  11. package/dist/{CustomerSupportTicketParent-sT8hpgrA.js.map → CustomerSupportTicketParent-BzY4pmBk.js.map} +1 -1
  12. package/dist/CustomerSupportTicketSuccess-B-1n0gP-.js +27 -0
  13. package/dist/{EditTeamForm-BM90JTjr.js → EditTeamForm-CKnK07nF.js} +5 -5
  14. package/dist/{ResetPassword-DAn7dYAp.js → ResetPassword-Q8vhelQz.js} +5 -5
  15. package/dist/{SavedFiltersPage-BNasEKOY.js → SavedFiltersPage-DhhcU1R1.js} +51 -23
  16. package/dist/SavedFiltersPage-DhhcU1R1.js.map +1 -0
  17. package/dist/StaffCreateSupportTicketForm-D5ne_W9A.js +27 -0
  18. package/dist/{StaffSupportTicketDetailPage-D49ibqrO.js → StaffSupportTicketDetailPage-DY07Ez0R.js} +176 -132
  19. package/dist/StaffSupportTicketDetailPage-DY07Ez0R.js.map +1 -0
  20. package/dist/StaffSupportTicketList-xD3FaXkS.js +27 -0
  21. package/dist/{StaffSupportTicketParent-CxrPxXSH.js → StaffSupportTicketParent-CWWhaM37.js} +2 -2
  22. package/dist/{StaffSupportTicketParent-CxrPxXSH.js.map → StaffSupportTicketParent-CWWhaM37.js.map} +1 -1
  23. package/dist/{StaffSupportTicketParent-C7Mm7W_0.js → StaffSupportTicketParent-Dp1G85wc.js} +1 -1
  24. package/dist/StaffSupportTicketSuccess-D1nBsbcC.js +27 -0
  25. package/dist/{SupportTicketDevLifecycleBadge-Cl4y47Sy.js → SupportTicketDevLifecycleBadge-Ba-Rm6QW.js} +1 -1
  26. package/dist/{SupportTicketDevLifecycleBadge-Cl4y47Sy.js.map → SupportTicketDevLifecycleBadge-Ba-Rm6QW.js.map} +1 -1
  27. package/dist/{TeamAttachmentsTab-BoOIuTU1.js → TeamAttachmentsTab-DaCRkUsF.js} +5 -5
  28. package/dist/{ViewTeam-Bb1WH_Us.js → TeamList-BaZfSOG4.js} +6 -6
  29. package/dist/{TeamMemberList-CQTxcWNS.js → TeamMemberList-DOG48Y0Q.js} +5 -5
  30. package/dist/{TeamMemberParent-Bt0kbyKQ.js → TeamMemberParent-CTrhsG1K.js} +5 -5
  31. package/dist/{TeamParent-BvLiiJq6.js → TeamParent-myjqz30R.js} +5 -5
  32. package/dist/{TimelineNoteInput-BRsQ2QTz.js → TimelineNoteInput-BVqF4MtZ.js} +31 -8
  33. package/dist/TimelineNoteInput-BVqF4MtZ.js.map +1 -0
  34. package/dist/{TimelineSystemEvent-B69B3eeL.js → TimelineSystemEvent-D58zN850.js} +288 -205
  35. package/dist/TimelineSystemEvent-D58zN850.js.map +1 -0
  36. package/dist/{TeamList-TpS3BhPd.js → ViewTeam-DRQuV1A3.js} +6 -6
  37. package/dist/{ViewTeamMember-CBTAnAhS.js → ViewTeamMember-DjbxMkB4.js} +5 -5
  38. package/dist/{displayIdFormatter-BoKcrgF5.js → displayIdFormatter-B1ZKgofu.js} +1 -1
  39. package/dist/{displayIdFormatter-BoKcrgF5.js.map → displayIdFormatter-B1ZKgofu.js.map} +1 -1
  40. package/dist/index.d.ts +962 -938
  41. package/dist/index.js +6 -6
  42. package/dist/{src-ChwBeNHB.js → src-wQ7pAFHx.js} +1488 -1416
  43. package/dist/src-wQ7pAFHx.js.map +1 -0
  44. package/package.json +2 -2
  45. package/dist/CustomerCreateSupportTicketForm-CQcv4vrX.js +0 -27
  46. package/dist/CustomerSupportTicketDetailPage-DQa_Zvfe.js.map +0 -1
  47. package/dist/CustomerSupportTicketList-CMPRQ_7O.js +0 -27
  48. package/dist/CustomerSupportTicketSuccess-CnRWm6gX.js +0 -27
  49. package/dist/SavedFiltersPage-BNasEKOY.js.map +0 -1
  50. package/dist/StaffCreateSupportTicketForm-DoHCw60c.js +0 -27
  51. package/dist/StaffSupportTicketDetailPage-D49ibqrO.js.map +0 -1
  52. package/dist/StaffSupportTicketList-BgCIa_9v.js +0 -27
  53. package/dist/StaffSupportTicketSuccess-DZF2WpZc.js +0 -27
  54. package/dist/TimelineNoteInput-BRsQ2QTz.js.map +0 -1
  55. package/dist/TimelineSystemEvent-B69B3eeL.js.map +0 -1
  56. package/dist/src-ChwBeNHB.js.map +0 -1
@@ -2,22 +2,22 @@ import { c as setRefreshTokenHandler, i as setRouter, l as useUserSessionStore,
2
2
  import { t as useMutation } from "./useMutation-B4_S4Xoa.js";
3
3
  import { t as useQuery } from "./useQuery-B7ndu5_P.js";
4
4
  import { t as AppLink_default } from "./AppLink-CHMMrSFI.js";
5
- import { a as InlineAttachments_default, c as SupportTicketTypeBadge_default, d as ConfirmDialog_default, i as SupportTicketApprovalBadge_default, l as SupportTicketPriorityBadge_default, o as formatCustomerCreditValue, s as formatStaffCreditValue } from "./TimelineSystemEvent-B69B3eeL.js";
5
+ import { a as SupportTicketTypeBadge_default, c as formatCustomerCreditValue, d as ConfirmDialog_default, i as SupportTicketApprovalBadge_default, l as formatStaffCreditValue, o as SupportTicketPriorityBadge_default, s as InlineAttachments_default } from "./TimelineSystemEvent-D58zN850.js";
6
6
  import { n as export_helper_default } from "./TeamMembersTab-4gmnP9sD.js";
7
7
  import { n as useBreadcrumbs, t as BREADCRUMB_KEY } from "./useBreadcrumbs-DmgSucoe.js";
8
8
  import { i as FieldsetSection_default, n as teamMemberCreateSchemaWithMetadata } from "./EditTeamMemberForm-CKbKomrL.js";
9
9
  import { r as ZiniaContainer_default } from "./TeamHistoryTab-CNelXR3Q.js";
10
10
  import { n as formatToISODate, r as formatUserDate, t as formatSystemTimestamp } from "./convertToLocalDateTime-DOSGtMn8.js";
11
11
  import { t as extractRpcErrorMessage } from "./extractRpcErrorMessage-C_UbKgHL.js";
12
- import { t as formatTicketDisplayId } from "./displayIdFormatter-BoKcrgF5.js";
13
- import { t as SupportTicketDevLifecycleBadge_default } from "./SupportTicketDevLifecycleBadge-Cl4y47Sy.js";
12
+ import { t as formatTicketDisplayId } from "./displayIdFormatter-B1ZKgofu.js";
13
+ import { t as SupportTicketDevLifecycleBadge_default } from "./SupportTicketDevLifecycleBadge-Ba-Rm6QW.js";
14
14
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createStaticVNode, createTextVNode, createVNode, defineComponent, inject, isRef, nextTick, normalizeClass, onMounted, openBlock, provide, readonly, ref, renderList, renderSlot, resolveComponent, toDisplayString, unref, vModelCheckbox, vModelText, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
15
15
  import { RouterView, useRoute, useRouter } from "vue-router";
16
16
  import _imports_0 from "/android-chrome-192x192-20250721.png";
17
17
  import _imports_0$1 from "/images/logo_words-20250721.png";
18
18
  import _imports_0$2 from "/images/logo-20250721.png";
19
19
  import "/home/runner/work/follow-zap/follow-zap/libs/dragoncore-vue/src/components/ui/KeyValueEditor.vue?vue&type=style&index=0&scoped=010818ef&lang.css";
20
- import { AddCreditsSchema, CompleteSupportTicketSchema, CreditTransactionReadSchema, CustomerSupportTicketCreateSchema, CustomerSupportTicketReadSchema, CustomerSupportTicketUpdateSchema, MAX_PRESETS_PER_CONTEXT, OPERATORS, SUPPORT_TICKET_APPROVAL_FILTER_OPTIONS, SUPPORT_TICKET_DEV_LIFECYCLE_FILTER_OPTIONS, SUPPORT_TICKET_PRIORITY_FILTER_OPTIONS, SUPPORT_TICKET_PRIORITY_NUMBER_TO_LABEL, SUPPORT_TICKET_PRIORITY_TO_NUMBER, SUPPORT_TICKET_STATUS_FILTER_OPTIONS, SUPPORT_TICKET_TYPE_FILTER_OPTIONS, SetMonthlyAllocationSchema, StaffSupportTicketCreateSchema, StaffSupportTicketFiltersSchema, StaffSupportTicketReadSchema, StaffSupportTicketUpdateSchema, TeamCreateSchema, TeamFiltersSchema, TeamMemberFiltersSchema, TeamMemberReadSchema, TeamReadSchema, TeamUpdateSchema, formatDollar, resetPasswordInputSchema } from "@dragonmastery/dragoncore-shared";
20
+ import { AddCreditsSchema, CompleteSupportTicketSchema, CreditTransactionReadSchema, CustomerSupportTicketCreateSchema, CustomerSupportTicketReadSchema, CustomerSupportTicketUpdateSchema, MAX_PRESETS_PER_CONTEXT, OPERATORS, SUPPORT_TICKET_APPROVAL_FILTER_OPTIONS, SUPPORT_TICKET_DEV_LIFECYCLE_FILTER_OPTIONS, SUPPORT_TICKET_PRIORITY_FILTER_OPTIONS, SUPPORT_TICKET_PRIORITY_NUMBER_TO_LABEL, SUPPORT_TICKET_PRIORITY_TO_NUMBER, SUPPORT_TICKET_STATUS_FILTER_OPTIONS, SUPPORT_TICKET_TYPE_FILTER_OPTIONS, SetMonthlyAllocationSchema, StaffSupportTicketCreateSchema, StaffSupportTicketFiltersSchema, StaffSupportTicketReadSchema, StaffSupportTicketUpdateSchema, SupportTicketDevLifecycleUpdateEnum, TeamCreateSchema, TeamFiltersSchema, TeamMemberFiltersSchema, TeamMemberReadSchema, TeamReadSchema, TeamUpdateSchema, formatDollar, resetPasswordInputSchema, supportTicketPriorityToNumber } from "@dragonmastery/dragoncore-shared";
21
21
  import { ActionIcons, useCursorDataTable, useDataTableUrlSync, useForm, withMetadata } from "@dragonmastery/zinia-forms-core";
22
22
  import { toast } from "vue3-toastify";
23
23
  import "/home/runner/work/follow-zap/follow-zap/libs/dragoncore-vue/src/slices/support_ticket/shared/CreditBalanceWidget.vue?vue&type=style&index=0&scoped=703dc3c5&lang.css";
@@ -57,11 +57,11 @@ const DragoncoreVue = { install(_app, options) {
57
57
  const _hoisted_1$58 = { class: "w-full" };
58
58
  const _hoisted_2$53 = { class: "md:hidden relative" };
59
59
  const _hoisted_3$48 = { class: "font-medium" };
60
- const _hoisted_4$41 = {
60
+ const _hoisted_4$42 = {
61
61
  key: 0,
62
62
  class: "absolute z-20 w-full bg-base-100 shadow-lg"
63
63
  };
64
- const _hoisted_5$31 = ["onClick"];
64
+ const _hoisted_5$32 = ["onClick"];
65
65
  const _hoisted_6$26 = { class: "hidden md:flex items-center overflow-x-auto" };
66
66
  const _hoisted_7$22 = { class: "flex-1 flex" };
67
67
  const _hoisted_8$22 = ["onClick"];
@@ -126,7 +126,7 @@ const _sfc_main$63 = /* @__PURE__ */ defineComponent({
126
126
  d: "M19 9l-7 7-7-7"
127
127
  })], -1))]),
128
128
  createCommentVNode(" Dropdown menu "),
129
- isMenuOpen.value ? (openBlock(), createElementBlock("div", _hoisted_4$41, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.tabs, (tab, index) => {
129
+ isMenuOpen.value ? (openBlock(), createElementBlock("div", _hoisted_4$42, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.tabs, (tab, index) => {
130
130
  return openBlock(), createElementBlock(Fragment, { key: index }, [tab.to ? (openBlock(), createBlock(_component_router_link, {
131
131
  key: 0,
132
132
  to: tab.to,
@@ -139,7 +139,7 @@ const _sfc_main$63 = /* @__PURE__ */ defineComponent({
139
139
  key: 1,
140
140
  onClick: ($event) => handleTabClick(tab.id),
141
141
  class: normalizeClass(["block w-full text-left px-4 py-3 hover:bg-base-200", [__props.activeTab === tab.id ? "text-primary font-medium" : "text-base-content/70"]])
142
- }, toDisplayString(tab.label), 11, _hoisted_5$31))], 64);
142
+ }, toDisplayString(tab.label), 11, _hoisted_5$32))], 64);
143
143
  }), 128))])) : createCommentVNode("v-if", true)
144
144
  ]),
145
145
  createCommentVNode(" Desktop view: Show horizontal tabs on medium screens and up "),
@@ -212,8 +212,8 @@ var AppHeader_default = _sfc_main$62;
212
212
  const _hoisted_1$56 = { class: "modal-box max-w-md w-full max-h-[90vh] flex flex-col p-0" };
213
213
  const _hoisted_2$51 = { class: "flex justify-between items-center p-6 pb-4 border-b border-base-300 flex-shrink-0" };
214
214
  const _hoisted_3$46 = { class: "font-bold text-lg" };
215
- const _hoisted_4$40 = { class: "modal-content flex-1 overflow-y-auto p-6" };
216
- const _hoisted_5$30 = {
215
+ const _hoisted_4$41 = { class: "modal-content flex-1 overflow-y-auto p-6" };
216
+ const _hoisted_5$31 = {
217
217
  method: "dialog",
218
218
  class: "modal-backdrop"
219
219
  };
@@ -260,8 +260,8 @@ const _sfc_main$61 = /* @__PURE__ */ defineComponent({
260
260
  d: "M6 18L18 6M6 6l12 12"
261
261
  })], -1)])])]),
262
262
  createCommentVNode(" Content slot - scrollable area "),
263
- createElementVNode("div", _hoisted_4$40, [renderSlot(_ctx.$slots, "default")])
264
- ]), createElementVNode("form", _hoisted_5$30, [createElementVNode("button", {
263
+ createElementVNode("div", _hoisted_4$41, [renderSlot(_ctx.$slots, "default")])
264
+ ]), createElementVNode("form", _hoisted_5$31, [createElementVNode("button", {
265
265
  type: "button",
266
266
  onClick: withModifiers(handleClose, ["prevent"])
267
267
  }, "close")])], 512);
@@ -275,8 +275,8 @@ var BaseModal_default = _sfc_main$61;
275
275
  const _hoisted_1$55 = { class: "modal-box" };
276
276
  const _hoisted_2$50 = { class: "font-bold text-lg" };
277
277
  const _hoisted_3$45 = { class: "py-4" };
278
- const _hoisted_4$39 = { class: "form-control w-full" };
279
- const _hoisted_5$29 = { class: "label" };
278
+ const _hoisted_4$40 = { class: "form-control w-full" };
279
+ const _hoisted_5$30 = { class: "label" };
280
280
  const _hoisted_6$25 = { class: "label-text" };
281
281
  const _hoisted_7$21 = ["placeholder"];
282
282
  const _hoisted_8$21 = {
@@ -339,8 +339,8 @@ const _sfc_main$60 = /* @__PURE__ */ defineComponent({
339
339
  return (_ctx, _cache) => {
340
340
  return openBlock(), createElementBlock("div", { class: normalizeClass(["modal", { "modal-open": __props.modelValue }]) }, [createElementVNode("div", _hoisted_1$55, [
341
341
  createElementVNode("h3", _hoisted_2$50, toDisplayString(__props.title), 1),
342
- createElementVNode("div", _hoisted_3$45, [createElementVNode("label", _hoisted_4$39, [
343
- createElementVNode("div", _hoisted_5$29, [createElementVNode("span", _hoisted_6$25, toDisplayString(__props.label), 1)]),
342
+ createElementVNode("div", _hoisted_3$45, [createElementVNode("label", _hoisted_4$40, [
343
+ createElementVNode("div", _hoisted_5$30, [createElementVNode("span", _hoisted_6$25, toDisplayString(__props.label), 1)]),
344
344
  withDirectives(createElementVNode("input", {
345
345
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
346
346
  type: "text",
@@ -387,8 +387,8 @@ var LoginButton_default = /* @__PURE__ */ export_helper_default(_sfc_main$59, [[
387
387
  const _hoisted_1$54 = { class: "sticky top-0 flex h-16 w-full justify-center border-b-2 border-solid border-b-base-300 bg-base-200 bg-opacity-90 text-base-content shadow-xs z-10" };
388
388
  const _hoisted_2$49 = { class: "navbar w-full" };
389
389
  const _hoisted_3$44 = { class: "flex flex-1 md:gap-1 lg:gap-2" };
390
- const _hoisted_4$38 = { class: "items-center gap-2 flex" };
391
- const _hoisted_5$28 = {
390
+ const _hoisted_4$39 = { class: "items-center gap-2 flex" };
391
+ const _hoisted_5$29 = {
392
392
  key: 0,
393
393
  class: "hidden md:flex items-center ml-4"
394
394
  };
@@ -447,7 +447,7 @@ const _sfc_main$58 = /* @__PURE__ */ defineComponent({
447
447
  "stroke-linecap": "round",
448
448
  "stroke-linejoin": "round",
449
449
  d: "M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"
450
- })])], -1)), createElementVNode("div", _hoisted_4$38, [
450
+ })])], -1)), createElementVNode("div", _hoisted_4$39, [
451
451
  createVNode(AppLink_default, {
452
452
  to: "/",
453
453
  "aria-current": "page",
@@ -461,7 +461,7 @@ const _sfc_main$58 = /* @__PURE__ */ defineComponent({
461
461
  _: 1
462
462
  }),
463
463
  createCommentVNode(" Breadcrumbs in navbar - Desktop view "),
464
- __props.breadcrumbs && __props.breadcrumbs.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_5$28, [createElementVNode("div", _hoisted_6$24, [
464
+ __props.breadcrumbs && __props.breadcrumbs.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_5$29, [createElementVNode("div", _hoisted_6$24, [
465
465
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.breadcrumbs, (crumb, index) => {
466
466
  return openBlock(), createElementBlock(Fragment, { key: index }, [
467
467
  createCommentVNode(" Link for all but the last item "),
@@ -545,7 +545,7 @@ var NotFound_default = _sfc_main$57;
545
545
  const _hoisted_1$52 = { class: "drawer-side z-50" };
546
546
  const _hoisted_2$47 = { class: "menu p-3 w-80 h-full bg-base-200 text-base-content" };
547
547
  const _hoisted_3$42 = { class: "flex pb-2" };
548
- const _hoisted_4$37 = { class: "pl-3" };
548
+ const _hoisted_4$38 = { class: "pl-3" };
549
549
  const _sfc_main$56 = /* @__PURE__ */ defineComponent({
550
550
  __name: "RightSidebar",
551
551
  setup(__props) {
@@ -566,7 +566,7 @@ const _sfc_main$56 = /* @__PURE__ */ defineComponent({
566
566
  }, null, -1)), createElementVNode("ul", _hoisted_2$47, [
567
567
  createElementVNode("div", _hoisted_3$42, [
568
568
  _cache[1] || (_cache[1] = createElementVNode("div", { class: "avatar placeholder" }, [createElementVNode("div", { class: "bg-neutral-focus text-neutral-content w-10 h-10 rounded-full" }, [createElementVNode("span", null, "U")])], -1)),
569
- createElementVNode("label", _hoisted_4$37, toDisplayString(unref(userSession).currentSession?.user?.username), 1),
569
+ createElementVNode("label", _hoisted_4$38, toDisplayString(unref(userSession).currentSession?.user?.username), 1),
570
570
  _cache[2] || (_cache[2] = createElementVNode("div", { class: "grow" }, null, -1)),
571
571
  _cache[3] || (_cache[3] = createElementVNode("label", {
572
572
  for: "my-drawer-4",
@@ -693,8 +693,8 @@ const _hoisted_1$51 = {
693
693
  };
694
694
  const _hoisted_2$46 = { class: "w-80 bg-base-200 h-full flex flex-col" };
695
695
  const _hoisted_3$41 = { class: "flex-1 overflow-y-auto overflow-x-hidden min-h-0" };
696
- const _hoisted_4$36 = { class: "menu p-3 w-full text-base-content" };
697
- const _hoisted_5$27 = { class: "flex" };
696
+ const _hoisted_4$37 = { class: "menu p-3 w-full text-base-content" };
697
+ const _hoisted_5$28 = { class: "flex" };
698
698
  const _hoisted_6$23 = {
699
699
  key: 0,
700
700
  class: "w-full"
@@ -744,8 +744,8 @@ const _sfc_main$55 = /* @__PURE__ */ defineComponent({
744
744
  return openBlock(), createElementBlock("div", _hoisted_1$51, [_cache[3] || (_cache[3] = createElementVNode("label", {
745
745
  for: "drawer",
746
746
  class: "drawer-overlay"
747
- }, null, -1)), createElementVNode("aside", _hoisted_2$46, [createElementVNode("div", _hoisted_3$41, [createElementVNode("ul", _hoisted_4$36, [
748
- createElementVNode("div", _hoisted_5$27, [
747
+ }, null, -1)), createElementVNode("aside", _hoisted_2$46, [createElementVNode("div", _hoisted_3$41, [createElementVNode("ul", _hoisted_4$37, [
748
+ createElementVNode("div", _hoisted_5$28, [
749
749
  _cache[0] || (_cache[0] = createElementVNode("div", { class: "font-title inline-flex text-2xl text-primary transition-all duration-200" }, [createElementVNode("img", {
750
750
  src: _imports_0$1,
751
751
  alt: "logo",
@@ -798,7 +798,7 @@ var Sidebar_default = _sfc_main$55;
798
798
  const _hoisted_1$50 = { class: "drawer drawer-end" };
799
799
  const _hoisted_2$45 = { class: "drawer h-[calc(100vh_-_64px_-_64px)] bg-base-100" };
800
800
  const _hoisted_3$40 = { class: "drawer-content" };
801
- const _hoisted_4$35 = { class: "pr-1 pl-1 md:pr-4 md:pl-4" };
801
+ const _hoisted_4$36 = { class: "pr-1 pl-1 md:pr-4 md:pl-4" };
802
802
  const _sfc_main$54 = /* @__PURE__ */ defineComponent({
803
803
  __name: "Admin",
804
804
  setup(__props) {
@@ -809,7 +809,7 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
809
809
  type: "checkbox",
810
810
  class: "drawer-toggle"
811
811
  }, null, -1)),
812
- createElementVNode("div", _hoisted_3$40, [createVNode(Navbar_default), createElementVNode("div", _hoisted_4$35, [createVNode(unref(RouterView))])]),
812
+ createElementVNode("div", _hoisted_3$40, [createVNode(Navbar_default), createElementVNode("div", _hoisted_4$36, [createVNode(unref(RouterView))])]),
813
813
  createVNode(Sidebar_default)
814
814
  ])], 64);
815
815
  };
@@ -861,11 +861,11 @@ var Default_default = _sfc_main$52;
861
861
  const _hoisted_1$47 = { class: "drawer drawer-end" };
862
862
  const _hoisted_2$43 = { class: "drawer h-[calc(100vh_)]" };
863
863
  const _hoisted_3$39 = { class: "drawer-content flex flex-col" };
864
- const _hoisted_4$34 = {
864
+ const _hoisted_4$35 = {
865
865
  key: 0,
866
866
  class: "z-20"
867
867
  };
868
- const _hoisted_5$26 = { class: "flex-1 px-3 sm:px-4 md:px-6 pb-4" };
868
+ const _hoisted_5$27 = { class: "flex-1 px-3 sm:px-4 md:px-6 pb-4" };
869
869
  const _sfc_main$51 = /* @__PURE__ */ defineComponent({
870
870
  __name: "InApp",
871
871
  setup(__props) {
@@ -941,12 +941,12 @@ const _sfc_main$51 = /* @__PURE__ */ defineComponent({
941
941
  breadcrumbs: currentBreadcrumbs.value
942
942
  }, null, 8, ["breadcrumbs"]),
943
943
  createCommentVNode(" Unified navigation with AppHeader (only shown when needed) "),
944
- shouldShowAppHeader.value ? (openBlock(), createElementBlock("div", _hoisted_4$34, [createVNode(AppHeader_default, {
944
+ shouldShowAppHeader.value ? (openBlock(), createElementBlock("div", _hoisted_4$35, [createVNode(AppHeader_default, {
945
945
  tabs: currentSectionTabs.value,
946
946
  "active-tab": currentActiveTab.value
947
947
  }, null, 8, ["tabs", "active-tab"])])) : createCommentVNode("v-if", true),
948
948
  createCommentVNode(" Main content "),
949
- createElementVNode("div", _hoisted_5$26, [createVNode(unref(RouterView))])
949
+ createElementVNode("div", _hoisted_5$27, [createVNode(unref(RouterView))])
950
950
  ]),
951
951
  createCommentVNode(" Left sidebar "),
952
952
  createVNode(Sidebar_default)
@@ -982,13 +982,13 @@ var FieldDisplay_default = _sfc_main$50;
982
982
  const _hoisted_1$45 = { class: "card bg-base-100 shadow-sm" };
983
983
  const _hoisted_2$41 = { class: "card-body" };
984
984
  const _hoisted_3$37 = { class: "card-title text-lg mb-4" };
985
- const _hoisted_4$33 = { class: "grid grid-cols-1 md:grid-cols-2 gap-4" };
985
+ const _hoisted_4$34 = { class: "grid grid-cols-1 md:grid-cols-2 gap-4" };
986
986
  const _sfc_main$49 = /* @__PURE__ */ defineComponent({
987
987
  __name: "FieldGroup",
988
988
  props: { title: {} },
989
989
  setup(__props) {
990
990
  return (_ctx, _cache) => {
991
- return openBlock(), createElementBlock("div", _hoisted_1$45, [createElementVNode("div", _hoisted_2$41, [createElementVNode("h2", _hoisted_3$37, toDisplayString(__props.title), 1), createElementVNode("div", _hoisted_4$33, [renderSlot(_ctx.$slots, "default")])])]);
991
+ return openBlock(), createElementBlock("div", _hoisted_1$45, [createElementVNode("div", _hoisted_2$41, [createElementVNode("h2", _hoisted_3$37, toDisplayString(__props.title), 1), createElementVNode("div", _hoisted_4$34, [renderSlot(_ctx.$slots, "default")])])]);
992
992
  };
993
993
  }
994
994
  });
@@ -999,8 +999,8 @@ var FieldGroup_default = _sfc_main$49;
999
999
  const _hoisted_1$44 = { class: "w-full px-2 sm:px-0" };
1000
1000
  const _hoisted_2$40 = { class: "mb-4" };
1001
1001
  const _hoisted_3$36 = { class: "flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3 mb-3" };
1002
- const _hoisted_4$32 = { class: "text-lg font-medium" };
1003
- const _hoisted_5$25 = { class: "flex gap-2 sm:hidden" };
1002
+ const _hoisted_4$33 = { class: "text-lg font-medium" };
1003
+ const _hoisted_5$26 = { class: "flex gap-2 sm:hidden" };
1004
1004
  const _hoisted_6$22 = ["disabled"];
1005
1005
  const _hoisted_7$18 = { class: "breadcrumbs text-xs sm:text-sm overflow-x-auto -mx-2 px-2" };
1006
1006
  const _hoisted_8$18 = { class: "min-w-max" };
@@ -1494,9 +1494,9 @@ const _sfc_main$48 = /* @__PURE__ */ defineComponent({
1494
1494
  createElementVNode("div", _hoisted_2$40, [
1495
1495
  createCommentVNode(" Mobile: Stacked layout "),
1496
1496
  createElementVNode("div", _hoisted_3$36, [
1497
- createElementVNode("h3", _hoisted_4$32, toDisplayString(config.value.title || "Attachments"), 1),
1497
+ createElementVNode("h3", _hoisted_4$33, toDisplayString(config.value.title || "Attachments"), 1),
1498
1498
  createCommentVNode(" Mobile: Action buttons "),
1499
- createElementVNode("div", _hoisted_5$25, [createElementVNode("button", {
1499
+ createElementVNode("div", _hoisted_5$26, [createElementVNode("button", {
1500
1500
  class: "btn btn-sm btn-primary flex-1",
1501
1501
  onClick: openFileSelector,
1502
1502
  disabled: isUploading.value
@@ -1845,8 +1845,8 @@ const _hoisted_3$35 = {
1845
1845
  key: 0,
1846
1846
  class: "label p-0"
1847
1847
  };
1848
- const _hoisted_4$31 = { class: "label-text" };
1849
- const _hoisted_5$24 = {
1848
+ const _hoisted_4$32 = { class: "label-text" };
1849
+ const _hoisted_5$25 = {
1850
1850
  key: 1,
1851
1851
  class: "text-xs text-base-content/60 mt-1"
1852
1852
  };
@@ -1952,7 +1952,7 @@ const _sfc_main$47 = /* @__PURE__ */ defineComponent({
1952
1952
  };
1953
1953
  return (_ctx, _cache) => {
1954
1954
  return openBlock(), createElementBlock("div", _hoisted_1$43, [
1955
- __props.label || __props.helpText ? (openBlock(), createElementBlock("div", _hoisted_2$39, [__props.label ? (openBlock(), createElementBlock("label", _hoisted_3$35, [createElementVNode("span", _hoisted_4$31, toDisplayString(__props.label), 1)])) : createCommentVNode("v-if", true), __props.helpText ? (openBlock(), createElementBlock("p", _hoisted_5$24, toDisplayString(__props.helpText), 1)) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true),
1955
+ __props.label || __props.helpText ? (openBlock(), createElementBlock("div", _hoisted_2$39, [__props.label ? (openBlock(), createElementBlock("label", _hoisted_3$35, [createElementVNode("span", _hoisted_4$32, toDisplayString(__props.label), 1)])) : createCommentVNode("v-if", true), __props.helpText ? (openBlock(), createElementBlock("p", _hoisted_5$25, toDisplayString(__props.helpText), 1)) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true),
1956
1956
  __props.error ? (openBlock(), createElementBlock("div", _hoisted_6$21, toDisplayString(__props.error), 1)) : createCommentVNode("v-if", true),
1957
1957
  createElementVNode("div", _hoisted_7$17, [
1958
1958
  createCommentVNode(" Key-Value Pairs List "),
@@ -2028,8 +2028,8 @@ const _hoisted_1$42 = {
2028
2028
  };
2029
2029
  const _hoisted_2$38 = { class: "text-base-content/70 mt-2" };
2030
2030
  const _hoisted_3$34 = { class: "text-center py-8" };
2031
- const _hoisted_4$30 = { class: "alert alert-error max-w-md mx-auto" };
2032
- const _hoisted_5$23 = { class: "font-bold" };
2031
+ const _hoisted_4$31 = { class: "alert alert-error max-w-md mx-auto" };
2032
+ const _hoisted_5$24 = { class: "font-bold" };
2033
2033
  const _hoisted_6$20 = { class: "text-sm" };
2034
2034
  const _sfc_main$46 = /* @__PURE__ */ defineComponent({
2035
2035
  __name: "LoadingErrorStates",
@@ -2054,7 +2054,7 @@ const _sfc_main$46 = /* @__PURE__ */ defineComponent({
2054
2054
  return openBlock(), createElementBlock(Fragment, null, [createCommentVNode(" Loading State "), __props.isLoading ? (openBlock(), createElementBlock("div", _hoisted_1$42, [renderSlot(_ctx.$slots, "loading", {}, () => [_cache[0] || (_cache[0] = createElementVNode("div", { class: "flex justify-center" }, [createElementVNode("span", { class: "loading loading-spinner loading-lg" })], -1)), createElementVNode("p", _hoisted_2$38, toDisplayString(config.value.loadingText || "Loading..."), 1)])])) : __props.error ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Error State "), createElementVNode("div", _hoisted_3$34, [renderSlot(_ctx.$slots, "error", {
2055
2055
  error: __props.error,
2056
2056
  retry: handleRetry
2057
- }, () => [createElementVNode("div", _hoisted_4$30, [_cache[1] || (_cache[1] = createElementVNode("svg", {
2057
+ }, () => [createElementVNode("div", _hoisted_4$31, [_cache[1] || (_cache[1] = createElementVNode("svg", {
2058
2058
  xmlns: "http://www.w3.org/2000/svg",
2059
2059
  class: "stroke-current shrink-0 h-6 w-6",
2060
2060
  fill: "none",
@@ -2065,7 +2065,7 @@ const _sfc_main$46 = /* @__PURE__ */ defineComponent({
2065
2065
  "stroke-width": "2",
2066
2066
  d: "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
2067
2067
  })], -1)), createElementVNode("div", null, [
2068
- createElementVNode("h3", _hoisted_5$23, toDisplayString(config.value.errorTitle || "Error"), 1),
2068
+ createElementVNode("h3", _hoisted_5$24, toDisplayString(config.value.errorTitle || "Error"), 1),
2069
2069
  createElementVNode("div", _hoisted_6$20, toDisplayString(getErrorMessage(__props.error)), 1),
2070
2070
  config.value.showRetry !== false ? (openBlock(), createElementBlock("button", {
2071
2071
  key: 0,
@@ -2086,8 +2086,8 @@ const _hoisted_1$41 = {
2086
2086
  };
2087
2087
  const _hoisted_2$37 = { class: "card-body p-3 sm:p-5" };
2088
2088
  const _hoisted_3$33 = { class: "flex justify-between items-center" };
2089
- const _hoisted_4$29 = { class: "card-title text-base sm:text-lg" };
2090
- const _hoisted_5$22 = { key: 0 };
2089
+ const _hoisted_4$30 = { class: "card-title text-base sm:text-lg" };
2090
+ const _hoisted_5$23 = { key: 0 };
2091
2091
  const _hoisted_6$19 = { class: "hidden md:block overflow-x-auto mt-4" };
2092
2092
  const _hoisted_7$16 = { class: "table table-zebra table-sm" };
2093
2093
  const _hoisted_8$16 = { class: "font-mono text-xs" };
@@ -2142,10 +2142,10 @@ const _sfc_main$45 = /* @__PURE__ */ defineComponent({
2142
2142
  return defaultValueFormatter(value);
2143
2143
  }
2144
2144
  return (_ctx, _cache) => {
2145
- return __props.changedFields.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$41, [createElementVNode("div", _hoisted_2$37, [createElementVNode("div", _hoisted_3$33, [createElementVNode("h2", _hoisted_4$29, toDisplayString(config.value.title || "Changes in This Version"), 1), createElementVNode("button", {
2145
+ return __props.changedFields.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$41, [createElementVNode("div", _hoisted_2$37, [createElementVNode("div", _hoisted_3$33, [createElementVNode("h2", _hoisted_4$30, toDisplayString(config.value.title || "Changes in This Version"), 1), createElementVNode("button", {
2146
2146
  onClick: _cache[0] || (_cache[0] = ($event) => showChanges.value = !showChanges.value),
2147
2147
  class: "btn btn-sm btn-info"
2148
- }, toDisplayString(showChanges.value ? config.value.hideText || "Hide Changes" : config.value.showText || "Show Changes"), 1)]), showChanges.value ? (openBlock(), createElementBlock("div", _hoisted_5$22, [
2148
+ }, toDisplayString(showChanges.value ? config.value.hideText || "Hide Changes" : config.value.showText || "Show Changes"), 1)]), showChanges.value ? (openBlock(), createElementBlock("div", _hoisted_5$23, [
2149
2149
  createCommentVNode(" Desktop view - table format "),
2150
2150
  createElementVNode("div", _hoisted_6$19, [createElementVNode("table", _hoisted_7$16, [createElementVNode("thead", null, [createElementVNode("tr", null, [
2151
2151
  createElementVNode("th", null, toDisplayString(config.value.fieldColumnHeader || "Field"), 1),
@@ -2179,8 +2179,8 @@ const _hoisted_2$36 = {
2179
2179
  class: "space-y-4"
2180
2180
  };
2181
2181
  const _hoisted_3$32 = { class: "alert alert-error shadow-lg text-sm" };
2182
- const _hoisted_4$28 = { class: "font-bold" };
2183
- const _hoisted_5$21 = { class: "text-sm" };
2182
+ const _hoisted_4$29 = { class: "font-bold" };
2183
+ const _hoisted_5$22 = { class: "text-sm" };
2184
2184
  const _hoisted_6$18 = { class: "alert alert-info shadow-lg text-sm" };
2185
2185
  const _hoisted_7$15 = { class: "space-y-3 max-w-4xl mx-auto" };
2186
2186
  const _hoisted_8$15 = { class: "card-body p-4" };
@@ -2288,7 +2288,7 @@ const _sfc_main$44 = /* @__PURE__ */ defineComponent({
2288
2288
  "stroke-width": "2",
2289
2289
  d: "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
2290
2290
  })], -1)),
2291
- createElementVNode("div", null, [createElementVNode("h3", _hoisted_4$28, toDisplayString(config.value.errorTitle || "Error Loading Version History"), 1), createElementVNode("div", _hoisted_5$21, toDisplayString(__props.error.message), 1)]),
2291
+ createElementVNode("div", null, [createElementVNode("h3", _hoisted_4$29, toDisplayString(config.value.errorTitle || "Error Loading Version History"), 1), createElementVNode("div", _hoisted_5$22, toDisplayString(__props.error.message), 1)]),
2292
2292
  createElementVNode("button", {
2293
2293
  class: "btn btn-xs",
2294
2294
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("retry"))
@@ -2337,11 +2337,11 @@ var RecordVersionList_default = _sfc_main$44;
2337
2337
  const _hoisted_1$39 = { class: "sticky top-0 z-10 bg-base-100 shadow-sm" };
2338
2338
  const _hoisted_2$35 = { class: "flex justify-between items-center p-4 border-b" };
2339
2339
  const _hoisted_3$31 = { class: "text-lg font-semibold" };
2340
- const _hoisted_4$27 = {
2340
+ const _hoisted_4$28 = {
2341
2341
  key: 0,
2342
2342
  class: "text-sm text-base-content/70"
2343
2343
  };
2344
- const _hoisted_5$20 = { class: "flex gap-2" };
2344
+ const _hoisted_5$21 = { class: "flex gap-2" };
2345
2345
  const _hoisted_6$17 = ["disabled"];
2346
2346
  const _hoisted_7$14 = {
2347
2347
  key: 0,
@@ -2429,7 +2429,7 @@ const _sfc_main$43 = /* @__PURE__ */ defineComponent({
2429
2429
  version: __props.version,
2430
2430
  isLoading: __props.isLoading,
2431
2431
  isRestoring: __props.isRestoring
2432
- }, () => [createCommentVNode(" Default header "), createElementVNode("div", _hoisted_2$35, [createElementVNode("div", null, [createElementVNode("h1", _hoisted_3$31, toDisplayString(config.value.title || `View ${config.value.recordDisplayName || "Record"} Version`), 1), __props.version ? (openBlock(), createElementBlock("div", _hoisted_4$27, toDisplayString(formatVersionInfo(__props.version)), 1)) : createCommentVNode("v-if", true)]), createElementVNode("div", _hoisted_5$20, [
2432
+ }, () => [createCommentVNode(" Default header "), createElementVNode("div", _hoisted_2$35, [createElementVNode("div", null, [createElementVNode("h1", _hoisted_3$31, toDisplayString(config.value.title || `View ${config.value.recordDisplayName || "Record"} Version`), 1), __props.version ? (openBlock(), createElementBlock("div", _hoisted_4$28, toDisplayString(formatVersionInfo(__props.version)), 1)) : createCommentVNode("v-if", true)]), createElementVNode("div", _hoisted_5$21, [
2433
2433
  createCommentVNode(" Back button "),
2434
2434
  config.value.onBack ? (openBlock(), createElementBlock("button", {
2435
2435
  key: 0,
@@ -3103,7 +3103,7 @@ const teamMemberRoutes = [
3103
3103
  {
3104
3104
  path: teamMemberPaths.list.path,
3105
3105
  name: teamMemberPaths.list.name,
3106
- component: () => import("./TeamMemberList-CQTxcWNS.js"),
3106
+ component: () => import("./TeamMemberList-DOG48Y0Q.js"),
3107
3107
  beforeEnter: [userAuthenticated],
3108
3108
  meta: {
3109
3109
  title: "Team Members",
@@ -3113,7 +3113,7 @@ const teamMemberRoutes = [
3113
3113
  {
3114
3114
  path: teamMemberPaths.create.path,
3115
3115
  name: teamMemberPaths.create.name,
3116
- component: () => import("./CreateTeamMemberForm-DkCbsJDn.js"),
3116
+ component: () => import("./CreateTeamMemberForm-BzwDug0x.js"),
3117
3117
  beforeEnter: [userAuthenticated],
3118
3118
  meta: {
3119
3119
  title: "Create Team Member",
@@ -3122,7 +3122,7 @@ const teamMemberRoutes = [
3122
3122
  },
3123
3123
  {
3124
3124
  path: teamMemberPaths.view.path,
3125
- component: () => import("./TeamMemberParent-Bt0kbyKQ.js"),
3125
+ component: () => import("./TeamMemberParent-CTrhsG1K.js"),
3126
3126
  beforeEnter: [userAuthenticated],
3127
3127
  meta: { sectionTabs: [{
3128
3128
  id: "view",
@@ -3136,7 +3136,7 @@ const teamMemberRoutes = [
3136
3136
  children: [{
3137
3137
  path: "",
3138
3138
  name: teamMemberPaths.view.name,
3139
- component: () => import("./ViewTeamMember-CBTAnAhS.js"),
3139
+ component: () => import("./ViewTeamMember-DjbxMkB4.js"),
3140
3140
  meta: {
3141
3141
  title: "View Team Member",
3142
3142
  description: "View team member details",
@@ -3209,7 +3209,7 @@ const teamRoutes = [{
3209
3209
  {
3210
3210
  path: teamPaths.list.path,
3211
3211
  name: teamPaths.list.name,
3212
- component: () => import("./TeamList-TpS3BhPd.js"),
3212
+ component: () => import("./TeamList-BaZfSOG4.js"),
3213
3213
  meta: {
3214
3214
  title: "Teams",
3215
3215
  description: "Manage teams",
@@ -3227,7 +3227,7 @@ const teamRoutes = [{
3227
3227
  {
3228
3228
  path: teamPaths.create.path,
3229
3229
  name: teamPaths.create.name,
3230
- component: () => import("./CreateTeamForm-zVlGgmL9.js"),
3230
+ component: () => import("./CreateTeamForm-O_viMOrD.js"),
3231
3231
  meta: {
3232
3232
  title: "Create Team",
3233
3233
  description: "Create new team",
@@ -3242,7 +3242,7 @@ const teamRoutes = [{
3242
3242
  },
3243
3243
  {
3244
3244
  path: teamPaths.view.path,
3245
- component: () => import("./TeamParent-BvLiiJq6.js"),
3245
+ component: () => import("./TeamParent-myjqz30R.js"),
3246
3246
  meta: { sectionTabs: [
3247
3247
  {
3248
3248
  id: "view",
@@ -3279,7 +3279,7 @@ const teamRoutes = [{
3279
3279
  {
3280
3280
  path: "",
3281
3281
  name: teamPaths.view.name,
3282
- component: () => import("./ViewTeam-Bb1WH_Us.js"),
3282
+ component: () => import("./ViewTeam-DRQuV1A3.js"),
3283
3283
  meta: {
3284
3284
  title: "View Team",
3285
3285
  description: "View team details",
@@ -3289,7 +3289,7 @@ const teamRoutes = [{
3289
3289
  {
3290
3290
  path: teamPaths.edit.path,
3291
3291
  name: teamPaths.edit.name,
3292
- component: () => import("./EditTeamForm-BM90JTjr.js"),
3292
+ component: () => import("./EditTeamForm-CKnK07nF.js"),
3293
3293
  meta: {
3294
3294
  title: "Edit Team",
3295
3295
  description: "Edit team details",
@@ -3309,7 +3309,7 @@ const teamRoutes = [{
3309
3309
  {
3310
3310
  path: teamPaths.attachments.path,
3311
3311
  name: teamPaths.attachments.name,
3312
- component: () => import("./TeamAttachmentsTab-BoOIuTU1.js"),
3312
+ component: () => import("./TeamAttachmentsTab-DaCRkUsF.js"),
3313
3313
  meta: {
3314
3314
  title: "Team Attachments",
3315
3315
  description: "View and manage attachments",
@@ -3353,11 +3353,11 @@ const _hoisted_2$33 = {
3353
3353
  class: "flex flex-col items-center justify-center p-8"
3354
3354
  };
3355
3355
  const _hoisted_3$29 = { class: "mt-4 text-lg" };
3356
- const _hoisted_4$26 = {
3356
+ const _hoisted_4$27 = {
3357
3357
  key: 0,
3358
3358
  class: "alert alert-error mb-4"
3359
3359
  };
3360
- const _hoisted_5$19 = { class: "flex justify-center mt-6" };
3360
+ const _hoisted_5$20 = { class: "flex justify-center mt-6" };
3361
3361
  const _sfc_main$41 = /* @__PURE__ */ defineComponent({
3362
3362
  __name: "CreateTeamForm",
3363
3363
  setup(__props) {
@@ -3447,7 +3447,7 @@ const _sfc_main$41 = /* @__PURE__ */ defineComponent({
3447
3447
  _: 1
3448
3448
  }),
3449
3449
  createCommentVNode(" Form Status Messages "),
3450
- unref(form).submitError ? (openBlock(), createElementBlock("div", _hoisted_4$26, [_cache[1] || (_cache[1] = createElementVNode("svg", {
3450
+ unref(form).submitError ? (openBlock(), createElementBlock("div", _hoisted_4$27, [_cache[1] || (_cache[1] = createElementVNode("svg", {
3451
3451
  xmlns: "http://www.w3.org/2000/svg",
3452
3452
  class: "stroke-current shrink-0 h-6 w-6",
3453
3453
  fill: "none",
@@ -3459,7 +3459,7 @@ const _sfc_main$41 = /* @__PURE__ */ defineComponent({
3459
3459
  d: "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
3460
3460
  })], -1)), createElementVNode("span", null, toDisplayString(unref(form).submitError), 1)])) : createCommentVNode("v-if", true),
3461
3461
  createCommentVNode(" Submit Button "),
3462
- createElementVNode("div", _hoisted_5$19, [createVNode(unref(ZiniaSubmitButton), {
3462
+ createElementVNode("div", _hoisted_5$20, [createVNode(unref(ZiniaSubmitButton), {
3463
3463
  submitText: "Create Team",
3464
3464
  submittingText: "Creating Team..."
3465
3465
  })]),
@@ -3487,7 +3487,7 @@ const _hoisted_3$28 = {
3487
3487
  key: 0,
3488
3488
  class: "alert alert-error mb-4"
3489
3489
  };
3490
- const _hoisted_4$25 = { class: "flex justify-center mt-6" };
3490
+ const _hoisted_4$26 = { class: "flex justify-center mt-6" };
3491
3491
  const _sfc_main$40 = /* @__PURE__ */ defineComponent({
3492
3492
  __name: "EditTeamForm",
3493
3493
  props: {
@@ -3611,7 +3611,7 @@ const _sfc_main$40 = /* @__PURE__ */ defineComponent({
3611
3611
  d: "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
3612
3612
  })], -1)), createElementVNode("span", null, toDisplayString(unref(form).submitError), 1)])) : createCommentVNode("v-if", true),
3613
3613
  createCommentVNode(" Submit Button "),
3614
- createElementVNode("div", _hoisted_4$25, [createVNode(unref(ZiniaSubmitButton), {
3614
+ createElementVNode("div", _hoisted_4$26, [createVNode(unref(ZiniaSubmitButton), {
3615
3615
  submitText: "Update Team",
3616
3616
  submittingText: "Updating Team..."
3617
3617
  })]),
@@ -3901,8 +3901,8 @@ const _hoisted_2$30 = {
3901
3901
  class: "alert alert-error mb-4"
3902
3902
  };
3903
3903
  const _hoisted_3$27 = { class: "mb-4" };
3904
- const _hoisted_4$24 = { class: "text-xl sm:text-2xl font-bold text-base-content break-words leading-tight" };
3905
- const _hoisted_5$18 = { class: "flex flex-wrap items-center gap-2 mt-2" };
3904
+ const _hoisted_4$25 = { class: "text-xl sm:text-2xl font-bold text-base-content break-words leading-tight" };
3905
+ const _hoisted_5$19 = { class: "flex flex-wrap items-center gap-2 mt-2" };
3906
3906
  const _hoisted_6$16 = { class: "badge badge-sm badge-primary" };
3907
3907
  const _hoisted_7$13 = {
3908
3908
  key: 0,
@@ -4028,7 +4028,7 @@ const _sfc_main$35 = /* @__PURE__ */ defineComponent({
4028
4028
  })], -1)), createElementVNode("span", null, toDisplayString(__props.error.message), 1)])) : teamData.value ? (openBlock(), createBlock(ZiniaContainer_default, { key: 2 }, {
4029
4029
  default: withCtx(() => [
4030
4030
  createCommentVNode(" Header with Title "),
4031
- createElementVNode("div", _hoisted_3$27, [createElementVNode("h1", _hoisted_4$24, toDisplayString(teamData.value.display_name), 1), createElementVNode("div", _hoisted_5$18, [createElementVNode("span", _hoisted_6$16, toDisplayString(teamData.value.unique_name), 1), teamData.value.archived_at ? (openBlock(), createElementBlock("span", _hoisted_7$13, "Archived")) : (openBlock(), createElementBlock("span", _hoisted_8$13, "Active"))])]),
4031
+ createElementVNode("div", _hoisted_3$27, [createElementVNode("h1", _hoisted_4$25, toDisplayString(teamData.value.display_name), 1), createElementVNode("div", _hoisted_5$19, [createElementVNode("span", _hoisted_6$16, toDisplayString(teamData.value.unique_name), 1), teamData.value.archived_at ? (openBlock(), createElementBlock("span", _hoisted_7$13, "Archived")) : (openBlock(), createElementBlock("span", _hoisted_8$13, "Active"))])]),
4032
4032
  createCommentVNode(" Description "),
4033
4033
  teamData.value.description ? (openBlock(), createElementBlock("div", _hoisted_9$12, [createElementVNode("p", _hoisted_10$9, toDisplayString(teamData.value.description), 1)])) : createCommentVNode("v-if", true),
4034
4034
  createCommentVNode(" Team Information Grid "),
@@ -4113,11 +4113,11 @@ const _hoisted_2$29 = {
4113
4113
  class: "flex flex-col items-center justify-center p-8"
4114
4114
  };
4115
4115
  const _hoisted_3$26 = { class: "mt-4 text-lg" };
4116
- const _hoisted_4$23 = {
4116
+ const _hoisted_4$24 = {
4117
4117
  key: 0,
4118
4118
  class: "alert alert-error mb-4"
4119
4119
  };
4120
- const _hoisted_5$17 = { class: "flex justify-center mt-6" };
4120
+ const _hoisted_5$18 = { class: "flex justify-center mt-6" };
4121
4121
  const _sfc_main$34 = /* @__PURE__ */ defineComponent({
4122
4122
  __name: "CreateTeamMemberForm",
4123
4123
  setup(__props) {
@@ -4204,7 +4204,7 @@ const _sfc_main$34 = /* @__PURE__ */ defineComponent({
4204
4204
  _: 1
4205
4205
  }),
4206
4206
  createCommentVNode(" Form Status Messages "),
4207
- unref(form).submitError ? (openBlock(), createElementBlock("div", _hoisted_4$23, [_cache[1] || (_cache[1] = createElementVNode("svg", {
4207
+ unref(form).submitError ? (openBlock(), createElementBlock("div", _hoisted_4$24, [_cache[1] || (_cache[1] = createElementVNode("svg", {
4208
4208
  xmlns: "http://www.w3.org/2000/svg",
4209
4209
  class: "stroke-current shrink-0 h-6 w-6",
4210
4210
  fill: "none",
@@ -4216,7 +4216,7 @@ const _sfc_main$34 = /* @__PURE__ */ defineComponent({
4216
4216
  d: "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
4217
4217
  })], -1)), createElementVNode("span", null, toDisplayString(unref(form).submitError), 1)])) : createCommentVNode("v-if", true),
4218
4218
  createCommentVNode(" Submit Button "),
4219
- createElementVNode("div", _hoisted_5$17, [createVNode(unref(ZiniaSubmitButton), {
4219
+ createElementVNode("div", _hoisted_5$18, [createVNode(unref(ZiniaSubmitButton), {
4220
4220
  submitText: "Create Team Member",
4221
4221
  submittingText: "Creating Team Member..."
4222
4222
  })]),
@@ -4499,8 +4499,8 @@ const _hoisted_2$27 = {
4499
4499
  class: "alert alert-error mb-4"
4500
4500
  };
4501
4501
  const _hoisted_3$25 = { class: "mb-4" };
4502
- const _hoisted_4$22 = { class: "text-xl sm:text-2xl font-bold text-base-content break-words leading-tight" };
4503
- const _hoisted_5$16 = { class: "flex flex-wrap items-center gap-2 mt-2" };
4502
+ const _hoisted_4$23 = { class: "text-xl sm:text-2xl font-bold text-base-content break-words leading-tight" };
4503
+ const _hoisted_5$17 = { class: "flex flex-wrap items-center gap-2 mt-2" };
4504
4504
  const _hoisted_6$15 = {
4505
4505
  key: 0,
4506
4506
  class: "badge badge-sm badge-primary"
@@ -4586,7 +4586,7 @@ const _sfc_main$31 = /* @__PURE__ */ defineComponent({
4586
4586
  })], -1)), createElementVNode("span", null, toDisplayString(__props.error.message), 1)])) : teamMemberData.value ? (openBlock(), createBlock(ZiniaContainer_default, { key: 2 }, {
4587
4587
  default: withCtx(() => [
4588
4588
  createCommentVNode(" Header with Title "),
4589
- createElementVNode("div", _hoisted_3$25, [createElementVNode("h1", _hoisted_4$22, toDisplayString(teamMemberData.value.display_name || "Team Member"), 1), createElementVNode("div", _hoisted_5$16, [teamMemberData.value.role ? (openBlock(), createElementBlock("span", _hoisted_6$15, toDisplayString(teamMemberData.value.role), 1)) : createCommentVNode("v-if", true), teamMemberData.value.deleted_at ? (openBlock(), createElementBlock("span", _hoisted_7$12, " Deleted ")) : (openBlock(), createElementBlock("span", _hoisted_8$12, "Active"))])]),
4589
+ createElementVNode("div", _hoisted_3$25, [createElementVNode("h1", _hoisted_4$23, toDisplayString(teamMemberData.value.display_name || "Team Member"), 1), createElementVNode("div", _hoisted_5$17, [teamMemberData.value.role ? (openBlock(), createElementBlock("span", _hoisted_6$15, toDisplayString(teamMemberData.value.role), 1)) : createCommentVNode("v-if", true), teamMemberData.value.deleted_at ? (openBlock(), createElementBlock("span", _hoisted_7$12, " Deleted ")) : (openBlock(), createElementBlock("span", _hoisted_8$12, "Active"))])]),
4590
4590
  createCommentVNode(" Team Member Information Grid "),
4591
4591
  createElementVNode("div", _hoisted_9$11, [
4592
4592
  createCommentVNode(" Contact Information "),
@@ -4855,7 +4855,7 @@ function useSavedFilters(config) {
4855
4855
  const savedFilterRoutes = [{
4856
4856
  path: "/saved-filters",
4857
4857
  name: "SavedFilters",
4858
- component: () => import("./SavedFiltersPage-BNasEKOY.js"),
4858
+ component: () => import("./SavedFiltersPage-DhhcU1R1.js"),
4859
4859
  beforeEnter: [userAuthenticated],
4860
4860
  meta: {
4861
4861
  title: "Saved Filters",
@@ -4880,8 +4880,8 @@ const _hoisted_2$26 = {
4880
4880
  class: "label"
4881
4881
  };
4882
4882
  const _hoisted_3$24 = { class: "label-text-alt text-error" };
4883
- const _hoisted_4$21 = { class: "flex justify-end gap-2" };
4884
- const _hoisted_5$15 = ["disabled"];
4883
+ const _hoisted_4$22 = { class: "flex justify-end gap-2" };
4884
+ const _hoisted_5$16 = ["disabled"];
4885
4885
  const _sfc_main$30 = /* @__PURE__ */ defineComponent({
4886
4886
  __name: "SaveFilterModal",
4887
4887
  props: {
@@ -4935,7 +4935,7 @@ const _sfc_main$30 = /* @__PURE__ */ defineComponent({
4935
4935
  maxlength: "100"
4936
4936
  }, null, 512), [[vModelText, name.value]]),
4937
4937
  error.value ? (openBlock(), createElementBlock("label", _hoisted_2$26, [createElementVNode("span", _hoisted_3$24, toDisplayString(error.value), 1)])) : createCommentVNode("v-if", true)
4938
- ]), createElementVNode("div", _hoisted_4$21, [createElementVNode("button", {
4938
+ ]), createElementVNode("div", _hoisted_4$22, [createElementVNode("button", {
4939
4939
  type: "button",
4940
4940
  class: "btn btn-ghost",
4941
4941
  onClick: close
@@ -4943,7 +4943,7 @@ const _sfc_main$30 = /* @__PURE__ */ defineComponent({
4943
4943
  type: "submit",
4944
4944
  class: "btn btn-primary",
4945
4945
  disabled: __props.saving || !name.value.trim()
4946
- }, toDisplayString(__props.saving ? "Saving..." : "Save"), 9, _hoisted_5$15)])], 32)]),
4946
+ }, toDisplayString(__props.saving ? "Saving..." : "Save"), 9, _hoisted_5$16)])], 32)]),
4947
4947
  _: 1
4948
4948
  }, 8, ["is-open"]);
4949
4949
  };
@@ -4962,11 +4962,11 @@ const _hoisted_3$23 = {
4962
4962
  key: 1,
4963
4963
  class: "flex justify-center py-4"
4964
4964
  };
4965
- const _hoisted_4$20 = {
4965
+ const _hoisted_4$21 = {
4966
4966
  key: 2,
4967
4967
  class: "space-y-2"
4968
4968
  };
4969
- const _hoisted_5$14 = ["onKeydown"];
4969
+ const _hoisted_5$15 = ["onKeydown"];
4970
4970
  const _hoisted_6$14 = ["disabled", "onClick"];
4971
4971
  const _hoisted_7$11 = ["disabled"];
4972
4972
  const _hoisted_8$11 = { class: "font-medium truncate flex-1 min-w-0" };
@@ -5020,7 +5020,7 @@ const _sfc_main$29 = /* @__PURE__ */ defineComponent({
5020
5020
  title: "Manage Filter Presets",
5021
5021
  onClose: close
5022
5022
  }, {
5023
- default: withCtx(() => [createElementVNode("div", _hoisted_1$27, [__props.presets.length === 0 && !__props.loading ? (openBlock(), createElementBlock("p", _hoisted_2$25, " No saved presets yet. Set filters, then use \"Save current filters\" in the Presets menu. ")) : __props.loading ? (openBlock(), createElementBlock("div", _hoisted_3$23, [..._cache[1] || (_cache[1] = [createElementVNode("span", { class: "loading loading-spinner loading-md" }, null, -1)])])) : (openBlock(), createElementBlock("ul", _hoisted_4$20, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.presets, (preset) => {
5023
+ default: withCtx(() => [createElementVNode("div", _hoisted_1$27, [__props.presets.length === 0 && !__props.loading ? (openBlock(), createElementBlock("p", _hoisted_2$25, " No saved presets yet. Set filters, then use \"Save current filters\" in the Presets menu. ")) : __props.loading ? (openBlock(), createElementBlock("div", _hoisted_3$23, [..._cache[1] || (_cache[1] = [createElementVNode("span", { class: "loading loading-spinner loading-md" }, null, -1)])])) : (openBlock(), createElementBlock("ul", _hoisted_4$21, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.presets, (preset) => {
5024
5024
  return openBlock(), createElementBlock("li", {
5025
5025
  key: preset.id,
5026
5026
  class: "flex items-center gap-2 p-2 rounded-lg bg-base-200"
@@ -5035,7 +5035,7 @@ const _sfc_main$29 = /* @__PURE__ */ defineComponent({
5035
5035
  maxlength: "100",
5036
5036
  placeholder: "Preset name",
5037
5037
  onKeydown: [withKeys(($event) => saveRename(preset.id), ["enter"]), withKeys(cancelRename, ["escape"])]
5038
- }, null, 40, _hoisted_5$14), [[vModelText, editingName.value]]),
5038
+ }, null, 40, _hoisted_5$15), [[vModelText, editingName.value]]),
5039
5039
  createElementVNode("button", {
5040
5040
  type: "button",
5041
5041
  class: "btn btn-sm btn-primary shrink-0",
@@ -5097,8 +5097,8 @@ var ManagePresetsModal_default = _sfc_main$29;
5097
5097
  const _hoisted_1$26 = { class: "space-y-4" };
5098
5098
  const _hoisted_2$24 = { key: 0 };
5099
5099
  const _hoisted_3$22 = { class: "space-y-2" };
5100
- const _hoisted_4$19 = ["onKeydown"];
5101
- const _hoisted_5$13 = ["disabled", "onClick"];
5100
+ const _hoisted_4$20 = ["onKeydown"];
5101
+ const _hoisted_5$14 = ["disabled", "onClick"];
5102
5102
  const _hoisted_6$13 = ["disabled"];
5103
5103
  const _hoisted_7$10 = ["onClick"];
5104
5104
  const _hoisted_8$10 = { class: "text-base-content/60 text-xs font-normal ml-1" };
@@ -5241,13 +5241,13 @@ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
5241
5241
  maxlength: "100",
5242
5242
  placeholder: "Preset name",
5243
5243
  onKeydown: [withKeys(($event) => saveRename(preset.id), ["enter"]), withKeys(cancelRename, ["escape"])]
5244
- }, null, 40, _hoisted_4$19), [[vModelText, editingName.value]]),
5244
+ }, null, 40, _hoisted_4$20), [[vModelText, editingName.value]]),
5245
5245
  createElementVNode("button", {
5246
5246
  type: "button",
5247
5247
  class: "btn btn-sm btn-primary shrink-0",
5248
5248
  disabled: __props.renaming || !editingName.value.trim(),
5249
5249
  onClick: ($event) => saveRename(preset.id)
5250
- }, toDisplayString(__props.renaming ? "..." : "Save"), 9, _hoisted_5$13),
5250
+ }, toDisplayString(__props.renaming ? "..." : "Save"), 9, _hoisted_5$14),
5251
5251
  createElementVNode("button", {
5252
5252
  type: "button",
5253
5253
  class: "btn btn-sm btn-ghost shrink-0",
@@ -5380,7 +5380,7 @@ const _hoisted_2$23 = {
5380
5380
  class: "badge badge-primary badge-lg gap-1 pr-1"
5381
5381
  };
5382
5382
  const _hoisted_3$21 = { class: "truncate max-w-[8rem] sm:max-w-[12rem]" };
5383
- const _hoisted_4$18 = ["disabled", "title"];
5383
+ const _hoisted_4$19 = ["disabled", "title"];
5384
5384
  const _sfc_main$27 = /* @__PURE__ */ defineComponent({
5385
5385
  __name: "SavedFilterPresets",
5386
5386
  props: {
@@ -5401,12 +5401,21 @@ const _sfc_main$27 = /* @__PURE__ */ defineComponent({
5401
5401
  const pinnedPresets = useInjectedPinnedPresets();
5402
5402
  const props = __props;
5403
5403
  const showPresetsModal = ref(false);
5404
+ const showDeleteConfirm = ref(false);
5405
+ const presetToDelete = ref(null);
5404
5406
  function handleClearPreset() {
5405
5407
  props.clearPreset();
5406
5408
  }
5407
- async function handleDelete(preset) {
5408
- pinnedPresets.unpinPreset(preset.id);
5409
- await props.removePreset(preset.id);
5409
+ function handleDelete(preset) {
5410
+ presetToDelete.value = preset;
5411
+ showDeleteConfirm.value = true;
5412
+ }
5413
+ async function confirmDelete() {
5414
+ if (!presetToDelete.value) return;
5415
+ pinnedPresets.unpinPreset(presetToDelete.value.id);
5416
+ await props.removePreset(presetToDelete.value.id);
5417
+ presetToDelete.value = null;
5418
+ showDeleteConfirm.value = false;
5410
5419
  }
5411
5420
  async function handleRename(preset) {
5412
5421
  pinnedPresets.updatePinnedPreset(preset.id, { name: preset.name });
@@ -5420,7 +5429,7 @@ const _sfc_main$27 = /* @__PURE__ */ defineComponent({
5420
5429
  class: "btn btn-ghost btn-xs btn-circle",
5421
5430
  "aria-label": "Clear preset",
5422
5431
  onClick: handleClearPreset
5423
- }, [..._cache[2] || (_cache[2] = [createElementVNode("svg", {
5432
+ }, [..._cache[4] || (_cache[4] = [createElementVNode("svg", {
5424
5433
  class: "w-3 h-3",
5425
5434
  fill: "none",
5426
5435
  stroke: "currentColor",
@@ -5438,7 +5447,7 @@ const _sfc_main$27 = /* @__PURE__ */ defineComponent({
5438
5447
  disabled: props.presetsLoading,
5439
5448
  title: props.presets.length ? "Apply, save, or manage presets" : "No presets saved",
5440
5449
  onClick: _cache[0] || (_cache[0] = ($event) => showPresetsModal.value = true)
5441
- }, [..._cache[3] || (_cache[3] = [createElementVNode("svg", {
5450
+ }, [..._cache[5] || (_cache[5] = [createElementVNode("svg", {
5442
5451
  class: "w-4 h-4",
5443
5452
  fill: "none",
5444
5453
  stroke: "currentColor",
@@ -5448,7 +5457,23 @@ const _sfc_main$27 = /* @__PURE__ */ defineComponent({
5448
5457
  "stroke-linejoin": "round",
5449
5458
  "stroke-width": "2",
5450
5459
  d: "M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"
5451
- })], -1), createTextVNode(" Presets ", -1)])], 8, _hoisted_4$18),
5460
+ })], -1), createTextVNode(" Presets ", -1)])], 8, _hoisted_4$19),
5461
+ createCommentVNode(" Delete confirmation modal "),
5462
+ createVNode(ConfirmDialog_default, {
5463
+ modelValue: showDeleteConfirm.value,
5464
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => showDeleteConfirm.value = $event),
5465
+ title: "Delete preset?",
5466
+ "confirm-text": "Delete",
5467
+ "cancel-text": "Cancel",
5468
+ "processing-text": "Deleting...",
5469
+ "confirm-button-class": "btn-error",
5470
+ "is-processing": props.deleting,
5471
+ onConfirm: confirmDelete,
5472
+ onCancel: _cache[2] || (_cache[2] = ($event) => presetToDelete.value = null)
5473
+ }, {
5474
+ message: withCtx(() => [createElementVNode("p", null, " Are you sure you want to delete \"" + toDisplayString(presetToDelete.value?.name) + "\"? This cannot be undone. ", 1)]),
5475
+ _: 1
5476
+ }, 8, ["modelValue", "is-processing"]),
5452
5477
  createCommentVNode(" Single Presets modal: apply, save, rename, delete "),
5453
5478
  createVNode(PresetsModal_default, {
5454
5479
  "is-open": showPresetsModal.value,
@@ -5466,7 +5491,7 @@ const _sfc_main$27 = /* @__PURE__ */ defineComponent({
5466
5491
  "toggle-pin": unref(pinnedPresets).togglePin,
5467
5492
  "can-pin-more": unref(pinnedPresets).canPinMore.value,
5468
5493
  "max-pinned": unref(pinnedPresets).maxPinned,
5469
- onClose: _cache[1] || (_cache[1] = ($event) => showPresetsModal.value = false),
5494
+ onClose: _cache[3] || (_cache[3] = ($event) => showPresetsModal.value = false),
5470
5495
  onDelete: handleDelete,
5471
5496
  onRename: handleRename
5472
5497
  }, null, 8, [
@@ -5547,7 +5572,7 @@ const customerSupportTicketRoutes = [{
5547
5572
  {
5548
5573
  path: customerSupportPaths.customer_list.path,
5549
5574
  name: customerSupportPaths.customer_list.name,
5550
- component: () => import("./CustomerSupportTicketList-CMPRQ_7O.js"),
5575
+ component: () => import("./CustomerSupportTicketList-CKf8Kyzu.js"),
5551
5576
  beforeEnter: (to) => customerListPresetGuard(to),
5552
5577
  meta: {
5553
5578
  title: "Tickets",
@@ -5566,7 +5591,7 @@ const customerSupportTicketRoutes = [{
5566
5591
  {
5567
5592
  path: customerSupportPaths.customer_create.path,
5568
5593
  name: customerSupportPaths.customer_create.name,
5569
- component: () => import("./CustomerCreateSupportTicketForm-CQcv4vrX.js"),
5594
+ component: () => import("./CustomerCreateSupportTicketForm-CpnbsCqr.js"),
5570
5595
  meta: {
5571
5596
  title: "Create Support Ticket",
5572
5597
  description: "Create new support ticket",
@@ -5582,7 +5607,7 @@ const customerSupportTicketRoutes = [{
5582
5607
  {
5583
5608
  path: customerSupportPaths.customer_create_success.path,
5584
5609
  name: customerSupportPaths.customer_create_success.name,
5585
- component: () => import("./CustomerSupportTicketSuccess-CnRWm6gX.js"),
5610
+ component: () => import("./CustomerSupportTicketSuccess-B-1n0gP-.js"),
5586
5611
  meta: {
5587
5612
  title: "Support Ticket Submitted",
5588
5613
  description: "Support ticket submitted successfully",
@@ -5604,7 +5629,7 @@ const customerSupportTicketRoutes = [{
5604
5629
  },
5605
5630
  {
5606
5631
  path: customerSupportPaths.customer_view.path,
5607
- component: () => import("./CustomerSupportTicketParent-BOYIren9.js"),
5632
+ component: () => import("./CustomerSupportTicketParent-BnmTFigo.js"),
5608
5633
  meta: {
5609
5634
  title: "View Support Ticket",
5610
5635
  description: "View support ticket details"
@@ -5612,7 +5637,7 @@ const customerSupportTicketRoutes = [{
5612
5637
  children: [{
5613
5638
  path: "",
5614
5639
  name: customerSupportPaths.customer_view.name,
5615
- component: () => import("./CustomerSupportTicketDetailPage-DQa_Zvfe.js"),
5640
+ component: () => import("./CustomerSupportTicketDetailPage-DZQCplSM.js"),
5616
5641
  meta: {
5617
5642
  title: "View Support Ticket",
5618
5643
  description: "View support ticket details"
@@ -5689,7 +5714,7 @@ const staffSupportTicketRoutes = [{
5689
5714
  {
5690
5715
  path: staffSupportPaths.staff_list.path,
5691
5716
  name: staffSupportPaths.staff_list.name,
5692
- component: () => import("./StaffSupportTicketList-BgCIa_9v.js"),
5717
+ component: () => import("./StaffSupportTicketList-xD3FaXkS.js"),
5693
5718
  beforeEnter: (to) => staffListPresetGuard(to),
5694
5719
  meta: {
5695
5720
  title: "Manage Support",
@@ -5703,7 +5728,7 @@ const staffSupportTicketRoutes = [{
5703
5728
  {
5704
5729
  path: staffSupportPaths.staff_create.path,
5705
5730
  name: staffSupportPaths.staff_create.name,
5706
- component: () => import("./StaffCreateSupportTicketForm-DoHCw60c.js"),
5731
+ component: () => import("./StaffCreateSupportTicketForm-D5ne_W9A.js"),
5707
5732
  meta: {
5708
5733
  title: "Create Support Ticket",
5709
5734
  description: "Create new support ticket item",
@@ -5719,7 +5744,7 @@ const staffSupportTicketRoutes = [{
5719
5744
  {
5720
5745
  path: staffSupportPaths.staff_create_success.path,
5721
5746
  name: staffSupportPaths.staff_create_success.name,
5722
- component: () => import("./StaffSupportTicketSuccess-DZF2WpZc.js"),
5747
+ component: () => import("./StaffSupportTicketSuccess-D1nBsbcC.js"),
5723
5748
  meta: {
5724
5749
  title: "Support Ticket Created",
5725
5750
  description: "Support ticket created successfully",
@@ -5741,7 +5766,7 @@ const staffSupportTicketRoutes = [{
5741
5766
  },
5742
5767
  {
5743
5768
  path: staffSupportPaths.staff_edit.path,
5744
- component: () => import("./StaffSupportTicketParent-C7Mm7W_0.js"),
5769
+ component: () => import("./StaffSupportTicketParent-Dp1G85wc.js"),
5745
5770
  meta: {
5746
5771
  title: "View Support Ticket",
5747
5772
  description: "View support ticket details"
@@ -5749,7 +5774,7 @@ const staffSupportTicketRoutes = [{
5749
5774
  children: [{
5750
5775
  path: "",
5751
5776
  name: staffSupportPaths.staff_edit.name,
5752
- component: () => import("./StaffSupportTicketDetailPage-D49ibqrO.js"),
5777
+ component: () => import("./StaffSupportTicketDetailPage-DY07Ez0R.js"),
5753
5778
  meta: {
5754
5779
  title: "View Support Ticket",
5755
5780
  description: "View support ticket details"
@@ -5760,95 +5785,431 @@ const staffSupportTicketRoutes = [{
5760
5785
  }];
5761
5786
 
5762
5787
  //#endregion
5763
- //#region src/slices/support_ticket/shared/SupportTicketStatusBadge.vue
5764
- const _hoisted_1$24 = ["aria-label"];
5788
+ //#region src/slices/support_ticket/customer/components/SupportTicketTimeline.vue
5789
+ const _hoisted_1$24 = { class: "mt-8" };
5790
+ const _hoisted_2$22 = { class: "relative" };
5791
+ const _hoisted_3$20 = { class: "space-y-6 relative" };
5792
+ const _hoisted_4$18 = { class: "flex items-start group" };
5793
+ const _hoisted_5$13 = { class: "ml-4" };
5794
+ const _hoisted_6$12 = { class: "text-xs text-base-content/40 mt-1" };
5795
+ const _hoisted_7$9 = { class: "flex items-start group" };
5796
+ const _hoisted_8$9 = {
5797
+ key: 0,
5798
+ xmlns: "http://www.w3.org/2000/svg",
5799
+ class: "h-4 w-4 animate-pulse",
5800
+ fill: "none",
5801
+ viewBox: "0 0 24 24",
5802
+ stroke: "currentColor"
5803
+ };
5804
+ const _hoisted_9$8 = {
5805
+ key: 1,
5806
+ xmlns: "http://www.w3.org/2000/svg",
5807
+ class: "h-4 w-4",
5808
+ fill: "none",
5809
+ viewBox: "0 0 24 24",
5810
+ stroke: "currentColor"
5811
+ };
5812
+ const _hoisted_10$5 = {
5813
+ key: 2,
5814
+ xmlns: "http://www.w3.org/2000/svg",
5815
+ class: "h-4 w-4",
5816
+ fill: "none",
5817
+ viewBox: "0 0 24 24",
5818
+ stroke: "currentColor"
5819
+ };
5820
+ const _hoisted_11$4 = { class: "ml-4" };
5821
+ const _hoisted_12$3 = { class: "font-medium text-base-content" };
5822
+ const _hoisted_13$2 = { class: "text-sm text-base-content/60" };
5823
+ const _hoisted_14$2 = {
5824
+ key: 0,
5825
+ class: "text-xs text-base-content/40 mt-1"
5826
+ };
5827
+ const _hoisted_15$1 = {
5828
+ key: 0,
5829
+ class: "flex items-start group"
5830
+ };
5831
+ const _hoisted_16$1 = { class: "ml-4" };
5765
5832
  const _sfc_main$26 = /* @__PURE__ */ defineComponent({
5766
- __name: "SupportTicketStatusBadge",
5767
- props: {
5768
- status: {},
5769
- size: { default: "md" },
5770
- variant: { default: "default" }
5771
- },
5833
+ __name: "SupportTicketTimeline",
5834
+ props: { support_ticket: {} },
5772
5835
  setup(__props) {
5773
- /**
5774
- * SupportTicketStatusBadge - A reusable Vue component for displaying support ticket status
5775
- * as color-coded badges with consistent DaisyUI styling and accessibility features.
5776
- *
5777
- * @example
5778
- * <SupportTicketStatusBadge :status="'PENDING'" size="md" />
5779
- * <SupportTicketStatusBadge :status="'COMPLETED'" size="sm" variant="outline" />
5780
- */
5781
- const props = __props;
5782
- /**
5783
- * Configuration for each status badge
5784
- */
5785
- const statusConfig = {
5786
- PENDING: {
5787
- color: "badge-warning",
5788
- text: "Pending",
5789
- ariaLabel: "Status: Pending review by support team"
5790
- },
5791
- FOLLOWUP: {
5792
- color: "badge-info",
5793
- text: "To Do",
5794
- ariaLabel: "Status: Approved and ready to begin work"
5795
- },
5796
- IN_PROGRESS: {
5797
- color: "badge-secondary",
5798
- text: "Active",
5799
- ariaLabel: "Status: Currently being worked on"
5800
- },
5801
- VERIFICATION: {
5802
- color: "badge-warning",
5803
- text: "Verification",
5804
- ariaLabel: "Status: Please verify and leave a comment to confirm completion"
5805
- },
5806
- COMPLETED: {
5807
- color: "badge-success",
5808
- text: "Done",
5809
- ariaLabel: "Status: Successfully completed"
5810
- },
5811
- CANCELLED: {
5812
- color: "badge-error",
5813
- text: "Cancelled",
5814
- ariaLabel: "Status: Cancelled or rejected"
5815
- }
5816
- };
5817
- const getStatusConfig = (status) => {
5818
- const config$1 = statusConfig[status];
5819
- if (!config$1) return {
5820
- color: "badge-neutral",
5821
- text: status || "Unknown",
5822
- ariaLabel: `Status: ${status || "Unknown status"}`
5823
- };
5824
- return config$1;
5825
- };
5826
- const config = computed(() => getStatusConfig(props.status));
5827
- const badgeClasses = computed(() => {
5828
- const baseClasses = ["badge", "text-xs"];
5829
- baseClasses.push(config.value.color);
5830
- if (props.size === "sm") baseClasses.push("badge-sm", "text-xs");
5831
- else if (props.size === "lg") baseClasses.push("badge-lg", "text-sm");
5832
- else baseClasses.push("text-xs", "sm:text-sm");
5833
- if (props.variant === "outline") baseClasses.push("badge-outline");
5834
- return baseClasses.join(" ");
5835
- });
5836
- const displayText = computed(() => config.value.text);
5837
- const ariaLabel = computed(() => config.value.ariaLabel);
5838
5836
  return (_ctx, _cache) => {
5839
- return openBlock(), createElementBlock("div", {
5840
- class: normalizeClass(badgeClasses.value),
5841
- "aria-label": ariaLabel.value,
5842
- role: "status"
5843
- }, toDisplayString(displayText.value), 11, _hoisted_1$24);
5837
+ return openBlock(), createElementBlock("div", _hoisted_1$24, [_cache[8] || (_cache[8] = createElementVNode("h3", { class: "text-lg font-semibold text-base-content mb-4" }, "SupportTicket Progress", -1)), createElementVNode("div", _hoisted_2$22, [
5838
+ createCommentVNode(" Timeline line "),
5839
+ _cache[7] || (_cache[7] = createElementVNode("div", { class: "absolute left-4 top-0 bottom-0 w-0.5 bg-base-300" }, null, -1)),
5840
+ createCommentVNode(" Timeline items "),
5841
+ createElementVNode("div", _hoisted_3$20, [
5842
+ createCommentVNode(" Submitted "),
5843
+ createElementVNode("div", _hoisted_4$18, [createElementVNode("div", { class: normalizeClass(["flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center z-10", {
5844
+ "bg-primary text-primary-content": [
5845
+ "PENDING",
5846
+ "FOLLOWUP",
5847
+ "IN_PROGRESS",
5848
+ "COMPLETED",
5849
+ "CANCELLED"
5850
+ ].includes(__props.support_ticket.status),
5851
+ "bg-base-300 text-base-content/40": ![
5852
+ "PENDING",
5853
+ "FOLLOWUP",
5854
+ "IN_PROGRESS",
5855
+ "COMPLETED",
5856
+ "CANCELLED"
5857
+ ].includes(__props.support_ticket.status)
5858
+ }]) }, [..._cache[0] || (_cache[0] = [createElementVNode("svg", {
5859
+ xmlns: "http://www.w3.org/2000/svg",
5860
+ class: "h-4 w-4",
5861
+ fill: "none",
5862
+ viewBox: "0 0 24 24",
5863
+ stroke: "currentColor"
5864
+ }, [createElementVNode("path", {
5865
+ "stroke-linecap": "round",
5866
+ "stroke-linejoin": "round",
5867
+ "stroke-width": "2",
5868
+ d: "M5 13l4 4L19 7"
5869
+ })], -1)])], 2), createElementVNode("div", _hoisted_5$13, [
5870
+ _cache[1] || (_cache[1] = createElementVNode("p", { class: "font-medium text-base-content" }, "Submitted", -1)),
5871
+ _cache[2] || (_cache[2] = createElementVNode("p", { class: "text-sm text-base-content/60" }, "Your ticket has been received", -1)),
5872
+ createElementVNode("p", _hoisted_6$12, toDisplayString(unref(formatSystemTimestamp)(__props.support_ticket.created_at)), 1)
5873
+ ])]),
5874
+ createCommentVNode(" Under Review / In Progress / Completed "),
5875
+ createElementVNode("div", _hoisted_7$9, [createElementVNode("div", { class: normalizeClass(["flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center z-10", {
5876
+ "bg-primary text-primary-content": [
5877
+ "FOLLOWUP",
5878
+ "IN_PROGRESS",
5879
+ "COMPLETED",
5880
+ "CANCELLED"
5881
+ ].includes(__props.support_ticket.status),
5882
+ "bg-base-300 text-base-content/40": ![
5883
+ "FOLLOWUP",
5884
+ "IN_PROGRESS",
5885
+ "COMPLETED",
5886
+ "CANCELLED"
5887
+ ].includes(__props.support_ticket.status)
5888
+ }]) }, [__props.support_ticket.status === "PENDING" ? (openBlock(), createElementBlock("svg", _hoisted_8$9, [..._cache[3] || (_cache[3] = [createElementVNode("path", {
5889
+ "stroke-linecap": "round",
5890
+ "stroke-linejoin": "round",
5891
+ "stroke-width": "2",
5892
+ d: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"
5893
+ }, null, -1)])])) : __props.support_ticket.status === "CANCELLED" ? (openBlock(), createElementBlock("svg", _hoisted_9$8, [..._cache[4] || (_cache[4] = [createElementVNode("path", {
5894
+ "stroke-linecap": "round",
5895
+ "stroke-linejoin": "round",
5896
+ "stroke-width": "2",
5897
+ d: "M6 18L18 6M6 6l12 12"
5898
+ }, null, -1)])])) : (openBlock(), createElementBlock("svg", _hoisted_10$5, [..._cache[5] || (_cache[5] = [createElementVNode("path", {
5899
+ "stroke-linecap": "round",
5900
+ "stroke-linejoin": "round",
5901
+ "stroke-width": "2",
5902
+ d: "M5 13l4 4L19 7"
5903
+ }, null, -1)])]))], 2), createElementVNode("div", _hoisted_11$4, [
5904
+ createElementVNode("p", _hoisted_12$3, [__props.support_ticket.status === "PENDING" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode("Under Review")], 64)) : __props.support_ticket.status === "FOLLOWUP" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode("Approved")], 64)) : __props.support_ticket.status === "IN_PROGRESS" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode("In Development")], 64)) : __props.support_ticket.status === "COMPLETED" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [createTextVNode("Completed")], 64)) : __props.support_ticket.status === "CANCELLED" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [createTextVNode("Not Approved")], 64)) : createCommentVNode("v-if", true)]),
5905
+ createElementVNode("p", _hoisted_13$2, [__props.support_ticket.status === "PENDING" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode("Our team is reviewing your support_ticket")], 64)) : __props.support_ticket.status === "FOLLOWUP" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode("Your ticket has been approved and is in our backlog")], 64)) : __props.support_ticket.status === "IN_PROGRESS" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode("We're currently working on implementing this")], 64)) : __props.support_ticket.status === "COMPLETED" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [createTextVNode("This has been implemented and deployed")], 64)) : __props.support_ticket.status === "CANCELLED" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [createTextVNode("This ticket wasn't approved for implementation")], 64)) : createCommentVNode("v-if", true)]),
5906
+ __props.support_ticket.updated_at && __props.support_ticket.updated_at !== __props.support_ticket.created_at ? (openBlock(), createElementBlock("p", _hoisted_14$2, toDisplayString(unref(formatSystemTimestamp)(__props.support_ticket.updated_at)), 1)) : createCommentVNode("v-if", true)
5907
+ ])]),
5908
+ createCommentVNode(" Credit Information "),
5909
+ unref(formatCustomerCreditValue)(__props.support_ticket.credit_value) !== "TBD" && unref(formatCustomerCreditValue)(__props.support_ticket.credit_value) !== "N/A" ? (openBlock(), createElementBlock("div", _hoisted_15$1, [createElementVNode("div", { class: normalizeClass(["flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center z-10", {
5910
+ "bg-error text-error-content": [
5911
+ "FOLLOWUP",
5912
+ "IN_PROGRESS",
5913
+ "COMPLETED",
5914
+ "CANCELLED"
5915
+ ].includes(__props.support_ticket.status),
5916
+ "bg-warning text-warning-content": ![
5917
+ "FOLLOWUP",
5918
+ "IN_PROGRESS",
5919
+ "COMPLETED",
5920
+ "CANCELLED"
5921
+ ].includes(__props.support_ticket.status)
5922
+ }]) }, [..._cache[6] || (_cache[6] = [createElementVNode("svg", {
5923
+ xmlns: "http://www.w3.org/2000/svg",
5924
+ class: "h-4 w-4",
5925
+ fill: "none",
5926
+ viewBox: "0 0 24 24",
5927
+ stroke: "currentColor"
5928
+ }, [createElementVNode("path", {
5929
+ "stroke-linecap": "round",
5930
+ "stroke-linejoin": "round",
5931
+ "stroke-width": "2",
5932
+ d: "M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
5933
+ })], -1)])], 2), createElementVNode("div", _hoisted_16$1, [createElementVNode("p", { class: normalizeClass(["font-medium", {
5934
+ "text-error": [
5935
+ "FOLLOWUP",
5936
+ "IN_PROGRESS",
5937
+ "COMPLETED",
5938
+ "CANCELLED"
5939
+ ].includes(__props.support_ticket.status),
5940
+ "text-warning": ![
5941
+ "FOLLOWUP",
5942
+ "IN_PROGRESS",
5943
+ "COMPLETED",
5944
+ "CANCELLED"
5945
+ ].includes(__props.support_ticket.status)
5946
+ }]) }, toDisplayString([
5947
+ "FOLLOWUP",
5948
+ "IN_PROGRESS",
5949
+ "COMPLETED",
5950
+ "CANCELLED"
5951
+ ].includes(__props.support_ticket.status) ? "Credit Deducted" : "Credit Will Be Deducted"), 3), createElementVNode("p", { class: normalizeClass(["text-sm", {
5952
+ "text-error/70": [
5953
+ "FOLLOWUP",
5954
+ "IN_PROGRESS",
5955
+ "COMPLETED",
5956
+ "CANCELLED"
5957
+ ].includes(__props.support_ticket.status),
5958
+ "text-warning/70": ![
5959
+ "FOLLOWUP",
5960
+ "IN_PROGRESS",
5961
+ "COMPLETED",
5962
+ "CANCELLED"
5963
+ ].includes(__props.support_ticket.status)
5964
+ }]) }, [[
5965
+ "FOLLOWUP",
5966
+ "IN_PROGRESS",
5967
+ "COMPLETED",
5968
+ "CANCELLED"
5969
+ ].includes(__props.support_ticket.status) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(unref(formatCustomerCreditValue)(__props.support_ticket.credit_value)) + " credit(s) have been deducted from your account for this ticket ", 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(unref(formatCustomerCreditValue)(__props.support_ticket.credit_value)) + " credit(s) will be deducted from your account once this ticket is approved ", 1)], 64))], 2)])])) : createCommentVNode("v-if", true)
5970
+ ])
5971
+ ])]);
5844
5972
  };
5845
5973
  }
5846
5974
  });
5847
- var SupportTicketStatusBadge_default = _sfc_main$26;
5975
+ var SupportTicketTimeline_default = _sfc_main$26;
5848
5976
 
5849
5977
  //#endregion
5850
- //#region src/slices/support_ticket/customer/customerSupportTicketRowSchema.ts
5851
- /**
5978
+ //#region src/slices/support_ticket/customer/customerSupportTicketMetadata.ts
5979
+ const customerSupportTicketCreateSchemaWithMetadata = withMetadata(CustomerSupportTicketCreateSchema, "customerSupportTicketCreateSchema", {
5980
+ description: {
5981
+ inputType: "textarea",
5982
+ placeholder: "Enter description"
5983
+ },
5984
+ priority: {
5985
+ inputType: "select",
5986
+ valueToLabel: SUPPORT_TICKET_PRIORITY_NUMBER_TO_LABEL,
5987
+ valueType: "number"
5988
+ }
5989
+ });
5990
+ const customerSupportTicketUpdateSchemaWithMetadata = withMetadata(CustomerSupportTicketUpdateSchema, "customerSupportTicketUpdateSchema", {
5991
+ description: {
5992
+ inputType: "textarea",
5993
+ placeholder: "Enter description"
5994
+ },
5995
+ priority: {
5996
+ inputType: "select",
5997
+ valueToLabel: SUPPORT_TICKET_PRIORITY_NUMBER_TO_LABEL,
5998
+ valueType: "number"
5999
+ }
6000
+ });
6001
+
6002
+ //#endregion
6003
+ //#region src/slices/support_ticket/customer/CustomerCreateSupportTicketForm.vue
6004
+ const _hoisted_1$23 = {
6005
+ key: 0,
6006
+ class: "flex flex-col items-center justify-center p-8"
6007
+ };
6008
+ const _hoisted_2$21 = {
6009
+ key: 1,
6010
+ class: "flex flex-col items-center justify-center p-8"
6011
+ };
6012
+ const _hoisted_3$19 = { class: "mt-4 text-lg" };
6013
+ const _hoisted_4$17 = { class: "mt-6" };
6014
+ const _hoisted_5$12 = {
6015
+ key: 0,
6016
+ class: "alert alert-error mb-4"
6017
+ };
6018
+ const _hoisted_6$11 = { class: "flex justify-center mt-6" };
6019
+ const _sfc_main$25 = /* @__PURE__ */ defineComponent({
6020
+ __name: "CustomerCreateSupportTicketForm",
6021
+ setup(__props) {
6022
+ const router = useRouter();
6023
+ const attachmentsRef = ref(null);
6024
+ const { form, zinia, ZiniaForm, ZiniaSubmitButton, ZiniaResetButton, ZiniaFormErrorsSummary, clearSavedFormState } = useForm(customerSupportTicketCreateSchemaWithMetadata, {
6025
+ storeName: `create-customer-support-ticket`,
6026
+ persistToLocalStorage: true,
6027
+ renderStyle: "daisy_ui",
6028
+ fetchData: async () => {
6029
+ return {
6030
+ title: "",
6031
+ type: "IMPROVEMENT",
6032
+ priority: SUPPORT_TICKET_PRIORITY_TO_NUMBER.MEDIUM,
6033
+ description: ""
6034
+ };
6035
+ }
6036
+ });
6037
+ const { mutate: createSupportTicket } = useMutation((api, input) => api.supportTickets.createTicket(input), { invalidate: /^support-tickets?:/ });
6038
+ const beforeValidate = () => {
6039
+ return true;
6040
+ };
6041
+ const handleSubmit = async (formData) => {
6042
+ const createdSupportTicket = await createSupportTicket(formData);
6043
+ if (!createdSupportTicket) throw new Error("Failed to create support ticket");
6044
+ return createdSupportTicket;
6045
+ };
6046
+ const handleFilesQueued = (_files) => {};
6047
+ const handleSuccess = async (createdSupportTicket) => {
6048
+ if (attachmentsRef.value) try {
6049
+ await attachmentsRef.value.uploadQueuedFiles(createdSupportTicket.id);
6050
+ } catch (error) {
6051
+ console.error("Failed to upload attachments:", error);
6052
+ toast.warning("Ticket created, but some attachments failed to upload. You can add them later.");
6053
+ }
6054
+ clearSavedFormState();
6055
+ await router.push({ name: customerSupportPaths.customer_create_success.name });
6056
+ toast.success(`Support Ticket "${createdSupportTicket.title}" submitted successfully! Our team will review it shortly.`);
6057
+ };
6058
+ const handleError = (error) => {
6059
+ form.setSubmitError(error instanceof Error ? error.message : "An unknown error occurred");
6060
+ };
6061
+ return (_ctx, _cache) => {
6062
+ return unref(form).isLoading ? (openBlock(), createElementBlock("div", _hoisted_1$23, [..._cache[0] || (_cache[0] = [createElementVNode("div", { class: "loading loading-spinner loading-lg" }, null, -1), createElementVNode("p", { class: "mt-4 text-lg" }, "Loading...", -1)])])) : unref(form).loadError ? (openBlock(), createElementBlock("div", _hoisted_2$21, [createElementVNode("p", _hoisted_3$19, toDisplayString(unref(form).loadError), 1)])) : (openBlock(), createBlock(unref(ZiniaForm), {
6063
+ key: 2,
6064
+ onBeforeValidate: beforeValidate,
6065
+ onHandleSubmit: handleSubmit,
6066
+ onSuccess: handleSuccess,
6067
+ onError: handleError,
6068
+ title: "Create Support Ticket",
6069
+ subtitle: "Submit your support ticket or feature request"
6070
+ }, {
6071
+ default: withCtx(() => [
6072
+ createCommentVNode(" Basic Information "),
6073
+ createVNode(FieldsetSection_default, { title: "Support Ticket Details" }, {
6074
+ default: withCtx(() => [
6075
+ createVNode(unref(zinia).TitleField, { placeholder: "Enter a clear, descriptive title" }),
6076
+ createVNode(unref(zinia).TypeField),
6077
+ createVNode(unref(zinia).PriorityField)
6078
+ ]),
6079
+ _: 1
6080
+ }),
6081
+ createVNode(FieldsetSection_default, { title: "Description" }, {
6082
+ default: withCtx(() => [createVNode(unref(zinia).DescriptionField, {
6083
+ class: "w-full",
6084
+ placeholder: "Provide detailed information about your support ticket, including steps to reproduce (for bugs) or specific requirements (for features)"
6085
+ })]),
6086
+ _: 1
6087
+ }),
6088
+ createCommentVNode(" Attachments (Jira-style inline) - Files will be uploaded after ticket creation "),
6089
+ createElementVNode("div", _hoisted_4$17, [createVNode(InlineAttachments_default, {
6090
+ "can-upload": true,
6091
+ "can-delete": false,
6092
+ onFilesQueued: handleFilesQueued,
6093
+ ref_key: "attachmentsRef",
6094
+ ref: attachmentsRef
6095
+ }, null, 512)]),
6096
+ createCommentVNode(" Form Status Messages "),
6097
+ unref(form).submitError ? (openBlock(), createElementBlock("div", _hoisted_5$12, [_cache[1] || (_cache[1] = createElementVNode("svg", {
6098
+ xmlns: "http://www.w3.org/2000/svg",
6099
+ class: "stroke-current shrink-0 h-6 w-6",
6100
+ fill: "none",
6101
+ viewBox: "0 0 24 24"
6102
+ }, [createElementVNode("path", {
6103
+ "stroke-linecap": "round",
6104
+ "stroke-linejoin": "round",
6105
+ "stroke-width": "2",
6106
+ d: "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
6107
+ })], -1)), createElementVNode("span", null, toDisplayString(unref(form).submitError), 1)])) : createCommentVNode("v-if", true),
6108
+ createCommentVNode(" Submit Button "),
6109
+ createElementVNode("div", _hoisted_6$11, [createVNode(unref(ZiniaSubmitButton), {
6110
+ submitText: "Create",
6111
+ submittingText: "Submitting Support Ticket..."
6112
+ })]),
6113
+ createVNode(unref(ZiniaFormErrorsSummary), { title: "Please fix the following errors:" }),
6114
+ createVNode(unref(ZiniaResetButton))
6115
+ ]),
6116
+ _: 1
6117
+ }));
6118
+ };
6119
+ }
6120
+ });
6121
+ var CustomerCreateSupportTicketForm_default = _sfc_main$25;
6122
+
6123
+ //#endregion
6124
+ //#region src/slices/support_ticket/shared/SupportTicketStatusBadge.vue
6125
+ const _hoisted_1$22 = ["aria-label"];
6126
+ const _sfc_main$24 = /* @__PURE__ */ defineComponent({
6127
+ __name: "SupportTicketStatusBadge",
6128
+ props: {
6129
+ status: {},
6130
+ size: { default: "md" },
6131
+ variant: { default: "default" }
6132
+ },
6133
+ setup(__props) {
6134
+ /**
6135
+ * SupportTicketStatusBadge - A reusable Vue component for displaying support ticket status
6136
+ * as color-coded badges with consistent DaisyUI styling and accessibility features.
6137
+ *
6138
+ * @example
6139
+ * <SupportTicketStatusBadge :status="'PENDING'" size="md" />
6140
+ * <SupportTicketStatusBadge :status="'COMPLETED'" size="sm" variant="outline" />
6141
+ */
6142
+ const props = __props;
6143
+ /**
6144
+ * Configuration for each status badge
6145
+ */
6146
+ const statusConfig = {
6147
+ PENDING: {
6148
+ color: "badge-warning",
6149
+ text: "Pending",
6150
+ ariaLabel: "Status: Pending review by support team"
6151
+ },
6152
+ FOLLOWUP: {
6153
+ color: "badge-info",
6154
+ text: "To Do",
6155
+ ariaLabel: "Status: Approved and ready to begin work"
6156
+ },
6157
+ IN_PROGRESS: {
6158
+ color: "badge-secondary",
6159
+ text: "Active",
6160
+ ariaLabel: "Status: Currently being worked on"
6161
+ },
6162
+ VERIFICATION: {
6163
+ color: "badge-warning",
6164
+ text: "Verification",
6165
+ ariaLabel: "Status: Please verify and leave a comment to confirm completion"
6166
+ },
6167
+ COMPLETED: {
6168
+ color: "badge-success",
6169
+ text: "Done",
6170
+ ariaLabel: "Status: Successfully completed"
6171
+ },
6172
+ CANCELLED: {
6173
+ color: "badge-error",
6174
+ text: "Cancelled",
6175
+ ariaLabel: "Status: Cancelled or rejected"
6176
+ }
6177
+ };
6178
+ const getStatusConfig = (status) => {
6179
+ const config$1 = statusConfig[status];
6180
+ if (!config$1) return {
6181
+ color: "badge-neutral",
6182
+ text: status || "Unknown",
6183
+ ariaLabel: `Status: ${status || "Unknown status"}`
6184
+ };
6185
+ return config$1;
6186
+ };
6187
+ const config = computed(() => getStatusConfig(props.status));
6188
+ const badgeClasses = computed(() => {
6189
+ const baseClasses = ["badge", "text-xs"];
6190
+ baseClasses.push(config.value.color);
6191
+ if (props.size === "sm") baseClasses.push("badge-sm", "text-xs");
6192
+ else if (props.size === "lg") baseClasses.push("badge-lg", "text-sm");
6193
+ else baseClasses.push("text-xs", "sm:text-sm");
6194
+ if (props.variant === "outline") baseClasses.push("badge-outline");
6195
+ return baseClasses.join(" ");
6196
+ });
6197
+ const displayText = computed(() => config.value.text);
6198
+ const ariaLabel = computed(() => config.value.ariaLabel);
6199
+ return (_ctx, _cache) => {
6200
+ return openBlock(), createElementBlock("div", {
6201
+ class: normalizeClass(badgeClasses.value),
6202
+ "aria-label": ariaLabel.value,
6203
+ role: "status"
6204
+ }, toDisplayString(displayText.value), 11, _hoisted_1$22);
6205
+ };
6206
+ }
6207
+ });
6208
+ var SupportTicketStatusBadge_default = _sfc_main$24;
6209
+
6210
+ //#endregion
6211
+ //#region src/slices/support_ticket/customer/customerSupportTicketRowSchema.ts
6212
+ /**
5852
6213
  * Reuse the existing CustomerSupportTicketReadSchema from the validation library
5853
6214
  * for the data table rows - don't recreate it!
5854
6215
  */
@@ -5856,11 +6217,11 @@ const customerSupportTicketRowSchemaWithMetadata = withMetadata(CustomerSupportT
5856
6217
 
5857
6218
  //#endregion
5858
6219
  //#region src/slices/support_ticket/customer/CustomerSupportTicketList.vue
5859
- const _hoisted_1$23 = { class: "mt-2" };
5860
- const _hoisted_2$22 = { class: "flex flex-col sm:flex-row sm:justify-between sm:items-center gap-4 mb-4" };
5861
- const _hoisted_3$20 = { class: "flex items-center gap-2" };
5862
- const _hoisted_4$17 = { class: "flex gap-2" };
5863
- const _sfc_main$25 = /* @__PURE__ */ defineComponent({
6220
+ const _hoisted_1$21 = { class: "mt-2" };
6221
+ const _hoisted_2$20 = { class: "flex flex-col sm:flex-row sm:justify-between sm:items-center gap-4 mb-4" };
6222
+ const _hoisted_3$18 = { class: "flex items-center gap-2" };
6223
+ const _hoisted_4$16 = { class: "flex gap-2" };
6224
+ const _sfc_main$23 = /* @__PURE__ */ defineComponent({
5864
6225
  __name: "CustomerSupportTicketList",
5865
6226
  setup(__props) {
5866
6227
  const route = useRoute();
@@ -6001,7 +6362,7 @@ const _sfc_main$25 = /* @__PURE__ */ defineComponent({
6001
6362
  });
6002
6363
  return (_ctx, _cache) => {
6003
6364
  const _component_router_link = resolveComponent("router-link");
6004
- return openBlock(), createElementBlock("div", _hoisted_1$23, [createElementVNode("div", _hoisted_2$22, [createElementVNode("div", _hoisted_3$20, [createVNode(unref(SavedFilterPresets_default), {
6365
+ return openBlock(), createElementBlock("div", _hoisted_1$21, [createElementVNode("div", _hoisted_2$20, [createElementVNode("div", _hoisted_3$18, [createVNode(unref(SavedFilterPresets_default), {
6005
6366
  presets: unref(savedFilters).presets.value,
6006
6367
  "presets-loading": unref(savedFilters).presetsLoading.value,
6007
6368
  creating: unref(savedFilters).creating.value,
@@ -6027,7 +6388,7 @@ const _sfc_main$25 = /* @__PURE__ */ defineComponent({
6027
6388
  "save-current-filters",
6028
6389
  "rename-preset",
6029
6390
  "remove-preset"
6030
- ]), _cache[0] || (_cache[0] = createElementVNode("h1", { class: "text-xl sm:text-2xl font-bold" }, "Support Tickets", -1))]), createElementVNode("div", _hoisted_4$17, [createVNode(_component_router_link, {
6391
+ ]), _cache[0] || (_cache[0] = createElementVNode("h1", { class: "text-xl sm:text-2xl font-bold" }, "Support Tickets", -1))]), createElementVNode("div", _hoisted_4$16, [createVNode(_component_router_link, {
6031
6392
  to: { name: "CustomerCreateSupportTicket" },
6032
6393
  class: "btn btn-primary btn-sm sm:btn-md"
6033
6394
  }, {
@@ -6067,165 +6428,19 @@ const _sfc_main$25 = /* @__PURE__ */ defineComponent({
6067
6428
  };
6068
6429
  }
6069
6430
  });
6070
- var CustomerSupportTicketList_default = _sfc_main$25;
6071
-
6072
- //#endregion
6073
- //#region src/slices/support_ticket/customer/customerSupportTicketMetadata.ts
6074
- const customerSupportTicketCreateSchemaWithMetadata = withMetadata(CustomerSupportTicketCreateSchema, "customerSupportTicketCreateSchema", {
6075
- description: {
6076
- inputType: "textarea",
6077
- placeholder: "Enter description"
6078
- },
6079
- priority: {
6080
- inputType: "select",
6081
- valueToLabel: SUPPORT_TICKET_PRIORITY_NUMBER_TO_LABEL,
6082
- valueType: "number"
6083
- }
6084
- });
6085
- const customerSupportTicketUpdateSchemaWithMetadata = withMetadata(CustomerSupportTicketUpdateSchema, "customerSupportTicketUpdateSchema", {
6086
- description: {
6087
- inputType: "textarea",
6088
- placeholder: "Enter description"
6089
- },
6090
- priority: {
6091
- inputType: "select",
6092
- valueToLabel: SUPPORT_TICKET_PRIORITY_NUMBER_TO_LABEL,
6093
- valueType: "number"
6094
- }
6095
- });
6096
-
6097
- //#endregion
6098
- //#region src/slices/support_ticket/customer/CustomerCreateSupportTicketForm.vue
6099
- const _hoisted_1$22 = {
6100
- key: 0,
6101
- class: "flex flex-col items-center justify-center p-8"
6102
- };
6103
- const _hoisted_2$21 = {
6104
- key: 1,
6105
- class: "flex flex-col items-center justify-center p-8"
6106
- };
6107
- const _hoisted_3$19 = { class: "mt-4 text-lg" };
6108
- const _hoisted_4$16 = { class: "mt-6" };
6109
- const _hoisted_5$12 = {
6110
- key: 0,
6111
- class: "alert alert-error mb-4"
6112
- };
6113
- const _hoisted_6$12 = { class: "flex justify-center mt-6" };
6114
- const _sfc_main$24 = /* @__PURE__ */ defineComponent({
6115
- __name: "CustomerCreateSupportTicketForm",
6116
- setup(__props) {
6117
- const router = useRouter();
6118
- const attachmentsRef = ref(null);
6119
- const { form, zinia, ZiniaForm, ZiniaSubmitButton, ZiniaResetButton, ZiniaFormErrorsSummary, clearSavedFormState } = useForm(customerSupportTicketCreateSchemaWithMetadata, {
6120
- storeName: `create-customer-support-ticket`,
6121
- persistToLocalStorage: true,
6122
- renderStyle: "daisy_ui",
6123
- fetchData: async () => {
6124
- return {
6125
- title: "",
6126
- type: "IMPROVEMENT",
6127
- priority: SUPPORT_TICKET_PRIORITY_TO_NUMBER.MEDIUM,
6128
- description: ""
6129
- };
6130
- }
6131
- });
6132
- const { mutate: createSupportTicket } = useMutation((api, input) => api.supportTickets.createTicket(input), { invalidate: /^support-tickets?:/ });
6133
- const beforeValidate = () => {
6134
- return true;
6135
- };
6136
- const handleSubmit = async (formData) => {
6137
- const createdSupportTicket = await createSupportTicket(formData);
6138
- if (!createdSupportTicket) throw new Error("Failed to create support ticket");
6139
- return createdSupportTicket;
6140
- };
6141
- const handleFilesQueued = (_files) => {};
6142
- const handleSuccess = async (createdSupportTicket) => {
6143
- if (attachmentsRef.value) try {
6144
- await attachmentsRef.value.uploadQueuedFiles(createdSupportTicket.id);
6145
- } catch (error) {
6146
- console.error("Failed to upload attachments:", error);
6147
- toast.warning("Ticket created, but some attachments failed to upload. You can add them later.");
6148
- }
6149
- clearSavedFormState();
6150
- await router.push({ name: customerSupportPaths.customer_create_success.name });
6151
- toast.success(`Support Ticket "${createdSupportTicket.title}" submitted successfully! Our team will review it shortly.`);
6152
- };
6153
- const handleError = (error) => {
6154
- form.setSubmitError(error instanceof Error ? error.message : "An unknown error occurred");
6155
- };
6156
- return (_ctx, _cache) => {
6157
- return unref(form).isLoading ? (openBlock(), createElementBlock("div", _hoisted_1$22, [..._cache[0] || (_cache[0] = [createElementVNode("div", { class: "loading loading-spinner loading-lg" }, null, -1), createElementVNode("p", { class: "mt-4 text-lg" }, "Loading...", -1)])])) : unref(form).loadError ? (openBlock(), createElementBlock("div", _hoisted_2$21, [createElementVNode("p", _hoisted_3$19, toDisplayString(unref(form).loadError), 1)])) : (openBlock(), createBlock(unref(ZiniaForm), {
6158
- key: 2,
6159
- onBeforeValidate: beforeValidate,
6160
- onHandleSubmit: handleSubmit,
6161
- onSuccess: handleSuccess,
6162
- onError: handleError,
6163
- title: "Create Support Ticket",
6164
- subtitle: "Submit your support ticket or feature request"
6165
- }, {
6166
- default: withCtx(() => [
6167
- createCommentVNode(" Basic Information "),
6168
- createVNode(FieldsetSection_default, { title: "Support Ticket Details" }, {
6169
- default: withCtx(() => [
6170
- createVNode(unref(zinia).TitleField, { placeholder: "Enter a clear, descriptive title" }),
6171
- createVNode(unref(zinia).TypeField),
6172
- createVNode(unref(zinia).PriorityField)
6173
- ]),
6174
- _: 1
6175
- }),
6176
- createVNode(FieldsetSection_default, { title: "Description" }, {
6177
- default: withCtx(() => [createVNode(unref(zinia).DescriptionField, {
6178
- class: "w-full",
6179
- placeholder: "Provide detailed information about your support ticket, including steps to reproduce (for bugs) or specific requirements (for features)"
6180
- })]),
6181
- _: 1
6182
- }),
6183
- createCommentVNode(" Attachments (Jira-style inline) - Files will be uploaded after ticket creation "),
6184
- createElementVNode("div", _hoisted_4$16, [createVNode(InlineAttachments_default, {
6185
- "can-upload": true,
6186
- "can-delete": false,
6187
- onFilesQueued: handleFilesQueued,
6188
- ref_key: "attachmentsRef",
6189
- ref: attachmentsRef
6190
- }, null, 512)]),
6191
- createCommentVNode(" Form Status Messages "),
6192
- unref(form).submitError ? (openBlock(), createElementBlock("div", _hoisted_5$12, [_cache[1] || (_cache[1] = createElementVNode("svg", {
6193
- xmlns: "http://www.w3.org/2000/svg",
6194
- class: "stroke-current shrink-0 h-6 w-6",
6195
- fill: "none",
6196
- viewBox: "0 0 24 24"
6197
- }, [createElementVNode("path", {
6198
- "stroke-linecap": "round",
6199
- "stroke-linejoin": "round",
6200
- "stroke-width": "2",
6201
- d: "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
6202
- })], -1)), createElementVNode("span", null, toDisplayString(unref(form).submitError), 1)])) : createCommentVNode("v-if", true),
6203
- createCommentVNode(" Submit Button "),
6204
- createElementVNode("div", _hoisted_6$12, [createVNode(unref(ZiniaSubmitButton), {
6205
- submitText: "Create",
6206
- submittingText: "Submitting Support Ticket..."
6207
- })]),
6208
- createVNode(unref(ZiniaFormErrorsSummary), { title: "Please fix the following errors:" }),
6209
- createVNode(unref(ZiniaResetButton))
6210
- ]),
6211
- _: 1
6212
- }));
6213
- };
6214
- }
6215
- });
6216
- var CustomerCreateSupportTicketForm_default = _sfc_main$24;
6431
+ var CustomerSupportTicketList_default = _sfc_main$23;
6217
6432
 
6218
6433
  //#endregion
6219
6434
  //#region src/slices/support_ticket/customer/CustomerSupportTicketSuccess.vue
6220
- const _hoisted_1$21 = { class: "flex flex-col items-center justify-center min-h-[60vh] p-8" };
6221
- const _hoisted_2$20 = { class: "text-center max-w-2xl" };
6222
- const _hoisted_3$18 = { class: "flex flex-col sm:flex-row gap-4 justify-center" };
6223
- const _sfc_main$23 = /* @__PURE__ */ defineComponent({
6435
+ const _hoisted_1$20 = { class: "flex flex-col items-center justify-center min-h-[60vh] p-8" };
6436
+ const _hoisted_2$19 = { class: "text-center max-w-2xl" };
6437
+ const _hoisted_3$17 = { class: "flex flex-col sm:flex-row gap-4 justify-center" };
6438
+ const _sfc_main$22 = /* @__PURE__ */ defineComponent({
6224
6439
  __name: "CustomerSupportTicketSuccess",
6225
6440
  setup(__props) {
6226
6441
  return (_ctx, _cache) => {
6227
6442
  const _component_router_link = resolveComponent("router-link");
6228
- return openBlock(), createElementBlock("div", _hoisted_1$21, [createElementVNode("div", _hoisted_2$20, [
6443
+ return openBlock(), createElementBlock("div", _hoisted_1$20, [createElementVNode("div", _hoisted_2$19, [
6229
6444
  createCommentVNode(" Success Icon "),
6230
6445
  _cache[2] || (_cache[2] = createElementVNode("div", { class: "mb-6" }, [createElementVNode("div", { class: "inline-flex items-center justify-center w-20 h-20 bg-success rounded-full" }, [createElementVNode("svg", {
6231
6446
  class: "w-10 h-10 text-success-content",
@@ -6245,7 +6460,7 @@ const _sfc_main$23 = /* @__PURE__ */ defineComponent({
6245
6460
  createCommentVNode(" What Happens Next "),
6246
6461
  _cache[5] || (_cache[5] = createStaticVNode("<div class=\"bg-base-200 rounded-lg p-6 mb-8\"><h2 class=\"text-xl font-semibold mb-4\">What happens next?</h2><div class=\"space-y-3 text-left\"><div class=\"flex items-start gap-3\"><div class=\"flex-shrink-0 w-6 h-6 bg-primary text-primary-content rounded-full flex items-center justify-center text-sm font-semibold\"> 1 </div><div><div class=\"font-medium\">Review</div><div class=\"text-sm text-base-content/70\"> Our team will review your ticket and determine the best approach </div></div></div><div class=\"flex items-start gap-3\"><div class=\"flex-shrink-0 w-6 h-6 bg-primary text-primary-content rounded-full flex items-center justify-center text-sm font-semibold\"> 2 </div><div><div class=\"font-medium\">Notification</div><div class=\"text-sm text-base-content/70\"> You&#39;ll receive email updates on status changes and progress </div></div></div><div class=\"flex items-start gap-3\"><div class=\"flex-shrink-0 w-6 h-6 bg-primary text-primary-content rounded-full flex items-center justify-center text-sm font-semibold\"> 3 </div><div><div class=\"font-medium\">Tracking</div><div class=\"text-sm text-base-content/70\"> Monitor progress in your support ticket list </div></div></div></div></div>", 1)),
6247
6462
  createCommentVNode(" Action Buttons "),
6248
- createElementVNode("div", _hoisted_3$18, [createVNode(_component_router_link, {
6463
+ createElementVNode("div", _hoisted_3$17, [createVNode(_component_router_link, {
6249
6464
  to: { name: unref(customerSupportPaths).customer_list.name },
6250
6465
  class: "btn btn-primary btn-lg"
6251
6466
  }, {
@@ -6262,847 +6477,128 @@ const _sfc_main$23 = /* @__PURE__ */ defineComponent({
6262
6477
  };
6263
6478
  }
6264
6479
  });
6265
- var CustomerSupportTicketSuccess_default = _sfc_main$23;
6480
+ var CustomerSupportTicketSuccess_default = _sfc_main$22;
6266
6481
 
6267
6482
  //#endregion
6268
- //#region src/slices/support_ticket/customer/components/SupportTicketTimeline.vue
6269
- const _hoisted_1$20 = { class: "mt-8" };
6270
- const _hoisted_2$19 = { class: "relative" };
6271
- const _hoisted_3$17 = { class: "space-y-6 relative" };
6272
- const _hoisted_4$15 = { class: "flex items-start group" };
6273
- const _hoisted_5$11 = { class: "ml-4" };
6274
- const _hoisted_6$11 = { class: "text-xs text-base-content/40 mt-1" };
6275
- const _hoisted_7$9 = { class: "flex items-start group" };
6276
- const _hoisted_8$9 = {
6483
+ //#region src/slices/support_ticket/staff/components/CustomerCreditBalance.vue
6484
+ const _hoisted_1$19 = {
6277
6485
  key: 0,
6278
- xmlns: "http://www.w3.org/2000/svg",
6279
- class: "h-4 w-4 animate-pulse",
6280
- fill: "none",
6281
- viewBox: "0 0 24 24",
6282
- stroke: "currentColor"
6486
+ class: "flex items-center gap-2"
6283
6487
  };
6284
- const _hoisted_9$8 = {
6488
+ const _hoisted_2$18 = { class: "space-y-2" };
6489
+ const _hoisted_3$16 = { class: "grid grid-cols-2 gap-2 text-sm" };
6490
+ const _hoisted_4$15 = { class: "font-bold ml-2" };
6491
+ const _hoisted_5$11 = { class: "font-bold ml-2" };
6492
+ const _hoisted_6$10 = {
6493
+ key: 0,
6494
+ class: "alert alert-warning alert-sm"
6495
+ };
6496
+ const _sfc_main$21 = /* @__PURE__ */ defineComponent({
6497
+ __name: "CustomerCreditBalance",
6498
+ setup(__props) {
6499
+ const { data, loading, error } = useQuery((api) => api.customer.getCreditBalance(), { staleTime: 120 * 1e3 });
6500
+ const creditBalance = computed(() => data.value ?? null);
6501
+ const totalAvailable = computed(() => {
6502
+ if (!creditBalance.value) return 0;
6503
+ return (parseFloat(creditBalance.value.monthly) || 0) + (parseFloat(creditBalance.value.rollover) || 0);
6504
+ });
6505
+ return (_ctx, _cache) => {
6506
+ return openBlock(), createElementBlock("div", null, [createCommentVNode(" Loading State "), unref(loading) ? (openBlock(), createElementBlock("div", _hoisted_1$19, [..._cache[0] || (_cache[0] = [createElementVNode("span", { class: "loading loading-spinner loading-sm" }, null, -1), createElementVNode("span", { class: "text-sm" }, "Loading customer balance...", -1)])])) : unref(error) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Error State "), _cache[1] || (_cache[1] = createElementVNode("div", { class: "alert alert-error alert-sm" }, [createElementVNode("span", { class: "text-xs" }, "Failed to load customer balance")], -1))], 2112)) : creditBalance.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createCommentVNode(" Balance Display "), createElementVNode("div", _hoisted_2$18, [
6507
+ createElementVNode("div", _hoisted_3$16, [createElementVNode("div", null, [_cache[2] || (_cache[2] = createElementVNode("span", { class: "text-base-content/60" }, "Monthly:", -1)), createElementVNode("span", _hoisted_4$15, toDisplayString(unref(formatStaffCreditValue)(creditBalance.value.monthly)), 1)]), createElementVNode("div", null, [_cache[3] || (_cache[3] = createElementVNode("span", { class: "text-base-content/60" }, "Rollover:", -1)), createElementVNode("span", _hoisted_5$11, toDisplayString(unref(formatStaffCreditValue)(creditBalance.value.rollover)), 1)])]),
6508
+ createElementVNode("div", { class: normalizeClass(["flex items-center justify-between p-2 rounded", {
6509
+ "bg-success/20": totalAvailable.value > 0,
6510
+ "bg-error/20": totalAvailable.value === 0
6511
+ }]) }, [_cache[4] || (_cache[4] = createElementVNode("span", { class: "text-sm font-medium" }, "Total Available:", -1)), createElementVNode("span", { class: normalizeClass(["font-bold", {
6512
+ "text-success": totalAvailable.value > 0,
6513
+ "text-error": totalAvailable.value === 0
6514
+ }]) }, toDisplayString(unref(formatStaffCreditValue)(totalAvailable.value.toString())), 3)], 2),
6515
+ createCommentVNode(" Warning if no balance "),
6516
+ totalAvailable.value === 0 ? (openBlock(), createElementBlock("div", _hoisted_6$10, [..._cache[5] || (_cache[5] = [createElementVNode("svg", {
6517
+ xmlns: "http://www.w3.org/2000/svg",
6518
+ class: "stroke-current shrink-0 h-4 w-4",
6519
+ fill: "none",
6520
+ viewBox: "0 0 24 24"
6521
+ }, [createElementVNode("path", {
6522
+ "stroke-linecap": "round",
6523
+ "stroke-linejoin": "round",
6524
+ "stroke-width": "2",
6525
+ d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
6526
+ })], -1), createElementVNode("span", { class: "text-xs" }, "Customer has insufficient credits", -1)])])) : createCommentVNode("v-if", true)
6527
+ ])], 2112)) : createCommentVNode("v-if", true)]);
6528
+ };
6529
+ }
6530
+ });
6531
+ var CustomerCreditBalance_default = _sfc_main$21;
6532
+
6533
+ //#endregion
6534
+ //#region src/slices/support_ticket/staff/components/ApproveRejectActions.vue
6535
+ const _hoisted_1$18 = {
6536
+ key: 0,
6537
+ class: "alert alert-warning py-2"
6538
+ };
6539
+ const _hoisted_2$17 = {
6285
6540
  key: 1,
6286
- xmlns: "http://www.w3.org/2000/svg",
6287
- class: "h-4 w-4",
6288
- fill: "none",
6289
- viewBox: "0 0 24 24",
6290
- stroke: "currentColor"
6541
+ class: "space-y-3"
6291
6542
  };
6292
- const _hoisted_10$5 = {
6543
+ const _hoisted_3$15 = { class: "alert alert-info py-2" };
6544
+ const _hoisted_4$14 = { class: "text-xs sm:text-sm" };
6545
+ const _hoisted_5$10 = { class: "bg-base-100 rounded-lg p-3" };
6546
+ const _hoisted_6$9 = { class: "flex flex-col sm:flex-row gap-2 sm:gap-3 justify-end mt-4" };
6547
+ const _hoisted_7$8 = ["disabled"];
6548
+ const _hoisted_8$8 = {
6549
+ key: 0,
6550
+ class: "loading loading-spinner loading-sm mr-2"
6551
+ };
6552
+ const _hoisted_9$7 = ["disabled"];
6553
+ const _hoisted_10$4 = {
6554
+ key: 0,
6555
+ class: "loading loading-spinner loading-sm mr-2"
6556
+ };
6557
+ const _hoisted_11$3 = {
6293
6558
  key: 2,
6294
- xmlns: "http://www.w3.org/2000/svg",
6295
- class: "h-4 w-4",
6296
- fill: "none",
6297
- viewBox: "0 0 24 24",
6298
- stroke: "currentColor"
6559
+ class: "alert alert-error mt-2 py-2"
6299
6560
  };
6300
- const _hoisted_11$4 = { class: "ml-4" };
6301
- const _hoisted_12$3 = { class: "font-medium text-base-content" };
6302
- const _hoisted_13$2 = { class: "text-sm text-base-content/60" };
6303
- const _hoisted_14$2 = {
6561
+ const _hoisted_12$2 = { class: "text-sm" };
6562
+ const _hoisted_13$1 = { class: "alert alert-warning py-2" };
6563
+ const _hoisted_14$1 = { class: "text-xs sm:text-sm" };
6564
+ const _hoisted_15 = { class: "font-semibold" };
6565
+ const _hoisted_16 = {
6304
6566
  key: 0,
6305
- class: "text-xs text-base-content/40 mt-1"
6567
+ class: "alert alert-info py-2"
6306
6568
  };
6307
- const _hoisted_15$1 = {
6569
+ const _hoisted_17 = { class: "text-xs sm:text-sm" };
6570
+ const _hoisted_18 = { class: "flex mt-4" };
6571
+ const _hoisted_19 = ["disabled"];
6572
+ const _hoisted_20 = {
6308
6573
  key: 0,
6309
- class: "flex items-start group"
6574
+ class: "loading loading-spinner loading-sm mr-2"
6310
6575
  };
6311
- const _hoisted_16$1 = { class: "ml-4" };
6312
- const _sfc_main$22 = /* @__PURE__ */ defineComponent({
6313
- __name: "SupportTicketTimeline",
6314
- props: { support_ticket: {} },
6315
- setup(__props) {
6316
- return (_ctx, _cache) => {
6317
- return openBlock(), createElementBlock("div", _hoisted_1$20, [_cache[8] || (_cache[8] = createElementVNode("h3", { class: "text-lg font-semibold text-base-content mb-4" }, "SupportTicket Progress", -1)), createElementVNode("div", _hoisted_2$19, [
6318
- createCommentVNode(" Timeline line "),
6319
- _cache[7] || (_cache[7] = createElementVNode("div", { class: "absolute left-4 top-0 bottom-0 w-0.5 bg-base-300" }, null, -1)),
6320
- createCommentVNode(" Timeline items "),
6321
- createElementVNode("div", _hoisted_3$17, [
6322
- createCommentVNode(" Submitted "),
6323
- createElementVNode("div", _hoisted_4$15, [createElementVNode("div", { class: normalizeClass(["flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center z-10", {
6324
- "bg-primary text-primary-content": [
6325
- "PENDING",
6326
- "FOLLOWUP",
6327
- "IN_PROGRESS",
6328
- "COMPLETED",
6329
- "CANCELLED"
6330
- ].includes(__props.support_ticket.status),
6331
- "bg-base-300 text-base-content/40": ![
6332
- "PENDING",
6333
- "FOLLOWUP",
6334
- "IN_PROGRESS",
6335
- "COMPLETED",
6336
- "CANCELLED"
6337
- ].includes(__props.support_ticket.status)
6338
- }]) }, [..._cache[0] || (_cache[0] = [createElementVNode("svg", {
6339
- xmlns: "http://www.w3.org/2000/svg",
6340
- class: "h-4 w-4",
6341
- fill: "none",
6342
- viewBox: "0 0 24 24",
6343
- stroke: "currentColor"
6344
- }, [createElementVNode("path", {
6345
- "stroke-linecap": "round",
6346
- "stroke-linejoin": "round",
6347
- "stroke-width": "2",
6348
- d: "M5 13l4 4L19 7"
6349
- })], -1)])], 2), createElementVNode("div", _hoisted_5$11, [
6350
- _cache[1] || (_cache[1] = createElementVNode("p", { class: "font-medium text-base-content" }, "Submitted", -1)),
6351
- _cache[2] || (_cache[2] = createElementVNode("p", { class: "text-sm text-base-content/60" }, "Your ticket has been received", -1)),
6352
- createElementVNode("p", _hoisted_6$11, toDisplayString(unref(formatSystemTimestamp)(__props.support_ticket.created_at)), 1)
6353
- ])]),
6354
- createCommentVNode(" Under Review / In Progress / Completed "),
6355
- createElementVNode("div", _hoisted_7$9, [createElementVNode("div", { class: normalizeClass(["flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center z-10", {
6356
- "bg-primary text-primary-content": [
6357
- "FOLLOWUP",
6358
- "IN_PROGRESS",
6359
- "COMPLETED",
6360
- "CANCELLED"
6361
- ].includes(__props.support_ticket.status),
6362
- "bg-base-300 text-base-content/40": ![
6363
- "FOLLOWUP",
6364
- "IN_PROGRESS",
6365
- "COMPLETED",
6366
- "CANCELLED"
6367
- ].includes(__props.support_ticket.status)
6368
- }]) }, [__props.support_ticket.status === "PENDING" ? (openBlock(), createElementBlock("svg", _hoisted_8$9, [..._cache[3] || (_cache[3] = [createElementVNode("path", {
6369
- "stroke-linecap": "round",
6370
- "stroke-linejoin": "round",
6371
- "stroke-width": "2",
6372
- d: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"
6373
- }, null, -1)])])) : __props.support_ticket.status === "CANCELLED" ? (openBlock(), createElementBlock("svg", _hoisted_9$8, [..._cache[4] || (_cache[4] = [createElementVNode("path", {
6374
- "stroke-linecap": "round",
6375
- "stroke-linejoin": "round",
6376
- "stroke-width": "2",
6377
- d: "M6 18L18 6M6 6l12 12"
6378
- }, null, -1)])])) : (openBlock(), createElementBlock("svg", _hoisted_10$5, [..._cache[5] || (_cache[5] = [createElementVNode("path", {
6379
- "stroke-linecap": "round",
6380
- "stroke-linejoin": "round",
6381
- "stroke-width": "2",
6382
- d: "M5 13l4 4L19 7"
6383
- }, null, -1)])]))], 2), createElementVNode("div", _hoisted_11$4, [
6384
- createElementVNode("p", _hoisted_12$3, [__props.support_ticket.status === "PENDING" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode("Under Review")], 64)) : __props.support_ticket.status === "FOLLOWUP" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode("Approved")], 64)) : __props.support_ticket.status === "IN_PROGRESS" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode("In Development")], 64)) : __props.support_ticket.status === "COMPLETED" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [createTextVNode("Completed")], 64)) : __props.support_ticket.status === "CANCELLED" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [createTextVNode("Not Approved")], 64)) : createCommentVNode("v-if", true)]),
6385
- createElementVNode("p", _hoisted_13$2, [__props.support_ticket.status === "PENDING" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode("Our team is reviewing your support_ticket")], 64)) : __props.support_ticket.status === "FOLLOWUP" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode("Your ticket has been approved and is in our backlog")], 64)) : __props.support_ticket.status === "IN_PROGRESS" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode("We're currently working on implementing this")], 64)) : __props.support_ticket.status === "COMPLETED" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [createTextVNode("This has been implemented and deployed")], 64)) : __props.support_ticket.status === "CANCELLED" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [createTextVNode("This ticket wasn't approved for implementation")], 64)) : createCommentVNode("v-if", true)]),
6386
- __props.support_ticket.updated_at && __props.support_ticket.updated_at !== __props.support_ticket.created_at ? (openBlock(), createElementBlock("p", _hoisted_14$2, toDisplayString(unref(formatSystemTimestamp)(__props.support_ticket.updated_at)), 1)) : createCommentVNode("v-if", true)
6387
- ])]),
6388
- createCommentVNode(" Credit Information "),
6389
- unref(formatCustomerCreditValue)(__props.support_ticket.credit_value) !== "TBD" && unref(formatCustomerCreditValue)(__props.support_ticket.credit_value) !== "N/A" ? (openBlock(), createElementBlock("div", _hoisted_15$1, [createElementVNode("div", { class: normalizeClass(["flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center z-10", {
6390
- "bg-error text-error-content": [
6391
- "FOLLOWUP",
6392
- "IN_PROGRESS",
6393
- "COMPLETED",
6394
- "CANCELLED"
6395
- ].includes(__props.support_ticket.status),
6396
- "bg-warning text-warning-content": ![
6397
- "FOLLOWUP",
6398
- "IN_PROGRESS",
6399
- "COMPLETED",
6400
- "CANCELLED"
6401
- ].includes(__props.support_ticket.status)
6402
- }]) }, [..._cache[6] || (_cache[6] = [createElementVNode("svg", {
6403
- xmlns: "http://www.w3.org/2000/svg",
6404
- class: "h-4 w-4",
6405
- fill: "none",
6406
- viewBox: "0 0 24 24",
6407
- stroke: "currentColor"
6408
- }, [createElementVNode("path", {
6409
- "stroke-linecap": "round",
6410
- "stroke-linejoin": "round",
6411
- "stroke-width": "2",
6412
- d: "M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
6413
- })], -1)])], 2), createElementVNode("div", _hoisted_16$1, [createElementVNode("p", { class: normalizeClass(["font-medium", {
6414
- "text-error": [
6415
- "FOLLOWUP",
6416
- "IN_PROGRESS",
6417
- "COMPLETED",
6418
- "CANCELLED"
6419
- ].includes(__props.support_ticket.status),
6420
- "text-warning": ![
6421
- "FOLLOWUP",
6422
- "IN_PROGRESS",
6423
- "COMPLETED",
6424
- "CANCELLED"
6425
- ].includes(__props.support_ticket.status)
6426
- }]) }, toDisplayString([
6427
- "FOLLOWUP",
6428
- "IN_PROGRESS",
6429
- "COMPLETED",
6430
- "CANCELLED"
6431
- ].includes(__props.support_ticket.status) ? "Credit Deducted" : "Credit Will Be Deducted"), 3), createElementVNode("p", { class: normalizeClass(["text-sm", {
6432
- "text-error/70": [
6433
- "FOLLOWUP",
6434
- "IN_PROGRESS",
6435
- "COMPLETED",
6436
- "CANCELLED"
6437
- ].includes(__props.support_ticket.status),
6438
- "text-warning/70": ![
6439
- "FOLLOWUP",
6440
- "IN_PROGRESS",
6441
- "COMPLETED",
6442
- "CANCELLED"
6443
- ].includes(__props.support_ticket.status)
6444
- }]) }, [[
6445
- "FOLLOWUP",
6446
- "IN_PROGRESS",
6447
- "COMPLETED",
6448
- "CANCELLED"
6449
- ].includes(__props.support_ticket.status) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(unref(formatCustomerCreditValue)(__props.support_ticket.credit_value)) + " credit(s) have been deducted from your account for this ticket ", 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(unref(formatCustomerCreditValue)(__props.support_ticket.credit_value)) + " credit(s) will be deducted from your account once this ticket is approved ", 1)], 64))], 2)])])) : createCommentVNode("v-if", true)
6450
- ])
6451
- ])]);
6452
- };
6453
- }
6454
- });
6455
- var SupportTicketTimeline_default = _sfc_main$22;
6456
-
6457
- //#endregion
6458
- //#region src/slices/support_ticket/staff/StaffSupportTicketRowSchema.ts
6459
- /**
6460
- * Reuse the existing StaffSupportTicketReadSchema from the validation library
6461
- * for the data table rows - don't recreate it!
6462
- */
6463
- const adminSupportTicketRowSchemaWithMetadata = withMetadata(StaffSupportTicketReadSchema, "adminSupportTicketRow", {});
6464
-
6465
- //#endregion
6466
- //#region src/slices/support_ticket/staff/StaffSupportTicketList.vue
6467
- const _hoisted_1$19 = { class: "flex flex-col sm:flex-row sm:justify-between sm:items-center gap-4 mb-4" };
6468
- const _hoisted_2$18 = { class: "flex items-center gap-2" };
6469
- const _hoisted_3$16 = { class: "flex flex-col sm:flex-row gap-2" };
6470
- const _sfc_main$21 = /* @__PURE__ */ defineComponent({
6471
- __name: "StaffSupportTicketList",
6472
- setup(__props) {
6473
- const route = useRoute();
6474
- const router = useRouter();
6475
- const savedFilters = useSavedFilters({
6476
- context: "support_ticket_staff",
6477
- routePath: "/staff/support",
6478
- getFiltersFromTable: () => extractFiltersFromQuery(route.query),
6479
- applyFiltersToTable: (filters) => {
6480
- router.push({ query: buildQueryWithFilters(route.query, filters) });
6481
- }
6482
- });
6483
- const hasSupportFilters = computed(() => {
6484
- const filters = extractFiltersFromQuery(route.query);
6485
- return Object.keys(filters).length > 0;
6486
- });
6487
- const currentPaginationToken = ref();
6488
- const cursorTable = useCursorDataTable(adminSupportTicketRowSchemaWithMetadata, {
6489
- fetchData: async ({ cursor, pageSize, sort, filters, search }) => {
6490
- const variables = {
6491
- first: pageSize,
6492
- sortBy: sort?.field ? sort.field : "updated_at",
6493
- sortDirection: sort?.direction === "asc" ? "asc" : "desc",
6494
- ...cursor ? { after: cursor } : {},
6495
- ...currentPaginationToken.value ? { paginationToken: currentPaginationToken.value } : {},
6496
- ...search ? { search: typeof search === "string" ? {
6497
- query: search,
6498
- searchableFields: [
6499
- "display_id",
6500
- "title",
6501
- "description"
6502
- ]
6503
- } : search } : {},
6504
- ...filters
6505
- };
6506
- if (!filters || !filters.dev_lifecycle) variables.dev_lifecycle = {
6507
- operator: OPERATORS.IS_NOT_ONE_OF,
6508
- values: ["DEPLOYED", "CANCELLED"]
6509
- };
6510
- const result = await executeWithAuth(async (api) => {
6511
- return await api.supportTickets.staffListTickets(variables ?? {});
6512
- }, { refreshTokenHandler: getRefreshTokenHandler() });
6513
- currentPaginationToken.value = result?.pageInfo?.paginationToken;
6514
- return {
6515
- data: result.items || [],
6516
- hasNextPage: result.pageInfo?.hasNextPage ?? false,
6517
- hasPreviousPage: result.pageInfo?.hasPreviousPage ?? false,
6518
- prevPageCursor: result.pageInfo?.prevPageCursor ?? void 0,
6519
- nextPageCursor: result.pageInfo?.nextPageCursor ?? void 0
6520
- };
6521
- },
6522
- columns: {
6523
- display_id: {
6524
- label: "Ticket ID",
6525
- field: "display_id",
6526
- sortable: true
6527
- },
6528
- title: {
6529
- label: "Title",
6530
- field: "title",
6531
- sortable: true
6532
- },
6533
- type: {
6534
- label: "Type",
6535
- field: "type",
6536
- sortable: true,
6537
- filterable: true,
6538
- filterType: "select",
6539
- filterOptions: [...SUPPORT_TICKET_TYPE_FILTER_OPTIONS]
6540
- },
6541
- priority: {
6542
- label: "Priority",
6543
- field: "priority",
6544
- sortable: true,
6545
- filterable: true,
6546
- filterType: "select",
6547
- filterOptions: [...SUPPORT_TICKET_PRIORITY_FILTER_OPTIONS]
6548
- },
6549
- approval_status: {
6550
- label: "Approval",
6551
- field: "approval_status",
6552
- sortable: true,
6553
- filterable: true,
6554
- filterType: "select",
6555
- filterOptions: [...SUPPORT_TICKET_APPROVAL_FILTER_OPTIONS]
6556
- },
6557
- dev_lifecycle: {
6558
- label: "Dev Stage",
6559
- field: "dev_lifecycle",
6560
- sortable: true,
6561
- filterable: true,
6562
- filterType: "select",
6563
- filterOptions: [...SUPPORT_TICKET_DEV_LIFECYCLE_FILTER_OPTIONS]
6564
- },
6565
- credit_value: {
6566
- label: "Credits",
6567
- field: "credit_value",
6568
- sortable: false
6569
- },
6570
- target_at: {
6571
- label: "Delivery Est.",
6572
- field: "target_at",
6573
- sortable: true
6574
- },
6575
- updated_at: {
6576
- label: "Last Updated",
6577
- field: "updated_at",
6578
- sortable: true
6579
- },
6580
- created_by: {
6581
- label: "Requester",
6582
- field: "created_by",
6583
- sortable: false,
6584
- filterable: true,
6585
- filterType: "select",
6586
- filterOptionsLoader: async () => {
6587
- return (await executeWithAuth((api) => api.supportTickets.staffGetRequestorsForActiveTickets(), { refreshTokenHandler: getRefreshTokenHandler() }) || []).map((u) => ({
6588
- value: u.id,
6589
- label: u.email
6590
- }));
6591
- }
6592
- }
6593
- },
6594
- actions: { items: [{
6595
- key: "manage",
6596
- icon: ActionIcons.edit,
6597
- size: "xs",
6598
- variant: "primary",
6599
- type: "link",
6600
- href: (row) => `/staff/support/${row.id}`
6601
- }] },
6602
- search: { searchableFields: ["title"] },
6603
- pagination: { pageSize: 25 },
6604
- autoLoad: false
6605
- });
6606
- const { ZiniaDataTable } = cursorTable;
6607
- useDataTableUrlSync(cursorTable.table, router);
6608
- const previousFilters = ref({});
6609
- onMounted(() => {
6610
- previousFilters.value = extractFiltersFromQuery(route.query);
6611
- });
6612
- watch(() => route.query, (query) => {
6613
- const filters = extractFiltersFromQuery(query);
6614
- const hadPrevious = Object.keys(previousFilters.value).length > 0;
6615
- if (!(Object.keys(filters).length > 0) && hadPrevious) savedFilters.clearLastUsed();
6616
- previousFilters.value = filters;
6617
- });
6618
- return (_ctx, _cache) => {
6619
- const _component_router_link = resolveComponent("router-link");
6620
- return openBlock(), createElementBlock("div", null, [createElementVNode("div", _hoisted_1$19, [createElementVNode("div", _hoisted_2$18, [createVNode(unref(SavedFilterPresets_default), {
6621
- presets: unref(savedFilters).presets.value,
6622
- "presets-loading": unref(savedFilters).presetsLoading.value,
6623
- creating: unref(savedFilters).creating.value,
6624
- deleting: unref(savedFilters).deleting.value,
6625
- renaming: unref(savedFilters).updating.value,
6626
- "has-filters": hasSupportFilters.value,
6627
- "active-preset": unref(savedFilters).activePreset.value,
6628
- "apply-preset": unref(savedFilters).applyPreset,
6629
- "clear-preset": unref(savedFilters).clearPreset,
6630
- "save-current-filters": unref(savedFilters).saveCurrentFilters,
6631
- "rename-preset": unref(savedFilters).renamePreset,
6632
- "remove-preset": unref(savedFilters).removePreset
6633
- }, null, 8, [
6634
- "presets",
6635
- "presets-loading",
6636
- "creating",
6637
- "deleting",
6638
- "renaming",
6639
- "has-filters",
6640
- "active-preset",
6641
- "apply-preset",
6642
- "clear-preset",
6643
- "save-current-filters",
6644
- "rename-preset",
6645
- "remove-preset"
6646
- ]), _cache[0] || (_cache[0] = createElementVNode("h1", { class: "text-xl sm:text-2xl font-bold" }, "Manage Support Tickets", -1))]), createElementVNode("div", _hoisted_3$16, [createVNode(_component_router_link, {
6647
- to: { name: "CustomerSupportTicketList" },
6648
- class: "btn btn-outline btn-sm sm:btn-md"
6649
- }, {
6650
- default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode(" Customer View ", -1)])]),
6651
- _: 1
6652
- }), createVNode(_component_router_link, {
6653
- to: { name: unref(staffSupportPaths).staff_create.name },
6654
- class: "btn btn-primary btn-sm sm:btn-md"
6655
- }, {
6656
- default: withCtx(() => [..._cache[2] || (_cache[2] = [createTextVNode(" Create ", -1)])]),
6657
- _: 1
6658
- }, 8, ["to"])])]), createVNode(unref(ZiniaDataTable), null, {
6659
- "cell-displayId": withCtx(({ row }) => [createTextVNode(toDisplayString(unref(formatTicketDisplayId)(row.display_id, row.display_id_prefix, row.id)), 1)]),
6660
- "cell-type": withCtx(({ row }) => [createVNode(SupportTicketTypeBadge_default, {
6661
- type: row.type,
6662
- size: "sm"
6663
- }, null, 8, ["type"])]),
6664
- "cell-priority": withCtx(({ row }) => [createVNode(SupportTicketPriorityBadge_default, {
6665
- priority: row.priority,
6666
- size: "sm"
6667
- }, null, 8, ["priority"])]),
6668
- "cell-approval_status": withCtx(({ row }) => [createVNode(SupportTicketApprovalBadge_default, {
6669
- approvalStatus: row.approval_status,
6670
- size: "sm"
6671
- }, null, 8, ["approvalStatus"])]),
6672
- "cell-dev_lifecycle": withCtx(({ row }) => [createVNode(SupportTicketDevLifecycleBadge_default, {
6673
- devLifecycle: row.dev_lifecycle || "PENDING",
6674
- size: "sm"
6675
- }, null, 8, ["devLifecycle"])]),
6676
- "cell-credit_value": withCtx(({ row }) => [createTextVNode(toDisplayString(unref(formatStaffCreditValue)(row.credit_value, row.approval_status)), 1)]),
6677
- "cell-created_by": withCtx(({ row }) => [createTextVNode(toDisplayString(row.created_by_display_name), 1)]),
6678
- "cell-target_at": withCtx(({ row }) => [createTextVNode(toDisplayString(unref(formatUserDate)(row.target_at) || "TBD"), 1)]),
6679
- "cell-updated_at": withCtx(({ row }) => [createTextVNode(toDisplayString(unref(formatSystemTimestamp)(row.updated_at)), 1)]),
6680
- "cell-actions": withCtx(({ row }) => [createVNode(_component_router_link, {
6681
- to: {
6682
- name: "AdminEditSupportTicket",
6683
- params: { id: row.id }
6684
- },
6685
- class: "btn btn-sm btn-primary"
6686
- }, {
6687
- default: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode(" Manage ", -1)])]),
6688
- _: 1
6689
- }, 8, ["to"])]),
6690
- _: 1
6691
- })]);
6692
- };
6693
- }
6694
- });
6695
- var StaffSupportTicketList_default = _sfc_main$21;
6696
-
6697
- //#endregion
6698
- //#region src/slices/support_ticket/staff/StaffSupportTicketMetadata.ts
6699
- const adminSupportTicketCreateSchemaWithMetadata = withMetadata(StaffSupportTicketCreateSchema, "adminSupportTicketCreateSchema", {
6700
- description: {
6701
- inputType: "textarea",
6702
- placeholder: "Enter description"
6703
- },
6704
- credit_value: {
6705
- inputType: "currency",
6706
- step: .01,
6707
- placeholder: "Enter credit value"
6708
- },
6709
- start_at: {
6710
- inputType: "date",
6711
- placeholder: "Enter date"
6712
- },
6713
- target_at: {
6714
- inputType: "date",
6715
- placeholder: "Enter date"
6716
- },
6717
- completed_at: {
6718
- inputType: "date",
6719
- placeholder: "Enter date"
6720
- },
6721
- priority: {
6722
- inputType: "select",
6723
- valueToLabel: SUPPORT_TICKET_PRIORITY_NUMBER_TO_LABEL,
6724
- valueType: "number"
6725
- },
6726
- assigned_to: {
6727
- label: "Assignee",
6728
- inputType: "select",
6729
- placeholder: "Auto-assign (round-robin)"
6730
- }
6731
- });
6732
- const adminSupportTicketUpdateSchemaWithMetadata = withMetadata(StaffSupportTicketUpdateSchema, "adminSupportTicketUpdateSchema", {
6733
- description: {
6734
- inputType: "textarea",
6735
- placeholder: "Enter description"
6736
- },
6737
- credit_value: {
6738
- inputType: "currency",
6739
- step: .01,
6740
- placeholder: "Enter credit value"
6741
- },
6742
- start_at: {
6743
- inputType: "date",
6744
- placeholder: "Enter date"
6745
- },
6746
- target_at: {
6747
- inputType: "date",
6748
- placeholder: "Enter date"
6749
- },
6750
- completed_at: {
6751
- inputType: "date",
6752
- placeholder: "Enter date"
6753
- },
6754
- priority: {
6755
- inputType: "select",
6756
- valueToLabel: SUPPORT_TICKET_PRIORITY_NUMBER_TO_LABEL,
6757
- valueType: "number"
6758
- }
6759
- });
6760
-
6761
- //#endregion
6762
- //#region src/slices/support_ticket/staff/StaffCreateSupportTicketForm.vue
6763
- const _hoisted_1$18 = {
6764
- key: 0,
6765
- class: "flex flex-col items-center justify-center p-8"
6766
- };
6767
- const _hoisted_2$17 = {
6768
- key: 1,
6769
- class: "flex flex-col items-center justify-center p-8"
6770
- };
6771
- const _hoisted_3$15 = { class: "mt-4 text-lg" };
6772
- const _hoisted_4$14 = { class: "mt-6" };
6773
- const _hoisted_5$10 = {
6774
- key: 1,
6775
- class: "alert alert-error mb-4"
6776
- };
6777
- const _hoisted_6$10 = { class: "flex justify-center mt-6" };
6778
- const _sfc_main$20 = /* @__PURE__ */ defineComponent({
6779
- __name: "StaffCreateSupportTicketForm",
6780
- setup(__props) {
6781
- const router = useRouter();
6782
- const attachmentsRef = ref(null);
6783
- const loadAssigneeOptions = async () => {
6784
- try {
6785
- return { triageUsers: [{
6786
- value: "",
6787
- label: "Auto-assign (round-robin)"
6788
- }, ...(await executeWithAuth((api) => api.users.getTriageUsers(), { refreshTokenHandler: getRefreshTokenHandler() }) ?? []).map((u) => ({
6789
- value: u.id,
6790
- label: u.email
6791
- }))] };
6792
- } catch (error) {
6793
- console.error("Error fetching triage users", error);
6794
- return { triageUsers: [{
6795
- value: "",
6796
- label: "Auto-assign (round-robin)"
6797
- }] };
6798
- }
6799
- };
6800
- const { form, zinia, ZiniaForm, ZiniaSubmitButton, ZiniaResetButton, ZiniaFormErrorsSummary, clearSavedFormState } = useForm(adminSupportTicketCreateSchemaWithMetadata, {
6801
- storeName: `create-admin-support-ticket`,
6802
- persistToLocalStorage: true,
6803
- renderStyle: "daisy_ui",
6804
- dataLoaders: { enriched: loadAssigneeOptions },
6805
- fetchData: async () => {
6806
- return {
6807
- title: "",
6808
- type: "IMPROVEMENT",
6809
- priority: SUPPORT_TICKET_PRIORITY_TO_NUMBER.MEDIUM,
6810
- is_internal: false,
6811
- assigned_to: null
6812
- };
6813
- }
6814
- });
6815
- const { mutate: createSupportTicket } = useMutation((api, input) => api.supportTickets.staffCreateTicket(input), { invalidate: /^support-tickets?:/ });
6816
- const beforeValidate = () => {
6817
- if (form.values.is_internal) {
6818
- form.values.credit_value = null;
6819
- if (!form.values.dev_lifecycle || ![
6820
- "BACKLOG",
6821
- "CODE_REVIEW",
6822
- "DEVELOPMENT",
6823
- "PLANNING",
6824
- "PO_APPROVAL",
6825
- "STAGING",
6826
- "TESTING",
6827
- "VERIFICATION"
6828
- ].includes(form.values.dev_lifecycle)) form.values.dev_lifecycle = "BACKLOG";
6829
- }
6830
- return true;
6831
- };
6832
- const handleSubmit = async (formData) => {
6833
- const createdSupportTicket = await createSupportTicket(formData);
6834
- if (!createdSupportTicket) throw new Error("Failed to create support ticket");
6835
- return createdSupportTicket;
6836
- };
6837
- const handleFilesQueued = (_files) => {};
6838
- const handleSuccess = async (createdSupportTicket) => {
6839
- if (attachmentsRef.value) try {
6840
- await attachmentsRef.value.uploadQueuedFiles(createdSupportTicket.id);
6841
- } catch (error) {
6842
- console.error("Failed to upload attachments:", error);
6843
- toast.warning("Ticket created, but some attachments failed to upload. You can add them later.");
6844
- }
6845
- clearSavedFormState();
6846
- await router.push({ name: staffSupportPaths.staff_create_success.name });
6847
- toast.success(`Support Ticket "${createdSupportTicket.title}" created successfully!`);
6848
- };
6849
- const handleError = (error) => {
6850
- form.setSubmitError(error instanceof Error ? error.message : "An unknown error occurred");
6851
- };
6852
- return (_ctx, _cache) => {
6853
- return unref(form).isLoading ? (openBlock(), createElementBlock("div", _hoisted_1$18, [..._cache[0] || (_cache[0] = [createElementVNode("div", { class: "loading loading-spinner loading-lg" }, null, -1), createElementVNode("p", { class: "mt-4 text-lg" }, "Loading...", -1)])])) : unref(form).loadError ? (openBlock(), createElementBlock("div", _hoisted_2$17, [createElementVNode("p", _hoisted_3$15, toDisplayString(unref(form).loadError), 1)])) : (openBlock(), createBlock(unref(ZiniaForm), {
6854
- key: 2,
6855
- onBeforeValidate: beforeValidate,
6856
- onHandleSubmit: handleSubmit,
6857
- onSuccess: handleSuccess,
6858
- onError: handleError,
6859
- title: "Create Support Ticket",
6860
- subtitle: "Create new ticket or internal task"
6861
- }, {
6862
- default: withCtx(() => [
6863
- createCommentVNode(" Basic Information "),
6864
- createVNode(FieldsetSection_default, { title: "Support Ticket Details" }, {
6865
- default: withCtx(() => [
6866
- createVNode(unref(zinia).TitleField, { placeholder: "Enter ticket title" }),
6867
- createVNode(unref(zinia).TypeField),
6868
- createVNode(unref(zinia).PriorityField)
6869
- ]),
6870
- _: 1
6871
- }),
6872
- createVNode(FieldsetSection_default, { title: "Description" }, {
6873
- default: withCtx(() => [createVNode(unref(zinia).DescriptionField, {
6874
- class: "w-full",
6875
- placeholder: "Describe the ticket in detail"
6876
- })]),
6877
- _: 1
6878
- }),
6879
- createCommentVNode(" Attachments (Jira-style inline) - Files will be uploaded after ticket creation "),
6880
- createElementVNode("div", _hoisted_4$14, [createVNode(InlineAttachments_default, {
6881
- "can-upload": true,
6882
- "can-delete": false,
6883
- onFilesQueued: handleFilesQueued,
6884
- ref_key: "attachmentsRef",
6885
- ref: attachmentsRef
6886
- }, null, 512)]),
6887
- createCommentVNode(" Staff Options "),
6888
- createVNode(FieldsetSection_default, { title: "Staff Options" }, {
6889
- default: withCtx(() => [
6890
- createVNode(unref(zinia).IsInternalField, { label: "Internal Staff Task" }),
6891
- createVNode(unref(zinia).AssignedToField, { "select-options": unref(form).extraData.enriched?.triageUsers || [] }, null, 8, ["select-options"]),
6892
- createCommentVNode(" Show devLifecycle only for internal tasks "),
6893
- unref(form).values.is_internal ? (openBlock(), createBlock(unref(zinia).DevLifecycleField, { key: 0 })) : createCommentVNode("v-if", true)
6894
- ]),
6895
- _: 1
6896
- }),
6897
- createCommentVNode(" Credits (only for customer support ticket) "),
6898
- !unref(form).values.is_internal ? (openBlock(), createBlock(FieldsetSection_default, {
6899
- key: 0,
6900
- title: "Credits (Optional)"
6901
- }, {
6902
- default: withCtx(() => [createVNode(unref(zinia).CreditValueField, { placeholder: "0.00" })]),
6903
- _: 1
6904
- })) : createCommentVNode("v-if", true),
6905
- createCommentVNode(" Timeline (Optional) "),
6906
- createVNode(FieldsetSection_default, { title: "Timeline (Optional)" }, {
6907
- default: withCtx(() => [createVNode(unref(zinia).StartAtField, { formatter: unref(formatToISODate) }, null, 8, ["formatter"]), createVNode(unref(zinia).TargetAtField, { formatter: unref(formatToISODate) }, null, 8, ["formatter"])]),
6908
- _: 1
6909
- }),
6910
- createCommentVNode(" Form Status Messages "),
6911
- unref(form).submitError ? (openBlock(), createElementBlock("div", _hoisted_5$10, [_cache[1] || (_cache[1] = createElementVNode("svg", {
6912
- xmlns: "http://www.w3.org/2000/svg",
6913
- class: "stroke-current shrink-0 h-6 w-6",
6914
- fill: "none",
6915
- viewBox: "0 0 24 24"
6916
- }, [createElementVNode("path", {
6917
- "stroke-linecap": "round",
6918
- "stroke-linejoin": "round",
6919
- "stroke-width": "2",
6920
- d: "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
6921
- })], -1)), createElementVNode("span", null, toDisplayString(unref(form).submitError), 1)])) : createCommentVNode("v-if", true),
6922
- createCommentVNode(" Submit Button "),
6923
- createElementVNode("div", _hoisted_6$10, [createVNode(unref(ZiniaSubmitButton), {
6924
- submitText: "Create Support Ticket",
6925
- submittingText: "Creating Support Ticket..."
6926
- })]),
6927
- createVNode(unref(ZiniaFormErrorsSummary), { title: "Please fix the following errors:" }),
6928
- createVNode(unref(ZiniaResetButton))
6929
- ]),
6930
- _: 1
6931
- }));
6932
- };
6933
- }
6934
- });
6935
- var StaffCreateSupportTicketForm_default = _sfc_main$20;
6936
-
6937
- //#endregion
6938
- //#region src/slices/support_ticket/staff/StaffSupportTicketSuccess.vue
6939
- const _hoisted_1$17 = { class: "flex flex-col items-center justify-center min-h-[60vh] p-8" };
6940
- const _hoisted_2$16 = { class: "text-center max-w-2xl" };
6941
- const _hoisted_3$14 = { class: "flex flex-col sm:flex-row gap-4 justify-center" };
6942
- const _sfc_main$19 = /* @__PURE__ */ defineComponent({
6943
- __name: "StaffSupportTicketSuccess",
6944
- setup(__props) {
6945
- return (_ctx, _cache) => {
6946
- const _component_router_link = resolveComponent("router-link");
6947
- return openBlock(), createElementBlock("div", _hoisted_1$17, [createElementVNode("div", _hoisted_2$16, [
6948
- createCommentVNode(" Success Icon "),
6949
- _cache[2] || (_cache[2] = createElementVNode("div", { class: "mb-6" }, [createElementVNode("div", { class: "inline-flex items-center justify-center w-20 h-20 bg-success rounded-full" }, [createElementVNode("svg", {
6950
- class: "w-10 h-10 text-success-content",
6951
- fill: "none",
6952
- stroke: "currentColor",
6953
- viewBox: "0 0 24 24",
6954
- xmlns: "http://www.w3.org/2000/svg"
6955
- }, [createElementVNode("path", {
6956
- "stroke-linecap": "round",
6957
- "stroke-linejoin": "round",
6958
- "stroke-width": "2",
6959
- d: "M5 13l4 4L19 7"
6960
- })])])], -1)),
6961
- createCommentVNode(" Success Message "),
6962
- _cache[3] || (_cache[3] = createElementVNode("h1", { class: "text-3xl font-bold text-base-content mb-4" }, " Support Ticket Created Successfully! ", -1)),
6963
- _cache[4] || (_cache[4] = createElementVNode("p", { class: "text-lg text-base-content/70 mb-8" }, " The support ticket has been created and is ready for processing. ", -1)),
6964
- createCommentVNode(" What Happens Next "),
6965
- _cache[5] || (_cache[5] = createStaticVNode("<div class=\"bg-base-200 rounded-lg p-6 mb-8\"><h2 class=\"text-xl font-semibold mb-4\">Next Steps</h2><div class=\"space-y-3 text-left\"><div class=\"flex items-start gap-3\"><div class=\"flex-shrink-0 w-6 h-6 bg-primary text-primary-content rounded-full flex items-center justify-center text-sm font-semibold\"> 1 </div><div><div class=\"font-medium\">Review &amp; Assign</div><div class=\"text-sm text-base-content/70\"> Review the ticket details and assign to appropriate team member </div></div></div><div class=\"flex items-start gap-3\"><div class=\"flex-shrink-0 w-6 h-6 bg-primary text-primary-content rounded-full flex items-center justify-center text-sm font-semibold\"> 2 </div><div><div class=\"font-medium\">Set Timeline</div><div class=\"text-sm text-base-content/70\"> Update target dates and delivery estimates if needed </div></div></div><div class=\"flex items-start gap-3\"><div class=\"flex-shrink-0 w-6 h-6 bg-primary text-primary-content rounded-full flex items-center justify-center text-sm font-semibold\"> 3 </div><div><div class=\"font-medium\">Begin Work</div><div class=\"text-sm text-base-content/70\"> Start development or operational work as appropriate </div></div></div></div></div>", 1)),
6966
- createCommentVNode(" Action Buttons "),
6967
- createElementVNode("div", _hoisted_3$14, [createVNode(_component_router_link, {
6968
- to: { name: unref(staffSupportPaths).staff_list.name },
6969
- class: "btn btn-primary btn-lg"
6970
- }, {
6971
- default: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode(" View All Support Tickets ", -1)])]),
6972
- _: 1
6973
- }, 8, ["to"]), createVNode(_component_router_link, {
6974
- to: { name: unref(staffSupportPaths).staff_create.name },
6975
- class: "btn btn-outline btn-lg"
6976
- }, {
6977
- default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode(" Create Another Ticket ", -1)])]),
6978
- _: 1
6979
- }, 8, ["to"])])
6980
- ])]);
6981
- };
6982
- }
6983
- });
6984
- var StaffSupportTicketSuccess_default = _sfc_main$19;
6985
-
6986
- //#endregion
6987
- //#region src/slices/support_ticket/staff/components/CustomerCreditBalance.vue
6988
- const _hoisted_1$16 = {
6989
- key: 0,
6990
- class: "flex items-center gap-2"
6991
- };
6992
- const _hoisted_2$15 = { class: "space-y-2" };
6993
- const _hoisted_3$13 = { class: "grid grid-cols-2 gap-2 text-sm" };
6994
- const _hoisted_4$13 = { class: "font-bold ml-2" };
6995
- const _hoisted_5$9 = { class: "font-bold ml-2" };
6996
- const _hoisted_6$9 = {
6997
- key: 0,
6998
- class: "alert alert-warning alert-sm"
6999
- };
7000
- const _sfc_main$18 = /* @__PURE__ */ defineComponent({
7001
- __name: "CustomerCreditBalance",
7002
- setup(__props) {
7003
- const { data, loading, error } = useQuery((api) => api.customer.getCreditBalance(), { staleTime: 120 * 1e3 });
7004
- const creditBalance = computed(() => data.value ?? null);
7005
- const totalAvailable = computed(() => {
7006
- if (!creditBalance.value) return 0;
7007
- return (parseFloat(creditBalance.value.monthly) || 0) + (parseFloat(creditBalance.value.rollover) || 0);
7008
- });
7009
- return (_ctx, _cache) => {
7010
- return openBlock(), createElementBlock("div", null, [createCommentVNode(" Loading State "), unref(loading) ? (openBlock(), createElementBlock("div", _hoisted_1$16, [..._cache[0] || (_cache[0] = [createElementVNode("span", { class: "loading loading-spinner loading-sm" }, null, -1), createElementVNode("span", { class: "text-sm" }, "Loading customer balance...", -1)])])) : unref(error) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Error State "), _cache[1] || (_cache[1] = createElementVNode("div", { class: "alert alert-error alert-sm" }, [createElementVNode("span", { class: "text-xs" }, "Failed to load customer balance")], -1))], 2112)) : creditBalance.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createCommentVNode(" Balance Display "), createElementVNode("div", _hoisted_2$15, [
7011
- createElementVNode("div", _hoisted_3$13, [createElementVNode("div", null, [_cache[2] || (_cache[2] = createElementVNode("span", { class: "text-base-content/60" }, "Monthly:", -1)), createElementVNode("span", _hoisted_4$13, toDisplayString(unref(formatStaffCreditValue)(creditBalance.value.monthly)), 1)]), createElementVNode("div", null, [_cache[3] || (_cache[3] = createElementVNode("span", { class: "text-base-content/60" }, "Rollover:", -1)), createElementVNode("span", _hoisted_5$9, toDisplayString(unref(formatStaffCreditValue)(creditBalance.value.rollover)), 1)])]),
7012
- createElementVNode("div", { class: normalizeClass(["flex items-center justify-between p-2 rounded", {
7013
- "bg-success/20": totalAvailable.value > 0,
7014
- "bg-error/20": totalAvailable.value === 0
7015
- }]) }, [_cache[4] || (_cache[4] = createElementVNode("span", { class: "text-sm font-medium" }, "Total Available:", -1)), createElementVNode("span", { class: normalizeClass(["font-bold", {
7016
- "text-success": totalAvailable.value > 0,
7017
- "text-error": totalAvailable.value === 0
7018
- }]) }, toDisplayString(unref(formatStaffCreditValue)(totalAvailable.value.toString())), 3)], 2),
7019
- createCommentVNode(" Warning if no balance "),
7020
- totalAvailable.value === 0 ? (openBlock(), createElementBlock("div", _hoisted_6$9, [..._cache[5] || (_cache[5] = [createElementVNode("svg", {
7021
- xmlns: "http://www.w3.org/2000/svg",
7022
- class: "stroke-current shrink-0 h-4 w-4",
7023
- fill: "none",
7024
- viewBox: "0 0 24 24"
7025
- }, [createElementVNode("path", {
7026
- "stroke-linecap": "round",
7027
- "stroke-linejoin": "round",
7028
- "stroke-width": "2",
7029
- d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
7030
- })], -1), createElementVNode("span", { class: "text-xs" }, "Customer has insufficient credits", -1)])])) : createCommentVNode("v-if", true)
7031
- ])], 2112)) : createCommentVNode("v-if", true)]);
7032
- };
7033
- }
7034
- });
7035
- var CustomerCreditBalance_default = _sfc_main$18;
7036
-
7037
- //#endregion
7038
- //#region src/slices/support_ticket/staff/components/ApproveRejectActions.vue
7039
- const _hoisted_1$15 = {
7040
- key: 0,
7041
- class: "alert alert-warning py-2"
7042
- };
7043
- const _hoisted_2$14 = {
7044
- key: 1,
7045
- class: "space-y-3"
7046
- };
7047
- const _hoisted_3$12 = { class: "alert alert-info py-2" };
7048
- const _hoisted_4$12 = { class: "text-xs sm:text-sm" };
7049
- const _hoisted_5$8 = { class: "bg-base-100 rounded-lg p-3" };
7050
- const _hoisted_6$8 = { class: "flex flex-col sm:flex-row gap-2 sm:gap-3 justify-end mt-4" };
7051
- const _hoisted_7$8 = ["disabled"];
7052
- const _hoisted_8$8 = {
7053
- key: 0,
7054
- class: "loading loading-spinner loading-sm mr-2"
7055
- };
7056
- const _hoisted_9$7 = ["disabled"];
7057
- const _hoisted_10$4 = {
7058
- key: 0,
7059
- class: "loading loading-spinner loading-sm mr-2"
7060
- };
7061
- const _hoisted_11$3 = {
7062
- key: 2,
7063
- class: "alert alert-error mt-2 py-2"
7064
- };
7065
- const _hoisted_12$2 = { class: "text-sm" };
7066
- const _hoisted_13$1 = { class: "alert alert-warning py-2" };
7067
- const _hoisted_14$1 = { class: "text-xs sm:text-sm" };
7068
- const _hoisted_15 = { class: "font-semibold" };
7069
- const _hoisted_16 = {
7070
- key: 0,
7071
- class: "alert alert-info py-2"
7072
- };
7073
- const _hoisted_17 = { class: "text-xs sm:text-sm" };
7074
- const _hoisted_18 = { class: "flex mt-4" };
7075
- const _hoisted_19 = ["disabled"];
7076
- const _hoisted_20 = {
7077
- key: 0,
7078
- class: "loading loading-spinner loading-sm mr-2"
7079
- };
7080
- const _hoisted_21 = {
7081
- key: 1,
7082
- class: "alert alert-error mt-2 py-2"
7083
- };
7084
- const _hoisted_22 = { class: "text-sm" };
7085
- const _hoisted_23 = { class: "modal-box" };
7086
- const _hoisted_24 = { class: "font-bold text-lg" };
7087
- const _hoisted_25 = { class: "py-4 whitespace-pre-line" };
7088
- const _hoisted_26 = { class: "modal-action" };
7089
- const _hoisted_27 = { class: "modal-box" };
7090
- const _hoisted_28 = { class: "form-control py-4" };
7091
- const _hoisted_29 = ["disabled"];
7092
- const _hoisted_30 = {
7093
- key: 0,
7094
- class: "alert alert-error py-2 mb-4"
7095
- };
7096
- const _hoisted_31 = { class: "text-sm" };
7097
- const _hoisted_32 = { class: "modal-action" };
7098
- const _hoisted_33 = ["disabled"];
7099
- const _hoisted_34 = ["disabled"];
7100
- const _hoisted_35 = {
7101
- key: 0,
7102
- class: "loading loading-spinner loading-xs mr-2"
7103
- };
7104
- const _sfc_main$17 = /* @__PURE__ */ defineComponent({
7105
- __name: "ApproveRejectActions",
6576
+ const _hoisted_21 = {
6577
+ key: 1,
6578
+ class: "alert alert-error mt-2 py-2"
6579
+ };
6580
+ const _hoisted_22 = { class: "text-sm" };
6581
+ const _hoisted_23 = { class: "modal-box" };
6582
+ const _hoisted_24 = { class: "font-bold text-lg" };
6583
+ const _hoisted_25 = { class: "py-4 whitespace-pre-line" };
6584
+ const _hoisted_26 = { class: "modal-action" };
6585
+ const _hoisted_27 = { class: "modal-box" };
6586
+ const _hoisted_28 = { class: "form-control py-4" };
6587
+ const _hoisted_29 = ["disabled"];
6588
+ const _hoisted_30 = {
6589
+ key: 0,
6590
+ class: "alert alert-error py-2 mb-4"
6591
+ };
6592
+ const _hoisted_31 = { class: "text-sm" };
6593
+ const _hoisted_32 = { class: "modal-action" };
6594
+ const _hoisted_33 = ["disabled"];
6595
+ const _hoisted_34 = ["disabled"];
6596
+ const _hoisted_35 = {
6597
+ key: 0,
6598
+ class: "loading loading-spinner loading-xs mr-2"
6599
+ };
6600
+ const _sfc_main$20 = /* @__PURE__ */ defineComponent({
6601
+ __name: "ApproveRejectActions",
7106
6602
  props: { support_ticket: {} },
7107
6603
  emits: ["update"],
7108
6604
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -7224,7 +6720,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
7224
6720
  props.support_ticket.approval_status === "PENDING" ? (openBlock(), createBlock(ZiniaContainer_default, { key: 0 }, {
7225
6721
  default: withCtx(() => [
7226
6722
  _cache[4] || (_cache[4] = createElementVNode("h3", { class: "card-title text-base sm:text-lg" }, "Approve or Reject", -1)),
7227
- unref(formatStaffCreditValue)(props.support_ticket.credit_value, props.support_ticket.approval_status) === "TBD" ? (openBlock(), createElementBlock("div", _hoisted_1$15, [..._cache[2] || (_cache[2] = [createElementVNode("div", null, [createElementVNode("svg", {
6723
+ unref(formatStaffCreditValue)(props.support_ticket.credit_value, props.support_ticket.approval_status) === "TBD" ? (openBlock(), createElementBlock("div", _hoisted_1$18, [..._cache[2] || (_cache[2] = [createElementVNode("div", null, [createElementVNode("svg", {
7228
6724
  xmlns: "http://www.w3.org/2000/svg",
7229
6725
  class: "stroke-current shrink-0 h-5 w-5",
7230
6726
  fill: "none",
@@ -7234,12 +6730,12 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
7234
6730
  "stroke-linejoin": "round",
7235
6731
  "stroke-width": "2",
7236
6732
  d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
7237
- })]), createElementVNode("span", { class: "text-xs sm:text-sm" }, "You must set an estimate before approving")], -1)])])) : (openBlock(), createElementBlock("div", _hoisted_2$14, [
7238
- createElementVNode("div", _hoisted_3$12, [createElementVNode("div", null, [createElementVNode("span", _hoisted_4$12, "Estimate: " + toDisplayString(unref(formatStaffCreditValue)(props.support_ticket.credit_value, props.support_ticket.approval_status)) + " credits", 1)])]),
6733
+ })]), createElementVNode("span", { class: "text-xs sm:text-sm" }, "You must set an estimate before approving")], -1)])])) : (openBlock(), createElementBlock("div", _hoisted_2$17, [
6734
+ createElementVNode("div", _hoisted_3$15, [createElementVNode("div", null, [createElementVNode("span", _hoisted_4$14, "Estimate: " + toDisplayString(unref(formatStaffCreditValue)(props.support_ticket.credit_value, props.support_ticket.approval_status)) + " credits", 1)])]),
7239
6735
  createCommentVNode(" Show Customer's Credit Balance "),
7240
- createElementVNode("div", _hoisted_5$8, [_cache[3] || (_cache[3] = createElementVNode("h4", { class: "text-xs sm:text-sm font-medium mb-2" }, "Customer Balance Check", -1)), createVNode(CustomerCreditBalance_default)])
6736
+ createElementVNode("div", _hoisted_5$10, [_cache[3] || (_cache[3] = createElementVNode("h4", { class: "text-xs sm:text-sm font-medium mb-2" }, "Customer Balance Check", -1)), createVNode(CustomerCreditBalance_default)])
7241
6737
  ])),
7242
- createElementVNode("div", _hoisted_6$8, [createElementVNode("button", {
6738
+ createElementVNode("div", _hoisted_6$9, [createElementVNode("button", {
7243
6739
  class: "btn btn-error btn-outline w-full sm:w-auto order-2 sm:order-1",
7244
6740
  onClick: withModifiers(showRejectModal, ["prevent"]),
7245
6741
  disabled: unref(isApproving) || unref(isRejecting)
@@ -7326,24 +6822,123 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
7326
6822
  ]), createElementVNode("form", {
7327
6823
  method: "dialog",
7328
6824
  class: "modal-backdrop"
7329
- }, [createElementVNode("button", { onClick: closeRejectModal }, "close")])], 512)
6825
+ }, [createElementVNode("button", { onClick: closeRejectModal }, "close")])], 512)
6826
+ ], 64);
6827
+ };
6828
+ }
6829
+ });
6830
+ var ApproveRejectActions_default = _sfc_main$20;
6831
+
6832
+ //#endregion
6833
+ //#region src/slices/support_ticket/staff/components/CancelInternalTaskWorkflow.vue
6834
+ const _hoisted_1$17 = { class: "flex justify-end mt-4" };
6835
+ const _hoisted_2$16 = ["disabled"];
6836
+ const _hoisted_3$14 = {
6837
+ key: 0,
6838
+ class: "loading loading-spinner loading-sm mr-2"
6839
+ };
6840
+ const _hoisted_4$13 = {
6841
+ key: 0,
6842
+ class: "alert alert-error mt-2 py-2"
6843
+ };
6844
+ const _hoisted_5$9 = { class: "text-sm" };
6845
+ const _hoisted_6$8 = { class: "modal-box" };
6846
+ const _hoisted_7$7 = { class: "font-bold text-lg" };
6847
+ const _hoisted_8$7 = { class: "py-4 whitespace-pre-line" };
6848
+ const _hoisted_9$6 = { class: "modal-action" };
6849
+ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
6850
+ __name: "CancelInternalTaskWorkflow",
6851
+ props: { support_ticket: {} },
6852
+ emits: ["update"],
6853
+ setup(__props, { emit: __emit }) {
6854
+ const props = __props;
6855
+ const emit = __emit;
6856
+ const error = ref(null);
6857
+ const confirmModal = ref(null);
6858
+ const modalTitle = ref("");
6859
+ const modalMessage = ref("");
6860
+ const modalButtonText = ref("");
6861
+ const modalCallback = ref(null);
6862
+ const { mutate: cancelInternalTask, loading: isCancelling } = useMutation((api, input) => api.supportTickets.cancelInternalTask(input), { invalidate: /^support-tickets?:/ });
6863
+ const showCancelModal = () => {
6864
+ modalTitle.value = "Cancel Internal Task?";
6865
+ modalMessage.value = "This will:\n\n• Set dev lifecycle to CANCELLED\n• Record completion timestamp\n• Mark task as complete (terminal state)\n\nThis action cannot be undone. The task will remain in the system as cancelled.";
6866
+ modalButtonText.value = "Cancel Task";
6867
+ modalCallback.value = handleCancel;
6868
+ confirmModal.value?.showModal();
6869
+ };
6870
+ const handleCancel = async () => {
6871
+ error.value = null;
6872
+ try {
6873
+ const result = await cancelInternalTask({ id: props.support_ticket.id });
6874
+ toast.success("✅ Internal task cancelled successfully");
6875
+ closeModal();
6876
+ emit("update", result);
6877
+ } catch (err) {
6878
+ error.value = err instanceof Error ? err.message : "Failed to cancel task";
6879
+ toast.error(`❌ ${error.value}`);
6880
+ }
6881
+ };
6882
+ const closeModal = () => {
6883
+ confirmModal.value?.close();
6884
+ };
6885
+ return (_ctx, _cache) => {
6886
+ return openBlock(), createElementBlock(Fragment, null, [
6887
+ createCommentVNode(" Cancel Internal Task Section (INTERNAL only, not CANCELLED) "),
6888
+ props.support_ticket.approval_status === "INTERNAL" && props.support_ticket.dev_lifecycle !== "CANCELLED" ? (openBlock(), createBlock(ZiniaContainer_default, { key: 0 }, {
6889
+ default: withCtx(() => [
6890
+ _cache[1] || (_cache[1] = createElementVNode("h3", { class: "card-title text-base sm:text-lg" }, "Cancel Internal Task", -1)),
6891
+ _cache[2] || (_cache[2] = createElementVNode("div", { class: "alert alert-warning py-2" }, [createElementVNode("div", { class: "flex flex-col gap-2" }, [createElementVNode("span", { class: "font-semibold text-sm" }, "What happens when you cancel:"), createElementVNode("ul", { class: "text-xs sm:text-sm space-y-1 ml-4 list-disc" }, [
6892
+ createElementVNode("li", null, "Sets dev lifecycle to CANCELLED"),
6893
+ createElementVNode("li", null, "Records completion timestamp"),
6894
+ createElementVNode("li", null, "Task is marked as terminal state"),
6895
+ createElementVNode("li", null, "No credit impact (internal tasks have no credits)")
6896
+ ])])], -1)),
6897
+ createElementVNode("div", _hoisted_1$17, [createElementVNode("button", {
6898
+ class: "btn btn-error w-full sm:w-auto",
6899
+ onClick: withModifiers(showCancelModal, ["prevent"]),
6900
+ disabled: unref(isCancelling)
6901
+ }, [unref(isCancelling) ? (openBlock(), createElementBlock("span", _hoisted_3$14)) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(unref(isCancelling) ? "Cancelling..." : "Cancel Internal Task"), 1)], 8, _hoisted_2$16)]),
6902
+ error.value ? (openBlock(), createElementBlock("div", _hoisted_4$13, [createElementVNode("span", _hoisted_5$9, toDisplayString(error.value), 1)])) : createCommentVNode("v-if", true)
6903
+ ]),
6904
+ _: 1
6905
+ })) : createCommentVNode("v-if", true),
6906
+ createCommentVNode(" Confirmation Modal "),
6907
+ createElementVNode("dialog", {
6908
+ ref_key: "confirmModal",
6909
+ ref: confirmModal,
6910
+ class: "modal"
6911
+ }, [createElementVNode("div", _hoisted_6$8, [
6912
+ createElementVNode("h3", _hoisted_7$7, toDisplayString(modalTitle.value), 1),
6913
+ createElementVNode("p", _hoisted_8$7, toDisplayString(modalMessage.value), 1),
6914
+ createElementVNode("div", _hoisted_9$6, [createElementVNode("button", {
6915
+ class: "btn btn-ghost",
6916
+ onClick: closeModal
6917
+ }, "Cancel"), createElementVNode("button", {
6918
+ class: "btn btn-error",
6919
+ onClick: _cache[0] || (_cache[0] = () => modalCallback.value?.())
6920
+ }, toDisplayString(modalButtonText.value), 1)])
6921
+ ]), createElementVNode("form", {
6922
+ method: "dialog",
6923
+ class: "modal-backdrop"
6924
+ }, [createElementVNode("button", { onClick: closeModal }, "close")])], 512)
7330
6925
  ], 64);
7331
6926
  };
7332
6927
  }
7333
6928
  });
7334
- var ApproveRejectActions_default = _sfc_main$17;
6929
+ var CancelInternalTaskWorkflow_default = _sfc_main$19;
7335
6930
 
7336
6931
  //#endregion
7337
6932
  //#region src/slices/support_ticket/staff/components/CompleteSupportTicketForm.vue
7338
- const _hoisted_1$14 = { class: "text-xs sm:text-sm text-base-content/70 mb-4" };
7339
- const _hoisted_2$13 = { class: "font-semibold" };
7340
- const _hoisted_3$11 = { class: "text-xs sm:text-sm" };
7341
- const _hoisted_4$11 = { class: "grid grid-cols-2 gap-2 sm:gap-4 mt-2" };
7342
- const _hoisted_5$7 = { class: "bg-base-100 p-3 rounded-lg" };
6933
+ const _hoisted_1$16 = { class: "text-xs sm:text-sm text-base-content/70 mb-4" };
6934
+ const _hoisted_2$15 = { class: "font-semibold" };
6935
+ const _hoisted_3$13 = { class: "text-xs sm:text-sm" };
6936
+ const _hoisted_4$12 = { class: "grid grid-cols-2 gap-2 sm:gap-4 mt-2" };
6937
+ const _hoisted_5$8 = { class: "bg-base-100 p-3 rounded-lg" };
7343
6938
  const _hoisted_6$7 = { class: "text-lg sm:text-xl font-bold text-primary" };
7344
- const _hoisted_7$7 = { class: "bg-base-100 p-3 rounded-lg" };
7345
- const _hoisted_8$7 = { class: "text-xs text-base-content/60" };
7346
- const _sfc_main$16 = /* @__PURE__ */ defineComponent({
6939
+ const _hoisted_7$6 = { class: "bg-base-100 p-3 rounded-lg" };
6940
+ const _hoisted_8$6 = { class: "text-xs text-base-content/60" };
6941
+ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
7347
6942
  __name: "CompleteSupportTicketForm",
7348
6943
  props: { support_ticket: {} },
7349
6944
  emits: ["update"],
@@ -7429,9 +7024,9 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
7429
7024
  }, {
7430
7025
  default: withCtx(() => [
7431
7026
  _cache[2] || (_cache[2] = createElementVNode("h3", { class: "card-title text-base sm:text-lg" }, "Complete Support Ticket", -1)),
7432
- createElementVNode("p", _hoisted_1$14, [
7027
+ createElementVNode("p", _hoisted_1$16, [
7433
7028
  _cache[0] || (_cache[0] = createTextVNode(" Customer was charged ", -1)),
7434
- createElementVNode("span", _hoisted_2$13, toDisplayString(unref(formatStaffCreditValue)(props.support_ticket.credit_value, props.support_ticket.approval_status)), 1),
7029
+ createElementVNode("span", _hoisted_2$15, toDisplayString(unref(formatStaffCreditValue)(props.support_ticket.credit_value, props.support_ticket.approval_status)), 1),
7435
7030
  _cache[1] || (_cache[1] = createTextVNode(" credits ", -1))
7436
7031
  ]),
7437
7032
  createCommentVNode(" Delivered Value Field "),
@@ -7444,7 +7039,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
7444
7039
  unref(form).values.delivered_value && unref(formatStaffCreditValue)(props.support_ticket.credit_value, props.support_ticket.approval_status) !== "TBD" && unref(formatStaffCreditValue)(props.support_ticket.credit_value, props.support_ticket.approval_status) !== "N/A" ? (openBlock(), createElementBlock("div", {
7445
7040
  key: 0,
7446
7041
  class: normalizeClass(["alert py-2", getComparisonClass()])
7447
- }, [createElementVNode("span", _hoisted_3$11, toDisplayString(getComparisonMessage()), 1)], 2)) : createCommentVNode("v-if", true),
7042
+ }, [createElementVNode("span", _hoisted_3$13, toDisplayString(getComparisonMessage()), 1)], 2)) : createCommentVNode("v-if", true),
7448
7043
  createVNode(unref(ZiniaSubmitButton), {
7449
7044
  submitText: "Mark as Completed",
7450
7045
  submittingText: "Completing..."
@@ -7452,40 +7047,40 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
7452
7047
  ]),
7453
7048
  _: 1
7454
7049
  })) : isCompleted.value ? (openBlock(), createBlock(ZiniaContainer_default, { key: 1 }, {
7455
- default: withCtx(() => [_cache[6] || (_cache[6] = createElementVNode("h3", { class: "card-title text-success text-base sm:text-lg" }, "✅ Completed", -1)), createElementVNode("div", _hoisted_4$11, [createElementVNode("div", _hoisted_5$7, [
7050
+ default: withCtx(() => [_cache[6] || (_cache[6] = createElementVNode("h3", { class: "card-title text-success text-base sm:text-lg" }, "✅ Completed", -1)), createElementVNode("div", _hoisted_4$12, [createElementVNode("div", _hoisted_5$8, [
7456
7051
  _cache[3] || (_cache[3] = createElementVNode("div", { class: "text-xs text-base-content/70" }, "Customer Charged", -1)),
7457
7052
  createElementVNode("div", _hoisted_6$7, toDisplayString(unref(formatStaffCreditValue)(props.support_ticket.credit_value, props.support_ticket.approval_status)), 1),
7458
7053
  _cache[4] || (_cache[4] = createElementVNode("div", { class: "text-xs text-base-content/60" }, "Fixed price", -1))
7459
- ]), createElementVNode("div", _hoisted_7$7, [
7054
+ ]), createElementVNode("div", _hoisted_7$6, [
7460
7055
  _cache[5] || (_cache[5] = createElementVNode("div", { class: "text-xs text-base-content/70" }, "Actual Effort", -1)),
7461
7056
  createElementVNode("div", { class: normalizeClass(["text-lg sm:text-xl font-bold", getActualClass()]) }, toDisplayString(props.support_ticket.delivered_value ?? "N/A"), 3),
7462
- createElementVNode("div", _hoisted_8$7, toDisplayString(getVarianceLabel()), 1)
7057
+ createElementVNode("div", _hoisted_8$6, toDisplayString(getVarianceLabel()), 1)
7463
7058
  ])])]),
7464
7059
  _: 1
7465
7060
  })) : createCommentVNode("v-if", true);
7466
7061
  };
7467
7062
  }
7468
7063
  });
7469
- var CompleteSupportTicketForm_default = _sfc_main$16;
7064
+ var CompleteSupportTicketForm_default = _sfc_main$18;
7470
7065
 
7471
7066
  //#endregion
7472
7067
  //#region src/slices/support_ticket/staff/components/ConvertToCustomerWorkflow.vue
7473
- const _hoisted_1$13 = { class: "flex justify-end mt-4" };
7474
- const _hoisted_2$12 = ["disabled"];
7475
- const _hoisted_3$10 = {
7068
+ const _hoisted_1$15 = { class: "flex justify-end mt-4" };
7069
+ const _hoisted_2$14 = ["disabled"];
7070
+ const _hoisted_3$12 = {
7476
7071
  key: 0,
7477
7072
  class: "loading loading-spinner loading-sm mr-2"
7478
7073
  };
7479
- const _hoisted_4$10 = {
7074
+ const _hoisted_4$11 = {
7480
7075
  key: 0,
7481
7076
  class: "alert alert-error mt-2 py-2"
7482
7077
  };
7483
- const _hoisted_5$6 = { class: "text-sm" };
7078
+ const _hoisted_5$7 = { class: "text-sm" };
7484
7079
  const _hoisted_6$6 = { class: "modal-box" };
7485
- const _hoisted_7$6 = { class: "font-bold text-lg" };
7486
- const _hoisted_8$6 = { class: "py-4 whitespace-pre-line" };
7487
- const _hoisted_9$6 = { class: "modal-action" };
7488
- const _sfc_main$15 = /* @__PURE__ */ defineComponent({
7080
+ const _hoisted_7$5 = { class: "font-bold text-lg" };
7081
+ const _hoisted_8$5 = { class: "py-4 whitespace-pre-line" };
7082
+ const _hoisted_9$5 = { class: "modal-action" };
7083
+ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
7489
7084
  __name: "ConvertToCustomerWorkflow",
7490
7085
  props: { support_ticket: {} },
7491
7086
  emits: ["update"],
@@ -7533,12 +7128,12 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
7533
7128
  createElementVNode("li", null, "Clears dev lifecycle (back to planning)"),
7534
7129
  createElementVNode("li", null, "Staff must set credit estimate before approval")
7535
7130
  ])])], -1)),
7536
- createElementVNode("div", _hoisted_1$13, [createElementVNode("button", {
7131
+ createElementVNode("div", _hoisted_1$15, [createElementVNode("button", {
7537
7132
  class: "btn btn-primary w-full sm:w-auto",
7538
7133
  onClick: withModifiers(showConvertModal, ["prevent"]),
7539
7134
  disabled: unref(isConverting)
7540
- }, [unref(isConverting) ? (openBlock(), createElementBlock("span", _hoisted_3$10)) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(unref(isConverting) ? "Converting..." : "Convert to Customer SupportTicket"), 1)], 8, _hoisted_2$12)]),
7541
- error.value ? (openBlock(), createElementBlock("div", _hoisted_4$10, [createElementVNode("span", _hoisted_5$6, toDisplayString(error.value), 1)])) : createCommentVNode("v-if", true)
7135
+ }, [unref(isConverting) ? (openBlock(), createElementBlock("span", _hoisted_3$12)) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(unref(isConverting) ? "Converting..." : "Convert to Customer SupportTicket"), 1)], 8, _hoisted_2$14)]),
7136
+ error.value ? (openBlock(), createElementBlock("div", _hoisted_4$11, [createElementVNode("span", _hoisted_5$7, toDisplayString(error.value), 1)])) : createCommentVNode("v-if", true)
7542
7137
  ]),
7543
7138
  _: 1
7544
7139
  })) : createCommentVNode("v-if", true),
@@ -7548,9 +7143,9 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
7548
7143
  ref: confirmModal,
7549
7144
  class: "modal"
7550
7145
  }, [createElementVNode("div", _hoisted_6$6, [
7551
- createElementVNode("h3", _hoisted_7$6, toDisplayString(modalTitle.value), 1),
7552
- createElementVNode("p", _hoisted_8$6, toDisplayString(modalMessage.value), 1),
7553
- createElementVNode("div", _hoisted_9$6, [createElementVNode("button", {
7146
+ createElementVNode("h3", _hoisted_7$5, toDisplayString(modalTitle.value), 1),
7147
+ createElementVNode("p", _hoisted_8$5, toDisplayString(modalMessage.value), 1),
7148
+ createElementVNode("div", _hoisted_9$5, [createElementVNode("button", {
7554
7149
  class: "btn btn-ghost",
7555
7150
  onClick: closeModal
7556
7151
  }, "Cancel"), createElementVNode("button", {
@@ -7565,26 +7160,26 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
7565
7160
  };
7566
7161
  }
7567
7162
  });
7568
- var ConvertToCustomerWorkflow_default = _sfc_main$15;
7163
+ var ConvertToCustomerWorkflow_default = _sfc_main$17;
7569
7164
 
7570
7165
  //#endregion
7571
7166
  //#region src/slices/support_ticket/staff/components/ConvertToInternalWorkflow.vue
7572
- const _hoisted_1$12 = { class: "flex justify-end mt-4" };
7573
- const _hoisted_2$11 = ["disabled"];
7574
- const _hoisted_3$9 = {
7167
+ const _hoisted_1$14 = { class: "flex justify-end mt-4" };
7168
+ const _hoisted_2$13 = ["disabled"];
7169
+ const _hoisted_3$11 = {
7575
7170
  key: 0,
7576
7171
  class: "loading loading-spinner loading-sm mr-2"
7577
7172
  };
7578
- const _hoisted_4$9 = {
7173
+ const _hoisted_4$10 = {
7579
7174
  key: 0,
7580
7175
  class: "alert alert-error mt-2 py-2"
7581
7176
  };
7582
- const _hoisted_5$5 = { class: "text-sm" };
7177
+ const _hoisted_5$6 = { class: "text-sm" };
7583
7178
  const _hoisted_6$5 = { class: "modal-box" };
7584
- const _hoisted_7$5 = { class: "font-bold text-lg" };
7585
- const _hoisted_8$5 = { class: "py-4 whitespace-pre-line" };
7586
- const _hoisted_9$5 = { class: "modal-action" };
7587
- const _sfc_main$14 = /* @__PURE__ */ defineComponent({
7179
+ const _hoisted_7$4 = { class: "font-bold text-lg" };
7180
+ const _hoisted_8$4 = { class: "py-4 whitespace-pre-line" };
7181
+ const _hoisted_9$4 = { class: "modal-action" };
7182
+ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
7588
7183
  __name: "ConvertToInternalWorkflow",
7589
7184
  props: { support_ticket: {} },
7590
7185
  emits: ["update"],
@@ -7633,12 +7228,12 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
7633
7228
  createElementVNode("li", null, "Automatically clears any credit estimates (internal tasks = no credits)"),
7634
7229
  createElementVNode("li", null, "Can start development immediately")
7635
7230
  ])])], -1)),
7636
- createElementVNode("div", _hoisted_1$12, [createElementVNode("button", {
7231
+ createElementVNode("div", _hoisted_1$14, [createElementVNode("button", {
7637
7232
  class: "btn btn-primary w-full sm:w-auto",
7638
7233
  onClick: withModifiers(showConvertModal, ["prevent"]),
7639
7234
  disabled: unref(isConverting)
7640
- }, [unref(isConverting) ? (openBlock(), createElementBlock("span", _hoisted_3$9)) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(unref(isConverting) ? "Converting..." : "Convert to Internal Task"), 1)], 8, _hoisted_2$11)]),
7641
- error.value ? (openBlock(), createElementBlock("div", _hoisted_4$9, [createElementVNode("span", _hoisted_5$5, toDisplayString(error.value), 1)])) : createCommentVNode("v-if", true)
7235
+ }, [unref(isConverting) ? (openBlock(), createElementBlock("span", _hoisted_3$11)) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(unref(isConverting) ? "Converting..." : "Convert to Internal Task"), 1)], 8, _hoisted_2$13)]),
7236
+ error.value ? (openBlock(), createElementBlock("div", _hoisted_4$10, [createElementVNode("span", _hoisted_5$6, toDisplayString(error.value), 1)])) : createCommentVNode("v-if", true)
7642
7237
  ]),
7643
7238
  _: 1
7644
7239
  })) : createCommentVNode("v-if", true),
@@ -7648,9 +7243,9 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
7648
7243
  ref: confirmModal,
7649
7244
  class: "modal"
7650
7245
  }, [createElementVNode("div", _hoisted_6$5, [
7651
- createElementVNode("h3", _hoisted_7$5, toDisplayString(modalTitle.value), 1),
7652
- createElementVNode("p", _hoisted_8$5, toDisplayString(modalMessage.value), 1),
7653
- createElementVNode("div", _hoisted_9$5, [createElementVNode("button", {
7246
+ createElementVNode("h3", _hoisted_7$4, toDisplayString(modalTitle.value), 1),
7247
+ createElementVNode("p", _hoisted_8$4, toDisplayString(modalMessage.value), 1),
7248
+ createElementVNode("div", _hoisted_9$4, [createElementVNode("button", {
7654
7249
  class: "btn btn-ghost",
7655
7250
  onClick: closeModal
7656
7251
  }, "Cancel"), createElementVNode("button", {
@@ -7665,27 +7260,32 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
7665
7260
  };
7666
7261
  }
7667
7262
  });
7668
- var ConvertToInternalWorkflow_default = _sfc_main$14;
7263
+ var ConvertToInternalWorkflow_default = _sfc_main$16;
7669
7264
 
7670
7265
  //#endregion
7671
- //#region src/slices/support_ticket/staff/components/CancelInternalTaskWorkflow.vue
7672
- const _hoisted_1$11 = { class: "flex justify-end mt-4" };
7673
- const _hoisted_2$10 = ["disabled"];
7674
- const _hoisted_3$8 = {
7266
+ //#region src/slices/support_ticket/staff/components/ReactivateInternalTaskWorkflow.vue
7267
+ const _hoisted_1$13 = { class: "alert alert-info py-2" };
7268
+ const _hoisted_2$12 = { class: "flex flex-col gap-2" };
7269
+ const _hoisted_3$10 = { class: "text-xs sm:text-sm space-y-1 ml-4 list-disc" };
7270
+ const _hoisted_4$9 = { key: 0 };
7271
+ const _hoisted_5$5 = { key: 1 };
7272
+ const _hoisted_6$4 = { class: "flex justify-end mt-4" };
7273
+ const _hoisted_7$3 = ["disabled"];
7274
+ const _hoisted_8$3 = {
7675
7275
  key: 0,
7676
7276
  class: "loading loading-spinner loading-sm mr-2"
7677
7277
  };
7678
- const _hoisted_4$8 = {
7278
+ const _hoisted_9$3 = {
7679
7279
  key: 0,
7680
7280
  class: "alert alert-error mt-2 py-2"
7681
7281
  };
7682
- const _hoisted_5$4 = { class: "text-sm" };
7683
- const _hoisted_6$4 = { class: "modal-box" };
7684
- const _hoisted_7$4 = { class: "font-bold text-lg" };
7685
- const _hoisted_8$4 = { class: "py-4 whitespace-pre-line" };
7686
- const _hoisted_9$4 = { class: "modal-action" };
7687
- const _sfc_main$13 = /* @__PURE__ */ defineComponent({
7688
- __name: "CancelInternalTaskWorkflow",
7282
+ const _hoisted_10$3 = { class: "text-sm" };
7283
+ const _hoisted_11$2 = { class: "modal-box" };
7284
+ const _hoisted_12$1 = { class: "font-bold text-lg" };
7285
+ const _hoisted_13 = { class: "py-4 whitespace-pre-line" };
7286
+ const _hoisted_14 = { class: "modal-action" };
7287
+ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
7288
+ __name: "ReactivateInternalTaskWorkflow",
7689
7289
  props: { support_ticket: {} },
7690
7290
  emits: ["update"],
7691
7291
  setup(__props, { emit: __emit }) {
@@ -7697,198 +7297,652 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
7697
7297
  const modalMessage = ref("");
7698
7298
  const modalButtonText = ref("");
7699
7299
  const modalCallback = ref(null);
7700
- const { mutate: cancelInternalTask, loading: isCancelling } = useMutation((api, input) => api.supportTickets.cancelInternalTask(input), { invalidate: /^support-tickets?:/ });
7701
- const showCancelModal = () => {
7702
- modalTitle.value = "Cancel Internal Task?";
7703
- modalMessage.value = "This will:\n\n• Set dev lifecycle to CANCELLED\n• Record completion timestamp\n• Mark task as complete (terminal state)\n\nThis action cannot be undone. The task will remain in the system as cancelled.";
7704
- modalButtonText.value = "Cancel Task";
7705
- modalCallback.value = handleCancel;
7300
+ const { mutate: reactivateInternalTask, loading: isReactivating } = useMutation((api, input) => api.supportTickets.reactivateInternalTask(input), { invalidate: /^support-tickets?:/ });
7301
+ const showReactivateModal = () => {
7302
+ const isCancelled = props.support_ticket.dev_lifecycle === "CANCELLED";
7303
+ const targetState = isCancelled ? "BACKLOG" : "PO_APPROVAL";
7304
+ modalTitle.value = `Reopen ${isCancelled ? "Cancelled" : "Deployed"} Task?`;
7305
+ modalMessage.value = `This will:\n\n• Set dev lifecycle to ${targetState}\n• Clear completion timestamp\n• Resume task as active\n\n` + (isCancelled ? `Task will restart from backlog for fresh planning.` : `Task will go to PO approval stage for review/fixes.`);
7306
+ modalButtonText.value = "Reopen Task";
7307
+ modalCallback.value = handleReactivate;
7706
7308
  confirmModal.value?.showModal();
7707
7309
  };
7708
- const handleCancel = async () => {
7310
+ const handleReactivate = async () => {
7709
7311
  error.value = null;
7710
7312
  try {
7711
- const result = await cancelInternalTask({ id: props.support_ticket.id });
7712
- toast.success("✅ Internal task cancelled successfully");
7313
+ const result = await reactivateInternalTask({ id: props.support_ticket.id });
7314
+ toast.success("✅ Internal task reopened successfully");
7713
7315
  closeModal();
7714
7316
  emit("update", result);
7715
7317
  } catch (err) {
7716
- error.value = err instanceof Error ? err.message : "Failed to cancel task";
7318
+ error.value = err instanceof Error ? err.message : "Failed to reactivate task";
7717
7319
  toast.error(`❌ ${error.value}`);
7718
7320
  }
7719
7321
  };
7720
- const closeModal = () => {
7721
- confirmModal.value?.close();
7322
+ const closeModal = () => {
7323
+ confirmModal.value?.close();
7324
+ };
7325
+ return (_ctx, _cache) => {
7326
+ return openBlock(), createElementBlock(Fragment, null, [
7327
+ createCommentVNode(" Reactivate Terminal Internal Task Section (INTERNAL + CANCELLED or DEPLOYED) "),
7328
+ props.support_ticket.approval_status === "INTERNAL" && (props.support_ticket.dev_lifecycle === "CANCELLED" || props.support_ticket.dev_lifecycle === "DEPLOYED") ? (openBlock(), createBlock(ZiniaContainer_default, { key: 0 }, {
7329
+ default: withCtx(() => [
7330
+ _cache[5] || (_cache[5] = createElementVNode("h3", { class: "card-title text-base sm:text-lg" }, "Reopen Internal Task", -1)),
7331
+ createElementVNode("div", _hoisted_1$13, [createElementVNode("div", _hoisted_2$12, [_cache[4] || (_cache[4] = createElementVNode("span", { class: "font-semibold text-sm" }, "What happens when you reopen:", -1)), createElementVNode("ul", _hoisted_3$10, [
7332
+ props.support_ticket.dev_lifecycle === "CANCELLED" ? (openBlock(), createElementBlock("li", _hoisted_4$9, " Sets dev lifecycle to BACKLOG (fresh start) ")) : (openBlock(), createElementBlock("li", _hoisted_5$5, "Sets dev lifecycle to PO_APPROVAL (ready for review/fixes)")),
7333
+ _cache[1] || (_cache[1] = createElementVNode("li", null, "Clears completion timestamp", -1)),
7334
+ _cache[2] || (_cache[2] = createElementVNode("li", null, "Task becomes active again", -1)),
7335
+ _cache[3] || (_cache[3] = createElementVNode("li", null, "You can resume work or make additional changes", -1))
7336
+ ])])]),
7337
+ createElementVNode("div", _hoisted_6$4, [createElementVNode("button", {
7338
+ class: "btn btn-success w-full sm:w-auto",
7339
+ onClick: withModifiers(showReactivateModal, ["prevent"]),
7340
+ disabled: unref(isReactivating)
7341
+ }, [unref(isReactivating) ? (openBlock(), createElementBlock("span", _hoisted_8$3)) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(unref(isReactivating) ? "Reopening..." : "Reopen Task"), 1)], 8, _hoisted_7$3)]),
7342
+ error.value ? (openBlock(), createElementBlock("div", _hoisted_9$3, [createElementVNode("span", _hoisted_10$3, toDisplayString(error.value), 1)])) : createCommentVNode("v-if", true)
7343
+ ]),
7344
+ _: 1
7345
+ })) : createCommentVNode("v-if", true),
7346
+ createCommentVNode(" Confirmation Modal "),
7347
+ createElementVNode("dialog", {
7348
+ ref_key: "confirmModal",
7349
+ ref: confirmModal,
7350
+ class: "modal"
7351
+ }, [createElementVNode("div", _hoisted_11$2, [
7352
+ createElementVNode("h3", _hoisted_12$1, toDisplayString(modalTitle.value), 1),
7353
+ createElementVNode("p", _hoisted_13, toDisplayString(modalMessage.value), 1),
7354
+ createElementVNode("div", _hoisted_14, [createElementVNode("button", {
7355
+ class: "btn btn-ghost",
7356
+ onClick: closeModal
7357
+ }, "Cancel"), createElementVNode("button", {
7358
+ class: "btn btn-success",
7359
+ onClick: _cache[0] || (_cache[0] = () => modalCallback.value?.())
7360
+ }, toDisplayString(modalButtonText.value), 1)])
7361
+ ]), createElementVNode("form", {
7362
+ method: "dialog",
7363
+ class: "modal-backdrop"
7364
+ }, [createElementVNode("button", { onClick: closeModal }, "close")])], 512)
7365
+ ], 64);
7366
+ };
7367
+ }
7368
+ });
7369
+ var ReactivateInternalTaskWorkflow_default = _sfc_main$15;
7370
+
7371
+ //#endregion
7372
+ //#region src/slices/support_ticket/staff/StaffSupportTicketMetadata.ts
7373
+ const adminSupportTicketCreateSchemaWithMetadata = withMetadata(StaffSupportTicketCreateSchema, "adminSupportTicketCreateSchema", {
7374
+ description: {
7375
+ inputType: "textarea",
7376
+ placeholder: "Enter description"
7377
+ },
7378
+ credit_value: {
7379
+ inputType: "currency",
7380
+ step: .01,
7381
+ placeholder: "Enter credit value"
7382
+ },
7383
+ start_at: {
7384
+ inputType: "date",
7385
+ placeholder: "Enter date"
7386
+ },
7387
+ target_at: {
7388
+ inputType: "date",
7389
+ placeholder: "Enter date"
7390
+ },
7391
+ completed_at: {
7392
+ inputType: "date",
7393
+ placeholder: "Enter date"
7394
+ },
7395
+ priority: {
7396
+ inputType: "select",
7397
+ valueToLabel: SUPPORT_TICKET_PRIORITY_NUMBER_TO_LABEL,
7398
+ valueType: "number"
7399
+ },
7400
+ assigned_to: {
7401
+ label: "Assignee",
7402
+ inputType: "select",
7403
+ placeholder: "Auto-assign (round-robin)"
7404
+ }
7405
+ });
7406
+ const adminSupportTicketUpdateSchemaWithMetadata = withMetadata(StaffSupportTicketUpdateSchema, "adminSupportTicketUpdateSchema", {
7407
+ description: {
7408
+ inputType: "textarea",
7409
+ placeholder: "Enter description"
7410
+ },
7411
+ credit_value: {
7412
+ inputType: "currency",
7413
+ step: .01,
7414
+ placeholder: "Enter credit value"
7415
+ },
7416
+ start_at: {
7417
+ inputType: "date",
7418
+ placeholder: "Enter date"
7419
+ },
7420
+ target_at: {
7421
+ inputType: "date",
7422
+ placeholder: "Enter date"
7423
+ },
7424
+ completed_at: {
7425
+ inputType: "date",
7426
+ placeholder: "Enter date"
7427
+ },
7428
+ priority: {
7429
+ inputType: "select",
7430
+ valueToLabel: SUPPORT_TICKET_PRIORITY_NUMBER_TO_LABEL,
7431
+ valueType: "number"
7432
+ }
7433
+ });
7434
+
7435
+ //#endregion
7436
+ //#region src/slices/support_ticket/staff/StaffCreateSupportTicketForm.vue
7437
+ const _hoisted_1$12 = {
7438
+ key: 0,
7439
+ class: "flex flex-col items-center justify-center p-8"
7440
+ };
7441
+ const _hoisted_2$11 = {
7442
+ key: 1,
7443
+ class: "flex flex-col items-center justify-center p-8"
7444
+ };
7445
+ const _hoisted_3$9 = { class: "mt-4 text-lg" };
7446
+ const _hoisted_4$8 = { class: "mt-6" };
7447
+ const _hoisted_5$4 = {
7448
+ key: 1,
7449
+ class: "alert alert-error mb-4"
7450
+ };
7451
+ const _hoisted_6$3 = { class: "flex justify-center mt-6" };
7452
+ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
7453
+ __name: "StaffCreateSupportTicketForm",
7454
+ setup(__props) {
7455
+ const router = useRouter();
7456
+ const attachmentsRef = ref(null);
7457
+ const loadAssigneeOptions = async () => {
7458
+ try {
7459
+ return { triageUsers: [{
7460
+ value: "",
7461
+ label: "Auto-assign (round-robin)"
7462
+ }, ...(await executeWithAuth((api) => api.users.getTriageUsers(), { refreshTokenHandler: getRefreshTokenHandler() }) ?? []).map((u) => ({
7463
+ value: u.id,
7464
+ label: u.email
7465
+ }))] };
7466
+ } catch (error) {
7467
+ console.error("Error fetching triage users", error);
7468
+ return { triageUsers: [{
7469
+ value: "",
7470
+ label: "Auto-assign (round-robin)"
7471
+ }] };
7472
+ }
7473
+ };
7474
+ const { form, zinia, ZiniaForm, ZiniaSubmitButton, ZiniaResetButton, ZiniaFormErrorsSummary, clearSavedFormState } = useForm(adminSupportTicketCreateSchemaWithMetadata, {
7475
+ storeName: `create-admin-support-ticket`,
7476
+ persistToLocalStorage: true,
7477
+ renderStyle: "daisy_ui",
7478
+ dataLoaders: { enriched: loadAssigneeOptions },
7479
+ fetchData: async () => {
7480
+ return {
7481
+ title: "",
7482
+ type: "IMPROVEMENT",
7483
+ priority: SUPPORT_TICKET_PRIORITY_TO_NUMBER.MEDIUM,
7484
+ is_internal: false,
7485
+ assigned_to: null
7486
+ };
7487
+ }
7488
+ });
7489
+ const { mutate: createSupportTicket } = useMutation((api, input) => api.supportTickets.staffCreateTicket(input), { invalidate: /^support-tickets?:/ });
7490
+ const beforeValidate = () => {
7491
+ if (form.values.is_internal) {
7492
+ form.values.credit_value = null;
7493
+ if (!form.values.dev_lifecycle || ![
7494
+ "BACKLOG",
7495
+ "CODE_REVIEW",
7496
+ "DEVELOPMENT",
7497
+ "PLANNING",
7498
+ "PO_APPROVAL",
7499
+ "STAGING",
7500
+ "TESTING",
7501
+ "VERIFICATION"
7502
+ ].includes(form.values.dev_lifecycle)) form.values.dev_lifecycle = "BACKLOG";
7503
+ }
7504
+ return true;
7505
+ };
7506
+ const handleSubmit = async (formData) => {
7507
+ const createdSupportTicket = await createSupportTicket(formData);
7508
+ if (!createdSupportTicket) throw new Error("Failed to create support ticket");
7509
+ return createdSupportTicket;
7510
+ };
7511
+ const handleFilesQueued = (_files) => {};
7512
+ const handleSuccess = async (createdSupportTicket) => {
7513
+ if (attachmentsRef.value) try {
7514
+ await attachmentsRef.value.uploadQueuedFiles(createdSupportTicket.id);
7515
+ } catch (error) {
7516
+ console.error("Failed to upload attachments:", error);
7517
+ toast.warning("Ticket created, but some attachments failed to upload. You can add them later.");
7518
+ }
7519
+ clearSavedFormState();
7520
+ await router.push({ name: staffSupportPaths.staff_create_success.name });
7521
+ toast.success(`Support Ticket "${createdSupportTicket.title}" created successfully!`);
7522
+ };
7523
+ const handleError = (error) => {
7524
+ form.setSubmitError(error instanceof Error ? error.message : "An unknown error occurred");
7722
7525
  };
7723
7526
  return (_ctx, _cache) => {
7724
- return openBlock(), createElementBlock(Fragment, null, [
7725
- createCommentVNode(" Cancel Internal Task Section (INTERNAL only, not CANCELLED) "),
7726
- props.support_ticket.approval_status === "INTERNAL" && props.support_ticket.dev_lifecycle !== "CANCELLED" ? (openBlock(), createBlock(ZiniaContainer_default, { key: 0 }, {
7727
- default: withCtx(() => [
7728
- _cache[1] || (_cache[1] = createElementVNode("h3", { class: "card-title text-base sm:text-lg" }, "Cancel Internal Task", -1)),
7729
- _cache[2] || (_cache[2] = createElementVNode("div", { class: "alert alert-warning py-2" }, [createElementVNode("div", { class: "flex flex-col gap-2" }, [createElementVNode("span", { class: "font-semibold text-sm" }, "What happens when you cancel:"), createElementVNode("ul", { class: "text-xs sm:text-sm space-y-1 ml-4 list-disc" }, [
7730
- createElementVNode("li", null, "Sets dev lifecycle to CANCELLED"),
7731
- createElementVNode("li", null, "Records completion timestamp"),
7732
- createElementVNode("li", null, "Task is marked as terminal state"),
7733
- createElementVNode("li", null, "No credit impact (internal tasks have no credits)")
7734
- ])])], -1)),
7735
- createElementVNode("div", _hoisted_1$11, [createElementVNode("button", {
7736
- class: "btn btn-error w-full sm:w-auto",
7737
- onClick: withModifiers(showCancelModal, ["prevent"]),
7738
- disabled: unref(isCancelling)
7739
- }, [unref(isCancelling) ? (openBlock(), createElementBlock("span", _hoisted_3$8)) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(unref(isCancelling) ? "Cancelling..." : "Cancel Internal Task"), 1)], 8, _hoisted_2$10)]),
7740
- error.value ? (openBlock(), createElementBlock("div", _hoisted_4$8, [createElementVNode("span", _hoisted_5$4, toDisplayString(error.value), 1)])) : createCommentVNode("v-if", true)
7741
- ]),
7742
- _: 1
7743
- })) : createCommentVNode("v-if", true),
7744
- createCommentVNode(" Confirmation Modal "),
7745
- createElementVNode("dialog", {
7746
- ref_key: "confirmModal",
7747
- ref: confirmModal,
7748
- class: "modal"
7749
- }, [createElementVNode("div", _hoisted_6$4, [
7750
- createElementVNode("h3", _hoisted_7$4, toDisplayString(modalTitle.value), 1),
7751
- createElementVNode("p", _hoisted_8$4, toDisplayString(modalMessage.value), 1),
7752
- createElementVNode("div", _hoisted_9$4, [createElementVNode("button", {
7753
- class: "btn btn-ghost",
7754
- onClick: closeModal
7755
- }, "Cancel"), createElementVNode("button", {
7756
- class: "btn btn-error",
7757
- onClick: _cache[0] || (_cache[0] = () => modalCallback.value?.())
7758
- }, toDisplayString(modalButtonText.value), 1)])
7759
- ]), createElementVNode("form", {
7760
- method: "dialog",
7761
- class: "modal-backdrop"
7762
- }, [createElementVNode("button", { onClick: closeModal }, "close")])], 512)
7763
- ], 64);
7527
+ return unref(form).isLoading ? (openBlock(), createElementBlock("div", _hoisted_1$12, [..._cache[0] || (_cache[0] = [createElementVNode("div", { class: "loading loading-spinner loading-lg" }, null, -1), createElementVNode("p", { class: "mt-4 text-lg" }, "Loading...", -1)])])) : unref(form).loadError ? (openBlock(), createElementBlock("div", _hoisted_2$11, [createElementVNode("p", _hoisted_3$9, toDisplayString(unref(form).loadError), 1)])) : (openBlock(), createBlock(unref(ZiniaForm), {
7528
+ key: 2,
7529
+ onBeforeValidate: beforeValidate,
7530
+ onHandleSubmit: handleSubmit,
7531
+ onSuccess: handleSuccess,
7532
+ onError: handleError,
7533
+ title: "Create Support Ticket",
7534
+ subtitle: "Create new ticket or internal task"
7535
+ }, {
7536
+ default: withCtx(() => [
7537
+ createCommentVNode(" Basic Information "),
7538
+ createVNode(FieldsetSection_default, { title: "Support Ticket Details" }, {
7539
+ default: withCtx(() => [
7540
+ createVNode(unref(zinia).TitleField, { placeholder: "Enter ticket title" }),
7541
+ createVNode(unref(zinia).TypeField),
7542
+ createVNode(unref(zinia).PriorityField)
7543
+ ]),
7544
+ _: 1
7545
+ }),
7546
+ createVNode(FieldsetSection_default, { title: "Description" }, {
7547
+ default: withCtx(() => [createVNode(unref(zinia).DescriptionField, {
7548
+ class: "w-full",
7549
+ placeholder: "Describe the ticket in detail"
7550
+ })]),
7551
+ _: 1
7552
+ }),
7553
+ createCommentVNode(" Attachments (Jira-style inline) - Files will be uploaded after ticket creation "),
7554
+ createElementVNode("div", _hoisted_4$8, [createVNode(InlineAttachments_default, {
7555
+ "can-upload": true,
7556
+ "can-delete": false,
7557
+ onFilesQueued: handleFilesQueued,
7558
+ ref_key: "attachmentsRef",
7559
+ ref: attachmentsRef
7560
+ }, null, 512)]),
7561
+ createCommentVNode(" Staff Options "),
7562
+ createVNode(FieldsetSection_default, { title: "Staff Options" }, {
7563
+ default: withCtx(() => [
7564
+ createVNode(unref(zinia).IsInternalField, { label: "Internal Staff Task" }),
7565
+ createVNode(unref(zinia).AssignedToField, { "select-options": unref(form).extraData.enriched?.triageUsers || [] }, null, 8, ["select-options"]),
7566
+ createCommentVNode(" Show devLifecycle only for internal tasks "),
7567
+ unref(form).values.is_internal ? (openBlock(), createBlock(unref(zinia).DevLifecycleField, { key: 0 })) : createCommentVNode("v-if", true)
7568
+ ]),
7569
+ _: 1
7570
+ }),
7571
+ createCommentVNode(" Credits (only for customer support ticket) "),
7572
+ !unref(form).values.is_internal ? (openBlock(), createBlock(FieldsetSection_default, {
7573
+ key: 0,
7574
+ title: "Credits (Optional)"
7575
+ }, {
7576
+ default: withCtx(() => [createVNode(unref(zinia).CreditValueField, { placeholder: "0.00" })]),
7577
+ _: 1
7578
+ })) : createCommentVNode("v-if", true),
7579
+ createCommentVNode(" Timeline (Optional) "),
7580
+ createVNode(FieldsetSection_default, { title: "Timeline (Optional)" }, {
7581
+ default: withCtx(() => [createVNode(unref(zinia).StartAtField, { formatter: unref(formatToISODate) }, null, 8, ["formatter"]), createVNode(unref(zinia).TargetAtField, { formatter: unref(formatToISODate) }, null, 8, ["formatter"])]),
7582
+ _: 1
7583
+ }),
7584
+ createCommentVNode(" Form Status Messages "),
7585
+ unref(form).submitError ? (openBlock(), createElementBlock("div", _hoisted_5$4, [_cache[1] || (_cache[1] = createElementVNode("svg", {
7586
+ xmlns: "http://www.w3.org/2000/svg",
7587
+ class: "stroke-current shrink-0 h-6 w-6",
7588
+ fill: "none",
7589
+ viewBox: "0 0 24 24"
7590
+ }, [createElementVNode("path", {
7591
+ "stroke-linecap": "round",
7592
+ "stroke-linejoin": "round",
7593
+ "stroke-width": "2",
7594
+ d: "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
7595
+ })], -1)), createElementVNode("span", null, toDisplayString(unref(form).submitError), 1)])) : createCommentVNode("v-if", true),
7596
+ createCommentVNode(" Submit Button "),
7597
+ createElementVNode("div", _hoisted_6$3, [createVNode(unref(ZiniaSubmitButton), {
7598
+ submitText: "Create Support Ticket",
7599
+ submittingText: "Creating Support Ticket..."
7600
+ })]),
7601
+ createVNode(unref(ZiniaFormErrorsSummary), { title: "Please fix the following errors:" }),
7602
+ createVNode(unref(ZiniaResetButton))
7603
+ ]),
7604
+ _: 1
7605
+ }));
7764
7606
  };
7765
7607
  }
7766
7608
  });
7767
- var CancelInternalTaskWorkflow_default = _sfc_main$13;
7609
+ var StaffCreateSupportTicketForm_default = _sfc_main$14;
7768
7610
 
7769
7611
  //#endregion
7770
- //#region src/slices/support_ticket/staff/components/ReactivateInternalTaskWorkflow.vue
7771
- const _hoisted_1$10 = { class: "alert alert-info py-2" };
7772
- const _hoisted_2$9 = { class: "flex flex-col gap-2" };
7773
- const _hoisted_3$7 = { class: "text-xs sm:text-sm space-y-1 ml-4 list-disc" };
7774
- const _hoisted_4$7 = { key: 0 };
7775
- const _hoisted_5$3 = { key: 1 };
7776
- const _hoisted_6$3 = { class: "flex justify-end mt-4" };
7777
- const _hoisted_7$3 = ["disabled"];
7778
- const _hoisted_8$3 = {
7779
- key: 0,
7780
- class: "loading loading-spinner loading-sm mr-2"
7781
- };
7782
- const _hoisted_9$3 = {
7783
- key: 0,
7784
- class: "alert alert-error mt-2 py-2"
7785
- };
7786
- const _hoisted_10$3 = { class: "text-sm" };
7787
- const _hoisted_11$2 = { class: "modal-box" };
7788
- const _hoisted_12$1 = { class: "font-bold text-lg" };
7789
- const _hoisted_13 = { class: "py-4 whitespace-pre-line" };
7790
- const _hoisted_14 = { class: "modal-action" };
7791
- const _sfc_main$12 = /* @__PURE__ */ defineComponent({
7792
- __name: "ReactivateInternalTaskWorkflow",
7793
- props: { support_ticket: {} },
7794
- emits: ["update"],
7795
- setup(__props, { emit: __emit }) {
7796
- const props = __props;
7797
- const emit = __emit;
7798
- const error = ref(null);
7799
- const confirmModal = ref(null);
7800
- const modalTitle = ref("");
7801
- const modalMessage = ref("");
7802
- const modalButtonText = ref("");
7803
- const modalCallback = ref(null);
7804
- const { mutate: reactivateInternalTask, loading: isReactivating } = useMutation((api, input) => api.supportTickets.reactivateInternalTask(input), { invalidate: /^support-tickets?:/ });
7805
- const showReactivateModal = () => {
7806
- const isCancelled = props.support_ticket.dev_lifecycle === "CANCELLED";
7807
- const targetState = isCancelled ? "BACKLOG" : "PO_APPROVAL";
7808
- modalTitle.value = `Reopen ${isCancelled ? "Cancelled" : "Deployed"} Task?`;
7809
- modalMessage.value = `This will:\n\n• Set dev lifecycle to ${targetState}\n• Clear completion timestamp\n• Resume task as active\n\n` + (isCancelled ? `Task will restart from backlog for fresh planning.` : `Task will go to PO approval stage for review/fixes.`);
7810
- modalButtonText.value = "Reopen Task";
7811
- modalCallback.value = handleReactivate;
7812
- confirmModal.value?.showModal();
7813
- };
7814
- const handleReactivate = async () => {
7815
- error.value = null;
7612
+ //#region src/slices/support_ticket/staff/StaffSupportTicketRowSchema.ts
7613
+ /**
7614
+ * Reuse the existing StaffSupportTicketReadSchema from the validation library
7615
+ * for the data table rows - don't recreate it!
7616
+ */
7617
+ const adminSupportTicketRowSchemaWithMetadata = withMetadata(StaffSupportTicketReadSchema, "adminSupportTicketRow", {});
7618
+
7619
+ //#endregion
7620
+ //#region src/slices/support_ticket/staff/StaffSupportTicketList.vue
7621
+ const _hoisted_1$11 = { class: "flex flex-col sm:flex-row sm:justify-between sm:items-center gap-4 mb-4" };
7622
+ const _hoisted_2$10 = { class: "flex items-center gap-2" };
7623
+ const _hoisted_3$8 = { class: "flex flex-col sm:flex-row gap-2" };
7624
+ const _hoisted_4$7 = [
7625
+ "value",
7626
+ "disabled",
7627
+ "onChange"
7628
+ ];
7629
+ const _hoisted_5$3 = ["value"];
7630
+ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
7631
+ __name: "StaffSupportTicketList",
7632
+ setup(__props) {
7633
+ const route = useRoute();
7634
+ const router = useRouter();
7635
+ const savedFilters = useSavedFilters({
7636
+ context: "support_ticket_staff",
7637
+ routePath: "/staff/support",
7638
+ getFiltersFromTable: () => extractFiltersFromQuery(route.query),
7639
+ applyFiltersToTable: (filters) => {
7640
+ router.push({ query: buildQueryWithFilters(route.query, filters) });
7641
+ }
7642
+ });
7643
+ const hasSupportFilters = computed(() => {
7644
+ const filters = extractFiltersFromQuery(route.query);
7645
+ return Object.keys(filters).length > 0;
7646
+ });
7647
+ const currentPaginationToken = ref();
7648
+ const devLifecycleUpdateOptions = SUPPORT_TICKET_DEV_LIFECYCLE_FILTER_OPTIONS.filter((opt) => SupportTicketDevLifecycleUpdateEnum.includes(opt.value));
7649
+ const updatingDevLifecycleId = ref(null);
7650
+ const { mutate: updateTicket } = useMutation((api, input) => api.supportTickets.staffUpdateTicket(input), { invalidate: /^support-tickets?:/ });
7651
+ function canEditDevLifecycle(row) {
7652
+ if (!row.approval_status) return false;
7653
+ if (!["APPROVED", "INTERNAL"].includes(row.approval_status)) return false;
7654
+ const dl = row.dev_lifecycle;
7655
+ if (dl === "DEPLOYED" || dl === "CANCELLED") return false;
7656
+ return true;
7657
+ }
7658
+ const cursorTable = useCursorDataTable(adminSupportTicketRowSchemaWithMetadata, {
7659
+ fetchData: async ({ cursor, pageSize, sort, filters, search }) => {
7660
+ const variables = {
7661
+ first: pageSize,
7662
+ sortBy: sort?.field ? sort.field : "updated_at",
7663
+ sortDirection: sort?.direction === "asc" ? "asc" : "desc",
7664
+ ...cursor ? { after: cursor } : {},
7665
+ ...currentPaginationToken.value ? { paginationToken: currentPaginationToken.value } : {},
7666
+ ...search ? { search: typeof search === "string" ? {
7667
+ query: search,
7668
+ searchableFields: [
7669
+ "display_id",
7670
+ "title",
7671
+ "description"
7672
+ ]
7673
+ } : search } : {},
7674
+ ...filters
7675
+ };
7676
+ if (!filters || !filters.dev_lifecycle) variables.dev_lifecycle = {
7677
+ operator: OPERATORS.IS_NOT_ONE_OF,
7678
+ values: ["DEPLOYED", "CANCELLED"]
7679
+ };
7680
+ const result = await executeWithAuth(async (api) => {
7681
+ return await api.supportTickets.staffListTickets(variables ?? {});
7682
+ }, { refreshTokenHandler: getRefreshTokenHandler() });
7683
+ currentPaginationToken.value = result?.pageInfo?.paginationToken;
7684
+ return {
7685
+ data: result.items || [],
7686
+ hasNextPage: result.pageInfo?.hasNextPage ?? false,
7687
+ hasPreviousPage: result.pageInfo?.hasPreviousPage ?? false,
7688
+ prevPageCursor: result.pageInfo?.prevPageCursor ?? void 0,
7689
+ nextPageCursor: result.pageInfo?.nextPageCursor ?? void 0
7690
+ };
7691
+ },
7692
+ columns: {
7693
+ display_id: {
7694
+ label: "Ticket ID",
7695
+ field: "display_id",
7696
+ sortable: true
7697
+ },
7698
+ title: {
7699
+ label: "Title",
7700
+ field: "title",
7701
+ sortable: true
7702
+ },
7703
+ type: {
7704
+ label: "Type",
7705
+ field: "type",
7706
+ sortable: true,
7707
+ filterable: true,
7708
+ filterType: "select",
7709
+ filterOptions: [...SUPPORT_TICKET_TYPE_FILTER_OPTIONS]
7710
+ },
7711
+ priority: {
7712
+ label: "Priority",
7713
+ field: "priority",
7714
+ sortable: true,
7715
+ filterable: true,
7716
+ filterType: "select",
7717
+ filterOptions: [...SUPPORT_TICKET_PRIORITY_FILTER_OPTIONS]
7718
+ },
7719
+ approval_status: {
7720
+ label: "Approval",
7721
+ field: "approval_status",
7722
+ sortable: true,
7723
+ filterable: true,
7724
+ filterType: "select",
7725
+ filterOptions: [...SUPPORT_TICKET_APPROVAL_FILTER_OPTIONS]
7726
+ },
7727
+ dev_lifecycle: {
7728
+ label: "Dev Stage",
7729
+ field: "dev_lifecycle",
7730
+ sortable: true,
7731
+ filterable: true,
7732
+ filterType: "select",
7733
+ filterOptions: [...SUPPORT_TICKET_DEV_LIFECYCLE_FILTER_OPTIONS]
7734
+ },
7735
+ credit_value: {
7736
+ label: "Credits",
7737
+ field: "credit_value",
7738
+ sortable: false
7739
+ },
7740
+ target_at: {
7741
+ label: "Delivery Est.",
7742
+ field: "target_at",
7743
+ sortable: true
7744
+ },
7745
+ updated_at: {
7746
+ label: "Last Updated",
7747
+ field: "updated_at",
7748
+ sortable: true
7749
+ },
7750
+ created_by: {
7751
+ label: "Requester",
7752
+ field: "created_by",
7753
+ sortable: false,
7754
+ filterable: true,
7755
+ filterType: "select",
7756
+ filterOptionsLoader: async () => {
7757
+ return (await executeWithAuth((api) => api.supportTickets.staffGetRequestorsForActiveTickets(), { refreshTokenHandler: getRefreshTokenHandler() }) || []).map((u) => ({
7758
+ value: u.id,
7759
+ label: u.email
7760
+ }));
7761
+ }
7762
+ }
7763
+ },
7764
+ actions: { items: [{
7765
+ key: "manage",
7766
+ icon: ActionIcons.edit,
7767
+ size: "xs",
7768
+ variant: "primary",
7769
+ type: "link",
7770
+ href: (row) => `/staff/support/${row.id}`
7771
+ }] },
7772
+ search: { searchableFields: ["title"] },
7773
+ pagination: { pageSize: 25 },
7774
+ autoLoad: false
7775
+ });
7776
+ const { ZiniaDataTable, refresh } = cursorTable;
7777
+ async function handleDevLifecycleChange(row, newDevLifecycle) {
7778
+ if (!SupportTicketDevLifecycleUpdateEnum.includes(newDevLifecycle)) return;
7779
+ updatingDevLifecycleId.value = row.id;
7816
7780
  try {
7817
- const result = await reactivateInternalTask({ id: props.support_ticket.id });
7818
- toast.success("✅ Internal task reopened successfully");
7819
- closeModal();
7820
- emit("update", result);
7821
- } catch (err) {
7822
- error.value = err instanceof Error ? err.message : "Failed to reactivate task";
7823
- toast.error(`❌ ${error.value}`);
7781
+ const priority = typeof row.priority === "number" ? row.priority : supportTicketPriorityToNumber(row.priority);
7782
+ await updateTicket({
7783
+ id: row.id,
7784
+ title: row.title,
7785
+ type: row.type,
7786
+ priority,
7787
+ dev_lifecycle: newDevLifecycle
7788
+ });
7789
+ await refresh();
7790
+ } catch {
7791
+ await refresh();
7792
+ } finally {
7793
+ updatingDevLifecycleId.value = null;
7824
7794
  }
7825
- };
7826
- const closeModal = () => {
7827
- confirmModal.value?.close();
7828
- };
7795
+ }
7796
+ useDataTableUrlSync(cursorTable.table, router);
7797
+ const previousFilters = ref({});
7798
+ onMounted(() => {
7799
+ previousFilters.value = extractFiltersFromQuery(route.query);
7800
+ });
7801
+ watch(() => route.query, (query) => {
7802
+ const filters = extractFiltersFromQuery(query);
7803
+ const hadPrevious = Object.keys(previousFilters.value).length > 0;
7804
+ if (!(Object.keys(filters).length > 0) && hadPrevious) savedFilters.clearLastUsed();
7805
+ previousFilters.value = filters;
7806
+ });
7829
7807
  return (_ctx, _cache) => {
7830
- return openBlock(), createElementBlock(Fragment, null, [
7831
- createCommentVNode(" Reactivate Terminal Internal Task Section (INTERNAL + CANCELLED or DEPLOYED) "),
7832
- props.support_ticket.approval_status === "INTERNAL" && (props.support_ticket.dev_lifecycle === "CANCELLED" || props.support_ticket.dev_lifecycle === "DEPLOYED") ? (openBlock(), createBlock(ZiniaContainer_default, { key: 0 }, {
7833
- default: withCtx(() => [
7834
- _cache[5] || (_cache[5] = createElementVNode("h3", { class: "card-title text-base sm:text-lg" }, "Reopen Internal Task", -1)),
7835
- createElementVNode("div", _hoisted_1$10, [createElementVNode("div", _hoisted_2$9, [_cache[4] || (_cache[4] = createElementVNode("span", { class: "font-semibold text-sm" }, "What happens when you reopen:", -1)), createElementVNode("ul", _hoisted_3$7, [
7836
- props.support_ticket.dev_lifecycle === "CANCELLED" ? (openBlock(), createElementBlock("li", _hoisted_4$7, " Sets dev lifecycle to BACKLOG (fresh start) ")) : (openBlock(), createElementBlock("li", _hoisted_5$3, "Sets dev lifecycle to PO_APPROVAL (ready for review/fixes)")),
7837
- _cache[1] || (_cache[1] = createElementVNode("li", null, "Clears completion timestamp", -1)),
7838
- _cache[2] || (_cache[2] = createElementVNode("li", null, "Task becomes active again", -1)),
7839
- _cache[3] || (_cache[3] = createElementVNode("li", null, "You can resume work or make additional changes", -1))
7840
- ])])]),
7841
- createElementVNode("div", _hoisted_6$3, [createElementVNode("button", {
7842
- class: "btn btn-success w-full sm:w-auto",
7843
- onClick: withModifiers(showReactivateModal, ["prevent"]),
7844
- disabled: unref(isReactivating)
7845
- }, [unref(isReactivating) ? (openBlock(), createElementBlock("span", _hoisted_8$3)) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(unref(isReactivating) ? "Reopening..." : "Reopen Task"), 1)], 8, _hoisted_7$3)]),
7846
- error.value ? (openBlock(), createElementBlock("div", _hoisted_9$3, [createElementVNode("span", _hoisted_10$3, toDisplayString(error.value), 1)])) : createCommentVNode("v-if", true)
7847
- ]),
7808
+ const _component_router_link = resolveComponent("router-link");
7809
+ return openBlock(), createElementBlock("div", null, [createElementVNode("div", _hoisted_1$11, [createElementVNode("div", _hoisted_2$10, [createVNode(unref(SavedFilterPresets_default), {
7810
+ presets: unref(savedFilters).presets.value,
7811
+ "presets-loading": unref(savedFilters).presetsLoading.value,
7812
+ creating: unref(savedFilters).creating.value,
7813
+ deleting: unref(savedFilters).deleting.value,
7814
+ renaming: unref(savedFilters).updating.value,
7815
+ "has-filters": hasSupportFilters.value,
7816
+ "active-preset": unref(savedFilters).activePreset.value,
7817
+ "apply-preset": unref(savedFilters).applyPreset,
7818
+ "clear-preset": unref(savedFilters).clearPreset,
7819
+ "save-current-filters": unref(savedFilters).saveCurrentFilters,
7820
+ "rename-preset": unref(savedFilters).renamePreset,
7821
+ "remove-preset": unref(savedFilters).removePreset
7822
+ }, null, 8, [
7823
+ "presets",
7824
+ "presets-loading",
7825
+ "creating",
7826
+ "deleting",
7827
+ "renaming",
7828
+ "has-filters",
7829
+ "active-preset",
7830
+ "apply-preset",
7831
+ "clear-preset",
7832
+ "save-current-filters",
7833
+ "rename-preset",
7834
+ "remove-preset"
7835
+ ]), _cache[0] || (_cache[0] = createElementVNode("h1", { class: "text-xl sm:text-2xl font-bold" }, "Manage Support Tickets", -1))]), createElementVNode("div", _hoisted_3$8, [createVNode(_component_router_link, {
7836
+ to: { name: "CustomerSupportTicketList" },
7837
+ class: "btn btn-outline btn-sm sm:btn-md"
7838
+ }, {
7839
+ default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode(" Customer View ", -1)])]),
7840
+ _: 1
7841
+ }), createVNode(_component_router_link, {
7842
+ to: { name: unref(staffSupportPaths).staff_create.name },
7843
+ class: "btn btn-primary btn-sm sm:btn-md"
7844
+ }, {
7845
+ default: withCtx(() => [..._cache[2] || (_cache[2] = [createTextVNode(" Create ", -1)])]),
7846
+ _: 1
7847
+ }, 8, ["to"])])]), createVNode(unref(ZiniaDataTable), null, {
7848
+ "cell-displayId": withCtx(({ row }) => [createTextVNode(toDisplayString(unref(formatTicketDisplayId)(row.display_id, row.display_id_prefix, row.id)), 1)]),
7849
+ "cell-type": withCtx(({ row }) => [createVNode(SupportTicketTypeBadge_default, {
7850
+ type: row.type,
7851
+ size: "sm"
7852
+ }, null, 8, ["type"])]),
7853
+ "cell-priority": withCtx(({ row }) => [createVNode(SupportTicketPriorityBadge_default, {
7854
+ priority: row.priority,
7855
+ size: "sm"
7856
+ }, null, 8, ["priority"])]),
7857
+ "cell-approval_status": withCtx(({ row }) => [createVNode(SupportTicketApprovalBadge_default, {
7858
+ approvalStatus: row.approval_status,
7859
+ size: "sm"
7860
+ }, null, 8, ["approvalStatus"])]),
7861
+ "cell-dev_lifecycle": withCtx(({ row }) => [canEditDevLifecycle(row) ? (openBlock(), createElementBlock("select", {
7862
+ key: 0,
7863
+ value: row.dev_lifecycle,
7864
+ class: "select select-sm select-bordered min-w-[7rem]",
7865
+ disabled: updatingDevLifecycleId.value === row.id,
7866
+ onChange: ($event) => handleDevLifecycleChange(row, $event.target.value)
7867
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(devLifecycleUpdateOptions), (opt) => {
7868
+ return openBlock(), createElementBlock("option", {
7869
+ key: opt.value,
7870
+ value: opt.value
7871
+ }, toDisplayString(opt.label), 9, _hoisted_5$3);
7872
+ }), 128))], 40, _hoisted_4$7)) : (openBlock(), createBlock(SupportTicketDevLifecycleBadge_default, {
7873
+ key: 1,
7874
+ devLifecycle: row.dev_lifecycle || "PENDING",
7875
+ size: "sm"
7876
+ }, null, 8, ["devLifecycle"]))]),
7877
+ "cell-credit_value": withCtx(({ row }) => [createTextVNode(toDisplayString(unref(formatStaffCreditValue)(row.credit_value, row.approval_status)), 1)]),
7878
+ "cell-created_by": withCtx(({ row }) => [createTextVNode(toDisplayString(row.created_by_display_name), 1)]),
7879
+ "cell-target_at": withCtx(({ row }) => [createTextVNode(toDisplayString(unref(formatUserDate)(row.target_at) || "TBD"), 1)]),
7880
+ "cell-updated_at": withCtx(({ row }) => [createTextVNode(toDisplayString(unref(formatSystemTimestamp)(row.updated_at)), 1)]),
7881
+ "cell-actions": withCtx(({ row }) => [createVNode(_component_router_link, {
7882
+ to: {
7883
+ name: "AdminEditSupportTicket",
7884
+ params: { id: row.id }
7885
+ },
7886
+ class: "btn btn-sm btn-primary"
7887
+ }, {
7888
+ default: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode(" Manage ", -1)])]),
7848
7889
  _: 1
7849
- })) : createCommentVNode("v-if", true),
7850
- createCommentVNode(" Confirmation Modal "),
7851
- createElementVNode("dialog", {
7852
- ref_key: "confirmModal",
7853
- ref: confirmModal,
7854
- class: "modal"
7855
- }, [createElementVNode("div", _hoisted_11$2, [
7856
- createElementVNode("h3", _hoisted_12$1, toDisplayString(modalTitle.value), 1),
7857
- createElementVNode("p", _hoisted_13, toDisplayString(modalMessage.value), 1),
7858
- createElementVNode("div", _hoisted_14, [createElementVNode("button", {
7859
- class: "btn btn-ghost",
7860
- onClick: closeModal
7861
- }, "Cancel"), createElementVNode("button", {
7862
- class: "btn btn-success",
7863
- onClick: _cache[0] || (_cache[0] = () => modalCallback.value?.())
7864
- }, toDisplayString(modalButtonText.value), 1)])
7865
- ]), createElementVNode("form", {
7866
- method: "dialog",
7867
- class: "modal-backdrop"
7868
- }, [createElementVNode("button", { onClick: closeModal }, "close")])], 512)
7869
- ], 64);
7890
+ }, 8, ["to"])]),
7891
+ _: 1
7892
+ })]);
7870
7893
  };
7871
7894
  }
7872
7895
  });
7873
- var ReactivateInternalTaskWorkflow_default = _sfc_main$12;
7896
+ var StaffSupportTicketList_default = _sfc_main$13;
7874
7897
 
7875
7898
  //#endregion
7876
- //#region src/slices/support_ticket/shared/SupportTicketAttachments.vue
7877
- const _sfc_main$11 = /* @__PURE__ */ defineComponent({
7878
- __name: "SupportTicketAttachments",
7899
+ //#region src/slices/support_ticket/staff/StaffSupportTicketSuccess.vue
7900
+ const _hoisted_1$10 = { class: "flex flex-col items-center justify-center min-h-[60vh] p-8" };
7901
+ const _hoisted_2$9 = { class: "text-center max-w-2xl" };
7902
+ const _hoisted_3$7 = { class: "flex flex-col sm:flex-row gap-4 justify-center" };
7903
+ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
7904
+ __name: "StaffSupportTicketSuccess",
7879
7905
  setup(__props) {
7880
- const supportTicketId = useRoute().params.id;
7881
- const config = { title: "Support Ticket Attachments" };
7882
7906
  return (_ctx, _cache) => {
7883
- return openBlock(), createBlock(FileManager_default, {
7884
- "record-id": unref(supportTicketId),
7885
- "record-type": "support_ticket",
7886
- config
7887
- }, null, 8, ["record-id"]);
7907
+ const _component_router_link = resolveComponent("router-link");
7908
+ return openBlock(), createElementBlock("div", _hoisted_1$10, [createElementVNode("div", _hoisted_2$9, [
7909
+ createCommentVNode(" Success Icon "),
7910
+ _cache[2] || (_cache[2] = createElementVNode("div", { class: "mb-6" }, [createElementVNode("div", { class: "inline-flex items-center justify-center w-20 h-20 bg-success rounded-full" }, [createElementVNode("svg", {
7911
+ class: "w-10 h-10 text-success-content",
7912
+ fill: "none",
7913
+ stroke: "currentColor",
7914
+ viewBox: "0 0 24 24",
7915
+ xmlns: "http://www.w3.org/2000/svg"
7916
+ }, [createElementVNode("path", {
7917
+ "stroke-linecap": "round",
7918
+ "stroke-linejoin": "round",
7919
+ "stroke-width": "2",
7920
+ d: "M5 13l4 4L19 7"
7921
+ })])])], -1)),
7922
+ createCommentVNode(" Success Message "),
7923
+ _cache[3] || (_cache[3] = createElementVNode("h1", { class: "text-3xl font-bold text-base-content mb-4" }, " Support Ticket Created Successfully! ", -1)),
7924
+ _cache[4] || (_cache[4] = createElementVNode("p", { class: "text-lg text-base-content/70 mb-8" }, " The support ticket has been created and is ready for processing. ", -1)),
7925
+ createCommentVNode(" What Happens Next "),
7926
+ _cache[5] || (_cache[5] = createStaticVNode("<div class=\"bg-base-200 rounded-lg p-6 mb-8\"><h2 class=\"text-xl font-semibold mb-4\">Next Steps</h2><div class=\"space-y-3 text-left\"><div class=\"flex items-start gap-3\"><div class=\"flex-shrink-0 w-6 h-6 bg-primary text-primary-content rounded-full flex items-center justify-center text-sm font-semibold\"> 1 </div><div><div class=\"font-medium\">Review &amp; Assign</div><div class=\"text-sm text-base-content/70\"> Review the ticket details and assign to appropriate team member </div></div></div><div class=\"flex items-start gap-3\"><div class=\"flex-shrink-0 w-6 h-6 bg-primary text-primary-content rounded-full flex items-center justify-center text-sm font-semibold\"> 2 </div><div><div class=\"font-medium\">Set Timeline</div><div class=\"text-sm text-base-content/70\"> Update target dates and delivery estimates if needed </div></div></div><div class=\"flex items-start gap-3\"><div class=\"flex-shrink-0 w-6 h-6 bg-primary text-primary-content rounded-full flex items-center justify-center text-sm font-semibold\"> 3 </div><div><div class=\"font-medium\">Begin Work</div><div class=\"text-sm text-base-content/70\"> Start development or operational work as appropriate </div></div></div></div></div>", 1)),
7927
+ createCommentVNode(" Action Buttons "),
7928
+ createElementVNode("div", _hoisted_3$7, [createVNode(_component_router_link, {
7929
+ to: { name: unref(staffSupportPaths).staff_list.name },
7930
+ class: "btn btn-primary btn-lg"
7931
+ }, {
7932
+ default: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode(" View All Support Tickets ", -1)])]),
7933
+ _: 1
7934
+ }, 8, ["to"]), createVNode(_component_router_link, {
7935
+ to: { name: unref(staffSupportPaths).staff_create.name },
7936
+ class: "btn btn-outline btn-lg"
7937
+ }, {
7938
+ default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode(" Create Another Ticket ", -1)])]),
7939
+ _: 1
7940
+ }, 8, ["to"])])
7941
+ ])]);
7888
7942
  };
7889
7943
  }
7890
7944
  });
7891
- var SupportTicketAttachments_default = _sfc_main$11;
7945
+ var StaffSupportTicketSuccess_default = _sfc_main$12;
7892
7946
 
7893
7947
  //#endregion
7894
7948
  //#region src/slices/support_ticket/shared/CreditBalanceWidget.vue
@@ -7916,7 +7970,7 @@ const _hoisted_12 = {
7916
7970
  key: 2,
7917
7971
  class: "pt-2"
7918
7972
  };
7919
- const _sfc_main$10 = /* @__PURE__ */ defineComponent({
7973
+ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
7920
7974
  __name: "CreditBalanceWidget",
7921
7975
  props: {
7922
7976
  variant: { default: "full" },
@@ -7998,7 +8052,25 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
7998
8052
  };
7999
8053
  }
8000
8054
  });
8001
- var CreditBalanceWidget_default = /* @__PURE__ */ export_helper_default(_sfc_main$10, [["__scopeId", "data-v-703dc3c5"]]);
8055
+ var CreditBalanceWidget_default = /* @__PURE__ */ export_helper_default(_sfc_main$11, [["__scopeId", "data-v-703dc3c5"]]);
8056
+
8057
+ //#endregion
8058
+ //#region src/slices/support_ticket/shared/SupportTicketAttachments.vue
8059
+ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
8060
+ __name: "SupportTicketAttachments",
8061
+ setup(__props) {
8062
+ const supportTicketId = useRoute().params.id;
8063
+ const config = { title: "Support Ticket Attachments" };
8064
+ return (_ctx, _cache) => {
8065
+ return openBlock(), createBlock(FileManager_default, {
8066
+ "record-id": unref(supportTicketId),
8067
+ "record-type": "support_ticket",
8068
+ config
8069
+ }, null, 8, ["record-id"]);
8070
+ };
8071
+ }
8072
+ });
8073
+ var SupportTicketAttachments_default = _sfc_main$10;
8002
8074
 
8003
8075
  //#endregion
8004
8076
  //#region src/slices/support_ticket/staff/staffSupportTicketFiltersMetadata.ts
@@ -8246,7 +8318,7 @@ const baseRoutes = [
8246
8318
  {
8247
8319
  path: authPaths.reset_password.path,
8248
8320
  name: authPaths.reset_password.name,
8249
- component: () => import("./ResetPassword-DAn7dYAp.js"),
8321
+ component: () => import("./ResetPassword-Q8vhelQz.js"),
8250
8322
  meta: {
8251
8323
  title: "Reset Password",
8252
8324
  description: "Reset Password page for Category 5 App"
@@ -8483,7 +8555,7 @@ const adminRoutes = [{
8483
8555
  {
8484
8556
  path: "credit-management",
8485
8557
  name: "CreditManagement",
8486
- component: () => import("./CreditManagement-0JxmCIAd.js"),
8558
+ component: () => import("./CreditManagement-Bal5mbQC.js"),
8487
8559
  meta: {
8488
8560
  title: "Credit Management",
8489
8561
  description: "Manage customer credits and allocations",
@@ -8524,7 +8596,7 @@ const creditRoutes = [{
8524
8596
  children: [{
8525
8597
  path: creditPaths.credit_balance.path,
8526
8598
  name: creditPaths.credit_balance.name,
8527
- component: () => import("./CreditBalanceDashboard-BTW4IK66.js"),
8599
+ component: () => import("./CreditBalanceDashboard-CBaQsjyo.js"),
8528
8600
  meta: {
8529
8601
  title: "Credit Balance",
8530
8602
  description: "View your current credit balance and history.",
@@ -9129,5 +9201,5 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
9129
9201
  var CreditManagement_default = _sfc_main;
9130
9202
 
9131
9203
  //#endregion
9132
- export { savedFilterRoutes as $, Sidebar_default as $t, ApproveRejectActions_default as A, staffOnly as At, CustomerCreateSupportTicketForm_default as B, SummarySection_default as Bt, CreditBalanceWidget_default as C, userRoutes as Ct, ConvertToInternalWorkflow_default as D, createSuperAdminOnlyGuard as Dt, CancelInternalTaskWorkflow_default as E, createStaffOnlyGuard as Et, adminSupportTicketUpdateSchemaWithMetadata as F, buildQueryWithFilters as Ft, SupportTicketStatusBadge_default as G, KeyValueEditor_default as Gt, customerSupportTicketUpdateSchemaWithMetadata as H, RecordVersionList_default as Ht, StaffSupportTicketList_default as I, deserializeFiltersFromQueryParams as It, customerSupportPaths as J, FieldDisplay_default as Jt, staffSupportPaths as K, FileManager_default as Kt, adminSupportTicketRowSchemaWithMetadata as L, extractFiltersFromQuery as Lt, StaffSupportTicketSuccess_default as M, userIsSuperAdmin as Mt, StaffCreateSupportTicketForm_default as N, userAlreadyLoggedIn as Nt, ConvertToCustomerWorkflow_default as O, createUserAuthorizedGuard as Ot, adminSupportTicketCreateSchemaWithMetadata as P, timezones as Pt, SaveFilterModal_default as Q, Admin_default as Qt, SupportTicketTimeline_default as R, serializeFiltersToQueryParams as Rt, adminSupportTicketFiltersSchemaWithMetadata as S, teamUpdateSchemaWithMetadata as St, ReactivateInternalTaskWorkflow_default as T, createLeadOrStaffOnlyGuard as Tt, CustomerSupportTicketList_default as U, RecordChangesSummary_default as Ut, customerSupportTicketCreateSchemaWithMetadata as V, RecordVersionViewer_default as Vt, customerSupportTicketRowSchemaWithMetadata as W, LoadingErrorStates_default as Wt, SavedFilterPresets_default as X, Default_default as Xt, customerSupportTicketRoutes as Y, InApp_default as Yt, ManagePresetsModal_default as Z, Auth_default as Zt, resetPasswordSchemaWithMetadata as _, teamPaths as _t, addCreditsSchemaWithMetadata as a, RightSidebar_default as an, TeamMemberList_default as at, useSupportTicketStatus as b, teamMemberRoutes as bt, CreditTransactionHistory_default as c, LoginButton_default as cn, CreateTeamMemberForm_default as ct, CreditBalanceOverview_default as d, AppHeader_default as dn, TeamList_default as dt, PINNED_PRESETS_KEY as en, useSavedFilters as et, creditPaths as f, AppTabNavigation_default as fn, teamRowSchemaWithMetadata as ft, ResetPassword_default as g, CreateTeamForm_default as gt, SocialLoginButtons_default as h, EditTeamForm_default as ht, AddCredits_default as i, useBuildTag as in, TeamMemberParent_default as it, CustomerCreditBalance_default as j, userAuthenticated as jt, CompleteSupportTicketForm_default as k, leadOrStaffOnly as kt, CreditTransactionTypeBadge_default as l, InputModal_default as ln, ViewTeam_default as lt, adminRoutes as m, TeamAttachmentsTab_default as mt, SetMonthlyAllocation_default as n, usePinnedPresets as nn, getLastUsedPresetRedirect as nt, setMonthlyAllocationSchemaWithMetadata as o, NotFound_default as on, teamMemberRowSchemaWithMetadata as ot, creditRoutes as p, DragoncoreVue as pn, teamFiltersSchemaWithMetadata as pt, staffSupportTicketRoutes as q, FieldGroup_default as qt, ResetMonthlyBalance_default as r, MS as rn, ViewTeamMember_default as rt, CreditBalanceDashboard_default as s, Navbar_default as sn, teamMemberFiltersSchemaWithMetadata as st, CreditManagement_default as t, useInjectedPinnedPresets as tn, createLastUsedPresetGuard as tt, creditTransactionRowSchemaWithMetadata as u, BaseModal_default as un, TeamParent_default as ut, authPaths as v, teamRoutes as vt, SupportTicketAttachments_default as w, createAuthenticatedGuard as wt, useSupportTicketPermissions as x, teamCreateSchemaWithMetadata as xt, authRoutes as y, teamMemberPaths as yt, CustomerSupportTicketSuccess_default as z, useUserLookup as zt };
9133
- //# sourceMappingURL=src-ChwBeNHB.js.map
9204
+ export { savedFilterRoutes as $, Sidebar_default as $t, adminSupportTicketUpdateSchemaWithMetadata as A, staffOnly as At, customerSupportTicketRowSchemaWithMetadata as B, SummarySection_default as Bt, SupportTicketAttachments_default as C, userRoutes as Ct, adminSupportTicketRowSchemaWithMetadata as D, createSuperAdminOnlyGuard as Dt, StaffSupportTicketList_default as E, createStaffOnlyGuard as Et, CancelInternalTaskWorkflow_default as F, buildQueryWithFilters as Ft, SupportTicketTimeline_default as G, KeyValueEditor_default as Gt, CustomerCreateSupportTicketForm_default as H, RecordVersionList_default as Ht, ApproveRejectActions_default as I, deserializeFiltersFromQueryParams as It, customerSupportPaths as J, FieldDisplay_default as Jt, staffSupportPaths as K, FileManager_default as Kt, CustomerCreditBalance_default as L, extractFiltersFromQuery as Lt, ConvertToInternalWorkflow_default as M, userIsSuperAdmin as Mt, ConvertToCustomerWorkflow_default as N, userAlreadyLoggedIn as Nt, StaffCreateSupportTicketForm_default as O, createUserAuthorizedGuard as Ot, CompleteSupportTicketForm_default as P, timezones as Pt, SaveFilterModal_default as Q, Admin_default as Qt, CustomerSupportTicketSuccess_default as R, serializeFiltersToQueryParams as Rt, adminSupportTicketFiltersSchemaWithMetadata as S, teamUpdateSchemaWithMetadata as St, StaffSupportTicketSuccess_default as T, createLeadOrStaffOnlyGuard as Tt, customerSupportTicketCreateSchemaWithMetadata as U, RecordChangesSummary_default as Ut, SupportTicketStatusBadge_default as V, RecordVersionViewer_default as Vt, customerSupportTicketUpdateSchemaWithMetadata as W, LoadingErrorStates_default as Wt, SavedFilterPresets_default as X, Default_default as Xt, customerSupportTicketRoutes as Y, InApp_default as Yt, ManagePresetsModal_default as Z, Auth_default as Zt, resetPasswordSchemaWithMetadata as _, teamPaths as _t, addCreditsSchemaWithMetadata as a, RightSidebar_default as an, TeamMemberList_default as at, useSupportTicketStatus as b, teamMemberRoutes as bt, CreditTransactionHistory_default as c, LoginButton_default as cn, CreateTeamMemberForm_default as ct, CreditBalanceOverview_default as d, AppHeader_default as dn, TeamList_default as dt, PINNED_PRESETS_KEY as en, useSavedFilters as et, creditPaths as f, AppTabNavigation_default as fn, teamRowSchemaWithMetadata as ft, ResetPassword_default as g, CreateTeamForm_default as gt, SocialLoginButtons_default as h, EditTeamForm_default as ht, AddCredits_default as i, useBuildTag as in, TeamMemberParent_default as it, ReactivateInternalTaskWorkflow_default as j, userAuthenticated as jt, adminSupportTicketCreateSchemaWithMetadata as k, leadOrStaffOnly as kt, CreditTransactionTypeBadge_default as l, InputModal_default as ln, ViewTeam_default as lt, adminRoutes as m, TeamAttachmentsTab_default as mt, SetMonthlyAllocation_default as n, usePinnedPresets as nn, getLastUsedPresetRedirect as nt, setMonthlyAllocationSchemaWithMetadata as o, NotFound_default as on, teamMemberRowSchemaWithMetadata as ot, creditRoutes as p, DragoncoreVue as pn, teamFiltersSchemaWithMetadata as pt, staffSupportTicketRoutes as q, FieldGroup_default as qt, ResetMonthlyBalance_default as r, MS as rn, ViewTeamMember_default as rt, CreditBalanceDashboard_default as s, Navbar_default as sn, teamMemberFiltersSchemaWithMetadata as st, CreditManagement_default as t, useInjectedPinnedPresets as tn, createLastUsedPresetGuard as tt, creditTransactionRowSchemaWithMetadata as u, BaseModal_default as un, TeamParent_default as ut, authPaths as v, teamRoutes as vt, CreditBalanceWidget_default as w, createAuthenticatedGuard as wt, useSupportTicketPermissions as x, teamCreateSchemaWithMetadata as xt, authRoutes as y, teamMemberPaths as yt, CustomerSupportTicketList_default as z, useUserLookup as zt };
9205
+ //# sourceMappingURL=src-wQ7pAFHx.js.map