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