oceanhelm 0.0.8 → 0.0.9
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 +1093 -1009
- package/dist/oceanhelm.es.js.map +1 -1
- package/dist/oceanhelm.umd.js +1 -1
- package/dist/oceanhelm.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/components/DashHead.vue +1 -1
- package/src/components/RequisitionSystem.vue +1 -1
- package/src/components/VesselList.vue +53 -6
- package/src/utils/sidebarConfig.js +35 -2
package/dist/oceanhelm.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { openBlock as o, createElementBlock as l, normalizeClass as g, createElementVNode as
|
|
2
|
-
const S = (s,
|
|
1
|
+
import { openBlock as o, createElementBlock as l, normalizeClass as g, createElementVNode as t, toDisplayString as a, createCommentVNode as m, Fragment as p, renderList as h, withModifiers as D, createTextVNode as C, renderSlot as O, withDirectives as v, vShow as P, normalizeStyle as E, createStaticVNode as x, vModelText as k, vModelSelect as _, vModelCheckbox as N } from "vue";
|
|
2
|
+
const S = (s, e) => {
|
|
3
3
|
const u = s.__vccOpts || s;
|
|
4
|
-
for (const [b, n] of
|
|
4
|
+
for (const [b, n] of e)
|
|
5
5
|
u[b] = n;
|
|
6
6
|
return u;
|
|
7
7
|
}, U = {
|
|
@@ -52,7 +52,7 @@ const S = (s, t) => {
|
|
|
52
52
|
return this.customClasses;
|
|
53
53
|
},
|
|
54
54
|
filteredMenuItems() {
|
|
55
|
-
return this.menuItems.filter((s) => this.hasPermission(s) ? s.type === "dropdown" && s.children ? s.children.some((
|
|
55
|
+
return this.menuItems.filter((s) => this.hasPermission(s) ? s.type === "dropdown" && s.children ? s.children.some((e) => this.hasPermission(e)) : !0 : !1);
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
mounted() {
|
|
@@ -61,7 +61,7 @@ const S = (s, t) => {
|
|
|
61
61
|
methods: {
|
|
62
62
|
// Get filtered children for dropdown items
|
|
63
63
|
getFilteredChildren(s) {
|
|
64
|
-
return s.children ? s.children.filter((
|
|
64
|
+
return s.children ? s.children.filter((e) => this.hasPermission(e)) : [];
|
|
65
65
|
},
|
|
66
66
|
// Permission checking
|
|
67
67
|
hasPermission(s) {
|
|
@@ -69,8 +69,8 @@ const S = (s, t) => {
|
|
|
69
69
|
},
|
|
70
70
|
// Navigation handling
|
|
71
71
|
handleNavigation(s) {
|
|
72
|
-
var
|
|
73
|
-
this.$emit("navigate", s), s.href && !s.preventDefault && (s.external ? window.open(s.href, "_blank") : (
|
|
72
|
+
var e;
|
|
73
|
+
this.$emit("navigate", s), s.href && !s.preventDefault && (s.external ? window.open(s.href, "_blank") : (e = this.$router) == null || e.push(s.href));
|
|
74
74
|
},
|
|
75
75
|
// Action handling
|
|
76
76
|
handleAction(s) {
|
|
@@ -82,12 +82,12 @@ const S = (s, t) => {
|
|
|
82
82
|
},
|
|
83
83
|
// Responsive behavior
|
|
84
84
|
initializeResponsiveBehavior() {
|
|
85
|
-
const s = document.getElementById("sidebarToggle"),
|
|
86
|
-
!s || !
|
|
87
|
-
|
|
85
|
+
const s = document.getElementById("sidebarToggle"), e = document.getElementById("sidebar"), u = document.getElementById("content");
|
|
86
|
+
!s || !e || !u || (window.innerWidth >= 768 && (e.classList.toggle("active"), u.classList.toggle("active")), s.addEventListener("click", () => {
|
|
87
|
+
e.classList.toggle("active"), u.classList.toggle("active");
|
|
88
88
|
}), document.addEventListener("click", (b) => {
|
|
89
|
-
const n =
|
|
90
|
-
!n && !
|
|
89
|
+
const n = e.contains(b.target), r = s.contains(b.target);
|
|
90
|
+
!n && !r && window.innerWidth < 768 && e.classList.contains("active") && (e.classList.remove("active"), u.classList.remove("active"));
|
|
91
91
|
}));
|
|
92
92
|
}
|
|
93
93
|
},
|
|
@@ -95,7 +95,7 @@ const S = (s, t) => {
|
|
|
95
95
|
}, L = {
|
|
96
96
|
key: 0,
|
|
97
97
|
class: "logo d-flex align-items-center left"
|
|
98
|
-
},
|
|
98
|
+
}, j = { class: "list-unstyled components mt-4" }, $ = ["onClick"], B = ["href", "onClick"], H = ["onClick"], Q = {
|
|
99
99
|
class: "dropdown-toggle",
|
|
100
100
|
type: "button",
|
|
101
101
|
"data-bs-toggle": "dropdown",
|
|
@@ -107,61 +107,61 @@ const S = (s, t) => {
|
|
|
107
107
|
key: 3,
|
|
108
108
|
class: "dropdown-divider"
|
|
109
109
|
}, z = { key: 4 };
|
|
110
|
-
function Y(s,
|
|
110
|
+
function Y(s, e, u, b, n, r) {
|
|
111
111
|
return o(), l("nav", {
|
|
112
112
|
id: "sidebar",
|
|
113
|
-
class: g(
|
|
113
|
+
class: g(r.sidebarClasses)
|
|
114
114
|
}, [
|
|
115
115
|
u.showLogo ? (o(), l("div", L, [
|
|
116
|
-
|
|
116
|
+
t("i", {
|
|
117
117
|
class: g([u.logoIcon, "me-2"])
|
|
118
118
|
}, null, 2),
|
|
119
|
-
|
|
119
|
+
t("span", null, a(u.brandName), 1)
|
|
120
120
|
])) : m("", !0),
|
|
121
|
-
|
|
122
|
-
(o(!0), l(p, null, h(
|
|
121
|
+
t("ul", j, [
|
|
122
|
+
(o(!0), l(p, null, h(r.filteredMenuItems, (i, f) => (o(), l("li", {
|
|
123
123
|
key: f,
|
|
124
124
|
class: g({ active: i.active, dropdown: i.type === "dropdown" }),
|
|
125
|
-
onClick: (y) =>
|
|
125
|
+
onClick: (y) => r.handleItemClick(i)
|
|
126
126
|
}, [
|
|
127
127
|
i.type === "link" ? (o(), l("a", {
|
|
128
128
|
key: 0,
|
|
129
129
|
href: i.href || "#",
|
|
130
|
-
onClick: D((y) =>
|
|
130
|
+
onClick: D((y) => r.handleNavigation(i), ["prevent"])
|
|
131
131
|
}, [
|
|
132
132
|
i.icon ? (o(), l("i", {
|
|
133
133
|
key: 0,
|
|
134
134
|
class: g(i.icon)
|
|
135
135
|
}, null, 2)) : m("", !0),
|
|
136
|
-
|
|
136
|
+
C(" " + a(i.label), 1)
|
|
137
137
|
], 8, B)) : i.type === "button" ? (o(), l("a", {
|
|
138
138
|
key: 1,
|
|
139
|
-
onClick: D((y) =>
|
|
139
|
+
onClick: D((y) => r.handleAction(i), ["prevent"]),
|
|
140
140
|
style: { cursor: "pointer" }
|
|
141
141
|
}, [
|
|
142
142
|
i.icon ? (o(), l("i", {
|
|
143
143
|
key: 0,
|
|
144
144
|
class: g(i.icon)
|
|
145
145
|
}, null, 2)) : m("", !0),
|
|
146
|
-
|
|
146
|
+
C(" " + a(i.label), 1)
|
|
147
147
|
], 8, H)) : i.type === "dropdown" ? (o(), l(p, { key: 2 }, [
|
|
148
|
-
|
|
148
|
+
t("a", Q, [
|
|
149
149
|
i.icon ? (o(), l("i", {
|
|
150
150
|
key: 0,
|
|
151
151
|
class: g(i.icon)
|
|
152
152
|
}, null, 2)) : m("", !0),
|
|
153
|
-
|
|
153
|
+
C(" " + a(i.label), 1)
|
|
154
154
|
]),
|
|
155
|
-
|
|
156
|
-
(o(!0), l(p, null, h(
|
|
155
|
+
t("div", J, [
|
|
156
|
+
(o(!0), l(p, null, h(r.getFilteredChildren(i), (y, A) => (o(), l("a", {
|
|
157
157
|
key: A,
|
|
158
158
|
class: "dropdown-item black",
|
|
159
|
-
onClick: D((q) =>
|
|
159
|
+
onClick: D((q) => r.handleAction(y), ["prevent"]),
|
|
160
160
|
style: { cursor: "pointer" }
|
|
161
|
-
},
|
|
161
|
+
}, a(y.label), 9, W))), 128))
|
|
162
162
|
])
|
|
163
|
-
], 64)) : i.type === "separator" ? (o(), l("div", G)) : i.type === "text" ? (o(), l("a", z,
|
|
164
|
-
], 10,
|
|
163
|
+
], 64)) : i.type === "separator" ? (o(), l("div", G)) : i.type === "text" ? (o(), l("a", z, a(i.label), 1)) : m("", !0)
|
|
164
|
+
], 10, $))), 128))
|
|
165
165
|
]),
|
|
166
166
|
O(s.$slots, "footer")
|
|
167
167
|
], 2);
|
|
@@ -203,6 +203,12 @@ const X = {
|
|
|
203
203
|
})
|
|
204
204
|
}
|
|
205
205
|
},
|
|
206
|
+
data() {
|
|
207
|
+
return {
|
|
208
|
+
activeFilter: "All"
|
|
209
|
+
// 'All', 'Active', or 'Inactive'
|
|
210
|
+
};
|
|
211
|
+
},
|
|
206
212
|
emits: [
|
|
207
213
|
"vessel-add",
|
|
208
214
|
"vessel-click",
|
|
@@ -220,11 +226,21 @@ const X = {
|
|
|
220
226
|
inactiveVesselsCount() {
|
|
221
227
|
return this.vessels.filter((s) => s.status === "Inactive").length;
|
|
222
228
|
},
|
|
229
|
+
filteredVessels() {
|
|
230
|
+
return this.activeFilter === "All" ? this.vessels : this.vessels.filter((s) => s.status === this.activeFilter);
|
|
231
|
+
},
|
|
223
232
|
canAddVessel() {
|
|
224
233
|
return this.config.enableAdd && (this.userProfile.role === "owner" || this.userProfile.role === "staff");
|
|
225
234
|
}
|
|
226
235
|
},
|
|
227
236
|
methods: {
|
|
237
|
+
// Filter methods
|
|
238
|
+
filterVessels(s) {
|
|
239
|
+
this.activeFilter = s;
|
|
240
|
+
},
|
|
241
|
+
clearFilter() {
|
|
242
|
+
this.activeFilter = "All";
|
|
243
|
+
},
|
|
228
244
|
// Event handlers that emit to parent
|
|
229
245
|
handleAddVessel() {
|
|
230
246
|
if (!this.canAddVessel) {
|
|
@@ -234,13 +250,13 @@ const X = {
|
|
|
234
250
|
this.$emit("vessel-add");
|
|
235
251
|
},
|
|
236
252
|
handleVesselClick(s) {
|
|
237
|
-
const
|
|
253
|
+
const e = {
|
|
238
254
|
vessel: s,
|
|
239
255
|
route: this.currentRoute,
|
|
240
256
|
id: s.registrationNumber,
|
|
241
257
|
name: s.name
|
|
242
258
|
};
|
|
243
|
-
this.grantAccess(s) ? this.currentRoute === "dashboard" ? this.$emit("vessel-click", s) : this.$emit("vessel-navigate",
|
|
259
|
+
this.grantAccess(s) ? this.currentRoute === "dashboard" ? this.$emit("vessel-click", s) : this.$emit("vessel-navigate", e) : this.handleAccessDenied("this protected route");
|
|
244
260
|
},
|
|
245
261
|
handleDeleteVessel(s) {
|
|
246
262
|
if (!this.grantAccess(s)) {
|
|
@@ -270,11 +286,11 @@ const X = {
|
|
|
270
286
|
statusClass(s) {
|
|
271
287
|
return `status-${(s == null ? void 0 : s.toLowerCase()) || ""}`;
|
|
272
288
|
},
|
|
273
|
-
getDuration(s,
|
|
289
|
+
getDuration(s, e) {
|
|
274
290
|
const u = /* @__PURE__ */ new Date(), b = new Date(s), n = u - b;
|
|
275
291
|
if (n < 0)
|
|
276
292
|
return "Invalid (future date)";
|
|
277
|
-
const
|
|
293
|
+
const r = Math.floor(n / (1e3 * 60 * 60)), i = Math.floor(r / 24), f = r % 24;
|
|
278
294
|
let y = "";
|
|
279
295
|
return i > 0 && (y += `${i} day${i > 1 ? "s" : ""}`), f > 0 && (y += (y ? " " : "") + `${f} hr${f > 1 ? "s" : ""}`), y || "0 hr";
|
|
280
296
|
},
|
|
@@ -282,163 +298,198 @@ const X = {
|
|
|
282
298
|
this.$emit("date-change", s);
|
|
283
299
|
},
|
|
284
300
|
grantAccess(s) {
|
|
285
|
-
const { role:
|
|
286
|
-
return
|
|
301
|
+
const { role: e, vessel: u } = this.userProfile;
|
|
302
|
+
return e === "owner" || e === "staff" || e === "captain" && u === s.name;
|
|
287
303
|
},
|
|
288
304
|
getDaysToExpiry(s) {
|
|
289
305
|
if (!s)
|
|
290
306
|
return null;
|
|
291
|
-
const
|
|
307
|
+
const e = /* @__PURE__ */ new Date(), b = new Date(s) - e;
|
|
292
308
|
return Math.ceil(b / (1e3 * 60 * 60 * 24));
|
|
293
309
|
},
|
|
294
310
|
getExpiryClass(s) {
|
|
295
|
-
const
|
|
296
|
-
return
|
|
311
|
+
const e = this.getDaysToExpiry(s);
|
|
312
|
+
return e === null ? "" : e < 30 ? "cert-critical" : e < 90 ? "cert-warning" : "";
|
|
297
313
|
}
|
|
298
314
|
}
|
|
299
|
-
}, Z = { class: "row mb-3" }, ee = { class: "col-md-4" }, te = { class: "card
|
|
315
|
+
}, Z = { class: "row mb-3" }, ee = { class: "col-md-4" }, te = { class: "card-body d-flex align-items-center" }, se = { class: "mt-2 mb-0" }, ie = { class: "col-md-4" }, ne = { class: "card-body d-flex align-items-center" }, oe = { class: "mt-2 mb-0" }, le = {
|
|
300
316
|
key: 0,
|
|
301
317
|
class: "col-md-4"
|
|
302
|
-
},
|
|
318
|
+
}, re = { class: "d-flex justify-content-between align-items-center mb-4" }, ae = {
|
|
303
319
|
key: 0,
|
|
320
|
+
class: "alert alert-info mb-3",
|
|
321
|
+
role: "alert"
|
|
322
|
+
}, de = {
|
|
323
|
+
key: 1,
|
|
304
324
|
class: "text-center py-4"
|
|
305
325
|
}, ue = {
|
|
306
|
-
key:
|
|
326
|
+
key: 2,
|
|
307
327
|
class: "alert alert-primary",
|
|
308
328
|
role: "alert"
|
|
309
329
|
}, ce = {
|
|
310
|
-
key:
|
|
330
|
+
key: 3,
|
|
331
|
+
class: "alert alert-warning",
|
|
332
|
+
role: "alert"
|
|
333
|
+
}, me = { class: "alert-heading" }, ve = { class: "mb-0" }, pe = {
|
|
334
|
+
key: 4,
|
|
311
335
|
class: "row"
|
|
312
|
-
},
|
|
336
|
+
}, fe = ["onClick"], he = { class: "card-body d-flex align-items-center" }, ge = { class: "flex-grow-1" }, be = { class: "d-flex justify-content-between align-items-center mb-2" }, ye = { class: "card-title mb-0" }, we = { class: "row" }, ke = { class: "col-6" }, Ce = { class: "mb-0" }, _e = {
|
|
313
337
|
key: 0,
|
|
314
338
|
class: "col-6"
|
|
315
|
-
},
|
|
339
|
+
}, De = { class: "mb-0" }, xe = { class: "mb-0" }, Se = {
|
|
316
340
|
key: 1,
|
|
317
341
|
class: "col-6"
|
|
318
|
-
},
|
|
319
|
-
function
|
|
342
|
+
}, Pe = { class: "text-muted" }, Ae = ["onClick"], qe = { class: "action-icon v-left delete" }, Te = ["onClick"], Ie = ["onClick"];
|
|
343
|
+
function Re(s, e, u, b, n, r) {
|
|
320
344
|
return o(), l(p, null, [
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
345
|
+
t("div", Z, [
|
|
346
|
+
t("div", ee, [
|
|
347
|
+
t("div", {
|
|
348
|
+
class: g(["card border-0 shadow-sm", { "border-primary border-2": n.activeFilter === "Active" }]),
|
|
349
|
+
onClick: e[0] || (e[0] = (i) => r.filterVessels("Active")),
|
|
350
|
+
style: { cursor: "pointer" }
|
|
351
|
+
}, [
|
|
352
|
+
t("div", te, [
|
|
353
|
+
e[5] || (e[5] = t("div", { class: "rounded-circle bg-primary bg-opacity-10 p-3 me-3" }, [
|
|
354
|
+
t("i", { class: "bi bi-check-circle-fill text-primary fs-4" })
|
|
327
355
|
], -1)),
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
356
|
+
t("div", null, [
|
|
357
|
+
e[4] || (e[4] = t("h6", { class: "mb-0" }, "Active Vessels", -1)),
|
|
358
|
+
t("h3", se, a(r.activeVesselsCount), 1)
|
|
331
359
|
])
|
|
332
360
|
])
|
|
333
|
-
])
|
|
361
|
+
], 2)
|
|
334
362
|
]),
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
363
|
+
t("div", ie, [
|
|
364
|
+
t("div", {
|
|
365
|
+
class: g(["card border-0 shadow-sm", { "border-secondary border-2": n.activeFilter === "Inactive" }]),
|
|
366
|
+
onClick: e[1] || (e[1] = (i) => r.filterVessels("Inactive")),
|
|
367
|
+
style: { cursor: "pointer" }
|
|
368
|
+
}, [
|
|
369
|
+
t("div", ne, [
|
|
370
|
+
e[7] || (e[7] = t("div", { class: "rounded-circle bg-secondary bg-opacity-10 p-3 me-3" }, [
|
|
371
|
+
t("i", { class: "bi bi-pause-circle-fill text-secondary fs-4" })
|
|
340
372
|
], -1)),
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
373
|
+
t("div", null, [
|
|
374
|
+
e[6] || (e[6] = t("h6", { class: "mb-0" }, "Inactive", -1)),
|
|
375
|
+
t("h3", oe, a(r.inactiveVesselsCount), 1)
|
|
344
376
|
])
|
|
345
377
|
])
|
|
346
|
-
])
|
|
378
|
+
], 2)
|
|
347
379
|
]),
|
|
348
|
-
|
|
349
|
-
|
|
380
|
+
r.canAddVessel ? (o(), l("div", le, [
|
|
381
|
+
t("div", {
|
|
350
382
|
class: "card border-0 shadow-sm",
|
|
351
|
-
onClick:
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
383
|
+
onClick: e[2] || (e[2] = (...i) => r.handleAddVessel && r.handleAddVessel(...i)),
|
|
384
|
+
style: { cursor: "pointer" }
|
|
385
|
+
}, e[8] || (e[8] = [
|
|
386
|
+
t("div", { class: "card-body d-flex align-items-center" }, [
|
|
387
|
+
t("div", { class: "rounded-circle bg-success bg-opacity-10 p-3 me-3" }, [
|
|
388
|
+
t("i", { class: "bi bi-patch-plus-fill text-success fs-4" })
|
|
356
389
|
]),
|
|
357
|
-
|
|
358
|
-
|
|
390
|
+
t("div", null, [
|
|
391
|
+
t("h6", { class: "mb-0" }, "Add New Vessel")
|
|
359
392
|
])
|
|
360
393
|
], -1)
|
|
361
394
|
]))
|
|
362
395
|
])) : m("", !0)
|
|
363
396
|
]),
|
|
364
|
-
t
|
|
365
|
-
e("
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
397
|
+
t("div", re, [
|
|
398
|
+
e[10] || (e[10] = t("h4", { class: "mb-0" }, [
|
|
399
|
+
t("i", { class: "bi bi-ship me-2" }),
|
|
400
|
+
C("Registered Vessels")
|
|
401
|
+
], -1)),
|
|
402
|
+
n.activeFilter !== "All" ? (o(), l("button", {
|
|
403
|
+
key: 0,
|
|
404
|
+
class: "btn btn-sm btn-outline-secondary",
|
|
405
|
+
onClick: e[3] || (e[3] = (...i) => r.clearFilter && r.clearFilter(...i))
|
|
406
|
+
}, e[9] || (e[9] = [
|
|
407
|
+
t("i", { class: "bi bi-x-circle me-1" }, null, -1),
|
|
408
|
+
C("Clear Filter ", -1)
|
|
409
|
+
]))) : m("", !0)
|
|
410
|
+
]),
|
|
411
|
+
n.activeFilter !== "All" ? (o(), l("div", ae, [
|
|
412
|
+
e[11] || (e[11] = C(" Showing ", -1)),
|
|
413
|
+
t("strong", null, a(n.activeFilter), 1),
|
|
414
|
+
C(" vessels (" + a(r.filteredVessels.length) + ") ", 1)
|
|
415
|
+
])) : m("", !0),
|
|
416
|
+
u.loading ? (o(), l("div", de, e[12] || (e[12] = [
|
|
417
|
+
t("div", {
|
|
370
418
|
class: "spinner-border text-primary",
|
|
371
419
|
role: "status"
|
|
372
420
|
}, [
|
|
373
|
-
|
|
421
|
+
t("span", { class: "visually-hidden" }, "Loading...")
|
|
374
422
|
], -1),
|
|
375
|
-
|
|
376
|
-
]))) :
|
|
377
|
-
(
|
|
423
|
+
t("p", { class: "mt-2" }, "Loading vessels...", -1)
|
|
424
|
+
]))) : !r.filteredVessels.length && n.activeFilter === "All" ? (o(), l("div", ue, e[13] || (e[13] = [
|
|
425
|
+
t("h4", { class: "alert-heading" }, "Empty Fleet!", -1),
|
|
426
|
+
t("p", null, "You have an empty fleet, you have not added any vessel yet.", -1),
|
|
427
|
+
t("hr", null, null, -1),
|
|
428
|
+
t("p", { class: "mb-0" }, "Click on the add vessel button above, to start adding vessels to your fleet", -1)
|
|
429
|
+
]))) : !r.filteredVessels.length && n.activeFilter !== "All" ? (o(), l("div", ce, [
|
|
430
|
+
t("h4", me, "No " + a(n.activeFilter) + " Vessels", 1),
|
|
431
|
+
t("p", ve, "There are no " + a(n.activeFilter.toLowerCase()) + " vessels in your fleet.", 1)
|
|
432
|
+
])) : (o(), l("div", pe, [
|
|
433
|
+
(o(!0), l(p, null, h(r.filteredVessels, (i) => (o(), l("div", {
|
|
378
434
|
class: "col-lg-6",
|
|
379
435
|
key: i.registrationNumber || i.id
|
|
380
436
|
}, [
|
|
381
|
-
|
|
437
|
+
t("div", {
|
|
382
438
|
class: "vessel-card",
|
|
383
|
-
onClick: (f) =>
|
|
439
|
+
onClick: (f) => r.handleVesselClick(i)
|
|
384
440
|
}, [
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
441
|
+
t("div", he, [
|
|
442
|
+
e[17] || (e[17] = t("div", { class: "vessel-icon v-left" }, [
|
|
443
|
+
t("i", { class: "fas fa-ship" })
|
|
388
444
|
], -1)),
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
class: g(["vessel-status",
|
|
394
|
-
},
|
|
445
|
+
t("div", ge, [
|
|
446
|
+
t("div", be, [
|
|
447
|
+
t("h5", ye, a(i.name), 1),
|
|
448
|
+
t("span", {
|
|
449
|
+
class: g(["vessel-status", r.statusClass(i.status)])
|
|
450
|
+
}, a(i.status), 3)
|
|
395
451
|
]),
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
452
|
+
t("div", we, [
|
|
453
|
+
t("div", ke, [
|
|
454
|
+
e[14] || (e[14] = t("small", { class: "text-muted" }, "Registration #:", -1)),
|
|
455
|
+
t("p", Ce, a(i.registrationNumber), 1)
|
|
400
456
|
]),
|
|
401
|
-
i.date ? (o(), l("div",
|
|
457
|
+
i.date ? (o(), l("div", _e, [
|
|
402
458
|
i.status === "Active" ? (o(), l(p, { key: 0 }, [
|
|
403
|
-
|
|
404
|
-
|
|
459
|
+
e[15] || (e[15] = t("small", { class: "text-muted" }, "Active Duration:", -1)),
|
|
460
|
+
t("p", De, a(r.getDuration(i.date, i.registrationNumber)), 1)
|
|
405
461
|
], 64)) : (o(), l(p, { key: 1 }, [
|
|
406
|
-
|
|
407
|
-
|
|
462
|
+
e[16] || (e[16] = t("small", { class: "text-muted" }, "Inactive Duration:", -1)),
|
|
463
|
+
t("p", xe, a(r.getDuration(i.date, i.registrationNumber)), 1)
|
|
408
464
|
], 64))
|
|
409
|
-
])) : (o(), l("div",
|
|
410
|
-
|
|
411
|
-
|
|
465
|
+
])) : (o(), l("div", Se, [
|
|
466
|
+
t("small", Pe, a(i.status) + " Duration:", 1),
|
|
467
|
+
t("button", {
|
|
412
468
|
type: "button",
|
|
413
469
|
class: "btn btn-outline-primary btn-sm mt-1",
|
|
414
|
-
onClick: D((f) =>
|
|
415
|
-
}, " Set Date ", 8,
|
|
470
|
+
onClick: D((f) => r.setVesselDate(i.registrationNumber), ["stop"])
|
|
471
|
+
}, " Set Date ", 8, Ae)
|
|
416
472
|
]))
|
|
417
473
|
])
|
|
418
474
|
])
|
|
419
475
|
]),
|
|
420
|
-
|
|
421
|
-
|
|
476
|
+
t("div", qe, [
|
|
477
|
+
t("i", {
|
|
422
478
|
class: "bi bi-trash",
|
|
423
|
-
onClick: D((f) =>
|
|
424
|
-
}, null, 8,
|
|
479
|
+
onClick: D((f) => r.handleDeleteVessel(i), ["stop"])
|
|
480
|
+
}, null, 8, Te)
|
|
425
481
|
]),
|
|
426
|
-
|
|
482
|
+
t("button", {
|
|
427
483
|
class: "btn btn-primary",
|
|
428
|
-
onClick: D((f) =>
|
|
429
|
-
},
|
|
430
|
-
], 8,
|
|
484
|
+
onClick: D((f) => r.handleToggleStatus(i), ["stop"])
|
|
485
|
+
}, a(i.status === "Active" ? "Mark Inactive" : "Mark Active"), 9, Ie)
|
|
486
|
+
], 8, fe)
|
|
431
487
|
]))), 128))
|
|
432
|
-
]))
|
|
433
|
-
e("h4", { class: "alert-heading" }, "Empty Fleet!", -1),
|
|
434
|
-
e("p", null, "You have an empty fleet, you have not added any vessel yet.", -1),
|
|
435
|
-
e("hr", null, null, -1),
|
|
436
|
-
e("p", { class: "mb-0" }, "Click on the add vessel button above, to start adding vessels to your fleet", -1)
|
|
437
|
-
])))
|
|
488
|
+
]))
|
|
438
489
|
], 64);
|
|
439
490
|
}
|
|
440
|
-
const
|
|
441
|
-
const
|
|
491
|
+
const Fe = /* @__PURE__ */ S(X, [["render", Re]]);
|
|
492
|
+
const Ve = {
|
|
442
493
|
name: "DashHead",
|
|
443
494
|
props: {
|
|
444
495
|
name: {
|
|
@@ -463,29 +514,29 @@ const Ie = {
|
|
|
463
514
|
this.$emit("logged-in");
|
|
464
515
|
}
|
|
465
516
|
}
|
|
466
|
-
},
|
|
467
|
-
function
|
|
468
|
-
return o(), l("div",
|
|
469
|
-
|
|
470
|
-
|
|
517
|
+
}, Me = { class: "page-header d-flex justify-content-between align-items-center" }, Ee = { style: { "margin-left": "20px" } }, Ne = { class: "d-flex" };
|
|
518
|
+
function Oe(s, e, u, b, n, r) {
|
|
519
|
+
return o(), l("div", Me, [
|
|
520
|
+
t("h4", Ee, a(u.name), 1),
|
|
521
|
+
t("div", Ne, [
|
|
471
522
|
this.userProfile.role == "owner" ? (o(), l("button", {
|
|
472
523
|
key: 0,
|
|
473
524
|
class: "btn btn-outline-primary me-2",
|
|
474
|
-
onClick:
|
|
475
|
-
},
|
|
476
|
-
|
|
477
|
-
|
|
525
|
+
onClick: e[0] || (e[0] = (i) => r.addUser())
|
|
526
|
+
}, e[2] || (e[2] = [
|
|
527
|
+
t("i", { class: "bi bi-bell" }, null, -1),
|
|
528
|
+
t("span", { class: "badge bg-danger" }, "1", -1)
|
|
478
529
|
]))) : m("", !0),
|
|
479
|
-
|
|
530
|
+
t("button", {
|
|
480
531
|
class: "btn btn-outline-primary",
|
|
481
|
-
onClick:
|
|
482
|
-
},
|
|
483
|
-
|
|
532
|
+
onClick: e[1] || (e[1] = (i) => r.loggedIn())
|
|
533
|
+
}, e[3] || (e[3] = [
|
|
534
|
+
t("i", { class: "bi bi-person-circle" }, null, -1)
|
|
484
535
|
]))
|
|
485
536
|
])
|
|
486
537
|
]);
|
|
487
538
|
}
|
|
488
|
-
const
|
|
539
|
+
const Ue = /* @__PURE__ */ S(Ve, [["render", Oe]]), Le = {
|
|
489
540
|
name: "OceanHelmMaintenance",
|
|
490
541
|
props: {
|
|
491
542
|
vesselInfo: {
|
|
@@ -588,10 +639,10 @@ const Ee = /* @__PURE__ */ S(Ie, [["render", Fe]]), Ne = {
|
|
|
588
639
|
computed: {
|
|
589
640
|
filteredTasks() {
|
|
590
641
|
let s = [...this.tasks];
|
|
591
|
-
if (this.activeFilter === "all" ? s = s.filter((
|
|
592
|
-
const
|
|
642
|
+
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
|
+
const e = this.searchQuery.toLowerCase();
|
|
593
644
|
s = s.filter(
|
|
594
|
-
(u) => u.component.toLowerCase().includes(
|
|
645
|
+
(u) => u.component.toLowerCase().includes(e) || u.taskName.toLowerCase().includes(e) || u.assignedTo.toLowerCase().includes(e)
|
|
595
646
|
);
|
|
596
647
|
}
|
|
597
648
|
return s;
|
|
@@ -609,31 +660,31 @@ const Ee = /* @__PURE__ */ S(Ie, [["render", Fe]]), Ne = {
|
|
|
609
660
|
return this.checklistButtonLabel !== "Save Checklist";
|
|
610
661
|
},
|
|
611
662
|
totalEstimatedHours() {
|
|
612
|
-
return this.maintenanceTasks.reduce((s,
|
|
663
|
+
return this.maintenanceTasks.reduce((s, e) => s + (e.estimatedHours || 0), 0);
|
|
613
664
|
}
|
|
614
665
|
},
|
|
615
666
|
methods: {
|
|
616
667
|
grantAccess(s) {
|
|
617
|
-
const
|
|
618
|
-
return
|
|
668
|
+
const e = this.userProfile;
|
|
669
|
+
return e.role === "owner" || e.role === "staff" || e.role === "captain" && e.vessel === s;
|
|
619
670
|
},
|
|
620
671
|
deepAccess() {
|
|
621
672
|
const s = this.userProfile;
|
|
622
673
|
return s.role === "owner" || s.role === "captain" ? !0 : (this.$emit("access-denied", "You do not have access to do this"), !1);
|
|
623
674
|
},
|
|
624
675
|
deleteTask(s) {
|
|
625
|
-
this.checklists = this.checklists.filter((
|
|
676
|
+
this.checklists = this.checklists.filter((e) => e.id !== s);
|
|
626
677
|
},
|
|
627
678
|
addTask(s) {
|
|
628
679
|
s && s.preventDefault(), this.$emit("show-message", {
|
|
629
680
|
type: "prompt",
|
|
630
681
|
title: "Add New Task",
|
|
631
682
|
message: "Enter the task details",
|
|
632
|
-
callback: (
|
|
633
|
-
if (
|
|
683
|
+
callback: (e) => {
|
|
684
|
+
if (e) {
|
|
634
685
|
const u = {
|
|
635
686
|
id: Date.now(),
|
|
636
|
-
text:
|
|
687
|
+
text: e,
|
|
637
688
|
completed: !1
|
|
638
689
|
};
|
|
639
690
|
this.checklists.push(u);
|
|
@@ -647,8 +698,8 @@ const Ee = /* @__PURE__ */ S(Ie, [["render", Fe]]), Ne = {
|
|
|
647
698
|
loadChecklist(s) {
|
|
648
699
|
this.isLoading = !0, this.$emit("generate-checklist", {
|
|
649
700
|
component: s,
|
|
650
|
-
callback: (
|
|
651
|
-
this.checklists =
|
|
701
|
+
callback: (e) => {
|
|
702
|
+
this.checklists = e.map((u) => ({
|
|
652
703
|
...u,
|
|
653
704
|
completed: !1
|
|
654
705
|
})), this.isLoading = !1;
|
|
@@ -657,13 +708,13 @@ const Ee = /* @__PURE__ */ S(Ie, [["render", Fe]]), Ne = {
|
|
|
657
708
|
},
|
|
658
709
|
showMaintenance(s) {
|
|
659
710
|
if (this.deepAccess()) {
|
|
660
|
-
const
|
|
661
|
-
|
|
711
|
+
const e = this.tasks.find((u) => u.component === s);
|
|
712
|
+
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";
|
|
662
713
|
}
|
|
663
714
|
},
|
|
664
715
|
printMaintenance(s) {
|
|
665
|
-
const
|
|
666
|
-
this.maintenanceTasks = [
|
|
716
|
+
const e = this.tasks.find((u) => u.component === s);
|
|
717
|
+
this.maintenanceTasks = [e], this.loadMaintenanceData(), this.showReport = !0, this.$nextTick(() => {
|
|
667
718
|
setTimeout(() => {
|
|
668
719
|
window.print(), this.showReport = !1;
|
|
669
720
|
}, 100);
|
|
@@ -694,12 +745,12 @@ const Ee = /* @__PURE__ */ S(Ie, [["render", Fe]]), Ne = {
|
|
|
694
745
|
"lastPerformed",
|
|
695
746
|
"assignedTo"
|
|
696
747
|
];
|
|
697
|
-
for (const
|
|
698
|
-
if (!this.form[
|
|
748
|
+
for (const e of s)
|
|
749
|
+
if (!this.form[e])
|
|
699
750
|
return this.$emit("show-message", {
|
|
700
751
|
type: "error",
|
|
701
752
|
title: "Missing info",
|
|
702
|
-
message: `Please fill in the required field: ${
|
|
753
|
+
message: `Please fill in the required field: ${e}`
|
|
703
754
|
}), !1;
|
|
704
755
|
return !0;
|
|
705
756
|
},
|
|
@@ -707,11 +758,11 @@ const Ee = /* @__PURE__ */ S(Ie, [["render", Fe]]), Ne = {
|
|
|
707
758
|
this.activeSection = s.id, typeof s.onClick == "function" && s.onClick();
|
|
708
759
|
},
|
|
709
760
|
calculateNextDue() {
|
|
710
|
-
const s = this.form.lastPerformed ? new Date(this.form.lastPerformed) : null,
|
|
711
|
-
if (!s || !
|
|
761
|
+
const s = this.form.lastPerformed ? new Date(this.form.lastPerformed) : null, e = this.form.recurrence;
|
|
762
|
+
if (!s || !e)
|
|
712
763
|
return;
|
|
713
764
|
let u = new Date(s);
|
|
714
|
-
switch (
|
|
765
|
+
switch (e) {
|
|
715
766
|
case "daily":
|
|
716
767
|
u.setDate(u.getDate() + 1);
|
|
717
768
|
break;
|
|
@@ -741,9 +792,9 @@ const Ee = /* @__PURE__ */ S(Ie, [["render", Fe]]), Ne = {
|
|
|
741
792
|
this.form.remainingDays = null;
|
|
742
793
|
return;
|
|
743
794
|
}
|
|
744
|
-
const s = /* @__PURE__ */ new Date(),
|
|
745
|
-
s.setHours(0, 0, 0, 0),
|
|
746
|
-
const u =
|
|
795
|
+
const s = /* @__PURE__ */ new Date(), e = new Date(this.form.nextDue);
|
|
796
|
+
s.setHours(0, 0, 0, 0), e.setHours(0, 0, 0, 0);
|
|
797
|
+
const u = e - s, b = Math.ceil(u / (1e3 * 60 * 60 * 24));
|
|
747
798
|
this.form.remainingDays = `${b} Days`;
|
|
748
799
|
},
|
|
749
800
|
async saveSchedule() {
|
|
@@ -795,9 +846,9 @@ const Ee = /* @__PURE__ */ S(Ie, [["render", Fe]]), Ne = {
|
|
|
795
846
|
s.completed = !s.completed;
|
|
796
847
|
},
|
|
797
848
|
async resetTasks() {
|
|
798
|
-
const
|
|
849
|
+
const e = this.checklists.every((b) => b.completed) ? "Completed" : "Soon", u = {
|
|
799
850
|
checklistProgress: [...this.checklists],
|
|
800
|
-
status:
|
|
851
|
+
status: e,
|
|
801
852
|
component: this.currentTask,
|
|
802
853
|
after: this.after
|
|
803
854
|
};
|
|
@@ -830,11 +881,11 @@ const Ee = /* @__PURE__ */ S(Ie, [["render", Fe]]), Ne = {
|
|
|
830
881
|
getChecklistProgress(s) {
|
|
831
882
|
if (!s.checklistProgress || s.checklistProgress.length === 0)
|
|
832
883
|
return 0;
|
|
833
|
-
const
|
|
834
|
-
return Math.round(
|
|
884
|
+
const e = s.checklistProgress.filter((u) => u.completed).length;
|
|
885
|
+
return Math.round(e / s.checklistProgress.length * 100);
|
|
835
886
|
},
|
|
836
887
|
getCompletedChecklistItems(s) {
|
|
837
|
-
return s.checklistProgress ? s.checklistProgress.filter((
|
|
888
|
+
return s.checklistProgress ? s.checklistProgress.filter((e) => e.completed).length : 0;
|
|
838
889
|
},
|
|
839
890
|
generateRecommendations() {
|
|
840
891
|
return [
|
|
@@ -852,107 +903,107 @@ const Ee = /* @__PURE__ */ S(Ie, [["render", Fe]]), Ne = {
|
|
|
852
903
|
});
|
|
853
904
|
}
|
|
854
905
|
}
|
|
855
|
-
},
|
|
906
|
+
}, je = { key: 0 }, $e = ["onClick"], Be = { class: "content" }, He = {
|
|
856
907
|
key: 0,
|
|
857
908
|
class: "loading-container"
|
|
858
|
-
},
|
|
909
|
+
}, Qe = { key: 1 }, Je = { class: "container" }, We = { class: "d-flex justify-content-between align-items-center" }, Ge = { class: "progress-container" }, ze = { class: "progress-info" }, Ye = { class: "progress-bar" }, Ke = { class: "checklist" }, Xe = ["onClick"], Ze = { key: 0 }, et = ["onClick"], tt = ["onClick"], st = { key: 0 }, it = { class: "checklist" }, nt = { class: "checklist-item" }, ot = { class: "attachment-area" }, lt = {
|
|
859
910
|
key: 2,
|
|
860
911
|
class: "status"
|
|
861
|
-
},
|
|
912
|
+
}, rt = { class: "form-group" }, at = { class: "form-group" }, dt = { class: "input-group" }, ut = { class: "form-group" }, ct = { class: "form-group" }, mt = { class: "input-group" }, vt = { class: "form-group" }, pt = { class: "form-group" }, ft = { class: "input-group" }, ht = { class: "form-group" }, gt = { class: "form-group" }, bt = ["value"], yt = { class: "input-group" }, wt = { class: "form-group" }, kt = { class: "input-group" }, Ct = { class: "form-group" }, _t = { class: "form-group" }, Dt = { class: "form-group" }, xt = { class: "checkbox-group" }, St = { class: "checkbox-item" }, Pt = { class: "checkbox-item" }, At = { class: "input-group" }, qt = { class: "form-group" }, Tt = { class: "form-group" }, It = { class: "form-group" }, Rt = { class: "attachment-area" }, Ft = { class: "action-buttons" }, Vt = ["disabled"], Mt = { class: "task-table-wrapper" }, Et = { class: "table-controls" }, Nt = { class: "filters" }, Ot = { class: "task-table" }, Ut = ["onClick"], Lt = ["onClick"], jt = { key: 0 }, $t = {
|
|
862
913
|
class: "alert alert-primary",
|
|
863
914
|
role: "alert"
|
|
864
|
-
},
|
|
915
|
+
}, Bt = { class: "mb-0" }, Ht = {
|
|
865
916
|
class: "report-container",
|
|
866
917
|
ref: "reportContainer"
|
|
867
|
-
},
|
|
918
|
+
}, Qt = { class: "report-info" }, Jt = { class: "info-box" }, Wt = { class: "info-box" }, Gt = { class: "info-box" }, zt = { class: "section" }, Yt = { class: "summary-grid" }, Kt = { class: "summary-card" }, Xt = { class: "summary-number" }, Zt = { class: "section" }, es = { class: "task-header" }, ts = { class: "task-title" }, ss = { class: "task-component" }, is = { class: "task-details" }, ns = { class: "detail-item" }, os = { class: "detail-value" }, ls = { class: "detail-item" }, rs = { class: "detail-value" }, as = { class: "detail-item" }, ds = { class: "detail-value" }, us = { class: "detail-item" }, cs = { class: "detail-value" }, ms = { class: "detail-item" }, vs = { class: "detail-value" }, ps = { class: "detail-item" }, fs = { class: "detail-value" }, hs = {
|
|
868
919
|
key: 0,
|
|
869
920
|
style: { margin: "15px 0", padding: "10px", background: "white", "border-radius": "5px" }
|
|
870
|
-
},
|
|
921
|
+
}, gs = { class: "detail-value" }, bs = {
|
|
871
922
|
key: 1,
|
|
872
923
|
style: { margin: "15px 0", padding: "10px", background: "white", "border-radius": "5px" }
|
|
873
|
-
},
|
|
924
|
+
}, ys = { class: "detail-value" }, ws = {
|
|
874
925
|
key: 2,
|
|
875
926
|
class: "checklist-progress"
|
|
876
|
-
},
|
|
877
|
-
function
|
|
878
|
-
return n.ready ? (o(), l("div",
|
|
879
|
-
|
|
880
|
-
v(
|
|
927
|
+
}, ks = { class: "progress-bar" }, Cs = { style: { "font-size": "0.9em", color: "#666", "margin-top": "5px" } }, _s = { class: "checklist-items" }, Ds = { class: "checklist-icon" }, xs = { class: "section" }, Ss = { class: "info-box" }, Ps = { class: "signature-section" }, As = { class: "signature-box" }, qs = { style: { "margin-top": "10px", color: "#666" } };
|
|
928
|
+
function Ts(s, e, u, b, n, r) {
|
|
929
|
+
return n.ready ? (o(), l("div", je, [
|
|
930
|
+
t("div", null, [
|
|
931
|
+
v(t("nav", null, [
|
|
881
932
|
(o(!0), l(p, null, h(n.sections, (i) => (o(), l("button", {
|
|
882
933
|
key: i.id,
|
|
883
934
|
class: g(["nav-btn", { active: n.activeSection === i.id }]),
|
|
884
|
-
onClick: (f) =>
|
|
885
|
-
},
|
|
935
|
+
onClick: (f) => r.handleSectionClick(i)
|
|
936
|
+
}, a(i.icon) + " " + a(i.name), 11, $e))), 128))
|
|
886
937
|
], 512), [
|
|
887
938
|
[P, !n.showReport]
|
|
888
939
|
]),
|
|
889
|
-
v(
|
|
890
|
-
v(
|
|
940
|
+
v(t("div", Be, [
|
|
941
|
+
v(t("section", {
|
|
891
942
|
class: g(["form-section", { active: n.activeSection === "maintenance" }])
|
|
892
943
|
}, [
|
|
893
|
-
|
|
894
|
-
n.isLoading ? (o(), l("div",
|
|
895
|
-
|
|
896
|
-
|
|
944
|
+
e[37] || (e[37] = t("h2", null, "🛠️ Maintenance Tasks", -1)),
|
|
945
|
+
n.isLoading ? (o(), l("div", He, e[27] || (e[27] = [
|
|
946
|
+
t("div", { class: "loading-spinner" }, null, -1),
|
|
947
|
+
t("p", null, "Loading checklist...", -1)
|
|
897
948
|
]))) : m("", !0),
|
|
898
|
-
n.isLoading ? m("", !0) : (o(), l("form",
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
949
|
+
n.isLoading ? m("", !0) : (o(), l("form", Qe, [
|
|
950
|
+
t("div", Je, [
|
|
951
|
+
t("div", We, [
|
|
952
|
+
e[29] || (e[29] = t("h1", null, "Maintenance Checklist", -1)),
|
|
953
|
+
r.showAddTaskButton ? (o(), l("button", {
|
|
903
954
|
key: 0,
|
|
904
955
|
class: "btn btn-outline-custom",
|
|
905
|
-
onClick:
|
|
906
|
-
},
|
|
907
|
-
|
|
908
|
-
|
|
956
|
+
onClick: e[0] || (e[0] = D((i) => r.addTask(), ["prevent"]))
|
|
957
|
+
}, e[28] || (e[28] = [
|
|
958
|
+
C(" Manually Add Task ", -1),
|
|
959
|
+
t("i", { class: "fas fa-plus" }, null, -1)
|
|
909
960
|
]))) : m("", !0)
|
|
910
961
|
]),
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
962
|
+
t("div", Ge, [
|
|
963
|
+
t("div", ze, " Progress: " + a(r.progress) + "% (" + a(r.completedCount.length) + "/" + a(n.checklists.length) + ") ", 1),
|
|
964
|
+
t("div", Ye, [
|
|
965
|
+
t("div", {
|
|
915
966
|
class: "progress-fill",
|
|
916
|
-
style: E({ width:
|
|
967
|
+
style: E({ width: r.progress + "%" })
|
|
917
968
|
}, null, 4)
|
|
918
969
|
])
|
|
919
970
|
]),
|
|
920
|
-
|
|
971
|
+
t("ul", Ke, [
|
|
921
972
|
(o(!0), l(p, null, h(n.checklists, (i) => (o(), l("li", {
|
|
922
973
|
key: i.id,
|
|
923
974
|
class: "checklist-item"
|
|
924
975
|
}, [
|
|
925
|
-
|
|
976
|
+
t("div", {
|
|
926
977
|
class: g(["checkbox", { checked: i.completed }]),
|
|
927
|
-
onClick: (f) =>
|
|
978
|
+
onClick: (f) => r.toggleTask(i)
|
|
928
979
|
}, [
|
|
929
|
-
i.completed ? (o(), l("span",
|
|
930
|
-
], 10,
|
|
931
|
-
|
|
980
|
+
i.completed ? (o(), l("span", Ze, "✓")) : m("", !0)
|
|
981
|
+
], 10, Xe),
|
|
982
|
+
t("span", {
|
|
932
983
|
class: g(["task-text", { completed: i.completed }]),
|
|
933
|
-
onClick: (f) =>
|
|
934
|
-
},
|
|
935
|
-
|
|
984
|
+
onClick: (f) => r.toggleTask(i)
|
|
985
|
+
}, a(i.text), 11, et),
|
|
986
|
+
r.showAddTaskButton ? (o(), l("button", {
|
|
936
987
|
key: 0,
|
|
937
988
|
class: "delete-btn",
|
|
938
|
-
onClick: (f) =>
|
|
989
|
+
onClick: (f) => r.deleteTask(i.id),
|
|
939
990
|
title: "Delete task"
|
|
940
|
-
},
|
|
991
|
+
}, e[30] || (e[30] = [
|
|
941
992
|
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)
|
|
942
|
-
]), 8,
|
|
993
|
+
]), 8, tt)) : m("", !0)
|
|
943
994
|
]))), 128))
|
|
944
995
|
]),
|
|
945
|
-
n.after ? (o(), l("div",
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
996
|
+
n.after ? (o(), l("div", st, [
|
|
997
|
+
e[33] || (e[33] = t("label", null, "Upload Image Evidence", -1)),
|
|
998
|
+
t("ul", it, [
|
|
999
|
+
t("li", nt, [
|
|
1000
|
+
e[32] || (e[32] = t("span", { class: "task-text" }, " Image Evidence Already Uploaded ", -1)),
|
|
1001
|
+
t("button", {
|
|
951
1002
|
type: "button",
|
|
952
1003
|
class: "delete-btn",
|
|
953
|
-
onClick:
|
|
1004
|
+
onClick: e[1] || (e[1] = (i) => r.deleteEvidence()),
|
|
954
1005
|
title: "Delete Image"
|
|
955
|
-
},
|
|
1006
|
+
}, e[31] || (e[31] = [
|
|
956
1007
|
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)
|
|
957
1008
|
]))
|
|
958
1009
|
])
|
|
@@ -961,128 +1012,128 @@ function Ps(s, t, u, b, n, a) {
|
|
|
961
1012
|
class: "form-group",
|
|
962
1013
|
key: n.refreshKey || "default"
|
|
963
1014
|
}, [
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
1015
|
+
e[35] || (e[35] = t("label", null, "Upload Image Evidence", -1)),
|
|
1016
|
+
e[36] || (e[36] = t("p", null, "You can only upload one image evidence here.", -1)),
|
|
1017
|
+
t("div", ot, [
|
|
1018
|
+
t("p", null, a(n.fileText), 1),
|
|
1019
|
+
t("input", {
|
|
969
1020
|
type: "file",
|
|
970
1021
|
id: "evidence-files",
|
|
971
1022
|
class: "file-input",
|
|
972
|
-
onChange:
|
|
1023
|
+
onChange: e[2] || (e[2] = (...i) => r.handleImg && r.handleImg(...i))
|
|
973
1024
|
}, null, 32),
|
|
974
|
-
|
|
1025
|
+
e[34] || (e[34] = t("label", {
|
|
975
1026
|
for: "evidence-files",
|
|
976
1027
|
class: "file-label"
|
|
977
1028
|
}, "Browse Files", -1))
|
|
978
1029
|
])
|
|
979
1030
|
])),
|
|
980
|
-
|
|
981
|
-
|
|
1031
|
+
r.completedCount === n.checklists.length ? (o(), l("div", lt, " All tasks completed! ✅ ")) : m("", !0),
|
|
1032
|
+
t("button", {
|
|
982
1033
|
class: "reset-button",
|
|
983
|
-
onClick:
|
|
984
|
-
}, r
|
|
1034
|
+
onClick: e[3] || (e[3] = D((...i) => r.resetTasks && r.resetTasks(...i), ["prevent"]))
|
|
1035
|
+
}, a(r.checklistButtonLabel), 1)
|
|
985
1036
|
])
|
|
986
1037
|
]))
|
|
987
1038
|
], 2), [
|
|
988
1039
|
[P, n.activeSection === "maintenance"]
|
|
989
1040
|
]),
|
|
990
|
-
v(
|
|
1041
|
+
v(t("section", {
|
|
991
1042
|
class: g(["form-section", { active: n.activeSection === "schedule" }])
|
|
992
1043
|
}, [
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
v(
|
|
1044
|
+
e[62] || (e[62] = t("h2", null, "📅 Maintenance Schedule", -1)),
|
|
1045
|
+
t("form", null, [
|
|
1046
|
+
t("div", rt, [
|
|
1047
|
+
e[38] || (e[38] = t("label", { for: "task-name" }, "Task Name", -1)),
|
|
1048
|
+
v(t("input", {
|
|
998
1049
|
type: "text",
|
|
999
1050
|
id: "task-name",
|
|
1000
|
-
"onUpdate:modelValue":
|
|
1051
|
+
"onUpdate:modelValue": e[4] || (e[4] = (i) => n.form.taskName = i),
|
|
1001
1052
|
required: ""
|
|
1002
1053
|
}, null, 512), [
|
|
1003
1054
|
[k, n.form.taskName]
|
|
1004
1055
|
])
|
|
1005
1056
|
]),
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
v(
|
|
1057
|
+
t("div", at, [
|
|
1058
|
+
e[39] || (e[39] = t("label", { for: "task-description" }, "Description", -1)),
|
|
1059
|
+
v(t("textarea", {
|
|
1009
1060
|
id: "task-description",
|
|
1010
|
-
"onUpdate:modelValue":
|
|
1061
|
+
"onUpdate:modelValue": e[5] || (e[5] = (i) => n.form.description = i),
|
|
1011
1062
|
required: ""
|
|
1012
1063
|
}, null, 512), [
|
|
1013
1064
|
[k, n.form.description]
|
|
1014
1065
|
])
|
|
1015
1066
|
]),
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
v(
|
|
1067
|
+
t("div", dt, [
|
|
1068
|
+
t("div", ut, [
|
|
1069
|
+
e[41] || (e[41] = t("label", { for: "maintenance-type" }, "Maintenance Type", -1)),
|
|
1070
|
+
v(t("select", {
|
|
1020
1071
|
id: "maintenance-type",
|
|
1021
|
-
"onUpdate:modelValue":
|
|
1072
|
+
"onUpdate:modelValue": e[6] || (e[6] = (i) => n.form.maintenanceType = i),
|
|
1022
1073
|
required: ""
|
|
1023
|
-
},
|
|
1074
|
+
}, e[40] || (e[40] = [
|
|
1024
1075
|
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)
|
|
1025
1076
|
]), 512), [
|
|
1026
|
-
[
|
|
1077
|
+
[_, n.form.maintenanceType]
|
|
1027
1078
|
])
|
|
1028
1079
|
]),
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
v(
|
|
1080
|
+
t("div", ct, [
|
|
1081
|
+
e[43] || (e[43] = t("label", { for: "component" }, "Component/System", -1)),
|
|
1082
|
+
v(t("select", {
|
|
1032
1083
|
id: "component",
|
|
1033
|
-
"onUpdate:modelValue":
|
|
1084
|
+
"onUpdate:modelValue": e[7] || (e[7] = (i) => n.form.component = i),
|
|
1034
1085
|
required: ""
|
|
1035
|
-
},
|
|
1086
|
+
}, e[42] || (e[42] = [
|
|
1036
1087
|
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)
|
|
1037
1088
|
]), 512), [
|
|
1038
|
-
[
|
|
1089
|
+
[_, n.form.component]
|
|
1039
1090
|
]),
|
|
1040
1091
|
n.form.component === "Other" ? v((o(), l("input", {
|
|
1041
1092
|
key: 0,
|
|
1042
1093
|
type: "text",
|
|
1043
1094
|
placeholder: "Enter custom component/system",
|
|
1044
|
-
"onUpdate:modelValue":
|
|
1095
|
+
"onUpdate:modelValue": e[8] || (e[8] = (i) => n.form.customComponent = i),
|
|
1045
1096
|
style: { "margin-top": "8px" }
|
|
1046
1097
|
}, null, 512)), [
|
|
1047
1098
|
[k, n.form.customComponent]
|
|
1048
1099
|
]) : m("", !0)
|
|
1049
1100
|
])
|
|
1050
1101
|
]),
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
v(
|
|
1102
|
+
t("div", mt, [
|
|
1103
|
+
t("div", vt, [
|
|
1104
|
+
e[45] || (e[45] = t("label", { for: "priority" }, "Priority", -1)),
|
|
1105
|
+
v(t("select", {
|
|
1055
1106
|
id: "priority",
|
|
1056
|
-
"onUpdate:modelValue":
|
|
1107
|
+
"onUpdate:modelValue": e[9] || (e[9] = (i) => n.form.priority = i),
|
|
1057
1108
|
required: ""
|
|
1058
|
-
},
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1109
|
+
}, e[44] || (e[44] = [
|
|
1110
|
+
t("option", { value: "low" }, "Low", -1),
|
|
1111
|
+
t("option", { value: "medium" }, "Medium", -1),
|
|
1112
|
+
t("option", { value: "high" }, "High", -1),
|
|
1113
|
+
t("option", { value: "critical" }, "Critical", -1)
|
|
1063
1114
|
]), 512), [
|
|
1064
|
-
[
|
|
1115
|
+
[_, n.form.priority]
|
|
1065
1116
|
])
|
|
1066
1117
|
]),
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
v(
|
|
1118
|
+
t("div", pt, [
|
|
1119
|
+
e[46] || (e[46] = t("label", { for: "status" }, "Status", -1)),
|
|
1120
|
+
v(t("input", {
|
|
1070
1121
|
type: "text",
|
|
1071
1122
|
id: "status",
|
|
1072
|
-
"onUpdate:modelValue":
|
|
1123
|
+
"onUpdate:modelValue": e[10] || (e[10] = (i) => n.form.status = i),
|
|
1073
1124
|
readonly: ""
|
|
1074
1125
|
}, null, 512), [
|
|
1075
1126
|
[k, n.form.status]
|
|
1076
1127
|
])
|
|
1077
1128
|
])
|
|
1078
1129
|
]),
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
v(
|
|
1130
|
+
t("div", ft, [
|
|
1131
|
+
t("div", ht, [
|
|
1132
|
+
e[47] || (e[47] = t("label", { for: "estimated-hours" }, "Estimated Hours", -1)),
|
|
1133
|
+
v(t("input", {
|
|
1083
1134
|
type: "number",
|
|
1084
1135
|
id: "estimated-hours",
|
|
1085
|
-
"onUpdate:modelValue":
|
|
1136
|
+
"onUpdate:modelValue": e[11] || (e[11] = (i) => n.form.estimatedHours = i),
|
|
1086
1137
|
min: "0",
|
|
1087
1138
|
step: "0.5"
|
|
1088
1139
|
}, null, 512), [
|
|
@@ -1090,215 +1141,215 @@ function Ps(s, t, u, b, n, a) {
|
|
|
1090
1141
|
])
|
|
1091
1142
|
])
|
|
1092
1143
|
]),
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
v(
|
|
1144
|
+
t("div", gt, [
|
|
1145
|
+
e[49] || (e[49] = t("label", { for: "assigned-to" }, "Assigned To", -1)),
|
|
1146
|
+
v(t("select", {
|
|
1096
1147
|
id: "assigned-to",
|
|
1097
|
-
"onUpdate:modelValue":
|
|
1148
|
+
"onUpdate:modelValue": e[12] || (e[12] = (i) => n.form.assignedTo = i)
|
|
1098
1149
|
}, [
|
|
1099
|
-
|
|
1150
|
+
e[48] || (e[48] = t("option", { value: "" }, "-- Select Personnel --", -1)),
|
|
1100
1151
|
(o(!0), l(p, null, h(u.vesselCrew, (i) => (o(), l("option", {
|
|
1101
1152
|
key: i.id,
|
|
1102
1153
|
value: `${i.name} - ${i.role}`
|
|
1103
|
-
},
|
|
1154
|
+
}, a(i.name) + " - " + a(i.role), 9, bt))), 128))
|
|
1104
1155
|
], 512), [
|
|
1105
|
-
[
|
|
1156
|
+
[_, n.form.assignedTo]
|
|
1106
1157
|
])
|
|
1107
1158
|
]),
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
v(
|
|
1159
|
+
t("div", yt, [
|
|
1160
|
+
t("div", wt, [
|
|
1161
|
+
e[51] || (e[51] = t("label", { for: "recurrence-type" }, "Recurrence", -1)),
|
|
1162
|
+
v(t("select", {
|
|
1112
1163
|
id: "recurrence-type",
|
|
1113
|
-
"onUpdate:modelValue":
|
|
1164
|
+
"onUpdate:modelValue": e[13] || (e[13] = (i) => n.form.recurrence = i),
|
|
1114
1165
|
required: ""
|
|
1115
|
-
},
|
|
1166
|
+
}, e[50] || (e[50] = [
|
|
1116
1167
|
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)
|
|
1117
1168
|
]), 512), [
|
|
1118
|
-
[
|
|
1169
|
+
[_, n.form.recurrence]
|
|
1119
1170
|
])
|
|
1120
1171
|
])
|
|
1121
1172
|
]),
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
v(
|
|
1173
|
+
t("div", kt, [
|
|
1174
|
+
t("div", Ct, [
|
|
1175
|
+
e[52] || (e[52] = t("label", { for: "last-performed" }, "Last Performed Date", -1)),
|
|
1176
|
+
v(t("input", {
|
|
1126
1177
|
type: "date",
|
|
1127
1178
|
id: "last-performed",
|
|
1128
|
-
"onUpdate:modelValue":
|
|
1179
|
+
"onUpdate:modelValue": e[14] || (e[14] = (i) => n.form.lastPerformed = i)
|
|
1129
1180
|
}, null, 512), [
|
|
1130
1181
|
[k, n.form.lastPerformed]
|
|
1131
1182
|
])
|
|
1132
1183
|
]),
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
v(
|
|
1184
|
+
t("div", _t, [
|
|
1185
|
+
e[53] || (e[53] = t("label", { for: "next-due" }, "Due Date", -1)),
|
|
1186
|
+
v(t("input", {
|
|
1136
1187
|
type: "date",
|
|
1137
1188
|
id: "next-due",
|
|
1138
|
-
"onUpdate:modelValue":
|
|
1189
|
+
"onUpdate:modelValue": e[15] || (e[15] = (i) => n.form.nextDue = i),
|
|
1139
1190
|
required: ""
|
|
1140
1191
|
}, null, 512), [
|
|
1141
1192
|
[k, n.form.nextDue]
|
|
1142
1193
|
])
|
|
1143
1194
|
])
|
|
1144
1195
|
]),
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
v(
|
|
1196
|
+
t("div", Dt, [
|
|
1197
|
+
e[56] || (e[56] = t("label", null, "Notifications", -1)),
|
|
1198
|
+
t("div", xt, [
|
|
1199
|
+
t("div", St, [
|
|
1200
|
+
v(t("input", {
|
|
1150
1201
|
type: "checkbox",
|
|
1151
1202
|
id: "notify-email",
|
|
1152
|
-
"onUpdate:modelValue":
|
|
1203
|
+
"onUpdate:modelValue": e[16] || (e[16] = (i) => n.form.notifyEmail = i)
|
|
1153
1204
|
}, null, 512), [
|
|
1154
1205
|
[N, n.form.notifyEmail]
|
|
1155
1206
|
]),
|
|
1156
|
-
|
|
1207
|
+
e[54] || (e[54] = t("label", { for: "notify-email" }, "Email Notification", -1))
|
|
1157
1208
|
]),
|
|
1158
|
-
|
|
1159
|
-
v(
|
|
1209
|
+
t("div", Pt, [
|
|
1210
|
+
v(t("input", {
|
|
1160
1211
|
type: "checkbox",
|
|
1161
1212
|
id: "notify-sms",
|
|
1162
|
-
"onUpdate:modelValue":
|
|
1213
|
+
"onUpdate:modelValue": e[17] || (e[17] = (i) => n.form.notifySms = i)
|
|
1163
1214
|
}, null, 512), [
|
|
1164
1215
|
[N, n.form.notifySms]
|
|
1165
1216
|
]),
|
|
1166
|
-
|
|
1217
|
+
e[55] || (e[55] = t("label", { for: "notify-sms" }, "SMS Notification", -1))
|
|
1167
1218
|
])
|
|
1168
1219
|
])
|
|
1169
1220
|
]),
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
v(
|
|
1221
|
+
t("div", At, [
|
|
1222
|
+
t("div", qt, [
|
|
1223
|
+
e[58] || (e[58] = t("label", { for: "reminder-days" }, "Reminder (Days Before)", -1)),
|
|
1224
|
+
v(t("select", {
|
|
1174
1225
|
id: "reminder-days",
|
|
1175
|
-
"onUpdate:modelValue":
|
|
1176
|
-
},
|
|
1226
|
+
"onUpdate:modelValue": e[18] || (e[18] = (i) => n.form.reminderDays = i)
|
|
1227
|
+
}, e[57] || (e[57] = [
|
|
1177
1228
|
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)
|
|
1178
1229
|
]), 512), [
|
|
1179
|
-
[
|
|
1230
|
+
[_, n.form.reminderDays]
|
|
1180
1231
|
])
|
|
1181
1232
|
])
|
|
1182
1233
|
]),
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
v(
|
|
1234
|
+
t("div", Tt, [
|
|
1235
|
+
e[59] || (e[59] = t("label", { for: "schedule-notes" }, "Notes", -1)),
|
|
1236
|
+
v(t("textarea", {
|
|
1186
1237
|
id: "schedule-notes",
|
|
1187
|
-
"onUpdate:modelValue":
|
|
1238
|
+
"onUpdate:modelValue": e[19] || (e[19] = (i) => n.form.notes = i)
|
|
1188
1239
|
}, null, 512), [
|
|
1189
1240
|
[k, n.form.notes]
|
|
1190
1241
|
])
|
|
1191
1242
|
]),
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1243
|
+
t("div", It, [
|
|
1244
|
+
e[61] || (e[61] = t("label", null, "Attachments", -1)),
|
|
1245
|
+
t("div", Rt, [
|
|
1246
|
+
t("p", null, a(n.imgText), 1),
|
|
1247
|
+
t("input", {
|
|
1197
1248
|
type: "file",
|
|
1198
1249
|
id: "maintenance-files",
|
|
1199
1250
|
class: "file-input",
|
|
1200
|
-
onChange:
|
|
1251
|
+
onChange: e[20] || (e[20] = (...i) => r.handleFiles && r.handleFiles(...i)),
|
|
1201
1252
|
multiple: ""
|
|
1202
1253
|
}, null, 32),
|
|
1203
|
-
|
|
1254
|
+
e[60] || (e[60] = t("label", {
|
|
1204
1255
|
for: "maintenance-files",
|
|
1205
1256
|
class: "file-label"
|
|
1206
1257
|
}, "Browse Files", -1))
|
|
1207
1258
|
])
|
|
1208
1259
|
]),
|
|
1209
|
-
|
|
1210
|
-
|
|
1260
|
+
t("div", Ft, [
|
|
1261
|
+
t("button", {
|
|
1211
1262
|
type: "button",
|
|
1212
1263
|
class: "btn btn-primary",
|
|
1213
|
-
onClick:
|
|
1264
|
+
onClick: e[21] || (e[21] = D((...i) => r.saveSchedule && r.saveSchedule(...i), ["prevent"])),
|
|
1214
1265
|
disabled: n.isSaving
|
|
1215
|
-
},
|
|
1266
|
+
}, a(n.isSaving ? "Saving..." : "Save Schedule"), 9, Vt)
|
|
1216
1267
|
])
|
|
1217
1268
|
])
|
|
1218
1269
|
], 2), [
|
|
1219
1270
|
[P, n.activeSection === "schedule"]
|
|
1220
1271
|
]),
|
|
1221
|
-
v(
|
|
1272
|
+
v(t("section", {
|
|
1222
1273
|
class: g(["form-section", { active: n.activeSection === "inventory" }])
|
|
1223
1274
|
}, [
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1275
|
+
e[68] || (e[68] = t("h2", null, "All Maintenance", -1)),
|
|
1276
|
+
t("div", Mt, [
|
|
1277
|
+
t("div", Et, [
|
|
1278
|
+
t("div", Nt, [
|
|
1279
|
+
t("button", {
|
|
1229
1280
|
class: g({ active: n.activeFilter === "due" }),
|
|
1230
|
-
onClick:
|
|
1281
|
+
onClick: e[22] || (e[22] = (i) => r.setFilter("due"))
|
|
1231
1282
|
}, "Due", 2),
|
|
1232
|
-
|
|
1283
|
+
t("button", {
|
|
1233
1284
|
class: g({ active: n.activeFilter === "all" }),
|
|
1234
|
-
onClick:
|
|
1285
|
+
onClick: e[23] || (e[23] = (i) => r.setFilter("all"))
|
|
1235
1286
|
}, "All", 2),
|
|
1236
|
-
|
|
1287
|
+
t("button", {
|
|
1237
1288
|
class: g({ active: n.activeFilter === "completed" }),
|
|
1238
|
-
onClick:
|
|
1289
|
+
onClick: e[24] || (e[24] = (i) => r.setFilter("completed"))
|
|
1239
1290
|
}, "Completed", 2),
|
|
1240
|
-
v(
|
|
1291
|
+
v(t("input", {
|
|
1241
1292
|
type: "text",
|
|
1242
|
-
"onUpdate:modelValue":
|
|
1293
|
+
"onUpdate:modelValue": e[25] || (e[25] = (i) => n.searchQuery = i),
|
|
1243
1294
|
placeholder: "Search..."
|
|
1244
1295
|
}, null, 512), [
|
|
1245
1296
|
[k, n.searchQuery]
|
|
1246
1297
|
])
|
|
1247
1298
|
])
|
|
1248
1299
|
]),
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1300
|
+
t("table", Ot, [
|
|
1301
|
+
e[63] || (e[63] = t("thead", null, [
|
|
1302
|
+
t("tr", null, [
|
|
1303
|
+
t("th", null, "Equipment"),
|
|
1304
|
+
t("th", null, "Task Name"),
|
|
1305
|
+
t("th", null, "Assigned To"),
|
|
1306
|
+
t("th", null, "Intervals"),
|
|
1307
|
+
t("th", null, "Remaining"),
|
|
1308
|
+
t("th", null, "Next Due"),
|
|
1309
|
+
t("th", null, "Status"),
|
|
1310
|
+
t("th", null, "Action")
|
|
1260
1311
|
])
|
|
1261
1312
|
], -1)),
|
|
1262
|
-
|
|
1263
|
-
(o(!0), l(p, null, h(
|
|
1313
|
+
t("tbody", null, [
|
|
1314
|
+
(o(!0), l(p, null, h(r.filteredTasks, (i) => (o(), l("tr", {
|
|
1264
1315
|
key: i.id
|
|
1265
1316
|
}, [
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1317
|
+
t("td", null, a(i.component), 1),
|
|
1318
|
+
t("td", null, a(i.taskName), 1),
|
|
1319
|
+
t("td", null, a(i.assignedTo), 1),
|
|
1320
|
+
t("td", null, a(i.recurrence), 1),
|
|
1321
|
+
t("td", null, a(i.remainingDays), 1),
|
|
1322
|
+
t("td", null, a(i.nextDue), 1),
|
|
1323
|
+
t("td", null, [
|
|
1324
|
+
t("span", {
|
|
1274
1325
|
class: g(["status-badge", i.status.toLowerCase().replace(" ", "-")])
|
|
1275
|
-
},
|
|
1326
|
+
}, a(i.status), 3)
|
|
1276
1327
|
]),
|
|
1277
|
-
|
|
1328
|
+
t("td", null, [
|
|
1278
1329
|
i.status === "Completed" ? (o(), l("button", {
|
|
1279
1330
|
key: 0,
|
|
1280
|
-
onClick: (f) =>
|
|
1331
|
+
onClick: (f) => r.printMaintenance(i.component),
|
|
1281
1332
|
class: "status-action"
|
|
1282
|
-
}, "Print", 8,
|
|
1333
|
+
}, "Print", 8, Ut)) : (o(), l("button", {
|
|
1283
1334
|
key: 1,
|
|
1284
|
-
onClick: (f) =>
|
|
1335
|
+
onClick: (f) => r.showMaintenance(i.component),
|
|
1285
1336
|
class: "status-action"
|
|
1286
|
-
}, "Start", 8,
|
|
1337
|
+
}, "Start", 8, Lt))
|
|
1287
1338
|
])
|
|
1288
1339
|
]))), 128))
|
|
1289
1340
|
])
|
|
1290
1341
|
]),
|
|
1291
|
-
u.tasks.length ? m("", !0) : (o(), l("div",
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1342
|
+
u.tasks.length ? m("", !0) : (o(), l("div", jt, [
|
|
1343
|
+
t("div", $t, [
|
|
1344
|
+
e[65] || (e[65] = t("h4", { class: "alert-heading" }, "Such Empty!!!", -1)),
|
|
1345
|
+
e[66] || (e[66] = t("p", null, "You have no maintenance, because you have not scheduled any for this ship.", -1)),
|
|
1346
|
+
e[67] || (e[67] = t("hr", null, null, -1)),
|
|
1347
|
+
t("p", Bt, [
|
|
1348
|
+
e[64] || (e[64] = C("Navigate to the schedule tab, to start scheduling. Or click on this button to ", -1)),
|
|
1349
|
+
t("button", {
|
|
1299
1350
|
type: "button",
|
|
1300
1351
|
class: "btn btn-primary",
|
|
1301
|
-
onClick:
|
|
1352
|
+
onClick: e[26] || (e[26] = (i) => r.switchSchedule())
|
|
1302
1353
|
}, "Schedule")
|
|
1303
1354
|
])
|
|
1304
1355
|
])
|
|
@@ -1310,133 +1361,133 @@ function Ps(s, t, u, b, n, a) {
|
|
|
1310
1361
|
], 512), [
|
|
1311
1362
|
[P, !n.showReport]
|
|
1312
1363
|
]),
|
|
1313
|
-
v(
|
|
1314
|
-
|
|
1315
|
-
|
|
1364
|
+
v(t("div", Ht, [
|
|
1365
|
+
e[89] || (e[89] = t("div", { class: "header" }, [
|
|
1366
|
+
t("div", { class: "report-title" }, "MAINTENANCE TASK REPORT")
|
|
1316
1367
|
], -1)),
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1368
|
+
t("div", Qt, [
|
|
1369
|
+
t("div", Jt, [
|
|
1370
|
+
e[69] || (e[69] = t("div", { class: "info-label" }, "Report Generated:", -1)),
|
|
1371
|
+
t("div", null, a(n.reportDate), 1)
|
|
1321
1372
|
]),
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1373
|
+
t("div", Wt, [
|
|
1374
|
+
e[70] || (e[70] = t("div", { class: "info-label" }, "Report ID:", -1)),
|
|
1375
|
+
t("div", null, a(n.reportId), 1)
|
|
1325
1376
|
]),
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1377
|
+
t("div", Gt, [
|
|
1378
|
+
e[71] || (e[71] = t("div", { class: "info-label" }, "Total Tasks:", -1)),
|
|
1379
|
+
t("div", null, a(n.maintenanceTasks.length), 1)
|
|
1329
1380
|
]),
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1381
|
+
e[72] || (e[72] = t("div", { class: "info-box" }, [
|
|
1382
|
+
t("div", { class: "info-label" }, "Generated By:"),
|
|
1383
|
+
t("div", null, "OceanHelm System")
|
|
1333
1384
|
], -1))
|
|
1334
1385
|
]),
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1386
|
+
t("div", zt, [
|
|
1387
|
+
e[75] || (e[75] = t("div", { class: "section-title" }, "📊 Task Summary", -1)),
|
|
1388
|
+
t("div", Yt, [
|
|
1389
|
+
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", Kt, [
|
|
1391
|
+
t("div", Xt, a(r.totalEstimatedHours), 1),
|
|
1392
|
+
e[73] || (e[73] = t("div", { class: "summary-label" }, "Total Hours", -1))
|
|
1342
1393
|
])
|
|
1343
1394
|
])
|
|
1344
1395
|
]),
|
|
1345
|
-
|
|
1346
|
-
|
|
1396
|
+
t("div", Zt, [
|
|
1397
|
+
e[85] || (e[85] = t("div", { class: "section-title" }, "🔧 Maintenance Tasks", -1)),
|
|
1347
1398
|
(o(!0), l(p, null, h(n.maintenanceTasks, (i) => (o(), l("div", {
|
|
1348
1399
|
key: i.taskName,
|
|
1349
|
-
class: g(["task-item",
|
|
1400
|
+
class: g(["task-item", r.getTaskStatusClass(i)])
|
|
1350
1401
|
}, [
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1402
|
+
t("div", es, [
|
|
1403
|
+
t("div", null, [
|
|
1404
|
+
t("div", ts, [
|
|
1405
|
+
C(a(i.taskName) + " ", 1),
|
|
1406
|
+
t("span", {
|
|
1356
1407
|
class: g(["maintenance-type", "type-" + i.maintenanceType])
|
|
1357
|
-
},
|
|
1408
|
+
}, a(i.maintenanceType), 3)
|
|
1358
1409
|
]),
|
|
1359
|
-
|
|
1410
|
+
t("div", ss, "Component: " + a(i.component), 1)
|
|
1360
1411
|
]),
|
|
1361
|
-
|
|
1412
|
+
t("span", {
|
|
1362
1413
|
class: g(["status-badge", "status-" + i.status.toLowerCase().replace(" ", "-")])
|
|
1363
|
-
},
|
|
1414
|
+
}, a(i.status), 3)
|
|
1364
1415
|
]),
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1416
|
+
t("div", is, [
|
|
1417
|
+
t("div", ns, [
|
|
1418
|
+
e[76] || (e[76] = t("div", { class: "detail-label" }, "Assigned To", -1)),
|
|
1419
|
+
t("div", os, a(i.assignedTo), 1)
|
|
1369
1420
|
]),
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1421
|
+
t("div", ls, [
|
|
1422
|
+
e[77] || (e[77] = t("div", { class: "detail-label" }, "Estimated Hours", -1)),
|
|
1423
|
+
t("div", rs, a(i.estimatedHours) + " hours", 1)
|
|
1373
1424
|
]),
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1425
|
+
t("div", as, [
|
|
1426
|
+
e[78] || (e[78] = t("div", { class: "detail-label" }, "Last Performed", -1)),
|
|
1427
|
+
t("div", ds, a(r.formatDate(i.lastPerformed)), 1)
|
|
1377
1428
|
]),
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1429
|
+
t("div", us, [
|
|
1430
|
+
e[79] || (e[79] = t("div", { class: "detail-label" }, "Next Due", -1)),
|
|
1431
|
+
t("div", cs, a(r.formatDate(i.nextDue)), 1)
|
|
1381
1432
|
]),
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1433
|
+
t("div", ms, [
|
|
1434
|
+
e[80] || (e[80] = t("div", { class: "detail-label" }, "Recurrence", -1)),
|
|
1435
|
+
t("div", vs, a(i.recurrence), 1)
|
|
1385
1436
|
]),
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1437
|
+
t("div", ps, [
|
|
1438
|
+
e[81] || (e[81] = t("div", { class: "detail-label" }, "Remaining Days", -1)),
|
|
1439
|
+
t("div", fs, a(i.remainingDays) + " days", 1)
|
|
1389
1440
|
])
|
|
1390
1441
|
]),
|
|
1391
|
-
i.description ? (o(), l("div",
|
|
1392
|
-
|
|
1393
|
-
|
|
1442
|
+
i.description ? (o(), l("div", hs, [
|
|
1443
|
+
e[82] || (e[82] = t("div", { class: "detail-label" }, "Description", -1)),
|
|
1444
|
+
t("div", gs, a(i.description), 1)
|
|
1394
1445
|
])) : m("", !0),
|
|
1395
|
-
i.notes ? (o(), l("div",
|
|
1396
|
-
|
|
1397
|
-
|
|
1446
|
+
i.notes ? (o(), l("div", bs, [
|
|
1447
|
+
e[83] || (e[83] = t("div", { class: "detail-label" }, "Notes", -1)),
|
|
1448
|
+
t("div", ys, a(i.notes), 1)
|
|
1398
1449
|
])) : m("", !0),
|
|
1399
|
-
i.checklistProgress && i.checklistProgress.length > 0 ? (o(), l("div",
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1450
|
+
i.checklistProgress && i.checklistProgress.length > 0 ? (o(), l("div", ws, [
|
|
1451
|
+
e[84] || (e[84] = t("div", { class: "detail-label" }, "Checklist Progress", -1)),
|
|
1452
|
+
t("div", ks, [
|
|
1453
|
+
t("div", {
|
|
1403
1454
|
class: "progress-fill",
|
|
1404
|
-
style: E({ width:
|
|
1455
|
+
style: E({ width: r.getChecklistProgress(i) + "%" })
|
|
1405
1456
|
}, null, 4)
|
|
1406
1457
|
]),
|
|
1407
|
-
|
|
1408
|
-
|
|
1458
|
+
t("div", Cs, a(r.getCompletedChecklistItems(i)) + " of " + a(i.checklistProgress.length) + " items completed (" + a(r.getChecklistProgress(i)) + "%) ", 1),
|
|
1459
|
+
t("div", _s, [
|
|
1409
1460
|
(o(!0), l(p, null, h(i.checklistProgress, (f, y) => (o(), l("div", {
|
|
1410
1461
|
key: y,
|
|
1411
1462
|
class: "checklist-item"
|
|
1412
1463
|
}, [
|
|
1413
|
-
|
|
1414
|
-
|
|
1464
|
+
t("span", Ds, a(f.completed ? "✅" : "⭕"), 1),
|
|
1465
|
+
t("span", null, a(f.text || "Checklist Item " + (y + 1)), 1)
|
|
1415
1466
|
]))), 128))
|
|
1416
1467
|
])
|
|
1417
1468
|
])) : m("", !0)
|
|
1418
1469
|
], 2))), 128))
|
|
1419
1470
|
]),
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
(o(!0), l(p, null, h(
|
|
1471
|
+
t("div", xs, [
|
|
1472
|
+
e[86] || (e[86] = t("div", { class: "section-title" }, "📋 Recommendations", -1)),
|
|
1473
|
+
t("div", Ss, [
|
|
1474
|
+
t("ul", null, [
|
|
1475
|
+
(o(!0), l(p, null, h(r.generateRecommendations(), (i) => (o(), l("li", { key: i }, a(i), 1))), 128))
|
|
1425
1476
|
])
|
|
1426
1477
|
])
|
|
1427
1478
|
]),
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1479
|
+
t("div", Ps, [
|
|
1480
|
+
e[88] || (e[88] = t("div", { class: "signature-box" }, [
|
|
1481
|
+
t("div", null, [
|
|
1482
|
+
t("strong", null, "Report Generated By")
|
|
1432
1483
|
]),
|
|
1433
|
-
|
|
1484
|
+
t("div", { style: { "margin-top": "10px", color: "#666" } }, "OceanHelm Maintenance System")
|
|
1434
1485
|
], -1)),
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1486
|
+
t("div", As, [
|
|
1487
|
+
e[87] || (e[87] = t("div", null, [
|
|
1488
|
+
t("strong", null, "Date")
|
|
1438
1489
|
], -1)),
|
|
1439
|
-
|
|
1490
|
+
t("div", qs, a(n.reportDate), 1)
|
|
1440
1491
|
])
|
|
1441
1492
|
])
|
|
1442
1493
|
], 512), [
|
|
@@ -1445,8 +1496,8 @@ function Ps(s, t, u, b, n, a) {
|
|
|
1445
1496
|
])
|
|
1446
1497
|
])) : m("", !0);
|
|
1447
1498
|
}
|
|
1448
|
-
const
|
|
1449
|
-
const
|
|
1499
|
+
const Is = /* @__PURE__ */ S(Le, [["render", Ts]]);
|
|
1500
|
+
const Rs = {
|
|
1450
1501
|
name: "ActivityLogs",
|
|
1451
1502
|
props: {
|
|
1452
1503
|
loading: Boolean,
|
|
@@ -1476,122 +1527,122 @@ const qs = {
|
|
|
1476
1527
|
}[s] || "badge-view";
|
|
1477
1528
|
}
|
|
1478
1529
|
}
|
|
1479
|
-
},
|
|
1530
|
+
}, Fs = { class: "activity-logs" }, Vs = { class: "a-controls" }, Ms = { class: "a-search-box" }, Es = ["value"], Ns = ["value"], Os = { class: "stats-grid" }, Us = { class: "stat-card" }, Ls = { class: "value" }, js = { class: "stat-card" }, $s = { class: "value" }, Bs = { class: "stat-card" }, Hs = { class: "value" }, Qs = { class: "logs-container" }, Js = {
|
|
1480
1531
|
key: 0,
|
|
1481
1532
|
class: "loading"
|
|
1482
|
-
},
|
|
1533
|
+
}, Ws = {
|
|
1483
1534
|
key: 1,
|
|
1484
1535
|
class: "no-logs"
|
|
1485
|
-
},
|
|
1486
|
-
function
|
|
1487
|
-
return o(), l("div",
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1536
|
+
}, Gs = { key: 2 }, zs = { class: "logs-table" }, Ys = { style: { color: "gray" } }, Ks = { style: { color: "gray" } }, Xs = { class: "pagination" }, Zs = ["disabled"], ei = ["onClick"], ti = ["disabled"];
|
|
1537
|
+
function si(s, e, u, b, n, r) {
|
|
1538
|
+
return o(), l("div", Fs, [
|
|
1539
|
+
t("div", Vs, [
|
|
1540
|
+
t("div", Ms, [
|
|
1541
|
+
t("input", {
|
|
1491
1542
|
type: "text",
|
|
1492
1543
|
placeholder: "Search activities, users, or actions...",
|
|
1493
1544
|
value: u.searchTerm,
|
|
1494
|
-
onInput:
|
|
1495
|
-
}, null, 40,
|
|
1545
|
+
onInput: e[0] || (e[0] = (i) => s.$emit("update:searchTerm", i.target.value))
|
|
1546
|
+
}, null, 40, Es)
|
|
1496
1547
|
]),
|
|
1497
|
-
|
|
1548
|
+
t("select", {
|
|
1498
1549
|
class: "filter-select",
|
|
1499
1550
|
value: u.selectedFilter,
|
|
1500
|
-
onChange:
|
|
1501
|
-
},
|
|
1551
|
+
onChange: e[1] || (e[1] = (i) => s.$emit("update:selectedFilter", i.target.value))
|
|
1552
|
+
}, e[6] || (e[6] = [
|
|
1502
1553
|
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)
|
|
1503
|
-
]), 40,
|
|
1504
|
-
|
|
1554
|
+
]), 40, Ns),
|
|
1555
|
+
t("button", {
|
|
1505
1556
|
class: "btn btn-primary",
|
|
1506
|
-
onClick:
|
|
1557
|
+
onClick: e[2] || (e[2] = (i) => s.$emit("refresh"))
|
|
1507
1558
|
}, "🔄 Refresh"),
|
|
1508
|
-
|
|
1559
|
+
t("button", {
|
|
1509
1560
|
class: "btn btn-secondary",
|
|
1510
|
-
onClick:
|
|
1561
|
+
onClick: e[3] || (e[3] = (i) => s.$emit("download"))
|
|
1511
1562
|
}, "📥 Download Report")
|
|
1512
1563
|
]),
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1564
|
+
t("div", Os, [
|
|
1565
|
+
t("div", Us, [
|
|
1566
|
+
e[7] || (e[7] = t("h3", null, "Total Activities", -1)),
|
|
1567
|
+
t("div", Ls, a(u.totalActivities), 1)
|
|
1517
1568
|
]),
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1569
|
+
t("div", js, [
|
|
1570
|
+
e[8] || (e[8] = t("h3", null, "Today's Activities", -1)),
|
|
1571
|
+
t("div", $s, a(u.todayActivities), 1)
|
|
1521
1572
|
]),
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1573
|
+
t("div", Bs, [
|
|
1574
|
+
e[9] || (e[9] = t("h3", null, "Active Users", -1)),
|
|
1575
|
+
t("div", Hs, a(u.activeUsers), 1)
|
|
1525
1576
|
]),
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1577
|
+
e[10] || (e[10] = t("div", { class: "stat-card" }, [
|
|
1578
|
+
t("h3", null, "Important"),
|
|
1579
|
+
t("div", { class: "badge-danger" }, " Logs are deleted at the end of every month, please download a copy ")
|
|
1529
1580
|
], -1))
|
|
1530
1581
|
]),
|
|
1531
|
-
|
|
1532
|
-
u.loading ? (o(), l("div",
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
]))) : u.logs.length === 0 ? (o(), l("div",
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
]))) : (o(), l("div",
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1582
|
+
t("div", Qs, [
|
|
1583
|
+
u.loading ? (o(), l("div", Js, e[11] || (e[11] = [
|
|
1584
|
+
t("div", { class: "spinner" }, null, -1),
|
|
1585
|
+
t("p", null, "Loading activity logs...", -1)
|
|
1586
|
+
]))) : u.logs.length === 0 ? (o(), l("div", Ws, e[12] || (e[12] = [
|
|
1587
|
+
t("h3", null, "No activities found", -1),
|
|
1588
|
+
t("p", null, "Try adjusting your search or filter criteria", -1)
|
|
1589
|
+
]))) : (o(), l("div", Gs, [
|
|
1590
|
+
t("table", zs, [
|
|
1591
|
+
e[13] || (e[13] = t("thead", null, [
|
|
1592
|
+
t("tr", null, [
|
|
1593
|
+
t("th", null, "Timestamp"),
|
|
1594
|
+
t("th", null, "User Name"),
|
|
1595
|
+
t("th", null, "Action"),
|
|
1596
|
+
t("th", null, "Details"),
|
|
1597
|
+
t("th", null, "Section")
|
|
1547
1598
|
])
|
|
1548
1599
|
], -1)),
|
|
1549
|
-
|
|
1600
|
+
t("tbody", null, [
|
|
1550
1601
|
(o(!0), l(p, null, h(u.paginatedLogs, (i) => (o(), l("tr", {
|
|
1551
1602
|
key: i.id
|
|
1552
1603
|
}, [
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1604
|
+
t("td", null, a(r.formatDate(i.timestamp)), 1),
|
|
1605
|
+
t("td", null, [
|
|
1606
|
+
t("div", null, a(i.user_name), 1),
|
|
1607
|
+
t("small", Ys, a(i.email), 1)
|
|
1557
1608
|
]),
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
class: g(["activity-badge",
|
|
1561
|
-
},
|
|
1609
|
+
t("td", null, [
|
|
1610
|
+
t("span", {
|
|
1611
|
+
class: g(["activity-badge", r.getBadgeClass(i.action)])
|
|
1612
|
+
}, a(i.action), 3)
|
|
1562
1613
|
]),
|
|
1563
|
-
|
|
1564
|
-
|
|
1614
|
+
t("td", null, [
|
|
1615
|
+
C(a(i.details.status) + " ", 1),
|
|
1565
1616
|
(o(!0), l(p, null, h(i.details.information, (f, y) => (o(), l("div", { key: y }, [
|
|
1566
|
-
|
|
1567
|
-
|
|
1617
|
+
t("strong", null, a(y) + ": ", 1),
|
|
1618
|
+
t("small", Ks, a(f.from || "") + " → " + a(f.to || f), 1)
|
|
1568
1619
|
]))), 128))
|
|
1569
1620
|
]),
|
|
1570
|
-
|
|
1621
|
+
t("td", null, a(i.table_name), 1)
|
|
1571
1622
|
]))), 128))
|
|
1572
1623
|
])
|
|
1573
1624
|
]),
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
onClick:
|
|
1625
|
+
t("div", Xs, [
|
|
1626
|
+
t("button", {
|
|
1627
|
+
onClick: e[4] || (e[4] = (i) => s.$emit("change-page", u.currentPage - 1)),
|
|
1577
1628
|
disabled: u.currentPage === 1
|
|
1578
|
-
}, " Previous ", 8,
|
|
1629
|
+
}, " Previous ", 8, Zs),
|
|
1579
1630
|
(o(!0), l(p, null, h(u.totalPages, (i) => (o(), l("button", {
|
|
1580
1631
|
key: i,
|
|
1581
1632
|
onClick: (f) => s.$emit("change-page", i),
|
|
1582
1633
|
class: g({ active: u.currentPage === i })
|
|
1583
|
-
},
|
|
1584
|
-
|
|
1585
|
-
onClick:
|
|
1634
|
+
}, a(i), 11, ei))), 128)),
|
|
1635
|
+
t("button", {
|
|
1636
|
+
onClick: e[5] || (e[5] = (i) => s.$emit("change-page", u.currentPage + 1)),
|
|
1586
1637
|
disabled: u.currentPage === u.totalPages
|
|
1587
|
-
}, " Next ", 8,
|
|
1638
|
+
}, " Next ", 8, ti)
|
|
1588
1639
|
])
|
|
1589
1640
|
]))
|
|
1590
1641
|
])
|
|
1591
1642
|
]);
|
|
1592
1643
|
}
|
|
1593
|
-
const
|
|
1594
|
-
const
|
|
1644
|
+
const ii = /* @__PURE__ */ S(Rs, [["render", si]]);
|
|
1645
|
+
const ni = {
|
|
1595
1646
|
name: "CrewManagement",
|
|
1596
1647
|
props: {
|
|
1597
1648
|
// Required props
|
|
@@ -1666,8 +1717,8 @@ const ti = {
|
|
|
1666
1717
|
},
|
|
1667
1718
|
filteredCrew() {
|
|
1668
1719
|
return this.crew.filter((s) => {
|
|
1669
|
-
const
|
|
1670
|
-
return
|
|
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()), u = this.filterStatus === "all" || s.status === this.filterStatus;
|
|
1721
|
+
return e && u;
|
|
1671
1722
|
});
|
|
1672
1723
|
},
|
|
1673
1724
|
canAddCrew() {
|
|
@@ -1686,15 +1737,15 @@ const ti = {
|
|
|
1686
1737
|
methods: {
|
|
1687
1738
|
// Permission checking
|
|
1688
1739
|
hasPermission(s) {
|
|
1689
|
-
const { role:
|
|
1690
|
-
let
|
|
1740
|
+
const { role: e, vessel: u } = this.userProfile, b = u === this.vesselName;
|
|
1741
|
+
let r = {
|
|
1691
1742
|
owner: ["add", "edit", "delete", "assign", "view"],
|
|
1692
1743
|
staff: ["add", "edit", "assign", "view"],
|
|
1693
1744
|
captain: ["assign", "view"],
|
|
1694
1745
|
// default for captain
|
|
1695
1746
|
viewer: ["view"]
|
|
1696
|
-
}[
|
|
1697
|
-
return
|
|
1747
|
+
}[e] || [];
|
|
1748
|
+
return e === "captain" && b && (r = [...r, "add"]), r.includes(s);
|
|
1698
1749
|
},
|
|
1699
1750
|
// Event handlers
|
|
1700
1751
|
handleToggleAddForm() {
|
|
@@ -1715,9 +1766,9 @@ const ti = {
|
|
|
1715
1766
|
return;
|
|
1716
1767
|
const s = this.newCrew.certifications.filter(
|
|
1717
1768
|
(b) => b.name.trim() !== "" && b.expiryDate !== ""
|
|
1718
|
-
),
|
|
1769
|
+
), e = this.newCrew.role === "Other" ? this.newCrew.customRole : this.newCrew.role, u = {
|
|
1719
1770
|
name: this.newCrew.name,
|
|
1720
|
-
role:
|
|
1771
|
+
role: e,
|
|
1721
1772
|
status: this.newCrew.status,
|
|
1722
1773
|
certifications: s,
|
|
1723
1774
|
notes: this.newCrew.notes,
|
|
@@ -1752,8 +1803,8 @@ const ti = {
|
|
|
1752
1803
|
}
|
|
1753
1804
|
this.$emit("crew-add-certification", s);
|
|
1754
1805
|
},
|
|
1755
|
-
handleViewCertification(s,
|
|
1756
|
-
this.$emit("crew-view-certification", { certification: s, member:
|
|
1806
|
+
handleViewCertification(s, e) {
|
|
1807
|
+
this.$emit("crew-view-certification", { certification: s, member: e });
|
|
1757
1808
|
},
|
|
1758
1809
|
// Form management
|
|
1759
1810
|
resetForm() {
|
|
@@ -1775,8 +1826,8 @@ const ti = {
|
|
|
1775
1826
|
name: "Full Name",
|
|
1776
1827
|
email: "Email Address"
|
|
1777
1828
|
};
|
|
1778
|
-
return Object.keys(s).forEach((
|
|
1779
|
-
(!this.newCrew[
|
|
1829
|
+
return Object.keys(s).forEach((e) => {
|
|
1830
|
+
(!this.newCrew[e] || this.newCrew[e].trim() === "") && (this.formErrors[e] = `${s[e]} is required`);
|
|
1780
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 === 0;
|
|
1781
1832
|
},
|
|
1782
1833
|
isValidEmail(s) {
|
|
@@ -1800,271 +1851,271 @@ const ti = {
|
|
|
1800
1851
|
}[s] || "";
|
|
1801
1852
|
},
|
|
1802
1853
|
getCertificationClass(s) {
|
|
1803
|
-
const
|
|
1854
|
+
const e = this.getExpiryStatus(s);
|
|
1804
1855
|
return {
|
|
1805
1856
|
expired: "text-danger",
|
|
1806
1857
|
expiringSoon: "text-warning",
|
|
1807
1858
|
valid: "text-success"
|
|
1808
|
-
}[
|
|
1859
|
+
}[e] || "";
|
|
1809
1860
|
},
|
|
1810
1861
|
getExpiryStatus(s) {
|
|
1811
1862
|
if (!s)
|
|
1812
1863
|
return "none";
|
|
1813
|
-
const
|
|
1814
|
-
return b.setMonth(u.getMonth() + 1),
|
|
1864
|
+
const e = new Date(s), u = /* @__PURE__ */ new Date(), b = /* @__PURE__ */ new Date();
|
|
1865
|
+
return b.setMonth(u.getMonth() + 1), e <= u ? "expired" : e <= b ? "expiringSoon" : "valid";
|
|
1815
1866
|
}
|
|
1816
1867
|
}
|
|
1817
|
-
},
|
|
1868
|
+
}, oi = { class: "crew-management" }, li = {
|
|
1818
1869
|
key: 0,
|
|
1819
1870
|
class: "wave-bg"
|
|
1820
|
-
},
|
|
1871
|
+
}, ri = { class: "crew-section" }, ai = { class: "crew-section-header" }, di = { class: "search-filter" }, ui = {
|
|
1821
1872
|
key: 0,
|
|
1822
1873
|
class: "loading-state"
|
|
1823
|
-
},
|
|
1874
|
+
}, ci = {
|
|
1824
1875
|
key: 1,
|
|
1825
1876
|
class: "crew-grid"
|
|
1826
|
-
},
|
|
1877
|
+
}, mi = { class: "crew-name" }, vi = { class: "crew-role" }, pi = { class: "crew-certifications" }, fi = ["onClick"], hi = ["onClick"], gi = { class: "crew-availability" }, bi = { class: "crew-availability" }, yi = { class: "action-buttons" }, wi = {
|
|
1827
1878
|
key: 0,
|
|
1828
1879
|
class: "status-available crew-availability vcard"
|
|
1829
|
-
},
|
|
1880
|
+
}, ki = {
|
|
1830
1881
|
key: 1,
|
|
1831
1882
|
class: "status-unavailable crew-availability vcard"
|
|
1832
|
-
},
|
|
1883
|
+
}, Ci = ["onClick"], _i = ["onClick"], Di = {
|
|
1833
1884
|
key: 2,
|
|
1834
1885
|
class: "no-results"
|
|
1835
|
-
},
|
|
1886
|
+
}, xi = {
|
|
1836
1887
|
key: 3,
|
|
1837
1888
|
class: "add-crew-form"
|
|
1838
|
-
},
|
|
1889
|
+
}, Si = { class: "form-row" }, Pi = { class: "form-group" }, Ai = {
|
|
1839
1890
|
key: 0,
|
|
1840
1891
|
class: "error-message"
|
|
1841
|
-
},
|
|
1892
|
+
}, qi = { class: "form-group" }, Ti = ["value"], Ii = { class: "form-row" }, Ri = { class: "form-group" }, Fi = { class: "form-group" }, Vi = {
|
|
1842
1893
|
key: 0,
|
|
1843
1894
|
class: "error-message"
|
|
1844
|
-
},
|
|
1845
|
-
function
|
|
1846
|
-
return o(), l("div",
|
|
1847
|
-
u.config.showWaveBackground ? (o(), l("div",
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1895
|
+
}, Mi = { class: "certification-section" }, Ei = { class: "form-row" }, Ni = { class: "form-group" }, Oi = ["onUpdate:modelValue"], Ui = { class: "form-group" }, Li = ["onUpdate:modelValue"], ji = { class: "form-group" }, $i = ["onClick"], Bi = { class: "form-row" }, Hi = { class: "form-group" }, Qi = { class: "form-actions" };
|
|
1896
|
+
function Ji(s, e, u, b, n, r) {
|
|
1897
|
+
return o(), l("div", oi, [
|
|
1898
|
+
u.config.showWaveBackground ? (o(), l("div", li)) : m("", !0),
|
|
1899
|
+
t("div", ri, [
|
|
1900
|
+
t("div", ai, [
|
|
1901
|
+
t("h2", null, a(r.sectionTitle), 1),
|
|
1902
|
+
r.canAddCrew ? (o(), l("button", {
|
|
1852
1903
|
key: 0,
|
|
1853
1904
|
class: "btn btn-primary",
|
|
1854
|
-
onClick:
|
|
1855
|
-
},
|
|
1905
|
+
onClick: e[0] || (e[0] = (...i) => r.handleToggleAddForm && r.handleToggleAddForm(...i))
|
|
1906
|
+
}, a(n.showAddForm ? "Cancel" : "+ Add Crew Member"), 1)) : m("", !0)
|
|
1856
1907
|
]),
|
|
1857
|
-
|
|
1858
|
-
v(
|
|
1908
|
+
t("div", di, [
|
|
1909
|
+
v(t("input", {
|
|
1859
1910
|
type: "text",
|
|
1860
1911
|
placeholder: "Search crew by name or role...",
|
|
1861
|
-
"onUpdate:modelValue":
|
|
1862
|
-
onInput:
|
|
1912
|
+
"onUpdate:modelValue": e[1] || (e[1] = (i) => n.searchQuery = i),
|
|
1913
|
+
onInput: e[2] || (e[2] = (...i) => r.handleSearch && r.handleSearch(...i))
|
|
1863
1914
|
}, null, 544), [
|
|
1864
1915
|
[k, n.searchQuery]
|
|
1865
1916
|
]),
|
|
1866
|
-
v(
|
|
1867
|
-
"onUpdate:modelValue":
|
|
1868
|
-
onChange:
|
|
1869
|
-
},
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1917
|
+
v(t("select", {
|
|
1918
|
+
"onUpdate:modelValue": e[3] || (e[3] = (i) => n.filterStatus = i),
|
|
1919
|
+
onChange: e[4] || (e[4] = (...i) => r.handleFilter && r.handleFilter(...i))
|
|
1920
|
+
}, e[14] || (e[14] = [
|
|
1921
|
+
t("option", { value: "all" }, "All Statuses", -1),
|
|
1922
|
+
t("option", { value: "available" }, "Available", -1),
|
|
1923
|
+
t("option", { value: "onduty" }, "On Duty", -1),
|
|
1924
|
+
t("option", { value: "unavailable" }, "Unavailable", -1)
|
|
1874
1925
|
]), 544), [
|
|
1875
|
-
[
|
|
1926
|
+
[_, n.filterStatus]
|
|
1876
1927
|
])
|
|
1877
1928
|
]),
|
|
1878
|
-
u.loading ? (o(), l("div",
|
|
1879
|
-
|
|
1929
|
+
u.loading ? (o(), l("div", ui, e[15] || (e[15] = [
|
|
1930
|
+
t("div", {
|
|
1880
1931
|
class: "spinner-border text-primary",
|
|
1881
1932
|
role: "status"
|
|
1882
1933
|
}, [
|
|
1883
|
-
|
|
1934
|
+
t("span", { class: "visually-hidden" }, "Loading crew...")
|
|
1884
1935
|
], -1),
|
|
1885
|
-
|
|
1886
|
-
]))) :
|
|
1887
|
-
(o(!0), l(p, null, h(
|
|
1936
|
+
t("p", null, "Loading crew members...", -1)
|
|
1937
|
+
]))) : r.filteredCrew.length > 0 ? (o(), l("div", ci, [
|
|
1938
|
+
(o(!0), l(p, null, h(r.filteredCrew, (i) => (o(), l("div", {
|
|
1888
1939
|
key: i.id,
|
|
1889
1940
|
class: g(["crew-card", { unavailable: i.status === "unavailable" }])
|
|
1890
1941
|
}, [
|
|
1891
|
-
|
|
1892
|
-
class: g(["crew-status-badge",
|
|
1893
|
-
}, r
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1942
|
+
t("div", {
|
|
1943
|
+
class: g(["crew-status-badge", r.getStatusClass(i.status)])
|
|
1944
|
+
}, a(r.formatStatus(i.status)), 3),
|
|
1945
|
+
t("div", mi, a(i.name), 1),
|
|
1946
|
+
t("div", vi, a(i.role), 1),
|
|
1947
|
+
t("div", pi, [
|
|
1897
1948
|
(o(!0), l(p, null, h(i.certifications, (f) => (o(), l("div", {
|
|
1898
1949
|
key: f.name,
|
|
1899
|
-
class: g(["certification-tag",
|
|
1900
|
-
onClick: (y) =>
|
|
1901
|
-
},
|
|
1902
|
-
|
|
1950
|
+
class: g(["certification-tag", r.getCertificationClass(f.expiryDate)]),
|
|
1951
|
+
onClick: (y) => r.handleViewCertification(f, i)
|
|
1952
|
+
}, a(f.name), 11, fi))), 128)),
|
|
1953
|
+
r.canEditCrew ? (o(), l("i", {
|
|
1903
1954
|
key: 0,
|
|
1904
1955
|
class: "bi bi-patch-plus-fill icon",
|
|
1905
|
-
onClick: (f) =>
|
|
1906
|
-
}, null, 8,
|
|
1956
|
+
onClick: (f) => r.handleAddCertification(i)
|
|
1957
|
+
}, null, 8, hi)) : m("", !0)
|
|
1907
1958
|
]),
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1959
|
+
t("div", gi, [
|
|
1960
|
+
e[16] || (e[16] = t("strong", null, "Embarkation Date:", -1)),
|
|
1961
|
+
C(" " + a(i.nextShift || "Not Scheduled"), 1)
|
|
1911
1962
|
]),
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1963
|
+
t("div", bi, [
|
|
1964
|
+
e[17] || (e[17] = t("strong", null, "Expected Days Onboard (in days):", -1)),
|
|
1965
|
+
C(" " + a(i.onBoard || "Not Scheduled"), 1)
|
|
1915
1966
|
]),
|
|
1916
|
-
|
|
1917
|
-
i.vessel ? (o(), l("div",
|
|
1918
|
-
|
|
1967
|
+
t("div", yi, [
|
|
1968
|
+
i.vessel ? (o(), l("div", wi, " Vessel: " + a(i.vessel), 1)) : (o(), l("div", ki, " Vessel: Unassigned ")),
|
|
1969
|
+
r.canAssignShift ? (o(), l("button", {
|
|
1919
1970
|
key: 2,
|
|
1920
1971
|
class: "btn btn-primary",
|
|
1921
|
-
onClick: (f) =>
|
|
1922
|
-
}, " Assign Shift ", 8,
|
|
1972
|
+
onClick: (f) => r.handleAssignShift(i)
|
|
1973
|
+
}, " Assign Shift ", 8, Ci)) : m("", !0)
|
|
1923
1974
|
]),
|
|
1924
|
-
|
|
1975
|
+
r.canDeleteCrew ? (o(), l("i", {
|
|
1925
1976
|
key: 0,
|
|
1926
1977
|
class: "bi bi-trash icon delete-icon",
|
|
1927
|
-
onClick: (f) =>
|
|
1928
|
-
}, null, 8,
|
|
1978
|
+
onClick: (f) => r.handleDeleteCrew(i)
|
|
1979
|
+
}, null, 8, _i)) : m("", !0)
|
|
1929
1980
|
], 2))), 128))
|
|
1930
|
-
])) : u.loading ? m("", !0) : (o(), l("div",
|
|
1931
|
-
n.showAddForm ? (o(), l("div",
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
v(
|
|
1981
|
+
])) : u.loading ? m("", !0) : (o(), l("div", Di, a(u.crew.length === 0 ? "No crew members found." : "No crew members found matching your search criteria."), 1)),
|
|
1982
|
+
n.showAddForm ? (o(), l("div", xi, [
|
|
1983
|
+
e[28] || (e[28] = t("h2", null, "Add New Crew Member", -1)),
|
|
1984
|
+
t("div", Si, [
|
|
1985
|
+
t("div", Pi, [
|
|
1986
|
+
e[18] || (e[18] = t("label", { for: "crew-name" }, "Full Name *", -1)),
|
|
1987
|
+
v(t("input", {
|
|
1937
1988
|
type: "text",
|
|
1938
1989
|
id: "crew-name",
|
|
1939
|
-
"onUpdate:modelValue":
|
|
1990
|
+
"onUpdate:modelValue": e[5] || (e[5] = (i) => n.newCrew.name = i),
|
|
1940
1991
|
class: g({ error: n.formErrors.name })
|
|
1941
1992
|
}, null, 2), [
|
|
1942
1993
|
[k, n.newCrew.name]
|
|
1943
1994
|
]),
|
|
1944
|
-
n.formErrors.name ? (o(), l("div",
|
|
1995
|
+
n.formErrors.name ? (o(), l("div", Ai, a(n.formErrors.name), 1)) : m("", !0)
|
|
1945
1996
|
]),
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
v(
|
|
1997
|
+
t("div", qi, [
|
|
1998
|
+
e[20] || (e[20] = t("label", { for: "crew-role" }, "Role/Position *", -1)),
|
|
1999
|
+
v(t("select", {
|
|
1949
2000
|
id: "crew-role",
|
|
1950
|
-
"onUpdate:modelValue":
|
|
2001
|
+
"onUpdate:modelValue": e[6] || (e[6] = (i) => n.newCrew.role = i)
|
|
1951
2002
|
}, [
|
|
1952
2003
|
(o(!0), l(p, null, h(u.availableRoles, (i) => (o(), l("option", {
|
|
1953
2004
|
key: i,
|
|
1954
2005
|
value: i
|
|
1955
|
-
},
|
|
1956
|
-
|
|
2006
|
+
}, a(i), 9, Ti))), 128)),
|
|
2007
|
+
e[19] || (e[19] = t("option", { value: "Other" }, "Other", -1))
|
|
1957
2008
|
], 512), [
|
|
1958
|
-
[
|
|
2009
|
+
[_, n.newCrew.role]
|
|
1959
2010
|
]),
|
|
1960
2011
|
n.newCrew.role === "Other" ? v((o(), l("input", {
|
|
1961
2012
|
key: 0,
|
|
1962
2013
|
type: "text",
|
|
1963
2014
|
placeholder: "Enter custom role",
|
|
1964
|
-
"onUpdate:modelValue":
|
|
2015
|
+
"onUpdate:modelValue": e[7] || (e[7] = (i) => n.newCrew.customRole = i),
|
|
1965
2016
|
style: { "margin-top": "8px" }
|
|
1966
2017
|
}, null, 512)), [
|
|
1967
2018
|
[k, n.newCrew.customRole]
|
|
1968
2019
|
]) : m("", !0)
|
|
1969
2020
|
])
|
|
1970
2021
|
]),
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
v(
|
|
2022
|
+
t("div", Ii, [
|
|
2023
|
+
t("div", Ri, [
|
|
2024
|
+
e[22] || (e[22] = t("label", { for: "crew-status" }, "Status *", -1)),
|
|
2025
|
+
v(t("select", {
|
|
1975
2026
|
id: "crew-status",
|
|
1976
|
-
"onUpdate:modelValue":
|
|
1977
|
-
},
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
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)
|
|
1981
2032
|
]), 512), [
|
|
1982
|
-
[
|
|
2033
|
+
[_, n.newCrew.status]
|
|
1983
2034
|
])
|
|
1984
2035
|
]),
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
v(
|
|
2036
|
+
t("div", Fi, [
|
|
2037
|
+
e[23] || (e[23] = t("label", { for: "crew-email" }, "Email Address *", -1)),
|
|
2038
|
+
v(t("input", {
|
|
1988
2039
|
type: "email",
|
|
1989
2040
|
id: "crew-email",
|
|
1990
|
-
"onUpdate:modelValue":
|
|
2041
|
+
"onUpdate:modelValue": e[9] || (e[9] = (i) => n.newCrew.email = i),
|
|
1991
2042
|
class: g({ error: n.formErrors.email })
|
|
1992
2043
|
}, null, 2), [
|
|
1993
2044
|
[k, n.newCrew.email]
|
|
1994
2045
|
]),
|
|
1995
|
-
n.formErrors.email ? (o(), l("div",
|
|
2046
|
+
n.formErrors.email ? (o(), l("div", Vi, a(n.formErrors.email), 1)) : m("", !0)
|
|
1996
2047
|
])
|
|
1997
2048
|
]),
|
|
1998
|
-
|
|
1999
|
-
|
|
2049
|
+
t("div", Mi, [
|
|
2050
|
+
e[26] || (e[26] = t("h3", null, "Certifications", -1)),
|
|
2000
2051
|
(o(!0), l(p, null, h(n.newCrew.certifications, (i, f) => (o(), l("div", {
|
|
2001
2052
|
key: f,
|
|
2002
2053
|
class: "certification-entry"
|
|
2003
2054
|
}, [
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
v(
|
|
2055
|
+
t("div", Ei, [
|
|
2056
|
+
t("div", Ni, [
|
|
2057
|
+
e[24] || (e[24] = t("label", null, "Certification Name", -1)),
|
|
2058
|
+
v(t("input", {
|
|
2008
2059
|
type: "text",
|
|
2009
2060
|
"onUpdate:modelValue": (y) => i.name = y,
|
|
2010
2061
|
placeholder: "Enter certification name"
|
|
2011
|
-
}, null, 8,
|
|
2062
|
+
}, null, 8, Oi), [
|
|
2012
2063
|
[k, i.name]
|
|
2013
2064
|
])
|
|
2014
2065
|
]),
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
v(
|
|
2066
|
+
t("div", Ui, [
|
|
2067
|
+
e[25] || (e[25] = t("label", null, "Expiry Date", -1)),
|
|
2068
|
+
v(t("input", {
|
|
2018
2069
|
type: "date",
|
|
2019
2070
|
"onUpdate:modelValue": (y) => i.expiryDate = y
|
|
2020
|
-
}, null, 8,
|
|
2071
|
+
}, null, 8, Li), [
|
|
2021
2072
|
[k, i.expiryDate]
|
|
2022
2073
|
])
|
|
2023
2074
|
]),
|
|
2024
|
-
|
|
2075
|
+
t("div", ji, [
|
|
2025
2076
|
n.newCrew.certifications.length > 1 ? (o(), l("button", {
|
|
2026
2077
|
key: 0,
|
|
2027
2078
|
type: "button",
|
|
2028
2079
|
class: "btn btn-danger btn-sm",
|
|
2029
|
-
onClick: (y) =>
|
|
2030
|
-
}, " Remove ", 8,
|
|
2080
|
+
onClick: (y) => r.removeCertification(f)
|
|
2081
|
+
}, " Remove ", 8, $i)) : m("", !0)
|
|
2031
2082
|
])
|
|
2032
2083
|
])
|
|
2033
2084
|
]))), 128)),
|
|
2034
|
-
|
|
2085
|
+
t("button", {
|
|
2035
2086
|
type: "button",
|
|
2036
2087
|
class: "btn btn-secondary btn-sm",
|
|
2037
|
-
onClick:
|
|
2088
|
+
onClick: e[10] || (e[10] = (...i) => r.addCertificationEntry && r.addCertificationEntry(...i))
|
|
2038
2089
|
}, " + Add More Certification ")
|
|
2039
2090
|
]),
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
v(
|
|
2091
|
+
t("div", Bi, [
|
|
2092
|
+
t("div", Hi, [
|
|
2093
|
+
e[27] || (e[27] = t("label", { for: "crew-notes" }, "Notes", -1)),
|
|
2094
|
+
v(t("textarea", {
|
|
2044
2095
|
id: "crew-notes",
|
|
2045
2096
|
rows: "3",
|
|
2046
|
-
"onUpdate:modelValue":
|
|
2097
|
+
"onUpdate:modelValue": e[11] || (e[11] = (i) => n.newCrew.notes = i)
|
|
2047
2098
|
}, null, 512), [
|
|
2048
2099
|
[k, n.newCrew.notes]
|
|
2049
2100
|
])
|
|
2050
2101
|
])
|
|
2051
2102
|
]),
|
|
2052
|
-
|
|
2053
|
-
|
|
2103
|
+
t("div", Qi, [
|
|
2104
|
+
t("button", {
|
|
2054
2105
|
class: "btn btn-secondary",
|
|
2055
|
-
onClick:
|
|
2106
|
+
onClick: e[12] || (e[12] = (...i) => r.handleCancelForm && r.handleCancelForm(...i))
|
|
2056
2107
|
}, "Cancel"),
|
|
2057
|
-
|
|
2108
|
+
t("button", {
|
|
2058
2109
|
class: "btn btn-primary",
|
|
2059
|
-
onClick:
|
|
2110
|
+
onClick: e[13] || (e[13] = (...i) => r.handleAddCrewMember && r.handleAddCrewMember(...i))
|
|
2060
2111
|
}, "Add Crew Member")
|
|
2061
2112
|
])
|
|
2062
2113
|
])) : m("", !0)
|
|
2063
2114
|
])
|
|
2064
2115
|
]);
|
|
2065
2116
|
}
|
|
2066
|
-
const
|
|
2067
|
-
const
|
|
2117
|
+
const Wi = /* @__PURE__ */ S(ni, [["render", Ji]]);
|
|
2118
|
+
const Gi = {
|
|
2068
2119
|
name: "RequisitionSystem",
|
|
2069
2120
|
props: {
|
|
2070
2121
|
userProfile: {
|
|
@@ -2105,7 +2156,7 @@ const Qi = {
|
|
|
2105
2156
|
{ name: "new-requisition", label: "New Requisition", roles: ["requisitor"] },
|
|
2106
2157
|
{ name: "my-requisitions", label: "My Requisitions", roles: ["requisitor"] },
|
|
2107
2158
|
{ name: "all-requisitions", label: "All Requisitions", roles: ["requisitor", "supervisor", "captain", "owner", "purchaser"] },
|
|
2108
|
-
{ name: "approvals", label: "Pending Approvals", roles: ["owner", "supervisor"
|
|
2159
|
+
{ name: "approvals", label: "Pending Approvals", roles: ["owner", "supervisor"] },
|
|
2109
2160
|
{ name: "purchasing", label: "Purchasing Queue", roles: ["purchaser"] },
|
|
2110
2161
|
{ name: "receiving", label: "Receiving", roles: ["requisitor"] },
|
|
2111
2162
|
{ name: "workflow", label: "Workflow Guide", roles: ["requisitor", "supervisor", "owner", "purchaser", "captain"] }
|
|
@@ -2173,7 +2224,7 @@ const Qi = {
|
|
|
2173
2224
|
return this.tabs.filter((s) => s.roles.includes(this.userRole));
|
|
2174
2225
|
},
|
|
2175
2226
|
subTotal() {
|
|
2176
|
-
return (this.poDetails.items || []).reduce((s,
|
|
2227
|
+
return (this.poDetails.items || []).reduce((s, e) => s + e.unitPrice * e.qty, 0);
|
|
2177
2228
|
},
|
|
2178
2229
|
reviewRequisitions() {
|
|
2179
2230
|
return this.requisitions.filter((s) => s.status === "under-review");
|
|
@@ -2189,7 +2240,7 @@ const Qi = {
|
|
|
2189
2240
|
},
|
|
2190
2241
|
myRequisitions() {
|
|
2191
2242
|
const s = this.userProfile.id || this.userProfile.profile_id;
|
|
2192
|
-
return this.requisitions.filter((
|
|
2243
|
+
return this.requisitions.filter((e) => e.profile_id == s);
|
|
2193
2244
|
}
|
|
2194
2245
|
},
|
|
2195
2246
|
methods: {
|
|
@@ -2200,8 +2251,8 @@ const Qi = {
|
|
|
2200
2251
|
return typeof s == "number" ? s.toFixed(2) : "0.00";
|
|
2201
2252
|
},
|
|
2202
2253
|
getRequisitionFields(s) {
|
|
2203
|
-
const
|
|
2204
|
-
return [...this.requisitionFields || [], ...
|
|
2254
|
+
const e = this.requisitionFieldsMap[s.status] || [];
|
|
2255
|
+
return [...this.requisitionFields || [], ...e];
|
|
2205
2256
|
},
|
|
2206
2257
|
addItem() {
|
|
2207
2258
|
this.form.items.push({
|
|
@@ -2222,8 +2273,8 @@ const Qi = {
|
|
|
2222
2273
|
this.poDetails.items[s].editing = !1, this.poDetails.items[s].tempPrice = this.poDetails.items[s].unitPrice;
|
|
2223
2274
|
},
|
|
2224
2275
|
savePrice(s) {
|
|
2225
|
-
const
|
|
2226
|
-
|
|
2276
|
+
const e = this.poDetails.items[s];
|
|
2277
|
+
e.tempPrice !== e.cost ? (this.currentItemIndex = s, this.showJustificationModal = !0) : (e.unitPrice = e.tempPrice, e.editing = !1);
|
|
2227
2278
|
},
|
|
2228
2279
|
confirmPriceChange() {
|
|
2229
2280
|
if (!this.justificationText.trim()) {
|
|
@@ -2277,7 +2328,7 @@ const Qi = {
|
|
|
2277
2328
|
project: this.form.project,
|
|
2278
2329
|
neededDate: this.form.neededDate,
|
|
2279
2330
|
justification: this.form.justification,
|
|
2280
|
-
items: this.form.items.map((
|
|
2331
|
+
items: this.form.items.map((e) => ({ ...e })),
|
|
2281
2332
|
status: s,
|
|
2282
2333
|
submittedDate: (/* @__PURE__ */ new Date()).toLocaleDateString(),
|
|
2283
2334
|
profile_id: this.userProfile.id || this.userProfile.profile_id
|
|
@@ -2296,8 +2347,8 @@ const Qi = {
|
|
|
2296
2347
|
// Methods for updating PO details from parent
|
|
2297
2348
|
updatePODetails(s) {
|
|
2298
2349
|
this.poDetails = s, this.getNumber();
|
|
2299
|
-
for (let
|
|
2300
|
-
|
|
2350
|
+
for (let e of this.poDetails.items)
|
|
2351
|
+
e.tempPrice = e.cost, e.unitPrice = e.cost, e.subTotal = e.unitPrice * e.qty;
|
|
2301
2352
|
},
|
|
2302
2353
|
updateVendorInfo(s) {
|
|
2303
2354
|
this.vendorInfo = s;
|
|
@@ -2306,187 +2357,187 @@ const Qi = {
|
|
|
2306
2357
|
this.isPrinting = s;
|
|
2307
2358
|
},
|
|
2308
2359
|
getNumber() {
|
|
2309
|
-
return (this.poDetails.items || []).map((s,
|
|
2360
|
+
return (this.poDetails.items || []).map((s, e) => s.itemNumber = e + 1);
|
|
2310
2361
|
}
|
|
2311
2362
|
},
|
|
2312
2363
|
created() {
|
|
2313
2364
|
this.addItem();
|
|
2314
2365
|
}
|
|
2315
|
-
},
|
|
2366
|
+
}, zi = { class: "s-container container" }, Yi = { class: "nav-tabs" }, Ki = ["onClick"], Xi = {
|
|
2316
2367
|
key: 0,
|
|
2317
2368
|
class: "tab-content active"
|
|
2318
|
-
},
|
|
2369
|
+
}, Zi = { class: "form-grid" }, en = { class: "form-group" }, tn = ["value"], sn = { class: "form-group" }, nn = ["value"], on = { class: "form-group" }, ln = ["value"], rn = { class: "form-group" }, an = { class: "form-group" }, dn = { class: "items-section" }, un = { class: "items-header" }, cn = { class: "form-group" }, mn = ["onUpdate:modelValue"], vn = { class: "form-group" }, pn = ["onUpdate:modelValue"], fn = { class: "form-group" }, hn = ["onUpdate:modelValue"], gn = { class: "form-group" }, bn = ["onUpdate:modelValue"], yn = ["value"], wn = { class: "form-group" }, kn = ["onUpdate:modelValue"], Cn = ["onClick"], _n = {
|
|
2319
2370
|
key: 1,
|
|
2320
2371
|
class: "tab-content active"
|
|
2321
|
-
},
|
|
2372
|
+
}, Dn = { class: "requisition-list" }, xn = { class: "requisition-header" }, Sn = { class: "requisition-id" }, Pn = { class: "requisition-details" }, An = { class: "detail-label" }, qn = { class: "detail-value" }, Tn = {
|
|
2322
2373
|
key: 0,
|
|
2323
2374
|
class: "form-group comments-section"
|
|
2324
|
-
},
|
|
2375
|
+
}, In = ["onClick"], Rn = {
|
|
2325
2376
|
key: 2,
|
|
2326
2377
|
class: "tab-content active"
|
|
2327
|
-
},
|
|
2378
|
+
}, Fn = { class: "requisition-list" }, Vn = { class: "requisition-header" }, Mn = { class: "requisition-id" }, En = { class: "requisition-details" }, Nn = { class: "detail-label" }, On = { class: "detail-value" }, Un = {
|
|
2328
2379
|
key: 0,
|
|
2329
2380
|
class: "form-group comments-section"
|
|
2330
|
-
},
|
|
2381
|
+
}, Ln = ["onClick"], jn = {
|
|
2331
2382
|
key: 3,
|
|
2332
2383
|
class: "tab-content active"
|
|
2333
|
-
},
|
|
2384
|
+
}, $n = {
|
|
2334
2385
|
class: "requisition-list",
|
|
2335
2386
|
id: "approvalsQueue"
|
|
2336
|
-
},
|
|
2387
|
+
}, Bn = { class: "requisition-header" }, Hn = { class: "requisition-id" }, Qn = { class: "requisition-details" }, Jn = { class: "detail-label" }, Wn = { class: "detail-value" }, Gn = { class: "detail-item" }, zn = { class: "detail-value" }, Yn = { class: "detail-item" }, Kn = { class: "item-list" }, Xn = ["onClick"], Zn = ["onClick"], eo = ["onClick"], to = {
|
|
2337
2388
|
key: 4,
|
|
2338
2389
|
class: "tab-content active"
|
|
2339
|
-
},
|
|
2390
|
+
}, so = {
|
|
2340
2391
|
class: "requisition-list",
|
|
2341
2392
|
id: "purchasingQueue"
|
|
2342
|
-
},
|
|
2393
|
+
}, io = { class: "requisition-header" }, no = { class: "requisition-id" }, oo = { class: "requisition-details" }, lo = { class: "detail-label" }, ro = { class: "detail-value" }, ao = { class: "detail-item" }, uo = { class: "detail-value" }, co = { class: "detail-item" }, mo = { class: "item-list" }, vo = ["onClick"], po = {
|
|
2343
2394
|
key: 5,
|
|
2344
2395
|
class: "tab-content active"
|
|
2345
|
-
},
|
|
2396
|
+
}, fo = {
|
|
2346
2397
|
class: "requisition-list",
|
|
2347
2398
|
id: "receivingQueue"
|
|
2348
|
-
},
|
|
2399
|
+
}, ho = { class: "requisition-header" }, go = { class: "requisition-id" }, bo = { class: "requisition-details" }, yo = { class: "detail-label" }, wo = { class: "detail-value" }, ko = { class: "detail-item" }, Co = { class: "detail-value" }, _o = { class: "detail-item" }, Do = { class: "item-list" }, xo = ["onClick"], So = {
|
|
2349
2400
|
key: 6,
|
|
2350
2401
|
class: "tab-content active"
|
|
2351
|
-
},
|
|
2402
|
+
}, Po = {
|
|
2352
2403
|
class: "po-content",
|
|
2353
2404
|
id: "po-content"
|
|
2354
|
-
},
|
|
2405
|
+
}, Ao = { class: "po-header" }, qo = { class: "company-info" }, To = { class: "info-row" }, Io = { class: "info-value" }, Ro = { class: "info-row" }, Fo = { class: "info-value" }, Vo = { class: "info-row" }, Mo = { class: "info-value" }, Eo = { class: "info-row" }, No = { class: "info-value" }, Oo = { class: "info-row" }, Uo = { class: "info-value" }, Lo = { class: "company-info" }, jo = { class: "info-row" }, $o = { class: "info-value" }, Bo = { class: "info-row" }, Ho = { class: "info-value" }, Qo = { class: "info-row" }, Jo = { class: "info-value" }, Wo = { class: "info-row" }, Go = { class: "info-value" }, zo = { class: "info-row" }, Yo = { class: "info-value" }, Ko = { class: "items-section" }, Xo = { class: "items-table" }, Zo = { key: 0 }, el = { key: 0 }, tl = {
|
|
2355
2406
|
key: 0,
|
|
2356
2407
|
class: "price-change-indicator"
|
|
2357
|
-
},
|
|
2408
|
+
}, sl = ["onUpdate:modelValue"], il = { key: 0 }, nl = ["onClick"], ol = { key: 1 }, ll = ["onClick"], rl = ["onClick"], al = {
|
|
2358
2409
|
key: 0,
|
|
2359
2410
|
class: "justification-note"
|
|
2360
|
-
},
|
|
2411
|
+
}, dl = { class: "totals" }, ul = { class: "total-row" }, cl = { class: "total-row" }, ml = { class: "total-row" }, vl = { class: "total-row grand-total" }, pl = { class: "modal-content" }, fl = { style: { "margin-bottom": "15px", color: "#666" } }, hl = { class: "modal-buttons" }, gl = ["disabled"], bl = {
|
|
2361
2412
|
key: 7,
|
|
2362
2413
|
class: "tab-content active"
|
|
2363
2414
|
};
|
|
2364
|
-
function
|
|
2365
|
-
var i, f, y, A, q, T, I, R,
|
|
2366
|
-
return o(), l("div",
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2415
|
+
function yl(s, e, u, b, n, r) {
|
|
2416
|
+
var i, f, y, A, q, T, I, R, F, V, M;
|
|
2417
|
+
return o(), l("div", zi, [
|
|
2418
|
+
e[62] || (e[62] = t("div", { class: "header" }, [
|
|
2419
|
+
t("h1", null, "OceanHelm Requisition System"),
|
|
2420
|
+
t("p", null, "Streamlined Material Request & Ordering Process")
|
|
2370
2421
|
], -1)),
|
|
2371
|
-
|
|
2372
|
-
(o(!0), l(p, null, h(
|
|
2422
|
+
t("div", Yi, [
|
|
2423
|
+
(o(!0), l(p, null, h(r.visibleTabs, (d) => (o(), l("button", {
|
|
2373
2424
|
key: d.name,
|
|
2374
2425
|
class: g(["nav-tab", { active: n.activeTab === d.name }]),
|
|
2375
|
-
onClick: (c) =>
|
|
2376
|
-
},
|
|
2426
|
+
onClick: (c) => r.setActiveTab(d.name)
|
|
2427
|
+
}, a(d.label), 11, Ki))), 128))
|
|
2377
2428
|
]),
|
|
2378
|
-
n.activeTab === "new-requisition" ? (o(), l("div",
|
|
2379
|
-
|
|
2380
|
-
onSubmit:
|
|
2429
|
+
n.activeTab === "new-requisition" ? (o(), l("div", Xi, [
|
|
2430
|
+
t("form", {
|
|
2431
|
+
onSubmit: e[5] || (e[5] = D((...d) => r.handleSubmitRequisition && r.handleSubmitRequisition(...d), ["prevent"]))
|
|
2381
2432
|
}, [
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2433
|
+
t("div", Zi, [
|
|
2434
|
+
t("div", en, [
|
|
2435
|
+
e[12] || (e[12] = t("label", null, "Requestor Name *", -1)),
|
|
2436
|
+
t("input", {
|
|
2386
2437
|
type: "text",
|
|
2387
2438
|
value: u.userProfile.full_name,
|
|
2388
2439
|
readonly: "",
|
|
2389
2440
|
required: "",
|
|
2390
2441
|
class: "form-control"
|
|
2391
|
-
}, null, 8,
|
|
2442
|
+
}, null, 8, tn)
|
|
2392
2443
|
]),
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
v(
|
|
2396
|
-
"onUpdate:modelValue":
|
|
2444
|
+
t("div", sn, [
|
|
2445
|
+
e[14] || (e[14] = t("label", null, "Department *", -1)),
|
|
2446
|
+
v(t("select", {
|
|
2447
|
+
"onUpdate:modelValue": e[0] || (e[0] = (d) => n.form.department = d),
|
|
2397
2448
|
required: ""
|
|
2398
2449
|
}, [
|
|
2399
|
-
|
|
2450
|
+
e[13] || (e[13] = t("option", { value: "" }, "Select Department", -1)),
|
|
2400
2451
|
(o(!0), l(p, null, h(n.departments, (d) => (o(), l("option", {
|
|
2401
2452
|
key: d,
|
|
2402
2453
|
value: d
|
|
2403
|
-
},
|
|
2454
|
+
}, a(d), 9, nn))), 128))
|
|
2404
2455
|
], 512), [
|
|
2405
|
-
[
|
|
2456
|
+
[_, n.form.department]
|
|
2406
2457
|
])
|
|
2407
2458
|
]),
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
v(
|
|
2411
|
-
"onUpdate:modelValue":
|
|
2459
|
+
t("div", on, [
|
|
2460
|
+
e[16] || (e[16] = t("label", null, "Vessel *", -1)),
|
|
2461
|
+
v(t("select", {
|
|
2462
|
+
"onUpdate:modelValue": e[1] || (e[1] = (d) => n.form.project = d),
|
|
2412
2463
|
class: "form-control",
|
|
2413
2464
|
required: ""
|
|
2414
2465
|
}, [
|
|
2415
|
-
|
|
2466
|
+
e[15] || (e[15] = t("option", {
|
|
2416
2467
|
disabled: "",
|
|
2417
2468
|
value: ""
|
|
2418
2469
|
}, "Select a vessel", -1)),
|
|
2419
2470
|
(o(!0), l(p, null, h(u.vessels, (d) => (o(), l("option", {
|
|
2420
2471
|
key: d.id,
|
|
2421
2472
|
value: d.name
|
|
2422
|
-
},
|
|
2473
|
+
}, a(d.name), 9, ln))), 128))
|
|
2423
2474
|
], 512), [
|
|
2424
|
-
[
|
|
2475
|
+
[_, n.form.project]
|
|
2425
2476
|
])
|
|
2426
2477
|
]),
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
v(
|
|
2478
|
+
t("div", rn, [
|
|
2479
|
+
e[17] || (e[17] = t("label", null, "Date Needed *", -1)),
|
|
2480
|
+
v(t("input", {
|
|
2430
2481
|
type: "date",
|
|
2431
|
-
"onUpdate:modelValue":
|
|
2482
|
+
"onUpdate:modelValue": e[2] || (e[2] = (d) => n.form.neededDate = d),
|
|
2432
2483
|
required: ""
|
|
2433
2484
|
}, null, 512), [
|
|
2434
2485
|
[k, n.form.neededDate]
|
|
2435
2486
|
])
|
|
2436
2487
|
])
|
|
2437
2488
|
]),
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
v(
|
|
2441
|
-
"onUpdate:modelValue":
|
|
2489
|
+
t("div", an, [
|
|
2490
|
+
e[18] || (e[18] = t("label", null, "Business Justification *", -1)),
|
|
2491
|
+
v(t("textarea", {
|
|
2492
|
+
"onUpdate:modelValue": e[3] || (e[3] = (d) => n.form.justification = d),
|
|
2442
2493
|
placeholder: "Explain why these materials are needed...",
|
|
2443
2494
|
required: ""
|
|
2444
2495
|
}, null, 512), [
|
|
2445
2496
|
[k, n.form.justification]
|
|
2446
2497
|
])
|
|
2447
2498
|
]),
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2499
|
+
t("div", dn, [
|
|
2500
|
+
t("div", un, [
|
|
2501
|
+
e[19] || (e[19] = t("h3", null, "Requested Items", -1)),
|
|
2502
|
+
t("button", {
|
|
2452
2503
|
type: "button",
|
|
2453
2504
|
class: "add-item-btn",
|
|
2454
|
-
onClick:
|
|
2505
|
+
onClick: e[4] || (e[4] = (...d) => r.addItem && r.addItem(...d))
|
|
2455
2506
|
}, "+ Add Item")
|
|
2456
2507
|
]),
|
|
2457
|
-
|
|
2508
|
+
t("div", null, [
|
|
2458
2509
|
(o(!0), l(p, null, h(n.form.items, (d, c) => (o(), l("div", {
|
|
2459
2510
|
key: c,
|
|
2460
2511
|
class: "item-row"
|
|
2461
2512
|
}, [
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
v(
|
|
2513
|
+
t("div", cn, [
|
|
2514
|
+
e[20] || (e[20] = t("label", null, "Item Code *", -1)),
|
|
2515
|
+
v(t("input", {
|
|
2465
2516
|
type: "text",
|
|
2466
2517
|
"onUpdate:modelValue": (w) => d.id = w,
|
|
2467
2518
|
required: ""
|
|
2468
|
-
}, null, 8,
|
|
2519
|
+
}, null, 8, mn), [
|
|
2469
2520
|
[k, d.id]
|
|
2470
2521
|
])
|
|
2471
2522
|
]),
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
v(
|
|
2523
|
+
t("div", vn, [
|
|
2524
|
+
e[21] || (e[21] = t("label", null, "Item Description *", -1)),
|
|
2525
|
+
v(t("input", {
|
|
2475
2526
|
type: "text",
|
|
2476
2527
|
"onUpdate:modelValue": (w) => d.desc = w,
|
|
2477
2528
|
required: ""
|
|
2478
|
-
}, null, 8,
|
|
2529
|
+
}, null, 8, pn), [
|
|
2479
2530
|
[k, d.desc]
|
|
2480
2531
|
])
|
|
2481
2532
|
]),
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
v(
|
|
2533
|
+
t("div", fn, [
|
|
2534
|
+
e[22] || (e[22] = t("label", null, "Quantity *", -1)),
|
|
2535
|
+
v(t("input", {
|
|
2485
2536
|
type: "number",
|
|
2486
2537
|
"onUpdate:modelValue": (w) => d.qty = w,
|
|
2487
2538
|
min: "1",
|
|
2488
2539
|
required: ""
|
|
2489
|
-
}, null, 8,
|
|
2540
|
+
}, null, 8, hn), [
|
|
2490
2541
|
[
|
|
2491
2542
|
k,
|
|
2492
2543
|
d.qty,
|
|
@@ -2495,29 +2546,29 @@ function hl(s, t, u, b, n, a) {
|
|
|
2495
2546
|
]
|
|
2496
2547
|
])
|
|
2497
2548
|
]),
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
v(
|
|
2549
|
+
t("div", gn, [
|
|
2550
|
+
e[23] || (e[23] = t("label", null, "Unit *", -1)),
|
|
2551
|
+
v(t("select", {
|
|
2501
2552
|
"onUpdate:modelValue": (w) => d.unit = w,
|
|
2502
2553
|
required: ""
|
|
2503
2554
|
}, [
|
|
2504
2555
|
(o(!0), l(p, null, h(n.units, (w) => (o(), l("option", {
|
|
2505
2556
|
key: w,
|
|
2506
2557
|
value: w
|
|
2507
|
-
},
|
|
2508
|
-
], 8,
|
|
2509
|
-
[
|
|
2558
|
+
}, a(w), 9, yn))), 128))
|
|
2559
|
+
], 8, bn), [
|
|
2560
|
+
[_, d.unit]
|
|
2510
2561
|
])
|
|
2511
2562
|
]),
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
v(
|
|
2563
|
+
t("div", wn, [
|
|
2564
|
+
e[24] || (e[24] = t("label", null, "Est. Unit Cost *", -1)),
|
|
2565
|
+
v(t("input", {
|
|
2515
2566
|
type: "number",
|
|
2516
2567
|
"onUpdate:modelValue": (w) => d.cost = w,
|
|
2517
2568
|
step: "0.01",
|
|
2518
2569
|
placeholder: "0.00",
|
|
2519
2570
|
required: ""
|
|
2520
|
-
}, null, 8,
|
|
2571
|
+
}, null, 8, kn), [
|
|
2521
2572
|
[
|
|
2522
2573
|
k,
|
|
2523
2574
|
d.cost,
|
|
@@ -2526,332 +2577,332 @@ function hl(s, t, u, b, n, a) {
|
|
|
2526
2577
|
]
|
|
2527
2578
|
])
|
|
2528
2579
|
]),
|
|
2529
|
-
|
|
2580
|
+
t("button", {
|
|
2530
2581
|
type: "button",
|
|
2531
2582
|
class: "remove-item-btn",
|
|
2532
|
-
onClick: (w) =>
|
|
2533
|
-
}, "Remove", 8,
|
|
2583
|
+
onClick: (w) => r.removeItem(c)
|
|
2584
|
+
}, "Remove", 8, Cn)
|
|
2534
2585
|
]))), 128))
|
|
2535
2586
|
])
|
|
2536
2587
|
]),
|
|
2537
|
-
|
|
2538
|
-
|
|
2588
|
+
e[25] || (e[25] = t("div", { class: "action-buttons" }, [
|
|
2589
|
+
t("button", {
|
|
2539
2590
|
type: "submit",
|
|
2540
2591
|
class: "btn btn-primary-req"
|
|
2541
2592
|
}, "Submit Requisition")
|
|
2542
2593
|
], -1))
|
|
2543
2594
|
], 32)
|
|
2544
2595
|
])) : m("", !0),
|
|
2545
|
-
n.activeTab === "all-requisitions" ? (o(), l("div",
|
|
2546
|
-
|
|
2596
|
+
n.activeTab === "all-requisitions" ? (o(), l("div", _n, [
|
|
2597
|
+
t("div", Dn, [
|
|
2547
2598
|
(o(!0), l(p, null, h(u.requisitions, (d) => (o(), l("div", {
|
|
2548
2599
|
key: d.id,
|
|
2549
2600
|
class: "requisition-card"
|
|
2550
2601
|
}, [
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2602
|
+
t("div", xn, [
|
|
2603
|
+
t("div", Sn, a(d.id), 1),
|
|
2604
|
+
t("div", {
|
|
2554
2605
|
class: g(["status-badge", `status-${d.status}`])
|
|
2555
|
-
},
|
|
2606
|
+
}, a(d.status), 3)
|
|
2556
2607
|
]),
|
|
2557
|
-
|
|
2558
|
-
(o(!0), l(p, null, h(
|
|
2608
|
+
t("div", Pn, [
|
|
2609
|
+
(o(!0), l(p, null, h(r.getRequisitionFields(d), (c) => (o(), l("div", {
|
|
2559
2610
|
class: "detail-item",
|
|
2560
2611
|
key: c.label
|
|
2561
2612
|
}, [
|
|
2562
|
-
|
|
2563
|
-
|
|
2613
|
+
t("div", An, a(c.label), 1),
|
|
2614
|
+
t("div", qn, a(c.value(d)), 1)
|
|
2564
2615
|
]))), 128))
|
|
2565
2616
|
]),
|
|
2566
|
-
d.status === "po-created" || d.status === "delivered" ? (o(), l("div",
|
|
2567
|
-
|
|
2568
|
-
onClick: (c) =>
|
|
2617
|
+
d.status === "po-created" || d.status === "delivered" ? (o(), l("div", Tn, [
|
|
2618
|
+
t("button", {
|
|
2619
|
+
onClick: (c) => r.handleOpenPO(d.id),
|
|
2569
2620
|
class: "add-item-btn comments-section"
|
|
2570
|
-
}, " Print PO ", 8,
|
|
2621
|
+
}, " Print PO ", 8, In)
|
|
2571
2622
|
])) : m("", !0)
|
|
2572
2623
|
]))), 128))
|
|
2573
2624
|
])
|
|
2574
2625
|
])) : m("", !0),
|
|
2575
|
-
n.activeTab === "my-requisitions" ? (o(), l("div",
|
|
2576
|
-
|
|
2577
|
-
(o(!0), l(p, null, h(
|
|
2626
|
+
n.activeTab === "my-requisitions" ? (o(), l("div", Rn, [
|
|
2627
|
+
t("div", Fn, [
|
|
2628
|
+
(o(!0), l(p, null, h(r.myRequisitions, (d) => (o(), l("div", {
|
|
2578
2629
|
key: d.id,
|
|
2579
2630
|
class: "requisition-card"
|
|
2580
2631
|
}, [
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2632
|
+
t("div", Vn, [
|
|
2633
|
+
t("div", Mn, a(d.id), 1),
|
|
2634
|
+
t("div", {
|
|
2584
2635
|
class: g(["status-badge", `status-${d.status}`])
|
|
2585
|
-
},
|
|
2636
|
+
}, a(d.status), 3)
|
|
2586
2637
|
]),
|
|
2587
|
-
|
|
2588
|
-
(o(!0), l(p, null, h(
|
|
2638
|
+
t("div", En, [
|
|
2639
|
+
(o(!0), l(p, null, h(r.getRequisitionFields(d), (c) => (o(), l("div", {
|
|
2589
2640
|
class: "detail-item",
|
|
2590
2641
|
key: c.label
|
|
2591
2642
|
}, [
|
|
2592
|
-
|
|
2593
|
-
|
|
2643
|
+
t("div", Nn, a(c.label), 1),
|
|
2644
|
+
t("div", On, a(c.value(d)), 1)
|
|
2594
2645
|
]))), 128))
|
|
2595
2646
|
]),
|
|
2596
|
-
d.status === "info-requested" ? (o(), l("div",
|
|
2597
|
-
|
|
2598
|
-
v(
|
|
2599
|
-
"onUpdate:modelValue":
|
|
2647
|
+
d.status === "info-requested" ? (o(), l("div", Un, [
|
|
2648
|
+
e[26] || (e[26] = t("label", { class: "detail-label" }, "Your Response", -1)),
|
|
2649
|
+
v(t("textarea", {
|
|
2650
|
+
"onUpdate:modelValue": e[6] || (e[6] = (c) => n.infoResponse = c),
|
|
2600
2651
|
class: "response-textarea",
|
|
2601
2652
|
placeholder: "Submit more info..."
|
|
2602
2653
|
}, null, 512), [
|
|
2603
2654
|
[k, n.infoResponse]
|
|
2604
2655
|
]),
|
|
2605
|
-
|
|
2606
|
-
onClick: (c) =>
|
|
2656
|
+
t("button", {
|
|
2657
|
+
onClick: (c) => r.handleSubmitInfoResponse(d),
|
|
2607
2658
|
class: "add-item-btn comments-section"
|
|
2608
|
-
}, " Submit Info ", 8,
|
|
2659
|
+
}, " Submit Info ", 8, Ln)
|
|
2609
2660
|
])) : m("", !0)
|
|
2610
2661
|
]))), 128))
|
|
2611
2662
|
])
|
|
2612
2663
|
])) : m("", !0),
|
|
2613
|
-
n.activeTab === "approvals" ? (o(), l("div",
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2664
|
+
n.activeTab === "approvals" ? (o(), l("div", jn, [
|
|
2665
|
+
e[29] || (e[29] = t("div", { style: { "margin-bottom": "20px" } }, [
|
|
2666
|
+
t("h3", { style: { color: "#1e40af", "margin-bottom": "15px" } }, "Department Supervisor Dashboard"),
|
|
2667
|
+
t("div", { style: { background: "#fef3c7", padding: "15px", "border-radius": "10px", "border-left": "4px solid #f59e0b" } }, [
|
|
2668
|
+
t("strong", null, "Role:"),
|
|
2669
|
+
C(" Department Supervisor - Review requests for accuracy, necessity, and budget compliance ")
|
|
2619
2670
|
])
|
|
2620
2671
|
], -1)),
|
|
2621
|
-
|
|
2622
|
-
(o(!0), l(p, null, h(
|
|
2672
|
+
t("div", $n, [
|
|
2673
|
+
(o(!0), l(p, null, h(r.reviewRequisitions, (d) => (o(), l("div", {
|
|
2623
2674
|
key: d.id,
|
|
2624
2675
|
class: "requisition-card"
|
|
2625
2676
|
}, [
|
|
2626
|
-
|
|
2627
|
-
|
|
2677
|
+
t("div", Bn, [
|
|
2678
|
+
t("div", Hn, a(d.id), 1)
|
|
2628
2679
|
]),
|
|
2629
|
-
|
|
2680
|
+
t("div", Qn, [
|
|
2630
2681
|
(o(!0), l(p, null, h(n.requisitionFields, (c) => (o(), l("div", {
|
|
2631
2682
|
class: "detail-item",
|
|
2632
2683
|
key: c.label
|
|
2633
2684
|
}, [
|
|
2634
|
-
|
|
2635
|
-
|
|
2685
|
+
t("div", Jn, a(c.label), 1),
|
|
2686
|
+
t("div", Wn, a(c.value(d)), 1)
|
|
2636
2687
|
]))), 128))
|
|
2637
2688
|
]),
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2689
|
+
t("div", Gn, [
|
|
2690
|
+
e[27] || (e[27] = t("div", { class: "detail-label" }, "Justification", -1)),
|
|
2691
|
+
t("div", zn, a(d.justification || "N/A"), 1)
|
|
2641
2692
|
]),
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
(o(!0), l(p, null, h(d.items, (c, w) => (o(), l("li", { key: w },
|
|
2693
|
+
t("div", Yn, [
|
|
2694
|
+
e[28] || (e[28] = t("div", { class: "detail-label" }, "Items", -1)),
|
|
2695
|
+
t("ul", Kn, [
|
|
2696
|
+
(o(!0), l(p, null, h(d.items, (c, w) => (o(), l("li", { key: w }, a(c.desc) + " - " + a(c.qty) + " " + a(c.unit) + " @ ₦" + a(c.cost.toFixed(2)) + " each ", 1))), 128))
|
|
2646
2697
|
])
|
|
2647
2698
|
]),
|
|
2648
|
-
|
|
2699
|
+
t("button", {
|
|
2649
2700
|
type: "button",
|
|
2650
2701
|
class: "add-item-btn",
|
|
2651
|
-
onClick: (c) =>
|
|
2652
|
-
}, "Approve", 8,
|
|
2653
|
-
|
|
2702
|
+
onClick: (c) => r.handleApproveRequisition(d.id)
|
|
2703
|
+
}, "Approve", 8, Xn),
|
|
2704
|
+
t("button", {
|
|
2654
2705
|
type: "button",
|
|
2655
2706
|
class: "marginbox btn-reject",
|
|
2656
|
-
onClick: (c) =>
|
|
2657
|
-
}, "Decline", 8,
|
|
2658
|
-
|
|
2707
|
+
onClick: (c) => r.handleDeclineRequisition(d.id)
|
|
2708
|
+
}, "Decline", 8, Zn),
|
|
2709
|
+
t("button", {
|
|
2659
2710
|
type: "button",
|
|
2660
2711
|
class: "marginbox btn-request",
|
|
2661
|
-
onClick: (c) =>
|
|
2662
|
-
}, "Request Info", 8,
|
|
2712
|
+
onClick: (c) => r.handleInfoRequisition(d.id)
|
|
2713
|
+
}, "Request Info", 8, eo)
|
|
2663
2714
|
]))), 128))
|
|
2664
2715
|
])
|
|
2665
2716
|
])) : m("", !0),
|
|
2666
|
-
n.activeTab === "purchasing" ? (o(), l("div",
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2717
|
+
n.activeTab === "purchasing" ? (o(), l("div", to, [
|
|
2718
|
+
e[32] || (e[32] = t("div", { style: { "margin-bottom": "20px" } }, [
|
|
2719
|
+
t("h3", { style: { color: "#1e40af", "margin-bottom": "15px" } }, "Purchasing Department Dashboard"),
|
|
2720
|
+
t("div", { style: { background: "#dbeafe", padding: "15px", "border-radius": "10px", "border-left": "4px solid #3b82f6" } }, [
|
|
2721
|
+
t("strong", null, "Role:"),
|
|
2722
|
+
C(" Purchasing Team - Convert approved requisitions to Purchase Orders ")
|
|
2672
2723
|
])
|
|
2673
2724
|
], -1)),
|
|
2674
|
-
|
|
2675
|
-
(o(!0), l(p, null, h(
|
|
2725
|
+
t("div", so, [
|
|
2726
|
+
(o(!0), l(p, null, h(r.poRequisitions, (d) => (o(), l("div", {
|
|
2676
2727
|
key: d.id,
|
|
2677
2728
|
class: "requisition-card"
|
|
2678
2729
|
}, [
|
|
2679
|
-
|
|
2680
|
-
|
|
2730
|
+
t("div", io, [
|
|
2731
|
+
t("div", no, a(d.id), 1)
|
|
2681
2732
|
]),
|
|
2682
|
-
|
|
2733
|
+
t("div", oo, [
|
|
2683
2734
|
(o(!0), l(p, null, h(n.requisitionFields, (c) => (o(), l("div", {
|
|
2684
2735
|
class: "detail-item",
|
|
2685
2736
|
key: c.label
|
|
2686
2737
|
}, [
|
|
2687
|
-
|
|
2688
|
-
|
|
2738
|
+
t("div", lo, a(c.label), 1),
|
|
2739
|
+
t("div", ro, a(c.value(d)), 1)
|
|
2689
2740
|
]))), 128))
|
|
2690
2741
|
]),
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2742
|
+
t("div", ao, [
|
|
2743
|
+
e[30] || (e[30] = t("div", { class: "detail-label" }, "Justification", -1)),
|
|
2744
|
+
t("div", uo, a(d.justification || "N/A"), 1)
|
|
2694
2745
|
]),
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
(o(!0), l(p, null, h(d.items, (c, w) => (o(), l("li", { key: w },
|
|
2746
|
+
t("div", co, [
|
|
2747
|
+
e[31] || (e[31] = t("div", { class: "detail-label" }, "Items", -1)),
|
|
2748
|
+
t("ul", mo, [
|
|
2749
|
+
(o(!0), l(p, null, h(d.items, (c, w) => (o(), l("li", { key: w }, a(c.desc) + " - " + a(c.qty) + " " + a(c.unit) + " @ ₦" + a(c.cost.toFixed(2)) + " each ", 1))), 128))
|
|
2699
2750
|
])
|
|
2700
2751
|
]),
|
|
2701
|
-
|
|
2752
|
+
t("button", {
|
|
2702
2753
|
type: "button",
|
|
2703
2754
|
class: "add-item-btn",
|
|
2704
|
-
onClick: (c) =>
|
|
2705
|
-
}, "Create PO", 8,
|
|
2755
|
+
onClick: (c) => r.handleCreatePO(d.id)
|
|
2756
|
+
}, "Create PO", 8, vo)
|
|
2706
2757
|
]))), 128))
|
|
2707
2758
|
])
|
|
2708
2759
|
])) : m("", !0),
|
|
2709
|
-
n.activeTab === "receiving" ? (o(), l("div",
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2760
|
+
n.activeTab === "receiving" ? (o(), l("div", po, [
|
|
2761
|
+
e[35] || (e[35] = t("div", { style: { "margin-bottom": "20px" } }, [
|
|
2762
|
+
t("h3", { style: { color: "#1e40af", "margin-bottom": "15px" } }, "Receiving & Inventory Dashboard"),
|
|
2763
|
+
t("div", { style: { background: "#dcfce7", padding: "15px", "border-radius": "10px", "border-left": "4px solid #10b981" } }, [
|
|
2764
|
+
t("strong", null, "Role:"),
|
|
2765
|
+
C(" Warehouse Team - Process incoming deliveries and update inventory ")
|
|
2715
2766
|
])
|
|
2716
2767
|
], -1)),
|
|
2717
|
-
|
|
2718
|
-
(o(!0), l(p, null, h(
|
|
2768
|
+
t("div", fo, [
|
|
2769
|
+
(o(!0), l(p, null, h(r.awaitingDelivery, (d) => (o(), l("div", {
|
|
2719
2770
|
key: d.id,
|
|
2720
2771
|
class: "requisition-card"
|
|
2721
2772
|
}, [
|
|
2722
|
-
|
|
2723
|
-
|
|
2773
|
+
t("div", ho, [
|
|
2774
|
+
t("div", go, a(d.id), 1)
|
|
2724
2775
|
]),
|
|
2725
|
-
|
|
2776
|
+
t("div", bo, [
|
|
2726
2777
|
(o(!0), l(p, null, h(n.requisitionFields, (c) => (o(), l("div", {
|
|
2727
2778
|
class: "detail-item",
|
|
2728
2779
|
key: c.label
|
|
2729
2780
|
}, [
|
|
2730
|
-
|
|
2731
|
-
|
|
2781
|
+
t("div", yo, a(c.label), 1),
|
|
2782
|
+
t("div", wo, a(c.value(d)), 1)
|
|
2732
2783
|
]))), 128))
|
|
2733
2784
|
]),
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2785
|
+
t("div", ko, [
|
|
2786
|
+
e[33] || (e[33] = t("div", { class: "detail-label" }, "Justification", -1)),
|
|
2787
|
+
t("div", Co, a(d.justification || "N/A"), 1)
|
|
2737
2788
|
]),
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
(o(!0), l(p, null, h(d.items, (c, w) => (o(), l("li", { key: w },
|
|
2789
|
+
t("div", _o, [
|
|
2790
|
+
e[34] || (e[34] = t("div", { class: "detail-label" }, "Items", -1)),
|
|
2791
|
+
t("ul", Do, [
|
|
2792
|
+
(o(!0), l(p, null, h(d.items, (c, w) => (o(), l("li", { key: w }, a(c.desc) + " - " + a(c.qty) + " " + a(c.unit) + " @ ₦" + a(c.cost.toFixed(2)) + " each ", 1))), 128))
|
|
2742
2793
|
])
|
|
2743
2794
|
]),
|
|
2744
|
-
|
|
2795
|
+
t("button", {
|
|
2745
2796
|
type: "button",
|
|
2746
2797
|
class: "add-item-btn",
|
|
2747
|
-
onClick: (c) =>
|
|
2748
|
-
}, "Accept Delivery", 8,
|
|
2798
|
+
onClick: (c) => r.handleAcceptDelivery(d.id)
|
|
2799
|
+
}, "Accept Delivery", 8, xo)
|
|
2749
2800
|
]))), 128))
|
|
2750
2801
|
])
|
|
2751
2802
|
])) : m("", !0),
|
|
2752
|
-
n.activeTab === "po" ? (o(), l("div",
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2803
|
+
n.activeTab === "po" ? (o(), l("div", So, [
|
|
2804
|
+
t("div", Po, [
|
|
2805
|
+
t("div", Ao, [
|
|
2806
|
+
t("div", qo, [
|
|
2807
|
+
e[41] || (e[41] = t("h3", null, "Vendor Information", -1)),
|
|
2808
|
+
t("div", To, [
|
|
2809
|
+
e[36] || (e[36] = t("span", { class: "info-label" }, "Company:", -1)),
|
|
2810
|
+
t("span", Io, a(n.vendorInfo.company || ((i = n.poDetails.vendorInfo) == null ? void 0 : i.company)), 1)
|
|
2760
2811
|
]),
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2812
|
+
t("div", Ro, [
|
|
2813
|
+
e[37] || (e[37] = t("span", { class: "info-label" }, "Contact:", -1)),
|
|
2814
|
+
t("span", Fo, a(n.vendorInfo.contact || ((f = n.poDetails.vendorInfo) == null ? void 0 : f.contact)), 1)
|
|
2764
2815
|
]),
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2816
|
+
t("div", Vo, [
|
|
2817
|
+
e[38] || (e[38] = t("span", { class: "info-label" }, "Email:", -1)),
|
|
2818
|
+
t("span", Mo, a(n.vendorInfo.email || ((y = n.poDetails.vendorInfo) == null ? void 0 : y.email)), 1)
|
|
2768
2819
|
]),
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2820
|
+
t("div", Eo, [
|
|
2821
|
+
e[39] || (e[39] = t("span", { class: "info-label" }, "Phone:", -1)),
|
|
2822
|
+
t("span", No, a(n.vendorInfo.phone || ((A = n.poDetails.vendorInfo) == null ? void 0 : A.phone)), 1)
|
|
2772
2823
|
]),
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2824
|
+
t("div", Oo, [
|
|
2825
|
+
e[40] || (e[40] = t("span", { class: "info-label" }, "Address:", -1)),
|
|
2826
|
+
t("span", Uo, a(n.vendorInfo.address || ((q = n.poDetails.vendorInfo) == null ? void 0 : q.address)), 1)
|
|
2776
2827
|
])
|
|
2777
2828
|
]),
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2829
|
+
t("div", Lo, [
|
|
2830
|
+
e[47] || (e[47] = t("h3", null, "Purchase Order Details", -1)),
|
|
2831
|
+
t("div", jo, [
|
|
2832
|
+
e[42] || (e[42] = t("span", { class: "info-label" }, "PO Number:", -1)),
|
|
2833
|
+
t("span", $o, a(n.poDetails.id), 1)
|
|
2783
2834
|
]),
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2835
|
+
t("div", Bo, [
|
|
2836
|
+
e[43] || (e[43] = t("span", { class: "info-label" }, "Date:", -1)),
|
|
2837
|
+
t("span", Ho, a(n.vendorInfo.poDate || ((T = n.poDetails.vendorInfo) == null ? void 0 : T.poDate)), 1)
|
|
2787
2838
|
]),
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2839
|
+
t("div", Qo, [
|
|
2840
|
+
e[44] || (e[44] = t("span", { class: "info-label" }, "Requested By:", -1)),
|
|
2841
|
+
t("span", Jo, a(n.vendorInfo.poApproved || ((I = n.poDetails.vendorInfo) == null ? void 0 : I.poApproved)), 1)
|
|
2791
2842
|
]),
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2843
|
+
t("div", Wo, [
|
|
2844
|
+
e[45] || (e[45] = t("span", { class: "info-label" }, "Department:", -1)),
|
|
2845
|
+
t("span", Go, "PO-" + a(n.poDetails.department), 1)
|
|
2795
2846
|
]),
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2847
|
+
t("div", zo, [
|
|
2848
|
+
e[46] || (e[46] = t("span", { class: "info-label" }, "Delivery Date:", -1)),
|
|
2849
|
+
t("span", Yo, a(n.poDetails.neededDate), 1)
|
|
2799
2850
|
])
|
|
2800
2851
|
])
|
|
2801
2852
|
]),
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
n.isPrinting ? m("", !0) : (o(), l("th",
|
|
2853
|
+
t("div", Ko, [
|
|
2854
|
+
e[57] || (e[57] = t("h2", { class: "section-title" }, "Order Items", -1)),
|
|
2855
|
+
t("table", Xo, [
|
|
2856
|
+
t("thead", null, [
|
|
2857
|
+
t("tr", null, [
|
|
2858
|
+
e[48] || (e[48] = t("th", null, "Item #", -1)),
|
|
2859
|
+
e[49] || (e[49] = t("th", null, "Description", -1)),
|
|
2860
|
+
e[50] || (e[50] = t("th", null, "Quantity", -1)),
|
|
2861
|
+
e[51] || (e[51] = t("th", null, "Unit Price", -1)),
|
|
2862
|
+
e[52] || (e[52] = t("th", null, "Total", -1)),
|
|
2863
|
+
n.isPrinting ? m("", !0) : (o(), l("th", Zo, "Actions"))
|
|
2813
2864
|
])
|
|
2814
2865
|
]),
|
|
2815
|
-
|
|
2866
|
+
t("tbody", null, [
|
|
2816
2867
|
(o(!0), l(p, null, h(n.poDetails.items || [], (d, c) => (o(), l("tr", { key: c }, [
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2868
|
+
t("td", null, a(d.itemNumber), 1),
|
|
2869
|
+
t("td", null, a(d.desc), 1),
|
|
2870
|
+
t("td", null, a(d.qty), 1),
|
|
2871
|
+
t("td", null, [
|
|
2821
2872
|
d.editing ? v((o(), l("input", {
|
|
2822
2873
|
key: 1,
|
|
2823
2874
|
"onUpdate:modelValue": (w) => d.tempPrice = w,
|
|
2824
2875
|
type: "number",
|
|
2825
2876
|
step: "0.01",
|
|
2826
2877
|
class: g(["price-input", { "price-changed": d.cost !== d.tempPrice }])
|
|
2827
|
-
}, null, 10,
|
|
2878
|
+
}, null, 10, sl)), [
|
|
2828
2879
|
[
|
|
2829
2880
|
k,
|
|
2830
2881
|
d.tempPrice,
|
|
2831
2882
|
void 0,
|
|
2832
2883
|
{ number: !0 }
|
|
2833
2884
|
]
|
|
2834
|
-
]) : (o(), l("span",
|
|
2835
|
-
|
|
2836
|
-
d.cost !== d.unitPrice ? (o(), l("span",
|
|
2885
|
+
]) : (o(), l("span", el, [
|
|
2886
|
+
C(" $" + a(d.cost.toFixed(2)) + " ", 1),
|
|
2887
|
+
d.cost !== d.unitPrice ? (o(), l("span", tl, "!")) : m("", !0)
|
|
2837
2888
|
]))
|
|
2838
2889
|
]),
|
|
2839
|
-
|
|
2840
|
-
n.isPrinting ? m("", !0) : (o(), l("td",
|
|
2841
|
-
d.editing ? (o(), l("div",
|
|
2842
|
-
|
|
2843
|
-
onClick: (w) =>
|
|
2890
|
+
t("td", null, "$" + a((d.unitPrice * d.qty).toFixed(2)), 1),
|
|
2891
|
+
n.isPrinting ? m("", !0) : (o(), l("td", il, [
|
|
2892
|
+
d.editing ? (o(), l("div", ol, [
|
|
2893
|
+
t("button", {
|
|
2894
|
+
onClick: (w) => r.savePrice(c),
|
|
2844
2895
|
class: "save-btn"
|
|
2845
|
-
}, "Save", 8,
|
|
2846
|
-
|
|
2847
|
-
onClick: (w) =>
|
|
2896
|
+
}, "Save", 8, ll),
|
|
2897
|
+
t("button", {
|
|
2898
|
+
onClick: (w) => r.cancelEdit(c),
|
|
2848
2899
|
class: "cancel-btn"
|
|
2849
|
-
}, "Cancel", 8,
|
|
2900
|
+
}, "Cancel", 8, rl)
|
|
2850
2901
|
])) : (o(), l("button", {
|
|
2851
2902
|
key: 0,
|
|
2852
|
-
onClick: (w) =>
|
|
2903
|
+
onClick: (w) => r.startEdit(c),
|
|
2853
2904
|
class: "edit-btn"
|
|
2854
|
-
}, " Edit Price ", 8,
|
|
2905
|
+
}, " Edit Price ", 8, nl))
|
|
2855
2906
|
]))
|
|
2856
2907
|
]))), 128))
|
|
2857
2908
|
])
|
|
@@ -2859,27 +2910,27 @@ function hl(s, t, u, b, n, a) {
|
|
|
2859
2910
|
(o(!0), l(p, null, h(n.poDetails.items || [], (d, c) => (o(), l("div", {
|
|
2860
2911
|
key: "note-" + c
|
|
2861
2912
|
}, [
|
|
2862
|
-
d.justification ? (o(), l("div",
|
|
2863
|
-
|
|
2864
|
-
|
|
2913
|
+
d.justification ? (o(), l("div", al, [
|
|
2914
|
+
t("strong", null, "Price Change Justification (Item " + a(d.itemNumber) + "):", 1),
|
|
2915
|
+
C(" " + a(d.justification), 1)
|
|
2865
2916
|
])) : m("", !0)
|
|
2866
2917
|
]))), 128)),
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2918
|
+
t("div", dl, [
|
|
2919
|
+
t("div", ul, [
|
|
2920
|
+
e[53] || (e[53] = t("span", null, "Subtotal:", -1)),
|
|
2921
|
+
t("span", null, "$" + a(r.subTotal.toFixed(2)), 1)
|
|
2871
2922
|
]),
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2923
|
+
t("div", cl, [
|
|
2924
|
+
e[54] || (e[54] = t("span", null, "Tax (%):", -1)),
|
|
2925
|
+
t("span", null, "$" + a(r.getOptional(n.vendorInfo.tax)), 1)
|
|
2875
2926
|
]),
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2927
|
+
t("div", ml, [
|
|
2928
|
+
e[55] || (e[55] = t("span", null, "Shipping:", -1)),
|
|
2929
|
+
t("span", null, "$" + a(r.getOptional(n.vendorInfo.shipping)), 1)
|
|
2879
2930
|
]),
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2931
|
+
t("div", vl, [
|
|
2932
|
+
e[56] || (e[56] = t("span", null, "Grand Total:", -1)),
|
|
2933
|
+
t("span", null, "$" + a((r.subTotal + r.getOptional(n.vendorInfo.tax) + r.getOptional(n.vendorInfo.shipping)).toFixed(2)), 1)
|
|
2883
2934
|
])
|
|
2884
2935
|
])
|
|
2885
2936
|
])
|
|
@@ -2887,34 +2938,34 @@ function hl(s, t, u, b, n, a) {
|
|
|
2887
2938
|
n.showJustificationModal ? (o(), l("div", {
|
|
2888
2939
|
key: 0,
|
|
2889
2940
|
class: "justification-modal",
|
|
2890
|
-
onClick:
|
|
2941
|
+
onClick: e[10] || (e[10] = D((...d) => r.closeJustificationModal && r.closeJustificationModal(...d), ["self"]))
|
|
2891
2942
|
}, [
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2943
|
+
t("div", pl, [
|
|
2944
|
+
e[60] || (e[60] = t("h3", null, "Price Change Justification Required", -1)),
|
|
2945
|
+
t("p", fl, [
|
|
2946
|
+
e[58] || (e[58] = C(" Please provide a justification for changing the price from ", -1)),
|
|
2947
|
+
t("strong", null, "$" + a((F = (R = r.currentItem) == null ? void 0 : R.cost) == null ? void 0 : F.toFixed(2)), 1),
|
|
2948
|
+
e[59] || (e[59] = C(" to ", -1)),
|
|
2949
|
+
t("strong", null, "$" + a((M = (V = r.currentItem) == null ? void 0 : V.tempPrice) == null ? void 0 : M.toFixed(2)), 1)
|
|
2899
2950
|
]),
|
|
2900
|
-
v(
|
|
2901
|
-
"onUpdate:modelValue":
|
|
2951
|
+
v(t("textarea", {
|
|
2952
|
+
"onUpdate:modelValue": e[7] || (e[7] = (d) => n.justificationText = d),
|
|
2902
2953
|
class: "justification-textarea",
|
|
2903
2954
|
placeholder: "Enter justification for price change...",
|
|
2904
2955
|
required: ""
|
|
2905
2956
|
}, null, 512), [
|
|
2906
2957
|
[k, n.justificationText]
|
|
2907
2958
|
]),
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
onClick:
|
|
2959
|
+
t("div", hl, [
|
|
2960
|
+
t("button", {
|
|
2961
|
+
onClick: e[8] || (e[8] = (...d) => r.closeJustificationModal && r.closeJustificationModal(...d)),
|
|
2911
2962
|
class: "cancel-btn"
|
|
2912
2963
|
}, "Cancel"),
|
|
2913
|
-
|
|
2914
|
-
onClick:
|
|
2964
|
+
t("button", {
|
|
2965
|
+
onClick: e[9] || (e[9] = (...d) => r.confirmPriceChange && r.confirmPriceChange(...d)),
|
|
2915
2966
|
class: "save-btn",
|
|
2916
2967
|
disabled: !n.justificationText.trim()
|
|
2917
|
-
}, " Confirm Change ", 8,
|
|
2968
|
+
}, " Confirm Change ", 8, gl)
|
|
2918
2969
|
])
|
|
2919
2970
|
])
|
|
2920
2971
|
])) : m("", !0),
|
|
@@ -2922,24 +2973,24 @@ function hl(s, t, u, b, n, a) {
|
|
|
2922
2973
|
key: 1,
|
|
2923
2974
|
type: "button",
|
|
2924
2975
|
class: "add-item-btn",
|
|
2925
|
-
onClick:
|
|
2976
|
+
onClick: e[11] || (e[11] = (d) => r.handleFinishPO(n.poDetails.id))
|
|
2926
2977
|
}, "Approve PO"))
|
|
2927
2978
|
])) : m("", !0),
|
|
2928
|
-
n.activeTab === "workflow" ? (o(), l("div",
|
|
2979
|
+
n.activeTab === "workflow" ? (o(), l("div", bl, e[61] || (e[61] = [
|
|
2929
2980
|
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)
|
|
2930
2981
|
]))) : m("", !0)
|
|
2931
2982
|
]);
|
|
2932
2983
|
}
|
|
2933
|
-
const
|
|
2984
|
+
const wl = /* @__PURE__ */ S(Gi, [["render", yl]]), Cl = (s = {}) => ({
|
|
2934
2985
|
brandName: s.brandName || "OceanHelm",
|
|
2935
2986
|
logoIcon: s.logoIcon || "bi bi-water",
|
|
2936
2987
|
showLogo: s.showLogo !== !1,
|
|
2937
2988
|
responsive: s.responsive !== !1,
|
|
2938
2989
|
...s
|
|
2939
|
-
}),
|
|
2990
|
+
}), _l = [
|
|
2940
2991
|
{
|
|
2941
2992
|
type: "link",
|
|
2942
|
-
label: "
|
|
2993
|
+
label: "Home",
|
|
2943
2994
|
icon: "bi bi-speedometer2",
|
|
2944
2995
|
href: "/app/dashboard",
|
|
2945
2996
|
active: !0
|
|
@@ -2954,8 +3005,41 @@ const gl = /* @__PURE__ */ S(Qi, [["render", hl]]), yl = (s = {}) => ({
|
|
|
2954
3005
|
},
|
|
2955
3006
|
{
|
|
2956
3007
|
type: "text",
|
|
2957
|
-
label: "
|
|
3008
|
+
label: "Modules"
|
|
3009
|
+
},
|
|
3010
|
+
{
|
|
3011
|
+
type: "dropdown",
|
|
3012
|
+
label: "Compliance",
|
|
3013
|
+
icon: "bi bi-list-ul",
|
|
3014
|
+
children: [
|
|
3015
|
+
{
|
|
3016
|
+
label: "Vessel Certification",
|
|
3017
|
+
action: "vessel-cert"
|
|
3018
|
+
},
|
|
3019
|
+
{
|
|
3020
|
+
type: "separator"
|
|
3021
|
+
},
|
|
3022
|
+
{
|
|
3023
|
+
label: "Crew Certification",
|
|
3024
|
+
action: "crew-cert"
|
|
3025
|
+
},
|
|
3026
|
+
{
|
|
3027
|
+
type: "separator"
|
|
3028
|
+
},
|
|
3029
|
+
{
|
|
3030
|
+
label: "Reports",
|
|
3031
|
+
action: "reports"
|
|
3032
|
+
}
|
|
3033
|
+
]
|
|
3034
|
+
},
|
|
3035
|
+
/*
|
|
3036
|
+
{
|
|
3037
|
+
type: 'link',
|
|
3038
|
+
label: 'Business Intelligence',
|
|
3039
|
+
icon: 'bi bi-graph-up-arrow',
|
|
3040
|
+
href: '/app/analytics'
|
|
2958
3041
|
},
|
|
3042
|
+
*/
|
|
2959
3043
|
{
|
|
2960
3044
|
type: "button",
|
|
2961
3045
|
label: "Maintenance",
|
|
@@ -3018,22 +3102,22 @@ const gl = /* @__PURE__ */ S(Qi, [["render", hl]]), yl = (s = {}) => ({
|
|
|
3018
3102
|
icon: "bi bi-question-circle",
|
|
3019
3103
|
action: "help"
|
|
3020
3104
|
}
|
|
3021
|
-
],
|
|
3022
|
-
install(s,
|
|
3023
|
-
s.component("ConfigurableSidebar", K), s.component("VesselLists",
|
|
3105
|
+
], Dl = (s, e) => !s.roles || s.roles.length === 0 ? !0 : s.roles.includes(e == null ? void 0 : e.role), xl = {
|
|
3106
|
+
install(s, e = {}) {
|
|
3107
|
+
s.component("ConfigurableSidebar", K), s.component("VesselLists", Fe), s.component("DashHead", Ue), s.component("ActivityLogs", ii), s.component("CrewManagement", Wi), s.component("RequisitionSystem", wl), s.component("OceanHelmMaintenance", Is), s.provide("sidebarConfig", e);
|
|
3024
3108
|
}
|
|
3025
3109
|
};
|
|
3026
3110
|
export {
|
|
3027
|
-
|
|
3111
|
+
ii as ActivityLogs,
|
|
3028
3112
|
K as ConfigurableSidebar,
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3113
|
+
Wi as CrewManagement,
|
|
3114
|
+
Ue as DashHead,
|
|
3115
|
+
Is as OceanHelmMaintenance,
|
|
3116
|
+
wl as RequisitionSystem,
|
|
3117
|
+
Fe as VesselList,
|
|
3118
|
+
Cl as createSidebarConfig,
|
|
3119
|
+
xl as default,
|
|
3120
|
+
_l as defaultMenuItems,
|
|
3121
|
+
Dl as defaultPermissionChecker
|
|
3038
3122
|
};
|
|
3039
3123
|
//# sourceMappingURL=oceanhelm.es.js.map
|