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