oceanhelm 0.0.9 → 0.0.10

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