@dragonmastery/dragoncore-vue 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -2
- package/dist/{ChangePasswordPage-Btu5lf-r.js → ChangePasswordPage-DCews8GU.js} +2 -2
- package/dist/{ChangePasswordPage-Btu5lf-r.js.map → ChangePasswordPage-DCews8GU.js.map} +1 -1
- package/dist/ChangePasswordPage-Dm5vW0nl.js +6 -0
- package/dist/CreateTeamForm-O_viMOrD.js +27 -0
- package/dist/CreateTeamMemberForm-BzwDug0x.js +27 -0
- package/dist/{CreateUserPage-Cmx8xjjv.js → CreateUserPage-B8qeBZij.js} +2 -2
- package/dist/{CreateUserPage-Cmx8xjjv.js.map → CreateUserPage-B8qeBZij.js.map} +1 -1
- package/dist/CreateUserPage-WjYDkwpb.js +6 -0
- package/dist/CreditBalanceDashboard-CBaQsjyo.js +27 -0
- package/dist/CreditManagement-Bal5mbQC.js +27 -0
- package/dist/CustomerCreateSupportTicketForm-CpnbsCqr.js +27 -0
- package/dist/CustomerSupportTicketDetailPage-DZQCplSM.js +717 -0
- package/dist/CustomerSupportTicketDetailPage-DZQCplSM.js.map +1 -0
- package/dist/CustomerSupportTicketList-CKf8Kyzu.js +27 -0
- package/dist/CustomerSupportTicketParent-BnmTFigo.js +7 -0
- package/dist/{CustomerSupportTicketParent-2mONd9kL.js → CustomerSupportTicketParent-BzY4pmBk.js} +6 -6
- package/dist/CustomerSupportTicketParent-BzY4pmBk.js.map +1 -0
- package/dist/CustomerSupportTicketSuccess-B-1n0gP-.js +27 -0
- package/dist/EditTeamForm-CKnK07nF.js +27 -0
- package/dist/EditTeamMemberForm-B8-pI6Xm.js +6 -0
- package/dist/{EditTeamMemberForm-ru4WgLz-.js → EditTeamMemberForm-CKbKomrL.js} +27 -5
- package/dist/EditTeamMemberForm-CKbKomrL.js.map +1 -0
- package/dist/EditUserPage-BG-Fkx_c.js +7 -0
- package/dist/{EditUserPage-BxJ5QvIM.js → EditUserPage-XqF25iwz.js} +4 -4
- package/dist/{EditUserPage-BxJ5QvIM.js.map → EditUserPage-XqF25iwz.js.map} +1 -1
- package/dist/ForgotPassword-CjWv2V7p.js +7 -0
- package/dist/{ForgotPassword-CqhenzUG.js → ForgotPassword-D3bjL48L.js} +2 -2
- package/dist/{ForgotPassword-CqhenzUG.js.map → ForgotPassword-D3bjL48L.js.map} +1 -1
- package/dist/LoginForm--br4Il85.js +7 -0
- package/dist/{LoginForm-_PZ51Uwe.js → LoginForm-C85U2E2r.js} +3 -3
- package/dist/{LoginForm-_PZ51Uwe.js.map → LoginForm-C85U2E2r.js.map} +1 -1
- package/dist/Logout-DHT-5Qz3.js +6 -0
- package/dist/{Logout-BMjiqHnS.js → Logout-DZuWLh0O.js} +3 -3
- package/dist/{Logout-BMjiqHnS.js.map → Logout-DZuWLh0O.js.map} +1 -1
- package/dist/ResetPassword-Q8vhelQz.js +27 -0
- package/dist/SavedFiltersPage-DhhcU1R1.js +419 -0
- package/dist/SavedFiltersPage-DhhcU1R1.js.map +1 -0
- package/dist/Signup-VZa7U-Ur.js +7 -0
- package/dist/{Signup-c2-_yMOM.js → Signup-hpV8J5cM.js} +3 -3
- package/dist/{Signup-c2-_yMOM.js.map → Signup-hpV8J5cM.js.map} +1 -1
- package/dist/StaffCreateSupportTicketForm-D5ne_W9A.js +27 -0
- package/dist/StaffSupportTicketDetailPage-DY07Ez0R.js +1928 -0
- package/dist/StaffSupportTicketDetailPage-DY07Ez0R.js.map +1 -0
- package/dist/StaffSupportTicketList-xD3FaXkS.js +27 -0
- package/dist/{StaffSupportTicketParent-Cx1buQZw.js → StaffSupportTicketParent-CWWhaM37.js} +6 -6
- package/dist/StaffSupportTicketParent-CWWhaM37.js.map +1 -0
- package/dist/StaffSupportTicketParent-Dp1G85wc.js +7 -0
- package/dist/StaffSupportTicketSuccess-D1nBsbcC.js +27 -0
- package/dist/SupportStaffPage-nd0HowtH.js +156 -0
- package/dist/SupportStaffPage-nd0HowtH.js.map +1 -0
- package/dist/SupportTicketDevLifecycleBadge-Ba-Rm6QW.js +116 -0
- package/dist/SupportTicketDevLifecycleBadge-Ba-Rm6QW.js.map +1 -0
- package/dist/SupportTicketMaintenancePage-rcJ7EfDj.js +56 -0
- package/dist/SupportTicketMaintenancePage-rcJ7EfDj.js.map +1 -0
- package/dist/TeamAttachmentsTab-DaCRkUsF.js +27 -0
- package/dist/{TeamHistoryTab-gB3H2KZv.js → TeamHistoryTab-CNelXR3Q.js} +19 -6
- package/dist/TeamHistoryTab-CNelXR3Q.js.map +1 -0
- package/dist/TeamHistoryTab-siesF93u.js +4 -0
- package/dist/TeamList-BaZfSOG4.js +27 -0
- package/dist/TeamMemberList-DOG48Y0Q.js +27 -0
- package/dist/TeamMemberParent-CTrhsG1K.js +27 -0
- package/dist/{NoteList-C0hRPNMO.js → TeamNotesTab-BhVRLG8h.js} +30 -69
- package/dist/TeamNotesTab-BhVRLG8h.js.map +1 -0
- package/dist/TeamNotesTab-Crp-afAe.js +7 -0
- package/dist/TeamParent-myjqz30R.js +27 -0
- package/dist/TimelineNoteInput-BVqF4MtZ.js +513 -0
- package/dist/TimelineNoteInput-BVqF4MtZ.js.map +1 -0
- package/dist/{InlineAttachments-I39rOvip.js → TimelineSystemEvent-D58zN850.js} +682 -136
- package/dist/TimelineSystemEvent-D58zN850.js.map +1 -0
- package/dist/UserListPage-D68AjrjM.js +4 -0
- package/dist/{UserListPage-WU56KiWj.js → UserListPage-OGYOLwlw.js} +3 -3
- package/dist/{UserListPage-WU56KiWj.js.map → UserListPage-OGYOLwlw.js.map} +1 -1
- package/dist/UserProfilePage-Q68NAGQQ.js +7 -0
- package/dist/{UserProfilePage-BtLUY1kt.js → UserProfilePage-uAIfC_NW.js} +4 -4
- package/dist/{UserProfilePage-BtLUY1kt.js.map → UserProfilePage-uAIfC_NW.js.map} +1 -1
- package/dist/ViewTeam-DRQuV1A3.js +27 -0
- package/dist/ViewTeamMember-DjbxMkB4.js +27 -0
- package/dist/{convertToLocalDateTime-D4IoNvRj.js → convertToLocalDateTime-DOSGtMn8.js} +13 -3
- package/dist/convertToLocalDateTime-DOSGtMn8.js.map +1 -0
- package/dist/{displayIdFormatter-Dz900Awr.js → displayIdFormatter-B1ZKgofu.js} +1 -1
- package/dist/{displayIdFormatter-Dz900Awr.js.map → displayIdFormatter-B1ZKgofu.js.map} +1 -1
- package/dist/extractRpcErrorMessage-C_UbKgHL.js +20 -0
- package/dist/extractRpcErrorMessage-C_UbKgHL.js.map +1 -0
- package/dist/index.d.ts +1234 -936
- package/dist/index.js +25 -40
- package/dist/{src-o5fMIo5_.js → src-wQ7pAFHx.js} +3903 -1347
- package/dist/src-wQ7pAFHx.js.map +1 -0
- package/dist/{useMutation-CFwe7H9j.js → useMutation-B4_S4Xoa.js} +3 -3
- package/dist/{useMutation-CFwe7H9j.js.map → useMutation-B4_S4Xoa.js.map} +1 -1
- package/dist/{useQuery-p7oJO7OD.js → useQuery-B7ndu5_P.js} +3 -3
- package/dist/{useQuery-p7oJO7OD.js.map → useQuery-B7ndu5_P.js.map} +1 -1
- package/dist/{useQueryCache-ByayvZgZ.js → useQueryCache-DqcDMsxb.js} +2 -2
- package/dist/{useQueryCache-ByayvZgZ.js.map → useQueryCache-DqcDMsxb.js.map} +1 -1
- package/dist/{useRpcAuth-BLlRSHy8.js → useRpcAuth-Dp2sec-X.js} +13 -4
- package/dist/useRpcAuth-Dp2sec-X.js.map +1 -0
- package/package.json +3 -3
- package/dist/ChangePasswordPage-mBBuQMkT.js +0 -6
- package/dist/CreateTeamForm-n2ut93vM.js +0 -43
- package/dist/CreateTeamMemberForm-CcH3AxNL.js +0 -43
- package/dist/CreateUserPage-CDrGuW9B.js +0 -6
- package/dist/CreditBalanceDashboard-DLz0ioP3.js +0 -43
- package/dist/CreditManagement-D3q5S-qc.js +0 -43
- package/dist/CustomerCreateSupportTicketForm-Ci7QYkG-.js +0 -43
- package/dist/CustomerEditSupportTicketForm-Dd5ZB74k.js +0 -159
- package/dist/CustomerEditSupportTicketForm-Dd5ZB74k.js.map +0 -1
- package/dist/CustomerEditSupportTicketForm-lLchVjnw.js +0 -9
- package/dist/CustomerSupportTicketAttachmentsTab-gBrVO97t.js +0 -43
- package/dist/CustomerSupportTicketCustomerNotesTab-D0jhzbOY.js +0 -8
- package/dist/CustomerSupportTicketCustomerNotesTab-D1aa9It7.js +0 -23
- package/dist/CustomerSupportTicketCustomerNotesTab-D1aa9It7.js.map +0 -1
- package/dist/CustomerSupportTicketHistoryTab-BNTf8EZq.js +0 -6
- package/dist/CustomerSupportTicketHistoryTab-CFYN_Sa4.js +0 -17
- package/dist/CustomerSupportTicketHistoryTab-CFYN_Sa4.js.map +0 -1
- package/dist/CustomerSupportTicketList-BkOzFxMP.js +0 -6
- package/dist/CustomerSupportTicketList-C2nUPawb.js +0 -166
- package/dist/CustomerSupportTicketList-C2nUPawb.js.map +0 -1
- package/dist/CustomerSupportTicketParent-2mONd9kL.js.map +0 -1
- package/dist/CustomerSupportTicketParent-N8ko1yFE.js +0 -7
- package/dist/CustomerSupportTicketSuccess-w_-9NXT4.js +0 -43
- package/dist/CustomerViewSupportTicket-CVwNH0lS.js +0 -11
- package/dist/CustomerViewSupportTicket-tZkxragu.js +0 -363
- package/dist/CustomerViewSupportTicket-tZkxragu.js.map +0 -1
- package/dist/EditTeamForm-BioqiTWE.js +0 -43
- package/dist/EditTeamMemberForm-DCq0Gsn_.js +0 -7
- package/dist/EditTeamMemberForm-ru4WgLz-.js.map +0 -1
- package/dist/EditUserPage-XOBuxUxd.js +0 -7
- package/dist/FieldsetSection-CsHN38_o.js +0 -27
- package/dist/FieldsetSection-CsHN38_o.js.map +0 -1
- package/dist/ForgotPassword-CpqvcSFg.js +0 -7
- package/dist/InlineAttachments-I39rOvip.js.map +0 -1
- package/dist/LoginForm-AM0qkfbU.js +0 -7
- package/dist/Logout-BfiBjlaH.js +0 -6
- package/dist/NoteList-C0hRPNMO.js.map +0 -1
- package/dist/NotificationEmailsPage-BjRqtW95.js +0 -141
- package/dist/NotificationEmailsPage-BjRqtW95.js.map +0 -1
- package/dist/NotificationEmailsPage-bx-9rg3x.js +0 -7
- package/dist/ResetPassword-BQLkR9TZ.js +0 -43
- package/dist/Signup-CnCcQlB8.js +0 -7
- package/dist/StaffCreateSupportTicketForm-ChVFDJdA.js +0 -43
- package/dist/StaffEditSupportTicketForm-DY1Zkf5k.js +0 -9
- package/dist/StaffEditSupportTicketForm-DuUKuIGg.js +0 -263
- package/dist/StaffEditSupportTicketForm-DuUKuIGg.js.map +0 -1
- package/dist/StaffSupportTicketAttachmentsTab-DpDXsHXP.js +0 -43
- package/dist/StaffSupportTicketCustomerNotesTab-CusqQV2-.js +0 -23
- package/dist/StaffSupportTicketCustomerNotesTab-CusqQV2-.js.map +0 -1
- package/dist/StaffSupportTicketCustomerNotesTab-rbJHJ0_V.js +0 -8
- package/dist/StaffSupportTicketHistoryTab-D24myEm3.js +0 -17
- package/dist/StaffSupportTicketHistoryTab-D24myEm3.js.map +0 -1
- package/dist/StaffSupportTicketHistoryTab-nmVma5vp.js +0 -6
- package/dist/StaffSupportTicketInternalNotesTab-D8HM--dp.js +0 -23
- package/dist/StaffSupportTicketInternalNotesTab-D8HM--dp.js.map +0 -1
- package/dist/StaffSupportTicketInternalNotesTab-DihYd5XI.js +0 -8
- package/dist/StaffSupportTicketList-DelptSmK.js +0 -43
- package/dist/StaffSupportTicketParent-BCrj3ckV.js +0 -7
- package/dist/StaffSupportTicketParent-Cx1buQZw.js.map +0 -1
- package/dist/StaffSupportTicketSuccess-BYxtY5wZ.js +0 -43
- package/dist/StaffSupportTicketWorkflowTab-BrDDBeK9.js +0 -9
- package/dist/StaffSupportTicketWorkflowTab-DmVTPzxS.js +0 -1234
- package/dist/StaffSupportTicketWorkflowTab-DmVTPzxS.js.map +0 -1
- package/dist/SupportTicketHistoryTab-CLMopA7a.js +0 -220
- package/dist/SupportTicketHistoryTab-CLMopA7a.js.map +0 -1
- package/dist/SupportTicketStatusBadge-YdZzjvkh.js +0 -163
- package/dist/SupportTicketStatusBadge-YdZzjvkh.js.map +0 -1
- package/dist/TeamAttachmentsTab-BxUpTWYh.js +0 -43
- package/dist/TeamHistoryTab-CUCT9MRG.js +0 -5
- package/dist/TeamHistoryTab-gB3H2KZv.js.map +0 -1
- package/dist/TeamList-By6pzWm5.js +0 -43
- package/dist/TeamMemberList-CYV9fWEb.js +0 -43
- package/dist/TeamMemberParent-CVvGqpxD.js +0 -43
- package/dist/TeamNotesTab-pfXTDhg6.js +0 -23
- package/dist/TeamNotesTab-pfXTDhg6.js.map +0 -1
- package/dist/TeamNotesTab-u4cDC67X.js +0 -8
- package/dist/TeamParent-BxT1KubK.js +0 -43
- package/dist/UserListPage-DsQdH2Sm.js +0 -4
- package/dist/UserProfilePage-B73JhjUu.js +0 -7
- package/dist/ViewTeam-DzX-obEl.js +0 -43
- package/dist/ViewTeamMember-PF6S_4Pb.js +0 -43
- package/dist/ZiniaContainer-C7c7Vwkh.js +0 -18
- package/dist/ZiniaContainer-C7c7Vwkh.js.map +0 -1
- package/dist/convertToLocalDateTime-D4IoNvRj.js.map +0 -1
- package/dist/creditValueFormatter-DftEzu8d.js +0 -128
- package/dist/creditValueFormatter-DftEzu8d.js.map +0 -1
- package/dist/src-o5fMIo5_.js.map +0 -1
- package/dist/useRpcAuth-BLlRSHy8.js.map +0 -1
- /package/dist/{TeamMembersTab-CpE9BaCi.js → TeamMembersTab-DTJxmb-M.js} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { l as useUserSessionStore, m as useEnv } from "./useRpcAuth-
|
|
2
|
-
import { t as useMutation } from "./useMutation-
|
|
3
|
-
import { t as useQuery } from "./useQuery-
|
|
1
|
+
import { l as useUserSessionStore, m as useEnv } from "./useRpcAuth-Dp2sec-X.js";
|
|
2
|
+
import { t as useMutation } from "./useMutation-B4_S4Xoa.js";
|
|
3
|
+
import { t as useQuery } from "./useQuery-B7ndu5_P.js";
|
|
4
4
|
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, onMounted, onUnmounted, openBlock, ref, renderList, renderSlot, toDisplayString, unref, watch, withModifiers } from "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/components/ConfirmDialog.vue
|
|
7
|
-
const _hoisted_1$
|
|
8
|
-
const _hoisted_2$
|
|
9
|
-
const _hoisted_3$
|
|
10
|
-
const _hoisted_4$
|
|
11
|
-
const _hoisted_5$
|
|
12
|
-
const _sfc_main$
|
|
7
|
+
const _hoisted_1$7 = { class: "font-bold text-lg mb-4" };
|
|
8
|
+
const _hoisted_2$4 = { class: "py-4" };
|
|
9
|
+
const _hoisted_3$4 = { class: "modal-action" };
|
|
10
|
+
const _hoisted_4$4 = ["disabled"];
|
|
11
|
+
const _hoisted_5$4 = ["disabled"];
|
|
12
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
13
13
|
__name: "ConfirmDialog",
|
|
14
14
|
props: {
|
|
15
15
|
modelValue: { type: Boolean },
|
|
@@ -64,55 +64,55 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
64
64
|
class: "modal-box",
|
|
65
65
|
onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
|
|
66
66
|
}, [
|
|
67
|
-
createElementVNode("h3", _hoisted_1$
|
|
68
|
-
createElementVNode("div", _hoisted_2$
|
|
69
|
-
createElementVNode("div", _hoisted_3$
|
|
67
|
+
createElementVNode("h3", _hoisted_1$7, toDisplayString(__props.title), 1),
|
|
68
|
+
createElementVNode("div", _hoisted_2$4, [renderSlot(_ctx.$slots, "message", {}, () => [createElementVNode("p", null, toDisplayString(__props.message), 1)])]),
|
|
69
|
+
createElementVNode("div", _hoisted_3$4, [createElementVNode("button", {
|
|
70
70
|
class: "btn btn-outline",
|
|
71
71
|
onClick: withModifiers(handleCancel, ["prevent"]),
|
|
72
72
|
disabled: __props.isProcessing,
|
|
73
73
|
type: "button"
|
|
74
|
-
}, toDisplayString(__props.cancelText), 9, _hoisted_4$
|
|
74
|
+
}, toDisplayString(__props.cancelText), 9, _hoisted_4$4), createElementVNode("button", {
|
|
75
75
|
class: normalizeClass(["btn", __props.confirmButtonClass]),
|
|
76
76
|
onClick: withModifiers(handleConfirm, ["prevent"]),
|
|
77
77
|
disabled: __props.isProcessing,
|
|
78
78
|
type: "button"
|
|
79
|
-
}, toDisplayString(__props.isProcessing ? __props.processingText : __props.confirmText), 11, _hoisted_5$
|
|
79
|
+
}, toDisplayString(__props.isProcessing ? __props.processingText : __props.confirmText), 11, _hoisted_5$4)])
|
|
80
80
|
])], 2);
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
|
-
var ConfirmDialog_default = _sfc_main$
|
|
84
|
+
var ConfirmDialog_default = _sfc_main$7;
|
|
85
85
|
|
|
86
86
|
//#endregion
|
|
87
87
|
//#region src/components/ImageModal.vue
|
|
88
|
-
const _hoisted_1$
|
|
89
|
-
const _hoisted_2$
|
|
90
|
-
const _hoisted_3$
|
|
91
|
-
const _hoisted_4$
|
|
92
|
-
const _hoisted_5$
|
|
88
|
+
const _hoisted_1$6 = { class: "modal-box w-full max-w-full h-full max-h-full p-0 flex flex-col bg-base-100" };
|
|
89
|
+
const _hoisted_2$3 = { class: "flex items-center justify-between p-3 sm:p-4 border-b border-base-300 flex-shrink-0 bg-base-100/95 backdrop-blur" };
|
|
90
|
+
const _hoisted_3$3 = { class: "flex-1 min-w-0 mr-2" };
|
|
91
|
+
const _hoisted_4$3 = { class: "font-semibold text-sm sm:text-base truncate" };
|
|
92
|
+
const _hoisted_5$3 = {
|
|
93
93
|
key: 0,
|
|
94
94
|
class: "text-xs text-base-content/60 mt-0.5"
|
|
95
95
|
};
|
|
96
|
-
const _hoisted_6$
|
|
97
|
-
const _hoisted_7$
|
|
96
|
+
const _hoisted_6$3 = { class: "flex items-center gap-1 sm:gap-2 flex-shrink-0" };
|
|
97
|
+
const _hoisted_7$2 = {
|
|
98
98
|
key: 0,
|
|
99
99
|
class: "absolute inset-0 flex items-center justify-center"
|
|
100
100
|
};
|
|
101
|
-
const _hoisted_8$
|
|
101
|
+
const _hoisted_8$2 = {
|
|
102
102
|
key: 1,
|
|
103
103
|
class: "absolute inset-0 flex flex-col items-center justify-center p-4 text-center"
|
|
104
104
|
};
|
|
105
|
-
const _hoisted_9$
|
|
106
|
-
const _hoisted_10$
|
|
107
|
-
const _hoisted_11$
|
|
108
|
-
const _hoisted_12$
|
|
105
|
+
const _hoisted_9$2 = ["src", "alt"];
|
|
106
|
+
const _hoisted_10$2 = ["disabled"];
|
|
107
|
+
const _hoisted_11$2 = ["disabled"];
|
|
108
|
+
const _hoisted_12$2 = {
|
|
109
109
|
method: "dialog",
|
|
110
110
|
class: "modal-backdrop"
|
|
111
111
|
};
|
|
112
112
|
const minScale = .5;
|
|
113
113
|
const maxScale = 5;
|
|
114
114
|
const zoomStep = .05;
|
|
115
|
-
const _sfc_main$
|
|
115
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
116
116
|
__name: "ImageModal",
|
|
117
117
|
props: {
|
|
118
118
|
isOpen: { type: Boolean },
|
|
@@ -542,9 +542,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
542
542
|
class: normalizeClass(["modal", { "modal-open": isOpen.value }]),
|
|
543
543
|
onClick: handleBackdropClick,
|
|
544
544
|
onKeydown: handleKeydown
|
|
545
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
545
|
+
}, [createElementVNode("div", _hoisted_1$6, [
|
|
546
546
|
createCommentVNode(" Header "),
|
|
547
|
-
createElementVNode("div", _hoisted_2$
|
|
547
|
+
createElementVNode("div", _hoisted_2$3, [createElementVNode("div", _hoisted_3$3, [createElementVNode("h3", _hoisted_4$3, toDisplayString(__props.imageName), 1), __props.imageIndex !== null && __props.totalImages !== null ? (openBlock(), createElementBlock("p", _hoisted_5$3, toDisplayString(__props.imageIndex + 1) + " / " + toDisplayString(__props.totalImages), 1)) : createCommentVNode("v-if", true)]), createElementVNode("div", _hoisted_6$3, [
|
|
548
548
|
createCommentVNode(" Navigation buttons (if multiple images) "),
|
|
549
549
|
showNavigation.value && __props.imageIndex !== null && __props.imageIndex > 0 ? (openBlock(), createElementBlock("button", {
|
|
550
550
|
key: 0,
|
|
@@ -631,9 +631,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
631
631
|
class: "flex-1 flex items-center justify-center overflow-hidden bg-base-200 relative"
|
|
632
632
|
}, [
|
|
633
633
|
createCommentVNode(" Loading state "),
|
|
634
|
-
isLoading.value ? (openBlock(), createElementBlock("div", _hoisted_7$
|
|
634
|
+
isLoading.value ? (openBlock(), createElementBlock("div", _hoisted_7$2, [..._cache[8] || (_cache[8] = [createElementVNode("span", { class: "loading loading-spinner loading-lg" }, null, -1)])])) : createCommentVNode("v-if", true),
|
|
635
635
|
createCommentVNode(" Error state "),
|
|
636
|
-
hasError.value ? (openBlock(), createElementBlock("div", _hoisted_8$
|
|
636
|
+
hasError.value ? (openBlock(), createElementBlock("div", _hoisted_8$2, [..._cache[9] || (_cache[9] = [createElementVNode("svg", {
|
|
637
637
|
xmlns: "http://www.w3.org/2000/svg",
|
|
638
638
|
class: "h-12 w-12 text-error mb-2",
|
|
639
639
|
fill: "none",
|
|
@@ -660,7 +660,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
660
660
|
onTouchstart: withModifiers(handleImageTouchStart, ["stop"]),
|
|
661
661
|
onTouchmove: withModifiers(handleImageTouchMove, ["stop"]),
|
|
662
662
|
onTouchend: withModifiers(handleImageTouchEnd, ["stop"])
|
|
663
|
-
}, null, 46, _hoisted_9$
|
|
663
|
+
}, null, 46, _hoisted_9$2)) : createCommentVNode("v-if", true),
|
|
664
664
|
createCommentVNode(" Zoom controls "),
|
|
665
665
|
__props.imageSrc && !hasError.value ? (openBlock(), createElementBlock("div", {
|
|
666
666
|
key: 3,
|
|
@@ -688,7 +688,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
688
688
|
"stroke-linejoin": "round",
|
|
689
689
|
"stroke-width": "2",
|
|
690
690
|
d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7"
|
|
691
|
-
})], -1)])], 8, _hoisted_10$
|
|
691
|
+
})], -1)])], 8, _hoisted_10$2),
|
|
692
692
|
createElementVNode("button", {
|
|
693
693
|
onClick: withModifiers(resetZoom, ["prevent"]),
|
|
694
694
|
class: "text-xs flex items-center px-2 text-base-content/70 hover:text-base-content hover:bg-base-200 rounded transition-colors cursor-pointer",
|
|
@@ -714,7 +714,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
714
714
|
"stroke-linejoin": "round",
|
|
715
715
|
"stroke-width": "2",
|
|
716
716
|
d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v6m3-3H7"
|
|
717
|
-
})], -1)])], 8, _hoisted_11$
|
|
717
|
+
})], -1)])], 8, _hoisted_11$2),
|
|
718
718
|
createElementVNode("button", {
|
|
719
719
|
onClick: withModifiers(rotateImage, ["prevent"]),
|
|
720
720
|
class: "btn btn-sm btn-circle btn-ghost",
|
|
@@ -737,73 +737,121 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
737
737
|
})], -1)])])
|
|
738
738
|
], 32)) : createCommentVNode("v-if", true)
|
|
739
739
|
], 512)
|
|
740
|
-
]), createElementVNode("form", _hoisted_12$
|
|
740
|
+
]), createElementVNode("form", _hoisted_12$2, [createElementVNode("button", {
|
|
741
741
|
type: "button",
|
|
742
742
|
onClick: withModifiers(handleClose, ["prevent"])
|
|
743
743
|
}, "close")])], 34);
|
|
744
744
|
};
|
|
745
745
|
}
|
|
746
746
|
});
|
|
747
|
-
var ImageModal_default = _sfc_main$
|
|
747
|
+
var ImageModal_default = _sfc_main$6;
|
|
748
|
+
|
|
749
|
+
//#endregion
|
|
750
|
+
//#region src/slices/support_ticket/utils/creditValueFormatter.ts
|
|
751
|
+
/**
|
|
752
|
+
* Helper function to check if credit value is empty
|
|
753
|
+
*/
|
|
754
|
+
function isCreditValueEmpty(value) {
|
|
755
|
+
return value === null || value === void 0 || value.trim() === "";
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* Core credit formatting logic
|
|
759
|
+
*/
|
|
760
|
+
function formatCreditValueCore(creditValue) {
|
|
761
|
+
if (isCreditValueEmpty(creditValue)) return "TBD";
|
|
762
|
+
const trimmed = creditValue.trim();
|
|
763
|
+
if (parseFloat(trimmed) === 0) return "0";
|
|
764
|
+
return trimmed.replace(/\.?0+$/, "");
|
|
765
|
+
}
|
|
766
|
+
/**
|
|
767
|
+
* Formats credit value for staff views (includes internal ticket logic)
|
|
768
|
+
*
|
|
769
|
+
* @param creditValue - The credit value from the database
|
|
770
|
+
* @param approvalStatus - The approval status to determine display logic
|
|
771
|
+
* @returns Formatted string for display
|
|
772
|
+
*
|
|
773
|
+
* @example
|
|
774
|
+
* formatStaffCreditValue("5.50", "PENDING") // "5.5"
|
|
775
|
+
* formatStaffCreditValue("10", "INTERNAL") // "N/A"
|
|
776
|
+
*/
|
|
777
|
+
function formatStaffCreditValue(creditValue, approvalStatus) {
|
|
778
|
+
if (approvalStatus === "INTERNAL") return "N/A";
|
|
779
|
+
return formatCreditValueCore(creditValue);
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* Formats credit value for customer views (status-based logic)
|
|
783
|
+
*
|
|
784
|
+
* @param creditValue - The credit value from the database
|
|
785
|
+
* @param status - The computed status from the customer query
|
|
786
|
+
* @returns Formatted string for display
|
|
787
|
+
*
|
|
788
|
+
* @example
|
|
789
|
+
* formatCustomerCreditValue("5.50", "PENDING") // "5.5"
|
|
790
|
+
* formatCustomerCreditValue("5.50", "FOLLOWUP") // "5.5"
|
|
791
|
+
*/
|
|
792
|
+
function formatCustomerCreditValue(creditValue) {
|
|
793
|
+
return formatCreditValueCore(creditValue);
|
|
794
|
+
}
|
|
748
795
|
|
|
749
796
|
//#endregion
|
|
750
797
|
//#region src/slices/support_ticket/shared/InlineAttachments.vue
|
|
751
|
-
const _hoisted_1 = { class: "mt-4 sm:mt-6" };
|
|
752
|
-
const _hoisted_2 = {
|
|
753
|
-
const _hoisted_3 = ["disabled"];
|
|
754
|
-
const _hoisted_4 = { class: "flex flex-col items-center justify-center py-2 sm:py-4" };
|
|
755
|
-
const _hoisted_5 = {
|
|
798
|
+
const _hoisted_1$5 = { class: "mt-4 sm:mt-6" };
|
|
799
|
+
const _hoisted_2$2 = {
|
|
756
800
|
key: 0,
|
|
757
|
-
class: "
|
|
801
|
+
class: "grid grid-cols-2 gap-2 sm:gap-4 mb-4"
|
|
758
802
|
};
|
|
759
|
-
const
|
|
803
|
+
const _hoisted_3$2 = {
|
|
804
|
+
key: 0,
|
|
805
|
+
class: "hidden sm:block text-xs text-base-content/50"
|
|
806
|
+
};
|
|
807
|
+
const _hoisted_4$2 = {
|
|
760
808
|
key: 1,
|
|
761
809
|
class: "mb-4 space-y-2"
|
|
762
810
|
};
|
|
763
|
-
const
|
|
764
|
-
const
|
|
765
|
-
const
|
|
811
|
+
const _hoisted_5$2 = { class: "flex-1 min-w-0" };
|
|
812
|
+
const _hoisted_6$2 = { class: "text-xs sm:text-sm font-medium truncate" };
|
|
813
|
+
const _hoisted_7$1 = {
|
|
766
814
|
key: 0,
|
|
767
815
|
class: "w-full bg-base-300 rounded-full h-1.5 mt-1"
|
|
768
816
|
};
|
|
769
|
-
const
|
|
817
|
+
const _hoisted_8$1 = {
|
|
770
818
|
key: 1,
|
|
771
819
|
class: "text-xs text-error mt-1 break-words"
|
|
772
820
|
};
|
|
773
|
-
const
|
|
774
|
-
const
|
|
775
|
-
const
|
|
776
|
-
const
|
|
821
|
+
const _hoisted_9$1 = { class: "flex gap-2 sm:gap-1" };
|
|
822
|
+
const _hoisted_10$1 = ["onClick"];
|
|
823
|
+
const _hoisted_11$1 = ["onClick"];
|
|
824
|
+
const _hoisted_12$1 = {
|
|
777
825
|
key: 2,
|
|
778
826
|
class: "space-y-2"
|
|
779
827
|
};
|
|
780
|
-
const
|
|
828
|
+
const _hoisted_13$1 = {
|
|
781
829
|
key: 0,
|
|
782
830
|
class: "flex justify-center py-4"
|
|
783
831
|
};
|
|
784
|
-
const
|
|
785
|
-
const
|
|
786
|
-
const
|
|
787
|
-
const
|
|
832
|
+
const _hoisted_14$1 = ["onClick"];
|
|
833
|
+
const _hoisted_15$1 = { class: "flex items-center gap-2 sm:gap-3 flex-1 min-w-0 w-full sm:w-auto" };
|
|
834
|
+
const _hoisted_16 = { class: "flex-shrink-0" };
|
|
835
|
+
const _hoisted_17 = {
|
|
788
836
|
key: 0,
|
|
789
837
|
class: "w-10 h-10 sm:w-12 sm:h-12 rounded overflow-hidden bg-base-200 flex items-center justify-center"
|
|
790
838
|
};
|
|
791
|
-
const
|
|
792
|
-
const
|
|
839
|
+
const _hoisted_18 = ["src", "alt"];
|
|
840
|
+
const _hoisted_19 = {
|
|
793
841
|
key: 1,
|
|
794
842
|
class: "w-full h-full flex items-center justify-center"
|
|
795
843
|
};
|
|
796
|
-
const
|
|
797
|
-
const
|
|
798
|
-
const
|
|
844
|
+
const _hoisted_20 = { class: "flex-1 min-w-0" };
|
|
845
|
+
const _hoisted_21 = { class: "text-sm sm:text-base font-medium truncate" };
|
|
846
|
+
const _hoisted_22 = { class: "text-xs text-base-content/60" };
|
|
847
|
+
const _hoisted_23 = ["onClick"];
|
|
848
|
+
const _hoisted_24 = ["onClick"];
|
|
799
849
|
const _hoisted_25 = ["onClick"];
|
|
800
|
-
const _hoisted_26 =
|
|
801
|
-
const _hoisted_27 = ["onClick"];
|
|
802
|
-
const _hoisted_28 = {
|
|
850
|
+
const _hoisted_26 = {
|
|
803
851
|
key: 3,
|
|
804
852
|
class: "text-center py-8 text-base-content/50"
|
|
805
853
|
};
|
|
806
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
854
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
807
855
|
__name: "InlineAttachments",
|
|
808
856
|
props: {
|
|
809
857
|
recordId: {},
|
|
@@ -819,7 +867,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
819
867
|
emits: [
|
|
820
868
|
"uploaded",
|
|
821
869
|
"deleted",
|
|
822
|
-
"filesQueued"
|
|
870
|
+
"filesQueued",
|
|
871
|
+
"update:attachmentsCount"
|
|
823
872
|
],
|
|
824
873
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
825
874
|
const props = __props;
|
|
@@ -876,6 +925,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
876
925
|
});
|
|
877
926
|
return files;
|
|
878
927
|
});
|
|
928
|
+
watch(() => attachments.value.length, (count) => emit("update:attachmentsCount", count), { immediate: true });
|
|
879
929
|
const deleteMessage = computed(() => {
|
|
880
930
|
if (!fileToDelete.value) return "Are you sure you want to delete this attachment? This action cannot be undone.";
|
|
881
931
|
return `Are you sure you want to delete "${fileToDelete.value.name}"? This action cannot be undone.`;
|
|
@@ -1019,6 +1069,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1019
1069
|
if (!files || files.length === 0) return;
|
|
1020
1070
|
processFiles(Array.from(files));
|
|
1021
1071
|
};
|
|
1072
|
+
const handlePaste = (event) => {
|
|
1073
|
+
if (!props.canUpload || isUploading.value) return;
|
|
1074
|
+
const items = event.clipboardData?.items;
|
|
1075
|
+
if (!items) return;
|
|
1076
|
+
const imageFiles = [];
|
|
1077
|
+
for (const item of items) if (item.type.startsWith("image/")) {
|
|
1078
|
+
const file = item.getAsFile();
|
|
1079
|
+
if (file) imageFiles.push(file);
|
|
1080
|
+
}
|
|
1081
|
+
if (imageFiles.length > 0) {
|
|
1082
|
+
event.preventDefault();
|
|
1083
|
+
event.stopPropagation();
|
|
1084
|
+
processFiles(imageFiles);
|
|
1085
|
+
}
|
|
1086
|
+
};
|
|
1022
1087
|
const processUploadQueue = async (ticketId) => {
|
|
1023
1088
|
const nextItem = uploadQueue.value.find((item) => item.status === "pending");
|
|
1024
1089
|
if (!nextItem) {
|
|
@@ -1139,25 +1204,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1139
1204
|
});
|
|
1140
1205
|
}, { immediate: true });
|
|
1141
1206
|
return (_ctx, _cache) => {
|
|
1142
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
1143
|
-
createElementVNode("div", _hoisted_2, [_cache[5] || (_cache[5] = createElementVNode("h3", { class: "text-base sm:text-lg font-semibold" }, "Attachments", -1)), __props.canUpload ? (openBlock(), createElementBlock("button", {
|
|
1144
|
-
key: 0,
|
|
1145
|
-
onClick: withModifiers(openFileSelector, ["prevent"]),
|
|
1146
|
-
class: "btn btn-sm btn-primary w-full sm:w-auto",
|
|
1147
|
-
disabled: isUploading.value,
|
|
1148
|
-
type: "button"
|
|
1149
|
-
}, [..._cache[4] || (_cache[4] = [createElementVNode("svg", {
|
|
1150
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1151
|
-
class: "h-4 w-4 mr-1",
|
|
1152
|
-
fill: "none",
|
|
1153
|
-
viewBox: "0 0 24 24",
|
|
1154
|
-
stroke: "currentColor"
|
|
1155
|
-
}, [createElementVNode("path", {
|
|
1156
|
-
"stroke-linecap": "round",
|
|
1157
|
-
"stroke-linejoin": "round",
|
|
1158
|
-
"stroke-width": "2",
|
|
1159
|
-
d: "M12 4v16m8-8H4"
|
|
1160
|
-
})], -1), createTextVNode(" Add Files ", -1)])], 8, _hoisted_3)) : createCommentVNode("v-if", true)]),
|
|
1207
|
+
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
1161
1208
|
createElementVNode("input", {
|
|
1162
1209
|
ref_key: "fileInput",
|
|
1163
1210
|
ref: fileInput,
|
|
@@ -1166,71 +1213,96 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1166
1213
|
class: "hidden",
|
|
1167
1214
|
onChange: handleFileSelect
|
|
1168
1215
|
}, null, 544),
|
|
1169
|
-
createCommentVNode(" Drag & Drop
|
|
1170
|
-
__props.canUpload ? (openBlock(), createElementBlock("div",
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
"
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1216
|
+
createCommentVNode(" Drag & Drop and Paste: compact button-like on mobile, expanded on desktop "),
|
|
1217
|
+
__props.canUpload ? (openBlock(), createElementBlock("div", _hoisted_2$2, [
|
|
1218
|
+
createCommentVNode(" Drag & Drop Zone "),
|
|
1219
|
+
createElementVNode("div", {
|
|
1220
|
+
class: normalizeClass(["flex flex-col items-center justify-center gap-1 sm:gap-2 py-2.5 px-2 sm:py-6 sm:px-4 rounded-lg border-2 border-dashed transition-colors cursor-pointer touch-manipulation text-center", {
|
|
1221
|
+
"border-primary bg-primary/5": isDragging.value,
|
|
1222
|
+
"border-base-300 hover:border-primary/50 active:border-primary/50": !isDragging.value
|
|
1223
|
+
}]),
|
|
1224
|
+
onDragover: _cache[0] || (_cache[0] = withModifiers(($event) => isDragging.value = true, ["prevent"])),
|
|
1225
|
+
onDragleave: _cache[1] || (_cache[1] = withModifiers(($event) => isDragging.value = false, ["prevent"])),
|
|
1226
|
+
onDrop: withModifiers(handleFileDrop, ["prevent"]),
|
|
1227
|
+
onClick: withModifiers(openFileSelector, ["prevent", "stop"])
|
|
1228
|
+
}, [
|
|
1229
|
+
_cache[4] || (_cache[4] = createElementVNode("svg", {
|
|
1230
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1231
|
+
class: "h-5 w-5 sm:h-12 sm:w-12 text-primary shrink-0",
|
|
1232
|
+
fill: "none",
|
|
1233
|
+
viewBox: "0 0 24 24",
|
|
1234
|
+
stroke: "currentColor"
|
|
1235
|
+
}, [createElementVNode("path", {
|
|
1236
|
+
"stroke-linecap": "round",
|
|
1237
|
+
"stroke-linejoin": "round",
|
|
1238
|
+
"stroke-width": "2",
|
|
1239
|
+
d: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"
|
|
1240
|
+
})], -1)),
|
|
1241
|
+
_cache[5] || (_cache[5] = createElementVNode("span", { class: "text-xs sm:text-lg font-medium" }, "Browse", -1)),
|
|
1242
|
+
_cache[6] || (_cache[6] = createElementVNode("span", { class: "hidden sm:inline text-xs text-base-content/70" }, "Drag and drop or click", -1)),
|
|
1243
|
+
!__props.recordId ? (openBlock(), createElementBlock("p", _hoisted_3$2, " Queued until ticket is created ")) : createCommentVNode("v-if", true)
|
|
1244
|
+
], 34),
|
|
1245
|
+
createCommentVNode(" Paste zone - collapse handles visibility via CSS, so no unmount during animation "),
|
|
1246
|
+
createElementVNode("div", {
|
|
1247
|
+
tabindex: "0",
|
|
1248
|
+
role: "textbox",
|
|
1249
|
+
"aria-label": "Paste image here",
|
|
1250
|
+
class: "flex flex-col items-center justify-center gap-1 sm:gap-2 py-2.5 px-2 sm:py-6 sm:px-4 rounded-lg border-2 border-dashed border-base-300 cursor-text outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 focus:bg-primary/5 touch-manipulation text-center",
|
|
1251
|
+
onPaste: handlePaste
|
|
1252
|
+
}, [..._cache[7] || (_cache[7] = [
|
|
1253
|
+
createElementVNode("svg", {
|
|
1254
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1255
|
+
class: "h-5 w-5 sm:h-12 sm:w-12 text-primary shrink-0",
|
|
1256
|
+
fill: "none",
|
|
1257
|
+
viewBox: "0 0 24 24",
|
|
1258
|
+
stroke: "currentColor"
|
|
1259
|
+
}, [createElementVNode("path", {
|
|
1260
|
+
"stroke-linecap": "round",
|
|
1261
|
+
"stroke-linejoin": "round",
|
|
1262
|
+
"stroke-width": "2",
|
|
1263
|
+
d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
|
|
1264
|
+
})], -1),
|
|
1265
|
+
createElementVNode("span", { class: "text-xs sm:text-lg font-medium" }, "Paste", -1),
|
|
1266
|
+
createElementVNode("span", { class: "hidden sm:inline text-xs text-base-content/70" }, "Tap to focus, then paste", -1)
|
|
1267
|
+
])], 32)
|
|
1268
|
+
])) : createCommentVNode("v-if", true),
|
|
1197
1269
|
createCommentVNode(" Upload Queue "),
|
|
1198
|
-
uploadQueue.value.length > 0 ? (openBlock(), createElementBlock("div",
|
|
1270
|
+
uploadQueue.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4$2, [(openBlock(true), createElementBlock(Fragment, null, renderList(uploadQueue.value, (item) => {
|
|
1199
1271
|
return openBlock(), createElementBlock("div", {
|
|
1200
1272
|
key: item.id,
|
|
1201
1273
|
class: "flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-3 p-2 sm:p-3 bg-base-200 rounded-lg"
|
|
1202
|
-
}, [createElementVNode("div",
|
|
1203
|
-
createElementVNode("div",
|
|
1204
|
-
item.status === "uploading" ? (openBlock(), createElementBlock("div",
|
|
1274
|
+
}, [createElementVNode("div", _hoisted_5$2, [
|
|
1275
|
+
createElementVNode("div", _hoisted_6$2, toDisplayString(item.file.name), 1),
|
|
1276
|
+
item.status === "uploading" ? (openBlock(), createElementBlock("div", _hoisted_7$1, [createElementVNode("div", {
|
|
1205
1277
|
class: "bg-primary h-1.5 rounded-full transition-all",
|
|
1206
1278
|
style: normalizeStyle({ width: `${item.progress}%` })
|
|
1207
1279
|
}, null, 4)])) : createCommentVNode("v-if", true),
|
|
1208
|
-
item.status === "error" ? (openBlock(), createElementBlock("div",
|
|
1209
|
-
]), createElementVNode("div",
|
|
1280
|
+
item.status === "error" ? (openBlock(), createElementBlock("div", _hoisted_8$1, toDisplayString(item.errorMessage), 1)) : createCommentVNode("v-if", true)
|
|
1281
|
+
]), createElementVNode("div", _hoisted_9$1, [item.status === "error" ? (openBlock(), createElementBlock("button", {
|
|
1210
1282
|
key: 0,
|
|
1211
1283
|
onClick: withModifiers(($event) => retryUpload(item), ["prevent"]),
|
|
1212
1284
|
class: "btn btn-xs btn-ghost flex-1 sm:flex-none",
|
|
1213
1285
|
type: "button"
|
|
1214
|
-
}, " Retry ", 8,
|
|
1286
|
+
}, " Retry ", 8, _hoisted_10$1)) : createCommentVNode("v-if", true), item.status !== "uploading" ? (openBlock(), createElementBlock("button", {
|
|
1215
1287
|
key: 1,
|
|
1216
1288
|
onClick: withModifiers(($event) => removeFromQueue(item.id), ["prevent"]),
|
|
1217
1289
|
class: "btn btn-xs btn-ghost text-error flex-1 sm:flex-none",
|
|
1218
1290
|
type: "button"
|
|
1219
|
-
}, " Remove ", 8,
|
|
1291
|
+
}, " Remove ", 8, _hoisted_11$1)) : createCommentVNode("v-if", true)])]);
|
|
1220
1292
|
}), 128))])) : createCommentVNode("v-if", true),
|
|
1221
1293
|
createCommentVNode(" Attachments List "),
|
|
1222
|
-
(attachments.value.length > 0 || unref(attachmentsLoading)) && __props.recordId ? (openBlock(), createElementBlock("div",
|
|
1294
|
+
(attachments.value.length > 0 || unref(attachmentsLoading)) && __props.recordId ? (openBlock(), createElementBlock("div", _hoisted_12$1, [unref(attachmentsLoading) ? (openBlock(), createElementBlock("div", _hoisted_13$1, [..._cache[8] || (_cache[8] = [createElementVNode("span", { class: "loading loading-spinner loading-sm" }, null, -1)])])) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(attachments.value, (file) => {
|
|
1223
1295
|
return openBlock(), createElementBlock("div", {
|
|
1224
1296
|
key: file.id,
|
|
1225
1297
|
class: normalizeClass(["flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-3 p-2 sm:p-3 bg-base-100 border border-base-300 rounded-lg hover:bg-base-200 transition-colors", { "cursor-pointer": isImage(file.type) }]),
|
|
1226
1298
|
onClick: withModifiers(($event) => isImage(file.type) && viewImage(file), ["prevent"])
|
|
1227
|
-
}, [createElementVNode("div",
|
|
1299
|
+
}, [createElementVNode("div", _hoisted_15$1, [createElementVNode("div", _hoisted_16, [createCommentVNode(" Image thumbnail preview "), isImage(file.type) ? (openBlock(), createElementBlock("div", _hoisted_17, [getImageUrlSync(file.id) ? (openBlock(), createElementBlock("img", {
|
|
1228
1300
|
key: 0,
|
|
1229
1301
|
src: getImageUrlSync(file.id),
|
|
1230
1302
|
alt: file.name,
|
|
1231
1303
|
class: "w-full h-full object-cover",
|
|
1232
1304
|
onError: handleImageError
|
|
1233
|
-
}, null, 40,
|
|
1305
|
+
}, null, 40, _hoisted_18)) : (openBlock(), createElementBlock("div", _hoisted_19, [..._cache[9] || (_cache[9] = [createElementVNode("span", { class: "loading loading-spinner loading-xs" }, null, -1)])]))])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" File type badge for non-images "), createElementVNode("div", { class: normalizeClass(["badge badge-sm", getFileTypeBadgeClass(file.type)]) }, toDisplayString(getFileTypeLabel(file.type)), 3)], 2112))]), createElementVNode("div", _hoisted_20, [createElementVNode("div", _hoisted_21, toDisplayString(file.name), 1), createElementVNode("div", _hoisted_22, toDisplayString(formatFileSize(file.size)) + " • " + toDisplayString(formatDate(file.uploadedAt)), 1)])]), createElementVNode("div", {
|
|
1234
1306
|
class: "flex gap-1 justify-end sm:justify-start",
|
|
1235
1307
|
onClick: _cache[2] || (_cache[2] = withModifiers(() => {}, ["stop"]))
|
|
1236
1308
|
}, [
|
|
@@ -1240,7 +1312,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1240
1312
|
class: "btn btn-sm btn-ghost btn-circle",
|
|
1241
1313
|
title: "View Image",
|
|
1242
1314
|
type: "button"
|
|
1243
|
-
}, [..._cache[
|
|
1315
|
+
}, [..._cache[10] || (_cache[10] = [createElementVNode("svg", {
|
|
1244
1316
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1245
1317
|
class: "h-4 w-4",
|
|
1246
1318
|
fill: "none",
|
|
@@ -1256,13 +1328,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1256
1328
|
"stroke-linejoin": "round",
|
|
1257
1329
|
"stroke-width": "2",
|
|
1258
1330
|
d: "M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
|
|
1259
|
-
})], -1)])], 8,
|
|
1331
|
+
})], -1)])], 8, _hoisted_23)) : createCommentVNode("v-if", true),
|
|
1260
1332
|
createElementVNode("button", {
|
|
1261
1333
|
onClick: withModifiers(($event) => downloadFile(file, $event), ["prevent"]),
|
|
1262
1334
|
class: "btn btn-sm btn-ghost btn-circle",
|
|
1263
1335
|
title: "Download",
|
|
1264
1336
|
type: "button"
|
|
1265
|
-
}, [..._cache[
|
|
1337
|
+
}, [..._cache[11] || (_cache[11] = [createElementVNode("svg", {
|
|
1266
1338
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1267
1339
|
class: "h-4 w-4",
|
|
1268
1340
|
fill: "none",
|
|
@@ -1273,14 +1345,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1273
1345
|
"stroke-linejoin": "round",
|
|
1274
1346
|
"stroke-width": "2",
|
|
1275
1347
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
1276
|
-
})], -1)])], 8,
|
|
1348
|
+
})], -1)])], 8, _hoisted_24),
|
|
1277
1349
|
__props.canDelete ? (openBlock(), createElementBlock("button", {
|
|
1278
1350
|
key: 1,
|
|
1279
1351
|
onClick: withModifiers(($event) => confirmDelete(file), ["prevent"]),
|
|
1280
1352
|
class: "btn btn-sm btn-ghost btn-circle text-error",
|
|
1281
1353
|
title: "Delete",
|
|
1282
1354
|
type: "button"
|
|
1283
|
-
}, [..._cache[
|
|
1355
|
+
}, [..._cache[12] || (_cache[12] = [createElementVNode("svg", {
|
|
1284
1356
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1285
1357
|
class: "h-4 w-4",
|
|
1286
1358
|
fill: "none",
|
|
@@ -1291,9 +1363,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1291
1363
|
"stroke-linejoin": "round",
|
|
1292
1364
|
"stroke-width": "2",
|
|
1293
1365
|
d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
|
|
1294
|
-
})], -1)])], 8,
|
|
1295
|
-
])], 10,
|
|
1296
|
-
}), 128))])) : !unref(attachmentsLoading) && __props.recordId ? (openBlock(), createElementBlock("div",
|
|
1366
|
+
})], -1)])], 8, _hoisted_25)) : createCommentVNode("v-if", true)
|
|
1367
|
+
])], 10, _hoisted_14$1);
|
|
1368
|
+
}), 128))])) : !unref(attachmentsLoading) && __props.recordId ? (openBlock(), createElementBlock("div", _hoisted_26, [..._cache[13] || (_cache[13] = [createElementVNode("svg", {
|
|
1297
1369
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1298
1370
|
class: "h-12 w-12 mx-auto mb-2 opacity-50",
|
|
1299
1371
|
fill: "none",
|
|
@@ -1344,8 +1416,482 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1344
1416
|
};
|
|
1345
1417
|
}
|
|
1346
1418
|
});
|
|
1347
|
-
var InlineAttachments_default = _sfc_main;
|
|
1419
|
+
var InlineAttachments_default = _sfc_main$5;
|
|
1420
|
+
|
|
1421
|
+
//#endregion
|
|
1422
|
+
//#region src/slices/support_ticket/shared/SupportTicketPriorityBadge.vue
|
|
1423
|
+
const _hoisted_1$4 = ["aria-label"];
|
|
1424
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
1425
|
+
__name: "SupportTicketPriorityBadge",
|
|
1426
|
+
props: {
|
|
1427
|
+
priority: {},
|
|
1428
|
+
size: { default: "md" },
|
|
1429
|
+
variant: { default: "default" }
|
|
1430
|
+
},
|
|
1431
|
+
setup(__props) {
|
|
1432
|
+
/**
|
|
1433
|
+
* SupportTicketPriorityBadge - A reusable Vue component for displaying support ticket priority
|
|
1434
|
+
* as color-coded badges with consistent DaisyUI styling and accessibility features.
|
|
1435
|
+
*
|
|
1436
|
+
* @example
|
|
1437
|
+
* <SupportTicketPriorityBadge :priority="'HIGH'" size="md" />
|
|
1438
|
+
* <SupportTicketPriorityBadge :priority="'CRITICAL'" size="sm" variant="outline" />
|
|
1439
|
+
*/
|
|
1440
|
+
const props = __props;
|
|
1441
|
+
/**
|
|
1442
|
+
* Configuration for each priority badge
|
|
1443
|
+
*/
|
|
1444
|
+
const priorityConfig = {
|
|
1445
|
+
LOW: {
|
|
1446
|
+
color: "badge-neutral",
|
|
1447
|
+
text: "Low",
|
|
1448
|
+
ariaLabel: "Priority: Low priority"
|
|
1449
|
+
},
|
|
1450
|
+
MEDIUM: {
|
|
1451
|
+
color: "badge-neutral",
|
|
1452
|
+
text: "Medium",
|
|
1453
|
+
ariaLabel: "Priority: Medium priority"
|
|
1454
|
+
},
|
|
1455
|
+
HIGH: {
|
|
1456
|
+
color: "badge-neutral",
|
|
1457
|
+
text: "High",
|
|
1458
|
+
ariaLabel: "Priority: High priority"
|
|
1459
|
+
},
|
|
1460
|
+
CRITICAL: {
|
|
1461
|
+
color: "badge-neutral",
|
|
1462
|
+
text: "Critical",
|
|
1463
|
+
ariaLabel: "Priority: Critical priority"
|
|
1464
|
+
}
|
|
1465
|
+
};
|
|
1466
|
+
const getPriorityConfig = (priority) => {
|
|
1467
|
+
const config$1 = priorityConfig[priority];
|
|
1468
|
+
if (!config$1) return {
|
|
1469
|
+
color: "badge-neutral",
|
|
1470
|
+
text: priority || "Unknown",
|
|
1471
|
+
ariaLabel: `Priority: ${priority || "Unknown priority"}`
|
|
1472
|
+
};
|
|
1473
|
+
return config$1;
|
|
1474
|
+
};
|
|
1475
|
+
const config = computed(() => getPriorityConfig(props.priority));
|
|
1476
|
+
const badgeClasses = computed(() => {
|
|
1477
|
+
const baseClasses = ["badge", "text-xs"];
|
|
1478
|
+
baseClasses.push(config.value.color);
|
|
1479
|
+
if (props.size === "sm") baseClasses.push("badge-sm", "text-xs");
|
|
1480
|
+
else if (props.size === "lg") baseClasses.push("badge-lg", "text-sm");
|
|
1481
|
+
else baseClasses.push("text-xs", "sm:text-sm");
|
|
1482
|
+
if (props.variant === "outline") baseClasses.push("badge-outline");
|
|
1483
|
+
return baseClasses.join(" ");
|
|
1484
|
+
});
|
|
1485
|
+
const displayText = computed(() => config.value.text);
|
|
1486
|
+
const ariaLabel = computed(() => config.value.ariaLabel);
|
|
1487
|
+
return (_ctx, _cache) => {
|
|
1488
|
+
return openBlock(), createElementBlock("div", {
|
|
1489
|
+
class: normalizeClass(badgeClasses.value),
|
|
1490
|
+
"aria-label": ariaLabel.value,
|
|
1491
|
+
role: "status"
|
|
1492
|
+
}, toDisplayString(displayText.value), 11, _hoisted_1$4);
|
|
1493
|
+
};
|
|
1494
|
+
}
|
|
1495
|
+
});
|
|
1496
|
+
var SupportTicketPriorityBadge_default = _sfc_main$4;
|
|
1497
|
+
|
|
1498
|
+
//#endregion
|
|
1499
|
+
//#region src/slices/support_ticket/shared/SupportTicketTypeBadge.vue
|
|
1500
|
+
const _hoisted_1$3 = ["aria-label"];
|
|
1501
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
1502
|
+
__name: "SupportTicketTypeBadge",
|
|
1503
|
+
props: {
|
|
1504
|
+
type: {},
|
|
1505
|
+
size: { default: "md" },
|
|
1506
|
+
variant: { default: "default" }
|
|
1507
|
+
},
|
|
1508
|
+
setup(__props) {
|
|
1509
|
+
/**
|
|
1510
|
+
* SupportTicketTypeBadge - A reusable Vue component for displaying support ticket type
|
|
1511
|
+
* as color-coded badges with consistent DaisyUI styling and accessibility features.
|
|
1512
|
+
*
|
|
1513
|
+
* @example
|
|
1514
|
+
* <SupportTicketTypeBadge :type="'BUG'" size="md" />
|
|
1515
|
+
* <SupportTicketTypeBadge :type="'FEATURE_REQUEST'" size="sm" variant="outline" />
|
|
1516
|
+
*/
|
|
1517
|
+
const props = __props;
|
|
1518
|
+
/**
|
|
1519
|
+
* Configuration for each type badge
|
|
1520
|
+
*/
|
|
1521
|
+
const typeConfig = {
|
|
1522
|
+
BUG: {
|
|
1523
|
+
color: "badge-neutral",
|
|
1524
|
+
text: "Bug",
|
|
1525
|
+
ariaLabel: "Type: Bug report requiring fix"
|
|
1526
|
+
},
|
|
1527
|
+
FEATURE_REQUEST: {
|
|
1528
|
+
color: "badge-neutral",
|
|
1529
|
+
text: "Feature",
|
|
1530
|
+
ariaLabel: "Type: New feature request"
|
|
1531
|
+
},
|
|
1532
|
+
IMPROVEMENT: {
|
|
1533
|
+
color: "badge-neutral",
|
|
1534
|
+
text: "Improvement",
|
|
1535
|
+
ariaLabel: "Type: Enhancement to existing feature"
|
|
1536
|
+
},
|
|
1537
|
+
OPERATIONAL: {
|
|
1538
|
+
color: "badge-neutral",
|
|
1539
|
+
text: "Ops",
|
|
1540
|
+
ariaLabel: "Type: Operational/admin work"
|
|
1541
|
+
}
|
|
1542
|
+
};
|
|
1543
|
+
const getTypeConfig = (type) => {
|
|
1544
|
+
const config$1 = typeConfig[type];
|
|
1545
|
+
if (!config$1) return {
|
|
1546
|
+
color: "badge-neutral",
|
|
1547
|
+
text: type || "Unknown",
|
|
1548
|
+
ariaLabel: `Type: ${type || "Unknown type"}`
|
|
1549
|
+
};
|
|
1550
|
+
return config$1;
|
|
1551
|
+
};
|
|
1552
|
+
const config = computed(() => getTypeConfig(props.type));
|
|
1553
|
+
const badgeClasses = computed(() => {
|
|
1554
|
+
const baseClasses = ["badge", "text-xs"];
|
|
1555
|
+
baseClasses.push(config.value.color);
|
|
1556
|
+
if (props.size === "sm") baseClasses.push("badge-sm", "text-xs");
|
|
1557
|
+
else if (props.size === "lg") baseClasses.push("badge-lg", "text-sm");
|
|
1558
|
+
else baseClasses.push("text-xs", "sm:text-sm");
|
|
1559
|
+
if (props.variant === "outline") baseClasses.push("badge-outline");
|
|
1560
|
+
return baseClasses.join(" ");
|
|
1561
|
+
});
|
|
1562
|
+
const displayText = computed(() => config.value.text);
|
|
1563
|
+
const ariaLabel = computed(() => config.value.ariaLabel);
|
|
1564
|
+
return (_ctx, _cache) => {
|
|
1565
|
+
return openBlock(), createElementBlock("div", {
|
|
1566
|
+
class: normalizeClass(badgeClasses.value),
|
|
1567
|
+
"aria-label": ariaLabel.value,
|
|
1568
|
+
role: "status"
|
|
1569
|
+
}, toDisplayString(displayText.value), 11, _hoisted_1$3);
|
|
1570
|
+
};
|
|
1571
|
+
}
|
|
1572
|
+
});
|
|
1573
|
+
var SupportTicketTypeBadge_default = _sfc_main$3;
|
|
1574
|
+
|
|
1575
|
+
//#endregion
|
|
1576
|
+
//#region src/slices/support_ticket/shared/SupportTicketApprovalBadge.vue
|
|
1577
|
+
const _hoisted_1$2 = ["aria-label"];
|
|
1578
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1579
|
+
__name: "SupportTicketApprovalBadge",
|
|
1580
|
+
props: {
|
|
1581
|
+
approvalStatus: {},
|
|
1582
|
+
size: { default: "md" },
|
|
1583
|
+
variant: { default: "default" }
|
|
1584
|
+
},
|
|
1585
|
+
setup(__props) {
|
|
1586
|
+
/**
|
|
1587
|
+
* SupportTicketApprovalBadge - A reusable Vue component for displaying support ticket approval status
|
|
1588
|
+
* as color-coded badges with consistent DaisyUI styling and accessibility features.
|
|
1589
|
+
*
|
|
1590
|
+
* @example
|
|
1591
|
+
* <SupportTicketApprovalBadge :approvalStatus="'PENDING'" size="md" />
|
|
1592
|
+
* <SupportTicketApprovalBadge :approvalStatus="'APPROVED'" size="sm" variant="outline" />
|
|
1593
|
+
*/
|
|
1594
|
+
const props = __props;
|
|
1595
|
+
/**
|
|
1596
|
+
* Configuration for each approval status badge
|
|
1597
|
+
*/
|
|
1598
|
+
const approvalConfig = {
|
|
1599
|
+
PENDING: {
|
|
1600
|
+
color: "badge-warning",
|
|
1601
|
+
text: "Pending",
|
|
1602
|
+
ariaLabel: "Approval: Awaiting staff decision"
|
|
1603
|
+
},
|
|
1604
|
+
APPROVED: {
|
|
1605
|
+
color: "badge-success",
|
|
1606
|
+
text: "Approved",
|
|
1607
|
+
ariaLabel: "Approval: Approved by staff"
|
|
1608
|
+
},
|
|
1609
|
+
REJECTED: {
|
|
1610
|
+
color: "badge-error",
|
|
1611
|
+
text: "Rejected",
|
|
1612
|
+
ariaLabel: "Approval: Rejected by staff"
|
|
1613
|
+
},
|
|
1614
|
+
INTERNAL: {
|
|
1615
|
+
color: "badge-info",
|
|
1616
|
+
text: "Internal",
|
|
1617
|
+
ariaLabel: "Approval: Internal staff ticket"
|
|
1618
|
+
}
|
|
1619
|
+
};
|
|
1620
|
+
const getApprovalConfig = (approvalStatus) => {
|
|
1621
|
+
const config$1 = approvalConfig[approvalStatus];
|
|
1622
|
+
if (!config$1) return {
|
|
1623
|
+
color: "badge-neutral",
|
|
1624
|
+
text: approvalStatus || "Unknown",
|
|
1625
|
+
ariaLabel: `Approval: ${approvalStatus || "Unknown status"}`
|
|
1626
|
+
};
|
|
1627
|
+
return config$1;
|
|
1628
|
+
};
|
|
1629
|
+
const config = computed(() => getApprovalConfig(props.approvalStatus));
|
|
1630
|
+
const badgeClasses = computed(() => {
|
|
1631
|
+
const baseClasses = ["badge", "text-xs"];
|
|
1632
|
+
baseClasses.push(config.value.color);
|
|
1633
|
+
if (props.size === "sm") baseClasses.push("badge-sm", "text-xs");
|
|
1634
|
+
else if (props.size === "lg") baseClasses.push("badge-lg", "text-sm");
|
|
1635
|
+
else baseClasses.push("text-xs", "sm:text-sm");
|
|
1636
|
+
if (props.variant === "outline") baseClasses.push("badge-outline");
|
|
1637
|
+
return baseClasses.join(" ");
|
|
1638
|
+
});
|
|
1639
|
+
const displayText = computed(() => config.value.text);
|
|
1640
|
+
const ariaLabel = computed(() => config.value.ariaLabel);
|
|
1641
|
+
return (_ctx, _cache) => {
|
|
1642
|
+
return openBlock(), createElementBlock("div", {
|
|
1643
|
+
class: normalizeClass(badgeClasses.value),
|
|
1644
|
+
"aria-label": ariaLabel.value,
|
|
1645
|
+
role: "status"
|
|
1646
|
+
}, toDisplayString(displayText.value), 11, _hoisted_1$2);
|
|
1647
|
+
};
|
|
1648
|
+
}
|
|
1649
|
+
});
|
|
1650
|
+
var SupportTicketApprovalBadge_default = _sfc_main$2;
|
|
1651
|
+
|
|
1652
|
+
//#endregion
|
|
1653
|
+
//#region src/slices/support_ticket/utils/formatTicketDate.ts
|
|
1654
|
+
/**
|
|
1655
|
+
* Takes an ISO date string and returns:
|
|
1656
|
+
* - formatted: "Jan 15, 2025"
|
|
1657
|
+
* - relative: "3 days ago" / "2 hours ago" / "just now"
|
|
1658
|
+
* - localTime: "2:30 PM" (user's local time)
|
|
1659
|
+
*/
|
|
1660
|
+
function formatTicketDate(isoString) {
|
|
1661
|
+
const date = new Date(isoString);
|
|
1662
|
+
if (isNaN(date.getTime())) return {
|
|
1663
|
+
formatted: isoString,
|
|
1664
|
+
relative: "",
|
|
1665
|
+
localTime: ""
|
|
1666
|
+
};
|
|
1667
|
+
const formatted = date.toLocaleDateString(void 0, {
|
|
1668
|
+
year: "numeric",
|
|
1669
|
+
month: "short",
|
|
1670
|
+
day: "numeric"
|
|
1671
|
+
});
|
|
1672
|
+
const localTime = date.toLocaleTimeString(void 0, {
|
|
1673
|
+
hour: "numeric",
|
|
1674
|
+
minute: "2-digit"
|
|
1675
|
+
});
|
|
1676
|
+
const diffMs = (/* @__PURE__ */ new Date()).getTime() - date.getTime();
|
|
1677
|
+
const diffSec = Math.floor(diffMs / 1e3);
|
|
1678
|
+
const diffMin = Math.floor(diffSec / 60);
|
|
1679
|
+
const diffHour = Math.floor(diffMin / 60);
|
|
1680
|
+
const diffDay = Math.floor(diffHour / 24);
|
|
1681
|
+
let relative;
|
|
1682
|
+
if (Math.abs(diffSec) < 60) relative = "just now";
|
|
1683
|
+
else if (diffSec < 0) {
|
|
1684
|
+
const sec = Math.abs(diffSec);
|
|
1685
|
+
const min = Math.floor(sec / 60);
|
|
1686
|
+
const hr = Math.floor(min / 60);
|
|
1687
|
+
const day = Math.floor(hr / 24);
|
|
1688
|
+
if (min < 60) relative = `in ${min} minute${min === 1 ? "" : "s"}`;
|
|
1689
|
+
else if (hr < 24) relative = `in ${hr} hour${hr === 1 ? "" : "s"}`;
|
|
1690
|
+
else relative = `in ${day} day${day === 1 ? "" : "s"}`;
|
|
1691
|
+
} else if (diffMin < 60) relative = diffMin === 1 ? "1 minute ago" : `${diffMin} minutes ago`;
|
|
1692
|
+
else if (diffHour < 24) relative = diffHour === 1 ? "1 hour ago" : `${diffHour} hours ago`;
|
|
1693
|
+
else if (diffDay < 30) relative = diffDay === 1 ? "1 day ago" : `${diffDay} days ago`;
|
|
1694
|
+
else {
|
|
1695
|
+
const diffWeeks = Math.floor(diffDay / 7);
|
|
1696
|
+
const diffMonths = Math.floor(diffDay / 30);
|
|
1697
|
+
if (diffWeeks < 4) relative = diffWeeks === 1 ? "1 week ago" : `${diffWeeks} weeks ago`;
|
|
1698
|
+
else if (diffMonths < 12) relative = diffMonths === 1 ? "1 month ago" : `${diffMonths} months ago`;
|
|
1699
|
+
else {
|
|
1700
|
+
const diffYears = Math.floor(diffMonths / 12);
|
|
1701
|
+
relative = diffYears === 1 ? "1 year ago" : `${diffYears} years ago`;
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
return {
|
|
1705
|
+
formatted,
|
|
1706
|
+
relative,
|
|
1707
|
+
localTime
|
|
1708
|
+
};
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
//#endregion
|
|
1712
|
+
//#region src/slices/support_ticket/shared/TimelineItem.vue
|
|
1713
|
+
const _hoisted_1$1 = { class: "flex items-center gap-2 mb-3 flex-wrap" };
|
|
1714
|
+
const _hoisted_2$1 = {
|
|
1715
|
+
key: 0,
|
|
1716
|
+
class: "badge badge-warning badge-sm gap-1 shrink-0",
|
|
1717
|
+
"aria-label": "Internal note"
|
|
1718
|
+
};
|
|
1719
|
+
const _hoisted_3$1 = {
|
|
1720
|
+
key: 1,
|
|
1721
|
+
class: "w-6 h-6 rounded-full bg-primary text-primary-content text-xs flex items-center justify-center shrink-0",
|
|
1722
|
+
"aria-hidden": "true"
|
|
1723
|
+
};
|
|
1724
|
+
const _hoisted_4$1 = { class: "font-semibold text-sm" };
|
|
1725
|
+
const _hoisted_5$1 = { class: "text-base-content/50 text-sm" };
|
|
1726
|
+
const _hoisted_6$1 = { class: "text-sm text-base-content break-words whitespace-pre-wrap" };
|
|
1727
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
1728
|
+
__name: "TimelineItem",
|
|
1729
|
+
props: {
|
|
1730
|
+
authorName: {},
|
|
1731
|
+
createdAt: {},
|
|
1732
|
+
variant: {}
|
|
1733
|
+
},
|
|
1734
|
+
setup(__props) {
|
|
1735
|
+
const props = __props;
|
|
1736
|
+
const authorInitial = computed(() => {
|
|
1737
|
+
return (props.authorName?.trim() || "?").charAt(0).toUpperCase();
|
|
1738
|
+
});
|
|
1739
|
+
const relativeTime = computed(() => {
|
|
1740
|
+
return props.createdAt ? formatTicketDate(props.createdAt).relative : "";
|
|
1741
|
+
});
|
|
1742
|
+
return (_ctx, _cache) => {
|
|
1743
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(["card card-bordered p-4 w-full", __props.variant === "internal" ? "bg-warning/10 border-warning/30" : "bg-base-100"]) }, [createElementVNode("div", _hoisted_1$1, [
|
|
1744
|
+
__props.variant === "internal" ? (openBlock(), createElementBlock("span", _hoisted_2$1, [..._cache[0] || (_cache[0] = [createElementVNode("svg", {
|
|
1745
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1746
|
+
fill: "none",
|
|
1747
|
+
viewBox: "0 0 24 24",
|
|
1748
|
+
"stroke-width": "1.5",
|
|
1749
|
+
stroke: "currentColor",
|
|
1750
|
+
class: "w-3.5 h-3.5"
|
|
1751
|
+
}, [createElementVNode("path", {
|
|
1752
|
+
"stroke-linecap": "round",
|
|
1753
|
+
"stroke-linejoin": "round",
|
|
1754
|
+
d: "M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"
|
|
1755
|
+
})], -1), createTextVNode(" Internal ", -1)])])) : (openBlock(), createElementBlock("span", _hoisted_3$1, toDisplayString(authorInitial.value), 1)),
|
|
1756
|
+
createElementVNode("span", _hoisted_4$1, toDisplayString(__props.authorName), 1),
|
|
1757
|
+
createElementVNode("span", _hoisted_5$1, "· " + toDisplayString(relativeTime.value), 1)
|
|
1758
|
+
]), createElementVNode("div", _hoisted_6$1, [renderSlot(_ctx.$slots, "default")])], 2);
|
|
1759
|
+
};
|
|
1760
|
+
}
|
|
1761
|
+
});
|
|
1762
|
+
var TimelineItem_default = _sfc_main$1;
|
|
1763
|
+
|
|
1764
|
+
//#endregion
|
|
1765
|
+
//#region src/slices/support_ticket/shared/TimelineSystemEvent.vue
|
|
1766
|
+
const _hoisted_1 = { class: "py-2 flex items-start gap-2 text-sm" };
|
|
1767
|
+
const _hoisted_2 = { class: "flex-1 min-w-0 space-y-0.5" };
|
|
1768
|
+
const _hoisted_3 = { class: "flex flex-wrap items-baseline gap-x-2 gap-y-1" };
|
|
1769
|
+
const _hoisted_4 = { class: "text-base-content/60 font-medium" };
|
|
1770
|
+
const _hoisted_5 = { class: "font-semibold text-base-content" };
|
|
1771
|
+
const _hoisted_6 = { class: "badge badge-sm badge-outline border-base-content/20 text-base-content/80 font-normal px-1.5 py-0 capitalize" };
|
|
1772
|
+
const _hoisted_7 = { class: "text-base-content/70" };
|
|
1773
|
+
const _hoisted_8 = { class: "text-base-content/70" };
|
|
1774
|
+
const _hoisted_9 = { class: "line-through text-base-content/50" };
|
|
1775
|
+
const _hoisted_10 = {
|
|
1776
|
+
key: 0,
|
|
1777
|
+
class: "mt-1.5 ml-6 list-disc list-inside text-base-content/70 text-sm space-y-0.5"
|
|
1778
|
+
};
|
|
1779
|
+
const _hoisted_11 = { class: "italic text-base-content/60" };
|
|
1780
|
+
const _hoisted_12 = { class: "line-through text-base-content/50 ml-1" };
|
|
1781
|
+
const _hoisted_13 = {
|
|
1782
|
+
key: 1,
|
|
1783
|
+
class: "ml-1"
|
|
1784
|
+
};
|
|
1785
|
+
const _hoisted_14 = { class: "text-base-content/40 text-xs" };
|
|
1786
|
+
const _hoisted_15 = ["title"];
|
|
1787
|
+
const RECENT_THRESHOLD_HOURS = 18;
|
|
1788
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1789
|
+
__name: "TimelineSystemEvent",
|
|
1790
|
+
props: {
|
|
1791
|
+
author: {},
|
|
1792
|
+
message: {},
|
|
1793
|
+
timestamp: {},
|
|
1794
|
+
action: {},
|
|
1795
|
+
type: {},
|
|
1796
|
+
details: {},
|
|
1797
|
+
oldValue: {},
|
|
1798
|
+
newValue: {},
|
|
1799
|
+
changes: {}
|
|
1800
|
+
},
|
|
1801
|
+
setup(__props) {
|
|
1802
|
+
const props = __props;
|
|
1803
|
+
const showFull = ref(false);
|
|
1804
|
+
const displayAction = computed(() => props.action ?? props.message);
|
|
1805
|
+
const displayDetails = computed(() => {
|
|
1806
|
+
if (props.details) return props.details;
|
|
1807
|
+
if (props.oldValue != null && props.newValue != null) return `${props.oldValue} → ${props.newValue}`;
|
|
1808
|
+
return props.newValue ?? null;
|
|
1809
|
+
});
|
|
1810
|
+
const hasChangeDetails = computed(() => props.oldValue != null && props.newValue != null || props.details != null || props.newValue != null);
|
|
1811
|
+
const detailsPrefix = computed(() => {
|
|
1812
|
+
if (!props.details || props.oldValue == null && props.newValue == null) return null;
|
|
1813
|
+
if (props.details.includes(" · ")) {
|
|
1814
|
+
const parts = props.details.split(" · ");
|
|
1815
|
+
return parts.length > 1 ? parts[0] : null;
|
|
1816
|
+
}
|
|
1817
|
+
return props.details;
|
|
1818
|
+
});
|
|
1819
|
+
/** Use relative time when within ~18 hours, otherwise full date and time */
|
|
1820
|
+
const shortTime = computed(() => {
|
|
1821
|
+
if (!props.timestamp) return "";
|
|
1822
|
+
const { relative, formatted, localTime } = formatTicketDate(props.timestamp);
|
|
1823
|
+
const dateTime = [formatted, localTime].filter(Boolean).join(", ");
|
|
1824
|
+
if (!relative && !dateTime) return "";
|
|
1825
|
+
const date = new Date(props.timestamp);
|
|
1826
|
+
const hoursAgo = (Date.now() - date.getTime()) / (1e3 * 60 * 60);
|
|
1827
|
+
return hoursAgo >= 0 && hoursAgo < RECENT_THRESHOLD_HOURS ? relative : dateTime;
|
|
1828
|
+
});
|
|
1829
|
+
const fullDateTime = computed(() => {
|
|
1830
|
+
if (!props.timestamp) return "";
|
|
1831
|
+
const { formatted, localTime } = formatTicketDate(props.timestamp);
|
|
1832
|
+
return [formatted, localTime].filter(Boolean).join(", ");
|
|
1833
|
+
});
|
|
1834
|
+
const displayTime = computed(() => showFull.value ? fullDateTime.value : shortTime.value);
|
|
1835
|
+
return (_ctx, _cache) => {
|
|
1836
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [_cache[7] || (_cache[7] = createElementVNode("svg", {
|
|
1837
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1838
|
+
fill: "none",
|
|
1839
|
+
viewBox: "0 0 24 24",
|
|
1840
|
+
"stroke-width": "1.5",
|
|
1841
|
+
stroke: "currentColor",
|
|
1842
|
+
class: "w-4 h-4 text-base-content/30 shrink-0 mt-0.5",
|
|
1843
|
+
"aria-hidden": "true"
|
|
1844
|
+
}, [createElementVNode("path", {
|
|
1845
|
+
"stroke-linecap": "round",
|
|
1846
|
+
"stroke-linejoin": "round",
|
|
1847
|
+
d: "M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124a6.57 6.57 0 01.22-.128c.332-.183.582-.495.644-.869l.214-1.281z"
|
|
1848
|
+
}), createElementVNode("path", {
|
|
1849
|
+
"stroke-linecap": "round",
|
|
1850
|
+
"stroke-linejoin": "round",
|
|
1851
|
+
d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
|
|
1852
|
+
})], -1)), createElementVNode("div", _hoisted_2, [
|
|
1853
|
+
createElementVNode("div", _hoisted_3, [
|
|
1854
|
+
createElementVNode("span", _hoisted_4, toDisplayString(__props.author), 1),
|
|
1855
|
+
_cache[5] || (_cache[5] = createElementVNode("span", {
|
|
1856
|
+
class: "text-base-content/40 text-xs",
|
|
1857
|
+
"aria-hidden": "true"
|
|
1858
|
+
}, "·", -1)),
|
|
1859
|
+
createElementVNode("span", _hoisted_5, toDisplayString(displayAction.value), 1),
|
|
1860
|
+
__props.type ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_cache[1] || (_cache[1] = createElementVNode("span", {
|
|
1861
|
+
class: "text-base-content/40 text-xs",
|
|
1862
|
+
"aria-hidden": "true"
|
|
1863
|
+
}, "·", -1)), createElementVNode("span", _hoisted_6, toDisplayString(__props.type), 1)], 64)) : createCommentVNode("v-if", true),
|
|
1864
|
+
__props.changes && __props.changes.length > 1 ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [__props.details ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_cache[2] || (_cache[2] = createElementVNode("span", {
|
|
1865
|
+
class: "text-base-content/40 text-xs",
|
|
1866
|
+
"aria-hidden": "true"
|
|
1867
|
+
}, "·", -1)), createElementVNode("span", _hoisted_7, toDisplayString(__props.details), 1)], 64)) : createCommentVNode("v-if", true)], 64)) : hasChangeDetails.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [_cache[4] || (_cache[4] = createElementVNode("span", {
|
|
1868
|
+
class: "text-base-content/40 text-xs",
|
|
1869
|
+
"aria-hidden": "true"
|
|
1870
|
+
}, "·", -1)), createElementVNode("span", _hoisted_8, [detailsPrefix.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(detailsPrefix.value), 1)], 64)) : createCommentVNode("v-if", true), __props.oldValue != null && __props.newValue != null ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1871
|
+
createElementVNode("span", _hoisted_9, toDisplayString(__props.oldValue), 1),
|
|
1872
|
+
_cache[3] || (_cache[3] = createElementVNode("span", { class: "mx-1 text-base-content/40" }, "→", -1)),
|
|
1873
|
+
createElementVNode("span", null, toDisplayString(__props.newValue), 1)
|
|
1874
|
+
], 64)) : displayDetails.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(displayDetails.value), 1)], 64)) : createCommentVNode("v-if", true)])], 64)) : createCommentVNode("v-if", true)
|
|
1875
|
+
]),
|
|
1876
|
+
__props.changes && __props.changes.length > 1 ? (openBlock(), createElementBlock("ul", _hoisted_10, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.changes, (change, i) => {
|
|
1877
|
+
return openBlock(), createElementBlock("li", { key: i }, [createElementVNode("span", _hoisted_11, toDisplayString(change.action) + ":", 1), change.oldValue != null && change.newValue != null ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1878
|
+
createElementVNode("span", _hoisted_12, toDisplayString(change.oldValue), 1),
|
|
1879
|
+
_cache[6] || (_cache[6] = createElementVNode("span", { class: "mx-1 text-base-content/40" }, "→", -1)),
|
|
1880
|
+
createElementVNode("span", null, toDisplayString(change.newValue), 1)
|
|
1881
|
+
], 64)) : change.newValue != null ? (openBlock(), createElementBlock("span", _hoisted_13, toDisplayString(change.newValue), 1)) : createCommentVNode("v-if", true)]);
|
|
1882
|
+
}), 128))])) : createCommentVNode("v-if", true),
|
|
1883
|
+
createElementVNode("div", _hoisted_14, [createElementVNode("button", {
|
|
1884
|
+
type: "button",
|
|
1885
|
+
class: "cursor-pointer hover:text-base-content/60 hover:underline focus:outline-none focus:underline",
|
|
1886
|
+
title: fullDateTime.value,
|
|
1887
|
+
onClick: _cache[0] || (_cache[0] = ($event) => showFull.value = !showFull.value)
|
|
1888
|
+
}, toDisplayString(displayTime.value), 9, _hoisted_15)])
|
|
1889
|
+
])]);
|
|
1890
|
+
};
|
|
1891
|
+
}
|
|
1892
|
+
});
|
|
1893
|
+
var TimelineSystemEvent_default = _sfc_main;
|
|
1348
1894
|
|
|
1349
1895
|
//#endregion
|
|
1350
|
-
export {
|
|
1351
|
-
//# sourceMappingURL=
|
|
1896
|
+
export { SupportTicketTypeBadge_default as a, formatCustomerCreditValue as c, ConfirmDialog_default as d, SupportTicketApprovalBadge_default as i, formatStaffCreditValue as l, TimelineItem_default as n, SupportTicketPriorityBadge_default as o, formatTicketDate as r, InlineAttachments_default as s, TimelineSystemEvent_default as t, ImageModal_default as u };
|
|
1897
|
+
//# sourceMappingURL=TimelineSystemEvent-D58zN850.js.map
|