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