oceanhelm 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/oceanhelm.es.js +1218 -817
- package/dist/oceanhelm.es.js.map +1 -1
- package/dist/oceanhelm.umd.js +1 -1
- package/dist/oceanhelm.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/ConfigurableSidebar.vue +1 -2
- package/src/components/CrewManagement.vue +995 -40
- package/src/utils/sidebarConfig.js +7 -0
package/dist/oceanhelm.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { openBlock as
|
|
1
|
+
import { openBlock as l, createElementBlock as r, normalizeClass as b, createElementVNode as t, toDisplayString as a, createCommentVNode as c, Fragment as f, renderList as g, withModifiers as D, createTextVNode as w, renderSlot as L, withDirectives as h, vShow as A, normalizeStyle as N, createStaticVNode as x, vModelText as k, vModelSelect as _, vModelCheckbox as E } from "vue";
|
|
2
2
|
const S = (s, e) => {
|
|
3
|
-
const
|
|
4
|
-
for (const [
|
|
5
|
-
|
|
6
|
-
return
|
|
7
|
-
},
|
|
3
|
+
const d = s.__vccOpts || s;
|
|
4
|
+
for (const [p, n] of e)
|
|
5
|
+
d[p] = n;
|
|
6
|
+
return d;
|
|
7
|
+
}, O = {
|
|
8
8
|
name: "ConfigurableSidebar",
|
|
9
9
|
props: {
|
|
10
10
|
// Brand configuration
|
|
@@ -82,92 +82,89 @@ const S = (s, e) => {
|
|
|
82
82
|
},
|
|
83
83
|
// Responsive behavior
|
|
84
84
|
initializeResponsiveBehavior() {
|
|
85
|
-
const s = document.getElementById("sidebarToggle"), e = document.getElementById("sidebar"),
|
|
86
|
-
!s || !e || !
|
|
87
|
-
e.classList.toggle("active"),
|
|
88
|
-
}), document.addEventListener("click", (
|
|
89
|
-
const n = e.contains(
|
|
90
|
-
!n && !
|
|
85
|
+
const s = document.getElementById("sidebarToggle"), e = document.getElementById("sidebar"), d = document.getElementById("content");
|
|
86
|
+
!s || !e || !d || (window.innerWidth >= 768 && (e.classList.toggle("active"), d.classList.toggle("active")), s.addEventListener("click", () => {
|
|
87
|
+
e.classList.toggle("active"), d.classList.toggle("active");
|
|
88
|
+
}), document.addEventListener("click", (p) => {
|
|
89
|
+
const n = e.contains(p.target), o = s.contains(p.target);
|
|
90
|
+
!n && !o && window.innerWidth < 768 && e.classList.contains("active") && (e.classList.remove("active"), d.classList.remove("active"));
|
|
91
91
|
}));
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
emits: ["navigate", "action", "item-click"]
|
|
95
|
-
},
|
|
95
|
+
}, U = {
|
|
96
96
|
key: 0,
|
|
97
97
|
class: "logo d-flex align-items-center left"
|
|
98
|
-
}, j = { class: "list-unstyled components mt-4" },
|
|
98
|
+
}, $ = { style: { "margin-left": "45px" } }, j = { class: "list-unstyled components mt-4" }, B = ["onClick"], H = ["href", "onClick"], Q = ["onClick"], J = {
|
|
99
99
|
class: "dropdown-toggle",
|
|
100
100
|
type: "button",
|
|
101
101
|
"data-bs-toggle": "dropdown",
|
|
102
102
|
"aria-expanded": "false"
|
|
103
|
-
},
|
|
103
|
+
}, W = {
|
|
104
104
|
class: "dropdown-menu",
|
|
105
105
|
"aria-labelledby": "dropdownMenuLink"
|
|
106
|
-
},
|
|
106
|
+
}, K = ["onClick"], z = {
|
|
107
107
|
key: 3,
|
|
108
108
|
class: "dropdown-divider"
|
|
109
|
-
},
|
|
110
|
-
function Y(s, e,
|
|
111
|
-
return
|
|
109
|
+
}, G = { key: 4 };
|
|
110
|
+
function Y(s, e, d, p, n, o) {
|
|
111
|
+
return l(), r("nav", {
|
|
112
112
|
id: "sidebar",
|
|
113
|
-
class:
|
|
113
|
+
class: b(o.sidebarClasses)
|
|
114
114
|
}, [
|
|
115
|
-
|
|
116
|
-
t("
|
|
117
|
-
|
|
118
|
-
}, null, 2),
|
|
119
|
-
t("span", null, a(u.brandName), 1)
|
|
120
|
-
])) : m("", !0),
|
|
115
|
+
d.showLogo ? (l(), r("div", U, [
|
|
116
|
+
t("span", $, a(d.brandName), 1)
|
|
117
|
+
])) : c("", !0),
|
|
121
118
|
t("ul", j, [
|
|
122
|
-
(
|
|
123
|
-
key:
|
|
124
|
-
class:
|
|
125
|
-
onClick: (y) =>
|
|
119
|
+
(l(!0), r(f, null, g(o.filteredMenuItems, (i, m) => (l(), r("li", {
|
|
120
|
+
key: m,
|
|
121
|
+
class: b({ active: i.active, dropdown: i.type === "dropdown" }),
|
|
122
|
+
onClick: (y) => o.handleItemClick(i)
|
|
126
123
|
}, [
|
|
127
|
-
i.type === "link" ? (
|
|
124
|
+
i.type === "link" ? (l(), r("a", {
|
|
128
125
|
key: 0,
|
|
129
126
|
href: i.href || "#",
|
|
130
|
-
onClick: D((y) =>
|
|
127
|
+
onClick: D((y) => o.handleNavigation(i), ["prevent"])
|
|
131
128
|
}, [
|
|
132
|
-
i.icon ? (
|
|
129
|
+
i.icon ? (l(), r("i", {
|
|
133
130
|
key: 0,
|
|
134
|
-
class:
|
|
135
|
-
}, null, 2)) :
|
|
136
|
-
|
|
137
|
-
], 8,
|
|
131
|
+
class: b(i.icon)
|
|
132
|
+
}, null, 2)) : c("", !0),
|
|
133
|
+
w(" " + a(i.label), 1)
|
|
134
|
+
], 8, H)) : i.type === "button" ? (l(), r("a", {
|
|
138
135
|
key: 1,
|
|
139
|
-
onClick: D((y) =>
|
|
136
|
+
onClick: D((y) => o.handleAction(i), ["prevent"]),
|
|
140
137
|
style: { cursor: "pointer" }
|
|
141
138
|
}, [
|
|
142
|
-
i.icon ? (
|
|
139
|
+
i.icon ? (l(), r("i", {
|
|
143
140
|
key: 0,
|
|
144
|
-
class:
|
|
145
|
-
}, null, 2)) :
|
|
146
|
-
|
|
147
|
-
], 8,
|
|
148
|
-
t("a",
|
|
149
|
-
i.icon ? (
|
|
141
|
+
class: b(i.icon)
|
|
142
|
+
}, null, 2)) : c("", !0),
|
|
143
|
+
w(" " + a(i.label), 1)
|
|
144
|
+
], 8, Q)) : i.type === "dropdown" ? (l(), r(f, { key: 2 }, [
|
|
145
|
+
t("a", J, [
|
|
146
|
+
i.icon ? (l(), r("i", {
|
|
150
147
|
key: 0,
|
|
151
|
-
class:
|
|
152
|
-
}, null, 2)) :
|
|
153
|
-
|
|
148
|
+
class: b(i.icon)
|
|
149
|
+
}, null, 2)) : c("", !0),
|
|
150
|
+
w(" " + a(i.label), 1)
|
|
154
151
|
]),
|
|
155
|
-
t("div",
|
|
156
|
-
(
|
|
157
|
-
key:
|
|
152
|
+
t("div", W, [
|
|
153
|
+
(l(!0), r(f, null, g(o.getFilteredChildren(i), (y, P) => (l(), r("a", {
|
|
154
|
+
key: P,
|
|
158
155
|
class: "dropdown-item black",
|
|
159
|
-
onClick: D((
|
|
156
|
+
onClick: D((T) => o.handleAction(y), ["prevent"]),
|
|
160
157
|
style: { cursor: "pointer" }
|
|
161
|
-
}, a(y.label), 9,
|
|
158
|
+
}, a(y.label), 9, K))), 128))
|
|
162
159
|
])
|
|
163
|
-
], 64)) : i.type === "separator" ? (
|
|
164
|
-
], 10,
|
|
160
|
+
], 64)) : i.type === "separator" ? (l(), r("div", z)) : i.type === "text" ? (l(), r("a", G, a(i.label), 1)) : c("", !0)
|
|
161
|
+
], 10, B))), 128))
|
|
165
162
|
]),
|
|
166
|
-
|
|
163
|
+
L(s.$slots, "footer")
|
|
167
164
|
], 2);
|
|
168
165
|
}
|
|
169
|
-
const
|
|
170
|
-
const
|
|
166
|
+
const X = /* @__PURE__ */ S(O, [["render", Y]]);
|
|
167
|
+
const Z = {
|
|
171
168
|
name: "VesselList",
|
|
172
169
|
props: {
|
|
173
170
|
// Required props
|
|
@@ -287,100 +284,100 @@ const X = {
|
|
|
287
284
|
return `status-${(s == null ? void 0 : s.toLowerCase()) || ""}`;
|
|
288
285
|
},
|
|
289
286
|
getDuration(s, e) {
|
|
290
|
-
const
|
|
287
|
+
const d = /* @__PURE__ */ new Date(), p = new Date(s), n = d - p;
|
|
291
288
|
if (n < 0)
|
|
292
289
|
return "Invalid (future date)";
|
|
293
|
-
const
|
|
290
|
+
const o = Math.floor(n / (1e3 * 60 * 60)), i = Math.floor(o / 24), m = o % 24;
|
|
294
291
|
let y = "";
|
|
295
|
-
return i > 0 && (y += `${i} day${i > 1 ? "s" : ""}`),
|
|
292
|
+
return i > 0 && (y += `${i} day${i > 1 ? "s" : ""}`), m > 0 && (y += (y ? " " : "") + `${m} hr${m > 1 ? "s" : ""}`), y || "0 hr";
|
|
296
293
|
},
|
|
297
294
|
setVesselDate(s) {
|
|
298
295
|
this.$emit("date-change", s);
|
|
299
296
|
},
|
|
300
297
|
grantAccess(s) {
|
|
301
|
-
const { role: e, vessel:
|
|
302
|
-
return e === "owner" || e === "staff" || e === "captain" &&
|
|
298
|
+
const { role: e, vessel: d } = this.userProfile;
|
|
299
|
+
return e === "owner" || e === "staff" || e === "captain" && d === s.name;
|
|
303
300
|
},
|
|
304
301
|
getDaysToExpiry(s) {
|
|
305
302
|
if (!s)
|
|
306
303
|
return null;
|
|
307
|
-
const e = /* @__PURE__ */ new Date(),
|
|
308
|
-
return Math.ceil(
|
|
304
|
+
const e = /* @__PURE__ */ new Date(), p = new Date(s) - e;
|
|
305
|
+
return Math.ceil(p / (1e3 * 60 * 60 * 24));
|
|
309
306
|
},
|
|
310
307
|
getExpiryClass(s) {
|
|
311
308
|
const e = this.getDaysToExpiry(s);
|
|
312
309
|
return e === null ? "" : e < 30 ? "cert-critical" : e < 90 ? "cert-warning" : "";
|
|
313
310
|
}
|
|
314
311
|
}
|
|
315
|
-
},
|
|
312
|
+
}, ee = { class: "row mb-3" }, te = { class: "col-md-4" }, se = { class: "card-body d-flex align-items-center" }, ie = { class: "mt-2 mb-0" }, ne = { class: "col-md-4" }, oe = { class: "card-body d-flex align-items-center" }, le = { class: "mt-2 mb-0" }, re = {
|
|
316
313
|
key: 0,
|
|
317
314
|
class: "col-md-4"
|
|
318
|
-
},
|
|
315
|
+
}, ae = { class: "d-flex justify-content-between align-items-center mb-4" }, de = {
|
|
319
316
|
key: 0,
|
|
320
317
|
class: "alert alert-info mb-3",
|
|
321
318
|
role: "alert"
|
|
322
|
-
},
|
|
319
|
+
}, ue = {
|
|
323
320
|
key: 1,
|
|
324
321
|
class: "text-center py-4"
|
|
325
|
-
},
|
|
322
|
+
}, ce = {
|
|
326
323
|
key: 2,
|
|
327
324
|
class: "alert alert-primary",
|
|
328
325
|
role: "alert"
|
|
329
|
-
},
|
|
326
|
+
}, me = {
|
|
330
327
|
key: 3,
|
|
331
328
|
class: "alert alert-warning",
|
|
332
329
|
role: "alert"
|
|
333
|
-
},
|
|
330
|
+
}, ve = { class: "alert-heading" }, pe = { class: "mb-0" }, he = {
|
|
334
331
|
key: 4,
|
|
335
332
|
class: "row"
|
|
336
|
-
}, fe = ["onClick"],
|
|
333
|
+
}, fe = ["onClick"], ge = { class: "card-body d-flex align-items-center" }, be = { class: "flex-grow-1" }, ye = { class: "d-flex justify-content-between align-items-center mb-2" }, we = { class: "card-title mb-0" }, ke = { class: "row" }, Ce = { class: "col-6" }, _e = { class: "mb-0" }, De = {
|
|
337
334
|
key: 0,
|
|
338
335
|
class: "col-6"
|
|
339
|
-
},
|
|
336
|
+
}, xe = { class: "mb-0" }, Se = { class: "mb-0" }, Ae = {
|
|
340
337
|
key: 1,
|
|
341
338
|
class: "col-6"
|
|
342
|
-
}, Pe = { class: "text-muted" },
|
|
343
|
-
function Re(s, e,
|
|
344
|
-
return
|
|
345
|
-
t("div",
|
|
346
|
-
t("div",
|
|
339
|
+
}, Pe = { class: "text-muted" }, Te = ["onClick"], qe = { class: "action-icon v-left delete" }, Ie = ["onClick"], Fe = ["onClick"];
|
|
340
|
+
function Re(s, e, d, p, n, o) {
|
|
341
|
+
return l(), r(f, null, [
|
|
342
|
+
t("div", ee, [
|
|
343
|
+
t("div", te, [
|
|
347
344
|
t("div", {
|
|
348
|
-
class:
|
|
349
|
-
onClick: e[0] || (e[0] = (i) =>
|
|
345
|
+
class: b(["card border-0 shadow-sm", { "border-primary border-2": n.activeFilter === "Active" }]),
|
|
346
|
+
onClick: e[0] || (e[0] = (i) => o.filterVessels("Active")),
|
|
350
347
|
style: { cursor: "pointer" }
|
|
351
348
|
}, [
|
|
352
|
-
t("div",
|
|
349
|
+
t("div", se, [
|
|
353
350
|
e[5] || (e[5] = t("div", { class: "rounded-circle bg-primary bg-opacity-10 p-3 me-3" }, [
|
|
354
351
|
t("i", { class: "bi bi-check-circle-fill text-primary fs-4" })
|
|
355
352
|
], -1)),
|
|
356
353
|
t("div", null, [
|
|
357
354
|
e[4] || (e[4] = t("h6", { class: "mb-0" }, "Active Vessels", -1)),
|
|
358
|
-
t("h3",
|
|
355
|
+
t("h3", ie, a(o.activeVesselsCount), 1)
|
|
359
356
|
])
|
|
360
357
|
])
|
|
361
358
|
], 2)
|
|
362
359
|
]),
|
|
363
|
-
t("div",
|
|
360
|
+
t("div", ne, [
|
|
364
361
|
t("div", {
|
|
365
|
-
class:
|
|
366
|
-
onClick: e[1] || (e[1] = (i) =>
|
|
362
|
+
class: b(["card border-0 shadow-sm", { "border-secondary border-2": n.activeFilter === "Inactive" }]),
|
|
363
|
+
onClick: e[1] || (e[1] = (i) => o.filterVessels("Inactive")),
|
|
367
364
|
style: { cursor: "pointer" }
|
|
368
365
|
}, [
|
|
369
|
-
t("div",
|
|
366
|
+
t("div", oe, [
|
|
370
367
|
e[7] || (e[7] = t("div", { class: "rounded-circle bg-secondary bg-opacity-10 p-3 me-3" }, [
|
|
371
368
|
t("i", { class: "bi bi-pause-circle-fill text-secondary fs-4" })
|
|
372
369
|
], -1)),
|
|
373
370
|
t("div", null, [
|
|
374
371
|
e[6] || (e[6] = t("h6", { class: "mb-0" }, "Inactive", -1)),
|
|
375
|
-
t("h3",
|
|
372
|
+
t("h3", le, a(o.inactiveVesselsCount), 1)
|
|
376
373
|
])
|
|
377
374
|
])
|
|
378
375
|
], 2)
|
|
379
376
|
]),
|
|
380
|
-
|
|
377
|
+
o.canAddVessel ? (l(), r("div", re, [
|
|
381
378
|
t("div", {
|
|
382
379
|
class: "card border-0 shadow-sm",
|
|
383
|
-
onClick: e[2] || (e[2] = (...i) =>
|
|
380
|
+
onClick: e[2] || (e[2] = (...i) => o.handleAddVessel && o.handleAddVessel(...i)),
|
|
384
381
|
style: { cursor: "pointer" }
|
|
385
382
|
}, e[8] || (e[8] = [
|
|
386
383
|
t("div", { class: "card-body d-flex align-items-center" }, [
|
|
@@ -392,28 +389,28 @@ function Re(s, e, u, b, n, r) {
|
|
|
392
389
|
])
|
|
393
390
|
], -1)
|
|
394
391
|
]))
|
|
395
|
-
])) :
|
|
392
|
+
])) : c("", !0)
|
|
396
393
|
]),
|
|
397
|
-
t("div",
|
|
394
|
+
t("div", ae, [
|
|
398
395
|
e[10] || (e[10] = t("h4", { class: "mb-0" }, [
|
|
399
396
|
t("i", { class: "bi bi-ship me-2" }),
|
|
400
|
-
|
|
397
|
+
w("Registered Vessels")
|
|
401
398
|
], -1)),
|
|
402
|
-
n.activeFilter !== "All" ? (
|
|
399
|
+
n.activeFilter !== "All" ? (l(), r("button", {
|
|
403
400
|
key: 0,
|
|
404
401
|
class: "btn btn-sm btn-outline-secondary",
|
|
405
|
-
onClick: e[3] || (e[3] = (...i) =>
|
|
402
|
+
onClick: e[3] || (e[3] = (...i) => o.clearFilter && o.clearFilter(...i))
|
|
406
403
|
}, e[9] || (e[9] = [
|
|
407
404
|
t("i", { class: "bi bi-x-circle me-1" }, null, -1),
|
|
408
|
-
|
|
409
|
-
]))) :
|
|
405
|
+
w("Clear Filter ", -1)
|
|
406
|
+
]))) : c("", !0)
|
|
410
407
|
]),
|
|
411
|
-
n.activeFilter !== "All" ? (
|
|
412
|
-
e[11] || (e[11] =
|
|
408
|
+
n.activeFilter !== "All" ? (l(), r("div", de, [
|
|
409
|
+
e[11] || (e[11] = w(" Showing ", -1)),
|
|
413
410
|
t("strong", null, a(n.activeFilter), 1),
|
|
414
|
-
|
|
415
|
-
])) :
|
|
416
|
-
|
|
411
|
+
w(" vessels (" + a(o.filteredVessels.length) + ") ", 1)
|
|
412
|
+
])) : c("", !0),
|
|
413
|
+
d.loading ? (l(), r("div", ue, e[12] || (e[12] = [
|
|
417
414
|
t("div", {
|
|
418
415
|
class: "spinner-border text-primary",
|
|
419
416
|
role: "status"
|
|
@@ -421,54 +418,54 @@ function Re(s, e, u, b, n, r) {
|
|
|
421
418
|
t("span", { class: "visually-hidden" }, "Loading...")
|
|
422
419
|
], -1),
|
|
423
420
|
t("p", { class: "mt-2" }, "Loading vessels...", -1)
|
|
424
|
-
]))) : !
|
|
421
|
+
]))) : !o.filteredVessels.length && n.activeFilter === "All" ? (l(), r("div", ce, e[13] || (e[13] = [
|
|
425
422
|
t("h4", { class: "alert-heading" }, "Empty Fleet!", -1),
|
|
426
423
|
t("p", null, "You have an empty fleet, you have not added any vessel yet.", -1),
|
|
427
424
|
t("hr", null, null, -1),
|
|
428
425
|
t("p", { class: "mb-0" }, "Click on the add vessel button above, to start adding vessels to your fleet", -1)
|
|
429
|
-
]))) : !
|
|
430
|
-
t("h4",
|
|
431
|
-
t("p",
|
|
432
|
-
])) : (
|
|
433
|
-
(
|
|
426
|
+
]))) : !o.filteredVessels.length && n.activeFilter !== "All" ? (l(), r("div", me, [
|
|
427
|
+
t("h4", ve, "No " + a(n.activeFilter) + " Vessels", 1),
|
|
428
|
+
t("p", pe, "There are no " + a(n.activeFilter.toLowerCase()) + " vessels in your fleet.", 1)
|
|
429
|
+
])) : (l(), r("div", he, [
|
|
430
|
+
(l(!0), r(f, null, g(o.filteredVessels, (i) => (l(), r("div", {
|
|
434
431
|
class: "col-lg-6",
|
|
435
432
|
key: i.registrationNumber || i.id
|
|
436
433
|
}, [
|
|
437
434
|
t("div", {
|
|
438
435
|
class: "vessel-card",
|
|
439
|
-
onClick: (
|
|
436
|
+
onClick: (m) => o.handleVesselClick(i)
|
|
440
437
|
}, [
|
|
441
|
-
t("div",
|
|
438
|
+
t("div", ge, [
|
|
442
439
|
e[17] || (e[17] = t("div", { class: "vessel-icon v-left" }, [
|
|
443
440
|
t("i", { class: "fas fa-ship" })
|
|
444
441
|
], -1)),
|
|
445
|
-
t("div",
|
|
446
|
-
t("div",
|
|
447
|
-
t("h5",
|
|
442
|
+
t("div", be, [
|
|
443
|
+
t("div", ye, [
|
|
444
|
+
t("h5", we, a(i.name), 1),
|
|
448
445
|
t("span", {
|
|
449
|
-
class:
|
|
446
|
+
class: b(["vessel-status", o.statusClass(i.status)])
|
|
450
447
|
}, a(i.status), 3)
|
|
451
448
|
]),
|
|
452
|
-
t("div",
|
|
453
|
-
t("div",
|
|
449
|
+
t("div", ke, [
|
|
450
|
+
t("div", Ce, [
|
|
454
451
|
e[14] || (e[14] = t("small", { class: "text-muted" }, "Registration #:", -1)),
|
|
455
|
-
t("p",
|
|
452
|
+
t("p", _e, a(i.registrationNumber), 1)
|
|
456
453
|
]),
|
|
457
|
-
i.date ? (
|
|
458
|
-
i.status === "Active" ? (
|
|
454
|
+
i.date ? (l(), r("div", De, [
|
|
455
|
+
i.status === "Active" ? (l(), r(f, { key: 0 }, [
|
|
459
456
|
e[15] || (e[15] = t("small", { class: "text-muted" }, "Active Duration:", -1)),
|
|
460
|
-
t("p",
|
|
461
|
-
], 64)) : (
|
|
457
|
+
t("p", xe, a(o.getDuration(i.date, i.registrationNumber)), 1)
|
|
458
|
+
], 64)) : (l(), r(f, { key: 1 }, [
|
|
462
459
|
e[16] || (e[16] = t("small", { class: "text-muted" }, "Inactive Duration:", -1)),
|
|
463
|
-
t("p",
|
|
460
|
+
t("p", Se, a(o.getDuration(i.date, i.registrationNumber)), 1)
|
|
464
461
|
], 64))
|
|
465
|
-
])) : (
|
|
462
|
+
])) : (l(), r("div", Ae, [
|
|
466
463
|
t("small", Pe, a(i.status) + " Duration:", 1),
|
|
467
464
|
t("button", {
|
|
468
465
|
type: "button",
|
|
469
466
|
class: "btn btn-outline-primary btn-sm mt-1",
|
|
470
|
-
onClick: D((
|
|
471
|
-
}, " Set Date ", 8,
|
|
467
|
+
onClick: D((m) => o.setVesselDate(i.registrationNumber), ["stop"])
|
|
468
|
+
}, " Set Date ", 8, Te)
|
|
472
469
|
]))
|
|
473
470
|
])
|
|
474
471
|
])
|
|
@@ -476,20 +473,20 @@ function Re(s, e, u, b, n, r) {
|
|
|
476
473
|
t("div", qe, [
|
|
477
474
|
t("i", {
|
|
478
475
|
class: "bi bi-trash",
|
|
479
|
-
onClick: D((
|
|
480
|
-
}, null, 8,
|
|
476
|
+
onClick: D((m) => o.handleDeleteVessel(i), ["stop"])
|
|
477
|
+
}, null, 8, Ie)
|
|
481
478
|
]),
|
|
482
479
|
t("button", {
|
|
483
480
|
class: "btn btn-primary",
|
|
484
|
-
onClick: D((
|
|
485
|
-
}, a(i.status === "Active" ? "Mark Inactive" : "Mark Active"), 9,
|
|
481
|
+
onClick: D((m) => o.handleToggleStatus(i), ["stop"])
|
|
482
|
+
}, a(i.status === "Active" ? "Mark Inactive" : "Mark Active"), 9, Fe)
|
|
486
483
|
], 8, fe)
|
|
487
484
|
]))), 128))
|
|
488
485
|
]))
|
|
489
486
|
], 64);
|
|
490
487
|
}
|
|
491
|
-
const
|
|
492
|
-
const
|
|
488
|
+
const Ve = /* @__PURE__ */ S(Z, [["render", Re]]);
|
|
489
|
+
const Me = {
|
|
493
490
|
name: "DashHead",
|
|
494
491
|
props: {
|
|
495
492
|
name: {
|
|
@@ -514,29 +511,29 @@ const Ve = {
|
|
|
514
511
|
this.$emit("logged-in");
|
|
515
512
|
}
|
|
516
513
|
}
|
|
517
|
-
},
|
|
518
|
-
function Oe(s, e,
|
|
519
|
-
return
|
|
520
|
-
t("h4", Ee, a(
|
|
521
|
-
t("div",
|
|
522
|
-
this.userProfile.role == "owner" ? (
|
|
514
|
+
}, Ne = { class: "page-header d-flex justify-content-between align-items-center" }, Ee = { style: { "margin-left": "20px" } }, Le = { class: "d-flex" };
|
|
515
|
+
function Oe(s, e, d, p, n, o) {
|
|
516
|
+
return l(), r("div", Ne, [
|
|
517
|
+
t("h4", Ee, a(d.name), 1),
|
|
518
|
+
t("div", Le, [
|
|
519
|
+
this.userProfile.role == "owner" ? (l(), r("button", {
|
|
523
520
|
key: 0,
|
|
524
521
|
class: "btn btn-outline-primary me-2",
|
|
525
|
-
onClick: e[0] || (e[0] = (i) =>
|
|
522
|
+
onClick: e[0] || (e[0] = (i) => o.addUser())
|
|
526
523
|
}, e[2] || (e[2] = [
|
|
527
524
|
t("i", { class: "bi bi-bell" }, null, -1),
|
|
528
525
|
t("span", { class: "badge bg-danger" }, "1", -1)
|
|
529
|
-
]))) :
|
|
526
|
+
]))) : c("", !0),
|
|
530
527
|
t("button", {
|
|
531
528
|
class: "btn btn-outline-primary",
|
|
532
|
-
onClick: e[1] || (e[1] = (i) =>
|
|
529
|
+
onClick: e[1] || (e[1] = (i) => o.loggedIn())
|
|
533
530
|
}, e[3] || (e[3] = [
|
|
534
531
|
t("i", { class: "bi bi-person-circle" }, null, -1)
|
|
535
532
|
]))
|
|
536
533
|
])
|
|
537
534
|
]);
|
|
538
535
|
}
|
|
539
|
-
const Ue = /* @__PURE__ */ S(
|
|
536
|
+
const Ue = /* @__PURE__ */ S(Me, [["render", Oe]]), $e = {
|
|
540
537
|
name: "OceanHelmMaintenance",
|
|
541
538
|
props: {
|
|
542
539
|
vesselInfo: {
|
|
@@ -642,7 +639,7 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
642
639
|
if (this.activeFilter === "all" ? s = s.filter((e) => e.status === "Overdue" || e.status === "Soon" || e.status === "Completed") : this.activeFilter === "due" ? s = s.filter((e) => e.status === "Overdue" || e.status === "Soon") : this.activeFilter === "completed" && (s = s.filter((e) => e.status === "Completed")), this.searchQuery) {
|
|
643
640
|
const e = this.searchQuery.toLowerCase();
|
|
644
641
|
s = s.filter(
|
|
645
|
-
(
|
|
642
|
+
(d) => d.component.toLowerCase().includes(e) || d.taskName.toLowerCase().includes(e) || d.assignedTo.toLowerCase().includes(e)
|
|
646
643
|
);
|
|
647
644
|
}
|
|
648
645
|
return s;
|
|
@@ -682,12 +679,12 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
682
679
|
message: "Enter the task details",
|
|
683
680
|
callback: (e) => {
|
|
684
681
|
if (e) {
|
|
685
|
-
const
|
|
682
|
+
const d = {
|
|
686
683
|
id: Date.now(),
|
|
687
684
|
text: e,
|
|
688
685
|
completed: !1
|
|
689
686
|
};
|
|
690
|
-
this.checklists.push(
|
|
687
|
+
this.checklists.push(d);
|
|
691
688
|
}
|
|
692
689
|
}
|
|
693
690
|
});
|
|
@@ -699,8 +696,8 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
699
696
|
this.isLoading = !0, this.$emit("generate-checklist", {
|
|
700
697
|
component: s,
|
|
701
698
|
callback: (e) => {
|
|
702
|
-
this.checklists = e.map((
|
|
703
|
-
...
|
|
699
|
+
this.checklists = e.map((d) => ({
|
|
700
|
+
...d,
|
|
704
701
|
completed: !1
|
|
705
702
|
})), this.isLoading = !1;
|
|
706
703
|
}
|
|
@@ -708,12 +705,12 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
708
705
|
},
|
|
709
706
|
showMaintenance(s) {
|
|
710
707
|
if (this.deepAccess()) {
|
|
711
|
-
const e = this.tasks.find((
|
|
708
|
+
const e = this.tasks.find((d) => d.component === s);
|
|
712
709
|
e && e.checklistProgress ? this.checklists = [...e.checklistProgress] : this.loadChecklist(s), this.after = e == null ? void 0 : e.after, this.currentTask = s, this.lastSection = "inventory", this.activeSection = "maintenance";
|
|
713
710
|
}
|
|
714
711
|
},
|
|
715
712
|
printMaintenance(s) {
|
|
716
|
-
const e = this.tasks.find((
|
|
713
|
+
const e = this.tasks.find((d) => d.component === s);
|
|
717
714
|
this.maintenanceTasks = [e], this.loadMaintenanceData(), this.showReport = !0, this.$nextTick(() => {
|
|
718
715
|
setTimeout(() => {
|
|
719
716
|
window.print(), this.showReport = !1;
|
|
@@ -761,31 +758,31 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
761
758
|
const s = this.form.lastPerformed ? new Date(this.form.lastPerformed) : null, e = this.form.recurrence;
|
|
762
759
|
if (!s || !e)
|
|
763
760
|
return;
|
|
764
|
-
let
|
|
761
|
+
let d = new Date(s);
|
|
765
762
|
switch (e) {
|
|
766
763
|
case "daily":
|
|
767
|
-
|
|
764
|
+
d.setDate(d.getDate() + 1);
|
|
768
765
|
break;
|
|
769
766
|
case "weekly":
|
|
770
|
-
|
|
767
|
+
d.setDate(d.getDate() + 7);
|
|
771
768
|
break;
|
|
772
769
|
case "monthly":
|
|
773
|
-
|
|
770
|
+
d.setMonth(d.getMonth() + 1);
|
|
774
771
|
break;
|
|
775
772
|
case "quarterly":
|
|
776
|
-
|
|
773
|
+
d.setMonth(d.getMonth() + 3);
|
|
777
774
|
break;
|
|
778
775
|
case "semi-annual":
|
|
779
|
-
|
|
776
|
+
d.setMonth(d.getMonth() + 6);
|
|
780
777
|
break;
|
|
781
778
|
case "annual":
|
|
782
|
-
|
|
779
|
+
d.setFullYear(d.getFullYear() + 1);
|
|
783
780
|
break;
|
|
784
781
|
case "once":
|
|
785
782
|
case "custom":
|
|
786
783
|
return;
|
|
787
784
|
}
|
|
788
|
-
this.form.nextDue =
|
|
785
|
+
this.form.nextDue = d.toISOString().split("T")[0];
|
|
789
786
|
},
|
|
790
787
|
calculateRemainingDays() {
|
|
791
788
|
if (!this.form.nextDue) {
|
|
@@ -794,8 +791,8 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
794
791
|
}
|
|
795
792
|
const s = /* @__PURE__ */ new Date(), e = new Date(this.form.nextDue);
|
|
796
793
|
s.setHours(0, 0, 0, 0), e.setHours(0, 0, 0, 0);
|
|
797
|
-
const
|
|
798
|
-
this.form.remainingDays = `${
|
|
794
|
+
const d = e - s, p = Math.ceil(d / (1e3 * 60 * 60 * 24));
|
|
795
|
+
this.form.remainingDays = `${p} Days`;
|
|
799
796
|
},
|
|
800
797
|
async saveSchedule() {
|
|
801
798
|
if (this.isSaving = !0, !this.validateForm()) {
|
|
@@ -803,7 +800,7 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
803
800
|
return;
|
|
804
801
|
}
|
|
805
802
|
const s = { ...this.form };
|
|
806
|
-
if (this.form.component === "Other" && this.form.customComponent && (s.component = this.form.customComponent), s.email = this.companyInfo.email, this.tasks.some((
|
|
803
|
+
if (this.form.component === "Other" && this.form.customComponent && (s.component = this.form.customComponent), s.email = this.companyInfo.email, this.tasks.some((d) => d.component === s.component)) {
|
|
807
804
|
this.$emit("show-message", {
|
|
808
805
|
type: "error",
|
|
809
806
|
title: "Duplicate Component",
|
|
@@ -814,8 +811,8 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
814
811
|
delete s.customComponent, this.$emit("save-schedule", {
|
|
815
812
|
taskData: s,
|
|
816
813
|
file: s.attachments.file,
|
|
817
|
-
callback: (
|
|
818
|
-
this.isSaving = !1,
|
|
814
|
+
callback: (d) => {
|
|
815
|
+
this.isSaving = !1, d && (this.loadChecklist(s.component), this.lastSection = "schedule", this.currentTask = s.component, this.resetForm(), this.activeSection = "maintenance");
|
|
819
816
|
}
|
|
820
817
|
});
|
|
821
818
|
},
|
|
@@ -846,18 +843,18 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
846
843
|
s.completed = !s.completed;
|
|
847
844
|
},
|
|
848
845
|
async resetTasks() {
|
|
849
|
-
const e = this.checklists.every((
|
|
846
|
+
const e = this.checklists.every((p) => p.completed) ? "Completed" : "Soon", d = {
|
|
850
847
|
checklistProgress: [...this.checklists],
|
|
851
848
|
status: e,
|
|
852
849
|
component: this.currentTask,
|
|
853
850
|
after: this.after
|
|
854
851
|
};
|
|
855
852
|
this.$emit("update-task", {
|
|
856
|
-
updateData:
|
|
853
|
+
updateData: d,
|
|
857
854
|
file: this.fileattachments.file,
|
|
858
855
|
tasks: this.tasks,
|
|
859
|
-
callback: (
|
|
860
|
-
|
|
856
|
+
callback: (p, n) => {
|
|
857
|
+
p && (n && (this.after = n), this.fileattachments = {}, this.fileText = "Drag and drop files here or", this.refreshKey += 1, this.activeSection = "inventory");
|
|
861
858
|
}
|
|
862
859
|
});
|
|
863
860
|
},
|
|
@@ -881,7 +878,7 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
881
878
|
getChecklistProgress(s) {
|
|
882
879
|
if (!s.checklistProgress || s.checklistProgress.length === 0)
|
|
883
880
|
return 0;
|
|
884
|
-
const e = s.checklistProgress.filter((
|
|
881
|
+
const e = s.checklistProgress.filter((d) => d.completed).length;
|
|
885
882
|
return Math.round(e / s.checklistProgress.length * 100);
|
|
886
883
|
},
|
|
887
884
|
getCompletedChecklistItems(s) {
|
|
@@ -903,124 +900,124 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
903
900
|
});
|
|
904
901
|
}
|
|
905
902
|
}
|
|
906
|
-
}, je = { key: 0 },
|
|
903
|
+
}, je = { key: 0 }, Be = ["onClick"], He = { class: "content" }, Qe = {
|
|
907
904
|
key: 0,
|
|
908
905
|
class: "loading-container"
|
|
909
|
-
},
|
|
906
|
+
}, Je = { key: 1 }, We = { class: "container" }, Ke = { class: "d-flex justify-content-between align-items-center" }, ze = { class: "progress-container" }, Ge = { class: "progress-info" }, Ye = { class: "progress-bar" }, Xe = { class: "checklist" }, Ze = ["onClick"], et = { key: 0 }, tt = ["onClick"], st = ["onClick"], it = { key: 0 }, nt = { class: "checklist" }, ot = { class: "checklist-item" }, lt = { class: "attachment-area" }, rt = {
|
|
910
907
|
key: 2,
|
|
911
908
|
class: "status"
|
|
912
|
-
},
|
|
909
|
+
}, at = { class: "form-group" }, dt = { class: "form-group" }, ut = { class: "input-group" }, ct = { class: "form-group" }, mt = { class: "form-group" }, vt = { class: "input-group" }, pt = { class: "form-group" }, ht = { class: "form-group" }, ft = { class: "input-group" }, gt = { class: "form-group" }, bt = { class: "form-group" }, yt = ["value"], wt = { class: "input-group" }, kt = { class: "form-group" }, Ct = { class: "input-group" }, _t = { class: "form-group" }, Dt = { class: "form-group" }, xt = { class: "form-group" }, St = { class: "checkbox-group" }, At = { class: "checkbox-item" }, Pt = { class: "checkbox-item" }, Tt = { class: "input-group" }, qt = { class: "form-group" }, It = { class: "form-group" }, Ft = { class: "form-group" }, Rt = { class: "attachment-area" }, Vt = { class: "action-buttons" }, Mt = ["disabled"], Nt = { class: "task-table-wrapper" }, Et = { class: "table-controls" }, Lt = { class: "filters" }, Ot = { class: "task-table" }, Ut = ["onClick"], $t = ["onClick"], jt = { key: 0 }, Bt = {
|
|
913
910
|
class: "alert alert-primary",
|
|
914
911
|
role: "alert"
|
|
915
|
-
},
|
|
912
|
+
}, Ht = { class: "mb-0" }, Qt = {
|
|
916
913
|
class: "report-container",
|
|
917
914
|
ref: "reportContainer"
|
|
918
|
-
},
|
|
915
|
+
}, Jt = { class: "report-info" }, Wt = { class: "info-box" }, Kt = { class: "info-box" }, zt = { class: "info-box" }, Gt = { class: "section" }, Yt = { class: "summary-grid" }, Xt = { class: "summary-card" }, Zt = { class: "summary-number" }, es = { class: "section" }, ts = { class: "task-header" }, ss = { class: "task-title" }, is = { class: "task-component" }, ns = { class: "task-details" }, os = { class: "detail-item" }, ls = { class: "detail-value" }, rs = { class: "detail-item" }, as = { class: "detail-value" }, ds = { class: "detail-item" }, us = { class: "detail-value" }, cs = { class: "detail-item" }, ms = { class: "detail-value" }, vs = { class: "detail-item" }, ps = { class: "detail-value" }, hs = { class: "detail-item" }, fs = { class: "detail-value" }, gs = {
|
|
919
916
|
key: 0,
|
|
920
917
|
style: { margin: "15px 0", padding: "10px", background: "white", "border-radius": "5px" }
|
|
921
|
-
},
|
|
918
|
+
}, bs = { class: "detail-value" }, ys = {
|
|
922
919
|
key: 1,
|
|
923
920
|
style: { margin: "15px 0", padding: "10px", background: "white", "border-radius": "5px" }
|
|
924
|
-
},
|
|
921
|
+
}, ws = { class: "detail-value" }, ks = {
|
|
925
922
|
key: 2,
|
|
926
923
|
class: "checklist-progress"
|
|
927
|
-
},
|
|
928
|
-
function
|
|
929
|
-
return n.ready ? (
|
|
924
|
+
}, Cs = { class: "progress-bar" }, _s = { style: { "font-size": "0.9em", color: "#666", "margin-top": "5px" } }, Ds = { class: "checklist-items" }, xs = { class: "checklist-icon" }, Ss = { class: "section" }, As = { class: "info-box" }, Ps = { class: "signature-section" }, Ts = { class: "signature-box" }, qs = { style: { "margin-top": "10px", color: "#666" } };
|
|
925
|
+
function Is(s, e, d, p, n, o) {
|
|
926
|
+
return n.ready ? (l(), r("div", je, [
|
|
930
927
|
t("div", null, [
|
|
931
|
-
|
|
932
|
-
(
|
|
928
|
+
h(t("nav", null, [
|
|
929
|
+
(l(!0), r(f, null, g(n.sections, (i) => (l(), r("button", {
|
|
933
930
|
key: i.id,
|
|
934
|
-
class:
|
|
935
|
-
onClick: (
|
|
936
|
-
}, a(i.icon) + " " + a(i.name), 11,
|
|
931
|
+
class: b(["nav-btn", { active: n.activeSection === i.id }]),
|
|
932
|
+
onClick: (m) => o.handleSectionClick(i)
|
|
933
|
+
}, a(i.icon) + " " + a(i.name), 11, Be))), 128))
|
|
937
934
|
], 512), [
|
|
938
|
-
[
|
|
935
|
+
[A, !n.showReport]
|
|
939
936
|
]),
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
class:
|
|
937
|
+
h(t("div", He, [
|
|
938
|
+
h(t("section", {
|
|
939
|
+
class: b(["form-section", { active: n.activeSection === "maintenance" }])
|
|
943
940
|
}, [
|
|
944
941
|
e[37] || (e[37] = t("h2", null, "🛠️ Maintenance Tasks", -1)),
|
|
945
|
-
n.isLoading ? (
|
|
942
|
+
n.isLoading ? (l(), r("div", Qe, e[27] || (e[27] = [
|
|
946
943
|
t("div", { class: "loading-spinner" }, null, -1),
|
|
947
944
|
t("p", null, "Loading checklist...", -1)
|
|
948
|
-
]))) :
|
|
949
|
-
n.isLoading ?
|
|
950
|
-
t("div",
|
|
951
|
-
t("div",
|
|
945
|
+
]))) : c("", !0),
|
|
946
|
+
n.isLoading ? c("", !0) : (l(), r("form", Je, [
|
|
947
|
+
t("div", We, [
|
|
948
|
+
t("div", Ke, [
|
|
952
949
|
e[29] || (e[29] = t("h1", null, "Maintenance Checklist", -1)),
|
|
953
|
-
|
|
950
|
+
o.showAddTaskButton ? (l(), r("button", {
|
|
954
951
|
key: 0,
|
|
955
952
|
class: "btn btn-outline-custom",
|
|
956
|
-
onClick: e[0] || (e[0] = D((i) =>
|
|
953
|
+
onClick: e[0] || (e[0] = D((i) => o.addTask(), ["prevent"]))
|
|
957
954
|
}, e[28] || (e[28] = [
|
|
958
|
-
|
|
955
|
+
w(" Manually Add Task ", -1),
|
|
959
956
|
t("i", { class: "fas fa-plus" }, null, -1)
|
|
960
|
-
]))) :
|
|
957
|
+
]))) : c("", !0)
|
|
961
958
|
]),
|
|
962
|
-
t("div",
|
|
963
|
-
t("div",
|
|
959
|
+
t("div", ze, [
|
|
960
|
+
t("div", Ge, " Progress: " + a(o.progress) + "% (" + a(o.completedCount.length) + "/" + a(n.checklists.length) + ") ", 1),
|
|
964
961
|
t("div", Ye, [
|
|
965
962
|
t("div", {
|
|
966
963
|
class: "progress-fill",
|
|
967
|
-
style:
|
|
964
|
+
style: N({ width: o.progress + "%" })
|
|
968
965
|
}, null, 4)
|
|
969
966
|
])
|
|
970
967
|
]),
|
|
971
|
-
t("ul",
|
|
972
|
-
(
|
|
968
|
+
t("ul", Xe, [
|
|
969
|
+
(l(!0), r(f, null, g(n.checklists, (i) => (l(), r("li", {
|
|
973
970
|
key: i.id,
|
|
974
971
|
class: "checklist-item"
|
|
975
972
|
}, [
|
|
976
973
|
t("div", {
|
|
977
|
-
class:
|
|
978
|
-
onClick: (
|
|
974
|
+
class: b(["checkbox", { checked: i.completed }]),
|
|
975
|
+
onClick: (m) => o.toggleTask(i)
|
|
979
976
|
}, [
|
|
980
|
-
i.completed ? (
|
|
981
|
-
], 10,
|
|
977
|
+
i.completed ? (l(), r("span", et, "✓")) : c("", !0)
|
|
978
|
+
], 10, Ze),
|
|
982
979
|
t("span", {
|
|
983
|
-
class:
|
|
984
|
-
onClick: (
|
|
985
|
-
}, a(i.text), 11,
|
|
986
|
-
|
|
980
|
+
class: b(["task-text", { completed: i.completed }]),
|
|
981
|
+
onClick: (m) => o.toggleTask(i)
|
|
982
|
+
}, a(i.text), 11, tt),
|
|
983
|
+
o.showAddTaskButton ? (l(), r("button", {
|
|
987
984
|
key: 0,
|
|
988
985
|
class: "delete-btn",
|
|
989
|
-
onClick: (
|
|
986
|
+
onClick: (m) => o.deleteTask(i.id),
|
|
990
987
|
title: "Delete task"
|
|
991
988
|
}, e[30] || (e[30] = [
|
|
992
989
|
x('<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3,6 5,6 21,6"></polyline><path d="m19,6v14a2,2 0 0,1 -2,2H7a2,2 0 0,1 -2,-2V6m3,0V4a2,2 0 0,1 2,-2h4a2,2 0 0,1 2,2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg>', 1)
|
|
993
|
-
]), 8,
|
|
990
|
+
]), 8, st)) : c("", !0)
|
|
994
991
|
]))), 128))
|
|
995
992
|
]),
|
|
996
|
-
n.after ? (
|
|
993
|
+
n.after ? (l(), r("div", it, [
|
|
997
994
|
e[33] || (e[33] = t("label", null, "Upload Image Evidence", -1)),
|
|
998
|
-
t("ul",
|
|
999
|
-
t("li",
|
|
995
|
+
t("ul", nt, [
|
|
996
|
+
t("li", ot, [
|
|
1000
997
|
e[32] || (e[32] = t("span", { class: "task-text" }, " Image Evidence Already Uploaded ", -1)),
|
|
1001
998
|
t("button", {
|
|
1002
999
|
type: "button",
|
|
1003
1000
|
class: "delete-btn",
|
|
1004
|
-
onClick: e[1] || (e[1] = (i) =>
|
|
1001
|
+
onClick: e[1] || (e[1] = (i) => o.deleteEvidence()),
|
|
1005
1002
|
title: "Delete Image"
|
|
1006
1003
|
}, e[31] || (e[31] = [
|
|
1007
1004
|
x('<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3,6 5,6 21,6"></polyline><path d="m19,6v14a2,2 0 0,1 -2,2H7a2,2 0 0,1 -2,-2V6m3,0V4a2,2 0 0,1 2,-2h4a2,2 0 0,1 2,2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg>', 1)
|
|
1008
1005
|
]))
|
|
1009
1006
|
])
|
|
1010
1007
|
])
|
|
1011
|
-
])) : (
|
|
1008
|
+
])) : (l(), r("div", {
|
|
1012
1009
|
class: "form-group",
|
|
1013
1010
|
key: n.refreshKey || "default"
|
|
1014
1011
|
}, [
|
|
1015
1012
|
e[35] || (e[35] = t("label", null, "Upload Image Evidence", -1)),
|
|
1016
1013
|
e[36] || (e[36] = t("p", null, "You can only upload one image evidence here.", -1)),
|
|
1017
|
-
t("div",
|
|
1014
|
+
t("div", lt, [
|
|
1018
1015
|
t("p", null, a(n.fileText), 1),
|
|
1019
1016
|
t("input", {
|
|
1020
1017
|
type: "file",
|
|
1021
1018
|
id: "evidence-files",
|
|
1022
1019
|
class: "file-input",
|
|
1023
|
-
onChange: e[2] || (e[2] = (...i) =>
|
|
1020
|
+
onChange: e[2] || (e[2] = (...i) => o.handleImg && o.handleImg(...i))
|
|
1024
1021
|
}, null, 32),
|
|
1025
1022
|
e[34] || (e[34] = t("label", {
|
|
1026
1023
|
for: "evidence-files",
|
|
@@ -1028,24 +1025,24 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1028
1025
|
}, "Browse Files", -1))
|
|
1029
1026
|
])
|
|
1030
1027
|
])),
|
|
1031
|
-
|
|
1028
|
+
o.completedCount === n.checklists.length ? (l(), r("div", rt, " All tasks completed! ✅ ")) : c("", !0),
|
|
1032
1029
|
t("button", {
|
|
1033
1030
|
class: "reset-button",
|
|
1034
|
-
onClick: e[3] || (e[3] = D((...i) =>
|
|
1035
|
-
}, a(
|
|
1031
|
+
onClick: e[3] || (e[3] = D((...i) => o.resetTasks && o.resetTasks(...i), ["prevent"]))
|
|
1032
|
+
}, a(o.checklistButtonLabel), 1)
|
|
1036
1033
|
])
|
|
1037
1034
|
]))
|
|
1038
1035
|
], 2), [
|
|
1039
|
-
[
|
|
1036
|
+
[A, n.activeSection === "maintenance"]
|
|
1040
1037
|
]),
|
|
1041
|
-
|
|
1042
|
-
class:
|
|
1038
|
+
h(t("section", {
|
|
1039
|
+
class: b(["form-section", { active: n.activeSection === "schedule" }])
|
|
1043
1040
|
}, [
|
|
1044
1041
|
e[62] || (e[62] = t("h2", null, "📅 Maintenance Schedule", -1)),
|
|
1045
1042
|
t("form", null, [
|
|
1046
|
-
t("div",
|
|
1043
|
+
t("div", at, [
|
|
1047
1044
|
e[38] || (e[38] = t("label", { for: "task-name" }, "Task Name", -1)),
|
|
1048
|
-
|
|
1045
|
+
h(t("input", {
|
|
1049
1046
|
type: "text",
|
|
1050
1047
|
id: "task-name",
|
|
1051
1048
|
"onUpdate:modelValue": e[4] || (e[4] = (i) => n.form.taskName = i),
|
|
@@ -1054,9 +1051,9 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1054
1051
|
[k, n.form.taskName]
|
|
1055
1052
|
])
|
|
1056
1053
|
]),
|
|
1057
|
-
t("div",
|
|
1054
|
+
t("div", dt, [
|
|
1058
1055
|
e[39] || (e[39] = t("label", { for: "task-description" }, "Description", -1)),
|
|
1059
|
-
|
|
1056
|
+
h(t("textarea", {
|
|
1060
1057
|
id: "task-description",
|
|
1061
1058
|
"onUpdate:modelValue": e[5] || (e[5] = (i) => n.form.description = i),
|
|
1062
1059
|
required: ""
|
|
@@ -1064,10 +1061,10 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1064
1061
|
[k, n.form.description]
|
|
1065
1062
|
])
|
|
1066
1063
|
]),
|
|
1067
|
-
t("div",
|
|
1068
|
-
t("div",
|
|
1064
|
+
t("div", ut, [
|
|
1065
|
+
t("div", ct, [
|
|
1069
1066
|
e[41] || (e[41] = t("label", { for: "maintenance-type" }, "Maintenance Type", -1)),
|
|
1070
|
-
|
|
1067
|
+
h(t("select", {
|
|
1071
1068
|
id: "maintenance-type",
|
|
1072
1069
|
"onUpdate:modelValue": e[6] || (e[6] = (i) => n.form.maintenanceType = i),
|
|
1073
1070
|
required: ""
|
|
@@ -1077,9 +1074,9 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1077
1074
|
[_, n.form.maintenanceType]
|
|
1078
1075
|
])
|
|
1079
1076
|
]),
|
|
1080
|
-
t("div",
|
|
1077
|
+
t("div", mt, [
|
|
1081
1078
|
e[43] || (e[43] = t("label", { for: "component" }, "Component/System", -1)),
|
|
1082
|
-
|
|
1079
|
+
h(t("select", {
|
|
1083
1080
|
id: "component",
|
|
1084
1081
|
"onUpdate:modelValue": e[7] || (e[7] = (i) => n.form.component = i),
|
|
1085
1082
|
required: ""
|
|
@@ -1088,7 +1085,7 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1088
1085
|
]), 512), [
|
|
1089
1086
|
[_, n.form.component]
|
|
1090
1087
|
]),
|
|
1091
|
-
n.form.component === "Other" ?
|
|
1088
|
+
n.form.component === "Other" ? h((l(), r("input", {
|
|
1092
1089
|
key: 0,
|
|
1093
1090
|
type: "text",
|
|
1094
1091
|
placeholder: "Enter custom component/system",
|
|
@@ -1096,13 +1093,13 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1096
1093
|
style: { "margin-top": "8px" }
|
|
1097
1094
|
}, null, 512)), [
|
|
1098
1095
|
[k, n.form.customComponent]
|
|
1099
|
-
]) :
|
|
1096
|
+
]) : c("", !0)
|
|
1100
1097
|
])
|
|
1101
1098
|
]),
|
|
1102
|
-
t("div",
|
|
1103
|
-
t("div",
|
|
1099
|
+
t("div", vt, [
|
|
1100
|
+
t("div", pt, [
|
|
1104
1101
|
e[45] || (e[45] = t("label", { for: "priority" }, "Priority", -1)),
|
|
1105
|
-
|
|
1102
|
+
h(t("select", {
|
|
1106
1103
|
id: "priority",
|
|
1107
1104
|
"onUpdate:modelValue": e[9] || (e[9] = (i) => n.form.priority = i),
|
|
1108
1105
|
required: ""
|
|
@@ -1115,9 +1112,9 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1115
1112
|
[_, n.form.priority]
|
|
1116
1113
|
])
|
|
1117
1114
|
]),
|
|
1118
|
-
t("div",
|
|
1115
|
+
t("div", ht, [
|
|
1119
1116
|
e[46] || (e[46] = t("label", { for: "status" }, "Status", -1)),
|
|
1120
|
-
|
|
1117
|
+
h(t("input", {
|
|
1121
1118
|
type: "text",
|
|
1122
1119
|
id: "status",
|
|
1123
1120
|
"onUpdate:modelValue": e[10] || (e[10] = (i) => n.form.status = i),
|
|
@@ -1128,9 +1125,9 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1128
1125
|
])
|
|
1129
1126
|
]),
|
|
1130
1127
|
t("div", ft, [
|
|
1131
|
-
t("div",
|
|
1128
|
+
t("div", gt, [
|
|
1132
1129
|
e[47] || (e[47] = t("label", { for: "estimated-hours" }, "Estimated Hours", -1)),
|
|
1133
|
-
|
|
1130
|
+
h(t("input", {
|
|
1134
1131
|
type: "number",
|
|
1135
1132
|
id: "estimated-hours",
|
|
1136
1133
|
"onUpdate:modelValue": e[11] || (e[11] = (i) => n.form.estimatedHours = i),
|
|
@@ -1141,25 +1138,25 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1141
1138
|
])
|
|
1142
1139
|
])
|
|
1143
1140
|
]),
|
|
1144
|
-
t("div",
|
|
1141
|
+
t("div", bt, [
|
|
1145
1142
|
e[49] || (e[49] = t("label", { for: "assigned-to" }, "Assigned To", -1)),
|
|
1146
|
-
|
|
1143
|
+
h(t("select", {
|
|
1147
1144
|
id: "assigned-to",
|
|
1148
1145
|
"onUpdate:modelValue": e[12] || (e[12] = (i) => n.form.assignedTo = i)
|
|
1149
1146
|
}, [
|
|
1150
1147
|
e[48] || (e[48] = t("option", { value: "" }, "-- Select Personnel --", -1)),
|
|
1151
|
-
(
|
|
1148
|
+
(l(!0), r(f, null, g(d.vesselCrew, (i) => (l(), r("option", {
|
|
1152
1149
|
key: i.id,
|
|
1153
1150
|
value: `${i.name} - ${i.role}`
|
|
1154
|
-
}, a(i.name) + " - " + a(i.role), 9,
|
|
1151
|
+
}, a(i.name) + " - " + a(i.role), 9, yt))), 128))
|
|
1155
1152
|
], 512), [
|
|
1156
1153
|
[_, n.form.assignedTo]
|
|
1157
1154
|
])
|
|
1158
1155
|
]),
|
|
1159
|
-
t("div",
|
|
1160
|
-
t("div",
|
|
1156
|
+
t("div", wt, [
|
|
1157
|
+
t("div", kt, [
|
|
1161
1158
|
e[51] || (e[51] = t("label", { for: "recurrence-type" }, "Recurrence", -1)),
|
|
1162
|
-
|
|
1159
|
+
h(t("select", {
|
|
1163
1160
|
id: "recurrence-type",
|
|
1164
1161
|
"onUpdate:modelValue": e[13] || (e[13] = (i) => n.form.recurrence = i),
|
|
1165
1162
|
required: ""
|
|
@@ -1170,10 +1167,10 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1170
1167
|
])
|
|
1171
1168
|
])
|
|
1172
1169
|
]),
|
|
1173
|
-
t("div",
|
|
1174
|
-
t("div",
|
|
1170
|
+
t("div", Ct, [
|
|
1171
|
+
t("div", _t, [
|
|
1175
1172
|
e[52] || (e[52] = t("label", { for: "last-performed" }, "Last Performed Date", -1)),
|
|
1176
|
-
|
|
1173
|
+
h(t("input", {
|
|
1177
1174
|
type: "date",
|
|
1178
1175
|
id: "last-performed",
|
|
1179
1176
|
"onUpdate:modelValue": e[14] || (e[14] = (i) => n.form.lastPerformed = i)
|
|
@@ -1181,9 +1178,9 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1181
1178
|
[k, n.form.lastPerformed]
|
|
1182
1179
|
])
|
|
1183
1180
|
]),
|
|
1184
|
-
t("div",
|
|
1181
|
+
t("div", Dt, [
|
|
1185
1182
|
e[53] || (e[53] = t("label", { for: "next-due" }, "Due Date", -1)),
|
|
1186
|
-
|
|
1183
|
+
h(t("input", {
|
|
1187
1184
|
type: "date",
|
|
1188
1185
|
id: "next-due",
|
|
1189
1186
|
"onUpdate:modelValue": e[15] || (e[15] = (i) => n.form.nextDue = i),
|
|
@@ -1193,35 +1190,35 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1193
1190
|
])
|
|
1194
1191
|
])
|
|
1195
1192
|
]),
|
|
1196
|
-
t("div",
|
|
1193
|
+
t("div", xt, [
|
|
1197
1194
|
e[56] || (e[56] = t("label", null, "Notifications", -1)),
|
|
1198
|
-
t("div",
|
|
1199
|
-
t("div",
|
|
1200
|
-
|
|
1195
|
+
t("div", St, [
|
|
1196
|
+
t("div", At, [
|
|
1197
|
+
h(t("input", {
|
|
1201
1198
|
type: "checkbox",
|
|
1202
1199
|
id: "notify-email",
|
|
1203
1200
|
"onUpdate:modelValue": e[16] || (e[16] = (i) => n.form.notifyEmail = i)
|
|
1204
1201
|
}, null, 512), [
|
|
1205
|
-
[
|
|
1202
|
+
[E, n.form.notifyEmail]
|
|
1206
1203
|
]),
|
|
1207
1204
|
e[54] || (e[54] = t("label", { for: "notify-email" }, "Email Notification", -1))
|
|
1208
1205
|
]),
|
|
1209
1206
|
t("div", Pt, [
|
|
1210
|
-
|
|
1207
|
+
h(t("input", {
|
|
1211
1208
|
type: "checkbox",
|
|
1212
1209
|
id: "notify-sms",
|
|
1213
1210
|
"onUpdate:modelValue": e[17] || (e[17] = (i) => n.form.notifySms = i)
|
|
1214
1211
|
}, null, 512), [
|
|
1215
|
-
[
|
|
1212
|
+
[E, n.form.notifySms]
|
|
1216
1213
|
]),
|
|
1217
1214
|
e[55] || (e[55] = t("label", { for: "notify-sms" }, "SMS Notification", -1))
|
|
1218
1215
|
])
|
|
1219
1216
|
])
|
|
1220
1217
|
]),
|
|
1221
|
-
t("div",
|
|
1218
|
+
t("div", Tt, [
|
|
1222
1219
|
t("div", qt, [
|
|
1223
1220
|
e[58] || (e[58] = t("label", { for: "reminder-days" }, "Reminder (Days Before)", -1)),
|
|
1224
|
-
|
|
1221
|
+
h(t("select", {
|
|
1225
1222
|
id: "reminder-days",
|
|
1226
1223
|
"onUpdate:modelValue": e[18] || (e[18] = (i) => n.form.reminderDays = i)
|
|
1227
1224
|
}, e[57] || (e[57] = [
|
|
@@ -1231,16 +1228,16 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1231
1228
|
])
|
|
1232
1229
|
])
|
|
1233
1230
|
]),
|
|
1234
|
-
t("div",
|
|
1231
|
+
t("div", It, [
|
|
1235
1232
|
e[59] || (e[59] = t("label", { for: "schedule-notes" }, "Notes", -1)),
|
|
1236
|
-
|
|
1233
|
+
h(t("textarea", {
|
|
1237
1234
|
id: "schedule-notes",
|
|
1238
1235
|
"onUpdate:modelValue": e[19] || (e[19] = (i) => n.form.notes = i)
|
|
1239
1236
|
}, null, 512), [
|
|
1240
1237
|
[k, n.form.notes]
|
|
1241
1238
|
])
|
|
1242
1239
|
]),
|
|
1243
|
-
t("div",
|
|
1240
|
+
t("div", Ft, [
|
|
1244
1241
|
e[61] || (e[61] = t("label", null, "Attachments", -1)),
|
|
1245
1242
|
t("div", Rt, [
|
|
1246
1243
|
t("p", null, a(n.imgText), 1),
|
|
@@ -1248,7 +1245,7 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1248
1245
|
type: "file",
|
|
1249
1246
|
id: "maintenance-files",
|
|
1250
1247
|
class: "file-input",
|
|
1251
|
-
onChange: e[20] || (e[20] = (...i) =>
|
|
1248
|
+
onChange: e[20] || (e[20] = (...i) => o.handleFiles && o.handleFiles(...i)),
|
|
1252
1249
|
multiple: ""
|
|
1253
1250
|
}, null, 32),
|
|
1254
1251
|
e[60] || (e[60] = t("label", {
|
|
@@ -1257,38 +1254,38 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1257
1254
|
}, "Browse Files", -1))
|
|
1258
1255
|
])
|
|
1259
1256
|
]),
|
|
1260
|
-
t("div",
|
|
1257
|
+
t("div", Vt, [
|
|
1261
1258
|
t("button", {
|
|
1262
1259
|
type: "button",
|
|
1263
1260
|
class: "btn btn-primary",
|
|
1264
|
-
onClick: e[21] || (e[21] = D((...i) =>
|
|
1261
|
+
onClick: e[21] || (e[21] = D((...i) => o.saveSchedule && o.saveSchedule(...i), ["prevent"])),
|
|
1265
1262
|
disabled: n.isSaving
|
|
1266
|
-
}, a(n.isSaving ? "Saving..." : "Save Schedule"), 9,
|
|
1263
|
+
}, a(n.isSaving ? "Saving..." : "Save Schedule"), 9, Mt)
|
|
1267
1264
|
])
|
|
1268
1265
|
])
|
|
1269
1266
|
], 2), [
|
|
1270
|
-
[
|
|
1267
|
+
[A, n.activeSection === "schedule"]
|
|
1271
1268
|
]),
|
|
1272
|
-
|
|
1273
|
-
class:
|
|
1269
|
+
h(t("section", {
|
|
1270
|
+
class: b(["form-section", { active: n.activeSection === "inventory" }])
|
|
1274
1271
|
}, [
|
|
1275
1272
|
e[68] || (e[68] = t("h2", null, "All Maintenance", -1)),
|
|
1276
|
-
t("div",
|
|
1273
|
+
t("div", Nt, [
|
|
1277
1274
|
t("div", Et, [
|
|
1278
|
-
t("div",
|
|
1275
|
+
t("div", Lt, [
|
|
1279
1276
|
t("button", {
|
|
1280
|
-
class:
|
|
1281
|
-
onClick: e[22] || (e[22] = (i) =>
|
|
1277
|
+
class: b({ active: n.activeFilter === "due" }),
|
|
1278
|
+
onClick: e[22] || (e[22] = (i) => o.setFilter("due"))
|
|
1282
1279
|
}, "Due", 2),
|
|
1283
1280
|
t("button", {
|
|
1284
|
-
class:
|
|
1285
|
-
onClick: e[23] || (e[23] = (i) =>
|
|
1281
|
+
class: b({ active: n.activeFilter === "all" }),
|
|
1282
|
+
onClick: e[23] || (e[23] = (i) => o.setFilter("all"))
|
|
1286
1283
|
}, "All", 2),
|
|
1287
1284
|
t("button", {
|
|
1288
|
-
class:
|
|
1289
|
-
onClick: e[24] || (e[24] = (i) =>
|
|
1285
|
+
class: b({ active: n.activeFilter === "completed" }),
|
|
1286
|
+
onClick: e[24] || (e[24] = (i) => o.setFilter("completed"))
|
|
1290
1287
|
}, "Completed", 2),
|
|
1291
|
-
|
|
1288
|
+
h(t("input", {
|
|
1292
1289
|
type: "text",
|
|
1293
1290
|
"onUpdate:modelValue": e[25] || (e[25] = (i) => n.searchQuery = i),
|
|
1294
1291
|
placeholder: "Search..."
|
|
@@ -1311,7 +1308,7 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1311
1308
|
])
|
|
1312
1309
|
], -1)),
|
|
1313
1310
|
t("tbody", null, [
|
|
1314
|
-
(
|
|
1311
|
+
(l(!0), r(f, null, g(o.filteredTasks, (i) => (l(), r("tr", {
|
|
1315
1312
|
key: i.id
|
|
1316
1313
|
}, [
|
|
1317
1314
|
t("td", null, a(i.component), 1),
|
|
@@ -1322,59 +1319,59 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1322
1319
|
t("td", null, a(i.nextDue), 1),
|
|
1323
1320
|
t("td", null, [
|
|
1324
1321
|
t("span", {
|
|
1325
|
-
class:
|
|
1322
|
+
class: b(["status-badge", i.status.toLowerCase().replace(" ", "-")])
|
|
1326
1323
|
}, a(i.status), 3)
|
|
1327
1324
|
]),
|
|
1328
1325
|
t("td", null, [
|
|
1329
|
-
i.status === "Completed" ? (
|
|
1326
|
+
i.status === "Completed" ? (l(), r("button", {
|
|
1330
1327
|
key: 0,
|
|
1331
|
-
onClick: (
|
|
1328
|
+
onClick: (m) => o.printMaintenance(i.component),
|
|
1332
1329
|
class: "status-action"
|
|
1333
|
-
}, "Print", 8, Ut)) : (
|
|
1330
|
+
}, "Print", 8, Ut)) : (l(), r("button", {
|
|
1334
1331
|
key: 1,
|
|
1335
|
-
onClick: (
|
|
1332
|
+
onClick: (m) => o.showMaintenance(i.component),
|
|
1336
1333
|
class: "status-action"
|
|
1337
|
-
}, "Start", 8,
|
|
1334
|
+
}, "Start", 8, $t))
|
|
1338
1335
|
])
|
|
1339
1336
|
]))), 128))
|
|
1340
1337
|
])
|
|
1341
1338
|
]),
|
|
1342
|
-
|
|
1343
|
-
t("div",
|
|
1339
|
+
d.tasks.length ? c("", !0) : (l(), r("div", jt, [
|
|
1340
|
+
t("div", Bt, [
|
|
1344
1341
|
e[65] || (e[65] = t("h4", { class: "alert-heading" }, "Such Empty!!!", -1)),
|
|
1345
1342
|
e[66] || (e[66] = t("p", null, "You have no maintenance, because you have not scheduled any for this ship.", -1)),
|
|
1346
1343
|
e[67] || (e[67] = t("hr", null, null, -1)),
|
|
1347
|
-
t("p",
|
|
1348
|
-
e[64] || (e[64] =
|
|
1344
|
+
t("p", Ht, [
|
|
1345
|
+
e[64] || (e[64] = w("Navigate to the schedule tab, to start scheduling. Or click on this button to ", -1)),
|
|
1349
1346
|
t("button", {
|
|
1350
1347
|
type: "button",
|
|
1351
1348
|
class: "btn btn-primary",
|
|
1352
|
-
onClick: e[26] || (e[26] = (i) =>
|
|
1349
|
+
onClick: e[26] || (e[26] = (i) => o.switchSchedule())
|
|
1353
1350
|
}, "Schedule")
|
|
1354
1351
|
])
|
|
1355
1352
|
])
|
|
1356
1353
|
]))
|
|
1357
1354
|
])
|
|
1358
1355
|
], 2), [
|
|
1359
|
-
[
|
|
1356
|
+
[A, n.activeSection === "inventory"]
|
|
1360
1357
|
])
|
|
1361
1358
|
], 512), [
|
|
1362
|
-
[
|
|
1359
|
+
[A, !n.showReport]
|
|
1363
1360
|
]),
|
|
1364
|
-
|
|
1361
|
+
h(t("div", Qt, [
|
|
1365
1362
|
e[89] || (e[89] = t("div", { class: "header" }, [
|
|
1366
1363
|
t("div", { class: "report-title" }, "MAINTENANCE TASK REPORT")
|
|
1367
1364
|
], -1)),
|
|
1368
|
-
t("div",
|
|
1369
|
-
t("div",
|
|
1365
|
+
t("div", Jt, [
|
|
1366
|
+
t("div", Wt, [
|
|
1370
1367
|
e[69] || (e[69] = t("div", { class: "info-label" }, "Report Generated:", -1)),
|
|
1371
1368
|
t("div", null, a(n.reportDate), 1)
|
|
1372
1369
|
]),
|
|
1373
|
-
t("div",
|
|
1370
|
+
t("div", Kt, [
|
|
1374
1371
|
e[70] || (e[70] = t("div", { class: "info-label" }, "Report ID:", -1)),
|
|
1375
1372
|
t("div", null, a(n.reportId), 1)
|
|
1376
1373
|
]),
|
|
1377
|
-
t("div",
|
|
1374
|
+
t("div", zt, [
|
|
1378
1375
|
e[71] || (e[71] = t("div", { class: "info-label" }, "Total Tasks:", -1)),
|
|
1379
1376
|
t("div", null, a(n.maintenanceTasks.length), 1)
|
|
1380
1377
|
]),
|
|
@@ -1383,96 +1380,96 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1383
1380
|
t("div", null, "OceanHelm System")
|
|
1384
1381
|
], -1))
|
|
1385
1382
|
]),
|
|
1386
|
-
t("div",
|
|
1383
|
+
t("div", Gt, [
|
|
1387
1384
|
e[75] || (e[75] = t("div", { class: "section-title" }, "📊 Task Summary", -1)),
|
|
1388
1385
|
t("div", Yt, [
|
|
1389
1386
|
e[74] || (e[74] = x('<div class="summary-card"><div class="summary-number">1</div><div class="summary-label">Completed</div></div><div class="summary-card"><div class="summary-number">0</div><div class="summary-label">Pending</div></div><div class="summary-card"><div class="summary-number">0</div><div class="summary-label">Overdue</div></div>', 3)),
|
|
1390
|
-
t("div",
|
|
1391
|
-
t("div",
|
|
1387
|
+
t("div", Xt, [
|
|
1388
|
+
t("div", Zt, a(o.totalEstimatedHours), 1),
|
|
1392
1389
|
e[73] || (e[73] = t("div", { class: "summary-label" }, "Total Hours", -1))
|
|
1393
1390
|
])
|
|
1394
1391
|
])
|
|
1395
1392
|
]),
|
|
1396
|
-
t("div",
|
|
1393
|
+
t("div", es, [
|
|
1397
1394
|
e[85] || (e[85] = t("div", { class: "section-title" }, "🔧 Maintenance Tasks", -1)),
|
|
1398
|
-
(
|
|
1395
|
+
(l(!0), r(f, null, g(n.maintenanceTasks, (i) => (l(), r("div", {
|
|
1399
1396
|
key: i.taskName,
|
|
1400
|
-
class:
|
|
1397
|
+
class: b(["task-item", o.getTaskStatusClass(i)])
|
|
1401
1398
|
}, [
|
|
1402
|
-
t("div",
|
|
1399
|
+
t("div", ts, [
|
|
1403
1400
|
t("div", null, [
|
|
1404
|
-
t("div",
|
|
1405
|
-
|
|
1401
|
+
t("div", ss, [
|
|
1402
|
+
w(a(i.taskName) + " ", 1),
|
|
1406
1403
|
t("span", {
|
|
1407
|
-
class:
|
|
1404
|
+
class: b(["maintenance-type", "type-" + i.maintenanceType])
|
|
1408
1405
|
}, a(i.maintenanceType), 3)
|
|
1409
1406
|
]),
|
|
1410
|
-
t("div",
|
|
1407
|
+
t("div", is, "Component: " + a(i.component), 1)
|
|
1411
1408
|
]),
|
|
1412
1409
|
t("span", {
|
|
1413
|
-
class:
|
|
1410
|
+
class: b(["status-badge", "status-" + i.status.toLowerCase().replace(" ", "-")])
|
|
1414
1411
|
}, a(i.status), 3)
|
|
1415
1412
|
]),
|
|
1416
|
-
t("div",
|
|
1417
|
-
t("div",
|
|
1413
|
+
t("div", ns, [
|
|
1414
|
+
t("div", os, [
|
|
1418
1415
|
e[76] || (e[76] = t("div", { class: "detail-label" }, "Assigned To", -1)),
|
|
1419
|
-
t("div",
|
|
1416
|
+
t("div", ls, a(i.assignedTo), 1)
|
|
1420
1417
|
]),
|
|
1421
|
-
t("div",
|
|
1418
|
+
t("div", rs, [
|
|
1422
1419
|
e[77] || (e[77] = t("div", { class: "detail-label" }, "Estimated Hours", -1)),
|
|
1423
|
-
t("div",
|
|
1420
|
+
t("div", as, a(i.estimatedHours) + " hours", 1)
|
|
1424
1421
|
]),
|
|
1425
|
-
t("div",
|
|
1422
|
+
t("div", ds, [
|
|
1426
1423
|
e[78] || (e[78] = t("div", { class: "detail-label" }, "Last Performed", -1)),
|
|
1427
|
-
t("div",
|
|
1424
|
+
t("div", us, a(o.formatDate(i.lastPerformed)), 1)
|
|
1428
1425
|
]),
|
|
1429
|
-
t("div",
|
|
1426
|
+
t("div", cs, [
|
|
1430
1427
|
e[79] || (e[79] = t("div", { class: "detail-label" }, "Next Due", -1)),
|
|
1431
|
-
t("div",
|
|
1428
|
+
t("div", ms, a(o.formatDate(i.nextDue)), 1)
|
|
1432
1429
|
]),
|
|
1433
|
-
t("div",
|
|
1430
|
+
t("div", vs, [
|
|
1434
1431
|
e[80] || (e[80] = t("div", { class: "detail-label" }, "Recurrence", -1)),
|
|
1435
|
-
t("div",
|
|
1432
|
+
t("div", ps, a(i.recurrence), 1)
|
|
1436
1433
|
]),
|
|
1437
|
-
t("div",
|
|
1434
|
+
t("div", hs, [
|
|
1438
1435
|
e[81] || (e[81] = t("div", { class: "detail-label" }, "Remaining Days", -1)),
|
|
1439
1436
|
t("div", fs, a(i.remainingDays) + " days", 1)
|
|
1440
1437
|
])
|
|
1441
1438
|
]),
|
|
1442
|
-
i.description ? (
|
|
1439
|
+
i.description ? (l(), r("div", gs, [
|
|
1443
1440
|
e[82] || (e[82] = t("div", { class: "detail-label" }, "Description", -1)),
|
|
1444
|
-
t("div",
|
|
1445
|
-
])) :
|
|
1446
|
-
i.notes ? (
|
|
1441
|
+
t("div", bs, a(i.description), 1)
|
|
1442
|
+
])) : c("", !0),
|
|
1443
|
+
i.notes ? (l(), r("div", ys, [
|
|
1447
1444
|
e[83] || (e[83] = t("div", { class: "detail-label" }, "Notes", -1)),
|
|
1448
|
-
t("div",
|
|
1449
|
-
])) :
|
|
1450
|
-
i.checklistProgress && i.checklistProgress.length > 0 ? (
|
|
1445
|
+
t("div", ws, a(i.notes), 1)
|
|
1446
|
+
])) : c("", !0),
|
|
1447
|
+
i.checklistProgress && i.checklistProgress.length > 0 ? (l(), r("div", ks, [
|
|
1451
1448
|
e[84] || (e[84] = t("div", { class: "detail-label" }, "Checklist Progress", -1)),
|
|
1452
|
-
t("div",
|
|
1449
|
+
t("div", Cs, [
|
|
1453
1450
|
t("div", {
|
|
1454
1451
|
class: "progress-fill",
|
|
1455
|
-
style:
|
|
1452
|
+
style: N({ width: o.getChecklistProgress(i) + "%" })
|
|
1456
1453
|
}, null, 4)
|
|
1457
1454
|
]),
|
|
1458
|
-
t("div",
|
|
1459
|
-
t("div",
|
|
1460
|
-
(
|
|
1455
|
+
t("div", _s, a(o.getCompletedChecklistItems(i)) + " of " + a(i.checklistProgress.length) + " items completed (" + a(o.getChecklistProgress(i)) + "%) ", 1),
|
|
1456
|
+
t("div", Ds, [
|
|
1457
|
+
(l(!0), r(f, null, g(i.checklistProgress, (m, y) => (l(), r("div", {
|
|
1461
1458
|
key: y,
|
|
1462
1459
|
class: "checklist-item"
|
|
1463
1460
|
}, [
|
|
1464
|
-
t("span",
|
|
1465
|
-
t("span", null, a(
|
|
1461
|
+
t("span", xs, a(m.completed ? "✅" : "⭕"), 1),
|
|
1462
|
+
t("span", null, a(m.text || "Checklist Item " + (y + 1)), 1)
|
|
1466
1463
|
]))), 128))
|
|
1467
1464
|
])
|
|
1468
|
-
])) :
|
|
1465
|
+
])) : c("", !0)
|
|
1469
1466
|
], 2))), 128))
|
|
1470
1467
|
]),
|
|
1471
|
-
t("div",
|
|
1468
|
+
t("div", Ss, [
|
|
1472
1469
|
e[86] || (e[86] = t("div", { class: "section-title" }, "📋 Recommendations", -1)),
|
|
1473
|
-
t("div",
|
|
1470
|
+
t("div", As, [
|
|
1474
1471
|
t("ul", null, [
|
|
1475
|
-
(
|
|
1472
|
+
(l(!0), r(f, null, g(o.generateRecommendations(), (i) => (l(), r("li", { key: i }, a(i), 1))), 128))
|
|
1476
1473
|
])
|
|
1477
1474
|
])
|
|
1478
1475
|
]),
|
|
@@ -1483,7 +1480,7 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1483
1480
|
]),
|
|
1484
1481
|
t("div", { style: { "margin-top": "10px", color: "#666" } }, "OceanHelm Maintenance System")
|
|
1485
1482
|
], -1)),
|
|
1486
|
-
t("div",
|
|
1483
|
+
t("div", Ts, [
|
|
1487
1484
|
e[87] || (e[87] = t("div", null, [
|
|
1488
1485
|
t("strong", null, "Date")
|
|
1489
1486
|
], -1)),
|
|
@@ -1491,12 +1488,12 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1491
1488
|
])
|
|
1492
1489
|
])
|
|
1493
1490
|
], 512), [
|
|
1494
|
-
[
|
|
1491
|
+
[A, n.showReport]
|
|
1495
1492
|
])
|
|
1496
1493
|
])
|
|
1497
|
-
])) :
|
|
1494
|
+
])) : c("", !0);
|
|
1498
1495
|
}
|
|
1499
|
-
const
|
|
1496
|
+
const Fs = /* @__PURE__ */ S($e, [["render", Is]]);
|
|
1500
1497
|
const Rs = {
|
|
1501
1498
|
name: "ActivityLogs",
|
|
1502
1499
|
props: {
|
|
@@ -1527,31 +1524,31 @@ const Rs = {
|
|
|
1527
1524
|
}[s] || "badge-view";
|
|
1528
1525
|
}
|
|
1529
1526
|
}
|
|
1530
|
-
},
|
|
1527
|
+
}, Vs = { class: "activity-logs" }, Ms = { class: "a-controls" }, Ns = { class: "a-search-box" }, Es = ["value"], Ls = ["value"], Os = { class: "stats-grid" }, Us = { class: "stat-card" }, $s = { class: "value" }, js = { class: "stat-card" }, Bs = { class: "value" }, Hs = { class: "stat-card" }, Qs = { class: "value" }, Js = { class: "logs-container" }, Ws = {
|
|
1531
1528
|
key: 0,
|
|
1532
1529
|
class: "loading"
|
|
1533
|
-
},
|
|
1530
|
+
}, Ks = {
|
|
1534
1531
|
key: 1,
|
|
1535
1532
|
class: "no-logs"
|
|
1536
|
-
},
|
|
1537
|
-
function
|
|
1538
|
-
return
|
|
1539
|
-
t("div",
|
|
1540
|
-
t("div",
|
|
1533
|
+
}, zs = { key: 2 }, Gs = { class: "logs-table" }, Ys = { style: { color: "gray" } }, Xs = { style: { color: "gray" } }, Zs = { class: "pagination" }, ei = ["disabled"], ti = ["onClick"], si = ["disabled"];
|
|
1534
|
+
function ii(s, e, d, p, n, o) {
|
|
1535
|
+
return l(), r("div", Vs, [
|
|
1536
|
+
t("div", Ms, [
|
|
1537
|
+
t("div", Ns, [
|
|
1541
1538
|
t("input", {
|
|
1542
1539
|
type: "text",
|
|
1543
1540
|
placeholder: "Search activities, users, or actions...",
|
|
1544
|
-
value:
|
|
1541
|
+
value: d.searchTerm,
|
|
1545
1542
|
onInput: e[0] || (e[0] = (i) => s.$emit("update:searchTerm", i.target.value))
|
|
1546
1543
|
}, null, 40, Es)
|
|
1547
1544
|
]),
|
|
1548
1545
|
t("select", {
|
|
1549
1546
|
class: "filter-select",
|
|
1550
|
-
value:
|
|
1547
|
+
value: d.selectedFilter,
|
|
1551
1548
|
onChange: e[1] || (e[1] = (i) => s.$emit("update:selectedFilter", i.target.value))
|
|
1552
1549
|
}, e[6] || (e[6] = [
|
|
1553
1550
|
x('<option value="all">All Activities</option><option value="login">Login</option><option value="logout">Logout</option><option value="create">Create</option><option value="update">Update</option><option value="delete">Delete</option><option value="view">View</option>', 7)
|
|
1554
|
-
]), 40,
|
|
1551
|
+
]), 40, Ls),
|
|
1555
1552
|
t("button", {
|
|
1556
1553
|
class: "btn btn-primary",
|
|
1557
1554
|
onClick: e[2] || (e[2] = (i) => s.$emit("refresh"))
|
|
@@ -1564,30 +1561,30 @@ function si(s, e, u, b, n, r) {
|
|
|
1564
1561
|
t("div", Os, [
|
|
1565
1562
|
t("div", Us, [
|
|
1566
1563
|
e[7] || (e[7] = t("h3", null, "Total Activities", -1)),
|
|
1567
|
-
t("div",
|
|
1564
|
+
t("div", $s, a(d.totalActivities), 1)
|
|
1568
1565
|
]),
|
|
1569
1566
|
t("div", js, [
|
|
1570
1567
|
e[8] || (e[8] = t("h3", null, "Today's Activities", -1)),
|
|
1571
|
-
t("div",
|
|
1568
|
+
t("div", Bs, a(d.todayActivities), 1)
|
|
1572
1569
|
]),
|
|
1573
|
-
t("div",
|
|
1570
|
+
t("div", Hs, [
|
|
1574
1571
|
e[9] || (e[9] = t("h3", null, "Active Users", -1)),
|
|
1575
|
-
t("div",
|
|
1572
|
+
t("div", Qs, a(d.activeUsers), 1)
|
|
1576
1573
|
]),
|
|
1577
1574
|
e[10] || (e[10] = t("div", { class: "stat-card" }, [
|
|
1578
1575
|
t("h3", null, "Important"),
|
|
1579
1576
|
t("div", { class: "badge-danger" }, " Logs are deleted at the end of every month, please download a copy ")
|
|
1580
1577
|
], -1))
|
|
1581
1578
|
]),
|
|
1582
|
-
t("div",
|
|
1583
|
-
|
|
1579
|
+
t("div", Js, [
|
|
1580
|
+
d.loading ? (l(), r("div", Ws, e[11] || (e[11] = [
|
|
1584
1581
|
t("div", { class: "spinner" }, null, -1),
|
|
1585
1582
|
t("p", null, "Loading activity logs...", -1)
|
|
1586
|
-
]))) :
|
|
1583
|
+
]))) : d.logs.length === 0 ? (l(), r("div", Ks, e[12] || (e[12] = [
|
|
1587
1584
|
t("h3", null, "No activities found", -1),
|
|
1588
1585
|
t("p", null, "Try adjusting your search or filter criteria", -1)
|
|
1589
|
-
]))) : (
|
|
1590
|
-
t("table",
|
|
1586
|
+
]))) : (l(), r("div", zs, [
|
|
1587
|
+
t("table", Gs, [
|
|
1591
1588
|
e[13] || (e[13] = t("thead", null, [
|
|
1592
1589
|
t("tr", null, [
|
|
1593
1590
|
t("th", null, "Timestamp"),
|
|
@@ -1598,54 +1595,53 @@ function si(s, e, u, b, n, r) {
|
|
|
1598
1595
|
])
|
|
1599
1596
|
], -1)),
|
|
1600
1597
|
t("tbody", null, [
|
|
1601
|
-
(
|
|
1598
|
+
(l(!0), r(f, null, g(d.paginatedLogs, (i) => (l(), r("tr", {
|
|
1602
1599
|
key: i.id
|
|
1603
1600
|
}, [
|
|
1604
|
-
t("td", null, a(
|
|
1601
|
+
t("td", null, a(o.formatDate(i.timestamp)), 1),
|
|
1605
1602
|
t("td", null, [
|
|
1606
1603
|
t("div", null, a(i.user_name), 1),
|
|
1607
1604
|
t("small", Ys, a(i.email), 1)
|
|
1608
1605
|
]),
|
|
1609
1606
|
t("td", null, [
|
|
1610
1607
|
t("span", {
|
|
1611
|
-
class:
|
|
1608
|
+
class: b(["activity-badge", o.getBadgeClass(i.action)])
|
|
1612
1609
|
}, a(i.action), 3)
|
|
1613
1610
|
]),
|
|
1614
1611
|
t("td", null, [
|
|
1615
|
-
|
|
1616
|
-
(
|
|
1612
|
+
w(a(i.details.status) + " ", 1),
|
|
1613
|
+
(l(!0), r(f, null, g(i.details.information, (m, y) => (l(), r("div", { key: y }, [
|
|
1617
1614
|
t("strong", null, a(y) + ": ", 1),
|
|
1618
|
-
t("small",
|
|
1615
|
+
t("small", Xs, a(m.from || "") + " → " + a(m.to || m), 1)
|
|
1619
1616
|
]))), 128))
|
|
1620
1617
|
]),
|
|
1621
1618
|
t("td", null, a(i.table_name), 1)
|
|
1622
1619
|
]))), 128))
|
|
1623
1620
|
])
|
|
1624
1621
|
]),
|
|
1625
|
-
t("div",
|
|
1622
|
+
t("div", Zs, [
|
|
1626
1623
|
t("button", {
|
|
1627
|
-
onClick: e[4] || (e[4] = (i) => s.$emit("change-page",
|
|
1628
|
-
disabled:
|
|
1629
|
-
}, " Previous ", 8,
|
|
1630
|
-
(
|
|
1624
|
+
onClick: e[4] || (e[4] = (i) => s.$emit("change-page", d.currentPage - 1)),
|
|
1625
|
+
disabled: d.currentPage === 1
|
|
1626
|
+
}, " Previous ", 8, ei),
|
|
1627
|
+
(l(!0), r(f, null, g(d.totalPages, (i) => (l(), r("button", {
|
|
1631
1628
|
key: i,
|
|
1632
|
-
onClick: (
|
|
1633
|
-
class:
|
|
1634
|
-
}, a(i), 11,
|
|
1629
|
+
onClick: (m) => s.$emit("change-page", i),
|
|
1630
|
+
class: b({ active: d.currentPage === i })
|
|
1631
|
+
}, a(i), 11, ti))), 128)),
|
|
1635
1632
|
t("button", {
|
|
1636
|
-
onClick: e[5] || (e[5] = (i) => s.$emit("change-page",
|
|
1637
|
-
disabled:
|
|
1638
|
-
}, " Next ", 8,
|
|
1633
|
+
onClick: e[5] || (e[5] = (i) => s.$emit("change-page", d.currentPage + 1)),
|
|
1634
|
+
disabled: d.currentPage === d.totalPages
|
|
1635
|
+
}, " Next ", 8, si)
|
|
1639
1636
|
])
|
|
1640
1637
|
]))
|
|
1641
1638
|
])
|
|
1642
1639
|
]);
|
|
1643
1640
|
}
|
|
1644
|
-
const
|
|
1645
|
-
const
|
|
1641
|
+
const ni = /* @__PURE__ */ S(Rs, [["render", ii]]);
|
|
1642
|
+
const oi = {
|
|
1646
1643
|
name: "CrewManagement",
|
|
1647
1644
|
props: {
|
|
1648
|
-
// Required props
|
|
1649
1645
|
crew: {
|
|
1650
1646
|
type: Array,
|
|
1651
1647
|
required: !0,
|
|
@@ -1659,7 +1655,6 @@ const ni = {
|
|
|
1659
1655
|
type: Object,
|
|
1660
1656
|
default: () => ({ role: "viewer" })
|
|
1661
1657
|
},
|
|
1662
|
-
// Optional props
|
|
1663
1658
|
loading: {
|
|
1664
1659
|
type: Boolean,
|
|
1665
1660
|
default: !1
|
|
@@ -1668,7 +1663,6 @@ const ni = {
|
|
|
1668
1663
|
type: Array,
|
|
1669
1664
|
default: () => ["Captain", "First Officer", "Engineer", "Deckhand", "Mechanic", "Cook"]
|
|
1670
1665
|
},
|
|
1671
|
-
// Configuration props
|
|
1672
1666
|
config: {
|
|
1673
1667
|
type: Object,
|
|
1674
1668
|
default: () => ({
|
|
@@ -1686,11 +1680,13 @@ const ni = {
|
|
|
1686
1680
|
"crew-edit",
|
|
1687
1681
|
"crew-delete",
|
|
1688
1682
|
"crew-assign-shift",
|
|
1683
|
+
"crew-deboard",
|
|
1689
1684
|
"crew-add-certification",
|
|
1690
1685
|
"crew-view-certification",
|
|
1691
1686
|
"search-changed",
|
|
1692
1687
|
"filter-changed",
|
|
1693
|
-
"access-denied"
|
|
1688
|
+
"access-denied",
|
|
1689
|
+
"upload-cert-image"
|
|
1694
1690
|
],
|
|
1695
1691
|
data() {
|
|
1696
1692
|
return {
|
|
@@ -1698,13 +1694,26 @@ const ni = {
|
|
|
1698
1694
|
filterStatus: "all",
|
|
1699
1695
|
showAddForm: !1,
|
|
1700
1696
|
formErrors: {},
|
|
1697
|
+
expandedLogs: [],
|
|
1698
|
+
showTimesheet: !1,
|
|
1699
|
+
timesheetFilter: "all",
|
|
1700
|
+
timesheetSearch: "",
|
|
1701
|
+
timesheetSortKey: "timestamp",
|
|
1702
|
+
timesheetSortOrder: "desc",
|
|
1701
1703
|
newCrew: {
|
|
1702
1704
|
name: "",
|
|
1703
1705
|
role: "Deckhand",
|
|
1704
1706
|
customRole: "",
|
|
1705
1707
|
status: "available",
|
|
1706
1708
|
nextShift: "",
|
|
1707
|
-
certifications: [{
|
|
1709
|
+
certifications: [{
|
|
1710
|
+
name: "",
|
|
1711
|
+
expiryDate: "",
|
|
1712
|
+
imageFile: null,
|
|
1713
|
+
imagePreview: null,
|
|
1714
|
+
imageName: "",
|
|
1715
|
+
imageType: ""
|
|
1716
|
+
}],
|
|
1708
1717
|
notes: "",
|
|
1709
1718
|
email: "",
|
|
1710
1719
|
onBoard: ""
|
|
@@ -1717,10 +1726,46 @@ const ni = {
|
|
|
1717
1726
|
},
|
|
1718
1727
|
filteredCrew() {
|
|
1719
1728
|
return this.crew.filter((s) => {
|
|
1720
|
-
const e = this.searchQuery === "" || s.name.toLowerCase().includes(this.searchQuery.toLowerCase()) || s.role.toLowerCase().includes(this.searchQuery.toLowerCase()) || s.vessel && s.vessel.toLowerCase().includes(this.searchQuery.toLowerCase()),
|
|
1721
|
-
return e &&
|
|
1729
|
+
const e = this.searchQuery === "" || s.name.toLowerCase().includes(this.searchQuery.toLowerCase()) || s.role.toLowerCase().includes(this.searchQuery.toLowerCase()) || s.vessel && s.vessel.toLowerCase().includes(this.searchQuery.toLowerCase()), d = this.filterStatus === "all" || s.status === this.filterStatus;
|
|
1730
|
+
return e && d;
|
|
1722
1731
|
});
|
|
1723
1732
|
},
|
|
1733
|
+
allTimesheetEntries() {
|
|
1734
|
+
const s = [];
|
|
1735
|
+
return this.crew.forEach((e) => {
|
|
1736
|
+
e.log && e.log.length > 0 && e.log.forEach((d, p) => {
|
|
1737
|
+
s.push({
|
|
1738
|
+
...d,
|
|
1739
|
+
crewName: e.name,
|
|
1740
|
+
role: e.role,
|
|
1741
|
+
crewId: e.id,
|
|
1742
|
+
uniqueId: `${e.id}-${p}`
|
|
1743
|
+
});
|
|
1744
|
+
});
|
|
1745
|
+
}), s.sort((e, d) => {
|
|
1746
|
+
const p = new Date(e.timestamp), n = new Date(d.timestamp);
|
|
1747
|
+
return this.timesheetSortOrder === "desc" ? n - p : p - n;
|
|
1748
|
+
});
|
|
1749
|
+
},
|
|
1750
|
+
filteredTimesheetEntries() {
|
|
1751
|
+
let s = this.allTimesheetEntries;
|
|
1752
|
+
if (this.timesheetFilter !== "all" && (s = s.filter((e) => e.action === this.timesheetFilter)), this.timesheetSearch) {
|
|
1753
|
+
const e = this.timesheetSearch.toLowerCase();
|
|
1754
|
+
s = s.filter(
|
|
1755
|
+
(d) => d.crewName.toLowerCase().includes(e) || d.role.toLowerCase().includes(e) || d.action.toLowerCase().includes(e) || d.vessel && d.vessel.toLowerCase().includes(e) || d.notes && d.notes.toLowerCase().includes(e)
|
|
1756
|
+
);
|
|
1757
|
+
}
|
|
1758
|
+
return this.sortTimesheetEntries(s);
|
|
1759
|
+
},
|
|
1760
|
+
uniqueCrewCount() {
|
|
1761
|
+
return new Set(this.filteredTimesheetEntries.map((e) => e.crewId)).size;
|
|
1762
|
+
},
|
|
1763
|
+
timesheetDateRange() {
|
|
1764
|
+
if (this.filteredTimesheetEntries.length === 0)
|
|
1765
|
+
return "N/A";
|
|
1766
|
+
const s = this.filteredTimesheetEntries.map((n) => new Date(n.timestamp)), e = new Date(Math.min(...s)), d = new Date(Math.max(...s)), p = (n) => n.toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
|
|
1767
|
+
return `${p(e)} - ${p(d)}`;
|
|
1768
|
+
},
|
|
1724
1769
|
canAddCrew() {
|
|
1725
1770
|
return this.config.enableAdd && this.hasPermission("add");
|
|
1726
1771
|
},
|
|
@@ -1732,22 +1777,22 @@ const ni = {
|
|
|
1732
1777
|
},
|
|
1733
1778
|
canAssignShift() {
|
|
1734
1779
|
return this.config.enableAssignShift && this.hasPermission("assign");
|
|
1780
|
+
},
|
|
1781
|
+
canDeboardCrew() {
|
|
1782
|
+
return this.config.enableAssignShift && this.hasPermission("assign");
|
|
1735
1783
|
}
|
|
1736
1784
|
},
|
|
1737
1785
|
methods: {
|
|
1738
|
-
// Permission checking
|
|
1739
1786
|
hasPermission(s) {
|
|
1740
|
-
const { role: e, vessel:
|
|
1741
|
-
let
|
|
1787
|
+
const { role: e, vessel: d } = this.userProfile, p = d === this.vesselName;
|
|
1788
|
+
let o = {
|
|
1742
1789
|
owner: ["add", "edit", "delete", "assign", "view"],
|
|
1743
1790
|
staff: ["add", "edit", "assign", "view"],
|
|
1744
1791
|
captain: ["assign", "view"],
|
|
1745
|
-
// default for captain
|
|
1746
1792
|
viewer: ["view"]
|
|
1747
1793
|
}[e] || [];
|
|
1748
|
-
return e === "captain" &&
|
|
1794
|
+
return e === "captain" && p && (o = [...o, "add"]), o.includes(s);
|
|
1749
1795
|
},
|
|
1750
|
-
// Event handlers
|
|
1751
1796
|
handleToggleAddForm() {
|
|
1752
1797
|
if (!this.canAddCrew) {
|
|
1753
1798
|
this.$emit("access-denied", { action: "add crew", userProfile: this.userProfile });
|
|
@@ -1761,23 +1806,83 @@ const ni = {
|
|
|
1761
1806
|
handleFilter() {
|
|
1762
1807
|
this.$emit("filter-changed", this.filterStatus);
|
|
1763
1808
|
},
|
|
1764
|
-
|
|
1809
|
+
filterTimesheet() {
|
|
1810
|
+
},
|
|
1811
|
+
sortTimesheet(s) {
|
|
1812
|
+
this.timesheetSortKey === s ? this.timesheetSortOrder = this.timesheetSortOrder === "asc" ? "desc" : "asc" : (this.timesheetSortKey = s, this.timesheetSortOrder = "asc");
|
|
1813
|
+
},
|
|
1814
|
+
sortTimesheetEntries(s) {
|
|
1815
|
+
const e = [...s];
|
|
1816
|
+
return e.sort((d, p) => {
|
|
1817
|
+
let n, o;
|
|
1818
|
+
switch (this.timesheetSortKey) {
|
|
1819
|
+
case "timestamp":
|
|
1820
|
+
n = new Date(d.timestamp), o = new Date(p.timestamp);
|
|
1821
|
+
break;
|
|
1822
|
+
case "crewName":
|
|
1823
|
+
n = d.crewName.toLowerCase(), o = p.crewName.toLowerCase();
|
|
1824
|
+
break;
|
|
1825
|
+
case "role":
|
|
1826
|
+
n = d.role.toLowerCase(), o = p.role.toLowerCase();
|
|
1827
|
+
break;
|
|
1828
|
+
case "action":
|
|
1829
|
+
n = d.action.toLowerCase(), o = p.action.toLowerCase();
|
|
1830
|
+
break;
|
|
1831
|
+
default:
|
|
1832
|
+
return 0;
|
|
1833
|
+
}
|
|
1834
|
+
return n < o ? this.timesheetSortOrder === "asc" ? -1 : 1 : n > o ? this.timesheetSortOrder === "asc" ? 1 : -1 : 0;
|
|
1835
|
+
}), e;
|
|
1836
|
+
},
|
|
1837
|
+
getTimesheetRowClass(s) {
|
|
1838
|
+
return `timesheet-row-${s.toLowerCase().replace(/\s+/g, "-")}`;
|
|
1839
|
+
},
|
|
1840
|
+
async handleAddCrewMember() {
|
|
1765
1841
|
if (!this.validateForm())
|
|
1766
1842
|
return;
|
|
1767
1843
|
const s = this.newCrew.certifications.filter(
|
|
1768
|
-
(
|
|
1769
|
-
)
|
|
1844
|
+
(n) => n.name.trim() !== "" && n.expiryDate !== "" && n.imageFile !== null
|
|
1845
|
+
);
|
|
1846
|
+
if (s.length === 0) {
|
|
1847
|
+
alert("Please add at least one complete certification with name, expiry date, and image.");
|
|
1848
|
+
return;
|
|
1849
|
+
}
|
|
1850
|
+
const e = this.newCrew.role === "Other" ? this.newCrew.customRole : this.newCrew.role, d = await Promise.all(
|
|
1851
|
+
s.map(async (n, o) => {
|
|
1852
|
+
const i = await this.uploadCertificationImage(n.imageFile, this.newCrew.email);
|
|
1853
|
+
return {
|
|
1854
|
+
name: n.name,
|
|
1855
|
+
expiryDate: n.expiryDate,
|
|
1856
|
+
imageName: n.imageName,
|
|
1857
|
+
imageType: n.imageType,
|
|
1858
|
+
imageUrl: i.publicUrl
|
|
1859
|
+
// Add the public URL here
|
|
1860
|
+
};
|
|
1861
|
+
})
|
|
1862
|
+
), p = {
|
|
1770
1863
|
name: this.newCrew.name,
|
|
1771
1864
|
role: e,
|
|
1772
1865
|
status: this.newCrew.status,
|
|
1773
|
-
certifications:
|
|
1866
|
+
certifications: d,
|
|
1774
1867
|
notes: this.newCrew.notes,
|
|
1775
1868
|
vessel: this.vesselName,
|
|
1776
1869
|
email: this.newCrew.email,
|
|
1777
1870
|
onBoard: this.newCrew.onBoard,
|
|
1778
1871
|
nextShift: this.newCrew.nextShift
|
|
1779
1872
|
};
|
|
1780
|
-
this.$emit("crew-add",
|
|
1873
|
+
this.$emit("crew-add", p), this.resetForm(), this.showAddForm = !1;
|
|
1874
|
+
},
|
|
1875
|
+
// Add this helper method to handle the upload:
|
|
1876
|
+
async uploadCertificationImage(s, e) {
|
|
1877
|
+
return new Promise((d, p) => {
|
|
1878
|
+
this.$emit("upload-cert-image", {
|
|
1879
|
+
file: s,
|
|
1880
|
+
email: e,
|
|
1881
|
+
callback: (n) => {
|
|
1882
|
+
n.error ? p(n.error) : d(n);
|
|
1883
|
+
}
|
|
1884
|
+
});
|
|
1885
|
+
});
|
|
1781
1886
|
},
|
|
1782
1887
|
handleCancelForm() {
|
|
1783
1888
|
this.showAddForm = !1, this.resetForm();
|
|
@@ -1796,6 +1901,22 @@ const ni = {
|
|
|
1796
1901
|
}
|
|
1797
1902
|
this.$emit("crew-assign-shift", s);
|
|
1798
1903
|
},
|
|
1904
|
+
handleDeboardCrew(s) {
|
|
1905
|
+
if (!this.canDeboardCrew) {
|
|
1906
|
+
this.$emit("access-denied", { action: "deboard crew", userProfile: this.userProfile });
|
|
1907
|
+
return;
|
|
1908
|
+
}
|
|
1909
|
+
let e = null;
|
|
1910
|
+
if (s.nextShift) {
|
|
1911
|
+
const d = new Date(s.nextShift), n = Math.abs(/* @__PURE__ */ new Date() - d);
|
|
1912
|
+
e = Math.ceil(n / (1e3 * 60 * 60 * 24));
|
|
1913
|
+
}
|
|
1914
|
+
this.$emit("crew-deboard", { member: s, duration: e });
|
|
1915
|
+
},
|
|
1916
|
+
toggleCrewLog(s) {
|
|
1917
|
+
const e = this.expandedLogs.indexOf(s);
|
|
1918
|
+
e > -1 ? this.expandedLogs.splice(e, 1) : this.expandedLogs.push(s);
|
|
1919
|
+
},
|
|
1799
1920
|
handleAddCertification(s) {
|
|
1800
1921
|
if (!this.canEditCrew) {
|
|
1801
1922
|
this.$emit("access-denied", { action: "add certification", userProfile: this.userProfile });
|
|
@@ -1806,7 +1927,6 @@ const ni = {
|
|
|
1806
1927
|
handleViewCertification(s, e) {
|
|
1807
1928
|
this.$emit("crew-view-certification", { certification: s, member: e });
|
|
1808
1929
|
},
|
|
1809
|
-
// Form management
|
|
1810
1930
|
resetForm() {
|
|
1811
1931
|
this.newCrew = {
|
|
1812
1932
|
name: "",
|
|
@@ -1814,7 +1934,14 @@ const ni = {
|
|
|
1814
1934
|
customRole: "",
|
|
1815
1935
|
status: "available",
|
|
1816
1936
|
nextShift: "",
|
|
1817
|
-
certifications: [{
|
|
1937
|
+
certifications: [{
|
|
1938
|
+
name: "",
|
|
1939
|
+
expiryDate: "",
|
|
1940
|
+
imageFile: null,
|
|
1941
|
+
imagePreview: null,
|
|
1942
|
+
imageName: "",
|
|
1943
|
+
imageType: ""
|
|
1944
|
+
}],
|
|
1818
1945
|
notes: "",
|
|
1819
1946
|
email: "",
|
|
1820
1947
|
onBoard: ""
|
|
@@ -1834,12 +1961,37 @@ const ni = {
|
|
|
1834
1961
|
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s);
|
|
1835
1962
|
},
|
|
1836
1963
|
addCertificationEntry() {
|
|
1837
|
-
this.newCrew.certifications.push({
|
|
1964
|
+
this.newCrew.certifications.push({
|
|
1965
|
+
name: "",
|
|
1966
|
+
expiryDate: "",
|
|
1967
|
+
imageFile: null,
|
|
1968
|
+
imagePreview: null,
|
|
1969
|
+
imageName: "",
|
|
1970
|
+
imageType: ""
|
|
1971
|
+
});
|
|
1838
1972
|
},
|
|
1839
1973
|
removeCertification(s) {
|
|
1840
1974
|
this.newCrew.certifications.splice(s, 1);
|
|
1841
1975
|
},
|
|
1842
|
-
|
|
1976
|
+
handleCertImageUpload(s, e) {
|
|
1977
|
+
const d = s.target.files[0];
|
|
1978
|
+
if (!d)
|
|
1979
|
+
return;
|
|
1980
|
+
const p = this.newCrew.certifications[e];
|
|
1981
|
+
if (p.imageFile = d, p.imageName = d.name, p.imageType = d.type.includes("pdf") ? "pdf" : "image", p.imageType === "image") {
|
|
1982
|
+
const n = new FileReader();
|
|
1983
|
+
n.onload = (o) => {
|
|
1984
|
+
p.imagePreview = o.target.result;
|
|
1985
|
+
}, n.readAsDataURL(d);
|
|
1986
|
+
} else
|
|
1987
|
+
p.imagePreview = "pdf";
|
|
1988
|
+
},
|
|
1989
|
+
removeCertImage(s) {
|
|
1990
|
+
const e = this.newCrew.certifications[s];
|
|
1991
|
+
e.imageFile = null, e.imagePreview = null, e.imageName = "", e.imageType = "";
|
|
1992
|
+
const d = document.getElementById("cert-image-" + s);
|
|
1993
|
+
d && (d.value = "");
|
|
1994
|
+
},
|
|
1843
1995
|
formatStatus(s) {
|
|
1844
1996
|
return s ? s.charAt(0).toUpperCase() + s.slice(1) : "";
|
|
1845
1997
|
},
|
|
@@ -1861,72 +2013,139 @@ const ni = {
|
|
|
1861
2013
|
getExpiryStatus(s) {
|
|
1862
2014
|
if (!s)
|
|
1863
2015
|
return "none";
|
|
1864
|
-
const e = new Date(s),
|
|
1865
|
-
return
|
|
2016
|
+
const e = new Date(s), d = /* @__PURE__ */ new Date(), p = /* @__PURE__ */ new Date();
|
|
2017
|
+
return p.setMonth(d.getMonth() + 1), e <= d ? "expired" : e <= p ? "expiringSoon" : "valid";
|
|
2018
|
+
},
|
|
2019
|
+
formatLogDate(s) {
|
|
2020
|
+
return s ? new Date(s).toLocaleDateString("en-US", {
|
|
2021
|
+
year: "numeric",
|
|
2022
|
+
month: "short",
|
|
2023
|
+
day: "numeric",
|
|
2024
|
+
hour: "2-digit",
|
|
2025
|
+
minute: "2-digit"
|
|
2026
|
+
}) : "";
|
|
2027
|
+
},
|
|
2028
|
+
getLogActionClass(s) {
|
|
2029
|
+
return {
|
|
2030
|
+
Embarked: "log-action-embark",
|
|
2031
|
+
Deboarded: "log-action-deboard",
|
|
2032
|
+
Assigned: "log-action-assign",
|
|
2033
|
+
"Status Changed": "log-action-status"
|
|
2034
|
+
}[s] || "";
|
|
2035
|
+
},
|
|
2036
|
+
getLogIcon(s) {
|
|
2037
|
+
return {
|
|
2038
|
+
Embarked: "bi bi-box-arrow-in-right",
|
|
2039
|
+
Deboarded: "bi bi-box-arrow-left",
|
|
2040
|
+
Assigned: "bi bi-calendar-check",
|
|
2041
|
+
"Status Changed": "bi bi-arrow-repeat"
|
|
2042
|
+
}[s] || "bi bi-circle-fill";
|
|
1866
2043
|
}
|
|
1867
2044
|
}
|
|
1868
|
-
},
|
|
2045
|
+
}, li = { class: "crew-management" }, ri = {
|
|
1869
2046
|
key: 0,
|
|
1870
2047
|
class: "wave-bg"
|
|
1871
|
-
},
|
|
2048
|
+
}, ai = { class: "crew-section" }, di = { class: "crew-section-header" }, ui = { class: "crew-subhead" }, ci = {
|
|
1872
2049
|
key: 0,
|
|
2050
|
+
class: "search-filter"
|
|
2051
|
+
}, mi = {
|
|
2052
|
+
key: 1,
|
|
1873
2053
|
class: "loading-state"
|
|
1874
|
-
},
|
|
2054
|
+
}, vi = {
|
|
2055
|
+
key: 2,
|
|
2056
|
+
class: "timesheet-view"
|
|
2057
|
+
}, pi = { class: "timesheet-header" }, hi = { class: "timesheet-controls" }, fi = { class: "timesheet-summary" }, gi = { class: "summary-card" }, bi = { class: "summary-value" }, yi = { class: "summary-card" }, wi = { class: "summary-value" }, ki = { class: "summary-card" }, Ci = { class: "summary-value" }, _i = {
|
|
2058
|
+
key: 0,
|
|
2059
|
+
class: "no-results"
|
|
2060
|
+
}, Di = {
|
|
1875
2061
|
key: 1,
|
|
2062
|
+
class: "timesheet-table-container"
|
|
2063
|
+
}, xi = { class: "timesheet-table" }, Si = { class: "timestamp-cell" }, Ai = { class: "crew-name-cell" }, Pi = { class: "role-cell" }, Ti = { class: "action-cell" }, qi = { class: "vessel-cell" }, Ii = { class: "duration-cell" }, Fi = { class: "notes-cell" }, Ri = {
|
|
2064
|
+
key: 3,
|
|
1876
2065
|
class: "crew-grid"
|
|
1877
|
-
},
|
|
2066
|
+
}, Vi = { class: "crew-name" }, Mi = { class: "crew-role" }, Ni = { class: "crew-certifications" }, Ei = ["onClick"], Li = ["onClick"], Oi = { class: "crew-availability" }, Ui = { class: "crew-availability" }, $i = { class: "action-buttons" }, ji = {
|
|
1878
2067
|
key: 0,
|
|
1879
2068
|
class: "status-available crew-availability vcard"
|
|
1880
|
-
},
|
|
2069
|
+
}, Bi = {
|
|
1881
2070
|
key: 1,
|
|
1882
2071
|
class: "status-unavailable crew-availability vcard"
|
|
1883
|
-
},
|
|
1884
|
-
key:
|
|
2072
|
+
}, Hi = ["onClick"], Qi = ["onClick"], Ji = { class: "crew-footer" }, Wi = {
|
|
2073
|
+
key: 0,
|
|
2074
|
+
class: "crew-log-toggle"
|
|
2075
|
+
}, Ki = ["onClick"], zi = ["onClick"], Gi = {
|
|
2076
|
+
key: 0,
|
|
2077
|
+
class: "crew-log"
|
|
2078
|
+
}, Yi = { class: "log-date" }, Xi = { class: "log-details" }, Zi = { key: 0 }, en = { key: 1 }, tn = {
|
|
2079
|
+
key: 0,
|
|
2080
|
+
class: "log-notes"
|
|
2081
|
+
}, sn = {
|
|
2082
|
+
key: 4,
|
|
1885
2083
|
class: "no-results"
|
|
1886
|
-
},
|
|
1887
|
-
key:
|
|
2084
|
+
}, nn = {
|
|
2085
|
+
key: 5,
|
|
1888
2086
|
class: "add-crew-form"
|
|
1889
|
-
},
|
|
2087
|
+
}, on = { class: "form-row" }, ln = { class: "form-group" }, rn = {
|
|
1890
2088
|
key: 0,
|
|
1891
2089
|
class: "error-message"
|
|
1892
|
-
},
|
|
2090
|
+
}, an = { class: "form-group" }, dn = ["value"], un = { class: "form-row" }, cn = { class: "form-group" }, mn = { class: "form-group" }, vn = {
|
|
1893
2091
|
key: 0,
|
|
1894
2092
|
class: "error-message"
|
|
1895
|
-
},
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
2093
|
+
}, pn = { class: "certification-section" }, hn = { class: "form-row" }, fn = { class: "form-group" }, gn = ["onUpdate:modelValue"], bn = { class: "form-group" }, yn = ["onUpdate:modelValue"], wn = { class: "form-group" }, kn = { class: "image-upload-wrapper" }, Cn = ["id", "onChange"], _n = ["for"], Dn = {
|
|
2094
|
+
key: 0,
|
|
2095
|
+
class: "image-preview"
|
|
2096
|
+
}, xn = ["src"], Sn = {
|
|
2097
|
+
key: 1,
|
|
2098
|
+
class: "pdf-preview"
|
|
2099
|
+
}, An = ["onClick"], Pn = {
|
|
2100
|
+
key: 1,
|
|
2101
|
+
class: "file-name"
|
|
2102
|
+
}, Tn = {
|
|
2103
|
+
class: "form-group",
|
|
2104
|
+
style: { display: "flex", "align-items": "flex-end" }
|
|
2105
|
+
}, qn = ["onClick"], In = { class: "form-row" }, Fn = { class: "form-group" }, Rn = { class: "form-actions" };
|
|
2106
|
+
function Vn(s, e, d, p, n, o) {
|
|
2107
|
+
return l(), r("div", li, [
|
|
2108
|
+
d.config.showWaveBackground ? (l(), r("div", ri)) : c("", !0),
|
|
2109
|
+
t("div", ai, [
|
|
2110
|
+
t("div", di, [
|
|
2111
|
+
t("h4", ui, a(o.sectionTitle), 1),
|
|
2112
|
+
o.canAddCrew ? (l(), r("button", {
|
|
1903
2113
|
key: 0,
|
|
1904
2114
|
class: "btn btn-primary",
|
|
1905
|
-
onClick: e[0] || (e[0] = (...i) =>
|
|
1906
|
-
}, a(n.showAddForm ? "Cancel" : "+ Add Crew Member"), 1)) :
|
|
2115
|
+
onClick: e[0] || (e[0] = (...i) => o.handleToggleAddForm && o.handleToggleAddForm(...i))
|
|
2116
|
+
}, a(n.showAddForm ? "Cancel" : "+ Add Crew Member"), 1)) : c("", !0)
|
|
1907
2117
|
]),
|
|
1908
|
-
|
|
1909
|
-
|
|
2118
|
+
n.showAddForm ? c("", !0) : (l(), r("div", ci, [
|
|
2119
|
+
h(t("input", {
|
|
1910
2120
|
type: "text",
|
|
1911
2121
|
placeholder: "Search crew by name or role...",
|
|
1912
2122
|
"onUpdate:modelValue": e[1] || (e[1] = (i) => n.searchQuery = i),
|
|
1913
|
-
onInput: e[2] || (e[2] = (...i) =>
|
|
2123
|
+
onInput: e[2] || (e[2] = (...i) => o.handleSearch && o.handleSearch(...i))
|
|
1914
2124
|
}, null, 544), [
|
|
1915
2125
|
[k, n.searchQuery]
|
|
1916
2126
|
]),
|
|
1917
|
-
|
|
2127
|
+
h(t("select", {
|
|
1918
2128
|
"onUpdate:modelValue": e[3] || (e[3] = (i) => n.filterStatus = i),
|
|
1919
|
-
onChange: e[4] || (e[4] = (...i) =>
|
|
1920
|
-
}, e[
|
|
2129
|
+
onChange: e[4] || (e[4] = (...i) => o.handleFilter && o.handleFilter(...i))
|
|
2130
|
+
}, e[22] || (e[22] = [
|
|
1921
2131
|
t("option", { value: "all" }, "All Statuses", -1),
|
|
1922
2132
|
t("option", { value: "available" }, "Available", -1),
|
|
1923
2133
|
t("option", { value: "onduty" }, "On Duty", -1),
|
|
1924
2134
|
t("option", { value: "unavailable" }, "Unavailable", -1)
|
|
1925
2135
|
]), 544), [
|
|
1926
2136
|
[_, n.filterStatus]
|
|
2137
|
+
]),
|
|
2138
|
+
t("button", {
|
|
2139
|
+
class: "btn btn-secondary",
|
|
2140
|
+
onClick: e[5] || (e[5] = (i) => n.showTimesheet = !n.showTimesheet)
|
|
2141
|
+
}, [
|
|
2142
|
+
t("i", {
|
|
2143
|
+
class: b(n.showTimesheet ? "bi bi-grid-3x3-gap" : "bi bi-table")
|
|
2144
|
+
}, null, 2),
|
|
2145
|
+
w(" " + a(n.showTimesheet ? "Show Crew Cards" : "Show Timesheet"), 1)
|
|
1927
2146
|
])
|
|
1928
|
-
]),
|
|
1929
|
-
|
|
2147
|
+
])),
|
|
2148
|
+
d.loading && !n.showAddForm ? (l(), r("div", mi, e[23] || (e[23] = [
|
|
1930
2149
|
t("div", {
|
|
1931
2150
|
class: "spinner-border text-primary",
|
|
1932
2151
|
role: "status"
|
|
@@ -1934,98 +2153,235 @@ function Ji(s, e, u, b, n, r) {
|
|
|
1934
2153
|
t("span", { class: "visually-hidden" }, "Loading crew...")
|
|
1935
2154
|
], -1),
|
|
1936
2155
|
t("p", null, "Loading crew members...", -1)
|
|
1937
|
-
]))) :
|
|
1938
|
-
(
|
|
2156
|
+
]))) : n.showTimesheet && !n.showAddForm ? (l(), r("div", vi, [
|
|
2157
|
+
t("div", pi, [
|
|
2158
|
+
e[25] || (e[25] = t("h3", null, [
|
|
2159
|
+
t("i", { class: "bi bi-table" }),
|
|
2160
|
+
w(" Crew Activity Timesheet")
|
|
2161
|
+
], -1)),
|
|
2162
|
+
t("div", hi, [
|
|
2163
|
+
h(t("select", {
|
|
2164
|
+
"onUpdate:modelValue": e[6] || (e[6] = (i) => n.timesheetFilter = i),
|
|
2165
|
+
onChange: e[7] || (e[7] = (...i) => o.filterTimesheet && o.filterTimesheet(...i))
|
|
2166
|
+
}, e[24] || (e[24] = [
|
|
2167
|
+
x('<option value="all">All Activities</option><option value="Embarked">Embarked Only</option><option value="Deboarded">Deboarded Only</option><option value="Assigned">Assigned Only</option><option value="Status Changed">Status Changes Only</option>', 5)
|
|
2168
|
+
]), 544), [
|
|
2169
|
+
[_, n.timesheetFilter]
|
|
2170
|
+
]),
|
|
2171
|
+
h(t("input", {
|
|
2172
|
+
type: "text",
|
|
2173
|
+
"onUpdate:modelValue": e[8] || (e[8] = (i) => n.timesheetSearch = i),
|
|
2174
|
+
placeholder: "Search timesheet...",
|
|
2175
|
+
class: "timesheet-search"
|
|
2176
|
+
}, null, 512), [
|
|
2177
|
+
[k, n.timesheetSearch]
|
|
2178
|
+
])
|
|
2179
|
+
])
|
|
2180
|
+
]),
|
|
2181
|
+
t("div", fi, [
|
|
2182
|
+
t("div", gi, [
|
|
2183
|
+
e[26] || (e[26] = t("span", { class: "summary-label" }, "Total Entries:", -1)),
|
|
2184
|
+
t("span", bi, a(o.filteredTimesheetEntries.length), 1)
|
|
2185
|
+
]),
|
|
2186
|
+
t("div", yi, [
|
|
2187
|
+
e[27] || (e[27] = t("span", { class: "summary-label" }, "Crew Members:", -1)),
|
|
2188
|
+
t("span", wi, a(o.uniqueCrewCount), 1)
|
|
2189
|
+
]),
|
|
2190
|
+
t("div", ki, [
|
|
2191
|
+
e[28] || (e[28] = t("span", { class: "summary-label" }, "Date Range:", -1)),
|
|
2192
|
+
t("span", Ci, a(o.timesheetDateRange), 1)
|
|
2193
|
+
])
|
|
2194
|
+
]),
|
|
2195
|
+
o.filteredTimesheetEntries.length === 0 ? (l(), r("div", _i, " No timesheet entries found. ")) : (l(), r("div", Di, [
|
|
2196
|
+
t("table", xi, [
|
|
2197
|
+
t("thead", null, [
|
|
2198
|
+
t("tr", null, [
|
|
2199
|
+
t("th", {
|
|
2200
|
+
onClick: e[9] || (e[9] = (i) => o.sortTimesheet("timestamp"))
|
|
2201
|
+
}, e[29] || (e[29] = [
|
|
2202
|
+
w(" Date/Time ", -1),
|
|
2203
|
+
t("i", { class: "bi bi-arrow-down-up" }, null, -1)
|
|
2204
|
+
])),
|
|
2205
|
+
t("th", {
|
|
2206
|
+
onClick: e[10] || (e[10] = (i) => o.sortTimesheet("crewName"))
|
|
2207
|
+
}, e[30] || (e[30] = [
|
|
2208
|
+
w(" Crew Member ", -1),
|
|
2209
|
+
t("i", { class: "bi bi-arrow-down-up" }, null, -1)
|
|
2210
|
+
])),
|
|
2211
|
+
t("th", {
|
|
2212
|
+
onClick: e[11] || (e[11] = (i) => o.sortTimesheet("role"))
|
|
2213
|
+
}, e[31] || (e[31] = [
|
|
2214
|
+
w(" Role ", -1),
|
|
2215
|
+
t("i", { class: "bi bi-arrow-down-up" }, null, -1)
|
|
2216
|
+
])),
|
|
2217
|
+
t("th", {
|
|
2218
|
+
onClick: e[12] || (e[12] = (i) => o.sortTimesheet("action"))
|
|
2219
|
+
}, e[32] || (e[32] = [
|
|
2220
|
+
w(" Action ", -1),
|
|
2221
|
+
t("i", { class: "bi bi-arrow-down-up" }, null, -1)
|
|
2222
|
+
])),
|
|
2223
|
+
e[33] || (e[33] = t("th", null, "Vessel", -1)),
|
|
2224
|
+
e[34] || (e[34] = t("th", null, "Duration", -1)),
|
|
2225
|
+
e[35] || (e[35] = t("th", null, "Notes", -1))
|
|
2226
|
+
])
|
|
2227
|
+
]),
|
|
2228
|
+
t("tbody", null, [
|
|
2229
|
+
(l(!0), r(f, null, g(o.filteredTimesheetEntries, (i) => (l(), r("tr", {
|
|
2230
|
+
key: i.uniqueId,
|
|
2231
|
+
class: b(o.getTimesheetRowClass(i.action))
|
|
2232
|
+
}, [
|
|
2233
|
+
t("td", Si, a(o.formatLogDate(i.timestamp)), 1),
|
|
2234
|
+
t("td", Ai, [
|
|
2235
|
+
t("strong", null, a(i.crewName), 1)
|
|
2236
|
+
]),
|
|
2237
|
+
t("td", Pi, a(i.role), 1),
|
|
2238
|
+
t("td", Ti, [
|
|
2239
|
+
t("span", {
|
|
2240
|
+
class: b(["action-badge", o.getLogActionClass(i.action)])
|
|
2241
|
+
}, [
|
|
2242
|
+
t("i", {
|
|
2243
|
+
class: b(o.getLogIcon(i.action))
|
|
2244
|
+
}, null, 2),
|
|
2245
|
+
w(" " + a(i.action), 1)
|
|
2246
|
+
], 2)
|
|
2247
|
+
]),
|
|
2248
|
+
t("td", qi, a(i.vessel || "N/A"), 1),
|
|
2249
|
+
t("td", Ii, a(i.duration ? i.duration + " days" : "N/A"), 1),
|
|
2250
|
+
t("td", Fi, a(i.notes || "-"), 1)
|
|
2251
|
+
], 2))), 128))
|
|
2252
|
+
])
|
|
2253
|
+
])
|
|
2254
|
+
]))
|
|
2255
|
+
])) : o.filteredCrew.length > 0 && !n.showAddForm ? (l(), r("div", Ri, [
|
|
2256
|
+
(l(!0), r(f, null, g(o.filteredCrew, (i) => (l(), r("div", {
|
|
1939
2257
|
key: i.id,
|
|
1940
|
-
class:
|
|
2258
|
+
class: b(["crew-card", { unavailable: i.status === "unavailable" }])
|
|
1941
2259
|
}, [
|
|
1942
2260
|
t("div", {
|
|
1943
|
-
class:
|
|
1944
|
-
}, a(
|
|
1945
|
-
t("div",
|
|
1946
|
-
t("div",
|
|
1947
|
-
t("div",
|
|
1948
|
-
(
|
|
1949
|
-
key:
|
|
1950
|
-
class:
|
|
1951
|
-
onClick: (y) =>
|
|
1952
|
-
}, a(
|
|
1953
|
-
|
|
2261
|
+
class: b(["crew-status-badge", o.getStatusClass(i.status)])
|
|
2262
|
+
}, a(o.formatStatus(i.status)), 3),
|
|
2263
|
+
t("div", Vi, a(i.name), 1),
|
|
2264
|
+
t("div", Mi, a(i.role), 1),
|
|
2265
|
+
t("div", Ni, [
|
|
2266
|
+
(l(!0), r(f, null, g(i.certifications, (m) => (l(), r("div", {
|
|
2267
|
+
key: m.name,
|
|
2268
|
+
class: b(["certification-tag", o.getCertificationClass(m.expiryDate)]),
|
|
2269
|
+
onClick: (y) => o.handleViewCertification(m, i)
|
|
2270
|
+
}, a(m.name), 11, Ei))), 128)),
|
|
2271
|
+
o.canEditCrew ? (l(), r("i", {
|
|
1954
2272
|
key: 0,
|
|
1955
2273
|
class: "bi bi-patch-plus-fill icon",
|
|
1956
|
-
onClick: (
|
|
1957
|
-
}, null, 8,
|
|
2274
|
+
onClick: (m) => o.handleAddCertification(i)
|
|
2275
|
+
}, null, 8, Li)) : c("", !0)
|
|
1958
2276
|
]),
|
|
1959
|
-
t("div",
|
|
1960
|
-
e[
|
|
1961
|
-
|
|
2277
|
+
t("div", Oi, [
|
|
2278
|
+
e[36] || (e[36] = t("strong", null, "Embarkation Date:", -1)),
|
|
2279
|
+
w(" " + a(i.nextShift || "Not Scheduled"), 1)
|
|
1962
2280
|
]),
|
|
1963
|
-
t("div",
|
|
1964
|
-
e[
|
|
1965
|
-
|
|
2281
|
+
t("div", Ui, [
|
|
2282
|
+
e[37] || (e[37] = t("strong", null, "Expected Days Onboard (in days):", -1)),
|
|
2283
|
+
w(" " + a(i.onBoard || "Not Scheduled"), 1)
|
|
1966
2284
|
]),
|
|
1967
|
-
t("div",
|
|
1968
|
-
i.vessel ? (
|
|
1969
|
-
|
|
2285
|
+
t("div", $i, [
|
|
2286
|
+
i.vessel ? (l(), r("div", ji, " Vessel: " + a(i.vessel), 1)) : (l(), r("div", Bi, " Vessel: Unassigned ")),
|
|
2287
|
+
o.canAssignShift && i.status !== "onduty" ? (l(), r("button", {
|
|
1970
2288
|
key: 2,
|
|
1971
2289
|
class: "btn btn-primary",
|
|
1972
|
-
onClick: (
|
|
1973
|
-
}, " Assign Shift ", 8,
|
|
2290
|
+
onClick: (m) => o.handleAssignShift(i)
|
|
2291
|
+
}, " Assign Shift ", 8, Hi)) : c("", !0),
|
|
2292
|
+
o.canDeboardCrew && i.status === "onduty" ? (l(), r("button", {
|
|
2293
|
+
key: 3,
|
|
2294
|
+
class: "btn btn-warning",
|
|
2295
|
+
onClick: (m) => o.handleDeboardCrew(i)
|
|
2296
|
+
}, " Deboard ", 8, Qi)) : c("", !0)
|
|
1974
2297
|
]),
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
2298
|
+
t("div", Ji, [
|
|
2299
|
+
i.log && i.log.length > 0 ? (l(), r("div", Wi, [
|
|
2300
|
+
t("button", {
|
|
2301
|
+
class: "btn btn-link btn-sm log-toggle-btn",
|
|
2302
|
+
onClick: (m) => o.toggleCrewLog(i.id)
|
|
2303
|
+
}, [
|
|
2304
|
+
e[38] || (e[38] = t("i", { class: "bi bi-clock-history" }, null, -1)),
|
|
2305
|
+
w(" View Log (" + a(i.log.length) + ") ", 1)
|
|
2306
|
+
], 8, Ki)
|
|
2307
|
+
])) : c("", !0),
|
|
2308
|
+
o.canDeleteCrew ? (l(), r("i", {
|
|
2309
|
+
key: 1,
|
|
2310
|
+
class: "bi bi-trash icon delete-icon",
|
|
2311
|
+
onClick: (m) => o.handleDeleteCrew(i)
|
|
2312
|
+
}, null, 8, zi)) : c("", !0)
|
|
2313
|
+
]),
|
|
2314
|
+
n.expandedLogs.includes(i.id) ? (l(), r("div", Gi, [
|
|
2315
|
+
e[39] || (e[39] = t("h4", null, "Crew Activity Log", -1)),
|
|
2316
|
+
(l(!0), r(f, null, g(i.log, (m, y) => (l(), r("div", {
|
|
2317
|
+
key: y,
|
|
2318
|
+
class: "log-entry"
|
|
2319
|
+
}, [
|
|
2320
|
+
t("div", Yi, a(o.formatLogDate(m.timestamp)), 1),
|
|
2321
|
+
t("div", {
|
|
2322
|
+
class: b(["log-action", o.getLogActionClass(m.action)])
|
|
2323
|
+
}, [
|
|
2324
|
+
t("i", {
|
|
2325
|
+
class: b(o.getLogIcon(m.action))
|
|
2326
|
+
}, null, 2),
|
|
2327
|
+
w(" " + a(m.action), 1)
|
|
2328
|
+
], 2),
|
|
2329
|
+
t("div", Xi, [
|
|
2330
|
+
m.vessel ? (l(), r("span", Zi, "Vessel: " + a(m.vessel), 1)) : c("", !0),
|
|
2331
|
+
m.duration ? (l(), r("span", en, " | Duration: " + a(m.duration) + " days", 1)) : c("", !0)
|
|
2332
|
+
]),
|
|
2333
|
+
m.notes ? (l(), r("div", tn, a(m.notes), 1)) : c("", !0)
|
|
2334
|
+
]))), 128))
|
|
2335
|
+
])) : c("", !0)
|
|
1980
2336
|
], 2))), 128))
|
|
1981
|
-
])) :
|
|
1982
|
-
n.showAddForm ? (
|
|
1983
|
-
e[
|
|
1984
|
-
t("div",
|
|
1985
|
-
t("div",
|
|
1986
|
-
e[
|
|
1987
|
-
|
|
2337
|
+
])) : !d.loading && !n.showTimesheet && !n.showAddForm ? (l(), r("div", sn, a(d.crew.length === 0 ? "No crew members found." : "No crew members found matching your search criteria."), 1)) : c("", !0),
|
|
2338
|
+
n.showAddForm ? (l(), r("div", nn, [
|
|
2339
|
+
e[54] || (e[54] = t("h2", null, "Add New Crew Member", -1)),
|
|
2340
|
+
t("div", on, [
|
|
2341
|
+
t("div", ln, [
|
|
2342
|
+
e[40] || (e[40] = t("label", { for: "crew-name" }, "Full Name *", -1)),
|
|
2343
|
+
h(t("input", {
|
|
1988
2344
|
type: "text",
|
|
1989
2345
|
id: "crew-name",
|
|
1990
|
-
"onUpdate:modelValue": e[
|
|
1991
|
-
class:
|
|
2346
|
+
"onUpdate:modelValue": e[13] || (e[13] = (i) => n.newCrew.name = i),
|
|
2347
|
+
class: b({ error: n.formErrors.name })
|
|
1992
2348
|
}, null, 2), [
|
|
1993
2349
|
[k, n.newCrew.name]
|
|
1994
2350
|
]),
|
|
1995
|
-
n.formErrors.name ? (
|
|
2351
|
+
n.formErrors.name ? (l(), r("div", rn, a(n.formErrors.name), 1)) : c("", !0)
|
|
1996
2352
|
]),
|
|
1997
|
-
t("div",
|
|
1998
|
-
e[
|
|
1999
|
-
|
|
2353
|
+
t("div", an, [
|
|
2354
|
+
e[42] || (e[42] = t("label", { for: "crew-role" }, "Role/Position *", -1)),
|
|
2355
|
+
h(t("select", {
|
|
2000
2356
|
id: "crew-role",
|
|
2001
|
-
"onUpdate:modelValue": e[
|
|
2357
|
+
"onUpdate:modelValue": e[14] || (e[14] = (i) => n.newCrew.role = i)
|
|
2002
2358
|
}, [
|
|
2003
|
-
(
|
|
2359
|
+
(l(!0), r(f, null, g(d.availableRoles, (i) => (l(), r("option", {
|
|
2004
2360
|
key: i,
|
|
2005
2361
|
value: i
|
|
2006
|
-
}, a(i), 9,
|
|
2007
|
-
e[
|
|
2362
|
+
}, a(i), 9, dn))), 128)),
|
|
2363
|
+
e[41] || (e[41] = t("option", { value: "Other" }, "Other", -1))
|
|
2008
2364
|
], 512), [
|
|
2009
2365
|
[_, n.newCrew.role]
|
|
2010
2366
|
]),
|
|
2011
|
-
n.newCrew.role === "Other" ?
|
|
2367
|
+
n.newCrew.role === "Other" ? h((l(), r("input", {
|
|
2012
2368
|
key: 0,
|
|
2013
2369
|
type: "text",
|
|
2014
2370
|
placeholder: "Enter custom role",
|
|
2015
|
-
"onUpdate:modelValue": e[
|
|
2371
|
+
"onUpdate:modelValue": e[15] || (e[15] = (i) => n.newCrew.customRole = i),
|
|
2016
2372
|
style: { "margin-top": "8px" }
|
|
2017
2373
|
}, null, 512)), [
|
|
2018
2374
|
[k, n.newCrew.customRole]
|
|
2019
|
-
]) :
|
|
2375
|
+
]) : c("", !0)
|
|
2020
2376
|
])
|
|
2021
2377
|
]),
|
|
2022
|
-
t("div",
|
|
2023
|
-
t("div",
|
|
2024
|
-
e[
|
|
2025
|
-
|
|
2378
|
+
t("div", un, [
|
|
2379
|
+
t("div", cn, [
|
|
2380
|
+
e[44] || (e[44] = t("label", { for: "crew-status" }, "Status *", -1)),
|
|
2381
|
+
h(t("select", {
|
|
2026
2382
|
id: "crew-status",
|
|
2027
|
-
"onUpdate:modelValue": e[
|
|
2028
|
-
}, e[
|
|
2383
|
+
"onUpdate:modelValue": e[16] || (e[16] = (i) => n.newCrew.status = i)
|
|
2384
|
+
}, e[43] || (e[43] = [
|
|
2029
2385
|
t("option", { value: "available" }, "Available", -1),
|
|
2030
2386
|
t("option", { value: "onduty" }, "On Duty", -1),
|
|
2031
2387
|
t("option", { value: "unavailable" }, "Unavailable", -1)
|
|
@@ -2033,89 +2389,126 @@ function Ji(s, e, u, b, n, r) {
|
|
|
2033
2389
|
[_, n.newCrew.status]
|
|
2034
2390
|
])
|
|
2035
2391
|
]),
|
|
2036
|
-
t("div",
|
|
2037
|
-
e[
|
|
2038
|
-
|
|
2392
|
+
t("div", mn, [
|
|
2393
|
+
e[45] || (e[45] = t("label", { for: "crew-email" }, "Email Address *", -1)),
|
|
2394
|
+
h(t("input", {
|
|
2039
2395
|
type: "email",
|
|
2040
2396
|
id: "crew-email",
|
|
2041
|
-
"onUpdate:modelValue": e[
|
|
2042
|
-
class:
|
|
2397
|
+
"onUpdate:modelValue": e[17] || (e[17] = (i) => n.newCrew.email = i),
|
|
2398
|
+
class: b({ error: n.formErrors.email })
|
|
2043
2399
|
}, null, 2), [
|
|
2044
2400
|
[k, n.newCrew.email]
|
|
2045
2401
|
]),
|
|
2046
|
-
n.formErrors.email ? (
|
|
2402
|
+
n.formErrors.email ? (l(), r("div", vn, a(n.formErrors.email), 1)) : c("", !0)
|
|
2047
2403
|
])
|
|
2048
2404
|
]),
|
|
2049
|
-
t("div",
|
|
2050
|
-
e[
|
|
2051
|
-
(
|
|
2052
|
-
key:
|
|
2405
|
+
t("div", pn, [
|
|
2406
|
+
e[52] || (e[52] = t("h3", null, "Certifications", -1)),
|
|
2407
|
+
(l(!0), r(f, null, g(n.newCrew.certifications, (i, m) => (l(), r("div", {
|
|
2408
|
+
key: m,
|
|
2053
2409
|
class: "certification-entry"
|
|
2054
2410
|
}, [
|
|
2055
|
-
t("div",
|
|
2056
|
-
t("div",
|
|
2057
|
-
e[
|
|
2058
|
-
|
|
2411
|
+
t("div", hn, [
|
|
2412
|
+
t("div", fn, [
|
|
2413
|
+
e[46] || (e[46] = t("label", null, "Certification Name *", -1)),
|
|
2414
|
+
h(t("input", {
|
|
2059
2415
|
type: "text",
|
|
2060
2416
|
"onUpdate:modelValue": (y) => i.name = y,
|
|
2061
2417
|
placeholder: "Enter certification name"
|
|
2062
|
-
}, null, 8,
|
|
2418
|
+
}, null, 8, gn), [
|
|
2063
2419
|
[k, i.name]
|
|
2064
2420
|
])
|
|
2065
2421
|
]),
|
|
2066
|
-
t("div",
|
|
2067
|
-
e[
|
|
2068
|
-
|
|
2422
|
+
t("div", bn, [
|
|
2423
|
+
e[47] || (e[47] = t("label", null, "Expiry Date *", -1)),
|
|
2424
|
+
h(t("input", {
|
|
2069
2425
|
type: "date",
|
|
2070
2426
|
"onUpdate:modelValue": (y) => i.expiryDate = y
|
|
2071
|
-
}, null, 8,
|
|
2427
|
+
}, null, 8, yn), [
|
|
2072
2428
|
[k, i.expiryDate]
|
|
2073
2429
|
])
|
|
2074
2430
|
]),
|
|
2075
|
-
t("div",
|
|
2076
|
-
|
|
2431
|
+
t("div", wn, [
|
|
2432
|
+
e[51] || (e[51] = t("label", null, "Certificate Image *", -1)),
|
|
2433
|
+
t("div", kn, [
|
|
2434
|
+
t("input", {
|
|
2435
|
+
type: "file",
|
|
2436
|
+
id: "cert-image-" + m,
|
|
2437
|
+
onChange: (y) => o.handleCertImageUpload(y, m),
|
|
2438
|
+
accept: "image/*,.pdf",
|
|
2439
|
+
class: "file-input"
|
|
2440
|
+
}, null, 40, Cn),
|
|
2441
|
+
t("label", {
|
|
2442
|
+
for: "cert-image-" + m,
|
|
2443
|
+
class: "file-input-label"
|
|
2444
|
+
}, [
|
|
2445
|
+
e[48] || (e[48] = t("i", { class: "bi bi-cloud-upload" }, null, -1)),
|
|
2446
|
+
w(" " + a(i.imagePreview ? "Change File" : "Upload File"), 1)
|
|
2447
|
+
], 8, _n),
|
|
2448
|
+
i.imagePreview ? (l(), r("div", Dn, [
|
|
2449
|
+
i.imageType !== "pdf" ? (l(), r("img", {
|
|
2450
|
+
key: 0,
|
|
2451
|
+
src: i.imagePreview,
|
|
2452
|
+
alt: "Certificate preview"
|
|
2453
|
+
}, null, 8, xn)) : (l(), r("div", Sn, [
|
|
2454
|
+
e[49] || (e[49] = t("i", { class: "bi bi-file-pdf" }, null, -1)),
|
|
2455
|
+
t("span", null, a(i.imageName), 1)
|
|
2456
|
+
])),
|
|
2457
|
+
t("button", {
|
|
2458
|
+
type: "button",
|
|
2459
|
+
class: "btn-remove-image",
|
|
2460
|
+
onClick: (y) => o.removeCertImage(m)
|
|
2461
|
+
}, e[50] || (e[50] = [
|
|
2462
|
+
t("i", { class: "bi bi-x-circle" }, null, -1)
|
|
2463
|
+
]), 8, An)
|
|
2464
|
+
])) : c("", !0),
|
|
2465
|
+
i.imageName ? (l(), r("small", Pn, a(i.imageName), 1)) : c("", !0)
|
|
2466
|
+
])
|
|
2467
|
+
]),
|
|
2468
|
+
t("div", Tn, [
|
|
2469
|
+
n.newCrew.certifications.length > 1 ? (l(), r("button", {
|
|
2077
2470
|
key: 0,
|
|
2078
2471
|
type: "button",
|
|
2079
2472
|
class: "btn btn-danger btn-sm",
|
|
2080
|
-
onClick: (y) =>
|
|
2081
|
-
}, " Remove ", 8,
|
|
2473
|
+
onClick: (y) => o.removeCertification(m)
|
|
2474
|
+
}, " Remove ", 8, qn)) : c("", !0)
|
|
2082
2475
|
])
|
|
2083
2476
|
])
|
|
2084
2477
|
]))), 128)),
|
|
2085
2478
|
t("button", {
|
|
2086
2479
|
type: "button",
|
|
2087
2480
|
class: "btn btn-secondary btn-sm",
|
|
2088
|
-
onClick: e[
|
|
2481
|
+
onClick: e[18] || (e[18] = (...i) => o.addCertificationEntry && o.addCertificationEntry(...i))
|
|
2089
2482
|
}, " + Add More Certification ")
|
|
2090
2483
|
]),
|
|
2091
|
-
t("div",
|
|
2092
|
-
t("div",
|
|
2093
|
-
e[
|
|
2094
|
-
|
|
2484
|
+
t("div", In, [
|
|
2485
|
+
t("div", Fn, [
|
|
2486
|
+
e[53] || (e[53] = t("label", { for: "crew-notes" }, "Notes", -1)),
|
|
2487
|
+
h(t("textarea", {
|
|
2095
2488
|
id: "crew-notes",
|
|
2096
2489
|
rows: "3",
|
|
2097
|
-
"onUpdate:modelValue": e[
|
|
2490
|
+
"onUpdate:modelValue": e[19] || (e[19] = (i) => n.newCrew.notes = i)
|
|
2098
2491
|
}, null, 512), [
|
|
2099
2492
|
[k, n.newCrew.notes]
|
|
2100
2493
|
])
|
|
2101
2494
|
])
|
|
2102
2495
|
]),
|
|
2103
|
-
t("div",
|
|
2496
|
+
t("div", Rn, [
|
|
2104
2497
|
t("button", {
|
|
2105
2498
|
class: "btn btn-secondary",
|
|
2106
|
-
onClick: e[
|
|
2499
|
+
onClick: e[20] || (e[20] = (...i) => o.handleCancelForm && o.handleCancelForm(...i))
|
|
2107
2500
|
}, "Cancel"),
|
|
2108
2501
|
t("button", {
|
|
2109
2502
|
class: "btn btn-primary",
|
|
2110
|
-
onClick: e[
|
|
2503
|
+
onClick: e[21] || (e[21] = (...i) => o.handleAddCrewMember && o.handleAddCrewMember(...i))
|
|
2111
2504
|
}, "Add Crew Member")
|
|
2112
2505
|
])
|
|
2113
|
-
])) :
|
|
2506
|
+
])) : c("", !0)
|
|
2114
2507
|
])
|
|
2115
2508
|
]);
|
|
2116
2509
|
}
|
|
2117
|
-
const
|
|
2118
|
-
const
|
|
2510
|
+
const Mn = /* @__PURE__ */ S(oi, [["render", Vn]]);
|
|
2511
|
+
const Nn = {
|
|
2119
2512
|
name: "RequisitionSystem",
|
|
2120
2513
|
props: {
|
|
2121
2514
|
userProfile: {
|
|
@@ -2363,103 +2756,103 @@ const Gi = {
|
|
|
2363
2756
|
created() {
|
|
2364
2757
|
this.addItem();
|
|
2365
2758
|
}
|
|
2366
|
-
},
|
|
2759
|
+
}, En = { class: "s-container container" }, Ln = { class: "nav-tabs" }, On = ["onClick"], Un = {
|
|
2367
2760
|
key: 0,
|
|
2368
2761
|
class: "tab-content active"
|
|
2369
|
-
},
|
|
2762
|
+
}, $n = { class: "form-grid" }, jn = { class: "form-group" }, Bn = ["value"], Hn = { class: "form-group" }, Qn = ["value"], Jn = { class: "form-group" }, Wn = ["value"], Kn = { class: "form-group" }, zn = { class: "form-group" }, Gn = { class: "items-section" }, Yn = { class: "items-header" }, Xn = { class: "form-group" }, Zn = ["onUpdate:modelValue"], eo = { class: "form-group" }, to = ["onUpdate:modelValue"], so = { class: "form-group" }, io = ["onUpdate:modelValue"], no = { class: "form-group" }, oo = ["onUpdate:modelValue"], lo = ["value"], ro = { class: "form-group" }, ao = ["onUpdate:modelValue"], uo = ["onClick"], co = {
|
|
2370
2763
|
key: 1,
|
|
2371
2764
|
class: "tab-content active"
|
|
2372
|
-
},
|
|
2765
|
+
}, mo = { class: "requisition-list" }, vo = { class: "requisition-header" }, po = { class: "requisition-id" }, ho = { class: "requisition-details" }, fo = { class: "detail-label" }, go = { class: "detail-value" }, bo = {
|
|
2373
2766
|
key: 0,
|
|
2374
2767
|
class: "form-group comments-section"
|
|
2375
|
-
},
|
|
2768
|
+
}, yo = ["onClick"], wo = {
|
|
2376
2769
|
key: 2,
|
|
2377
2770
|
class: "tab-content active"
|
|
2378
|
-
},
|
|
2771
|
+
}, ko = { class: "requisition-list" }, Co = { class: "requisition-header" }, _o = { class: "requisition-id" }, Do = { class: "requisition-details" }, xo = { class: "detail-label" }, So = { class: "detail-value" }, Ao = {
|
|
2379
2772
|
key: 0,
|
|
2380
2773
|
class: "form-group comments-section"
|
|
2381
|
-
},
|
|
2774
|
+
}, Po = ["onClick"], To = {
|
|
2382
2775
|
key: 3,
|
|
2383
2776
|
class: "tab-content active"
|
|
2384
|
-
},
|
|
2777
|
+
}, qo = {
|
|
2385
2778
|
class: "requisition-list",
|
|
2386
2779
|
id: "approvalsQueue"
|
|
2387
|
-
},
|
|
2780
|
+
}, Io = { class: "requisition-header" }, Fo = { class: "requisition-id" }, Ro = { class: "requisition-details" }, Vo = { class: "detail-label" }, Mo = { class: "detail-value" }, No = { class: "detail-item" }, Eo = { class: "detail-value" }, Lo = { class: "detail-item" }, Oo = { class: "item-list" }, Uo = ["onClick"], $o = ["onClick"], jo = ["onClick"], Bo = {
|
|
2388
2781
|
key: 4,
|
|
2389
2782
|
class: "tab-content active"
|
|
2390
|
-
},
|
|
2783
|
+
}, Ho = {
|
|
2391
2784
|
class: "requisition-list",
|
|
2392
2785
|
id: "purchasingQueue"
|
|
2393
|
-
},
|
|
2786
|
+
}, Qo = { class: "requisition-header" }, Jo = { class: "requisition-id" }, Wo = { class: "requisition-details" }, Ko = { class: "detail-label" }, zo = { class: "detail-value" }, Go = { class: "detail-item" }, Yo = { class: "detail-value" }, Xo = { class: "detail-item" }, Zo = { class: "item-list" }, el = ["onClick"], tl = {
|
|
2394
2787
|
key: 5,
|
|
2395
2788
|
class: "tab-content active"
|
|
2396
|
-
},
|
|
2789
|
+
}, sl = {
|
|
2397
2790
|
class: "requisition-list",
|
|
2398
2791
|
id: "receivingQueue"
|
|
2399
|
-
},
|
|
2792
|
+
}, il = { class: "requisition-header" }, nl = { class: "requisition-id" }, ol = { class: "requisition-details" }, ll = { class: "detail-label" }, rl = { class: "detail-value" }, al = { class: "detail-item" }, dl = { class: "detail-value" }, ul = { class: "detail-item" }, cl = { class: "item-list" }, ml = ["onClick"], vl = {
|
|
2400
2793
|
key: 6,
|
|
2401
2794
|
class: "tab-content active"
|
|
2402
|
-
},
|
|
2795
|
+
}, pl = {
|
|
2403
2796
|
class: "po-content",
|
|
2404
2797
|
id: "po-content"
|
|
2405
|
-
},
|
|
2798
|
+
}, hl = { class: "po-header" }, fl = { class: "company-info" }, gl = { class: "info-row" }, bl = { class: "info-value" }, yl = { class: "info-row" }, wl = { class: "info-value" }, kl = { class: "info-row" }, Cl = { class: "info-value" }, _l = { class: "info-row" }, Dl = { class: "info-value" }, xl = { class: "info-row" }, Sl = { class: "info-value" }, Al = { class: "company-info" }, Pl = { class: "info-row" }, Tl = { class: "info-value" }, ql = { class: "info-row" }, Il = { class: "info-value" }, Fl = { class: "info-row" }, Rl = { class: "info-value" }, Vl = { class: "info-row" }, Ml = { class: "info-value" }, Nl = { class: "info-row" }, El = { class: "info-value" }, Ll = { class: "items-section" }, Ol = { class: "items-table" }, Ul = { key: 0 }, $l = { key: 0 }, jl = {
|
|
2406
2799
|
key: 0,
|
|
2407
2800
|
class: "price-change-indicator"
|
|
2408
|
-
},
|
|
2801
|
+
}, Bl = ["onUpdate:modelValue"], Hl = { key: 0 }, Ql = ["onClick"], Jl = { key: 1 }, Wl = ["onClick"], Kl = ["onClick"], zl = {
|
|
2409
2802
|
key: 0,
|
|
2410
2803
|
class: "justification-note"
|
|
2411
|
-
},
|
|
2804
|
+
}, Gl = { class: "totals" }, Yl = { class: "total-row" }, Xl = { class: "total-row" }, Zl = { class: "total-row" }, er = { class: "total-row grand-total" }, tr = { class: "modal-content" }, sr = { style: { "margin-bottom": "15px", color: "#666" } }, ir = { class: "modal-buttons" }, nr = ["disabled"], or = {
|
|
2412
2805
|
key: 7,
|
|
2413
2806
|
class: "tab-content active"
|
|
2414
2807
|
};
|
|
2415
|
-
function
|
|
2416
|
-
var i,
|
|
2417
|
-
return
|
|
2808
|
+
function lr(s, e, d, p, n, o) {
|
|
2809
|
+
var i, m, y, P, T, q, I, F, R, V, M;
|
|
2810
|
+
return l(), r("div", En, [
|
|
2418
2811
|
e[62] || (e[62] = t("div", { class: "header" }, [
|
|
2419
2812
|
t("h1", null, "OceanHelm Requisition System"),
|
|
2420
2813
|
t("p", null, "Streamlined Material Request & Ordering Process")
|
|
2421
2814
|
], -1)),
|
|
2422
|
-
t("div",
|
|
2423
|
-
(
|
|
2424
|
-
key:
|
|
2425
|
-
class:
|
|
2426
|
-
onClick: (
|
|
2427
|
-
}, a(
|
|
2815
|
+
t("div", Ln, [
|
|
2816
|
+
(l(!0), r(f, null, g(o.visibleTabs, (u) => (l(), r("button", {
|
|
2817
|
+
key: u.name,
|
|
2818
|
+
class: b(["nav-tab", { active: n.activeTab === u.name }]),
|
|
2819
|
+
onClick: (v) => o.setActiveTab(u.name)
|
|
2820
|
+
}, a(u.label), 11, On))), 128))
|
|
2428
2821
|
]),
|
|
2429
|
-
n.activeTab === "new-requisition" ? (
|
|
2822
|
+
n.activeTab === "new-requisition" ? (l(), r("div", Un, [
|
|
2430
2823
|
t("form", {
|
|
2431
|
-
onSubmit: e[5] || (e[5] = D((...
|
|
2824
|
+
onSubmit: e[5] || (e[5] = D((...u) => o.handleSubmitRequisition && o.handleSubmitRequisition(...u), ["prevent"]))
|
|
2432
2825
|
}, [
|
|
2433
|
-
t("div",
|
|
2434
|
-
t("div",
|
|
2826
|
+
t("div", $n, [
|
|
2827
|
+
t("div", jn, [
|
|
2435
2828
|
e[12] || (e[12] = t("label", null, "Requestor Name *", -1)),
|
|
2436
2829
|
t("input", {
|
|
2437
2830
|
type: "text",
|
|
2438
|
-
value:
|
|
2831
|
+
value: d.userProfile.full_name,
|
|
2439
2832
|
readonly: "",
|
|
2440
2833
|
required: "",
|
|
2441
2834
|
class: "form-control"
|
|
2442
|
-
}, null, 8,
|
|
2835
|
+
}, null, 8, Bn)
|
|
2443
2836
|
]),
|
|
2444
|
-
t("div",
|
|
2837
|
+
t("div", Hn, [
|
|
2445
2838
|
e[14] || (e[14] = t("label", null, "Department *", -1)),
|
|
2446
|
-
|
|
2447
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
2839
|
+
h(t("select", {
|
|
2840
|
+
"onUpdate:modelValue": e[0] || (e[0] = (u) => n.form.department = u),
|
|
2448
2841
|
required: ""
|
|
2449
2842
|
}, [
|
|
2450
2843
|
e[13] || (e[13] = t("option", { value: "" }, "Select Department", -1)),
|
|
2451
|
-
(
|
|
2452
|
-
key:
|
|
2453
|
-
value:
|
|
2454
|
-
}, a(
|
|
2844
|
+
(l(!0), r(f, null, g(n.departments, (u) => (l(), r("option", {
|
|
2845
|
+
key: u,
|
|
2846
|
+
value: u
|
|
2847
|
+
}, a(u), 9, Qn))), 128))
|
|
2455
2848
|
], 512), [
|
|
2456
2849
|
[_, n.form.department]
|
|
2457
2850
|
])
|
|
2458
2851
|
]),
|
|
2459
|
-
t("div",
|
|
2852
|
+
t("div", Jn, [
|
|
2460
2853
|
e[16] || (e[16] = t("label", null, "Vessel *", -1)),
|
|
2461
|
-
|
|
2462
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
2854
|
+
h(t("select", {
|
|
2855
|
+
"onUpdate:modelValue": e[1] || (e[1] = (u) => n.form.project = u),
|
|
2463
2856
|
class: "form-control",
|
|
2464
2857
|
required: ""
|
|
2465
2858
|
}, [
|
|
@@ -2467,111 +2860,111 @@ function yl(s, e, u, b, n, r) {
|
|
|
2467
2860
|
disabled: "",
|
|
2468
2861
|
value: ""
|
|
2469
2862
|
}, "Select a vessel", -1)),
|
|
2470
|
-
(
|
|
2471
|
-
key:
|
|
2472
|
-
value:
|
|
2473
|
-
}, a(
|
|
2863
|
+
(l(!0), r(f, null, g(d.vessels, (u) => (l(), r("option", {
|
|
2864
|
+
key: u.id,
|
|
2865
|
+
value: u.name
|
|
2866
|
+
}, a(u.name), 9, Wn))), 128))
|
|
2474
2867
|
], 512), [
|
|
2475
2868
|
[_, n.form.project]
|
|
2476
2869
|
])
|
|
2477
2870
|
]),
|
|
2478
|
-
t("div",
|
|
2871
|
+
t("div", Kn, [
|
|
2479
2872
|
e[17] || (e[17] = t("label", null, "Date Needed *", -1)),
|
|
2480
|
-
|
|
2873
|
+
h(t("input", {
|
|
2481
2874
|
type: "date",
|
|
2482
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
2875
|
+
"onUpdate:modelValue": e[2] || (e[2] = (u) => n.form.neededDate = u),
|
|
2483
2876
|
required: ""
|
|
2484
2877
|
}, null, 512), [
|
|
2485
2878
|
[k, n.form.neededDate]
|
|
2486
2879
|
])
|
|
2487
2880
|
])
|
|
2488
2881
|
]),
|
|
2489
|
-
t("div",
|
|
2882
|
+
t("div", zn, [
|
|
2490
2883
|
e[18] || (e[18] = t("label", null, "Business Justification *", -1)),
|
|
2491
|
-
|
|
2492
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
|
2884
|
+
h(t("textarea", {
|
|
2885
|
+
"onUpdate:modelValue": e[3] || (e[3] = (u) => n.form.justification = u),
|
|
2493
2886
|
placeholder: "Explain why these materials are needed...",
|
|
2494
2887
|
required: ""
|
|
2495
2888
|
}, null, 512), [
|
|
2496
2889
|
[k, n.form.justification]
|
|
2497
2890
|
])
|
|
2498
2891
|
]),
|
|
2499
|
-
t("div",
|
|
2500
|
-
t("div",
|
|
2892
|
+
t("div", Gn, [
|
|
2893
|
+
t("div", Yn, [
|
|
2501
2894
|
e[19] || (e[19] = t("h3", null, "Requested Items", -1)),
|
|
2502
2895
|
t("button", {
|
|
2503
2896
|
type: "button",
|
|
2504
2897
|
class: "add-item-btn",
|
|
2505
|
-
onClick: e[4] || (e[4] = (...
|
|
2898
|
+
onClick: e[4] || (e[4] = (...u) => o.addItem && o.addItem(...u))
|
|
2506
2899
|
}, "+ Add Item")
|
|
2507
2900
|
]),
|
|
2508
2901
|
t("div", null, [
|
|
2509
|
-
(
|
|
2510
|
-
key:
|
|
2902
|
+
(l(!0), r(f, null, g(n.form.items, (u, v) => (l(), r("div", {
|
|
2903
|
+
key: v,
|
|
2511
2904
|
class: "item-row"
|
|
2512
2905
|
}, [
|
|
2513
|
-
t("div",
|
|
2906
|
+
t("div", Xn, [
|
|
2514
2907
|
e[20] || (e[20] = t("label", null, "Item Code *", -1)),
|
|
2515
|
-
|
|
2908
|
+
h(t("input", {
|
|
2516
2909
|
type: "text",
|
|
2517
|
-
"onUpdate:modelValue": (
|
|
2910
|
+
"onUpdate:modelValue": (C) => u.id = C,
|
|
2518
2911
|
required: ""
|
|
2519
|
-
}, null, 8,
|
|
2520
|
-
[k,
|
|
2912
|
+
}, null, 8, Zn), [
|
|
2913
|
+
[k, u.id]
|
|
2521
2914
|
])
|
|
2522
2915
|
]),
|
|
2523
|
-
t("div",
|
|
2916
|
+
t("div", eo, [
|
|
2524
2917
|
e[21] || (e[21] = t("label", null, "Item Description *", -1)),
|
|
2525
|
-
|
|
2918
|
+
h(t("input", {
|
|
2526
2919
|
type: "text",
|
|
2527
|
-
"onUpdate:modelValue": (
|
|
2920
|
+
"onUpdate:modelValue": (C) => u.desc = C,
|
|
2528
2921
|
required: ""
|
|
2529
|
-
}, null, 8,
|
|
2530
|
-
[k,
|
|
2922
|
+
}, null, 8, to), [
|
|
2923
|
+
[k, u.desc]
|
|
2531
2924
|
])
|
|
2532
2925
|
]),
|
|
2533
|
-
t("div",
|
|
2926
|
+
t("div", so, [
|
|
2534
2927
|
e[22] || (e[22] = t("label", null, "Quantity *", -1)),
|
|
2535
|
-
|
|
2928
|
+
h(t("input", {
|
|
2536
2929
|
type: "number",
|
|
2537
|
-
"onUpdate:modelValue": (
|
|
2930
|
+
"onUpdate:modelValue": (C) => u.qty = C,
|
|
2538
2931
|
min: "1",
|
|
2539
2932
|
required: ""
|
|
2540
|
-
}, null, 8,
|
|
2933
|
+
}, null, 8, io), [
|
|
2541
2934
|
[
|
|
2542
2935
|
k,
|
|
2543
|
-
|
|
2936
|
+
u.qty,
|
|
2544
2937
|
void 0,
|
|
2545
2938
|
{ number: !0 }
|
|
2546
2939
|
]
|
|
2547
2940
|
])
|
|
2548
2941
|
]),
|
|
2549
|
-
t("div",
|
|
2942
|
+
t("div", no, [
|
|
2550
2943
|
e[23] || (e[23] = t("label", null, "Unit *", -1)),
|
|
2551
|
-
|
|
2552
|
-
"onUpdate:modelValue": (
|
|
2944
|
+
h(t("select", {
|
|
2945
|
+
"onUpdate:modelValue": (C) => u.unit = C,
|
|
2553
2946
|
required: ""
|
|
2554
2947
|
}, [
|
|
2555
|
-
(
|
|
2556
|
-
key:
|
|
2557
|
-
value:
|
|
2558
|
-
}, a(
|
|
2559
|
-
], 8,
|
|
2560
|
-
[_,
|
|
2948
|
+
(l(!0), r(f, null, g(n.units, (C) => (l(), r("option", {
|
|
2949
|
+
key: C,
|
|
2950
|
+
value: C
|
|
2951
|
+
}, a(C), 9, lo))), 128))
|
|
2952
|
+
], 8, oo), [
|
|
2953
|
+
[_, u.unit]
|
|
2561
2954
|
])
|
|
2562
2955
|
]),
|
|
2563
|
-
t("div",
|
|
2956
|
+
t("div", ro, [
|
|
2564
2957
|
e[24] || (e[24] = t("label", null, "Est. Unit Cost *", -1)),
|
|
2565
|
-
|
|
2958
|
+
h(t("input", {
|
|
2566
2959
|
type: "number",
|
|
2567
|
-
"onUpdate:modelValue": (
|
|
2960
|
+
"onUpdate:modelValue": (C) => u.cost = C,
|
|
2568
2961
|
step: "0.01",
|
|
2569
2962
|
placeholder: "0.00",
|
|
2570
2963
|
required: ""
|
|
2571
|
-
}, null, 8,
|
|
2964
|
+
}, null, 8, ao), [
|
|
2572
2965
|
[
|
|
2573
2966
|
k,
|
|
2574
|
-
|
|
2967
|
+
u.cost,
|
|
2575
2968
|
void 0,
|
|
2576
2969
|
{ number: !0 }
|
|
2577
2970
|
]
|
|
@@ -2580,8 +2973,8 @@ function yl(s, e, u, b, n, r) {
|
|
|
2580
2973
|
t("button", {
|
|
2581
2974
|
type: "button",
|
|
2582
2975
|
class: "remove-item-btn",
|
|
2583
|
-
onClick: (
|
|
2584
|
-
}, "Remove", 8,
|
|
2976
|
+
onClick: (C) => o.removeItem(v)
|
|
2977
|
+
}, "Remove", 8, uo)
|
|
2585
2978
|
]))), 128))
|
|
2586
2979
|
])
|
|
2587
2980
|
]),
|
|
@@ -2592,267 +2985,267 @@ function yl(s, e, u, b, n, r) {
|
|
|
2592
2985
|
}, "Submit Requisition")
|
|
2593
2986
|
], -1))
|
|
2594
2987
|
], 32)
|
|
2595
|
-
])) :
|
|
2596
|
-
n.activeTab === "all-requisitions" ? (
|
|
2597
|
-
t("div",
|
|
2598
|
-
(
|
|
2599
|
-
key:
|
|
2988
|
+
])) : c("", !0),
|
|
2989
|
+
n.activeTab === "all-requisitions" ? (l(), r("div", co, [
|
|
2990
|
+
t("div", mo, [
|
|
2991
|
+
(l(!0), r(f, null, g(d.requisitions, (u) => (l(), r("div", {
|
|
2992
|
+
key: u.id,
|
|
2600
2993
|
class: "requisition-card"
|
|
2601
2994
|
}, [
|
|
2602
|
-
t("div",
|
|
2603
|
-
t("div",
|
|
2995
|
+
t("div", vo, [
|
|
2996
|
+
t("div", po, a(u.id), 1),
|
|
2604
2997
|
t("div", {
|
|
2605
|
-
class:
|
|
2606
|
-
}, a(
|
|
2998
|
+
class: b(["status-badge", `status-${u.status}`])
|
|
2999
|
+
}, a(u.status), 3)
|
|
2607
3000
|
]),
|
|
2608
|
-
t("div",
|
|
2609
|
-
(
|
|
3001
|
+
t("div", ho, [
|
|
3002
|
+
(l(!0), r(f, null, g(o.getRequisitionFields(u), (v) => (l(), r("div", {
|
|
2610
3003
|
class: "detail-item",
|
|
2611
|
-
key:
|
|
3004
|
+
key: v.label
|
|
2612
3005
|
}, [
|
|
2613
|
-
t("div",
|
|
2614
|
-
t("div",
|
|
3006
|
+
t("div", fo, a(v.label), 1),
|
|
3007
|
+
t("div", go, a(v.value(u)), 1)
|
|
2615
3008
|
]))), 128))
|
|
2616
3009
|
]),
|
|
2617
|
-
|
|
3010
|
+
u.status === "po-created" || u.status === "delivered" ? (l(), r("div", bo, [
|
|
2618
3011
|
t("button", {
|
|
2619
|
-
onClick: (
|
|
3012
|
+
onClick: (v) => o.handleOpenPO(u.id),
|
|
2620
3013
|
class: "add-item-btn comments-section"
|
|
2621
|
-
}, " Print PO ", 8,
|
|
2622
|
-
])) :
|
|
3014
|
+
}, " Print PO ", 8, yo)
|
|
3015
|
+
])) : c("", !0)
|
|
2623
3016
|
]))), 128))
|
|
2624
3017
|
])
|
|
2625
|
-
])) :
|
|
2626
|
-
n.activeTab === "my-requisitions" ? (
|
|
2627
|
-
t("div",
|
|
2628
|
-
(
|
|
2629
|
-
key:
|
|
3018
|
+
])) : c("", !0),
|
|
3019
|
+
n.activeTab === "my-requisitions" ? (l(), r("div", wo, [
|
|
3020
|
+
t("div", ko, [
|
|
3021
|
+
(l(!0), r(f, null, g(o.myRequisitions, (u) => (l(), r("div", {
|
|
3022
|
+
key: u.id,
|
|
2630
3023
|
class: "requisition-card"
|
|
2631
3024
|
}, [
|
|
2632
|
-
t("div",
|
|
2633
|
-
t("div",
|
|
3025
|
+
t("div", Co, [
|
|
3026
|
+
t("div", _o, a(u.id), 1),
|
|
2634
3027
|
t("div", {
|
|
2635
|
-
class:
|
|
2636
|
-
}, a(
|
|
3028
|
+
class: b(["status-badge", `status-${u.status}`])
|
|
3029
|
+
}, a(u.status), 3)
|
|
2637
3030
|
]),
|
|
2638
|
-
t("div",
|
|
2639
|
-
(
|
|
3031
|
+
t("div", Do, [
|
|
3032
|
+
(l(!0), r(f, null, g(o.getRequisitionFields(u), (v) => (l(), r("div", {
|
|
2640
3033
|
class: "detail-item",
|
|
2641
|
-
key:
|
|
3034
|
+
key: v.label
|
|
2642
3035
|
}, [
|
|
2643
|
-
t("div",
|
|
2644
|
-
t("div",
|
|
3036
|
+
t("div", xo, a(v.label), 1),
|
|
3037
|
+
t("div", So, a(v.value(u)), 1)
|
|
2645
3038
|
]))), 128))
|
|
2646
3039
|
]),
|
|
2647
|
-
|
|
3040
|
+
u.status === "info-requested" ? (l(), r("div", Ao, [
|
|
2648
3041
|
e[26] || (e[26] = t("label", { class: "detail-label" }, "Your Response", -1)),
|
|
2649
|
-
|
|
2650
|
-
"onUpdate:modelValue": e[6] || (e[6] = (
|
|
3042
|
+
h(t("textarea", {
|
|
3043
|
+
"onUpdate:modelValue": e[6] || (e[6] = (v) => n.infoResponse = v),
|
|
2651
3044
|
class: "response-textarea",
|
|
2652
3045
|
placeholder: "Submit more info..."
|
|
2653
3046
|
}, null, 512), [
|
|
2654
3047
|
[k, n.infoResponse]
|
|
2655
3048
|
]),
|
|
2656
3049
|
t("button", {
|
|
2657
|
-
onClick: (
|
|
3050
|
+
onClick: (v) => o.handleSubmitInfoResponse(u),
|
|
2658
3051
|
class: "add-item-btn comments-section"
|
|
2659
|
-
}, " Submit Info ", 8,
|
|
2660
|
-
])) :
|
|
3052
|
+
}, " Submit Info ", 8, Po)
|
|
3053
|
+
])) : c("", !0)
|
|
2661
3054
|
]))), 128))
|
|
2662
3055
|
])
|
|
2663
|
-
])) :
|
|
2664
|
-
n.activeTab === "approvals" ? (
|
|
3056
|
+
])) : c("", !0),
|
|
3057
|
+
n.activeTab === "approvals" ? (l(), r("div", To, [
|
|
2665
3058
|
e[29] || (e[29] = t("div", { style: { "margin-bottom": "20px" } }, [
|
|
2666
3059
|
t("h3", { style: { color: "#1e40af", "margin-bottom": "15px" } }, "Department Supervisor Dashboard"),
|
|
2667
3060
|
t("div", { style: { background: "#fef3c7", padding: "15px", "border-radius": "10px", "border-left": "4px solid #f59e0b" } }, [
|
|
2668
3061
|
t("strong", null, "Role:"),
|
|
2669
|
-
|
|
3062
|
+
w(" Department Supervisor - Review requests for accuracy, necessity, and budget compliance ")
|
|
2670
3063
|
])
|
|
2671
3064
|
], -1)),
|
|
2672
|
-
t("div",
|
|
2673
|
-
(
|
|
2674
|
-
key:
|
|
3065
|
+
t("div", qo, [
|
|
3066
|
+
(l(!0), r(f, null, g(o.reviewRequisitions, (u) => (l(), r("div", {
|
|
3067
|
+
key: u.id,
|
|
2675
3068
|
class: "requisition-card"
|
|
2676
3069
|
}, [
|
|
2677
|
-
t("div",
|
|
2678
|
-
t("div",
|
|
3070
|
+
t("div", Io, [
|
|
3071
|
+
t("div", Fo, a(u.id), 1)
|
|
2679
3072
|
]),
|
|
2680
|
-
t("div",
|
|
2681
|
-
(
|
|
3073
|
+
t("div", Ro, [
|
|
3074
|
+
(l(!0), r(f, null, g(n.requisitionFields, (v) => (l(), r("div", {
|
|
2682
3075
|
class: "detail-item",
|
|
2683
|
-
key:
|
|
3076
|
+
key: v.label
|
|
2684
3077
|
}, [
|
|
2685
|
-
t("div",
|
|
2686
|
-
t("div",
|
|
3078
|
+
t("div", Vo, a(v.label), 1),
|
|
3079
|
+
t("div", Mo, a(v.value(u)), 1)
|
|
2687
3080
|
]))), 128))
|
|
2688
3081
|
]),
|
|
2689
|
-
t("div",
|
|
3082
|
+
t("div", No, [
|
|
2690
3083
|
e[27] || (e[27] = t("div", { class: "detail-label" }, "Justification", -1)),
|
|
2691
|
-
t("div",
|
|
3084
|
+
t("div", Eo, a(u.justification || "N/A"), 1)
|
|
2692
3085
|
]),
|
|
2693
|
-
t("div",
|
|
3086
|
+
t("div", Lo, [
|
|
2694
3087
|
e[28] || (e[28] = t("div", { class: "detail-label" }, "Items", -1)),
|
|
2695
|
-
t("ul",
|
|
2696
|
-
(
|
|
3088
|
+
t("ul", Oo, [
|
|
3089
|
+
(l(!0), r(f, null, g(u.items, (v, C) => (l(), r("li", { key: C }, a(v.desc) + " - " + a(v.qty) + " " + a(v.unit) + " @ ₦" + a(v.cost.toFixed(2)) + " each ", 1))), 128))
|
|
2697
3090
|
])
|
|
2698
3091
|
]),
|
|
2699
3092
|
t("button", {
|
|
2700
3093
|
type: "button",
|
|
2701
3094
|
class: "add-item-btn",
|
|
2702
|
-
onClick: (
|
|
2703
|
-
}, "Approve", 8,
|
|
3095
|
+
onClick: (v) => o.handleApproveRequisition(u.id)
|
|
3096
|
+
}, "Approve", 8, Uo),
|
|
2704
3097
|
t("button", {
|
|
2705
3098
|
type: "button",
|
|
2706
3099
|
class: "marginbox btn-reject",
|
|
2707
|
-
onClick: (
|
|
2708
|
-
}, "Decline", 8,
|
|
3100
|
+
onClick: (v) => o.handleDeclineRequisition(u.id)
|
|
3101
|
+
}, "Decline", 8, $o),
|
|
2709
3102
|
t("button", {
|
|
2710
3103
|
type: "button",
|
|
2711
3104
|
class: "marginbox btn-request",
|
|
2712
|
-
onClick: (
|
|
2713
|
-
}, "Request Info", 8,
|
|
3105
|
+
onClick: (v) => o.handleInfoRequisition(u.id)
|
|
3106
|
+
}, "Request Info", 8, jo)
|
|
2714
3107
|
]))), 128))
|
|
2715
3108
|
])
|
|
2716
|
-
])) :
|
|
2717
|
-
n.activeTab === "purchasing" ? (
|
|
3109
|
+
])) : c("", !0),
|
|
3110
|
+
n.activeTab === "purchasing" ? (l(), r("div", Bo, [
|
|
2718
3111
|
e[32] || (e[32] = t("div", { style: { "margin-bottom": "20px" } }, [
|
|
2719
3112
|
t("h3", { style: { color: "#1e40af", "margin-bottom": "15px" } }, "Purchasing Department Dashboard"),
|
|
2720
3113
|
t("div", { style: { background: "#dbeafe", padding: "15px", "border-radius": "10px", "border-left": "4px solid #3b82f6" } }, [
|
|
2721
3114
|
t("strong", null, "Role:"),
|
|
2722
|
-
|
|
3115
|
+
w(" Purchasing Team - Convert approved requisitions to Purchase Orders ")
|
|
2723
3116
|
])
|
|
2724
3117
|
], -1)),
|
|
2725
|
-
t("div",
|
|
2726
|
-
(
|
|
2727
|
-
key:
|
|
3118
|
+
t("div", Ho, [
|
|
3119
|
+
(l(!0), r(f, null, g(o.poRequisitions, (u) => (l(), r("div", {
|
|
3120
|
+
key: u.id,
|
|
2728
3121
|
class: "requisition-card"
|
|
2729
3122
|
}, [
|
|
2730
|
-
t("div",
|
|
2731
|
-
t("div",
|
|
3123
|
+
t("div", Qo, [
|
|
3124
|
+
t("div", Jo, a(u.id), 1)
|
|
2732
3125
|
]),
|
|
2733
|
-
t("div",
|
|
2734
|
-
(
|
|
3126
|
+
t("div", Wo, [
|
|
3127
|
+
(l(!0), r(f, null, g(n.requisitionFields, (v) => (l(), r("div", {
|
|
2735
3128
|
class: "detail-item",
|
|
2736
|
-
key:
|
|
3129
|
+
key: v.label
|
|
2737
3130
|
}, [
|
|
2738
|
-
t("div",
|
|
2739
|
-
t("div",
|
|
3131
|
+
t("div", Ko, a(v.label), 1),
|
|
3132
|
+
t("div", zo, a(v.value(u)), 1)
|
|
2740
3133
|
]))), 128))
|
|
2741
3134
|
]),
|
|
2742
|
-
t("div",
|
|
3135
|
+
t("div", Go, [
|
|
2743
3136
|
e[30] || (e[30] = t("div", { class: "detail-label" }, "Justification", -1)),
|
|
2744
|
-
t("div",
|
|
3137
|
+
t("div", Yo, a(u.justification || "N/A"), 1)
|
|
2745
3138
|
]),
|
|
2746
|
-
t("div",
|
|
3139
|
+
t("div", Xo, [
|
|
2747
3140
|
e[31] || (e[31] = t("div", { class: "detail-label" }, "Items", -1)),
|
|
2748
|
-
t("ul",
|
|
2749
|
-
(
|
|
3141
|
+
t("ul", Zo, [
|
|
3142
|
+
(l(!0), r(f, null, g(u.items, (v, C) => (l(), r("li", { key: C }, a(v.desc) + " - " + a(v.qty) + " " + a(v.unit) + " @ ₦" + a(v.cost.toFixed(2)) + " each ", 1))), 128))
|
|
2750
3143
|
])
|
|
2751
3144
|
]),
|
|
2752
3145
|
t("button", {
|
|
2753
3146
|
type: "button",
|
|
2754
3147
|
class: "add-item-btn",
|
|
2755
|
-
onClick: (
|
|
2756
|
-
}, "Create PO", 8,
|
|
3148
|
+
onClick: (v) => o.handleCreatePO(u.id)
|
|
3149
|
+
}, "Create PO", 8, el)
|
|
2757
3150
|
]))), 128))
|
|
2758
3151
|
])
|
|
2759
|
-
])) :
|
|
2760
|
-
n.activeTab === "receiving" ? (
|
|
3152
|
+
])) : c("", !0),
|
|
3153
|
+
n.activeTab === "receiving" ? (l(), r("div", tl, [
|
|
2761
3154
|
e[35] || (e[35] = t("div", { style: { "margin-bottom": "20px" } }, [
|
|
2762
3155
|
t("h3", { style: { color: "#1e40af", "margin-bottom": "15px" } }, "Receiving & Inventory Dashboard"),
|
|
2763
3156
|
t("div", { style: { background: "#dcfce7", padding: "15px", "border-radius": "10px", "border-left": "4px solid #10b981" } }, [
|
|
2764
3157
|
t("strong", null, "Role:"),
|
|
2765
|
-
|
|
3158
|
+
w(" Warehouse Team - Process incoming deliveries and update inventory ")
|
|
2766
3159
|
])
|
|
2767
3160
|
], -1)),
|
|
2768
|
-
t("div",
|
|
2769
|
-
(
|
|
2770
|
-
key:
|
|
3161
|
+
t("div", sl, [
|
|
3162
|
+
(l(!0), r(f, null, g(o.awaitingDelivery, (u) => (l(), r("div", {
|
|
3163
|
+
key: u.id,
|
|
2771
3164
|
class: "requisition-card"
|
|
2772
3165
|
}, [
|
|
2773
|
-
t("div",
|
|
2774
|
-
t("div",
|
|
3166
|
+
t("div", il, [
|
|
3167
|
+
t("div", nl, a(u.id), 1)
|
|
2775
3168
|
]),
|
|
2776
|
-
t("div",
|
|
2777
|
-
(
|
|
3169
|
+
t("div", ol, [
|
|
3170
|
+
(l(!0), r(f, null, g(n.requisitionFields, (v) => (l(), r("div", {
|
|
2778
3171
|
class: "detail-item",
|
|
2779
|
-
key:
|
|
3172
|
+
key: v.label
|
|
2780
3173
|
}, [
|
|
2781
|
-
t("div",
|
|
2782
|
-
t("div",
|
|
3174
|
+
t("div", ll, a(v.label), 1),
|
|
3175
|
+
t("div", rl, a(v.value(u)), 1)
|
|
2783
3176
|
]))), 128))
|
|
2784
3177
|
]),
|
|
2785
|
-
t("div",
|
|
3178
|
+
t("div", al, [
|
|
2786
3179
|
e[33] || (e[33] = t("div", { class: "detail-label" }, "Justification", -1)),
|
|
2787
|
-
t("div",
|
|
3180
|
+
t("div", dl, a(u.justification || "N/A"), 1)
|
|
2788
3181
|
]),
|
|
2789
|
-
t("div",
|
|
3182
|
+
t("div", ul, [
|
|
2790
3183
|
e[34] || (e[34] = t("div", { class: "detail-label" }, "Items", -1)),
|
|
2791
|
-
t("ul",
|
|
2792
|
-
(
|
|
3184
|
+
t("ul", cl, [
|
|
3185
|
+
(l(!0), r(f, null, g(u.items, (v, C) => (l(), r("li", { key: C }, a(v.desc) + " - " + a(v.qty) + " " + a(v.unit) + " @ ₦" + a(v.cost.toFixed(2)) + " each ", 1))), 128))
|
|
2793
3186
|
])
|
|
2794
3187
|
]),
|
|
2795
3188
|
t("button", {
|
|
2796
3189
|
type: "button",
|
|
2797
3190
|
class: "add-item-btn",
|
|
2798
|
-
onClick: (
|
|
2799
|
-
}, "Accept Delivery", 8,
|
|
3191
|
+
onClick: (v) => o.handleAcceptDelivery(u.id)
|
|
3192
|
+
}, "Accept Delivery", 8, ml)
|
|
2800
3193
|
]))), 128))
|
|
2801
3194
|
])
|
|
2802
|
-
])) :
|
|
2803
|
-
n.activeTab === "po" ? (
|
|
2804
|
-
t("div",
|
|
2805
|
-
t("div",
|
|
2806
|
-
t("div",
|
|
3195
|
+
])) : c("", !0),
|
|
3196
|
+
n.activeTab === "po" ? (l(), r("div", vl, [
|
|
3197
|
+
t("div", pl, [
|
|
3198
|
+
t("div", hl, [
|
|
3199
|
+
t("div", fl, [
|
|
2807
3200
|
e[41] || (e[41] = t("h3", null, "Vendor Information", -1)),
|
|
2808
|
-
t("div",
|
|
3201
|
+
t("div", gl, [
|
|
2809
3202
|
e[36] || (e[36] = t("span", { class: "info-label" }, "Company:", -1)),
|
|
2810
|
-
t("span",
|
|
3203
|
+
t("span", bl, a(n.vendorInfo.company || ((i = n.poDetails.vendorInfo) == null ? void 0 : i.company)), 1)
|
|
2811
3204
|
]),
|
|
2812
|
-
t("div",
|
|
3205
|
+
t("div", yl, [
|
|
2813
3206
|
e[37] || (e[37] = t("span", { class: "info-label" }, "Contact:", -1)),
|
|
2814
|
-
t("span",
|
|
3207
|
+
t("span", wl, a(n.vendorInfo.contact || ((m = n.poDetails.vendorInfo) == null ? void 0 : m.contact)), 1)
|
|
2815
3208
|
]),
|
|
2816
|
-
t("div",
|
|
3209
|
+
t("div", kl, [
|
|
2817
3210
|
e[38] || (e[38] = t("span", { class: "info-label" }, "Email:", -1)),
|
|
2818
|
-
t("span",
|
|
3211
|
+
t("span", Cl, a(n.vendorInfo.email || ((y = n.poDetails.vendorInfo) == null ? void 0 : y.email)), 1)
|
|
2819
3212
|
]),
|
|
2820
|
-
t("div",
|
|
3213
|
+
t("div", _l, [
|
|
2821
3214
|
e[39] || (e[39] = t("span", { class: "info-label" }, "Phone:", -1)),
|
|
2822
|
-
t("span",
|
|
3215
|
+
t("span", Dl, a(n.vendorInfo.phone || ((P = n.poDetails.vendorInfo) == null ? void 0 : P.phone)), 1)
|
|
2823
3216
|
]),
|
|
2824
|
-
t("div",
|
|
3217
|
+
t("div", xl, [
|
|
2825
3218
|
e[40] || (e[40] = t("span", { class: "info-label" }, "Address:", -1)),
|
|
2826
|
-
t("span",
|
|
3219
|
+
t("span", Sl, a(n.vendorInfo.address || ((T = n.poDetails.vendorInfo) == null ? void 0 : T.address)), 1)
|
|
2827
3220
|
])
|
|
2828
3221
|
]),
|
|
2829
|
-
t("div",
|
|
3222
|
+
t("div", Al, [
|
|
2830
3223
|
e[47] || (e[47] = t("h3", null, "Purchase Order Details", -1)),
|
|
2831
|
-
t("div",
|
|
3224
|
+
t("div", Pl, [
|
|
2832
3225
|
e[42] || (e[42] = t("span", { class: "info-label" }, "PO Number:", -1)),
|
|
2833
|
-
t("span",
|
|
3226
|
+
t("span", Tl, a(n.poDetails.id), 1)
|
|
2834
3227
|
]),
|
|
2835
|
-
t("div",
|
|
3228
|
+
t("div", ql, [
|
|
2836
3229
|
e[43] || (e[43] = t("span", { class: "info-label" }, "Date:", -1)),
|
|
2837
|
-
t("span",
|
|
3230
|
+
t("span", Il, a(n.vendorInfo.poDate || ((q = n.poDetails.vendorInfo) == null ? void 0 : q.poDate)), 1)
|
|
2838
3231
|
]),
|
|
2839
|
-
t("div",
|
|
3232
|
+
t("div", Fl, [
|
|
2840
3233
|
e[44] || (e[44] = t("span", { class: "info-label" }, "Requested By:", -1)),
|
|
2841
|
-
t("span",
|
|
3234
|
+
t("span", Rl, a(n.vendorInfo.poApproved || ((I = n.poDetails.vendorInfo) == null ? void 0 : I.poApproved)), 1)
|
|
2842
3235
|
]),
|
|
2843
|
-
t("div",
|
|
3236
|
+
t("div", Vl, [
|
|
2844
3237
|
e[45] || (e[45] = t("span", { class: "info-label" }, "Department:", -1)),
|
|
2845
|
-
t("span",
|
|
3238
|
+
t("span", Ml, "PO-" + a(n.poDetails.department), 1)
|
|
2846
3239
|
]),
|
|
2847
|
-
t("div",
|
|
3240
|
+
t("div", Nl, [
|
|
2848
3241
|
e[46] || (e[46] = t("span", { class: "info-label" }, "Delivery Date:", -1)),
|
|
2849
|
-
t("span",
|
|
3242
|
+
t("span", El, a(n.poDetails.neededDate), 1)
|
|
2850
3243
|
])
|
|
2851
3244
|
])
|
|
2852
3245
|
]),
|
|
2853
|
-
t("div",
|
|
3246
|
+
t("div", Ll, [
|
|
2854
3247
|
e[57] || (e[57] = t("h2", { class: "section-title" }, "Order Items", -1)),
|
|
2855
|
-
t("table",
|
|
3248
|
+
t("table", Ol, [
|
|
2856
3249
|
t("thead", null, [
|
|
2857
3250
|
t("tr", null, [
|
|
2858
3251
|
e[48] || (e[48] = t("th", null, "Item #", -1)),
|
|
@@ -2860,134 +3253,134 @@ function yl(s, e, u, b, n, r) {
|
|
|
2860
3253
|
e[50] || (e[50] = t("th", null, "Quantity", -1)),
|
|
2861
3254
|
e[51] || (e[51] = t("th", null, "Unit Price", -1)),
|
|
2862
3255
|
e[52] || (e[52] = t("th", null, "Total", -1)),
|
|
2863
|
-
n.isPrinting ?
|
|
3256
|
+
n.isPrinting ? c("", !0) : (l(), r("th", Ul, "Actions"))
|
|
2864
3257
|
])
|
|
2865
3258
|
]),
|
|
2866
3259
|
t("tbody", null, [
|
|
2867
|
-
(
|
|
2868
|
-
t("td", null, a(
|
|
2869
|
-
t("td", null, a(
|
|
2870
|
-
t("td", null, a(
|
|
3260
|
+
(l(!0), r(f, null, g(n.poDetails.items || [], (u, v) => (l(), r("tr", { key: v }, [
|
|
3261
|
+
t("td", null, a(u.itemNumber), 1),
|
|
3262
|
+
t("td", null, a(u.desc), 1),
|
|
3263
|
+
t("td", null, a(u.qty), 1),
|
|
2871
3264
|
t("td", null, [
|
|
2872
|
-
|
|
3265
|
+
u.editing ? h((l(), r("input", {
|
|
2873
3266
|
key: 1,
|
|
2874
|
-
"onUpdate:modelValue": (
|
|
3267
|
+
"onUpdate:modelValue": (C) => u.tempPrice = C,
|
|
2875
3268
|
type: "number",
|
|
2876
3269
|
step: "0.01",
|
|
2877
|
-
class:
|
|
2878
|
-
}, null, 10,
|
|
3270
|
+
class: b(["price-input", { "price-changed": u.cost !== u.tempPrice }])
|
|
3271
|
+
}, null, 10, Bl)), [
|
|
2879
3272
|
[
|
|
2880
3273
|
k,
|
|
2881
|
-
|
|
3274
|
+
u.tempPrice,
|
|
2882
3275
|
void 0,
|
|
2883
3276
|
{ number: !0 }
|
|
2884
3277
|
]
|
|
2885
|
-
]) : (
|
|
2886
|
-
|
|
2887
|
-
|
|
3278
|
+
]) : (l(), r("span", $l, [
|
|
3279
|
+
w(" $" + a(u.cost.toFixed(2)) + " ", 1),
|
|
3280
|
+
u.cost !== u.unitPrice ? (l(), r("span", jl, "!")) : c("", !0)
|
|
2888
3281
|
]))
|
|
2889
3282
|
]),
|
|
2890
|
-
t("td", null, "$" + a((
|
|
2891
|
-
n.isPrinting ?
|
|
2892
|
-
|
|
3283
|
+
t("td", null, "$" + a((u.unitPrice * u.qty).toFixed(2)), 1),
|
|
3284
|
+
n.isPrinting ? c("", !0) : (l(), r("td", Hl, [
|
|
3285
|
+
u.editing ? (l(), r("div", Jl, [
|
|
2893
3286
|
t("button", {
|
|
2894
|
-
onClick: (
|
|
3287
|
+
onClick: (C) => o.savePrice(v),
|
|
2895
3288
|
class: "save-btn"
|
|
2896
|
-
}, "Save", 8,
|
|
3289
|
+
}, "Save", 8, Wl),
|
|
2897
3290
|
t("button", {
|
|
2898
|
-
onClick: (
|
|
3291
|
+
onClick: (C) => o.cancelEdit(v),
|
|
2899
3292
|
class: "cancel-btn"
|
|
2900
|
-
}, "Cancel", 8,
|
|
2901
|
-
])) : (
|
|
3293
|
+
}, "Cancel", 8, Kl)
|
|
3294
|
+
])) : (l(), r("button", {
|
|
2902
3295
|
key: 0,
|
|
2903
|
-
onClick: (
|
|
3296
|
+
onClick: (C) => o.startEdit(v),
|
|
2904
3297
|
class: "edit-btn"
|
|
2905
|
-
}, " Edit Price ", 8,
|
|
3298
|
+
}, " Edit Price ", 8, Ql))
|
|
2906
3299
|
]))
|
|
2907
3300
|
]))), 128))
|
|
2908
3301
|
])
|
|
2909
3302
|
]),
|
|
2910
|
-
(
|
|
2911
|
-
key: "note-" +
|
|
3303
|
+
(l(!0), r(f, null, g(n.poDetails.items || [], (u, v) => (l(), r("div", {
|
|
3304
|
+
key: "note-" + v
|
|
2912
3305
|
}, [
|
|
2913
|
-
|
|
2914
|
-
t("strong", null, "Price Change Justification (Item " + a(
|
|
2915
|
-
|
|
2916
|
-
])) :
|
|
3306
|
+
u.justification ? (l(), r("div", zl, [
|
|
3307
|
+
t("strong", null, "Price Change Justification (Item " + a(u.itemNumber) + "):", 1),
|
|
3308
|
+
w(" " + a(u.justification), 1)
|
|
3309
|
+
])) : c("", !0)
|
|
2917
3310
|
]))), 128)),
|
|
2918
|
-
t("div",
|
|
2919
|
-
t("div",
|
|
3311
|
+
t("div", Gl, [
|
|
3312
|
+
t("div", Yl, [
|
|
2920
3313
|
e[53] || (e[53] = t("span", null, "Subtotal:", -1)),
|
|
2921
|
-
t("span", null, "$" + a(
|
|
3314
|
+
t("span", null, "$" + a(o.subTotal.toFixed(2)), 1)
|
|
2922
3315
|
]),
|
|
2923
|
-
t("div",
|
|
3316
|
+
t("div", Xl, [
|
|
2924
3317
|
e[54] || (e[54] = t("span", null, "Tax (%):", -1)),
|
|
2925
|
-
t("span", null, "$" + a(
|
|
3318
|
+
t("span", null, "$" + a(o.getOptional(n.vendorInfo.tax)), 1)
|
|
2926
3319
|
]),
|
|
2927
|
-
t("div",
|
|
3320
|
+
t("div", Zl, [
|
|
2928
3321
|
e[55] || (e[55] = t("span", null, "Shipping:", -1)),
|
|
2929
|
-
t("span", null, "$" + a(
|
|
3322
|
+
t("span", null, "$" + a(o.getOptional(n.vendorInfo.shipping)), 1)
|
|
2930
3323
|
]),
|
|
2931
|
-
t("div",
|
|
3324
|
+
t("div", er, [
|
|
2932
3325
|
e[56] || (e[56] = t("span", null, "Grand Total:", -1)),
|
|
2933
|
-
t("span", null, "$" + a((
|
|
3326
|
+
t("span", null, "$" + a((o.subTotal + o.getOptional(n.vendorInfo.tax) + o.getOptional(n.vendorInfo.shipping)).toFixed(2)), 1)
|
|
2934
3327
|
])
|
|
2935
3328
|
])
|
|
2936
3329
|
])
|
|
2937
3330
|
]),
|
|
2938
|
-
n.showJustificationModal ? (
|
|
3331
|
+
n.showJustificationModal ? (l(), r("div", {
|
|
2939
3332
|
key: 0,
|
|
2940
3333
|
class: "justification-modal",
|
|
2941
|
-
onClick: e[10] || (e[10] = D((...
|
|
3334
|
+
onClick: e[10] || (e[10] = D((...u) => o.closeJustificationModal && o.closeJustificationModal(...u), ["self"]))
|
|
2942
3335
|
}, [
|
|
2943
|
-
t("div",
|
|
3336
|
+
t("div", tr, [
|
|
2944
3337
|
e[60] || (e[60] = t("h3", null, "Price Change Justification Required", -1)),
|
|
2945
|
-
t("p",
|
|
2946
|
-
e[58] || (e[58] =
|
|
2947
|
-
t("strong", null, "$" + a((
|
|
2948
|
-
e[59] || (e[59] =
|
|
2949
|
-
t("strong", null, "$" + a((M = (V =
|
|
3338
|
+
t("p", sr, [
|
|
3339
|
+
e[58] || (e[58] = w(" Please provide a justification for changing the price from ", -1)),
|
|
3340
|
+
t("strong", null, "$" + a((R = (F = o.currentItem) == null ? void 0 : F.cost) == null ? void 0 : R.toFixed(2)), 1),
|
|
3341
|
+
e[59] || (e[59] = w(" to ", -1)),
|
|
3342
|
+
t("strong", null, "$" + a((M = (V = o.currentItem) == null ? void 0 : V.tempPrice) == null ? void 0 : M.toFixed(2)), 1)
|
|
2950
3343
|
]),
|
|
2951
|
-
|
|
2952
|
-
"onUpdate:modelValue": e[7] || (e[7] = (
|
|
3344
|
+
h(t("textarea", {
|
|
3345
|
+
"onUpdate:modelValue": e[7] || (e[7] = (u) => n.justificationText = u),
|
|
2953
3346
|
class: "justification-textarea",
|
|
2954
3347
|
placeholder: "Enter justification for price change...",
|
|
2955
3348
|
required: ""
|
|
2956
3349
|
}, null, 512), [
|
|
2957
3350
|
[k, n.justificationText]
|
|
2958
3351
|
]),
|
|
2959
|
-
t("div",
|
|
3352
|
+
t("div", ir, [
|
|
2960
3353
|
t("button", {
|
|
2961
|
-
onClick: e[8] || (e[8] = (...
|
|
3354
|
+
onClick: e[8] || (e[8] = (...u) => o.closeJustificationModal && o.closeJustificationModal(...u)),
|
|
2962
3355
|
class: "cancel-btn"
|
|
2963
3356
|
}, "Cancel"),
|
|
2964
3357
|
t("button", {
|
|
2965
|
-
onClick: e[9] || (e[9] = (...
|
|
3358
|
+
onClick: e[9] || (e[9] = (...u) => o.confirmPriceChange && o.confirmPriceChange(...u)),
|
|
2966
3359
|
class: "save-btn",
|
|
2967
3360
|
disabled: !n.justificationText.trim()
|
|
2968
|
-
}, " Confirm Change ", 8,
|
|
3361
|
+
}, " Confirm Change ", 8, nr)
|
|
2969
3362
|
])
|
|
2970
3363
|
])
|
|
2971
|
-
])) :
|
|
2972
|
-
n.isPrinting ?
|
|
3364
|
+
])) : c("", !0),
|
|
3365
|
+
n.isPrinting ? c("", !0) : (l(), r("button", {
|
|
2973
3366
|
key: 1,
|
|
2974
3367
|
type: "button",
|
|
2975
3368
|
class: "add-item-btn",
|
|
2976
|
-
onClick: e[11] || (e[11] = (
|
|
3369
|
+
onClick: e[11] || (e[11] = (u) => o.handleFinishPO(n.poDetails.id))
|
|
2977
3370
|
}, "Approve PO"))
|
|
2978
|
-
])) :
|
|
2979
|
-
n.activeTab === "workflow" ? (
|
|
3371
|
+
])) : c("", !0),
|
|
3372
|
+
n.activeTab === "workflow" ? (l(), r("div", or, e[61] || (e[61] = [
|
|
2980
3373
|
x('<div class="workflow-steps"><div class="workflow-step"><div class="step-icon completed">1</div><div class="step-title">Request Submitted</div></div><div class="workflow-step"><div class="step-icon active">2</div><div class="step-title">Department Review</div></div><div class="workflow-step"><div class="step-icon">3</div><div class="step-title">Management Approval</div></div><div class="workflow-step"><div class="step-icon">4</div><div class="step-title">Purchase Order Created</div></div><div class="workflow-step"><div class="step-icon">5</div><div class="step-title">Order Fulfilled</div></div></div><div style="background:white;padding:30px;border-radius:15px;margin-top:20px;"><h3 style="color:#1e40af;margin-bottom:20px;">Requisition Workflow Process</h3><div style="line-height:1.8;color:#374151;"><p><strong>Step 1: Request Identification</strong><br> Department or individual identifies need for materials, equipment, or services.</p><p><strong>Step 2: Requisition Creation</strong><br> Complete requisition form with detailed specifications, quantities, and business justification.</p><p><strong>Step 3: Department Review</strong><br> Department supervisor reviews request for accuracy, necessity, and budget compliance.</p><p><strong>Step 4: Management Approval</strong><br> Based on cost thresholds, appropriate management level provides approval.</p><p><strong>Step 5: Purchase Order Generation</strong><br> Purchasing team converts approved requisition into formal Purchase Order (PO).</p><p><strong>Step 6: Vendor Processing</strong><br> PO sent to vendor, order processed, and delivery scheduled.</p><p><strong>Step 7: Receipt & Inventory</strong><br> Goods received, inspected, and entered into inventory system.</p></div></div>', 2)
|
|
2981
|
-
]))) :
|
|
3374
|
+
]))) : c("", !0)
|
|
2982
3375
|
]);
|
|
2983
3376
|
}
|
|
2984
|
-
const
|
|
3377
|
+
const rr = /* @__PURE__ */ S(Nn, [["render", lr]]), dr = (s = {}) => ({
|
|
2985
3378
|
brandName: s.brandName || "OceanHelm",
|
|
2986
3379
|
logoIcon: s.logoIcon || "bi bi-water",
|
|
2987
3380
|
showLogo: s.showLogo !== !1,
|
|
2988
3381
|
responsive: s.responsive !== !1,
|
|
2989
3382
|
...s
|
|
2990
|
-
}),
|
|
3383
|
+
}), ur = [
|
|
2991
3384
|
{
|
|
2992
3385
|
type: "link",
|
|
2993
3386
|
label: "Home",
|
|
@@ -3003,6 +3396,14 @@ const wl = /* @__PURE__ */ S(Gi, [["render", yl]]), Cl = (s = {}) => ({
|
|
|
3003
3396
|
roles: ["owner"]
|
|
3004
3397
|
// Role-based visibility
|
|
3005
3398
|
},
|
|
3399
|
+
{
|
|
3400
|
+
type: "link",
|
|
3401
|
+
label: "People Manager",
|
|
3402
|
+
icon: "bi bi-person-plus",
|
|
3403
|
+
href: "/app/people-manager",
|
|
3404
|
+
roles: ["owner"]
|
|
3405
|
+
// Role-based visibility
|
|
3406
|
+
},
|
|
3006
3407
|
{
|
|
3007
3408
|
type: "text",
|
|
3008
3409
|
label: "Modules"
|
|
@@ -3102,22 +3503,22 @@ const wl = /* @__PURE__ */ S(Gi, [["render", yl]]), Cl = (s = {}) => ({
|
|
|
3102
3503
|
icon: "bi bi-question-circle",
|
|
3103
3504
|
action: "help"
|
|
3104
3505
|
}
|
|
3105
|
-
],
|
|
3506
|
+
], cr = (s, e) => !s.roles || s.roles.length === 0 ? !0 : s.roles.includes(e == null ? void 0 : e.role), mr = {
|
|
3106
3507
|
install(s, e = {}) {
|
|
3107
|
-
s.component("ConfigurableSidebar",
|
|
3508
|
+
s.component("ConfigurableSidebar", X), s.component("VesselLists", Ve), s.component("DashHead", Ue), s.component("ActivityLogs", ni), s.component("CrewManagement", Mn), s.component("RequisitionSystem", rr), s.component("OceanHelmMaintenance", Fs), s.provide("sidebarConfig", e);
|
|
3108
3509
|
}
|
|
3109
3510
|
};
|
|
3110
3511
|
export {
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3512
|
+
ni as ActivityLogs,
|
|
3513
|
+
X as ConfigurableSidebar,
|
|
3514
|
+
Mn as CrewManagement,
|
|
3114
3515
|
Ue as DashHead,
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3516
|
+
Fs as OceanHelmMaintenance,
|
|
3517
|
+
rr as RequisitionSystem,
|
|
3518
|
+
Ve as VesselList,
|
|
3519
|
+
dr as createSidebarConfig,
|
|
3520
|
+
mr as default,
|
|
3521
|
+
ur as defaultMenuItems,
|
|
3522
|
+
cr as defaultPermissionChecker
|
|
3122
3523
|
};
|
|
3123
3524
|
//# sourceMappingURL=oceanhelm.es.js.map
|