1import { _ as T, a as $ } from "./PurchasedHours-BoySTGHK.js"; 2import { _ as q } from "./useBalanceEdit-rlBdzA1a.js"; 3import { _ as H } from "./Table-D1P44re1.js"; 4import { _ as D } from "./TableSkeleton-CBAKxbJw.js"; 5import { a as y, t as N } from "./functions-DLrKIvnr.js"; 6import { j as k, z as V, o as c, i as A, f as o, e as l, u as n, $ as C, a as s, t as a, d as p, c as m, F as g, b as v, q as M, G as B, g as O, n as E } from "./app-yg_pP4S4.js"; 7import { C as U } from "./XMarkIcon-C7ztHuKP.js"; 8import { _ as Y } from "./DashboardLayout-CXf_hhYT.js"; 9import "./BaseButton-DP1PFEmO.js"; 10import "./BaseInput-DrEncIoW.js"; 11import "./BaseListbox-BuI0rG6W.js"; 12import "./modelWrapper-D0DowOi8.js"; 13import "./LoaderIcon-BfI_LFZK.js"; 14import "./_plugin-vue_export-helper-DlAUqK2U.js"; 15import "./index-CDyB1Hog.js"; 16import "./listbox-BVei8WBz.js"; 17import "./form-BcDj1t5Y.js"; 18import "./use-text-value-9Z6g_4jd.js"; 19import "./ChevronDownIcon-DvXuQ_5B.js"; 20import "./CheckIcon-Bb6ppPFl.js"; 21import "./useDecimalInput-CrOHywEQ.js"; 22import "./menu-DpWDC0YJ.js"; 23import "./use-tree-walker-DC0osvAV.js"; 24import "./PencilIcon-DF7D2KxS.js"; 25import "./popover-DTQdCRwt.js"; 26import "./SearchInput-DrxM339o.js"; 27import "./TablePagination-CoQin-sh.js"; 28import "./ChevronUpDownIcon-D7fhXTZr.js"; 29import "./CheckIcon-CfE0icDF.js"; 30import "./LiveChat-BEmWJs6j.js"; 31import "./ApplicationLogo-D4QkytOJ.js"; 32import "./UserAvatar-B3-R1wxh.js"; 33import "./consts-7Qk9bpse.js"; 34import "./ModalConfirmation-BptK8hn4.js"; 35import "./index-BF2h0ubX.js"; 36import "./ChevronRightIcon-f6ucdGu7.js"; 37import "./ArrowUpIcon-c4MStV6E.js"; 38import "./BaseModal-lnT_D81c.js"; 39import "./EyeIcon-C30yl1ND.js"; 40import "./HomeIcon-B7IW8yDA.js"; 41import "./MinusIcon-C5ZUuSoW.js"; 42import "./vue-transitions-DxcThSkT.js"; 43import "./ClockIcon-DWc8x_ii.js"; 44const F = { class: "inline-flex flex-col items-start justify-start gap-1 px-6 py-4 max-lg:table-cell max-lg:w-full max-lg:max-w-0 max-lg:py-3 max-lg:pl-4 max-lg:pr-4 sm:max-lg:px-6" }, I = { class: "text-sm lg:hidden" }, z = { class: "flex items-baseline justify-between gap-3" }, G = { class: "line-clamp-2 font-medium text-gray-900" }, L = { class: "shrink-0 text-gray-900" }, P = { class: "mt-1 truncate text-xs text-gray-500" }, R = { class: "text-sm font-medium leading-tight text-gray-900 max-lg:hidden" }, J = { class: "text-sm font-normal leading-tight text-gray-400 max-lg:hidden" }, K = { key: 0 }, Q = { key: 1 }, W = { class: "max-lg:hidden" }, X = { class: "py-4 pr-6 text-sm font-medium text-gray-900" }, Z = { class: "max-lg:hidden" }, tt = { class: "py-4 pr-6 text-sm text-gray-500" }, et = { class: "max-lg:hidden" }, st = { class: "py-4 pr-6 text-sm text-gray-500" }, at = { class: "mb-3 text-xl font-semibold text-gray-900" }, rt = { __name: "UsedHours", props: { usedTime: Object }, setup(i) { 45 const u = B(""), { t: r } = k(), f = O(() => [{ key: "details", label: r("Details"), showing: true, position: 1 }, { key: "request", label: r("Request"), showing: true, position: 2 }, { key: "duration", label: r("Duration"), showing: true, position: 3 }, { key: "created_at", label: r("Created at"), showing: true, position: 4 }]), h = (t) => { 46 const d = Object.assign({ ...route().params }, t); 47 return M.visit(route(route().current(), d), { preserveScroll: true, preserveState: true, only: ["usedTime"] }); 48 }, b = (t) => N("hours", t % 1 === 0 ? Math.floor(t) : Number(t), true), w = (t) => t.transactionable_type === "App\\Models\\Service", S = (t) => t.transactionable_type === "App\\Models\\TimeEntry", x = (t) => w(t) ? t.transactionable.name : S(t) ? t.transactionable.description : t.notes || j(t.type), j = (t) => ({ deduct: r("Deducted"), adjusted_deduct: r("Adjusted deduction"), expire: r("Expired"), adjusted_expire: r("Adjusted expiration") })[t] || t; 49 return V(u, _.debounce((t) => { 50 h({ search: t }); 51 }, 500)), (t, d) => (c(), A(q, { modelValue: u.value, "onUpdate:modelValue": d[0] || (d[0] = (e) => u.value = e), title: t.$t("Used time") }, { default: o(() => [l(n(C), { data: "usedTime" }, { fallback: o(() => [l(D, { columns: 4, rows: 5 })]), default: o(() => [l(H, { data: i.usedTime, columns: f.value, paginated: "", "sortable-columns": ["created_at"], class: "-mx-6 max-sm:-mx-4 max-lg:[&_thead]:hidden", onSort
51Updated: h }, { details: o(({ item: e }) => { 52 var _a, _b, _c, _d, _e, _f; 53 return [s("td", F, [s("div", I, [s("div", z, [s("span", G, a(x(e) || ((_b = (_a = e.transactionable) == null ? void 0 : _a.request) == null ? void 0 : _b.title)), 1), s("span", L, a(b(e.amount)), 1)]), s("p", P, [p(a(n(y)(e.created_at, "MMM D, YYYY")) + " ", 1), x(e) && ((_d = (_c = e.transactionable) == null ? void 0 : _c.request) == null ? void 0 : _d.title) ? (c(), m(g, { key: 0 }, [p(" \xB7 " + a(e.transactionable.request.title), 1)], 64)) : v("", true), ((_e = e.transactionable) == null ? void 0 : _e.user) ? (c(), m(g, { key: 1 }, [p(" \xB7 " + a(e.transactionable.user.name), 1)], 64)) : v("", true)])]), s("div", R, a(x(e)), 1), s("div", J, [((_f = e.transactionable) == null ? void 0 : _f.user) ? (c(), m("span", K, a(e.transactionable.user.name), 1)) : (c(), m("span", Q, a(e.notes), 1))])])]; 54 }), request: o(({ item: e }) => { 55 var _a, _b; 56 return [s("td", W, [s("div", X, [s("span", null, a((_b = (_a = e.transactionable) == null ? void 0 : _a.request) == null ? void 0 : _b.title), 1)])])]; 57 }), duration: o(({ item: { amount: e } }) => [s("td", Z, [s("div", tt, [s("span", null, a(b(e)), 1)])])]), created_at: o(({ item: e }) => [s("td", et, [s("div", st, [s("span", null, a(n(y)(e.created_at)), 1)])])]), "empty-state": o(() => [l(n(U), { class: "mx-auto mb-5 h-12 w-12 stroke-1 text-gray-400" }), s("h3", at, a(u.value ? n(r)("No results found") : n(r)("No used time yet")), 1)]), _: 1 }, 8, ["data", "columns"])]), _: 1 })]), _: 1 }, 8, ["modelValue", "title"])); 58} }, ot = { class: "space-y-6" }, Qt = { __name: "HourIndex", props: { hourStats: Object, usedTime: Object, purchasedHours: Object }, setup(i) { 59 const { t: u } = k(), r = [{ label: u("Hours") }]; 60 return (f, h) => (c(), m(g, null, [l(n(E), { title: n(u)("Hours") }, null, 8, ["title"]), l(Y, { breadcrumbs: r, "wrapper-class": "bg-transparent shadow-none overflow-visible" }, { header: o(() => [p(a(n(u)("Hours")), 1)]), before: o(() => { 61 var _a, _b, _c, _d, _e; 62 return [l($, { "remaining-hours": (_a = i.hourStats) == null ? void 0 : _a.total.remaining, "purchased-hours": (_b = i.hourStats) == null ? void 0 : _b.total.purchased, "used-hours": (_c = i.hourStats) == null ? void 0 : _c.total.used, "expiring-hours": (_d = i.hourStats) == null ? void 0 : _d.recurrent.amount_expiring, "expiring-at": (_e = i.hourStats) == null ? void 0 : _e.recurrent.next_expiration, "hour-metrics": i.hourStats }, null, 8, ["remaining-hours", "purchased-hours", "used-hours", "expiring-hours", "expiring-at", "hour-metrics"])]; 63 }), default: o(() => [s("div", ot, [l(rt, { "used-time": i.usedTime }, null, 8, ["used-time"]), l(T, { "purchased-hours": i.purchasedHours }, null, 8, ["purchased-hours"])])]), _: 1 })], 64)); 64} }; 65export { 66 Qt as default 67};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.