oceanhelm 0.0.7 → 0.0.9

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