oceanhelm 0.0.10 → 0.0.11

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