oceanhelm 0.0.9 → 0.0.11

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