oceanhelm 0.0.9 → 0.0.11
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 +1577 -876
- 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 +1060 -54
- package/src/components/DashHead.vue +10 -0
- package/src/components/Reports.vue +612 -0
- package/src/index.js +3 -1
- package/src/utils/sidebarConfig.js +45 -13
package/dist/oceanhelm.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { openBlock as o, createElementBlock as
|
|
1
|
+
import { openBlock as o, createElementBlock as r, normalizeClass as b, createElementVNode as t, toDisplayString as a, createCommentVNode as v, Fragment as f, renderList as g, withModifiers as _, createTextVNode as w, renderSlot as L, withDirectives as h, withKeys as $, vModelText as k, vShow as F, normalizeStyle as E, createStaticVNode as x, vModelSelect as D, vModelCheckbox as V } 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 [m, n] of e)
|
|
5
|
+
d[m] = 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", (m) => {
|
|
89
|
+
const n = e.contains(m.target), l = s.contains(m.target);
|
|
90
|
+
!n && !l && 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
|
+
}, j = { style: { "margin-left": "45px" } }, B = { class: "list-unstyled components mt-4" }, H = ["onClick"], Q = ["href", "onClick"], z = ["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"], G = {
|
|
107
107
|
key: 3,
|
|
108
108
|
class: "dropdown-divider"
|
|
109
|
-
},
|
|
110
|
-
function
|
|
111
|
-
return o(),
|
|
109
|
+
}, Y = { key: 4 };
|
|
110
|
+
function X(s, e, d, m, n, l) {
|
|
111
|
+
return o(), r("nav", {
|
|
112
112
|
id: "sidebar",
|
|
113
|
-
class:
|
|
113
|
+
class: b(l.sidebarClasses)
|
|
114
114
|
}, [
|
|
115
|
-
|
|
116
|
-
t("
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
key: f,
|
|
124
|
-
class: g({ active: i.active, dropdown: i.type === "dropdown" }),
|
|
125
|
-
onClick: (y) => r.handleItemClick(i)
|
|
115
|
+
d.showLogo ? (o(), r("div", U, [
|
|
116
|
+
t("span", j, a(d.brandName), 1)
|
|
117
|
+
])) : v("", !0),
|
|
118
|
+
t("ul", B, [
|
|
119
|
+
(o(!0), r(f, null, g(l.filteredMenuItems, (i, c) => (o(), r("li", {
|
|
120
|
+
key: c,
|
|
121
|
+
class: b({ active: i.active, dropdown: i.type === "dropdown" }),
|
|
122
|
+
onClick: (y) => l.handleItemClick(i)
|
|
126
123
|
}, [
|
|
127
|
-
i.type === "link" ? (o(),
|
|
124
|
+
i.type === "link" ? (o(), r("a", {
|
|
128
125
|
key: 0,
|
|
129
126
|
href: i.href || "#",
|
|
130
|
-
onClick:
|
|
127
|
+
onClick: _((y) => l.handleNavigation(i), ["prevent"])
|
|
131
128
|
}, [
|
|
132
|
-
i.icon ? (o(),
|
|
129
|
+
i.icon ? (o(), r("i", {
|
|
133
130
|
key: 0,
|
|
134
|
-
class:
|
|
135
|
-
}, null, 2)) :
|
|
136
|
-
|
|
137
|
-
], 8,
|
|
131
|
+
class: b(i.icon)
|
|
132
|
+
}, null, 2)) : v("", !0),
|
|
133
|
+
w(" " + a(i.label), 1)
|
|
134
|
+
], 8, Q)) : i.type === "button" ? (o(), r("a", {
|
|
138
135
|
key: 1,
|
|
139
|
-
onClick:
|
|
136
|
+
onClick: _((y) => l.handleAction(i), ["prevent"]),
|
|
140
137
|
style: { cursor: "pointer" }
|
|
141
138
|
}, [
|
|
142
|
-
i.icon ? (o(),
|
|
139
|
+
i.icon ? (o(), r("i", {
|
|
143
140
|
key: 0,
|
|
144
|
-
class:
|
|
145
|
-
}, null, 2)) :
|
|
146
|
-
|
|
147
|
-
], 8,
|
|
148
|
-
t("a",
|
|
149
|
-
i.icon ? (o(),
|
|
141
|
+
class: b(i.icon)
|
|
142
|
+
}, null, 2)) : v("", !0),
|
|
143
|
+
w(" " + a(i.label), 1)
|
|
144
|
+
], 8, z)) : i.type === "dropdown" ? (o(), r(f, { key: 2 }, [
|
|
145
|
+
t("a", J, [
|
|
146
|
+
i.icon ? (o(), r("i", {
|
|
150
147
|
key: 0,
|
|
151
|
-
class:
|
|
152
|
-
}, null, 2)) :
|
|
153
|
-
|
|
148
|
+
class: b(i.icon)
|
|
149
|
+
}, null, 2)) : v("", !0),
|
|
150
|
+
w(" " + a(i.label), 1)
|
|
154
151
|
]),
|
|
155
|
-
t("div",
|
|
156
|
-
(o(!0),
|
|
152
|
+
t("div", W, [
|
|
153
|
+
(o(!0), r(f, null, g(l.getFilteredChildren(i), (y, A) => (o(), r("a", {
|
|
157
154
|
key: A,
|
|
158
155
|
class: "dropdown-item black",
|
|
159
|
-
onClick:
|
|
156
|
+
onClick: _((P) => l.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" ? (o(),
|
|
164
|
-
], 10,
|
|
160
|
+
], 64)) : i.type === "separator" ? (o(), r("div", G)) : i.type === "text" ? (o(), r("a", Y, a(i.label), 1)) : v("", !0)
|
|
161
|
+
], 10, H))), 128))
|
|
165
162
|
]),
|
|
166
|
-
|
|
163
|
+
L(s.$slots, "footer")
|
|
167
164
|
], 2);
|
|
168
165
|
}
|
|
169
|
-
const
|
|
170
|
-
const
|
|
166
|
+
const Z = /* @__PURE__ */ S(O, [["render", X]]);
|
|
167
|
+
const ee = {
|
|
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(), m = new Date(s), n = d - m;
|
|
291
288
|
if (n < 0)
|
|
292
289
|
return "Invalid (future date)";
|
|
293
|
-
const
|
|
290
|
+
const l = Math.floor(n / (1e3 * 60 * 60)), i = Math.floor(l / 24), c = l % 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" : ""}`), c > 0 && (y += (y ? " " : "") + `${c} hr${c > 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(), m = new Date(s) - e;
|
|
305
|
+
return Math.ceil(m / (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
|
+
}, te = { class: "row mb-3" }, se = { class: "col-md-4" }, ie = { class: "card-body d-flex align-items-center" }, ne = { class: "mt-2 mb-0" }, le = { class: "col-md-4" }, oe = { class: "card-body d-flex align-items-center" }, re = { class: "mt-2 mb-0" }, ae = {
|
|
316
313
|
key: 0,
|
|
317
314
|
class: "col-md-4"
|
|
318
|
-
},
|
|
315
|
+
}, de = { class: "d-flex justify-content-between align-items-center mb-4" }, ue = {
|
|
319
316
|
key: 0,
|
|
320
317
|
class: "alert alert-info mb-3",
|
|
321
318
|
role: "alert"
|
|
322
|
-
},
|
|
319
|
+
}, ce = {
|
|
323
320
|
key: 1,
|
|
324
321
|
class: "text-center py-4"
|
|
325
|
-
},
|
|
322
|
+
}, me = {
|
|
326
323
|
key: 2,
|
|
327
324
|
class: "alert alert-primary",
|
|
328
325
|
role: "alert"
|
|
329
|
-
},
|
|
326
|
+
}, ve = {
|
|
330
327
|
key: 3,
|
|
331
328
|
class: "alert alert-warning",
|
|
332
329
|
role: "alert"
|
|
333
|
-
},
|
|
330
|
+
}, pe = { class: "alert-heading" }, he = { class: "mb-0" }, fe = {
|
|
334
331
|
key: 4,
|
|
335
332
|
class: "row"
|
|
336
|
-
},
|
|
333
|
+
}, ge = ["onClick"], be = { class: "card-body d-flex align-items-center" }, ye = { class: "flex-grow-1" }, we = { class: "d-flex justify-content-between align-items-center mb-2" }, ke = { class: "card-title mb-0" }, Ce = { class: "row" }, _e = { class: "col-6" }, De = { class: "mb-0" }, xe = {
|
|
337
334
|
key: 0,
|
|
338
335
|
class: "col-6"
|
|
339
|
-
},
|
|
336
|
+
}, Se = { class: "mb-0" }, Fe = { class: "mb-0" }, Ae = {
|
|
340
337
|
key: 1,
|
|
341
338
|
class: "col-6"
|
|
342
|
-
}, Pe = { class: "text-muted" },
|
|
343
|
-
function
|
|
344
|
-
return o(),
|
|
345
|
-
t("div",
|
|
346
|
-
t("div",
|
|
339
|
+
}, Pe = { class: "text-muted" }, Te = ["onClick"], Ie = { class: "action-icon v-left delete" }, qe = ["onClick"], Re = ["onClick"];
|
|
340
|
+
function Me(s, e, d, m, n, l) {
|
|
341
|
+
return o(), r(f, null, [
|
|
342
|
+
t("div", te, [
|
|
343
|
+
t("div", se, [
|
|
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) => l.filterVessels("Active")),
|
|
350
347
|
style: { cursor: "pointer" }
|
|
351
348
|
}, [
|
|
352
|
-
t("div",
|
|
349
|
+
t("div", ie, [
|
|
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", ne, a(l.activeVesselsCount), 1)
|
|
359
356
|
])
|
|
360
357
|
])
|
|
361
358
|
], 2)
|
|
362
359
|
]),
|
|
363
|
-
t("div",
|
|
360
|
+
t("div", le, [
|
|
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) => l.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", re, a(l.inactiveVesselsCount), 1)
|
|
376
373
|
])
|
|
377
374
|
])
|
|
378
375
|
], 2)
|
|
379
376
|
]),
|
|
380
|
-
|
|
377
|
+
l.canAddVessel ? (o(), r("div", ae, [
|
|
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) => l.handleAddVessel && l.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
|
+
])) : v("", !0)
|
|
396
393
|
]),
|
|
397
|
-
t("div",
|
|
394
|
+
t("div", de, [
|
|
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" ? (o(),
|
|
399
|
+
n.activeFilter !== "All" ? (o(), 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) => l.clearFilter && l.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
|
+
]))) : v("", !0)
|
|
410
407
|
]),
|
|
411
|
-
n.activeFilter !== "All" ? (o(),
|
|
412
|
-
e[11] || (e[11] =
|
|
408
|
+
n.activeFilter !== "All" ? (o(), r("div", ue, [
|
|
409
|
+
e[11] || (e[11] = w(" Showing ", -1)),
|
|
413
410
|
t("strong", null, a(n.activeFilter), 1),
|
|
414
|
-
|
|
415
|
-
])) :
|
|
416
|
-
|
|
411
|
+
w(" vessels (" + a(l.filteredVessels.length) + ") ", 1)
|
|
412
|
+
])) : v("", !0),
|
|
413
|
+
d.loading ? (o(), r("div", ce, e[12] || (e[12] = [
|
|
417
414
|
t("div", {
|
|
418
415
|
class: "spinner-border text-primary",
|
|
419
416
|
role: "status"
|
|
@@ -421,75 +418,75 @@ 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
|
+
]))) : !l.filteredVessels.length && n.activeFilter === "All" ? (o(), r("div", me, 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
|
-
])) : (o(),
|
|
433
|
-
(o(!0),
|
|
426
|
+
]))) : !l.filteredVessels.length && n.activeFilter !== "All" ? (o(), r("div", ve, [
|
|
427
|
+
t("h4", pe, "No " + a(n.activeFilter) + " Vessels", 1),
|
|
428
|
+
t("p", he, "There are no " + a(n.activeFilter.toLowerCase()) + " vessels in your fleet.", 1)
|
|
429
|
+
])) : (o(), r("div", fe, [
|
|
430
|
+
(o(!0), r(f, null, g(l.filteredVessels, (i) => (o(), 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: (c) => l.handleVesselClick(i)
|
|
440
437
|
}, [
|
|
441
|
-
t("div",
|
|
438
|
+
t("div", be, [
|
|
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", ye, [
|
|
443
|
+
t("div", we, [
|
|
444
|
+
t("h5", ke, a(i.name), 1),
|
|
448
445
|
t("span", {
|
|
449
|
-
class:
|
|
446
|
+
class: b(["vessel-status", l.statusClass(i.status)])
|
|
450
447
|
}, a(i.status), 3)
|
|
451
448
|
]),
|
|
452
|
-
t("div",
|
|
453
|
-
t("div",
|
|
449
|
+
t("div", Ce, [
|
|
450
|
+
t("div", _e, [
|
|
454
451
|
e[14] || (e[14] = t("small", { class: "text-muted" }, "Registration #:", -1)),
|
|
455
|
-
t("p",
|
|
452
|
+
t("p", De, a(i.registrationNumber), 1)
|
|
456
453
|
]),
|
|
457
|
-
i.date ? (o(),
|
|
458
|
-
i.status === "Active" ? (o(),
|
|
454
|
+
i.date ? (o(), r("div", xe, [
|
|
455
|
+
i.status === "Active" ? (o(), r(f, { key: 0 }, [
|
|
459
456
|
e[15] || (e[15] = t("small", { class: "text-muted" }, "Active Duration:", -1)),
|
|
460
|
-
t("p",
|
|
461
|
-
], 64)) : (o(),
|
|
457
|
+
t("p", Se, a(l.getDuration(i.date, i.registrationNumber)), 1)
|
|
458
|
+
], 64)) : (o(), r(f, { key: 1 }, [
|
|
462
459
|
e[16] || (e[16] = t("small", { class: "text-muted" }, "Inactive Duration:", -1)),
|
|
463
|
-
t("p",
|
|
460
|
+
t("p", Fe, a(l.getDuration(i.date, i.registrationNumber)), 1)
|
|
464
461
|
], 64))
|
|
465
|
-
])) : (o(),
|
|
462
|
+
])) : (o(), 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:
|
|
471
|
-
}, " Set Date ", 8,
|
|
467
|
+
onClick: _((c) => l.setVesselDate(i.registrationNumber), ["stop"])
|
|
468
|
+
}, " Set Date ", 8, Te)
|
|
472
469
|
]))
|
|
473
470
|
])
|
|
474
471
|
])
|
|
475
472
|
]),
|
|
476
|
-
t("div",
|
|
473
|
+
t("div", Ie, [
|
|
477
474
|
t("i", {
|
|
478
475
|
class: "bi bi-trash",
|
|
479
|
-
onClick:
|
|
480
|
-
}, null, 8,
|
|
476
|
+
onClick: _((c) => l.handleDeleteVessel(i), ["stop"])
|
|
477
|
+
}, null, 8, qe)
|
|
481
478
|
]),
|
|
482
479
|
t("button", {
|
|
483
480
|
class: "btn btn-primary",
|
|
484
|
-
onClick:
|
|
485
|
-
}, a(i.status === "Active" ? "Mark Inactive" : "Mark Active"), 9,
|
|
486
|
-
], 8,
|
|
481
|
+
onClick: _((c) => l.handleToggleStatus(i), ["stop"])
|
|
482
|
+
}, a(i.status === "Active" ? "Mark Inactive" : "Mark Active"), 9, Re)
|
|
483
|
+
], 8, ge)
|
|
487
484
|
]))), 128))
|
|
488
485
|
]))
|
|
489
486
|
], 64);
|
|
490
487
|
}
|
|
491
|
-
const
|
|
492
|
-
const
|
|
488
|
+
const Ne = /* @__PURE__ */ S(ee, [["render", Me]]);
|
|
489
|
+
const Ee = {
|
|
493
490
|
name: "DashHead",
|
|
494
491
|
props: {
|
|
495
492
|
name: {
|
|
@@ -514,29 +511,307 @@ const Ve = {
|
|
|
514
511
|
this.$emit("logged-in");
|
|
515
512
|
}
|
|
516
513
|
}
|
|
517
|
-
},
|
|
518
|
-
function Oe(s, e,
|
|
519
|
-
return o(),
|
|
520
|
-
t("h4",
|
|
521
|
-
t("div",
|
|
522
|
-
this.userProfile.role == "owner" ? (o(),
|
|
514
|
+
}, Ve = { class: "page-header d-flex justify-content-between align-items-center" }, Le = { style: { "margin-left": "20px" } }, $e = { class: "d-flex" };
|
|
515
|
+
function Oe(s, e, d, m, n, l) {
|
|
516
|
+
return o(), r("div", Ve, [
|
|
517
|
+
t("h4", Le, a(d.name), 1),
|
|
518
|
+
t("div", $e, [
|
|
519
|
+
this.userProfile.role == "owner" ? (o(), 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) => l.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
|
+
]))) : v("", !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) => l.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(Ee, [["render", Oe]]);
|
|
537
|
+
const je = {
|
|
538
|
+
name: "Reports",
|
|
539
|
+
data() {
|
|
540
|
+
return {
|
|
541
|
+
folders: [],
|
|
542
|
+
showNewFolderModal: !1,
|
|
543
|
+
newFolderName: "",
|
|
544
|
+
selectedFolder: null,
|
|
545
|
+
expandedFolders: [],
|
|
546
|
+
previewFolder: null
|
|
547
|
+
};
|
|
548
|
+
},
|
|
549
|
+
emits: [
|
|
550
|
+
"folder-created",
|
|
551
|
+
"files-added",
|
|
552
|
+
"file-removed",
|
|
553
|
+
"folder-deleted",
|
|
554
|
+
"data-updated"
|
|
555
|
+
],
|
|
556
|
+
methods: {
|
|
557
|
+
createFolder() {
|
|
558
|
+
if (!this.newFolderName.trim())
|
|
559
|
+
return;
|
|
560
|
+
const s = {
|
|
561
|
+
id: Date.now(),
|
|
562
|
+
name: this.newFolderName.trim(),
|
|
563
|
+
files: [],
|
|
564
|
+
createdAt: /* @__PURE__ */ new Date()
|
|
565
|
+
};
|
|
566
|
+
this.folders.push(s), this.$emit("folder-created", s), this.$emit("data-updated", { folders: this.folders, allFiles: this.getAllFilesData() }), this.newFolderName = "", this.showNewFolderModal = !1;
|
|
567
|
+
},
|
|
568
|
+
selectFolder(s) {
|
|
569
|
+
this.selectedFolder = s, this.$refs.fileInput.click();
|
|
570
|
+
},
|
|
571
|
+
handleFileSelection(s) {
|
|
572
|
+
const e = Array.from(s.target.files);
|
|
573
|
+
if (!this.selectedFolder || e.length === 0)
|
|
574
|
+
return;
|
|
575
|
+
const d = e.map((m) => ({
|
|
576
|
+
id: Date.now() + Math.random(),
|
|
577
|
+
name: m.name,
|
|
578
|
+
size: m.size,
|
|
579
|
+
type: m.type,
|
|
580
|
+
file: m,
|
|
581
|
+
addedAt: /* @__PURE__ */ new Date()
|
|
582
|
+
}));
|
|
583
|
+
this.selectedFolder.files.push(...d), this.$emit("files-added", {
|
|
584
|
+
folderId: this.selectedFolder.id,
|
|
585
|
+
files: d
|
|
586
|
+
}), this.$emit("data-updated", { folders: this.folders, allFiles: this.getAllFilesData() }), s.target.value = "", this.selectedFolder = null;
|
|
587
|
+
},
|
|
588
|
+
removeFile(s, e) {
|
|
589
|
+
const d = this.folders.find((m) => m.id === s);
|
|
590
|
+
if (d) {
|
|
591
|
+
const m = d.files.findIndex((n) => n.id === e);
|
|
592
|
+
if (m > -1) {
|
|
593
|
+
const n = d.files.splice(m, 1)[0];
|
|
594
|
+
this.$emit("file-removed", {
|
|
595
|
+
folderId: s,
|
|
596
|
+
file: n
|
|
597
|
+
}), this.$emit("data-updated", { folders: this.folders, allFiles: this.getAllFilesData() });
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
deleteFolder(s) {
|
|
602
|
+
if (confirm("Are you sure you want to delete this folder and all its files?")) {
|
|
603
|
+
const e = this.folders.findIndex((d) => d.id === s);
|
|
604
|
+
if (e > -1) {
|
|
605
|
+
const d = this.folders.splice(e, 1)[0];
|
|
606
|
+
this.$emit("folder-deleted", d), this.$emit("data-updated", { folders: this.folders, allFiles: this.getAllFilesData() });
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
},
|
|
610
|
+
formatFileSize(s) {
|
|
611
|
+
if (s === 0)
|
|
612
|
+
return "0 Bytes";
|
|
613
|
+
const e = 1024, d = ["Bytes", "KB", "MB", "GB"], m = Math.floor(Math.log(s) / Math.log(e));
|
|
614
|
+
return Math.round(s / Math.pow(e, m) * 100) / 100 + " " + d[m];
|
|
615
|
+
},
|
|
616
|
+
getAllFilesData() {
|
|
617
|
+
return this.folders.flatMap(
|
|
618
|
+
(s) => s.files.map((e) => ({
|
|
619
|
+
...e,
|
|
620
|
+
folderName: s.name,
|
|
621
|
+
folderId: s.id
|
|
622
|
+
}))
|
|
623
|
+
);
|
|
624
|
+
},
|
|
625
|
+
toggleFolder(s) {
|
|
626
|
+
const e = this.expandedFolders.indexOf(s);
|
|
627
|
+
e > -1 ? this.expandedFolders.splice(e, 1) : this.expandedFolders = [s];
|
|
628
|
+
},
|
|
629
|
+
closeAllFolders() {
|
|
630
|
+
this.expandedFolders = [];
|
|
631
|
+
},
|
|
632
|
+
getExpandedFolder() {
|
|
633
|
+
return this.expandedFolders.length > 0 ? this.folders.find((s) => s.id === this.expandedFolders[0]) || { files: [], name: "" } : { files: [], name: "" };
|
|
634
|
+
},
|
|
635
|
+
showPreview(s) {
|
|
636
|
+
this.previewFolder = s;
|
|
637
|
+
},
|
|
638
|
+
hidePreview() {
|
|
639
|
+
this.previewFolder = null;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
}, Be = { class: "reports-container" }, He = { class: "page-header d-flex justify-content-between align-items-center" }, Qe = { class: "d-flex" }, ze = {
|
|
643
|
+
key: 0,
|
|
644
|
+
class: "folders-section"
|
|
645
|
+
}, Je = ["onMouseenter"], We = ["onClick"], Ke = { class: "folder-name" }, Ge = { class: "text-muted" }, Ye = { class: "folder-actions-overlay" }, Xe = ["onClick"], Ze = ["onClick"], et = {
|
|
646
|
+
key: 1,
|
|
647
|
+
class: "empty-state text-center"
|
|
648
|
+
}, tt = { class: "expanded-header" }, st = {
|
|
649
|
+
key: 0,
|
|
650
|
+
class: "files-list"
|
|
651
|
+
}, it = { class: "file-info d-flex align-items-center" }, nt = { class: "text-muted ms-2" }, lt = ["onClick"], ot = {
|
|
652
|
+
key: 1,
|
|
653
|
+
class: "empty-folder-message"
|
|
654
|
+
}, rt = { class: "modal-dialog modal-dialog-centered" }, at = { class: "modal-content" }, dt = { class: "modal-header" }, ut = { class: "modal-body" }, ct = { class: "mb-3" }, mt = { class: "modal-footer" }, vt = ["disabled"];
|
|
655
|
+
function pt(s, e, d, m, n, l) {
|
|
656
|
+
return o(), r("div", Be, [
|
|
657
|
+
t("div", He, [
|
|
658
|
+
e[14] || (e[14] = t("h4", { style: { "margin-left": "20px" } }, "Reports", -1)),
|
|
659
|
+
t("div", Qe, [
|
|
660
|
+
t("button", {
|
|
661
|
+
class: "btn btn-primary",
|
|
662
|
+
onClick: e[0] || (e[0] = (i) => n.showNewFolderModal = !0)
|
|
663
|
+
}, e[13] || (e[13] = [
|
|
664
|
+
t("i", { class: "bi bi-folder-plus" }, null, -1),
|
|
665
|
+
w(" New Folder ", -1)
|
|
666
|
+
]))
|
|
667
|
+
])
|
|
668
|
+
]),
|
|
669
|
+
n.folders.length > 0 ? (o(), r("div", ze, [
|
|
670
|
+
(o(!0), r(f, null, g(n.folders, (i) => (o(), r("div", {
|
|
671
|
+
class: "folder-card",
|
|
672
|
+
key: i.id,
|
|
673
|
+
onMouseenter: (c) => l.showPreview(i.id),
|
|
674
|
+
onMouseleave: e[1] || (e[1] = (...c) => l.hidePreview && l.hidePreview(...c))
|
|
675
|
+
}, [
|
|
676
|
+
t("div", {
|
|
677
|
+
class: "folder-content",
|
|
678
|
+
onClick: (c) => l.toggleFolder(i.id)
|
|
679
|
+
}, [
|
|
680
|
+
e[15] || (e[15] = t("i", {
|
|
681
|
+
class: "bi bi-folder-fill text-warning",
|
|
682
|
+
style: { "font-size": "2.5rem" }
|
|
683
|
+
}, null, -1)),
|
|
684
|
+
t("div", Ke, a(i.name), 1),
|
|
685
|
+
t("small", Ge, a(i.files.length) + " file(s)", 1)
|
|
686
|
+
], 8, We),
|
|
687
|
+
t("div", Ye, [
|
|
688
|
+
t("button", {
|
|
689
|
+
class: "btn btn-sm btn-icon",
|
|
690
|
+
onClick: _((c) => l.selectFolder(i), ["stop"]),
|
|
691
|
+
title: "Add Files"
|
|
692
|
+
}, e[16] || (e[16] = [
|
|
693
|
+
t("i", { class: "bi bi-file-earmark-plus" }, null, -1)
|
|
694
|
+
]), 8, Xe),
|
|
695
|
+
t("button", {
|
|
696
|
+
class: "btn btn-sm btn-icon",
|
|
697
|
+
onClick: _((c) => l.deleteFolder(i.id), ["stop"]),
|
|
698
|
+
title: "Delete Folder"
|
|
699
|
+
}, e[17] || (e[17] = [
|
|
700
|
+
t("i", { class: "bi bi-trash" }, null, -1)
|
|
701
|
+
]), 8, Ze)
|
|
702
|
+
])
|
|
703
|
+
], 40, Je))), 128))
|
|
704
|
+
])) : (o(), r("div", et, e[18] || (e[18] = [
|
|
705
|
+
t("i", {
|
|
706
|
+
class: "bi bi-folder2-open",
|
|
707
|
+
style: { "font-size": "4rem", color: "#ccc" }
|
|
708
|
+
}, null, -1),
|
|
709
|
+
t("h5", { class: "mt-3 text-muted" }, "No folders yet", -1),
|
|
710
|
+
t("p", { class: "text-muted" }, "Create a folder to start organizing your reports", -1)
|
|
711
|
+
]))),
|
|
712
|
+
n.expandedFolders.length > 0 ? (o(), r("div", {
|
|
713
|
+
key: 2,
|
|
714
|
+
class: "folder-modal-overlay",
|
|
715
|
+
onClick: e[5] || (e[5] = (...i) => l.closeAllFolders && l.closeAllFolders(...i))
|
|
716
|
+
}, [
|
|
717
|
+
t("div", {
|
|
718
|
+
class: "folder-expanded",
|
|
719
|
+
onClick: e[4] || (e[4] = _(() => {
|
|
720
|
+
}, ["stop"]))
|
|
721
|
+
}, [
|
|
722
|
+
t("div", tt, [
|
|
723
|
+
t("strong", null, a(l.getExpandedFolder().name), 1),
|
|
724
|
+
t("button", {
|
|
725
|
+
class: "btn btn-sm btn-close-expanded",
|
|
726
|
+
onClick: e[2] || (e[2] = (...i) => l.closeAllFolders && l.closeAllFolders(...i))
|
|
727
|
+
}, e[19] || (e[19] = [
|
|
728
|
+
t("i", { class: "bi bi-x-lg" }, null, -1)
|
|
729
|
+
]))
|
|
730
|
+
]),
|
|
731
|
+
l.getExpandedFolder().files.length > 0 ? (o(), r("div", st, [
|
|
732
|
+
(o(!0), r(f, null, g(l.getExpandedFolder().files, (i) => (o(), r("div", {
|
|
733
|
+
class: "file-item d-flex justify-content-between align-items-center",
|
|
734
|
+
key: i.id
|
|
735
|
+
}, [
|
|
736
|
+
t("div", it, [
|
|
737
|
+
e[20] || (e[20] = t("i", { class: "bi bi-file-earmark-text me-2" }, null, -1)),
|
|
738
|
+
t("span", null, a(i.name), 1),
|
|
739
|
+
t("small", nt, "(" + a(l.formatFileSize(i.size)) + ")", 1)
|
|
740
|
+
]),
|
|
741
|
+
t("button", {
|
|
742
|
+
class: "btn btn-sm btn-outline-danger",
|
|
743
|
+
onClick: (c) => l.removeFile(l.getExpandedFolder().id, i.id)
|
|
744
|
+
}, e[21] || (e[21] = [
|
|
745
|
+
t("i", { class: "bi bi-x-circle" }, null, -1)
|
|
746
|
+
]), 8, lt)
|
|
747
|
+
]))), 128))
|
|
748
|
+
])) : (o(), r("div", ot, [
|
|
749
|
+
e[23] || (e[23] = t("i", { class: "bi bi-inbox" }, null, -1)),
|
|
750
|
+
e[24] || (e[24] = t("p", null, "No files in this folder", -1)),
|
|
751
|
+
t("button", {
|
|
752
|
+
class: "btn btn-sm btn-primary",
|
|
753
|
+
onClick: e[3] || (e[3] = (i) => l.selectFolder(l.getExpandedFolder()))
|
|
754
|
+
}, e[22] || (e[22] = [
|
|
755
|
+
t("i", { class: "bi bi-file-earmark-plus" }, null, -1),
|
|
756
|
+
w(" Add Files ", -1)
|
|
757
|
+
]))
|
|
758
|
+
]))
|
|
759
|
+
])
|
|
760
|
+
])) : v("", !0),
|
|
761
|
+
t("div", {
|
|
762
|
+
class: b(["modal", { show: n.showNewFolderModal }]),
|
|
763
|
+
onClick: e[11] || (e[11] = _((i) => n.showNewFolderModal = !1, ["self"]))
|
|
764
|
+
}, [
|
|
765
|
+
t("div", rt, [
|
|
766
|
+
t("div", at, [
|
|
767
|
+
t("div", dt, [
|
|
768
|
+
e[25] || (e[25] = t("h5", { class: "modal-title" }, "Create New Folder", -1)),
|
|
769
|
+
t("button", {
|
|
770
|
+
type: "button",
|
|
771
|
+
class: "btn-close",
|
|
772
|
+
onClick: e[6] || (e[6] = (i) => n.showNewFolderModal = !1)
|
|
773
|
+
})
|
|
774
|
+
]),
|
|
775
|
+
t("div", ut, [
|
|
776
|
+
t("div", ct, [
|
|
777
|
+
e[26] || (e[26] = t("label", { class: "form-label" }, "Folder Name", -1)),
|
|
778
|
+
h(t("input", {
|
|
779
|
+
type: "text",
|
|
780
|
+
class: "form-control",
|
|
781
|
+
"onUpdate:modelValue": e[7] || (e[7] = (i) => n.newFolderName = i),
|
|
782
|
+
onKeyup: e[8] || (e[8] = $((...i) => l.createFolder && l.createFolder(...i), ["enter"])),
|
|
783
|
+
placeholder: "Enter folder name"
|
|
784
|
+
}, null, 544), [
|
|
785
|
+
[k, n.newFolderName]
|
|
786
|
+
])
|
|
787
|
+
])
|
|
788
|
+
]),
|
|
789
|
+
t("div", mt, [
|
|
790
|
+
t("button", {
|
|
791
|
+
type: "button",
|
|
792
|
+
class: "btn btn-secondary",
|
|
793
|
+
onClick: e[9] || (e[9] = (i) => n.showNewFolderModal = !1)
|
|
794
|
+
}, "Cancel"),
|
|
795
|
+
t("button", {
|
|
796
|
+
type: "button",
|
|
797
|
+
class: "btn btn-primary",
|
|
798
|
+
onClick: e[10] || (e[10] = (...i) => l.createFolder && l.createFolder(...i)),
|
|
799
|
+
disabled: !n.newFolderName.trim()
|
|
800
|
+
}, " Create Folder ", 8, vt)
|
|
801
|
+
])
|
|
802
|
+
])
|
|
803
|
+
])
|
|
804
|
+
], 2),
|
|
805
|
+
t("input", {
|
|
806
|
+
ref: "fileInput",
|
|
807
|
+
type: "file",
|
|
808
|
+
multiple: "",
|
|
809
|
+
style: { display: "none" },
|
|
810
|
+
onChange: e[12] || (e[12] = (...i) => l.handleFileSelection && l.handleFileSelection(...i))
|
|
811
|
+
}, null, 544)
|
|
812
|
+
]);
|
|
813
|
+
}
|
|
814
|
+
const ht = /* @__PURE__ */ S(je, [["render", pt], ["__scopeId", "data-v-e9baa631"]]), ft = {
|
|
540
815
|
name: "OceanHelmMaintenance",
|
|
541
816
|
props: {
|
|
542
817
|
vesselInfo: {
|
|
@@ -642,7 +917,7 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
642
917
|
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
918
|
const e = this.searchQuery.toLowerCase();
|
|
644
919
|
s = s.filter(
|
|
645
|
-
(
|
|
920
|
+
(d) => d.component.toLowerCase().includes(e) || d.taskName.toLowerCase().includes(e) || d.assignedTo.toLowerCase().includes(e)
|
|
646
921
|
);
|
|
647
922
|
}
|
|
648
923
|
return s;
|
|
@@ -682,12 +957,12 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
682
957
|
message: "Enter the task details",
|
|
683
958
|
callback: (e) => {
|
|
684
959
|
if (e) {
|
|
685
|
-
const
|
|
960
|
+
const d = {
|
|
686
961
|
id: Date.now(),
|
|
687
962
|
text: e,
|
|
688
963
|
completed: !1
|
|
689
964
|
};
|
|
690
|
-
this.checklists.push(
|
|
965
|
+
this.checklists.push(d);
|
|
691
966
|
}
|
|
692
967
|
}
|
|
693
968
|
});
|
|
@@ -699,8 +974,8 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
699
974
|
this.isLoading = !0, this.$emit("generate-checklist", {
|
|
700
975
|
component: s,
|
|
701
976
|
callback: (e) => {
|
|
702
|
-
this.checklists = e.map((
|
|
703
|
-
...
|
|
977
|
+
this.checklists = e.map((d) => ({
|
|
978
|
+
...d,
|
|
704
979
|
completed: !1
|
|
705
980
|
})), this.isLoading = !1;
|
|
706
981
|
}
|
|
@@ -708,12 +983,12 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
708
983
|
},
|
|
709
984
|
showMaintenance(s) {
|
|
710
985
|
if (this.deepAccess()) {
|
|
711
|
-
const e = this.tasks.find((
|
|
986
|
+
const e = this.tasks.find((d) => d.component === s);
|
|
712
987
|
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
988
|
}
|
|
714
989
|
},
|
|
715
990
|
printMaintenance(s) {
|
|
716
|
-
const e = this.tasks.find((
|
|
991
|
+
const e = this.tasks.find((d) => d.component === s);
|
|
717
992
|
this.maintenanceTasks = [e], this.loadMaintenanceData(), this.showReport = !0, this.$nextTick(() => {
|
|
718
993
|
setTimeout(() => {
|
|
719
994
|
window.print(), this.showReport = !1;
|
|
@@ -761,31 +1036,31 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
761
1036
|
const s = this.form.lastPerformed ? new Date(this.form.lastPerformed) : null, e = this.form.recurrence;
|
|
762
1037
|
if (!s || !e)
|
|
763
1038
|
return;
|
|
764
|
-
let
|
|
1039
|
+
let d = new Date(s);
|
|
765
1040
|
switch (e) {
|
|
766
1041
|
case "daily":
|
|
767
|
-
|
|
1042
|
+
d.setDate(d.getDate() + 1);
|
|
768
1043
|
break;
|
|
769
1044
|
case "weekly":
|
|
770
|
-
|
|
1045
|
+
d.setDate(d.getDate() + 7);
|
|
771
1046
|
break;
|
|
772
1047
|
case "monthly":
|
|
773
|
-
|
|
1048
|
+
d.setMonth(d.getMonth() + 1);
|
|
774
1049
|
break;
|
|
775
1050
|
case "quarterly":
|
|
776
|
-
|
|
1051
|
+
d.setMonth(d.getMonth() + 3);
|
|
777
1052
|
break;
|
|
778
1053
|
case "semi-annual":
|
|
779
|
-
|
|
1054
|
+
d.setMonth(d.getMonth() + 6);
|
|
780
1055
|
break;
|
|
781
1056
|
case "annual":
|
|
782
|
-
|
|
1057
|
+
d.setFullYear(d.getFullYear() + 1);
|
|
783
1058
|
break;
|
|
784
1059
|
case "once":
|
|
785
1060
|
case "custom":
|
|
786
1061
|
return;
|
|
787
1062
|
}
|
|
788
|
-
this.form.nextDue =
|
|
1063
|
+
this.form.nextDue = d.toISOString().split("T")[0];
|
|
789
1064
|
},
|
|
790
1065
|
calculateRemainingDays() {
|
|
791
1066
|
if (!this.form.nextDue) {
|
|
@@ -794,8 +1069,8 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
794
1069
|
}
|
|
795
1070
|
const s = /* @__PURE__ */ new Date(), e = new Date(this.form.nextDue);
|
|
796
1071
|
s.setHours(0, 0, 0, 0), e.setHours(0, 0, 0, 0);
|
|
797
|
-
const
|
|
798
|
-
this.form.remainingDays = `${
|
|
1072
|
+
const d = e - s, m = Math.ceil(d / (1e3 * 60 * 60 * 24));
|
|
1073
|
+
this.form.remainingDays = `${m} Days`;
|
|
799
1074
|
},
|
|
800
1075
|
async saveSchedule() {
|
|
801
1076
|
if (this.isSaving = !0, !this.validateForm()) {
|
|
@@ -803,7 +1078,7 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
803
1078
|
return;
|
|
804
1079
|
}
|
|
805
1080
|
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((
|
|
1081
|
+
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
1082
|
this.$emit("show-message", {
|
|
808
1083
|
type: "error",
|
|
809
1084
|
title: "Duplicate Component",
|
|
@@ -814,8 +1089,8 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
814
1089
|
delete s.customComponent, this.$emit("save-schedule", {
|
|
815
1090
|
taskData: s,
|
|
816
1091
|
file: s.attachments.file,
|
|
817
|
-
callback: (
|
|
818
|
-
this.isSaving = !1,
|
|
1092
|
+
callback: (d) => {
|
|
1093
|
+
this.isSaving = !1, d && (this.loadChecklist(s.component), this.lastSection = "schedule", this.currentTask = s.component, this.resetForm(), this.activeSection = "maintenance");
|
|
819
1094
|
}
|
|
820
1095
|
});
|
|
821
1096
|
},
|
|
@@ -846,18 +1121,18 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
846
1121
|
s.completed = !s.completed;
|
|
847
1122
|
},
|
|
848
1123
|
async resetTasks() {
|
|
849
|
-
const e = this.checklists.every((
|
|
1124
|
+
const e = this.checklists.every((m) => m.completed) ? "Completed" : "Soon", d = {
|
|
850
1125
|
checklistProgress: [...this.checklists],
|
|
851
1126
|
status: e,
|
|
852
1127
|
component: this.currentTask,
|
|
853
1128
|
after: this.after
|
|
854
1129
|
};
|
|
855
1130
|
this.$emit("update-task", {
|
|
856
|
-
updateData:
|
|
1131
|
+
updateData: d,
|
|
857
1132
|
file: this.fileattachments.file,
|
|
858
1133
|
tasks: this.tasks,
|
|
859
|
-
callback: (
|
|
860
|
-
|
|
1134
|
+
callback: (m, n) => {
|
|
1135
|
+
m && (n && (this.after = n), this.fileattachments = {}, this.fileText = "Drag and drop files here or", this.refreshKey += 1, this.activeSection = "inventory");
|
|
861
1136
|
}
|
|
862
1137
|
});
|
|
863
1138
|
},
|
|
@@ -881,7 +1156,7 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
881
1156
|
getChecklistProgress(s) {
|
|
882
1157
|
if (!s.checklistProgress || s.checklistProgress.length === 0)
|
|
883
1158
|
return 0;
|
|
884
|
-
const e = s.checklistProgress.filter((
|
|
1159
|
+
const e = s.checklistProgress.filter((d) => d.completed).length;
|
|
885
1160
|
return Math.round(e / s.checklistProgress.length * 100);
|
|
886
1161
|
},
|
|
887
1162
|
getCompletedChecklistItems(s) {
|
|
@@ -903,124 +1178,124 @@ const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
|
903
1178
|
});
|
|
904
1179
|
}
|
|
905
1180
|
}
|
|
906
|
-
},
|
|
1181
|
+
}, gt = { key: 0 }, bt = ["onClick"], yt = { class: "content" }, wt = {
|
|
907
1182
|
key: 0,
|
|
908
1183
|
class: "loading-container"
|
|
909
|
-
},
|
|
1184
|
+
}, kt = { key: 1 }, Ct = { class: "container" }, _t = { class: "d-flex justify-content-between align-items-center" }, Dt = { class: "progress-container" }, xt = { class: "progress-info" }, St = { class: "progress-bar" }, Ft = { class: "checklist" }, At = ["onClick"], Pt = { key: 0 }, Tt = ["onClick"], It = ["onClick"], qt = { key: 0 }, Rt = { class: "checklist" }, Mt = { class: "checklist-item" }, Nt = { class: "attachment-area" }, Et = {
|
|
910
1185
|
key: 2,
|
|
911
1186
|
class: "status"
|
|
912
|
-
},
|
|
1187
|
+
}, Vt = { class: "form-group" }, Lt = { class: "form-group" }, $t = { class: "input-group" }, Ot = { class: "form-group" }, Ut = { class: "form-group" }, jt = { class: "input-group" }, Bt = { class: "form-group" }, Ht = { class: "form-group" }, Qt = { class: "input-group" }, zt = { class: "form-group" }, Jt = { class: "form-group" }, Wt = ["value"], Kt = { class: "input-group" }, Gt = { class: "form-group" }, Yt = { class: "input-group" }, Xt = { class: "form-group" }, Zt = { class: "form-group" }, es = { class: "form-group" }, ts = { class: "checkbox-group" }, ss = { class: "checkbox-item" }, is = { class: "checkbox-item" }, ns = { class: "input-group" }, ls = { class: "form-group" }, os = { class: "form-group" }, rs = { class: "form-group" }, as = { class: "attachment-area" }, ds = { class: "action-buttons" }, us = ["disabled"], cs = { class: "task-table-wrapper" }, ms = { class: "table-controls" }, vs = { class: "filters" }, ps = { class: "task-table" }, hs = ["onClick"], fs = ["onClick"], gs = { key: 0 }, bs = {
|
|
913
1188
|
class: "alert alert-primary",
|
|
914
1189
|
role: "alert"
|
|
915
|
-
},
|
|
1190
|
+
}, ys = { class: "mb-0" }, ws = {
|
|
916
1191
|
class: "report-container",
|
|
917
1192
|
ref: "reportContainer"
|
|
918
|
-
},
|
|
1193
|
+
}, ks = { class: "report-info" }, Cs = { class: "info-box" }, _s = { class: "info-box" }, Ds = { class: "info-box" }, xs = { class: "section" }, Ss = { class: "summary-grid" }, Fs = { class: "summary-card" }, As = { class: "summary-number" }, Ps = { class: "section" }, Ts = { class: "task-header" }, Is = { class: "task-title" }, qs = { class: "task-component" }, Rs = { class: "task-details" }, Ms = { class: "detail-item" }, Ns = { class: "detail-value" }, Es = { class: "detail-item" }, Vs = { class: "detail-value" }, Ls = { class: "detail-item" }, $s = { class: "detail-value" }, Os = { class: "detail-item" }, Us = { class: "detail-value" }, js = { class: "detail-item" }, Bs = { class: "detail-value" }, Hs = { class: "detail-item" }, Qs = { class: "detail-value" }, zs = {
|
|
919
1194
|
key: 0,
|
|
920
1195
|
style: { margin: "15px 0", padding: "10px", background: "white", "border-radius": "5px" }
|
|
921
|
-
},
|
|
1196
|
+
}, Js = { class: "detail-value" }, Ws = {
|
|
922
1197
|
key: 1,
|
|
923
1198
|
style: { margin: "15px 0", padding: "10px", background: "white", "border-radius": "5px" }
|
|
924
|
-
},
|
|
1199
|
+
}, Ks = { class: "detail-value" }, Gs = {
|
|
925
1200
|
key: 2,
|
|
926
1201
|
class: "checklist-progress"
|
|
927
|
-
},
|
|
928
|
-
function
|
|
929
|
-
return n.ready ? (o(),
|
|
1202
|
+
}, Ys = { class: "progress-bar" }, Xs = { style: { "font-size": "0.9em", color: "#666", "margin-top": "5px" } }, Zs = { class: "checklist-items" }, ei = { class: "checklist-icon" }, ti = { class: "section" }, si = { class: "info-box" }, ii = { class: "signature-section" }, ni = { class: "signature-box" }, li = { style: { "margin-top": "10px", color: "#666" } };
|
|
1203
|
+
function oi(s, e, d, m, n, l) {
|
|
1204
|
+
return n.ready ? (o(), r("div", gt, [
|
|
930
1205
|
t("div", null, [
|
|
931
|
-
|
|
932
|
-
(o(!0),
|
|
1206
|
+
h(t("nav", null, [
|
|
1207
|
+
(o(!0), r(f, null, g(n.sections, (i) => (o(), r("button", {
|
|
933
1208
|
key: i.id,
|
|
934
|
-
class:
|
|
935
|
-
onClick: (
|
|
936
|
-
}, a(i.icon) + " " + a(i.name), 11,
|
|
1209
|
+
class: b(["nav-btn", { active: n.activeSection === i.id }]),
|
|
1210
|
+
onClick: (c) => l.handleSectionClick(i)
|
|
1211
|
+
}, a(i.icon) + " " + a(i.name), 11, bt))), 128))
|
|
937
1212
|
], 512), [
|
|
938
|
-
[
|
|
1213
|
+
[F, !n.showReport]
|
|
939
1214
|
]),
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
class:
|
|
1215
|
+
h(t("div", yt, [
|
|
1216
|
+
h(t("section", {
|
|
1217
|
+
class: b(["form-section", { active: n.activeSection === "maintenance" }])
|
|
943
1218
|
}, [
|
|
944
1219
|
e[37] || (e[37] = t("h2", null, "🛠️ Maintenance Tasks", -1)),
|
|
945
|
-
n.isLoading ? (o(),
|
|
1220
|
+
n.isLoading ? (o(), r("div", wt, e[27] || (e[27] = [
|
|
946
1221
|
t("div", { class: "loading-spinner" }, null, -1),
|
|
947
1222
|
t("p", null, "Loading checklist...", -1)
|
|
948
|
-
]))) :
|
|
949
|
-
n.isLoading ?
|
|
950
|
-
t("div",
|
|
951
|
-
t("div",
|
|
1223
|
+
]))) : v("", !0),
|
|
1224
|
+
n.isLoading ? v("", !0) : (o(), r("form", kt, [
|
|
1225
|
+
t("div", Ct, [
|
|
1226
|
+
t("div", _t, [
|
|
952
1227
|
e[29] || (e[29] = t("h1", null, "Maintenance Checklist", -1)),
|
|
953
|
-
|
|
1228
|
+
l.showAddTaskButton ? (o(), r("button", {
|
|
954
1229
|
key: 0,
|
|
955
1230
|
class: "btn btn-outline-custom",
|
|
956
|
-
onClick: e[0] || (e[0] =
|
|
1231
|
+
onClick: e[0] || (e[0] = _((i) => l.addTask(), ["prevent"]))
|
|
957
1232
|
}, e[28] || (e[28] = [
|
|
958
|
-
|
|
1233
|
+
w(" Manually Add Task ", -1),
|
|
959
1234
|
t("i", { class: "fas fa-plus" }, null, -1)
|
|
960
|
-
]))) :
|
|
1235
|
+
]))) : v("", !0)
|
|
961
1236
|
]),
|
|
962
|
-
t("div",
|
|
963
|
-
t("div",
|
|
964
|
-
t("div",
|
|
1237
|
+
t("div", Dt, [
|
|
1238
|
+
t("div", xt, " Progress: " + a(l.progress) + "% (" + a(l.completedCount.length) + "/" + a(n.checklists.length) + ") ", 1),
|
|
1239
|
+
t("div", St, [
|
|
965
1240
|
t("div", {
|
|
966
1241
|
class: "progress-fill",
|
|
967
|
-
style: E({ width:
|
|
1242
|
+
style: E({ width: l.progress + "%" })
|
|
968
1243
|
}, null, 4)
|
|
969
1244
|
])
|
|
970
1245
|
]),
|
|
971
|
-
t("ul",
|
|
972
|
-
(o(!0),
|
|
1246
|
+
t("ul", Ft, [
|
|
1247
|
+
(o(!0), r(f, null, g(n.checklists, (i) => (o(), r("li", {
|
|
973
1248
|
key: i.id,
|
|
974
1249
|
class: "checklist-item"
|
|
975
1250
|
}, [
|
|
976
1251
|
t("div", {
|
|
977
|
-
class:
|
|
978
|
-
onClick: (
|
|
1252
|
+
class: b(["checkbox", { checked: i.completed }]),
|
|
1253
|
+
onClick: (c) => l.toggleTask(i)
|
|
979
1254
|
}, [
|
|
980
|
-
i.completed ? (o(),
|
|
981
|
-
], 10,
|
|
1255
|
+
i.completed ? (o(), r("span", Pt, "✓")) : v("", !0)
|
|
1256
|
+
], 10, At),
|
|
982
1257
|
t("span", {
|
|
983
|
-
class:
|
|
984
|
-
onClick: (
|
|
985
|
-
}, a(i.text), 11,
|
|
986
|
-
|
|
1258
|
+
class: b(["task-text", { completed: i.completed }]),
|
|
1259
|
+
onClick: (c) => l.toggleTask(i)
|
|
1260
|
+
}, a(i.text), 11, Tt),
|
|
1261
|
+
l.showAddTaskButton ? (o(), r("button", {
|
|
987
1262
|
key: 0,
|
|
988
1263
|
class: "delete-btn",
|
|
989
|
-
onClick: (
|
|
1264
|
+
onClick: (c) => l.deleteTask(i.id),
|
|
990
1265
|
title: "Delete task"
|
|
991
1266
|
}, e[30] || (e[30] = [
|
|
992
1267
|
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,
|
|
1268
|
+
]), 8, It)) : v("", !0)
|
|
994
1269
|
]))), 128))
|
|
995
1270
|
]),
|
|
996
|
-
n.after ? (o(),
|
|
1271
|
+
n.after ? (o(), r("div", qt, [
|
|
997
1272
|
e[33] || (e[33] = t("label", null, "Upload Image Evidence", -1)),
|
|
998
|
-
t("ul",
|
|
999
|
-
t("li",
|
|
1273
|
+
t("ul", Rt, [
|
|
1274
|
+
t("li", Mt, [
|
|
1000
1275
|
e[32] || (e[32] = t("span", { class: "task-text" }, " Image Evidence Already Uploaded ", -1)),
|
|
1001
1276
|
t("button", {
|
|
1002
1277
|
type: "button",
|
|
1003
1278
|
class: "delete-btn",
|
|
1004
|
-
onClick: e[1] || (e[1] = (i) =>
|
|
1279
|
+
onClick: e[1] || (e[1] = (i) => l.deleteEvidence()),
|
|
1005
1280
|
title: "Delete Image"
|
|
1006
1281
|
}, e[31] || (e[31] = [
|
|
1007
1282
|
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
1283
|
]))
|
|
1009
1284
|
])
|
|
1010
1285
|
])
|
|
1011
|
-
])) : (o(),
|
|
1286
|
+
])) : (o(), r("div", {
|
|
1012
1287
|
class: "form-group",
|
|
1013
1288
|
key: n.refreshKey || "default"
|
|
1014
1289
|
}, [
|
|
1015
1290
|
e[35] || (e[35] = t("label", null, "Upload Image Evidence", -1)),
|
|
1016
1291
|
e[36] || (e[36] = t("p", null, "You can only upload one image evidence here.", -1)),
|
|
1017
|
-
t("div",
|
|
1292
|
+
t("div", Nt, [
|
|
1018
1293
|
t("p", null, a(n.fileText), 1),
|
|
1019
1294
|
t("input", {
|
|
1020
1295
|
type: "file",
|
|
1021
1296
|
id: "evidence-files",
|
|
1022
1297
|
class: "file-input",
|
|
1023
|
-
onChange: e[2] || (e[2] = (...i) =>
|
|
1298
|
+
onChange: e[2] || (e[2] = (...i) => l.handleImg && l.handleImg(...i))
|
|
1024
1299
|
}, null, 32),
|
|
1025
1300
|
e[34] || (e[34] = t("label", {
|
|
1026
1301
|
for: "evidence-files",
|
|
@@ -1028,24 +1303,24 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1028
1303
|
}, "Browse Files", -1))
|
|
1029
1304
|
])
|
|
1030
1305
|
])),
|
|
1031
|
-
|
|
1306
|
+
l.completedCount === n.checklists.length ? (o(), r("div", Et, " All tasks completed! ✅ ")) : v("", !0),
|
|
1032
1307
|
t("button", {
|
|
1033
1308
|
class: "reset-button",
|
|
1034
|
-
onClick: e[3] || (e[3] =
|
|
1035
|
-
}, a(
|
|
1309
|
+
onClick: e[3] || (e[3] = _((...i) => l.resetTasks && l.resetTasks(...i), ["prevent"]))
|
|
1310
|
+
}, a(l.checklistButtonLabel), 1)
|
|
1036
1311
|
])
|
|
1037
1312
|
]))
|
|
1038
1313
|
], 2), [
|
|
1039
|
-
[
|
|
1314
|
+
[F, n.activeSection === "maintenance"]
|
|
1040
1315
|
]),
|
|
1041
|
-
|
|
1042
|
-
class:
|
|
1316
|
+
h(t("section", {
|
|
1317
|
+
class: b(["form-section", { active: n.activeSection === "schedule" }])
|
|
1043
1318
|
}, [
|
|
1044
1319
|
e[62] || (e[62] = t("h2", null, "📅 Maintenance Schedule", -1)),
|
|
1045
1320
|
t("form", null, [
|
|
1046
|
-
t("div",
|
|
1321
|
+
t("div", Vt, [
|
|
1047
1322
|
e[38] || (e[38] = t("label", { for: "task-name" }, "Task Name", -1)),
|
|
1048
|
-
|
|
1323
|
+
h(t("input", {
|
|
1049
1324
|
type: "text",
|
|
1050
1325
|
id: "task-name",
|
|
1051
1326
|
"onUpdate:modelValue": e[4] || (e[4] = (i) => n.form.taskName = i),
|
|
@@ -1054,9 +1329,9 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1054
1329
|
[k, n.form.taskName]
|
|
1055
1330
|
])
|
|
1056
1331
|
]),
|
|
1057
|
-
t("div",
|
|
1332
|
+
t("div", Lt, [
|
|
1058
1333
|
e[39] || (e[39] = t("label", { for: "task-description" }, "Description", -1)),
|
|
1059
|
-
|
|
1334
|
+
h(t("textarea", {
|
|
1060
1335
|
id: "task-description",
|
|
1061
1336
|
"onUpdate:modelValue": e[5] || (e[5] = (i) => n.form.description = i),
|
|
1062
1337
|
required: ""
|
|
@@ -1064,31 +1339,31 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1064
1339
|
[k, n.form.description]
|
|
1065
1340
|
])
|
|
1066
1341
|
]),
|
|
1067
|
-
t("div",
|
|
1068
|
-
t("div",
|
|
1342
|
+
t("div", $t, [
|
|
1343
|
+
t("div", Ot, [
|
|
1069
1344
|
e[41] || (e[41] = t("label", { for: "maintenance-type" }, "Maintenance Type", -1)),
|
|
1070
|
-
|
|
1345
|
+
h(t("select", {
|
|
1071
1346
|
id: "maintenance-type",
|
|
1072
1347
|
"onUpdate:modelValue": e[6] || (e[6] = (i) => n.form.maintenanceType = i),
|
|
1073
1348
|
required: ""
|
|
1074
1349
|
}, e[40] || (e[40] = [
|
|
1075
1350
|
x('<option value="">-- Select Type --</option><option value="preventive">Preventive</option><option value="corrective">Corrective</option><option value="predictive">Predictive</option><option value="condition">Condition-Based</option>', 5)
|
|
1076
1351
|
]), 512), [
|
|
1077
|
-
[
|
|
1352
|
+
[D, n.form.maintenanceType]
|
|
1078
1353
|
])
|
|
1079
1354
|
]),
|
|
1080
|
-
t("div",
|
|
1355
|
+
t("div", Ut, [
|
|
1081
1356
|
e[43] || (e[43] = t("label", { for: "component" }, "Component/System", -1)),
|
|
1082
|
-
|
|
1357
|
+
h(t("select", {
|
|
1083
1358
|
id: "component",
|
|
1084
1359
|
"onUpdate:modelValue": e[7] || (e[7] = (i) => n.form.component = i),
|
|
1085
1360
|
required: ""
|
|
1086
1361
|
}, e[42] || (e[42] = [
|
|
1087
1362
|
x('<option value="">-- Select Component --</option><option value="engine">Engine</option><option value="hull">Hull</option><option value="electronics">Electronics</option><option value="deck">Deck Machinery</option><option value="plumbing">Plumbing</option><option value="electrical">Electrical</option><option value="hvac">HVAC</option><option value="safety">Safety Systems</option><option value="Other">Other</option>', 10)
|
|
1088
1363
|
]), 512), [
|
|
1089
|
-
[
|
|
1364
|
+
[D, n.form.component]
|
|
1090
1365
|
]),
|
|
1091
|
-
n.form.component === "Other" ?
|
|
1366
|
+
n.form.component === "Other" ? h((o(), r("input", {
|
|
1092
1367
|
key: 0,
|
|
1093
1368
|
type: "text",
|
|
1094
1369
|
placeholder: "Enter custom component/system",
|
|
@@ -1096,13 +1371,13 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1096
1371
|
style: { "margin-top": "8px" }
|
|
1097
1372
|
}, null, 512)), [
|
|
1098
1373
|
[k, n.form.customComponent]
|
|
1099
|
-
]) :
|
|
1374
|
+
]) : v("", !0)
|
|
1100
1375
|
])
|
|
1101
1376
|
]),
|
|
1102
|
-
t("div",
|
|
1103
|
-
t("div",
|
|
1377
|
+
t("div", jt, [
|
|
1378
|
+
t("div", Bt, [
|
|
1104
1379
|
e[45] || (e[45] = t("label", { for: "priority" }, "Priority", -1)),
|
|
1105
|
-
|
|
1380
|
+
h(t("select", {
|
|
1106
1381
|
id: "priority",
|
|
1107
1382
|
"onUpdate:modelValue": e[9] || (e[9] = (i) => n.form.priority = i),
|
|
1108
1383
|
required: ""
|
|
@@ -1112,12 +1387,12 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1112
1387
|
t("option", { value: "high" }, "High", -1),
|
|
1113
1388
|
t("option", { value: "critical" }, "Critical", -1)
|
|
1114
1389
|
]), 512), [
|
|
1115
|
-
[
|
|
1390
|
+
[D, n.form.priority]
|
|
1116
1391
|
])
|
|
1117
1392
|
]),
|
|
1118
|
-
t("div",
|
|
1393
|
+
t("div", Ht, [
|
|
1119
1394
|
e[46] || (e[46] = t("label", { for: "status" }, "Status", -1)),
|
|
1120
|
-
|
|
1395
|
+
h(t("input", {
|
|
1121
1396
|
type: "text",
|
|
1122
1397
|
id: "status",
|
|
1123
1398
|
"onUpdate:modelValue": e[10] || (e[10] = (i) => n.form.status = i),
|
|
@@ -1127,10 +1402,10 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1127
1402
|
])
|
|
1128
1403
|
])
|
|
1129
1404
|
]),
|
|
1130
|
-
t("div",
|
|
1131
|
-
t("div",
|
|
1405
|
+
t("div", Qt, [
|
|
1406
|
+
t("div", zt, [
|
|
1132
1407
|
e[47] || (e[47] = t("label", { for: "estimated-hours" }, "Estimated Hours", -1)),
|
|
1133
|
-
|
|
1408
|
+
h(t("input", {
|
|
1134
1409
|
type: "number",
|
|
1135
1410
|
id: "estimated-hours",
|
|
1136
1411
|
"onUpdate:modelValue": e[11] || (e[11] = (i) => n.form.estimatedHours = i),
|
|
@@ -1141,39 +1416,39 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1141
1416
|
])
|
|
1142
1417
|
])
|
|
1143
1418
|
]),
|
|
1144
|
-
t("div",
|
|
1419
|
+
t("div", Jt, [
|
|
1145
1420
|
e[49] || (e[49] = t("label", { for: "assigned-to" }, "Assigned To", -1)),
|
|
1146
|
-
|
|
1421
|
+
h(t("select", {
|
|
1147
1422
|
id: "assigned-to",
|
|
1148
1423
|
"onUpdate:modelValue": e[12] || (e[12] = (i) => n.form.assignedTo = i)
|
|
1149
1424
|
}, [
|
|
1150
1425
|
e[48] || (e[48] = t("option", { value: "" }, "-- Select Personnel --", -1)),
|
|
1151
|
-
(o(!0),
|
|
1426
|
+
(o(!0), r(f, null, g(d.vesselCrew, (i) => (o(), r("option", {
|
|
1152
1427
|
key: i.id,
|
|
1153
1428
|
value: `${i.name} - ${i.role}`
|
|
1154
|
-
}, a(i.name) + " - " + a(i.role), 9,
|
|
1429
|
+
}, a(i.name) + " - " + a(i.role), 9, Wt))), 128))
|
|
1155
1430
|
], 512), [
|
|
1156
|
-
[
|
|
1431
|
+
[D, n.form.assignedTo]
|
|
1157
1432
|
])
|
|
1158
1433
|
]),
|
|
1159
|
-
t("div",
|
|
1160
|
-
t("div",
|
|
1434
|
+
t("div", Kt, [
|
|
1435
|
+
t("div", Gt, [
|
|
1161
1436
|
e[51] || (e[51] = t("label", { for: "recurrence-type" }, "Recurrence", -1)),
|
|
1162
|
-
|
|
1437
|
+
h(t("select", {
|
|
1163
1438
|
id: "recurrence-type",
|
|
1164
1439
|
"onUpdate:modelValue": e[13] || (e[13] = (i) => n.form.recurrence = i),
|
|
1165
1440
|
required: ""
|
|
1166
1441
|
}, e[50] || (e[50] = [
|
|
1167
1442
|
x('<option value="once">One-time</option><option value="daily">Daily</option><option value="weekly">Weekly</option><option value="monthly">Monthly</option><option value="quarterly">Quarterly</option><option value="semi-annual">Semi-annually</option><option value="annual">Annually</option><option value="custom">Custom Interval</option>', 8)
|
|
1168
1443
|
]), 512), [
|
|
1169
|
-
[
|
|
1444
|
+
[D, n.form.recurrence]
|
|
1170
1445
|
])
|
|
1171
1446
|
])
|
|
1172
1447
|
]),
|
|
1173
|
-
t("div",
|
|
1174
|
-
t("div",
|
|
1448
|
+
t("div", Yt, [
|
|
1449
|
+
t("div", Xt, [
|
|
1175
1450
|
e[52] || (e[52] = t("label", { for: "last-performed" }, "Last Performed Date", -1)),
|
|
1176
|
-
|
|
1451
|
+
h(t("input", {
|
|
1177
1452
|
type: "date",
|
|
1178
1453
|
id: "last-performed",
|
|
1179
1454
|
"onUpdate:modelValue": e[14] || (e[14] = (i) => n.form.lastPerformed = i)
|
|
@@ -1181,9 +1456,9 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1181
1456
|
[k, n.form.lastPerformed]
|
|
1182
1457
|
])
|
|
1183
1458
|
]),
|
|
1184
|
-
t("div",
|
|
1459
|
+
t("div", Zt, [
|
|
1185
1460
|
e[53] || (e[53] = t("label", { for: "next-due" }, "Due Date", -1)),
|
|
1186
|
-
|
|
1461
|
+
h(t("input", {
|
|
1187
1462
|
type: "date",
|
|
1188
1463
|
id: "next-due",
|
|
1189
1464
|
"onUpdate:modelValue": e[15] || (e[15] = (i) => n.form.nextDue = i),
|
|
@@ -1193,62 +1468,62 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1193
1468
|
])
|
|
1194
1469
|
])
|
|
1195
1470
|
]),
|
|
1196
|
-
t("div",
|
|
1471
|
+
t("div", es, [
|
|
1197
1472
|
e[56] || (e[56] = t("label", null, "Notifications", -1)),
|
|
1198
|
-
t("div",
|
|
1199
|
-
t("div",
|
|
1200
|
-
|
|
1473
|
+
t("div", ts, [
|
|
1474
|
+
t("div", ss, [
|
|
1475
|
+
h(t("input", {
|
|
1201
1476
|
type: "checkbox",
|
|
1202
1477
|
id: "notify-email",
|
|
1203
1478
|
"onUpdate:modelValue": e[16] || (e[16] = (i) => n.form.notifyEmail = i)
|
|
1204
1479
|
}, null, 512), [
|
|
1205
|
-
[
|
|
1480
|
+
[V, n.form.notifyEmail]
|
|
1206
1481
|
]),
|
|
1207
1482
|
e[54] || (e[54] = t("label", { for: "notify-email" }, "Email Notification", -1))
|
|
1208
1483
|
]),
|
|
1209
|
-
t("div",
|
|
1210
|
-
|
|
1484
|
+
t("div", is, [
|
|
1485
|
+
h(t("input", {
|
|
1211
1486
|
type: "checkbox",
|
|
1212
1487
|
id: "notify-sms",
|
|
1213
1488
|
"onUpdate:modelValue": e[17] || (e[17] = (i) => n.form.notifySms = i)
|
|
1214
1489
|
}, null, 512), [
|
|
1215
|
-
[
|
|
1490
|
+
[V, n.form.notifySms]
|
|
1216
1491
|
]),
|
|
1217
1492
|
e[55] || (e[55] = t("label", { for: "notify-sms" }, "SMS Notification", -1))
|
|
1218
1493
|
])
|
|
1219
1494
|
])
|
|
1220
1495
|
]),
|
|
1221
|
-
t("div",
|
|
1222
|
-
t("div",
|
|
1496
|
+
t("div", ns, [
|
|
1497
|
+
t("div", ls, [
|
|
1223
1498
|
e[58] || (e[58] = t("label", { for: "reminder-days" }, "Reminder (Days Before)", -1)),
|
|
1224
|
-
|
|
1499
|
+
h(t("select", {
|
|
1225
1500
|
id: "reminder-days",
|
|
1226
1501
|
"onUpdate:modelValue": e[18] || (e[18] = (i) => n.form.reminderDays = i)
|
|
1227
1502
|
}, e[57] || (e[57] = [
|
|
1228
1503
|
x('<option value="1">1 day</option><option value="3">3 days</option><option value="7">1 week</option><option value="14">2 weeks</option><option value="30">1 month</option>', 5)
|
|
1229
1504
|
]), 512), [
|
|
1230
|
-
[
|
|
1505
|
+
[D, n.form.reminderDays]
|
|
1231
1506
|
])
|
|
1232
1507
|
])
|
|
1233
1508
|
]),
|
|
1234
|
-
t("div",
|
|
1509
|
+
t("div", os, [
|
|
1235
1510
|
e[59] || (e[59] = t("label", { for: "schedule-notes" }, "Notes", -1)),
|
|
1236
|
-
|
|
1511
|
+
h(t("textarea", {
|
|
1237
1512
|
id: "schedule-notes",
|
|
1238
1513
|
"onUpdate:modelValue": e[19] || (e[19] = (i) => n.form.notes = i)
|
|
1239
1514
|
}, null, 512), [
|
|
1240
1515
|
[k, n.form.notes]
|
|
1241
1516
|
])
|
|
1242
1517
|
]),
|
|
1243
|
-
t("div",
|
|
1518
|
+
t("div", rs, [
|
|
1244
1519
|
e[61] || (e[61] = t("label", null, "Attachments", -1)),
|
|
1245
|
-
t("div",
|
|
1520
|
+
t("div", as, [
|
|
1246
1521
|
t("p", null, a(n.imgText), 1),
|
|
1247
1522
|
t("input", {
|
|
1248
1523
|
type: "file",
|
|
1249
1524
|
id: "maintenance-files",
|
|
1250
1525
|
class: "file-input",
|
|
1251
|
-
onChange: e[20] || (e[20] = (...i) =>
|
|
1526
|
+
onChange: e[20] || (e[20] = (...i) => l.handleFiles && l.handleFiles(...i)),
|
|
1252
1527
|
multiple: ""
|
|
1253
1528
|
}, null, 32),
|
|
1254
1529
|
e[60] || (e[60] = t("label", {
|
|
@@ -1257,38 +1532,38 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1257
1532
|
}, "Browse Files", -1))
|
|
1258
1533
|
])
|
|
1259
1534
|
]),
|
|
1260
|
-
t("div",
|
|
1535
|
+
t("div", ds, [
|
|
1261
1536
|
t("button", {
|
|
1262
1537
|
type: "button",
|
|
1263
1538
|
class: "btn btn-primary",
|
|
1264
|
-
onClick: e[21] || (e[21] =
|
|
1539
|
+
onClick: e[21] || (e[21] = _((...i) => l.saveSchedule && l.saveSchedule(...i), ["prevent"])),
|
|
1265
1540
|
disabled: n.isSaving
|
|
1266
|
-
}, a(n.isSaving ? "Saving..." : "Save Schedule"), 9,
|
|
1541
|
+
}, a(n.isSaving ? "Saving..." : "Save Schedule"), 9, us)
|
|
1267
1542
|
])
|
|
1268
1543
|
])
|
|
1269
1544
|
], 2), [
|
|
1270
|
-
[
|
|
1545
|
+
[F, n.activeSection === "schedule"]
|
|
1271
1546
|
]),
|
|
1272
|
-
|
|
1273
|
-
class:
|
|
1547
|
+
h(t("section", {
|
|
1548
|
+
class: b(["form-section", { active: n.activeSection === "inventory" }])
|
|
1274
1549
|
}, [
|
|
1275
1550
|
e[68] || (e[68] = t("h2", null, "All Maintenance", -1)),
|
|
1276
|
-
t("div",
|
|
1277
|
-
t("div",
|
|
1278
|
-
t("div",
|
|
1551
|
+
t("div", cs, [
|
|
1552
|
+
t("div", ms, [
|
|
1553
|
+
t("div", vs, [
|
|
1279
1554
|
t("button", {
|
|
1280
|
-
class:
|
|
1281
|
-
onClick: e[22] || (e[22] = (i) =>
|
|
1555
|
+
class: b({ active: n.activeFilter === "due" }),
|
|
1556
|
+
onClick: e[22] || (e[22] = (i) => l.setFilter("due"))
|
|
1282
1557
|
}, "Due", 2),
|
|
1283
1558
|
t("button", {
|
|
1284
|
-
class:
|
|
1285
|
-
onClick: e[23] || (e[23] = (i) =>
|
|
1559
|
+
class: b({ active: n.activeFilter === "all" }),
|
|
1560
|
+
onClick: e[23] || (e[23] = (i) => l.setFilter("all"))
|
|
1286
1561
|
}, "All", 2),
|
|
1287
1562
|
t("button", {
|
|
1288
|
-
class:
|
|
1289
|
-
onClick: e[24] || (e[24] = (i) =>
|
|
1563
|
+
class: b({ active: n.activeFilter === "completed" }),
|
|
1564
|
+
onClick: e[24] || (e[24] = (i) => l.setFilter("completed"))
|
|
1290
1565
|
}, "Completed", 2),
|
|
1291
|
-
|
|
1566
|
+
h(t("input", {
|
|
1292
1567
|
type: "text",
|
|
1293
1568
|
"onUpdate:modelValue": e[25] || (e[25] = (i) => n.searchQuery = i),
|
|
1294
1569
|
placeholder: "Search..."
|
|
@@ -1297,7 +1572,7 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1297
1572
|
])
|
|
1298
1573
|
])
|
|
1299
1574
|
]),
|
|
1300
|
-
t("table",
|
|
1575
|
+
t("table", ps, [
|
|
1301
1576
|
e[63] || (e[63] = t("thead", null, [
|
|
1302
1577
|
t("tr", null, [
|
|
1303
1578
|
t("th", null, "Equipment"),
|
|
@@ -1311,7 +1586,7 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1311
1586
|
])
|
|
1312
1587
|
], -1)),
|
|
1313
1588
|
t("tbody", null, [
|
|
1314
|
-
(o(!0),
|
|
1589
|
+
(o(!0), r(f, null, g(l.filteredTasks, (i) => (o(), r("tr", {
|
|
1315
1590
|
key: i.id
|
|
1316
1591
|
}, [
|
|
1317
1592
|
t("td", null, a(i.component), 1),
|
|
@@ -1322,59 +1597,59 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1322
1597
|
t("td", null, a(i.nextDue), 1),
|
|
1323
1598
|
t("td", null, [
|
|
1324
1599
|
t("span", {
|
|
1325
|
-
class:
|
|
1600
|
+
class: b(["status-badge", i.status.toLowerCase().replace(" ", "-")])
|
|
1326
1601
|
}, a(i.status), 3)
|
|
1327
1602
|
]),
|
|
1328
1603
|
t("td", null, [
|
|
1329
|
-
i.status === "Completed" ? (o(),
|
|
1604
|
+
i.status === "Completed" ? (o(), r("button", {
|
|
1330
1605
|
key: 0,
|
|
1331
|
-
onClick: (
|
|
1606
|
+
onClick: (c) => l.printMaintenance(i.component),
|
|
1332
1607
|
class: "status-action"
|
|
1333
|
-
}, "Print", 8,
|
|
1608
|
+
}, "Print", 8, hs)) : (o(), r("button", {
|
|
1334
1609
|
key: 1,
|
|
1335
|
-
onClick: (
|
|
1610
|
+
onClick: (c) => l.showMaintenance(i.component),
|
|
1336
1611
|
class: "status-action"
|
|
1337
|
-
}, "Start", 8,
|
|
1612
|
+
}, "Start", 8, fs))
|
|
1338
1613
|
])
|
|
1339
1614
|
]))), 128))
|
|
1340
1615
|
])
|
|
1341
1616
|
]),
|
|
1342
|
-
|
|
1343
|
-
t("div",
|
|
1617
|
+
d.tasks.length ? v("", !0) : (o(), r("div", gs, [
|
|
1618
|
+
t("div", bs, [
|
|
1344
1619
|
e[65] || (e[65] = t("h4", { class: "alert-heading" }, "Such Empty!!!", -1)),
|
|
1345
1620
|
e[66] || (e[66] = t("p", null, "You have no maintenance, because you have not scheduled any for this ship.", -1)),
|
|
1346
1621
|
e[67] || (e[67] = t("hr", null, null, -1)),
|
|
1347
|
-
t("p",
|
|
1348
|
-
e[64] || (e[64] =
|
|
1622
|
+
t("p", ys, [
|
|
1623
|
+
e[64] || (e[64] = w("Navigate to the schedule tab, to start scheduling. Or click on this button to ", -1)),
|
|
1349
1624
|
t("button", {
|
|
1350
1625
|
type: "button",
|
|
1351
1626
|
class: "btn btn-primary",
|
|
1352
|
-
onClick: e[26] || (e[26] = (i) =>
|
|
1627
|
+
onClick: e[26] || (e[26] = (i) => l.switchSchedule())
|
|
1353
1628
|
}, "Schedule")
|
|
1354
1629
|
])
|
|
1355
1630
|
])
|
|
1356
1631
|
]))
|
|
1357
1632
|
])
|
|
1358
1633
|
], 2), [
|
|
1359
|
-
[
|
|
1634
|
+
[F, n.activeSection === "inventory"]
|
|
1360
1635
|
])
|
|
1361
1636
|
], 512), [
|
|
1362
|
-
[
|
|
1637
|
+
[F, !n.showReport]
|
|
1363
1638
|
]),
|
|
1364
|
-
|
|
1639
|
+
h(t("div", ws, [
|
|
1365
1640
|
e[89] || (e[89] = t("div", { class: "header" }, [
|
|
1366
1641
|
t("div", { class: "report-title" }, "MAINTENANCE TASK REPORT")
|
|
1367
1642
|
], -1)),
|
|
1368
|
-
t("div",
|
|
1369
|
-
t("div",
|
|
1643
|
+
t("div", ks, [
|
|
1644
|
+
t("div", Cs, [
|
|
1370
1645
|
e[69] || (e[69] = t("div", { class: "info-label" }, "Report Generated:", -1)),
|
|
1371
1646
|
t("div", null, a(n.reportDate), 1)
|
|
1372
1647
|
]),
|
|
1373
|
-
t("div",
|
|
1648
|
+
t("div", _s, [
|
|
1374
1649
|
e[70] || (e[70] = t("div", { class: "info-label" }, "Report ID:", -1)),
|
|
1375
1650
|
t("div", null, a(n.reportId), 1)
|
|
1376
1651
|
]),
|
|
1377
|
-
t("div",
|
|
1652
|
+
t("div", Ds, [
|
|
1378
1653
|
e[71] || (e[71] = t("div", { class: "info-label" }, "Total Tasks:", -1)),
|
|
1379
1654
|
t("div", null, a(n.maintenanceTasks.length), 1)
|
|
1380
1655
|
]),
|
|
@@ -1383,121 +1658,121 @@ function Ts(s, e, u, b, n, r) {
|
|
|
1383
1658
|
t("div", null, "OceanHelm System")
|
|
1384
1659
|
], -1))
|
|
1385
1660
|
]),
|
|
1386
|
-
t("div",
|
|
1661
|
+
t("div", xs, [
|
|
1387
1662
|
e[75] || (e[75] = t("div", { class: "section-title" }, "📊 Task Summary", -1)),
|
|
1388
|
-
t("div",
|
|
1663
|
+
t("div", Ss, [
|
|
1389
1664
|
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",
|
|
1665
|
+
t("div", Fs, [
|
|
1666
|
+
t("div", As, a(l.totalEstimatedHours), 1),
|
|
1392
1667
|
e[73] || (e[73] = t("div", { class: "summary-label" }, "Total Hours", -1))
|
|
1393
1668
|
])
|
|
1394
1669
|
])
|
|
1395
1670
|
]),
|
|
1396
|
-
t("div",
|
|
1671
|
+
t("div", Ps, [
|
|
1397
1672
|
e[85] || (e[85] = t("div", { class: "section-title" }, "🔧 Maintenance Tasks", -1)),
|
|
1398
|
-
(o(!0),
|
|
1673
|
+
(o(!0), r(f, null, g(n.maintenanceTasks, (i) => (o(), r("div", {
|
|
1399
1674
|
key: i.taskName,
|
|
1400
|
-
class:
|
|
1675
|
+
class: b(["task-item", l.getTaskStatusClass(i)])
|
|
1401
1676
|
}, [
|
|
1402
|
-
t("div",
|
|
1677
|
+
t("div", Ts, [
|
|
1403
1678
|
t("div", null, [
|
|
1404
|
-
t("div",
|
|
1405
|
-
|
|
1679
|
+
t("div", Is, [
|
|
1680
|
+
w(a(i.taskName) + " ", 1),
|
|
1406
1681
|
t("span", {
|
|
1407
|
-
class:
|
|
1682
|
+
class: b(["maintenance-type", "type-" + i.maintenanceType])
|
|
1408
1683
|
}, a(i.maintenanceType), 3)
|
|
1409
1684
|
]),
|
|
1410
|
-
t("div",
|
|
1685
|
+
t("div", qs, "Component: " + a(i.component), 1)
|
|
1411
1686
|
]),
|
|
1412
1687
|
t("span", {
|
|
1413
|
-
class:
|
|
1688
|
+
class: b(["status-badge", "status-" + i.status.toLowerCase().replace(" ", "-")])
|
|
1414
1689
|
}, a(i.status), 3)
|
|
1415
1690
|
]),
|
|
1416
|
-
t("div",
|
|
1417
|
-
t("div",
|
|
1691
|
+
t("div", Rs, [
|
|
1692
|
+
t("div", Ms, [
|
|
1418
1693
|
e[76] || (e[76] = t("div", { class: "detail-label" }, "Assigned To", -1)),
|
|
1419
|
-
t("div",
|
|
1694
|
+
t("div", Ns, a(i.assignedTo), 1)
|
|
1420
1695
|
]),
|
|
1421
|
-
t("div",
|
|
1696
|
+
t("div", Es, [
|
|
1422
1697
|
e[77] || (e[77] = t("div", { class: "detail-label" }, "Estimated Hours", -1)),
|
|
1423
|
-
t("div",
|
|
1698
|
+
t("div", Vs, a(i.estimatedHours) + " hours", 1)
|
|
1424
1699
|
]),
|
|
1425
|
-
t("div",
|
|
1700
|
+
t("div", Ls, [
|
|
1426
1701
|
e[78] || (e[78] = t("div", { class: "detail-label" }, "Last Performed", -1)),
|
|
1427
|
-
t("div",
|
|
1702
|
+
t("div", $s, a(l.formatDate(i.lastPerformed)), 1)
|
|
1428
1703
|
]),
|
|
1429
|
-
t("div",
|
|
1704
|
+
t("div", Os, [
|
|
1430
1705
|
e[79] || (e[79] = t("div", { class: "detail-label" }, "Next Due", -1)),
|
|
1431
|
-
t("div",
|
|
1706
|
+
t("div", Us, a(l.formatDate(i.nextDue)), 1)
|
|
1432
1707
|
]),
|
|
1433
|
-
t("div",
|
|
1708
|
+
t("div", js, [
|
|
1434
1709
|
e[80] || (e[80] = t("div", { class: "detail-label" }, "Recurrence", -1)),
|
|
1435
|
-
t("div",
|
|
1710
|
+
t("div", Bs, a(i.recurrence), 1)
|
|
1436
1711
|
]),
|
|
1437
|
-
t("div",
|
|
1712
|
+
t("div", Hs, [
|
|
1438
1713
|
e[81] || (e[81] = t("div", { class: "detail-label" }, "Remaining Days", -1)),
|
|
1439
|
-
t("div",
|
|
1714
|
+
t("div", Qs, a(i.remainingDays) + " days", 1)
|
|
1440
1715
|
])
|
|
1441
1716
|
]),
|
|
1442
|
-
i.description ? (o(),
|
|
1717
|
+
i.description ? (o(), r("div", zs, [
|
|
1443
1718
|
e[82] || (e[82] = t("div", { class: "detail-label" }, "Description", -1)),
|
|
1444
|
-
t("div",
|
|
1445
|
-
])) :
|
|
1446
|
-
i.notes ? (o(),
|
|
1719
|
+
t("div", Js, a(i.description), 1)
|
|
1720
|
+
])) : v("", !0),
|
|
1721
|
+
i.notes ? (o(), r("div", Ws, [
|
|
1447
1722
|
e[83] || (e[83] = t("div", { class: "detail-label" }, "Notes", -1)),
|
|
1448
|
-
t("div",
|
|
1449
|
-
])) :
|
|
1450
|
-
i.checklistProgress && i.checklistProgress.length > 0 ? (o(),
|
|
1723
|
+
t("div", Ks, a(i.notes), 1)
|
|
1724
|
+
])) : v("", !0),
|
|
1725
|
+
i.checklistProgress && i.checklistProgress.length > 0 ? (o(), r("div", Gs, [
|
|
1451
1726
|
e[84] || (e[84] = t("div", { class: "detail-label" }, "Checklist Progress", -1)),
|
|
1452
|
-
t("div",
|
|
1727
|
+
t("div", Ys, [
|
|
1453
1728
|
t("div", {
|
|
1454
1729
|
class: "progress-fill",
|
|
1455
|
-
style: E({ width:
|
|
1730
|
+
style: E({ width: l.getChecklistProgress(i) + "%" })
|
|
1456
1731
|
}, null, 4)
|
|
1457
1732
|
]),
|
|
1458
|
-
t("div",
|
|
1459
|
-
t("div",
|
|
1460
|
-
(o(!0),
|
|
1733
|
+
t("div", Xs, a(l.getCompletedChecklistItems(i)) + " of " + a(i.checklistProgress.length) + " items completed (" + a(l.getChecklistProgress(i)) + "%) ", 1),
|
|
1734
|
+
t("div", Zs, [
|
|
1735
|
+
(o(!0), r(f, null, g(i.checklistProgress, (c, y) => (o(), r("div", {
|
|
1461
1736
|
key: y,
|
|
1462
1737
|
class: "checklist-item"
|
|
1463
1738
|
}, [
|
|
1464
|
-
t("span",
|
|
1465
|
-
t("span", null, a(
|
|
1739
|
+
t("span", ei, a(c.completed ? "✅" : "⭕"), 1),
|
|
1740
|
+
t("span", null, a(c.text || "Checklist Item " + (y + 1)), 1)
|
|
1466
1741
|
]))), 128))
|
|
1467
1742
|
])
|
|
1468
|
-
])) :
|
|
1743
|
+
])) : v("", !0)
|
|
1469
1744
|
], 2))), 128))
|
|
1470
1745
|
]),
|
|
1471
|
-
t("div",
|
|
1746
|
+
t("div", ti, [
|
|
1472
1747
|
e[86] || (e[86] = t("div", { class: "section-title" }, "📋 Recommendations", -1)),
|
|
1473
|
-
t("div",
|
|
1748
|
+
t("div", si, [
|
|
1474
1749
|
t("ul", null, [
|
|
1475
|
-
(o(!0),
|
|
1750
|
+
(o(!0), r(f, null, g(l.generateRecommendations(), (i) => (o(), r("li", { key: i }, a(i), 1))), 128))
|
|
1476
1751
|
])
|
|
1477
1752
|
])
|
|
1478
1753
|
]),
|
|
1479
|
-
t("div",
|
|
1754
|
+
t("div", ii, [
|
|
1480
1755
|
e[88] || (e[88] = t("div", { class: "signature-box" }, [
|
|
1481
1756
|
t("div", null, [
|
|
1482
1757
|
t("strong", null, "Report Generated By")
|
|
1483
1758
|
]),
|
|
1484
1759
|
t("div", { style: { "margin-top": "10px", color: "#666" } }, "OceanHelm Maintenance System")
|
|
1485
1760
|
], -1)),
|
|
1486
|
-
t("div",
|
|
1761
|
+
t("div", ni, [
|
|
1487
1762
|
e[87] || (e[87] = t("div", null, [
|
|
1488
1763
|
t("strong", null, "Date")
|
|
1489
1764
|
], -1)),
|
|
1490
|
-
t("div",
|
|
1765
|
+
t("div", li, a(n.reportDate), 1)
|
|
1491
1766
|
])
|
|
1492
1767
|
])
|
|
1493
1768
|
], 512), [
|
|
1494
|
-
[
|
|
1769
|
+
[F, n.showReport]
|
|
1495
1770
|
])
|
|
1496
1771
|
])
|
|
1497
|
-
])) :
|
|
1772
|
+
])) : v("", !0);
|
|
1498
1773
|
}
|
|
1499
|
-
const
|
|
1500
|
-
const
|
|
1774
|
+
const ri = /* @__PURE__ */ S(ft, [["render", oi]]);
|
|
1775
|
+
const ai = {
|
|
1501
1776
|
name: "ActivityLogs",
|
|
1502
1777
|
props: {
|
|
1503
1778
|
loading: Boolean,
|
|
@@ -1527,31 +1802,31 @@ const Rs = {
|
|
|
1527
1802
|
}[s] || "badge-view";
|
|
1528
1803
|
}
|
|
1529
1804
|
}
|
|
1530
|
-
},
|
|
1805
|
+
}, di = { class: "activity-logs" }, ui = { class: "a-controls" }, ci = { class: "a-search-box" }, mi = ["value"], vi = ["value"], pi = { class: "stats-grid" }, hi = { class: "stat-card" }, fi = { class: "value" }, gi = { class: "stat-card" }, bi = { class: "value" }, yi = { class: "stat-card" }, wi = { class: "value" }, ki = { class: "logs-container" }, Ci = {
|
|
1531
1806
|
key: 0,
|
|
1532
1807
|
class: "loading"
|
|
1533
|
-
},
|
|
1808
|
+
}, _i = {
|
|
1534
1809
|
key: 1,
|
|
1535
1810
|
class: "no-logs"
|
|
1536
|
-
},
|
|
1537
|
-
function
|
|
1538
|
-
return o(),
|
|
1539
|
-
t("div",
|
|
1540
|
-
t("div",
|
|
1811
|
+
}, Di = { key: 2 }, xi = { class: "logs-table" }, Si = { style: { color: "gray" } }, Fi = { style: { color: "gray" } }, Ai = { class: "pagination" }, Pi = ["disabled"], Ti = ["onClick"], Ii = ["disabled"];
|
|
1812
|
+
function qi(s, e, d, m, n, l) {
|
|
1813
|
+
return o(), r("div", di, [
|
|
1814
|
+
t("div", ui, [
|
|
1815
|
+
t("div", ci, [
|
|
1541
1816
|
t("input", {
|
|
1542
1817
|
type: "text",
|
|
1543
1818
|
placeholder: "Search activities, users, or actions...",
|
|
1544
|
-
value:
|
|
1819
|
+
value: d.searchTerm,
|
|
1545
1820
|
onInput: e[0] || (e[0] = (i) => s.$emit("update:searchTerm", i.target.value))
|
|
1546
|
-
}, null, 40,
|
|
1821
|
+
}, null, 40, mi)
|
|
1547
1822
|
]),
|
|
1548
1823
|
t("select", {
|
|
1549
1824
|
class: "filter-select",
|
|
1550
|
-
value:
|
|
1825
|
+
value: d.selectedFilter,
|
|
1551
1826
|
onChange: e[1] || (e[1] = (i) => s.$emit("update:selectedFilter", i.target.value))
|
|
1552
1827
|
}, e[6] || (e[6] = [
|
|
1553
1828
|
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,
|
|
1829
|
+
]), 40, vi),
|
|
1555
1830
|
t("button", {
|
|
1556
1831
|
class: "btn btn-primary",
|
|
1557
1832
|
onClick: e[2] || (e[2] = (i) => s.$emit("refresh"))
|
|
@@ -1561,33 +1836,33 @@ function si(s, e, u, b, n, r) {
|
|
|
1561
1836
|
onClick: e[3] || (e[3] = (i) => s.$emit("download"))
|
|
1562
1837
|
}, "📥 Download Report")
|
|
1563
1838
|
]),
|
|
1564
|
-
t("div",
|
|
1565
|
-
t("div",
|
|
1839
|
+
t("div", pi, [
|
|
1840
|
+
t("div", hi, [
|
|
1566
1841
|
e[7] || (e[7] = t("h3", null, "Total Activities", -1)),
|
|
1567
|
-
t("div",
|
|
1842
|
+
t("div", fi, a(d.totalActivities), 1)
|
|
1568
1843
|
]),
|
|
1569
|
-
t("div",
|
|
1844
|
+
t("div", gi, [
|
|
1570
1845
|
e[8] || (e[8] = t("h3", null, "Today's Activities", -1)),
|
|
1571
|
-
t("div",
|
|
1846
|
+
t("div", bi, a(d.todayActivities), 1)
|
|
1572
1847
|
]),
|
|
1573
|
-
t("div",
|
|
1848
|
+
t("div", yi, [
|
|
1574
1849
|
e[9] || (e[9] = t("h3", null, "Active Users", -1)),
|
|
1575
|
-
t("div",
|
|
1850
|
+
t("div", wi, a(d.activeUsers), 1)
|
|
1576
1851
|
]),
|
|
1577
1852
|
e[10] || (e[10] = t("div", { class: "stat-card" }, [
|
|
1578
1853
|
t("h3", null, "Important"),
|
|
1579
1854
|
t("div", { class: "badge-danger" }, " Logs are deleted at the end of every month, please download a copy ")
|
|
1580
1855
|
], -1))
|
|
1581
1856
|
]),
|
|
1582
|
-
t("div",
|
|
1583
|
-
|
|
1857
|
+
t("div", ki, [
|
|
1858
|
+
d.loading ? (o(), r("div", Ci, e[11] || (e[11] = [
|
|
1584
1859
|
t("div", { class: "spinner" }, null, -1),
|
|
1585
1860
|
t("p", null, "Loading activity logs...", -1)
|
|
1586
|
-
]))) :
|
|
1861
|
+
]))) : d.logs.length === 0 ? (o(), r("div", _i, e[12] || (e[12] = [
|
|
1587
1862
|
t("h3", null, "No activities found", -1),
|
|
1588
1863
|
t("p", null, "Try adjusting your search or filter criteria", -1)
|
|
1589
|
-
]))) : (o(),
|
|
1590
|
-
t("table",
|
|
1864
|
+
]))) : (o(), r("div", Di, [
|
|
1865
|
+
t("table", xi, [
|
|
1591
1866
|
e[13] || (e[13] = t("thead", null, [
|
|
1592
1867
|
t("tr", null, [
|
|
1593
1868
|
t("th", null, "Timestamp"),
|
|
@@ -1598,54 +1873,53 @@ function si(s, e, u, b, n, r) {
|
|
|
1598
1873
|
])
|
|
1599
1874
|
], -1)),
|
|
1600
1875
|
t("tbody", null, [
|
|
1601
|
-
(o(!0),
|
|
1876
|
+
(o(!0), r(f, null, g(d.paginatedLogs, (i) => (o(), r("tr", {
|
|
1602
1877
|
key: i.id
|
|
1603
1878
|
}, [
|
|
1604
|
-
t("td", null, a(
|
|
1879
|
+
t("td", null, a(l.formatDate(i.timestamp)), 1),
|
|
1605
1880
|
t("td", null, [
|
|
1606
1881
|
t("div", null, a(i.user_name), 1),
|
|
1607
|
-
t("small",
|
|
1882
|
+
t("small", Si, a(i.email), 1)
|
|
1608
1883
|
]),
|
|
1609
1884
|
t("td", null, [
|
|
1610
1885
|
t("span", {
|
|
1611
|
-
class:
|
|
1886
|
+
class: b(["activity-badge", l.getBadgeClass(i.action)])
|
|
1612
1887
|
}, a(i.action), 3)
|
|
1613
1888
|
]),
|
|
1614
1889
|
t("td", null, [
|
|
1615
|
-
|
|
1616
|
-
(o(!0),
|
|
1890
|
+
w(a(i.details.status) + " ", 1),
|
|
1891
|
+
(o(!0), r(f, null, g(i.details.information, (c, y) => (o(), r("div", { key: y }, [
|
|
1617
1892
|
t("strong", null, a(y) + ": ", 1),
|
|
1618
|
-
t("small",
|
|
1893
|
+
t("small", Fi, a(c.from || "") + " → " + a(c.to || c), 1)
|
|
1619
1894
|
]))), 128))
|
|
1620
1895
|
]),
|
|
1621
1896
|
t("td", null, a(i.table_name), 1)
|
|
1622
1897
|
]))), 128))
|
|
1623
1898
|
])
|
|
1624
1899
|
]),
|
|
1625
|
-
t("div",
|
|
1900
|
+
t("div", Ai, [
|
|
1626
1901
|
t("button", {
|
|
1627
|
-
onClick: e[4] || (e[4] = (i) => s.$emit("change-page",
|
|
1628
|
-
disabled:
|
|
1629
|
-
}, " Previous ", 8,
|
|
1630
|
-
(o(!0),
|
|
1902
|
+
onClick: e[4] || (e[4] = (i) => s.$emit("change-page", d.currentPage - 1)),
|
|
1903
|
+
disabled: d.currentPage === 1
|
|
1904
|
+
}, " Previous ", 8, Pi),
|
|
1905
|
+
(o(!0), r(f, null, g(d.totalPages, (i) => (o(), r("button", {
|
|
1631
1906
|
key: i,
|
|
1632
|
-
onClick: (
|
|
1633
|
-
class:
|
|
1634
|
-
}, a(i), 11,
|
|
1907
|
+
onClick: (c) => s.$emit("change-page", i),
|
|
1908
|
+
class: b({ active: d.currentPage === i })
|
|
1909
|
+
}, a(i), 11, Ti))), 128)),
|
|
1635
1910
|
t("button", {
|
|
1636
|
-
onClick: e[5] || (e[5] = (i) => s.$emit("change-page",
|
|
1637
|
-
disabled:
|
|
1638
|
-
}, " Next ", 8,
|
|
1911
|
+
onClick: e[5] || (e[5] = (i) => s.$emit("change-page", d.currentPage + 1)),
|
|
1912
|
+
disabled: d.currentPage === d.totalPages
|
|
1913
|
+
}, " Next ", 8, Ii)
|
|
1639
1914
|
])
|
|
1640
1915
|
]))
|
|
1641
1916
|
])
|
|
1642
1917
|
]);
|
|
1643
1918
|
}
|
|
1644
|
-
const
|
|
1645
|
-
const
|
|
1919
|
+
const Ri = /* @__PURE__ */ S(ai, [["render", qi]]);
|
|
1920
|
+
const Mi = {
|
|
1646
1921
|
name: "CrewManagement",
|
|
1647
1922
|
props: {
|
|
1648
|
-
// Required props
|
|
1649
1923
|
crew: {
|
|
1650
1924
|
type: Array,
|
|
1651
1925
|
required: !0,
|
|
@@ -1659,7 +1933,6 @@ const ni = {
|
|
|
1659
1933
|
type: Object,
|
|
1660
1934
|
default: () => ({ role: "viewer" })
|
|
1661
1935
|
},
|
|
1662
|
-
// Optional props
|
|
1663
1936
|
loading: {
|
|
1664
1937
|
type: Boolean,
|
|
1665
1938
|
default: !1
|
|
@@ -1668,7 +1941,6 @@ const ni = {
|
|
|
1668
1941
|
type: Array,
|
|
1669
1942
|
default: () => ["Captain", "First Officer", "Engineer", "Deckhand", "Mechanic", "Cook"]
|
|
1670
1943
|
},
|
|
1671
|
-
// Configuration props
|
|
1672
1944
|
config: {
|
|
1673
1945
|
type: Object,
|
|
1674
1946
|
default: () => ({
|
|
@@ -1686,11 +1958,14 @@ const ni = {
|
|
|
1686
1958
|
"crew-edit",
|
|
1687
1959
|
"crew-delete",
|
|
1688
1960
|
"crew-assign-shift",
|
|
1961
|
+
"crew-deboard",
|
|
1962
|
+
"crew-checkin",
|
|
1689
1963
|
"crew-add-certification",
|
|
1690
1964
|
"crew-view-certification",
|
|
1691
1965
|
"search-changed",
|
|
1692
1966
|
"filter-changed",
|
|
1693
|
-
"access-denied"
|
|
1967
|
+
"access-denied",
|
|
1968
|
+
"upload-cert-image"
|
|
1694
1969
|
],
|
|
1695
1970
|
data() {
|
|
1696
1971
|
return {
|
|
@@ -1698,13 +1973,26 @@ const ni = {
|
|
|
1698
1973
|
filterStatus: "all",
|
|
1699
1974
|
showAddForm: !1,
|
|
1700
1975
|
formErrors: {},
|
|
1976
|
+
expandedLogs: [],
|
|
1977
|
+
showTimesheet: !1,
|
|
1978
|
+
timesheetFilter: "all",
|
|
1979
|
+
timesheetSearch: "",
|
|
1980
|
+
timesheetSortKey: "timestamp",
|
|
1981
|
+
timesheetSortOrder: "desc",
|
|
1701
1982
|
newCrew: {
|
|
1702
1983
|
name: "",
|
|
1703
1984
|
role: "Deckhand",
|
|
1704
1985
|
customRole: "",
|
|
1705
1986
|
status: "available",
|
|
1706
1987
|
nextShift: "",
|
|
1707
|
-
certifications: [{
|
|
1988
|
+
certifications: [{
|
|
1989
|
+
name: "",
|
|
1990
|
+
expiryDate: "",
|
|
1991
|
+
imageFile: null,
|
|
1992
|
+
imagePreview: null,
|
|
1993
|
+
imageName: "",
|
|
1994
|
+
imageType: ""
|
|
1995
|
+
}],
|
|
1708
1996
|
notes: "",
|
|
1709
1997
|
email: "",
|
|
1710
1998
|
onBoard: ""
|
|
@@ -1717,10 +2005,46 @@ const ni = {
|
|
|
1717
2005
|
},
|
|
1718
2006
|
filteredCrew() {
|
|
1719
2007
|
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 &&
|
|
2008
|
+
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;
|
|
2009
|
+
return e && d;
|
|
1722
2010
|
});
|
|
1723
2011
|
},
|
|
2012
|
+
allTimesheetEntries() {
|
|
2013
|
+
const s = [];
|
|
2014
|
+
return this.crew.forEach((e) => {
|
|
2015
|
+
e.log && e.log.length > 0 && e.log.forEach((d, m) => {
|
|
2016
|
+
s.push({
|
|
2017
|
+
...d,
|
|
2018
|
+
crewName: e.name,
|
|
2019
|
+
role: e.role,
|
|
2020
|
+
crewId: e.id,
|
|
2021
|
+
uniqueId: `${e.id}-${m}`
|
|
2022
|
+
});
|
|
2023
|
+
});
|
|
2024
|
+
}), s.sort((e, d) => {
|
|
2025
|
+
const m = new Date(e.timestamp), n = new Date(d.timestamp);
|
|
2026
|
+
return this.timesheetSortOrder === "desc" ? n - m : m - n;
|
|
2027
|
+
});
|
|
2028
|
+
},
|
|
2029
|
+
filteredTimesheetEntries() {
|
|
2030
|
+
let s = this.allTimesheetEntries;
|
|
2031
|
+
if (this.timesheetFilter !== "all" && (s = s.filter((e) => e.action === this.timesheetFilter)), this.timesheetSearch) {
|
|
2032
|
+
const e = this.timesheetSearch.toLowerCase();
|
|
2033
|
+
s = s.filter(
|
|
2034
|
+
(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)
|
|
2035
|
+
);
|
|
2036
|
+
}
|
|
2037
|
+
return this.sortTimesheetEntries(s);
|
|
2038
|
+
},
|
|
2039
|
+
uniqueCrewCount() {
|
|
2040
|
+
return new Set(this.filteredTimesheetEntries.map((e) => e.crewId)).size;
|
|
2041
|
+
},
|
|
2042
|
+
timesheetDateRange() {
|
|
2043
|
+
if (this.filteredTimesheetEntries.length === 0)
|
|
2044
|
+
return "N/A";
|
|
2045
|
+
const s = this.filteredTimesheetEntries.map((n) => new Date(n.timestamp)), e = new Date(Math.min(...s)), d = new Date(Math.max(...s)), m = (n) => n.toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
|
|
2046
|
+
return `${m(e)} - ${m(d)}`;
|
|
2047
|
+
},
|
|
1724
2048
|
canAddCrew() {
|
|
1725
2049
|
return this.config.enableAdd && this.hasPermission("add");
|
|
1726
2050
|
},
|
|
@@ -1732,22 +2056,22 @@ const ni = {
|
|
|
1732
2056
|
},
|
|
1733
2057
|
canAssignShift() {
|
|
1734
2058
|
return this.config.enableAssignShift && this.hasPermission("assign");
|
|
2059
|
+
},
|
|
2060
|
+
canDeboardCrew() {
|
|
2061
|
+
return this.config.enableAssignShift && this.hasPermission("assign");
|
|
1735
2062
|
}
|
|
1736
2063
|
},
|
|
1737
2064
|
methods: {
|
|
1738
|
-
// Permission checking
|
|
1739
2065
|
hasPermission(s) {
|
|
1740
|
-
const { role: e, vessel:
|
|
1741
|
-
let
|
|
2066
|
+
const { role: e, vessel: d } = this.userProfile, m = d === this.vesselName;
|
|
2067
|
+
let l = {
|
|
1742
2068
|
owner: ["add", "edit", "delete", "assign", "view"],
|
|
1743
2069
|
staff: ["add", "edit", "assign", "view"],
|
|
1744
2070
|
captain: ["assign", "view"],
|
|
1745
|
-
// default for captain
|
|
1746
2071
|
viewer: ["view"]
|
|
1747
2072
|
}[e] || [];
|
|
1748
|
-
return e === "captain" &&
|
|
2073
|
+
return e === "captain" && m && (l = [...l, "add"]), l.includes(s);
|
|
1749
2074
|
},
|
|
1750
|
-
// Event handlers
|
|
1751
2075
|
handleToggleAddForm() {
|
|
1752
2076
|
if (!this.canAddCrew) {
|
|
1753
2077
|
this.$emit("access-denied", { action: "add crew", userProfile: this.userProfile });
|
|
@@ -1761,23 +2085,83 @@ const ni = {
|
|
|
1761
2085
|
handleFilter() {
|
|
1762
2086
|
this.$emit("filter-changed", this.filterStatus);
|
|
1763
2087
|
},
|
|
1764
|
-
|
|
2088
|
+
filterTimesheet() {
|
|
2089
|
+
},
|
|
2090
|
+
sortTimesheet(s) {
|
|
2091
|
+
this.timesheetSortKey === s ? this.timesheetSortOrder = this.timesheetSortOrder === "asc" ? "desc" : "asc" : (this.timesheetSortKey = s, this.timesheetSortOrder = "asc");
|
|
2092
|
+
},
|
|
2093
|
+
sortTimesheetEntries(s) {
|
|
2094
|
+
const e = [...s];
|
|
2095
|
+
return e.sort((d, m) => {
|
|
2096
|
+
let n, l;
|
|
2097
|
+
switch (this.timesheetSortKey) {
|
|
2098
|
+
case "timestamp":
|
|
2099
|
+
n = new Date(d.timestamp), l = new Date(m.timestamp);
|
|
2100
|
+
break;
|
|
2101
|
+
case "crewName":
|
|
2102
|
+
n = d.crewName.toLowerCase(), l = m.crewName.toLowerCase();
|
|
2103
|
+
break;
|
|
2104
|
+
case "role":
|
|
2105
|
+
n = d.role.toLowerCase(), l = m.role.toLowerCase();
|
|
2106
|
+
break;
|
|
2107
|
+
case "action":
|
|
2108
|
+
n = d.action.toLowerCase(), l = m.action.toLowerCase();
|
|
2109
|
+
break;
|
|
2110
|
+
default:
|
|
2111
|
+
return 0;
|
|
2112
|
+
}
|
|
2113
|
+
return n < l ? this.timesheetSortOrder === "asc" ? -1 : 1 : n > l ? this.timesheetSortOrder === "asc" ? 1 : -1 : 0;
|
|
2114
|
+
}), e;
|
|
2115
|
+
},
|
|
2116
|
+
getTimesheetRowClass(s) {
|
|
2117
|
+
return `timesheet-row-${s.toLowerCase().replace(/\s+/g, "-")}`;
|
|
2118
|
+
},
|
|
2119
|
+
async handleAddCrewMember() {
|
|
1765
2120
|
if (!this.validateForm())
|
|
1766
2121
|
return;
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
2122
|
+
if (this.newCrew.certifications.some((l) => {
|
|
2123
|
+
const i = l.name.trim() !== "", c = l.expiryDate !== "", y = l.imageFile !== null;
|
|
2124
|
+
return (i || c || y) && !(i && c && y);
|
|
2125
|
+
})) {
|
|
2126
|
+
this.$emit("incomplete-certification");
|
|
2127
|
+
return;
|
|
2128
|
+
}
|
|
2129
|
+
const e = this.newCrew.certifications.filter((l) => l.name.trim() !== "" && l.expiryDate !== "" && l.imageFile !== null), d = this.newCrew.role === "Other" ? this.newCrew.customRole : this.newCrew.role, m = await Promise.all(
|
|
2130
|
+
e.map(async (l, i) => {
|
|
2131
|
+
const c = await this.uploadCertificationImage(l.imageFile, this.newCrew.email);
|
|
2132
|
+
return {
|
|
2133
|
+
name: l.name,
|
|
2134
|
+
expiryDate: l.expiryDate,
|
|
2135
|
+
imageName: l.imageName,
|
|
2136
|
+
imageType: l.imageType,
|
|
2137
|
+
imageUrl: c.publicUrl
|
|
2138
|
+
// Add the public URL here
|
|
2139
|
+
};
|
|
2140
|
+
})
|
|
2141
|
+
), n = {
|
|
1770
2142
|
name: this.newCrew.name,
|
|
1771
|
-
role:
|
|
1772
|
-
status:
|
|
1773
|
-
certifications:
|
|
2143
|
+
role: d,
|
|
2144
|
+
status: "unavailable",
|
|
2145
|
+
certifications: m,
|
|
1774
2146
|
notes: this.newCrew.notes,
|
|
1775
2147
|
vessel: this.vesselName,
|
|
1776
2148
|
email: this.newCrew.email,
|
|
1777
2149
|
onBoard: this.newCrew.onBoard,
|
|
1778
2150
|
nextShift: this.newCrew.nextShift
|
|
1779
2151
|
};
|
|
1780
|
-
this.$emit("crew-add",
|
|
2152
|
+
this.$emit("crew-add", n), this.resetForm(), this.showAddForm = !1;
|
|
2153
|
+
},
|
|
2154
|
+
// Add this helper method to handle the upload:
|
|
2155
|
+
async uploadCertificationImage(s, e) {
|
|
2156
|
+
return new Promise((d, m) => {
|
|
2157
|
+
this.$emit("upload-cert-image", {
|
|
2158
|
+
file: s,
|
|
2159
|
+
email: e,
|
|
2160
|
+
callback: (n) => {
|
|
2161
|
+
n.error ? m(n.error) : d(n);
|
|
2162
|
+
}
|
|
2163
|
+
});
|
|
2164
|
+
});
|
|
1781
2165
|
},
|
|
1782
2166
|
handleCancelForm() {
|
|
1783
2167
|
this.showAddForm = !1, this.resetForm();
|
|
@@ -1796,6 +2180,29 @@ const ni = {
|
|
|
1796
2180
|
}
|
|
1797
2181
|
this.$emit("crew-assign-shift", s);
|
|
1798
2182
|
},
|
|
2183
|
+
handleDeboardCrew(s) {
|
|
2184
|
+
if (!this.canDeboardCrew) {
|
|
2185
|
+
this.$emit("access-denied", { action: "deboard crew", userProfile: this.userProfile });
|
|
2186
|
+
return;
|
|
2187
|
+
}
|
|
2188
|
+
let e = null;
|
|
2189
|
+
if (s.nextShift) {
|
|
2190
|
+
const d = new Date(s.nextShift), n = Math.abs(/* @__PURE__ */ new Date() - d);
|
|
2191
|
+
e = Math.ceil(n / (1e3 * 60 * 60 * 24));
|
|
2192
|
+
}
|
|
2193
|
+
this.$emit("crew-deboard", { member: s, duration: e });
|
|
2194
|
+
},
|
|
2195
|
+
handleCheckinCrew(s) {
|
|
2196
|
+
if (!this.canDeboardCrew) {
|
|
2197
|
+
this.$emit("access-denied", { action: "check in crew", userProfile: this.userProfile });
|
|
2198
|
+
return;
|
|
2199
|
+
}
|
|
2200
|
+
this.$emit("crew-checkin", s);
|
|
2201
|
+
},
|
|
2202
|
+
toggleCrewLog(s) {
|
|
2203
|
+
const e = this.expandedLogs.indexOf(s);
|
|
2204
|
+
e > -1 ? this.expandedLogs.splice(e, 1) : this.expandedLogs.push(s);
|
|
2205
|
+
},
|
|
1799
2206
|
handleAddCertification(s) {
|
|
1800
2207
|
if (!this.canEditCrew) {
|
|
1801
2208
|
this.$emit("access-denied", { action: "add certification", userProfile: this.userProfile });
|
|
@@ -1806,15 +2213,21 @@ const ni = {
|
|
|
1806
2213
|
handleViewCertification(s, e) {
|
|
1807
2214
|
this.$emit("crew-view-certification", { certification: s, member: e });
|
|
1808
2215
|
},
|
|
1809
|
-
// Form management
|
|
1810
2216
|
resetForm() {
|
|
1811
2217
|
this.newCrew = {
|
|
1812
2218
|
name: "",
|
|
1813
2219
|
role: "Deckhand",
|
|
1814
2220
|
customRole: "",
|
|
1815
|
-
status: "
|
|
2221
|
+
status: "Unavailable",
|
|
1816
2222
|
nextShift: "",
|
|
1817
|
-
certifications: [{
|
|
2223
|
+
certifications: [{
|
|
2224
|
+
name: "",
|
|
2225
|
+
expiryDate: "",
|
|
2226
|
+
imageFile: null,
|
|
2227
|
+
imagePreview: null,
|
|
2228
|
+
imageName: "",
|
|
2229
|
+
imageType: ""
|
|
2230
|
+
}],
|
|
1818
2231
|
notes: "",
|
|
1819
2232
|
email: "",
|
|
1820
2233
|
onBoard: ""
|
|
@@ -1828,18 +2241,43 @@ const ni = {
|
|
|
1828
2241
|
};
|
|
1829
2242
|
return Object.keys(s).forEach((e) => {
|
|
1830
2243
|
(!this.newCrew[e] || this.newCrew[e].trim() === "") && (this.formErrors[e] = `${s[e]} is required`);
|
|
1831
|
-
}), this.newCrew.email && !this.isValidEmail(this.newCrew.email) && (this.formErrors.email = "Please enter a valid email address"), this.newCrew.role === "Other" && (!this.newCrew.customRole || this.newCrew.customRole.trim() === "") && (this.formErrors.customRole = 'Custom role is required when "Other" is selected'), Object.keys(this.formErrors).length
|
|
2244
|
+
}), this.newCrew.email && !this.isValidEmail(this.newCrew.email) && (this.formErrors.email = "Please enter a valid email address"), this.newCrew.role === "Other" && (!this.newCrew.customRole || this.newCrew.customRole.trim() === "") && (this.formErrors.customRole = 'Custom role is required when "Other" is selected'), Object.keys(this.formErrors).length > 0 ? (this.$emit("validation-error", this.formErrors), !1) : !0;
|
|
1832
2245
|
},
|
|
1833
2246
|
isValidEmail(s) {
|
|
1834
2247
|
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s);
|
|
1835
2248
|
},
|
|
1836
2249
|
addCertificationEntry() {
|
|
1837
|
-
this.newCrew.certifications.push({
|
|
2250
|
+
this.newCrew.certifications.push({
|
|
2251
|
+
name: "",
|
|
2252
|
+
expiryDate: "",
|
|
2253
|
+
imageFile: null,
|
|
2254
|
+
imagePreview: null,
|
|
2255
|
+
imageName: "",
|
|
2256
|
+
imageType: ""
|
|
2257
|
+
});
|
|
1838
2258
|
},
|
|
1839
2259
|
removeCertification(s) {
|
|
1840
2260
|
this.newCrew.certifications.splice(s, 1);
|
|
1841
2261
|
},
|
|
1842
|
-
|
|
2262
|
+
handleCertImageUpload(s, e) {
|
|
2263
|
+
const d = s.target.files[0];
|
|
2264
|
+
if (!d)
|
|
2265
|
+
return;
|
|
2266
|
+
const m = this.newCrew.certifications[e];
|
|
2267
|
+
if (m.imageFile = d, m.imageName = d.name, m.imageType = d.type.includes("pdf") ? "pdf" : "image", m.imageType === "image") {
|
|
2268
|
+
const n = new FileReader();
|
|
2269
|
+
n.onload = (l) => {
|
|
2270
|
+
m.imagePreview = l.target.result;
|
|
2271
|
+
}, n.readAsDataURL(d);
|
|
2272
|
+
} else
|
|
2273
|
+
m.imagePreview = "pdf";
|
|
2274
|
+
},
|
|
2275
|
+
removeCertImage(s) {
|
|
2276
|
+
const e = this.newCrew.certifications[s];
|
|
2277
|
+
e.imageFile = null, e.imagePreview = null, e.imageName = "", e.imageType = "";
|
|
2278
|
+
const d = document.getElementById("cert-image-" + s);
|
|
2279
|
+
d && (d.value = "");
|
|
2280
|
+
},
|
|
1843
2281
|
formatStatus(s) {
|
|
1844
2282
|
return s ? s.charAt(0).toUpperCase() + s.slice(1) : "";
|
|
1845
2283
|
},
|
|
@@ -1847,7 +2285,9 @@ const ni = {
|
|
|
1847
2285
|
return {
|
|
1848
2286
|
available: "status-available",
|
|
1849
2287
|
onduty: "status-onduty",
|
|
1850
|
-
|
|
2288
|
+
onboard: "status-onboard",
|
|
2289
|
+
unavailable: "status-unavailable",
|
|
2290
|
+
assigned: "status-assigned"
|
|
1851
2291
|
}[s] || "";
|
|
1852
2292
|
},
|
|
1853
2293
|
getCertificationClass(s) {
|
|
@@ -1861,72 +2301,136 @@ const ni = {
|
|
|
1861
2301
|
getExpiryStatus(s) {
|
|
1862
2302
|
if (!s)
|
|
1863
2303
|
return "none";
|
|
1864
|
-
const e = new Date(s),
|
|
1865
|
-
return
|
|
2304
|
+
const e = new Date(s), d = /* @__PURE__ */ new Date(), m = /* @__PURE__ */ new Date();
|
|
2305
|
+
return m.setMonth(d.getMonth() + 1), e <= d ? "expired" : e <= m ? "expiringSoon" : "valid";
|
|
2306
|
+
},
|
|
2307
|
+
formatLogDate(s) {
|
|
2308
|
+
return s ? new Date(s).toLocaleDateString("en-US", {
|
|
2309
|
+
year: "numeric",
|
|
2310
|
+
month: "short",
|
|
2311
|
+
day: "numeric",
|
|
2312
|
+
hour: "2-digit",
|
|
2313
|
+
minute: "2-digit"
|
|
2314
|
+
}) : "";
|
|
2315
|
+
},
|
|
2316
|
+
getLogActionClass(s) {
|
|
2317
|
+
return {
|
|
2318
|
+
Embarked: "log-action-embark",
|
|
2319
|
+
Deboarded: "log-action-deboard",
|
|
2320
|
+
Assigned: "log-action-assign",
|
|
2321
|
+
"Status Changed": "log-action-status"
|
|
2322
|
+
}[s] || "";
|
|
2323
|
+
},
|
|
2324
|
+
getLogIcon(s) {
|
|
2325
|
+
return {
|
|
2326
|
+
Embarked: "bi bi-box-arrow-in-right",
|
|
2327
|
+
Deboarded: "bi bi-box-arrow-left",
|
|
2328
|
+
Assigned: "bi bi-calendar-check",
|
|
2329
|
+
"Status Changed": "bi bi-arrow-repeat"
|
|
2330
|
+
}[s] || "bi bi-circle-fill";
|
|
1866
2331
|
}
|
|
1867
2332
|
}
|
|
1868
|
-
},
|
|
2333
|
+
}, Ni = { class: "crew-management" }, Ei = {
|
|
1869
2334
|
key: 0,
|
|
1870
2335
|
class: "wave-bg"
|
|
1871
|
-
},
|
|
2336
|
+
}, Vi = { class: "crew-section" }, Li = { class: "crew-section-header" }, $i = { class: "crew-subhead" }, Oi = {
|
|
1872
2337
|
key: 0,
|
|
2338
|
+
class: "search-filter"
|
|
2339
|
+
}, Ui = {
|
|
2340
|
+
key: 1,
|
|
1873
2341
|
class: "loading-state"
|
|
1874
|
-
},
|
|
2342
|
+
}, ji = {
|
|
2343
|
+
key: 2,
|
|
2344
|
+
class: "timesheet-view"
|
|
2345
|
+
}, Bi = { class: "timesheet-header" }, Hi = { class: "timesheet-controls" }, Qi = { class: "timesheet-summary" }, zi = { class: "summary-card" }, Ji = { class: "summary-value" }, Wi = { class: "summary-card" }, Ki = { class: "summary-value" }, Gi = { class: "summary-card" }, Yi = { class: "summary-value" }, Xi = {
|
|
2346
|
+
key: 0,
|
|
2347
|
+
class: "no-results"
|
|
2348
|
+
}, Zi = {
|
|
1875
2349
|
key: 1,
|
|
2350
|
+
class: "timesheet-table-container"
|
|
2351
|
+
}, en = { class: "timesheet-table" }, tn = { class: "timestamp-cell" }, sn = { class: "crew-name-cell" }, nn = { class: "role-cell" }, ln = { class: "action-cell" }, on = { class: "vessel-cell" }, rn = { class: "duration-cell" }, an = { class: "notes-cell" }, dn = {
|
|
2352
|
+
key: 3,
|
|
1876
2353
|
class: "crew-grid"
|
|
1877
|
-
},
|
|
2354
|
+
}, un = { class: "crew-name" }, cn = { class: "crew-role" }, mn = { class: "crew-certifications" }, vn = ["onClick"], pn = ["onClick"], hn = { class: "crew-availability" }, fn = { class: "crew-availability" }, gn = { class: "action-buttons" }, bn = {
|
|
1878
2355
|
key: 0,
|
|
1879
2356
|
class: "status-available crew-availability vcard"
|
|
1880
|
-
},
|
|
2357
|
+
}, yn = {
|
|
1881
2358
|
key: 1,
|
|
1882
2359
|
class: "status-unavailable crew-availability vcard"
|
|
1883
|
-
},
|
|
1884
|
-
key:
|
|
2360
|
+
}, wn = ["onClick"], kn = ["onClick"], Cn = ["onClick"], _n = { class: "crew-footer" }, Dn = {
|
|
2361
|
+
key: 0,
|
|
2362
|
+
class: "crew-log-toggle"
|
|
2363
|
+
}, xn = ["onClick"], Sn = ["onClick"], Fn = {
|
|
2364
|
+
key: 0,
|
|
2365
|
+
class: "crew-log"
|
|
2366
|
+
}, An = { class: "log-date" }, Pn = { class: "log-details" }, Tn = { key: 0 }, In = { key: 1 }, qn = {
|
|
2367
|
+
key: 0,
|
|
2368
|
+
class: "log-notes"
|
|
2369
|
+
}, Rn = {
|
|
2370
|
+
key: 4,
|
|
1885
2371
|
class: "no-results"
|
|
1886
|
-
},
|
|
1887
|
-
key:
|
|
2372
|
+
}, Mn = {
|
|
2373
|
+
key: 5,
|
|
1888
2374
|
class: "add-crew-form"
|
|
1889
|
-
},
|
|
2375
|
+
}, Nn = { class: "form-row" }, En = { class: "form-group" }, Vn = {
|
|
1890
2376
|
key: 0,
|
|
1891
2377
|
class: "error-message"
|
|
1892
|
-
},
|
|
2378
|
+
}, Ln = { class: "form-group" }, $n = ["value"], On = { class: "form-row" }, Un = { class: "form-group" }, jn = {
|
|
1893
2379
|
key: 0,
|
|
1894
2380
|
class: "error-message"
|
|
1895
|
-
},
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
2381
|
+
}, Bn = { class: "certification-section" }, Hn = { class: "form-row" }, Qn = { class: "form-group" }, zn = ["onUpdate:modelValue"], Jn = { class: "form-group" }, Wn = ["onUpdate:modelValue"], Kn = { class: "form-group" }, Gn = { class: "image-upload-wrapper" }, Yn = ["id", "onChange"], Xn = ["for"], Zn = {
|
|
2382
|
+
key: 0,
|
|
2383
|
+
class: "image-preview"
|
|
2384
|
+
}, el = ["src"], tl = {
|
|
2385
|
+
key: 1,
|
|
2386
|
+
class: "pdf-preview"
|
|
2387
|
+
}, sl = ["onClick"], il = {
|
|
2388
|
+
key: 1,
|
|
2389
|
+
class: "file-name"
|
|
2390
|
+
}, nl = {
|
|
2391
|
+
class: "form-group",
|
|
2392
|
+
style: { display: "flex", "align-items": "flex-end" }
|
|
2393
|
+
}, ll = ["onClick"], ol = { class: "form-row" }, rl = { class: "form-group" }, al = { class: "form-actions" };
|
|
2394
|
+
function dl(s, e, d, m, n, l) {
|
|
2395
|
+
return o(), r("div", Ni, [
|
|
2396
|
+
d.config.showWaveBackground ? (o(), r("div", Ei)) : v("", !0),
|
|
2397
|
+
t("div", Vi, [
|
|
2398
|
+
t("div", Li, [
|
|
2399
|
+
t("h4", $i, a(l.sectionTitle), 1),
|
|
2400
|
+
l.canAddCrew ? (o(), r("button", {
|
|
1903
2401
|
key: 0,
|
|
1904
2402
|
class: "btn btn-primary",
|
|
1905
|
-
onClick: e[0] || (e[0] = (...i) =>
|
|
1906
|
-
}, a(n.showAddForm ? "Cancel" : "+ Add Crew Member"), 1)) :
|
|
2403
|
+
onClick: e[0] || (e[0] = (...i) => l.handleToggleAddForm && l.handleToggleAddForm(...i))
|
|
2404
|
+
}, a(n.showAddForm ? "Cancel" : "+ Add Crew Member"), 1)) : v("", !0)
|
|
1907
2405
|
]),
|
|
1908
|
-
|
|
1909
|
-
|
|
2406
|
+
n.showAddForm ? v("", !0) : (o(), r("div", Oi, [
|
|
2407
|
+
h(t("input", {
|
|
1910
2408
|
type: "text",
|
|
1911
2409
|
placeholder: "Search crew by name or role...",
|
|
1912
2410
|
"onUpdate:modelValue": e[1] || (e[1] = (i) => n.searchQuery = i),
|
|
1913
|
-
onInput: e[2] || (e[2] = (...i) =>
|
|
2411
|
+
onInput: e[2] || (e[2] = (...i) => l.handleSearch && l.handleSearch(...i))
|
|
1914
2412
|
}, null, 544), [
|
|
1915
2413
|
[k, n.searchQuery]
|
|
1916
2414
|
]),
|
|
1917
|
-
|
|
2415
|
+
h(t("select", {
|
|
1918
2416
|
"onUpdate:modelValue": e[3] || (e[3] = (i) => n.filterStatus = i),
|
|
1919
|
-
onChange: e[4] || (e[4] = (...i) =>
|
|
1920
|
-
}, e[
|
|
1921
|
-
|
|
1922
|
-
t("option", { value: "available" }, "Available", -1),
|
|
1923
|
-
t("option", { value: "onduty" }, "On Duty", -1),
|
|
1924
|
-
t("option", { value: "unavailable" }, "Unavailable", -1)
|
|
2417
|
+
onChange: e[4] || (e[4] = (...i) => l.handleFilter && l.handleFilter(...i))
|
|
2418
|
+
}, e[21] || (e[21] = [
|
|
2419
|
+
x('<option value="all">All Statuses</option><option value="available">Available</option><option value="onduty">On Duty</option><option value="onboard">On Board</option><option value="assigned">Assigned</option><option value="unavailable">Unavailable</option>', 6)
|
|
1925
2420
|
]), 544), [
|
|
1926
|
-
[
|
|
2421
|
+
[D, n.filterStatus]
|
|
2422
|
+
]),
|
|
2423
|
+
t("button", {
|
|
2424
|
+
class: "btn btn-secondary",
|
|
2425
|
+
onClick: e[5] || (e[5] = (i) => n.showTimesheet = !n.showTimesheet)
|
|
2426
|
+
}, [
|
|
2427
|
+
t("i", {
|
|
2428
|
+
class: b(n.showTimesheet ? "bi bi-grid-3x3-gap" : "bi bi-table")
|
|
2429
|
+
}, null, 2),
|
|
2430
|
+
w(" " + a(n.showTimesheet ? "Show Crew Cards" : "Show Timesheet"), 1)
|
|
1927
2431
|
])
|
|
1928
|
-
]),
|
|
1929
|
-
|
|
2432
|
+
])),
|
|
2433
|
+
d.loading && !n.showAddForm ? (o(), r("div", Ui, e[22] || (e[22] = [
|
|
1930
2434
|
t("div", {
|
|
1931
2435
|
class: "spinner-border text-primary",
|
|
1932
2436
|
role: "status"
|
|
@@ -1934,188 +2438,354 @@ function Ji(s, e, u, b, n, r) {
|
|
|
1934
2438
|
t("span", { class: "visually-hidden" }, "Loading crew...")
|
|
1935
2439
|
], -1),
|
|
1936
2440
|
t("p", null, "Loading crew members...", -1)
|
|
1937
|
-
]))) :
|
|
1938
|
-
(
|
|
2441
|
+
]))) : n.showTimesheet && !n.showAddForm ? (o(), r("div", ji, [
|
|
2442
|
+
t("div", Bi, [
|
|
2443
|
+
e[24] || (e[24] = t("h3", null, [
|
|
2444
|
+
t("i", { class: "bi bi-table" }),
|
|
2445
|
+
w(" Crew Activity Timesheet")
|
|
2446
|
+
], -1)),
|
|
2447
|
+
t("div", Hi, [
|
|
2448
|
+
h(t("select", {
|
|
2449
|
+
"onUpdate:modelValue": e[6] || (e[6] = (i) => n.timesheetFilter = i),
|
|
2450
|
+
onChange: e[7] || (e[7] = (...i) => l.filterTimesheet && l.filterTimesheet(...i))
|
|
2451
|
+
}, e[23] || (e[23] = [
|
|
2452
|
+
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)
|
|
2453
|
+
]), 544), [
|
|
2454
|
+
[D, n.timesheetFilter]
|
|
2455
|
+
]),
|
|
2456
|
+
h(t("input", {
|
|
2457
|
+
type: "text",
|
|
2458
|
+
"onUpdate:modelValue": e[8] || (e[8] = (i) => n.timesheetSearch = i),
|
|
2459
|
+
placeholder: "Search timesheet...",
|
|
2460
|
+
class: "timesheet-search"
|
|
2461
|
+
}, null, 512), [
|
|
2462
|
+
[k, n.timesheetSearch]
|
|
2463
|
+
])
|
|
2464
|
+
])
|
|
2465
|
+
]),
|
|
2466
|
+
t("div", Qi, [
|
|
2467
|
+
t("div", zi, [
|
|
2468
|
+
e[25] || (e[25] = t("span", { class: "summary-label" }, "Total Entries:", -1)),
|
|
2469
|
+
t("span", Ji, a(l.filteredTimesheetEntries.length), 1)
|
|
2470
|
+
]),
|
|
2471
|
+
t("div", Wi, [
|
|
2472
|
+
e[26] || (e[26] = t("span", { class: "summary-label" }, "Crew Members:", -1)),
|
|
2473
|
+
t("span", Ki, a(l.uniqueCrewCount), 1)
|
|
2474
|
+
]),
|
|
2475
|
+
t("div", Gi, [
|
|
2476
|
+
e[27] || (e[27] = t("span", { class: "summary-label" }, "Date Range:", -1)),
|
|
2477
|
+
t("span", Yi, a(l.timesheetDateRange), 1)
|
|
2478
|
+
])
|
|
2479
|
+
]),
|
|
2480
|
+
l.filteredTimesheetEntries.length === 0 ? (o(), r("div", Xi, " No timesheet entries found. ")) : (o(), r("div", Zi, [
|
|
2481
|
+
t("table", en, [
|
|
2482
|
+
t("thead", null, [
|
|
2483
|
+
t("tr", null, [
|
|
2484
|
+
t("th", {
|
|
2485
|
+
onClick: e[9] || (e[9] = (i) => l.sortTimesheet("timestamp"))
|
|
2486
|
+
}, e[28] || (e[28] = [
|
|
2487
|
+
w(" Date/Time ", -1),
|
|
2488
|
+
t("i", { class: "bi bi-arrow-down-up" }, null, -1)
|
|
2489
|
+
])),
|
|
2490
|
+
t("th", {
|
|
2491
|
+
onClick: e[10] || (e[10] = (i) => l.sortTimesheet("crewName"))
|
|
2492
|
+
}, e[29] || (e[29] = [
|
|
2493
|
+
w(" Crew Member ", -1),
|
|
2494
|
+
t("i", { class: "bi bi-arrow-down-up" }, null, -1)
|
|
2495
|
+
])),
|
|
2496
|
+
t("th", {
|
|
2497
|
+
onClick: e[11] || (e[11] = (i) => l.sortTimesheet("role"))
|
|
2498
|
+
}, e[30] || (e[30] = [
|
|
2499
|
+
w(" Role ", -1),
|
|
2500
|
+
t("i", { class: "bi bi-arrow-down-up" }, null, -1)
|
|
2501
|
+
])),
|
|
2502
|
+
t("th", {
|
|
2503
|
+
onClick: e[12] || (e[12] = (i) => l.sortTimesheet("action"))
|
|
2504
|
+
}, e[31] || (e[31] = [
|
|
2505
|
+
w(" Action ", -1),
|
|
2506
|
+
t("i", { class: "bi bi-arrow-down-up" }, null, -1)
|
|
2507
|
+
])),
|
|
2508
|
+
e[32] || (e[32] = t("th", null, "Vessel", -1)),
|
|
2509
|
+
e[33] || (e[33] = t("th", null, "Duration", -1)),
|
|
2510
|
+
e[34] || (e[34] = t("th", null, "Notes", -1))
|
|
2511
|
+
])
|
|
2512
|
+
]),
|
|
2513
|
+
t("tbody", null, [
|
|
2514
|
+
(o(!0), r(f, null, g(l.filteredTimesheetEntries, (i) => (o(), r("tr", {
|
|
2515
|
+
key: i.uniqueId,
|
|
2516
|
+
class: b(l.getTimesheetRowClass(i.action))
|
|
2517
|
+
}, [
|
|
2518
|
+
t("td", tn, a(l.formatLogDate(i.timestamp)), 1),
|
|
2519
|
+
t("td", sn, [
|
|
2520
|
+
t("strong", null, a(i.crewName), 1)
|
|
2521
|
+
]),
|
|
2522
|
+
t("td", nn, a(i.role), 1),
|
|
2523
|
+
t("td", ln, [
|
|
2524
|
+
t("span", {
|
|
2525
|
+
class: b(["action-badge", l.getLogActionClass(i.action)])
|
|
2526
|
+
}, [
|
|
2527
|
+
t("i", {
|
|
2528
|
+
class: b(l.getLogIcon(i.action))
|
|
2529
|
+
}, null, 2),
|
|
2530
|
+
w(" " + a(i.action), 1)
|
|
2531
|
+
], 2)
|
|
2532
|
+
]),
|
|
2533
|
+
t("td", on, a(i.vessel || "N/A"), 1),
|
|
2534
|
+
t("td", rn, a(i.duration ? i.duration + " days" : "N/A"), 1),
|
|
2535
|
+
t("td", an, a(i.notes || "-"), 1)
|
|
2536
|
+
], 2))), 128))
|
|
2537
|
+
])
|
|
2538
|
+
])
|
|
2539
|
+
]))
|
|
2540
|
+
])) : l.filteredCrew.length > 0 && !n.showAddForm ? (o(), r("div", dn, [
|
|
2541
|
+
(o(!0), r(f, null, g(l.filteredCrew, (i) => (o(), r("div", {
|
|
1939
2542
|
key: i.id,
|
|
1940
|
-
class:
|
|
2543
|
+
class: b(["crew-card", { unavailable: i.status === "unavailable" }])
|
|
1941
2544
|
}, [
|
|
1942
2545
|
t("div", {
|
|
1943
|
-
class:
|
|
1944
|
-
}, a(
|
|
1945
|
-
t("div",
|
|
1946
|
-
t("div",
|
|
1947
|
-
t("div",
|
|
1948
|
-
(o(!0),
|
|
1949
|
-
key:
|
|
1950
|
-
class:
|
|
1951
|
-
onClick: (y) =>
|
|
1952
|
-
}, a(
|
|
1953
|
-
|
|
2546
|
+
class: b(["crew-status-badge", l.getStatusClass(i.status)])
|
|
2547
|
+
}, a(l.formatStatus(i.status)), 3),
|
|
2548
|
+
t("div", un, a(i.name), 1),
|
|
2549
|
+
t("div", cn, a(i.role), 1),
|
|
2550
|
+
t("div", mn, [
|
|
2551
|
+
(o(!0), r(f, null, g(i.certifications, (c) => (o(), r("div", {
|
|
2552
|
+
key: c.name,
|
|
2553
|
+
class: b(["certification-tag", l.getCertificationClass(c.expiryDate)]),
|
|
2554
|
+
onClick: (y) => l.handleViewCertification(c, i)
|
|
2555
|
+
}, a(c.name), 11, vn))), 128)),
|
|
2556
|
+
l.canEditCrew ? (o(), r("i", {
|
|
1954
2557
|
key: 0,
|
|
1955
2558
|
class: "bi bi-patch-plus-fill icon",
|
|
1956
|
-
onClick: (
|
|
1957
|
-
}, null, 8,
|
|
2559
|
+
onClick: (c) => l.handleAddCertification(i)
|
|
2560
|
+
}, null, 8, pn)) : v("", !0)
|
|
1958
2561
|
]),
|
|
1959
|
-
t("div",
|
|
1960
|
-
e[
|
|
1961
|
-
|
|
2562
|
+
t("div", hn, [
|
|
2563
|
+
e[35] || (e[35] = t("strong", null, "Embarkation Date:", -1)),
|
|
2564
|
+
w(" " + a(i.nextShift || "Not Scheduled"), 1)
|
|
1962
2565
|
]),
|
|
1963
|
-
t("div",
|
|
1964
|
-
e[
|
|
1965
|
-
|
|
2566
|
+
t("div", fn, [
|
|
2567
|
+
e[36] || (e[36] = t("strong", null, "Expected Days Onboard (in days):", -1)),
|
|
2568
|
+
w(" " + a(i.onBoard || "Not Scheduled"), 1)
|
|
1966
2569
|
]),
|
|
1967
|
-
t("div",
|
|
1968
|
-
i.vessel ? (o(),
|
|
1969
|
-
|
|
2570
|
+
t("div", gn, [
|
|
2571
|
+
i.vessel ? (o(), r("div", bn, " Vessel: " + a(i.vessel), 1)) : (o(), r("div", yn, " Vessel: Unassigned ")),
|
|
2572
|
+
l.canAssignShift && i.status === "available" ? (o(), r("button", {
|
|
1970
2573
|
key: 2,
|
|
1971
2574
|
class: "btn btn-primary",
|
|
1972
|
-
onClick: (
|
|
1973
|
-
}, " Assign Shift ", 8,
|
|
2575
|
+
onClick: (c) => l.handleAssignShift(i)
|
|
2576
|
+
}, " Assign Shift ", 8, wn)) : v("", !0),
|
|
2577
|
+
l.canDeboardCrew && i.status === "onduty" ? (o(), r("button", {
|
|
2578
|
+
key: 3,
|
|
2579
|
+
class: "btn btn-success",
|
|
2580
|
+
onClick: (c) => l.handleCheckinCrew(i)
|
|
2581
|
+
}, " Check In ", 8, kn)) : v("", !0),
|
|
2582
|
+
l.canDeboardCrew && i.status === "onboard" ? (o(), r("button", {
|
|
2583
|
+
key: 4,
|
|
2584
|
+
class: "btn btn-warning",
|
|
2585
|
+
onClick: (c) => l.handleDeboardCrew(i)
|
|
2586
|
+
}, " Deboard ", 8, Cn)) : v("", !0)
|
|
1974
2587
|
]),
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
2588
|
+
t("div", _n, [
|
|
2589
|
+
i.log && i.log.length > 0 ? (o(), r("div", Dn, [
|
|
2590
|
+
t("button", {
|
|
2591
|
+
class: "btn btn-link btn-sm log-toggle-btn",
|
|
2592
|
+
onClick: (c) => l.toggleCrewLog(i.id)
|
|
2593
|
+
}, [
|
|
2594
|
+
e[37] || (e[37] = t("i", { class: "bi bi-clock-history" }, null, -1)),
|
|
2595
|
+
w(" View Log (" + a(i.log.length) + ") ", 1)
|
|
2596
|
+
], 8, xn)
|
|
2597
|
+
])) : v("", !0),
|
|
2598
|
+
l.canDeleteCrew ? (o(), r("i", {
|
|
2599
|
+
key: 1,
|
|
2600
|
+
class: "bi bi-trash icon delete-icon",
|
|
2601
|
+
onClick: (c) => l.handleDeleteCrew(i)
|
|
2602
|
+
}, null, 8, Sn)) : v("", !0)
|
|
2603
|
+
]),
|
|
2604
|
+
n.expandedLogs.includes(i.id) ? (o(), r("div", Fn, [
|
|
2605
|
+
e[38] || (e[38] = t("h4", null, "Crew Activity Log", -1)),
|
|
2606
|
+
(o(!0), r(f, null, g(i.log, (c, y) => (o(), r("div", {
|
|
2607
|
+
key: y,
|
|
2608
|
+
class: "log-entry"
|
|
2609
|
+
}, [
|
|
2610
|
+
t("div", An, a(l.formatLogDate(c.timestamp)), 1),
|
|
2611
|
+
t("div", {
|
|
2612
|
+
class: b(["log-action", l.getLogActionClass(c.action)])
|
|
2613
|
+
}, [
|
|
2614
|
+
t("i", {
|
|
2615
|
+
class: b(l.getLogIcon(c.action))
|
|
2616
|
+
}, null, 2),
|
|
2617
|
+
w(" " + a(c.action), 1)
|
|
2618
|
+
], 2),
|
|
2619
|
+
t("div", Pn, [
|
|
2620
|
+
c.vessel ? (o(), r("span", Tn, "Vessel: " + a(c.vessel), 1)) : v("", !0),
|
|
2621
|
+
c.duration ? (o(), r("span", In, " | Duration: " + a(c.duration) + " days", 1)) : v("", !0)
|
|
2622
|
+
]),
|
|
2623
|
+
c.notes ? (o(), r("div", qn, a(c.notes), 1)) : v("", !0)
|
|
2624
|
+
]))), 128))
|
|
2625
|
+
])) : v("", !0)
|
|
1980
2626
|
], 2))), 128))
|
|
1981
|
-
])) :
|
|
1982
|
-
n.showAddForm ? (o(),
|
|
1983
|
-
e[
|
|
1984
|
-
t("div",
|
|
1985
|
-
t("div",
|
|
1986
|
-
e[
|
|
1987
|
-
|
|
2627
|
+
])) : !d.loading && !n.showTimesheet && !n.showAddForm ? (o(), r("div", Rn, a(d.crew.length === 0 ? "No crew members found." : "No crew members found matching your search criteria."), 1)) : v("", !0),
|
|
2628
|
+
n.showAddForm ? (o(), r("div", Mn, [
|
|
2629
|
+
e[51] || (e[51] = t("h2", null, "Add New Crew Member", -1)),
|
|
2630
|
+
t("div", Nn, [
|
|
2631
|
+
t("div", En, [
|
|
2632
|
+
e[39] || (e[39] = t("label", { for: "crew-name" }, "Full Name *", -1)),
|
|
2633
|
+
h(t("input", {
|
|
1988
2634
|
type: "text",
|
|
1989
2635
|
id: "crew-name",
|
|
1990
|
-
"onUpdate:modelValue": e[
|
|
1991
|
-
class:
|
|
2636
|
+
"onUpdate:modelValue": e[13] || (e[13] = (i) => n.newCrew.name = i),
|
|
2637
|
+
class: b({ error: n.formErrors.name })
|
|
1992
2638
|
}, null, 2), [
|
|
1993
2639
|
[k, n.newCrew.name]
|
|
1994
2640
|
]),
|
|
1995
|
-
n.formErrors.name ? (o(),
|
|
2641
|
+
n.formErrors.name ? (o(), r("div", Vn, a(n.formErrors.name), 1)) : v("", !0)
|
|
1996
2642
|
]),
|
|
1997
|
-
t("div",
|
|
1998
|
-
e[
|
|
1999
|
-
|
|
2643
|
+
t("div", Ln, [
|
|
2644
|
+
e[41] || (e[41] = t("label", { for: "crew-role" }, "Role/Position *", -1)),
|
|
2645
|
+
h(t("select", {
|
|
2000
2646
|
id: "crew-role",
|
|
2001
|
-
"onUpdate:modelValue": e[
|
|
2647
|
+
"onUpdate:modelValue": e[14] || (e[14] = (i) => n.newCrew.role = i)
|
|
2002
2648
|
}, [
|
|
2003
|
-
(o(!0),
|
|
2649
|
+
(o(!0), r(f, null, g(d.availableRoles, (i) => (o(), r("option", {
|
|
2004
2650
|
key: i,
|
|
2005
2651
|
value: i
|
|
2006
|
-
}, a(i), 9,
|
|
2007
|
-
e[
|
|
2652
|
+
}, a(i), 9, $n))), 128)),
|
|
2653
|
+
e[40] || (e[40] = t("option", { value: "Other" }, "Other", -1))
|
|
2008
2654
|
], 512), [
|
|
2009
|
-
[
|
|
2655
|
+
[D, n.newCrew.role]
|
|
2010
2656
|
]),
|
|
2011
|
-
n.newCrew.role === "Other" ?
|
|
2657
|
+
n.newCrew.role === "Other" ? h((o(), r("input", {
|
|
2012
2658
|
key: 0,
|
|
2013
2659
|
type: "text",
|
|
2014
2660
|
placeholder: "Enter custom role",
|
|
2015
|
-
"onUpdate:modelValue": e[
|
|
2661
|
+
"onUpdate:modelValue": e[15] || (e[15] = (i) => n.newCrew.customRole = i),
|
|
2016
2662
|
style: { "margin-top": "8px" }
|
|
2017
2663
|
}, null, 512)), [
|
|
2018
2664
|
[k, n.newCrew.customRole]
|
|
2019
|
-
]) :
|
|
2665
|
+
]) : v("", !0)
|
|
2020
2666
|
])
|
|
2021
2667
|
]),
|
|
2022
|
-
t("div",
|
|
2023
|
-
t("div",
|
|
2024
|
-
e[
|
|
2025
|
-
|
|
2026
|
-
id: "crew-status",
|
|
2027
|
-
"onUpdate:modelValue": e[8] || (e[8] = (i) => n.newCrew.status = i)
|
|
2028
|
-
}, e[21] || (e[21] = [
|
|
2029
|
-
t("option", { value: "available" }, "Available", -1),
|
|
2030
|
-
t("option", { value: "onduty" }, "On Duty", -1),
|
|
2031
|
-
t("option", { value: "unavailable" }, "Unavailable", -1)
|
|
2032
|
-
]), 512), [
|
|
2033
|
-
[_, n.newCrew.status]
|
|
2034
|
-
])
|
|
2035
|
-
]),
|
|
2036
|
-
t("div", Fi, [
|
|
2037
|
-
e[23] || (e[23] = t("label", { for: "crew-email" }, "Email Address *", -1)),
|
|
2038
|
-
v(t("input", {
|
|
2668
|
+
t("div", On, [
|
|
2669
|
+
t("div", Un, [
|
|
2670
|
+
e[42] || (e[42] = t("label", { for: "crew-email" }, "Email Address *", -1)),
|
|
2671
|
+
h(t("input", {
|
|
2039
2672
|
type: "email",
|
|
2040
2673
|
id: "crew-email",
|
|
2041
|
-
"onUpdate:modelValue": e[
|
|
2042
|
-
class:
|
|
2674
|
+
"onUpdate:modelValue": e[16] || (e[16] = (i) => n.newCrew.email = i),
|
|
2675
|
+
class: b({ error: n.formErrors.email })
|
|
2043
2676
|
}, null, 2), [
|
|
2044
2677
|
[k, n.newCrew.email]
|
|
2045
2678
|
]),
|
|
2046
|
-
n.formErrors.email ? (o(),
|
|
2679
|
+
n.formErrors.email ? (o(), r("div", jn, a(n.formErrors.email), 1)) : v("", !0)
|
|
2047
2680
|
])
|
|
2048
2681
|
]),
|
|
2049
|
-
t("div",
|
|
2050
|
-
e[
|
|
2051
|
-
(o(!0),
|
|
2052
|
-
key:
|
|
2682
|
+
t("div", Bn, [
|
|
2683
|
+
e[49] || (e[49] = t("h3", null, "Certifications", -1)),
|
|
2684
|
+
(o(!0), r(f, null, g(n.newCrew.certifications, (i, c) => (o(), r("div", {
|
|
2685
|
+
key: c,
|
|
2053
2686
|
class: "certification-entry"
|
|
2054
2687
|
}, [
|
|
2055
|
-
t("div",
|
|
2056
|
-
t("div",
|
|
2057
|
-
e[
|
|
2058
|
-
|
|
2688
|
+
t("div", Hn, [
|
|
2689
|
+
t("div", Qn, [
|
|
2690
|
+
e[43] || (e[43] = t("label", null, "Certification Name *", -1)),
|
|
2691
|
+
h(t("input", {
|
|
2059
2692
|
type: "text",
|
|
2060
2693
|
"onUpdate:modelValue": (y) => i.name = y,
|
|
2061
2694
|
placeholder: "Enter certification name"
|
|
2062
|
-
}, null, 8,
|
|
2695
|
+
}, null, 8, zn), [
|
|
2063
2696
|
[k, i.name]
|
|
2064
2697
|
])
|
|
2065
2698
|
]),
|
|
2066
|
-
t("div",
|
|
2067
|
-
e[
|
|
2068
|
-
|
|
2699
|
+
t("div", Jn, [
|
|
2700
|
+
e[44] || (e[44] = t("label", null, "Expiry Date *", -1)),
|
|
2701
|
+
h(t("input", {
|
|
2069
2702
|
type: "date",
|
|
2070
2703
|
"onUpdate:modelValue": (y) => i.expiryDate = y
|
|
2071
|
-
}, null, 8,
|
|
2704
|
+
}, null, 8, Wn), [
|
|
2072
2705
|
[k, i.expiryDate]
|
|
2073
2706
|
])
|
|
2074
2707
|
]),
|
|
2075
|
-
t("div",
|
|
2076
|
-
|
|
2708
|
+
t("div", Kn, [
|
|
2709
|
+
e[48] || (e[48] = t("label", null, "Certificate Image *", -1)),
|
|
2710
|
+
t("div", Gn, [
|
|
2711
|
+
t("input", {
|
|
2712
|
+
type: "file",
|
|
2713
|
+
id: "cert-image-" + c,
|
|
2714
|
+
onChange: (y) => l.handleCertImageUpload(y, c),
|
|
2715
|
+
accept: "image/*,.pdf",
|
|
2716
|
+
class: "file-input"
|
|
2717
|
+
}, null, 40, Yn),
|
|
2718
|
+
t("label", {
|
|
2719
|
+
for: "cert-image-" + c,
|
|
2720
|
+
class: "file-input-label"
|
|
2721
|
+
}, [
|
|
2722
|
+
e[45] || (e[45] = t("i", { class: "bi bi-cloud-upload" }, null, -1)),
|
|
2723
|
+
w(" " + a(i.imagePreview ? "Change File" : "Upload File"), 1)
|
|
2724
|
+
], 8, Xn),
|
|
2725
|
+
i.imagePreview ? (o(), r("div", Zn, [
|
|
2726
|
+
i.imageType !== "pdf" ? (o(), r("img", {
|
|
2727
|
+
key: 0,
|
|
2728
|
+
src: i.imagePreview,
|
|
2729
|
+
alt: "Certificate preview"
|
|
2730
|
+
}, null, 8, el)) : (o(), r("div", tl, [
|
|
2731
|
+
e[46] || (e[46] = t("i", { class: "bi bi-file-pdf" }, null, -1)),
|
|
2732
|
+
t("span", null, a(i.imageName), 1)
|
|
2733
|
+
])),
|
|
2734
|
+
t("button", {
|
|
2735
|
+
type: "button",
|
|
2736
|
+
class: "btn-remove-image",
|
|
2737
|
+
onClick: (y) => l.removeCertImage(c)
|
|
2738
|
+
}, e[47] || (e[47] = [
|
|
2739
|
+
t("i", { class: "bi bi-x-circle" }, null, -1)
|
|
2740
|
+
]), 8, sl)
|
|
2741
|
+
])) : v("", !0),
|
|
2742
|
+
i.imageName ? (o(), r("small", il, a(i.imageName), 1)) : v("", !0)
|
|
2743
|
+
])
|
|
2744
|
+
]),
|
|
2745
|
+
t("div", nl, [
|
|
2746
|
+
n.newCrew.certifications.length > 1 ? (o(), r("button", {
|
|
2077
2747
|
key: 0,
|
|
2078
2748
|
type: "button",
|
|
2079
2749
|
class: "btn btn-danger btn-sm",
|
|
2080
|
-
onClick: (y) =>
|
|
2081
|
-
}, " Remove ", 8,
|
|
2750
|
+
onClick: (y) => l.removeCertification(c)
|
|
2751
|
+
}, " Remove ", 8, ll)) : v("", !0)
|
|
2082
2752
|
])
|
|
2083
2753
|
])
|
|
2084
2754
|
]))), 128)),
|
|
2085
2755
|
t("button", {
|
|
2086
2756
|
type: "button",
|
|
2087
2757
|
class: "btn btn-secondary btn-sm",
|
|
2088
|
-
onClick: e[
|
|
2758
|
+
onClick: e[17] || (e[17] = (...i) => l.addCertificationEntry && l.addCertificationEntry(...i))
|
|
2089
2759
|
}, " + Add More Certification ")
|
|
2090
2760
|
]),
|
|
2091
|
-
t("div",
|
|
2092
|
-
t("div",
|
|
2093
|
-
e[
|
|
2094
|
-
|
|
2761
|
+
t("div", ol, [
|
|
2762
|
+
t("div", rl, [
|
|
2763
|
+
e[50] || (e[50] = t("label", { for: "crew-notes" }, "Notes", -1)),
|
|
2764
|
+
h(t("textarea", {
|
|
2095
2765
|
id: "crew-notes",
|
|
2096
2766
|
rows: "3",
|
|
2097
|
-
"onUpdate:modelValue": e[
|
|
2767
|
+
"onUpdate:modelValue": e[18] || (e[18] = (i) => n.newCrew.notes = i)
|
|
2098
2768
|
}, null, 512), [
|
|
2099
2769
|
[k, n.newCrew.notes]
|
|
2100
2770
|
])
|
|
2101
2771
|
])
|
|
2102
2772
|
]),
|
|
2103
|
-
t("div",
|
|
2773
|
+
t("div", al, [
|
|
2104
2774
|
t("button", {
|
|
2105
2775
|
class: "btn btn-secondary",
|
|
2106
|
-
onClick: e[
|
|
2776
|
+
onClick: e[19] || (e[19] = (...i) => l.handleCancelForm && l.handleCancelForm(...i))
|
|
2107
2777
|
}, "Cancel"),
|
|
2108
2778
|
t("button", {
|
|
2109
2779
|
class: "btn btn-primary",
|
|
2110
|
-
onClick: e[
|
|
2780
|
+
onClick: e[20] || (e[20] = (...i) => l.handleAddCrewMember && l.handleAddCrewMember(...i))
|
|
2111
2781
|
}, "Add Crew Member")
|
|
2112
2782
|
])
|
|
2113
|
-
])) :
|
|
2783
|
+
])) : v("", !0)
|
|
2114
2784
|
])
|
|
2115
2785
|
]);
|
|
2116
2786
|
}
|
|
2117
|
-
const
|
|
2118
|
-
const
|
|
2787
|
+
const ul = /* @__PURE__ */ S(Mi, [["render", dl]]);
|
|
2788
|
+
const cl = {
|
|
2119
2789
|
name: "RequisitionSystem",
|
|
2120
2790
|
props: {
|
|
2121
2791
|
userProfile: {
|
|
@@ -2363,103 +3033,103 @@ const Gi = {
|
|
|
2363
3033
|
created() {
|
|
2364
3034
|
this.addItem();
|
|
2365
3035
|
}
|
|
2366
|
-
},
|
|
3036
|
+
}, ml = { class: "s-container container" }, vl = { class: "nav-tabs" }, pl = ["onClick"], hl = {
|
|
2367
3037
|
key: 0,
|
|
2368
3038
|
class: "tab-content active"
|
|
2369
|
-
},
|
|
3039
|
+
}, fl = { class: "form-grid" }, gl = { class: "form-group" }, bl = ["value"], yl = { class: "form-group" }, wl = ["value"], kl = { class: "form-group" }, Cl = ["value"], _l = { class: "form-group" }, Dl = { class: "form-group" }, xl = { class: "items-section" }, Sl = { class: "items-header" }, Fl = { class: "form-group" }, Al = ["onUpdate:modelValue"], Pl = { class: "form-group" }, Tl = ["onUpdate:modelValue"], Il = { class: "form-group" }, ql = ["onUpdate:modelValue"], Rl = { class: "form-group" }, Ml = ["onUpdate:modelValue"], Nl = ["value"], El = { class: "form-group" }, Vl = ["onUpdate:modelValue"], Ll = ["onClick"], $l = {
|
|
2370
3040
|
key: 1,
|
|
2371
3041
|
class: "tab-content active"
|
|
2372
|
-
},
|
|
3042
|
+
}, Ol = { class: "requisition-list" }, Ul = { class: "requisition-header" }, jl = { class: "requisition-id" }, Bl = { class: "requisition-details" }, Hl = { class: "detail-label" }, Ql = { class: "detail-value" }, zl = {
|
|
2373
3043
|
key: 0,
|
|
2374
3044
|
class: "form-group comments-section"
|
|
2375
|
-
},
|
|
3045
|
+
}, Jl = ["onClick"], Wl = {
|
|
2376
3046
|
key: 2,
|
|
2377
3047
|
class: "tab-content active"
|
|
2378
|
-
},
|
|
3048
|
+
}, Kl = { class: "requisition-list" }, Gl = { class: "requisition-header" }, Yl = { class: "requisition-id" }, Xl = { class: "requisition-details" }, Zl = { class: "detail-label" }, eo = { class: "detail-value" }, to = {
|
|
2379
3049
|
key: 0,
|
|
2380
3050
|
class: "form-group comments-section"
|
|
2381
|
-
},
|
|
3051
|
+
}, so = ["onClick"], io = {
|
|
2382
3052
|
key: 3,
|
|
2383
3053
|
class: "tab-content active"
|
|
2384
|
-
},
|
|
3054
|
+
}, no = {
|
|
2385
3055
|
class: "requisition-list",
|
|
2386
3056
|
id: "approvalsQueue"
|
|
2387
|
-
},
|
|
3057
|
+
}, lo = { class: "requisition-header" }, oo = { class: "requisition-id" }, ro = { class: "requisition-details" }, ao = { class: "detail-label" }, uo = { class: "detail-value" }, co = { class: "detail-item" }, mo = { class: "detail-value" }, vo = { class: "detail-item" }, po = { class: "item-list" }, ho = ["onClick"], fo = ["onClick"], go = ["onClick"], bo = {
|
|
2388
3058
|
key: 4,
|
|
2389
3059
|
class: "tab-content active"
|
|
2390
|
-
},
|
|
3060
|
+
}, yo = {
|
|
2391
3061
|
class: "requisition-list",
|
|
2392
3062
|
id: "purchasingQueue"
|
|
2393
|
-
},
|
|
3063
|
+
}, wo = { class: "requisition-header" }, ko = { class: "requisition-id" }, Co = { class: "requisition-details" }, _o = { class: "detail-label" }, Do = { class: "detail-value" }, xo = { class: "detail-item" }, So = { class: "detail-value" }, Fo = { class: "detail-item" }, Ao = { class: "item-list" }, Po = ["onClick"], To = {
|
|
2394
3064
|
key: 5,
|
|
2395
3065
|
class: "tab-content active"
|
|
2396
|
-
},
|
|
3066
|
+
}, Io = {
|
|
2397
3067
|
class: "requisition-list",
|
|
2398
3068
|
id: "receivingQueue"
|
|
2399
|
-
},
|
|
3069
|
+
}, qo = { class: "requisition-header" }, Ro = { class: "requisition-id" }, Mo = { class: "requisition-details" }, No = { class: "detail-label" }, Eo = { class: "detail-value" }, Vo = { class: "detail-item" }, Lo = { class: "detail-value" }, $o = { class: "detail-item" }, Oo = { class: "item-list" }, Uo = ["onClick"], jo = {
|
|
2400
3070
|
key: 6,
|
|
2401
3071
|
class: "tab-content active"
|
|
2402
|
-
},
|
|
3072
|
+
}, Bo = {
|
|
2403
3073
|
class: "po-content",
|
|
2404
3074
|
id: "po-content"
|
|
2405
|
-
},
|
|
3075
|
+
}, Ho = { class: "po-header" }, Qo = { class: "company-info" }, zo = { class: "info-row" }, Jo = { class: "info-value" }, Wo = { class: "info-row" }, Ko = { class: "info-value" }, Go = { class: "info-row" }, Yo = { class: "info-value" }, Xo = { class: "info-row" }, Zo = { class: "info-value" }, er = { class: "info-row" }, tr = { class: "info-value" }, sr = { class: "company-info" }, ir = { class: "info-row" }, nr = { class: "info-value" }, lr = { class: "info-row" }, or = { class: "info-value" }, rr = { class: "info-row" }, ar = { class: "info-value" }, dr = { class: "info-row" }, ur = { class: "info-value" }, cr = { class: "info-row" }, mr = { class: "info-value" }, vr = { class: "items-section" }, pr = { class: "items-table" }, hr = { key: 0 }, fr = { key: 0 }, gr = {
|
|
2406
3076
|
key: 0,
|
|
2407
3077
|
class: "price-change-indicator"
|
|
2408
|
-
},
|
|
3078
|
+
}, br = ["onUpdate:modelValue"], yr = { key: 0 }, wr = ["onClick"], kr = { key: 1 }, Cr = ["onClick"], _r = ["onClick"], Dr = {
|
|
2409
3079
|
key: 0,
|
|
2410
3080
|
class: "justification-note"
|
|
2411
|
-
},
|
|
3081
|
+
}, xr = { class: "totals" }, Sr = { class: "total-row" }, Fr = { class: "total-row" }, Ar = { class: "total-row" }, Pr = { class: "total-row grand-total" }, Tr = { class: "modal-content" }, Ir = { style: { "margin-bottom": "15px", color: "#666" } }, qr = { class: "modal-buttons" }, Rr = ["disabled"], Mr = {
|
|
2412
3082
|
key: 7,
|
|
2413
3083
|
class: "tab-content active"
|
|
2414
3084
|
};
|
|
2415
|
-
function
|
|
2416
|
-
var i,
|
|
2417
|
-
return o(),
|
|
3085
|
+
function Nr(s, e, d, m, n, l) {
|
|
3086
|
+
var i, c, y, A, P, T, I, q, R, M, N;
|
|
3087
|
+
return o(), r("div", ml, [
|
|
2418
3088
|
e[62] || (e[62] = t("div", { class: "header" }, [
|
|
2419
3089
|
t("h1", null, "OceanHelm Requisition System"),
|
|
2420
3090
|
t("p", null, "Streamlined Material Request & Ordering Process")
|
|
2421
3091
|
], -1)),
|
|
2422
|
-
t("div",
|
|
2423
|
-
(o(!0),
|
|
2424
|
-
key:
|
|
2425
|
-
class:
|
|
2426
|
-
onClick: (
|
|
2427
|
-
}, a(
|
|
3092
|
+
t("div", vl, [
|
|
3093
|
+
(o(!0), r(f, null, g(l.visibleTabs, (u) => (o(), r("button", {
|
|
3094
|
+
key: u.name,
|
|
3095
|
+
class: b(["nav-tab", { active: n.activeTab === u.name }]),
|
|
3096
|
+
onClick: (p) => l.setActiveTab(u.name)
|
|
3097
|
+
}, a(u.label), 11, pl))), 128))
|
|
2428
3098
|
]),
|
|
2429
|
-
n.activeTab === "new-requisition" ? (o(),
|
|
3099
|
+
n.activeTab === "new-requisition" ? (o(), r("div", hl, [
|
|
2430
3100
|
t("form", {
|
|
2431
|
-
onSubmit: e[5] || (e[5] =
|
|
3101
|
+
onSubmit: e[5] || (e[5] = _((...u) => l.handleSubmitRequisition && l.handleSubmitRequisition(...u), ["prevent"]))
|
|
2432
3102
|
}, [
|
|
2433
|
-
t("div",
|
|
2434
|
-
t("div",
|
|
3103
|
+
t("div", fl, [
|
|
3104
|
+
t("div", gl, [
|
|
2435
3105
|
e[12] || (e[12] = t("label", null, "Requestor Name *", -1)),
|
|
2436
3106
|
t("input", {
|
|
2437
3107
|
type: "text",
|
|
2438
|
-
value:
|
|
3108
|
+
value: d.userProfile.full_name,
|
|
2439
3109
|
readonly: "",
|
|
2440
3110
|
required: "",
|
|
2441
3111
|
class: "form-control"
|
|
2442
|
-
}, null, 8,
|
|
3112
|
+
}, null, 8, bl)
|
|
2443
3113
|
]),
|
|
2444
|
-
t("div",
|
|
3114
|
+
t("div", yl, [
|
|
2445
3115
|
e[14] || (e[14] = t("label", null, "Department *", -1)),
|
|
2446
|
-
|
|
2447
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
3116
|
+
h(t("select", {
|
|
3117
|
+
"onUpdate:modelValue": e[0] || (e[0] = (u) => n.form.department = u),
|
|
2448
3118
|
required: ""
|
|
2449
3119
|
}, [
|
|
2450
3120
|
e[13] || (e[13] = t("option", { value: "" }, "Select Department", -1)),
|
|
2451
|
-
(o(!0),
|
|
2452
|
-
key:
|
|
2453
|
-
value:
|
|
2454
|
-
}, a(
|
|
3121
|
+
(o(!0), r(f, null, g(n.departments, (u) => (o(), r("option", {
|
|
3122
|
+
key: u,
|
|
3123
|
+
value: u
|
|
3124
|
+
}, a(u), 9, wl))), 128))
|
|
2455
3125
|
], 512), [
|
|
2456
|
-
[
|
|
3126
|
+
[D, n.form.department]
|
|
2457
3127
|
])
|
|
2458
3128
|
]),
|
|
2459
|
-
t("div",
|
|
3129
|
+
t("div", kl, [
|
|
2460
3130
|
e[16] || (e[16] = t("label", null, "Vessel *", -1)),
|
|
2461
|
-
|
|
2462
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
3131
|
+
h(t("select", {
|
|
3132
|
+
"onUpdate:modelValue": e[1] || (e[1] = (u) => n.form.project = u),
|
|
2463
3133
|
class: "form-control",
|
|
2464
3134
|
required: ""
|
|
2465
3135
|
}, [
|
|
@@ -2467,111 +3137,111 @@ function yl(s, e, u, b, n, r) {
|
|
|
2467
3137
|
disabled: "",
|
|
2468
3138
|
value: ""
|
|
2469
3139
|
}, "Select a vessel", -1)),
|
|
2470
|
-
(o(!0),
|
|
2471
|
-
key:
|
|
2472
|
-
value:
|
|
2473
|
-
}, a(
|
|
3140
|
+
(o(!0), r(f, null, g(d.vessels, (u) => (o(), r("option", {
|
|
3141
|
+
key: u.id,
|
|
3142
|
+
value: u.name
|
|
3143
|
+
}, a(u.name), 9, Cl))), 128))
|
|
2474
3144
|
], 512), [
|
|
2475
|
-
[
|
|
3145
|
+
[D, n.form.project]
|
|
2476
3146
|
])
|
|
2477
3147
|
]),
|
|
2478
|
-
t("div",
|
|
3148
|
+
t("div", _l, [
|
|
2479
3149
|
e[17] || (e[17] = t("label", null, "Date Needed *", -1)),
|
|
2480
|
-
|
|
3150
|
+
h(t("input", {
|
|
2481
3151
|
type: "date",
|
|
2482
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
3152
|
+
"onUpdate:modelValue": e[2] || (e[2] = (u) => n.form.neededDate = u),
|
|
2483
3153
|
required: ""
|
|
2484
3154
|
}, null, 512), [
|
|
2485
3155
|
[k, n.form.neededDate]
|
|
2486
3156
|
])
|
|
2487
3157
|
])
|
|
2488
3158
|
]),
|
|
2489
|
-
t("div",
|
|
3159
|
+
t("div", Dl, [
|
|
2490
3160
|
e[18] || (e[18] = t("label", null, "Business Justification *", -1)),
|
|
2491
|
-
|
|
2492
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
|
3161
|
+
h(t("textarea", {
|
|
3162
|
+
"onUpdate:modelValue": e[3] || (e[3] = (u) => n.form.justification = u),
|
|
2493
3163
|
placeholder: "Explain why these materials are needed...",
|
|
2494
3164
|
required: ""
|
|
2495
3165
|
}, null, 512), [
|
|
2496
3166
|
[k, n.form.justification]
|
|
2497
3167
|
])
|
|
2498
3168
|
]),
|
|
2499
|
-
t("div",
|
|
2500
|
-
t("div",
|
|
3169
|
+
t("div", xl, [
|
|
3170
|
+
t("div", Sl, [
|
|
2501
3171
|
e[19] || (e[19] = t("h3", null, "Requested Items", -1)),
|
|
2502
3172
|
t("button", {
|
|
2503
3173
|
type: "button",
|
|
2504
3174
|
class: "add-item-btn",
|
|
2505
|
-
onClick: e[4] || (e[4] = (...
|
|
3175
|
+
onClick: e[4] || (e[4] = (...u) => l.addItem && l.addItem(...u))
|
|
2506
3176
|
}, "+ Add Item")
|
|
2507
3177
|
]),
|
|
2508
3178
|
t("div", null, [
|
|
2509
|
-
(o(!0),
|
|
2510
|
-
key:
|
|
3179
|
+
(o(!0), r(f, null, g(n.form.items, (u, p) => (o(), r("div", {
|
|
3180
|
+
key: p,
|
|
2511
3181
|
class: "item-row"
|
|
2512
3182
|
}, [
|
|
2513
|
-
t("div",
|
|
3183
|
+
t("div", Fl, [
|
|
2514
3184
|
e[20] || (e[20] = t("label", null, "Item Code *", -1)),
|
|
2515
|
-
|
|
3185
|
+
h(t("input", {
|
|
2516
3186
|
type: "text",
|
|
2517
|
-
"onUpdate:modelValue": (
|
|
3187
|
+
"onUpdate:modelValue": (C) => u.id = C,
|
|
2518
3188
|
required: ""
|
|
2519
|
-
}, null, 8,
|
|
2520
|
-
[k,
|
|
3189
|
+
}, null, 8, Al), [
|
|
3190
|
+
[k, u.id]
|
|
2521
3191
|
])
|
|
2522
3192
|
]),
|
|
2523
|
-
t("div",
|
|
3193
|
+
t("div", Pl, [
|
|
2524
3194
|
e[21] || (e[21] = t("label", null, "Item Description *", -1)),
|
|
2525
|
-
|
|
3195
|
+
h(t("input", {
|
|
2526
3196
|
type: "text",
|
|
2527
|
-
"onUpdate:modelValue": (
|
|
3197
|
+
"onUpdate:modelValue": (C) => u.desc = C,
|
|
2528
3198
|
required: ""
|
|
2529
|
-
}, null, 8,
|
|
2530
|
-
[k,
|
|
3199
|
+
}, null, 8, Tl), [
|
|
3200
|
+
[k, u.desc]
|
|
2531
3201
|
])
|
|
2532
3202
|
]),
|
|
2533
|
-
t("div",
|
|
3203
|
+
t("div", Il, [
|
|
2534
3204
|
e[22] || (e[22] = t("label", null, "Quantity *", -1)),
|
|
2535
|
-
|
|
3205
|
+
h(t("input", {
|
|
2536
3206
|
type: "number",
|
|
2537
|
-
"onUpdate:modelValue": (
|
|
3207
|
+
"onUpdate:modelValue": (C) => u.qty = C,
|
|
2538
3208
|
min: "1",
|
|
2539
3209
|
required: ""
|
|
2540
|
-
}, null, 8,
|
|
3210
|
+
}, null, 8, ql), [
|
|
2541
3211
|
[
|
|
2542
3212
|
k,
|
|
2543
|
-
|
|
3213
|
+
u.qty,
|
|
2544
3214
|
void 0,
|
|
2545
3215
|
{ number: !0 }
|
|
2546
3216
|
]
|
|
2547
3217
|
])
|
|
2548
3218
|
]),
|
|
2549
|
-
t("div",
|
|
3219
|
+
t("div", Rl, [
|
|
2550
3220
|
e[23] || (e[23] = t("label", null, "Unit *", -1)),
|
|
2551
|
-
|
|
2552
|
-
"onUpdate:modelValue": (
|
|
3221
|
+
h(t("select", {
|
|
3222
|
+
"onUpdate:modelValue": (C) => u.unit = C,
|
|
2553
3223
|
required: ""
|
|
2554
3224
|
}, [
|
|
2555
|
-
(o(!0),
|
|
2556
|
-
key:
|
|
2557
|
-
value:
|
|
2558
|
-
}, a(
|
|
2559
|
-
], 8,
|
|
2560
|
-
[
|
|
3225
|
+
(o(!0), r(f, null, g(n.units, (C) => (o(), r("option", {
|
|
3226
|
+
key: C,
|
|
3227
|
+
value: C
|
|
3228
|
+
}, a(C), 9, Nl))), 128))
|
|
3229
|
+
], 8, Ml), [
|
|
3230
|
+
[D, u.unit]
|
|
2561
3231
|
])
|
|
2562
3232
|
]),
|
|
2563
|
-
t("div",
|
|
3233
|
+
t("div", El, [
|
|
2564
3234
|
e[24] || (e[24] = t("label", null, "Est. Unit Cost *", -1)),
|
|
2565
|
-
|
|
3235
|
+
h(t("input", {
|
|
2566
3236
|
type: "number",
|
|
2567
|
-
"onUpdate:modelValue": (
|
|
3237
|
+
"onUpdate:modelValue": (C) => u.cost = C,
|
|
2568
3238
|
step: "0.01",
|
|
2569
3239
|
placeholder: "0.00",
|
|
2570
3240
|
required: ""
|
|
2571
|
-
}, null, 8,
|
|
3241
|
+
}, null, 8, Vl), [
|
|
2572
3242
|
[
|
|
2573
3243
|
k,
|
|
2574
|
-
|
|
3244
|
+
u.cost,
|
|
2575
3245
|
void 0,
|
|
2576
3246
|
{ number: !0 }
|
|
2577
3247
|
]
|
|
@@ -2580,8 +3250,8 @@ function yl(s, e, u, b, n, r) {
|
|
|
2580
3250
|
t("button", {
|
|
2581
3251
|
type: "button",
|
|
2582
3252
|
class: "remove-item-btn",
|
|
2583
|
-
onClick: (
|
|
2584
|
-
}, "Remove", 8,
|
|
3253
|
+
onClick: (C) => l.removeItem(p)
|
|
3254
|
+
}, "Remove", 8, Ll)
|
|
2585
3255
|
]))), 128))
|
|
2586
3256
|
])
|
|
2587
3257
|
]),
|
|
@@ -2592,267 +3262,267 @@ function yl(s, e, u, b, n, r) {
|
|
|
2592
3262
|
}, "Submit Requisition")
|
|
2593
3263
|
], -1))
|
|
2594
3264
|
], 32)
|
|
2595
|
-
])) :
|
|
2596
|
-
n.activeTab === "all-requisitions" ? (o(),
|
|
2597
|
-
t("div",
|
|
2598
|
-
(o(!0),
|
|
2599
|
-
key:
|
|
3265
|
+
])) : v("", !0),
|
|
3266
|
+
n.activeTab === "all-requisitions" ? (o(), r("div", $l, [
|
|
3267
|
+
t("div", Ol, [
|
|
3268
|
+
(o(!0), r(f, null, g(d.requisitions, (u) => (o(), r("div", {
|
|
3269
|
+
key: u.id,
|
|
2600
3270
|
class: "requisition-card"
|
|
2601
3271
|
}, [
|
|
2602
|
-
t("div",
|
|
2603
|
-
t("div",
|
|
3272
|
+
t("div", Ul, [
|
|
3273
|
+
t("div", jl, a(u.id), 1),
|
|
2604
3274
|
t("div", {
|
|
2605
|
-
class:
|
|
2606
|
-
}, a(
|
|
3275
|
+
class: b(["status-badge", `status-${u.status}`])
|
|
3276
|
+
}, a(u.status), 3)
|
|
2607
3277
|
]),
|
|
2608
|
-
t("div",
|
|
2609
|
-
(o(!0),
|
|
3278
|
+
t("div", Bl, [
|
|
3279
|
+
(o(!0), r(f, null, g(l.getRequisitionFields(u), (p) => (o(), r("div", {
|
|
2610
3280
|
class: "detail-item",
|
|
2611
|
-
key:
|
|
3281
|
+
key: p.label
|
|
2612
3282
|
}, [
|
|
2613
|
-
t("div",
|
|
2614
|
-
t("div",
|
|
3283
|
+
t("div", Hl, a(p.label), 1),
|
|
3284
|
+
t("div", Ql, a(p.value(u)), 1)
|
|
2615
3285
|
]))), 128))
|
|
2616
3286
|
]),
|
|
2617
|
-
|
|
3287
|
+
u.status === "po-created" || u.status === "delivered" ? (o(), r("div", zl, [
|
|
2618
3288
|
t("button", {
|
|
2619
|
-
onClick: (
|
|
3289
|
+
onClick: (p) => l.handleOpenPO(u.id),
|
|
2620
3290
|
class: "add-item-btn comments-section"
|
|
2621
|
-
}, " Print PO ", 8,
|
|
2622
|
-
])) :
|
|
3291
|
+
}, " Print PO ", 8, Jl)
|
|
3292
|
+
])) : v("", !0)
|
|
2623
3293
|
]))), 128))
|
|
2624
3294
|
])
|
|
2625
|
-
])) :
|
|
2626
|
-
n.activeTab === "my-requisitions" ? (o(),
|
|
2627
|
-
t("div",
|
|
2628
|
-
(o(!0),
|
|
2629
|
-
key:
|
|
3295
|
+
])) : v("", !0),
|
|
3296
|
+
n.activeTab === "my-requisitions" ? (o(), r("div", Wl, [
|
|
3297
|
+
t("div", Kl, [
|
|
3298
|
+
(o(!0), r(f, null, g(l.myRequisitions, (u) => (o(), r("div", {
|
|
3299
|
+
key: u.id,
|
|
2630
3300
|
class: "requisition-card"
|
|
2631
3301
|
}, [
|
|
2632
|
-
t("div",
|
|
2633
|
-
t("div",
|
|
3302
|
+
t("div", Gl, [
|
|
3303
|
+
t("div", Yl, a(u.id), 1),
|
|
2634
3304
|
t("div", {
|
|
2635
|
-
class:
|
|
2636
|
-
}, a(
|
|
3305
|
+
class: b(["status-badge", `status-${u.status}`])
|
|
3306
|
+
}, a(u.status), 3)
|
|
2637
3307
|
]),
|
|
2638
|
-
t("div",
|
|
2639
|
-
(o(!0),
|
|
3308
|
+
t("div", Xl, [
|
|
3309
|
+
(o(!0), r(f, null, g(l.getRequisitionFields(u), (p) => (o(), r("div", {
|
|
2640
3310
|
class: "detail-item",
|
|
2641
|
-
key:
|
|
3311
|
+
key: p.label
|
|
2642
3312
|
}, [
|
|
2643
|
-
t("div",
|
|
2644
|
-
t("div",
|
|
3313
|
+
t("div", Zl, a(p.label), 1),
|
|
3314
|
+
t("div", eo, a(p.value(u)), 1)
|
|
2645
3315
|
]))), 128))
|
|
2646
3316
|
]),
|
|
2647
|
-
|
|
3317
|
+
u.status === "info-requested" ? (o(), r("div", to, [
|
|
2648
3318
|
e[26] || (e[26] = t("label", { class: "detail-label" }, "Your Response", -1)),
|
|
2649
|
-
|
|
2650
|
-
"onUpdate:modelValue": e[6] || (e[6] = (
|
|
3319
|
+
h(t("textarea", {
|
|
3320
|
+
"onUpdate:modelValue": e[6] || (e[6] = (p) => n.infoResponse = p),
|
|
2651
3321
|
class: "response-textarea",
|
|
2652
3322
|
placeholder: "Submit more info..."
|
|
2653
3323
|
}, null, 512), [
|
|
2654
3324
|
[k, n.infoResponse]
|
|
2655
3325
|
]),
|
|
2656
3326
|
t("button", {
|
|
2657
|
-
onClick: (
|
|
3327
|
+
onClick: (p) => l.handleSubmitInfoResponse(u),
|
|
2658
3328
|
class: "add-item-btn comments-section"
|
|
2659
|
-
}, " Submit Info ", 8,
|
|
2660
|
-
])) :
|
|
3329
|
+
}, " Submit Info ", 8, so)
|
|
3330
|
+
])) : v("", !0)
|
|
2661
3331
|
]))), 128))
|
|
2662
3332
|
])
|
|
2663
|
-
])) :
|
|
2664
|
-
n.activeTab === "approvals" ? (o(),
|
|
3333
|
+
])) : v("", !0),
|
|
3334
|
+
n.activeTab === "approvals" ? (o(), r("div", io, [
|
|
2665
3335
|
e[29] || (e[29] = t("div", { style: { "margin-bottom": "20px" } }, [
|
|
2666
3336
|
t("h3", { style: { color: "#1e40af", "margin-bottom": "15px" } }, "Department Supervisor Dashboard"),
|
|
2667
3337
|
t("div", { style: { background: "#fef3c7", padding: "15px", "border-radius": "10px", "border-left": "4px solid #f59e0b" } }, [
|
|
2668
3338
|
t("strong", null, "Role:"),
|
|
2669
|
-
|
|
3339
|
+
w(" Department Supervisor - Review requests for accuracy, necessity, and budget compliance ")
|
|
2670
3340
|
])
|
|
2671
3341
|
], -1)),
|
|
2672
|
-
t("div",
|
|
2673
|
-
(o(!0),
|
|
2674
|
-
key:
|
|
3342
|
+
t("div", no, [
|
|
3343
|
+
(o(!0), r(f, null, g(l.reviewRequisitions, (u) => (o(), r("div", {
|
|
3344
|
+
key: u.id,
|
|
2675
3345
|
class: "requisition-card"
|
|
2676
3346
|
}, [
|
|
2677
|
-
t("div",
|
|
2678
|
-
t("div",
|
|
3347
|
+
t("div", lo, [
|
|
3348
|
+
t("div", oo, a(u.id), 1)
|
|
2679
3349
|
]),
|
|
2680
|
-
t("div",
|
|
2681
|
-
(o(!0),
|
|
3350
|
+
t("div", ro, [
|
|
3351
|
+
(o(!0), r(f, null, g(n.requisitionFields, (p) => (o(), r("div", {
|
|
2682
3352
|
class: "detail-item",
|
|
2683
|
-
key:
|
|
3353
|
+
key: p.label
|
|
2684
3354
|
}, [
|
|
2685
|
-
t("div",
|
|
2686
|
-
t("div",
|
|
3355
|
+
t("div", ao, a(p.label), 1),
|
|
3356
|
+
t("div", uo, a(p.value(u)), 1)
|
|
2687
3357
|
]))), 128))
|
|
2688
3358
|
]),
|
|
2689
|
-
t("div",
|
|
3359
|
+
t("div", co, [
|
|
2690
3360
|
e[27] || (e[27] = t("div", { class: "detail-label" }, "Justification", -1)),
|
|
2691
|
-
t("div",
|
|
3361
|
+
t("div", mo, a(u.justification || "N/A"), 1)
|
|
2692
3362
|
]),
|
|
2693
|
-
t("div",
|
|
3363
|
+
t("div", vo, [
|
|
2694
3364
|
e[28] || (e[28] = t("div", { class: "detail-label" }, "Items", -1)),
|
|
2695
|
-
t("ul",
|
|
2696
|
-
(o(!0),
|
|
3365
|
+
t("ul", po, [
|
|
3366
|
+
(o(!0), r(f, null, g(u.items, (p, C) => (o(), r("li", { key: C }, a(p.desc) + " - " + a(p.qty) + " " + a(p.unit) + " @ ₦" + a(p.cost.toFixed(2)) + " each ", 1))), 128))
|
|
2697
3367
|
])
|
|
2698
3368
|
]),
|
|
2699
3369
|
t("button", {
|
|
2700
3370
|
type: "button",
|
|
2701
3371
|
class: "add-item-btn",
|
|
2702
|
-
onClick: (
|
|
2703
|
-
}, "Approve", 8,
|
|
3372
|
+
onClick: (p) => l.handleApproveRequisition(u.id)
|
|
3373
|
+
}, "Approve", 8, ho),
|
|
2704
3374
|
t("button", {
|
|
2705
3375
|
type: "button",
|
|
2706
3376
|
class: "marginbox btn-reject",
|
|
2707
|
-
onClick: (
|
|
2708
|
-
}, "Decline", 8,
|
|
3377
|
+
onClick: (p) => l.handleDeclineRequisition(u.id)
|
|
3378
|
+
}, "Decline", 8, fo),
|
|
2709
3379
|
t("button", {
|
|
2710
3380
|
type: "button",
|
|
2711
3381
|
class: "marginbox btn-request",
|
|
2712
|
-
onClick: (
|
|
2713
|
-
}, "Request Info", 8,
|
|
3382
|
+
onClick: (p) => l.handleInfoRequisition(u.id)
|
|
3383
|
+
}, "Request Info", 8, go)
|
|
2714
3384
|
]))), 128))
|
|
2715
3385
|
])
|
|
2716
|
-
])) :
|
|
2717
|
-
n.activeTab === "purchasing" ? (o(),
|
|
3386
|
+
])) : v("", !0),
|
|
3387
|
+
n.activeTab === "purchasing" ? (o(), r("div", bo, [
|
|
2718
3388
|
e[32] || (e[32] = t("div", { style: { "margin-bottom": "20px" } }, [
|
|
2719
3389
|
t("h3", { style: { color: "#1e40af", "margin-bottom": "15px" } }, "Purchasing Department Dashboard"),
|
|
2720
3390
|
t("div", { style: { background: "#dbeafe", padding: "15px", "border-radius": "10px", "border-left": "4px solid #3b82f6" } }, [
|
|
2721
3391
|
t("strong", null, "Role:"),
|
|
2722
|
-
|
|
3392
|
+
w(" Purchasing Team - Convert approved requisitions to Purchase Orders ")
|
|
2723
3393
|
])
|
|
2724
3394
|
], -1)),
|
|
2725
|
-
t("div",
|
|
2726
|
-
(o(!0),
|
|
2727
|
-
key:
|
|
3395
|
+
t("div", yo, [
|
|
3396
|
+
(o(!0), r(f, null, g(l.poRequisitions, (u) => (o(), r("div", {
|
|
3397
|
+
key: u.id,
|
|
2728
3398
|
class: "requisition-card"
|
|
2729
3399
|
}, [
|
|
2730
|
-
t("div",
|
|
2731
|
-
t("div",
|
|
3400
|
+
t("div", wo, [
|
|
3401
|
+
t("div", ko, a(u.id), 1)
|
|
2732
3402
|
]),
|
|
2733
|
-
t("div",
|
|
2734
|
-
(o(!0),
|
|
3403
|
+
t("div", Co, [
|
|
3404
|
+
(o(!0), r(f, null, g(n.requisitionFields, (p) => (o(), r("div", {
|
|
2735
3405
|
class: "detail-item",
|
|
2736
|
-
key:
|
|
3406
|
+
key: p.label
|
|
2737
3407
|
}, [
|
|
2738
|
-
t("div",
|
|
2739
|
-
t("div",
|
|
3408
|
+
t("div", _o, a(p.label), 1),
|
|
3409
|
+
t("div", Do, a(p.value(u)), 1)
|
|
2740
3410
|
]))), 128))
|
|
2741
3411
|
]),
|
|
2742
|
-
t("div",
|
|
3412
|
+
t("div", xo, [
|
|
2743
3413
|
e[30] || (e[30] = t("div", { class: "detail-label" }, "Justification", -1)),
|
|
2744
|
-
t("div",
|
|
3414
|
+
t("div", So, a(u.justification || "N/A"), 1)
|
|
2745
3415
|
]),
|
|
2746
|
-
t("div",
|
|
3416
|
+
t("div", Fo, [
|
|
2747
3417
|
e[31] || (e[31] = t("div", { class: "detail-label" }, "Items", -1)),
|
|
2748
|
-
t("ul",
|
|
2749
|
-
(o(!0),
|
|
3418
|
+
t("ul", Ao, [
|
|
3419
|
+
(o(!0), r(f, null, g(u.items, (p, C) => (o(), r("li", { key: C }, a(p.desc) + " - " + a(p.qty) + " " + a(p.unit) + " @ ₦" + a(p.cost.toFixed(2)) + " each ", 1))), 128))
|
|
2750
3420
|
])
|
|
2751
3421
|
]),
|
|
2752
3422
|
t("button", {
|
|
2753
3423
|
type: "button",
|
|
2754
3424
|
class: "add-item-btn",
|
|
2755
|
-
onClick: (
|
|
2756
|
-
}, "Create PO", 8,
|
|
3425
|
+
onClick: (p) => l.handleCreatePO(u.id)
|
|
3426
|
+
}, "Create PO", 8, Po)
|
|
2757
3427
|
]))), 128))
|
|
2758
3428
|
])
|
|
2759
|
-
])) :
|
|
2760
|
-
n.activeTab === "receiving" ? (o(),
|
|
3429
|
+
])) : v("", !0),
|
|
3430
|
+
n.activeTab === "receiving" ? (o(), r("div", To, [
|
|
2761
3431
|
e[35] || (e[35] = t("div", { style: { "margin-bottom": "20px" } }, [
|
|
2762
3432
|
t("h3", { style: { color: "#1e40af", "margin-bottom": "15px" } }, "Receiving & Inventory Dashboard"),
|
|
2763
3433
|
t("div", { style: { background: "#dcfce7", padding: "15px", "border-radius": "10px", "border-left": "4px solid #10b981" } }, [
|
|
2764
3434
|
t("strong", null, "Role:"),
|
|
2765
|
-
|
|
3435
|
+
w(" Warehouse Team - Process incoming deliveries and update inventory ")
|
|
2766
3436
|
])
|
|
2767
3437
|
], -1)),
|
|
2768
|
-
t("div",
|
|
2769
|
-
(o(!0),
|
|
2770
|
-
key:
|
|
3438
|
+
t("div", Io, [
|
|
3439
|
+
(o(!0), r(f, null, g(l.awaitingDelivery, (u) => (o(), r("div", {
|
|
3440
|
+
key: u.id,
|
|
2771
3441
|
class: "requisition-card"
|
|
2772
3442
|
}, [
|
|
2773
|
-
t("div",
|
|
2774
|
-
t("div",
|
|
3443
|
+
t("div", qo, [
|
|
3444
|
+
t("div", Ro, a(u.id), 1)
|
|
2775
3445
|
]),
|
|
2776
|
-
t("div",
|
|
2777
|
-
(o(!0),
|
|
3446
|
+
t("div", Mo, [
|
|
3447
|
+
(o(!0), r(f, null, g(n.requisitionFields, (p) => (o(), r("div", {
|
|
2778
3448
|
class: "detail-item",
|
|
2779
|
-
key:
|
|
3449
|
+
key: p.label
|
|
2780
3450
|
}, [
|
|
2781
|
-
t("div",
|
|
2782
|
-
t("div",
|
|
3451
|
+
t("div", No, a(p.label), 1),
|
|
3452
|
+
t("div", Eo, a(p.value(u)), 1)
|
|
2783
3453
|
]))), 128))
|
|
2784
3454
|
]),
|
|
2785
|
-
t("div",
|
|
3455
|
+
t("div", Vo, [
|
|
2786
3456
|
e[33] || (e[33] = t("div", { class: "detail-label" }, "Justification", -1)),
|
|
2787
|
-
t("div",
|
|
3457
|
+
t("div", Lo, a(u.justification || "N/A"), 1)
|
|
2788
3458
|
]),
|
|
2789
|
-
t("div",
|
|
3459
|
+
t("div", $o, [
|
|
2790
3460
|
e[34] || (e[34] = t("div", { class: "detail-label" }, "Items", -1)),
|
|
2791
|
-
t("ul",
|
|
2792
|
-
(o(!0),
|
|
3461
|
+
t("ul", Oo, [
|
|
3462
|
+
(o(!0), r(f, null, g(u.items, (p, C) => (o(), r("li", { key: C }, a(p.desc) + " - " + a(p.qty) + " " + a(p.unit) + " @ ₦" + a(p.cost.toFixed(2)) + " each ", 1))), 128))
|
|
2793
3463
|
])
|
|
2794
3464
|
]),
|
|
2795
3465
|
t("button", {
|
|
2796
3466
|
type: "button",
|
|
2797
3467
|
class: "add-item-btn",
|
|
2798
|
-
onClick: (
|
|
2799
|
-
}, "Accept Delivery", 8,
|
|
3468
|
+
onClick: (p) => l.handleAcceptDelivery(u.id)
|
|
3469
|
+
}, "Accept Delivery", 8, Uo)
|
|
2800
3470
|
]))), 128))
|
|
2801
3471
|
])
|
|
2802
|
-
])) :
|
|
2803
|
-
n.activeTab === "po" ? (o(),
|
|
2804
|
-
t("div",
|
|
2805
|
-
t("div",
|
|
2806
|
-
t("div",
|
|
3472
|
+
])) : v("", !0),
|
|
3473
|
+
n.activeTab === "po" ? (o(), r("div", jo, [
|
|
3474
|
+
t("div", Bo, [
|
|
3475
|
+
t("div", Ho, [
|
|
3476
|
+
t("div", Qo, [
|
|
2807
3477
|
e[41] || (e[41] = t("h3", null, "Vendor Information", -1)),
|
|
2808
|
-
t("div",
|
|
3478
|
+
t("div", zo, [
|
|
2809
3479
|
e[36] || (e[36] = t("span", { class: "info-label" }, "Company:", -1)),
|
|
2810
|
-
t("span",
|
|
3480
|
+
t("span", Jo, a(n.vendorInfo.company || ((i = n.poDetails.vendorInfo) == null ? void 0 : i.company)), 1)
|
|
2811
3481
|
]),
|
|
2812
|
-
t("div",
|
|
3482
|
+
t("div", Wo, [
|
|
2813
3483
|
e[37] || (e[37] = t("span", { class: "info-label" }, "Contact:", -1)),
|
|
2814
|
-
t("span",
|
|
3484
|
+
t("span", Ko, a(n.vendorInfo.contact || ((c = n.poDetails.vendorInfo) == null ? void 0 : c.contact)), 1)
|
|
2815
3485
|
]),
|
|
2816
|
-
t("div",
|
|
3486
|
+
t("div", Go, [
|
|
2817
3487
|
e[38] || (e[38] = t("span", { class: "info-label" }, "Email:", -1)),
|
|
2818
|
-
t("span",
|
|
3488
|
+
t("span", Yo, a(n.vendorInfo.email || ((y = n.poDetails.vendorInfo) == null ? void 0 : y.email)), 1)
|
|
2819
3489
|
]),
|
|
2820
|
-
t("div",
|
|
3490
|
+
t("div", Xo, [
|
|
2821
3491
|
e[39] || (e[39] = t("span", { class: "info-label" }, "Phone:", -1)),
|
|
2822
|
-
t("span",
|
|
3492
|
+
t("span", Zo, a(n.vendorInfo.phone || ((A = n.poDetails.vendorInfo) == null ? void 0 : A.phone)), 1)
|
|
2823
3493
|
]),
|
|
2824
|
-
t("div",
|
|
3494
|
+
t("div", er, [
|
|
2825
3495
|
e[40] || (e[40] = t("span", { class: "info-label" }, "Address:", -1)),
|
|
2826
|
-
t("span",
|
|
3496
|
+
t("span", tr, a(n.vendorInfo.address || ((P = n.poDetails.vendorInfo) == null ? void 0 : P.address)), 1)
|
|
2827
3497
|
])
|
|
2828
3498
|
]),
|
|
2829
|
-
t("div",
|
|
3499
|
+
t("div", sr, [
|
|
2830
3500
|
e[47] || (e[47] = t("h3", null, "Purchase Order Details", -1)),
|
|
2831
|
-
t("div",
|
|
3501
|
+
t("div", ir, [
|
|
2832
3502
|
e[42] || (e[42] = t("span", { class: "info-label" }, "PO Number:", -1)),
|
|
2833
|
-
t("span",
|
|
3503
|
+
t("span", nr, a(n.poDetails.id), 1)
|
|
2834
3504
|
]),
|
|
2835
|
-
t("div",
|
|
3505
|
+
t("div", lr, [
|
|
2836
3506
|
e[43] || (e[43] = t("span", { class: "info-label" }, "Date:", -1)),
|
|
2837
|
-
t("span",
|
|
3507
|
+
t("span", or, a(n.vendorInfo.poDate || ((T = n.poDetails.vendorInfo) == null ? void 0 : T.poDate)), 1)
|
|
2838
3508
|
]),
|
|
2839
|
-
t("div",
|
|
3509
|
+
t("div", rr, [
|
|
2840
3510
|
e[44] || (e[44] = t("span", { class: "info-label" }, "Requested By:", -1)),
|
|
2841
|
-
t("span",
|
|
3511
|
+
t("span", ar, a(n.vendorInfo.poApproved || ((I = n.poDetails.vendorInfo) == null ? void 0 : I.poApproved)), 1)
|
|
2842
3512
|
]),
|
|
2843
|
-
t("div",
|
|
3513
|
+
t("div", dr, [
|
|
2844
3514
|
e[45] || (e[45] = t("span", { class: "info-label" }, "Department:", -1)),
|
|
2845
|
-
t("span",
|
|
3515
|
+
t("span", ur, "PO-" + a(n.poDetails.department), 1)
|
|
2846
3516
|
]),
|
|
2847
|
-
t("div",
|
|
3517
|
+
t("div", cr, [
|
|
2848
3518
|
e[46] || (e[46] = t("span", { class: "info-label" }, "Delivery Date:", -1)),
|
|
2849
|
-
t("span",
|
|
3519
|
+
t("span", mr, a(n.poDetails.neededDate), 1)
|
|
2850
3520
|
])
|
|
2851
3521
|
])
|
|
2852
3522
|
]),
|
|
2853
|
-
t("div",
|
|
3523
|
+
t("div", vr, [
|
|
2854
3524
|
e[57] || (e[57] = t("h2", { class: "section-title" }, "Order Items", -1)),
|
|
2855
|
-
t("table",
|
|
3525
|
+
t("table", pr, [
|
|
2856
3526
|
t("thead", null, [
|
|
2857
3527
|
t("tr", null, [
|
|
2858
3528
|
e[48] || (e[48] = t("th", null, "Item #", -1)),
|
|
@@ -2860,141 +3530,149 @@ function yl(s, e, u, b, n, r) {
|
|
|
2860
3530
|
e[50] || (e[50] = t("th", null, "Quantity", -1)),
|
|
2861
3531
|
e[51] || (e[51] = t("th", null, "Unit Price", -1)),
|
|
2862
3532
|
e[52] || (e[52] = t("th", null, "Total", -1)),
|
|
2863
|
-
n.isPrinting ?
|
|
3533
|
+
n.isPrinting ? v("", !0) : (o(), r("th", hr, "Actions"))
|
|
2864
3534
|
])
|
|
2865
3535
|
]),
|
|
2866
3536
|
t("tbody", null, [
|
|
2867
|
-
(o(!0),
|
|
2868
|
-
t("td", null, a(
|
|
2869
|
-
t("td", null, a(
|
|
2870
|
-
t("td", null, a(
|
|
3537
|
+
(o(!0), r(f, null, g(n.poDetails.items || [], (u, p) => (o(), r("tr", { key: p }, [
|
|
3538
|
+
t("td", null, a(u.itemNumber), 1),
|
|
3539
|
+
t("td", null, a(u.desc), 1),
|
|
3540
|
+
t("td", null, a(u.qty), 1),
|
|
2871
3541
|
t("td", null, [
|
|
2872
|
-
|
|
3542
|
+
u.editing ? h((o(), r("input", {
|
|
2873
3543
|
key: 1,
|
|
2874
|
-
"onUpdate:modelValue": (
|
|
3544
|
+
"onUpdate:modelValue": (C) => u.tempPrice = C,
|
|
2875
3545
|
type: "number",
|
|
2876
3546
|
step: "0.01",
|
|
2877
|
-
class:
|
|
2878
|
-
}, null, 10,
|
|
3547
|
+
class: b(["price-input", { "price-changed": u.cost !== u.tempPrice }])
|
|
3548
|
+
}, null, 10, br)), [
|
|
2879
3549
|
[
|
|
2880
3550
|
k,
|
|
2881
|
-
|
|
3551
|
+
u.tempPrice,
|
|
2882
3552
|
void 0,
|
|
2883
3553
|
{ number: !0 }
|
|
2884
3554
|
]
|
|
2885
|
-
]) : (o(),
|
|
2886
|
-
|
|
2887
|
-
|
|
3555
|
+
]) : (o(), r("span", fr, [
|
|
3556
|
+
w(" $" + a(u.cost.toFixed(2)) + " ", 1),
|
|
3557
|
+
u.cost !== u.unitPrice ? (o(), r("span", gr, "!")) : v("", !0)
|
|
2888
3558
|
]))
|
|
2889
3559
|
]),
|
|
2890
|
-
t("td", null, "$" + a((
|
|
2891
|
-
n.isPrinting ?
|
|
2892
|
-
|
|
3560
|
+
t("td", null, "$" + a((u.unitPrice * u.qty).toFixed(2)), 1),
|
|
3561
|
+
n.isPrinting ? v("", !0) : (o(), r("td", yr, [
|
|
3562
|
+
u.editing ? (o(), r("div", kr, [
|
|
2893
3563
|
t("button", {
|
|
2894
|
-
onClick: (
|
|
3564
|
+
onClick: (C) => l.savePrice(p),
|
|
2895
3565
|
class: "save-btn"
|
|
2896
|
-
}, "Save", 8,
|
|
3566
|
+
}, "Save", 8, Cr),
|
|
2897
3567
|
t("button", {
|
|
2898
|
-
onClick: (
|
|
3568
|
+
onClick: (C) => l.cancelEdit(p),
|
|
2899
3569
|
class: "cancel-btn"
|
|
2900
|
-
}, "Cancel", 8,
|
|
2901
|
-
])) : (o(),
|
|
3570
|
+
}, "Cancel", 8, _r)
|
|
3571
|
+
])) : (o(), r("button", {
|
|
2902
3572
|
key: 0,
|
|
2903
|
-
onClick: (
|
|
3573
|
+
onClick: (C) => l.startEdit(p),
|
|
2904
3574
|
class: "edit-btn"
|
|
2905
|
-
}, " Edit Price ", 8,
|
|
3575
|
+
}, " Edit Price ", 8, wr))
|
|
2906
3576
|
]))
|
|
2907
3577
|
]))), 128))
|
|
2908
3578
|
])
|
|
2909
3579
|
]),
|
|
2910
|
-
(o(!0),
|
|
2911
|
-
key: "note-" +
|
|
3580
|
+
(o(!0), r(f, null, g(n.poDetails.items || [], (u, p) => (o(), r("div", {
|
|
3581
|
+
key: "note-" + p
|
|
2912
3582
|
}, [
|
|
2913
|
-
|
|
2914
|
-
t("strong", null, "Price Change Justification (Item " + a(
|
|
2915
|
-
|
|
2916
|
-
])) :
|
|
3583
|
+
u.justification ? (o(), r("div", Dr, [
|
|
3584
|
+
t("strong", null, "Price Change Justification (Item " + a(u.itemNumber) + "):", 1),
|
|
3585
|
+
w(" " + a(u.justification), 1)
|
|
3586
|
+
])) : v("", !0)
|
|
2917
3587
|
]))), 128)),
|
|
2918
|
-
t("div",
|
|
2919
|
-
t("div",
|
|
3588
|
+
t("div", xr, [
|
|
3589
|
+
t("div", Sr, [
|
|
2920
3590
|
e[53] || (e[53] = t("span", null, "Subtotal:", -1)),
|
|
2921
|
-
t("span", null, "$" + a(
|
|
3591
|
+
t("span", null, "$" + a(l.subTotal.toFixed(2)), 1)
|
|
2922
3592
|
]),
|
|
2923
|
-
t("div",
|
|
3593
|
+
t("div", Fr, [
|
|
2924
3594
|
e[54] || (e[54] = t("span", null, "Tax (%):", -1)),
|
|
2925
|
-
t("span", null, "$" + a(
|
|
3595
|
+
t("span", null, "$" + a(l.getOptional(n.vendorInfo.tax)), 1)
|
|
2926
3596
|
]),
|
|
2927
|
-
t("div",
|
|
3597
|
+
t("div", Ar, [
|
|
2928
3598
|
e[55] || (e[55] = t("span", null, "Shipping:", -1)),
|
|
2929
|
-
t("span", null, "$" + a(
|
|
3599
|
+
t("span", null, "$" + a(l.getOptional(n.vendorInfo.shipping)), 1)
|
|
2930
3600
|
]),
|
|
2931
|
-
t("div",
|
|
3601
|
+
t("div", Pr, [
|
|
2932
3602
|
e[56] || (e[56] = t("span", null, "Grand Total:", -1)),
|
|
2933
|
-
t("span", null, "$" + a((
|
|
3603
|
+
t("span", null, "$" + a((l.subTotal + l.getOptional(n.vendorInfo.tax) + l.getOptional(n.vendorInfo.shipping)).toFixed(2)), 1)
|
|
2934
3604
|
])
|
|
2935
3605
|
])
|
|
2936
3606
|
])
|
|
2937
3607
|
]),
|
|
2938
|
-
n.showJustificationModal ? (o(),
|
|
3608
|
+
n.showJustificationModal ? (o(), r("div", {
|
|
2939
3609
|
key: 0,
|
|
2940
3610
|
class: "justification-modal",
|
|
2941
|
-
onClick: e[10] || (e[10] =
|
|
3611
|
+
onClick: e[10] || (e[10] = _((...u) => l.closeJustificationModal && l.closeJustificationModal(...u), ["self"]))
|
|
2942
3612
|
}, [
|
|
2943
|
-
t("div",
|
|
3613
|
+
t("div", Tr, [
|
|
2944
3614
|
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((
|
|
3615
|
+
t("p", Ir, [
|
|
3616
|
+
e[58] || (e[58] = w(" Please provide a justification for changing the price from ", -1)),
|
|
3617
|
+
t("strong", null, "$" + a((R = (q = l.currentItem) == null ? void 0 : q.cost) == null ? void 0 : R.toFixed(2)), 1),
|
|
3618
|
+
e[59] || (e[59] = w(" to ", -1)),
|
|
3619
|
+
t("strong", null, "$" + a((N = (M = l.currentItem) == null ? void 0 : M.tempPrice) == null ? void 0 : N.toFixed(2)), 1)
|
|
2950
3620
|
]),
|
|
2951
|
-
|
|
2952
|
-
"onUpdate:modelValue": e[7] || (e[7] = (
|
|
3621
|
+
h(t("textarea", {
|
|
3622
|
+
"onUpdate:modelValue": e[7] || (e[7] = (u) => n.justificationText = u),
|
|
2953
3623
|
class: "justification-textarea",
|
|
2954
3624
|
placeholder: "Enter justification for price change...",
|
|
2955
3625
|
required: ""
|
|
2956
3626
|
}, null, 512), [
|
|
2957
3627
|
[k, n.justificationText]
|
|
2958
3628
|
]),
|
|
2959
|
-
t("div",
|
|
3629
|
+
t("div", qr, [
|
|
2960
3630
|
t("button", {
|
|
2961
|
-
onClick: e[8] || (e[8] = (...
|
|
3631
|
+
onClick: e[8] || (e[8] = (...u) => l.closeJustificationModal && l.closeJustificationModal(...u)),
|
|
2962
3632
|
class: "cancel-btn"
|
|
2963
3633
|
}, "Cancel"),
|
|
2964
3634
|
t("button", {
|
|
2965
|
-
onClick: e[9] || (e[9] = (...
|
|
3635
|
+
onClick: e[9] || (e[9] = (...u) => l.confirmPriceChange && l.confirmPriceChange(...u)),
|
|
2966
3636
|
class: "save-btn",
|
|
2967
3637
|
disabled: !n.justificationText.trim()
|
|
2968
|
-
}, " Confirm Change ", 8,
|
|
3638
|
+
}, " Confirm Change ", 8, Rr)
|
|
2969
3639
|
])
|
|
2970
3640
|
])
|
|
2971
|
-
])) :
|
|
2972
|
-
n.isPrinting ?
|
|
3641
|
+
])) : v("", !0),
|
|
3642
|
+
n.isPrinting ? v("", !0) : (o(), r("button", {
|
|
2973
3643
|
key: 1,
|
|
2974
3644
|
type: "button",
|
|
2975
3645
|
class: "add-item-btn",
|
|
2976
|
-
onClick: e[11] || (e[11] = (
|
|
3646
|
+
onClick: e[11] || (e[11] = (u) => l.handleFinishPO(n.poDetails.id))
|
|
2977
3647
|
}, "Approve PO"))
|
|
2978
|
-
])) :
|
|
2979
|
-
n.activeTab === "workflow" ? (o(),
|
|
3648
|
+
])) : v("", !0),
|
|
3649
|
+
n.activeTab === "workflow" ? (o(), r("div", Mr, e[61] || (e[61] = [
|
|
2980
3650
|
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
|
-
]))) :
|
|
3651
|
+
]))) : v("", !0)
|
|
2982
3652
|
]);
|
|
2983
3653
|
}
|
|
2984
|
-
const
|
|
3654
|
+
const Er = /* @__PURE__ */ S(cl, [["render", Nr]]), Lr = (s = {}) => ({
|
|
2985
3655
|
brandName: s.brandName || "OceanHelm",
|
|
2986
3656
|
logoIcon: s.logoIcon || "bi bi-water",
|
|
2987
3657
|
showLogo: s.showLogo !== !1,
|
|
2988
3658
|
responsive: s.responsive !== !1,
|
|
2989
3659
|
...s
|
|
2990
|
-
}),
|
|
3660
|
+
}), $r = [
|
|
2991
3661
|
{
|
|
2992
3662
|
type: "link",
|
|
2993
3663
|
label: "Home",
|
|
2994
3664
|
icon: "bi bi-speedometer2",
|
|
3665
|
+
roles: ["owner", "staff", "captain"],
|
|
2995
3666
|
href: "/app/dashboard",
|
|
2996
3667
|
active: !0
|
|
2997
3668
|
},
|
|
3669
|
+
{
|
|
3670
|
+
type: "button",
|
|
3671
|
+
label: "Guide",
|
|
3672
|
+
icon: "bi bi-compass",
|
|
3673
|
+
action: "guide"
|
|
3674
|
+
// roles: ['crew']
|
|
3675
|
+
},
|
|
2998
3676
|
{
|
|
2999
3677
|
type: "link",
|
|
3000
3678
|
label: "Activity Log",
|
|
@@ -3003,6 +3681,14 @@ const wl = /* @__PURE__ */ S(Gi, [["render", yl]]), Cl = (s = {}) => ({
|
|
|
3003
3681
|
roles: ["owner"]
|
|
3004
3682
|
// Role-based visibility
|
|
3005
3683
|
},
|
|
3684
|
+
{
|
|
3685
|
+
type: "link",
|
|
3686
|
+
label: "People Manager",
|
|
3687
|
+
icon: "bi bi-person-plus",
|
|
3688
|
+
href: "/app/people-manager",
|
|
3689
|
+
roles: ["owner"]
|
|
3690
|
+
// Role-based visibility
|
|
3691
|
+
},
|
|
3006
3692
|
{
|
|
3007
3693
|
type: "text",
|
|
3008
3694
|
label: "Modules"
|
|
@@ -3010,6 +3696,7 @@ const wl = /* @__PURE__ */ S(Gi, [["render", yl]]), Cl = (s = {}) => ({
|
|
|
3010
3696
|
{
|
|
3011
3697
|
type: "dropdown",
|
|
3012
3698
|
label: "Compliance",
|
|
3699
|
+
roles: ["owner", "staff", "captain"],
|
|
3013
3700
|
icon: "bi bi-list-ul",
|
|
3014
3701
|
children: [
|
|
3015
3702
|
{
|
|
@@ -3019,13 +3706,6 @@ const wl = /* @__PURE__ */ S(Gi, [["render", yl]]), Cl = (s = {}) => ({
|
|
|
3019
3706
|
{
|
|
3020
3707
|
type: "separator"
|
|
3021
3708
|
},
|
|
3022
|
-
{
|
|
3023
|
-
label: "Crew Certification",
|
|
3024
|
-
action: "crew-cert"
|
|
3025
|
-
},
|
|
3026
|
-
{
|
|
3027
|
-
type: "separator"
|
|
3028
|
-
},
|
|
3029
3709
|
{
|
|
3030
3710
|
label: "Reports",
|
|
3031
3711
|
action: "reports"
|
|
@@ -3044,12 +3724,14 @@ const wl = /* @__PURE__ */ S(Gi, [["render", yl]]), Cl = (s = {}) => ({
|
|
|
3044
3724
|
type: "button",
|
|
3045
3725
|
label: "Maintenance",
|
|
3046
3726
|
icon: "bi bi-tools",
|
|
3047
|
-
action: "maintenance"
|
|
3727
|
+
action: "maintenance",
|
|
3728
|
+
roles: ["owner", "staff", "captain"]
|
|
3048
3729
|
},
|
|
3049
3730
|
{
|
|
3050
3731
|
type: "dropdown",
|
|
3051
3732
|
label: "Crew Management",
|
|
3052
3733
|
icon: "bi bi-people",
|
|
3734
|
+
roles: ["owner", "staff", "captain"],
|
|
3053
3735
|
children: [
|
|
3054
3736
|
{
|
|
3055
3737
|
label: "All Crew",
|
|
@@ -3069,25 +3751,29 @@ const wl = /* @__PURE__ */ S(Gi, [["render", yl]]), Cl = (s = {}) => ({
|
|
|
3069
3751
|
type: "link",
|
|
3070
3752
|
label: "Inventory Management",
|
|
3071
3753
|
icon: "bi bi-clipboard-data",
|
|
3072
|
-
href: "/app/inventory"
|
|
3754
|
+
href: "/app/inventory",
|
|
3755
|
+
roles: ["owner", "staff", "captain"]
|
|
3073
3756
|
},
|
|
3074
3757
|
{
|
|
3075
3758
|
type: "link",
|
|
3076
3759
|
label: "Requisition Processing",
|
|
3077
3760
|
icon: "bi bi-calendar-check",
|
|
3078
|
-
href: "/app/requisition"
|
|
3761
|
+
href: "/app/requisition",
|
|
3762
|
+
roles: ["owner", "staff", "captain"]
|
|
3079
3763
|
},
|
|
3080
3764
|
{
|
|
3081
3765
|
type: "button",
|
|
3082
3766
|
label: "Voyage Manager",
|
|
3083
3767
|
icon: "fas fa-ship",
|
|
3084
|
-
action: "coming-soon"
|
|
3768
|
+
action: "coming-soon",
|
|
3769
|
+
roles: ["owner", "staff", "captain"]
|
|
3085
3770
|
},
|
|
3086
3771
|
{
|
|
3087
3772
|
type: "button",
|
|
3088
3773
|
label: "Vessel Log",
|
|
3089
3774
|
icon: "bi bi-file-ruled",
|
|
3090
|
-
action: "vessel-log"
|
|
3775
|
+
action: "vessel-log",
|
|
3776
|
+
roles: ["owner", "staff", "captain"]
|
|
3091
3777
|
},
|
|
3092
3778
|
{
|
|
3093
3779
|
type: "button",
|
|
@@ -3096,28 +3782,43 @@ const wl = /* @__PURE__ */ S(Gi, [["render", yl]]), Cl = (s = {}) => ({
|
|
|
3096
3782
|
action: "settings",
|
|
3097
3783
|
roles: ["owner", "staff"]
|
|
3098
3784
|
},
|
|
3785
|
+
{
|
|
3786
|
+
type: "button",
|
|
3787
|
+
label: "Profile",
|
|
3788
|
+
icon: "bi bi-people",
|
|
3789
|
+
action: "crew-profile"
|
|
3790
|
+
// roles: ['crew']
|
|
3791
|
+
},
|
|
3792
|
+
{
|
|
3793
|
+
type: "button",
|
|
3794
|
+
label: "Schedule",
|
|
3795
|
+
icon: "bi bi-card-checklist",
|
|
3796
|
+
action: "schedule"
|
|
3797
|
+
// roles: ['crew']
|
|
3798
|
+
},
|
|
3099
3799
|
{
|
|
3100
3800
|
type: "button",
|
|
3101
3801
|
label: "Help & Support",
|
|
3102
3802
|
icon: "bi bi-question-circle",
|
|
3103
3803
|
action: "help"
|
|
3104
3804
|
}
|
|
3105
|
-
],
|
|
3805
|
+
], Or = (s, e) => !s.roles || s.roles.length === 0 ? !0 : s.roles.includes(e == null ? void 0 : e.role), Ur = {
|
|
3106
3806
|
install(s, e = {}) {
|
|
3107
|
-
s.component("ConfigurableSidebar",
|
|
3807
|
+
s.component("ConfigurableSidebar", Z), s.component("VesselLists", Ne), s.component("DashHead", Ue), s.component("Reports", ht), s.component("ActivityLogs", Ri), s.component("CrewManagement", ul), s.component("RequisitionSystem", Er), s.component("OceanHelmMaintenance", ri), s.provide("sidebarConfig", e);
|
|
3108
3808
|
}
|
|
3109
3809
|
};
|
|
3110
3810
|
export {
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3811
|
+
Ri as ActivityLogs,
|
|
3812
|
+
Z as ConfigurableSidebar,
|
|
3813
|
+
ul as CrewManagement,
|
|
3114
3814
|
Ue as DashHead,
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3815
|
+
ri as OceanHelmMaintenance,
|
|
3816
|
+
ht as Reports,
|
|
3817
|
+
Er as RequisitionSystem,
|
|
3818
|
+
Ne as VesselList,
|
|
3819
|
+
Lr as createSidebarConfig,
|
|
3820
|
+
Ur as default,
|
|
3821
|
+
$r as defaultMenuItems,
|
|
3822
|
+
Or as defaultPermissionChecker
|
|
3122
3823
|
};
|
|
3123
3824
|
//# sourceMappingURL=oceanhelm.es.js.map
|