oceanhelm 0.0.13 → 0.0.14

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,4 +1,4 @@
1
- import { openBlock as r, createElementBlock as a, normalizeClass as v, createElementVNode as t, toDisplayString as d, createCommentVNode as p, Fragment as y, renderList as w, withModifiers as T, createTextVNode as f, withDirectives as b, vShow as B, renderSlot as K, createVNode as H, Transition as W, withCtx as Q, withKeys as $, vModelText as _, vModelSelect as I, normalizeStyle as J, createStaticVNode as V, vModelCheckbox as Y } from "vue";
1
+ import { openBlock as r, createElementBlock as a, normalizeClass as v, createElementVNode as t, toDisplayString as d, createCommentVNode as p, Fragment as y, renderList as w, withModifiers as R, createTextVNode as f, withDirectives as b, vShow as B, renderSlot as K, createVNode as H, Transition as W, withCtx as Q, withKeys as $, vModelText as _, vModelSelect as I, normalizeStyle as J, createStaticVNode as V, vModelCheckbox as Y } from "vue";
2
2
  const O = (s, e) => {
3
3
  const u = s.__vccOpts || s;
4
4
  for (const [l, n] of e)
@@ -27,6 +27,7 @@ const O = (s, e) => {
27
27
  default: () => []
28
28
  },
29
29
  // User profile for role-based filtering
30
+ // Expected shape: { role: 'staff', categories: ['hr', 'purchaser'] }
30
31
  userProfile: {
31
32
  type: Object,
32
33
  default: () => ({})
@@ -41,7 +42,8 @@ const O = (s, e) => {
41
42
  type: String,
42
43
  default: ""
43
44
  },
44
- // Permission checker function
45
+ // Optional override: provide your own permission function
46
+ // Signature: (item, userProfile) => Boolean
45
47
  permissionChecker: {
46
48
  type: Function,
47
49
  default: null
@@ -64,13 +66,25 @@ const O = (s, e) => {
64
66
  e !== s && e.type === "dropdown" && (e.open = !1);
65
67
  }), s.open = !s.open;
66
68
  },
67
- // Get filtered children for dropdown items
68
69
  getFilteredChildren(s) {
69
70
  return s.children ? s.children.filter((e) => this.hasPermission(e)) : [];
70
71
  },
71
- // Permission checking
72
+ // ─── Permission logic ────────────────────────────────────────────────────
73
+ // Rule summary:
74
+ // 1. Use permissionChecker prop if supplied.
75
+ // 2. No `roles` array on the item → visible to everyone.
76
+ // 3. User's role must be in item.roles.
77
+ // 4. If the item also has a `categories` array AND the user's role is
78
+ // NOT one of the "elevated" roles (owner, super-staff), the user must
79
+ // possess at least one of the listed categories.
80
+ // Elevated roles bypass the category gate entirely.
81
+ // ────────────────────────────────────────────────────────────────────────
72
82
  hasPermission(s) {
73
- return this.permissionChecker ? this.permissionChecker(s, this.userProfile) : !s.roles || s.roles.length === 0 ? !0 : s.roles.includes(this.userProfile.role);
83
+ var l, n;
84
+ if (this.permissionChecker)
85
+ return this.permissionChecker(s, this.userProfile);
86
+ const e = ((l = this.userProfile) == null ? void 0 : l.role) || "", u = ((n = this.userProfile) == null ? void 0 : n.categories) || [];
87
+ return !s.roles || s.roles.length === 0 ? !0 : !(!s.roles.includes(e) || s.categories && s.categories.length > 0 && !["owner", "super-staff"].includes(e) && !s.categories.some((c) => u.includes(c)));
74
88
  },
75
89
  // Navigation handling
76
90
  handleNavigation(s) {
@@ -83,9 +97,9 @@ const O = (s, e) => {
83
97
  },
84
98
  // Item click handling
85
99
  handleItemClick(s) {
86
- this.$emit("item-click", s), s.type;
100
+ this.$emit("item-click", s);
87
101
  },
88
- // Responsive behavior
102
+ // Responsive behaviour
89
103
  initializeResponsiveBehavior() {
90
104
  const s = document.getElementById("sidebarToggle"), e = document.getElementById("sidebar"), u = document.getElementById("content");
91
105
  !s || !e || !u || (window.innerWidth >= 768 && (e.classList.toggle("active"), u.classList.toggle("active")), s.addEventListener("click", () => {
@@ -121,7 +135,7 @@ function ce(s, e, u, l, n, o) {
121
135
  i.type === "link" ? (r(), a("a", {
122
136
  key: 0,
123
137
  href: i.href || "#",
124
- onClick: T((h) => o.handleNavigation(i), ["prevent"])
138
+ onClick: R((h) => o.handleNavigation(i), ["prevent"])
125
139
  }, [
126
140
  i.icon ? (r(), a("i", {
127
141
  key: 0,
@@ -130,7 +144,7 @@ function ce(s, e, u, l, n, o) {
130
144
  f(" " + d(i.label), 1)
131
145
  ], 8, ne)) : i.type === "button" ? (r(), a("a", {
132
146
  key: 1,
133
- onClick: T((h) => o.handleAction(i), ["prevent"]),
147
+ onClick: R((h) => o.handleAction(i), ["prevent"]),
134
148
  style: { cursor: "pointer" }
135
149
  }, [
136
150
  i.icon ? (r(), a("i", {
@@ -141,7 +155,7 @@ function ce(s, e, u, l, n, o) {
141
155
  ], 8, oe)) : i.type === "dropdown" ? (r(), a(y, { key: 2 }, [
142
156
  t("a", {
143
157
  class: "dropdown-toggle",
144
- onClick: T((h) => o.toggleDropdown(i), ["prevent"]),
158
+ onClick: R((h) => o.toggleDropdown(i), ["prevent"]),
145
159
  style: { cursor: "pointer" }
146
160
  }, [
147
161
  i.icon ? (r(), a("i", {
@@ -157,7 +171,7 @@ function ce(s, e, u, l, n, o) {
157
171
  (r(!0), a(y, null, w(o.getFilteredChildren(i), (h, x) => (r(), a("li", { key: x }, [
158
172
  t("a", {
159
173
  class: "dropdown-item",
160
- onClick: T((E) => o.handleAction(h), ["prevent"])
174
+ onClick: R((E) => o.handleAction(h), ["prevent"])
161
175
  }, d(h.label), 9, ae)
162
176
  ]))), 128))
163
177
  ], 512), [
@@ -333,7 +347,7 @@ const pe = {
333
347
  key: 3,
334
348
  class: "alert alert-warning",
335
349
  role: "alert"
336
- }, Se = { class: "alert-heading" }, Te = { class: "mb-0" }, Re = {
350
+ }, Se = { class: "alert-heading" }, Re = { class: "mb-0" }, Te = {
337
351
  key: 4,
338
352
  class: "row"
339
353
  }, Ae = ["onClick"], Pe = { class: "card-body d-flex align-items-center" }, Ie = { class: "flex-grow-1" }, Ee = { class: "d-flex justify-content-between align-items-center mb-2" }, qe = { class: "card-title mb-0" }, Ne = { class: "row" }, Me = { class: "col-6" }, Le = { class: "mb-0" }, Ve = {
@@ -431,8 +445,8 @@ function Qe(s, e, u, l, n, o) {
431
445
  t("p", { class: "mb-0" }, "Click on the add vessel button above, to start adding vessels to your fleet", -1)
432
446
  ]))) : !o.filteredVessels.length && n.activeFilter !== "All" ? (r(), a("div", xe, [
433
447
  t("h4", Se, "No " + d(n.activeFilter) + " Vessels", 1),
434
- t("p", Te, "There are no " + d(n.activeFilter.toLowerCase()) + " vessels in your fleet.", 1)
435
- ])) : (r(), a("div", Re, [
448
+ t("p", Re, "There are no " + d(n.activeFilter.toLowerCase()) + " vessels in your fleet.", 1)
449
+ ])) : (r(), a("div", Te, [
436
450
  (r(!0), a(y, null, w(o.filteredVessels, (i) => (r(), a("div", {
437
451
  class: "col-lg-6",
438
452
  key: i.registrationNumber || i.id
@@ -470,7 +484,7 @@ function Qe(s, e, u, l, n, o) {
470
484
  t("button", {
471
485
  type: "button",
472
486
  class: "btn btn-outline-primary btn-sm mt-1",
473
- onClick: T((c) => o.setVesselDate(i.registrationNumber), ["stop"])
487
+ onClick: R((c) => o.setVesselDate(i.registrationNumber), ["stop"])
474
488
  }, " Set Date ", 8, Ge)
475
489
  ]))
476
490
  ])
@@ -479,12 +493,12 @@ function Qe(s, e, u, l, n, o) {
479
493
  t("div", ze, [
480
494
  t("i", {
481
495
  class: "bi bi-trash",
482
- onClick: T((c) => o.handleDeleteVessel(i), ["stop"])
496
+ onClick: R((c) => o.handleDeleteVessel(i), ["stop"])
483
497
  }, null, 8, He)
484
498
  ]),
485
499
  t("button", {
486
500
  class: "btn btn-primary",
487
- onClick: T((c) => o.handleToggleStatus(i), ["stop"])
501
+ onClick: R((c) => o.handleToggleStatus(i), ["stop"])
488
502
  }, d(i.status === "Active" ? "Mark Inactive" : "Mark Active"), 9, We)
489
503
  ], 8, Ae)
490
504
  ]))), 128))
@@ -854,8 +868,8 @@ const tt = {
854
868
  l.text(j, o + L, c), c += Math.max(j.length * 5, 5) + 2;
855
869
  };
856
870
  l.setFillColor(26, 54, 107), l.rect(0, 0, n, 24, "F"), l.setDrawColor(255, 200, 50), l.setLineWidth(1.2), l.line(o, 23.4, n - o, 23.4), l.setTextColor(255, 255, 255), l.setFontSize(14), l.setFont("helvetica", "bold"), l.text("EMERGENCY DRILL REPORT", n / 2, 10, { align: "center" }), l.setFontSize(8), l.setFont("helvetica", "normal"), l.setTextColor(200, 215, 240), l.text("Quality, Health, Safety & Environment Management System", n / 2, 17, { align: "center" }), c = 30, s.entityRef && (l.setFillColor(240, 245, 255), l.roundedRect(n - o - 44, 26, 44, 8, 2, 2, "F"), l.setTextColor(26, 54, 107), l.setFontSize(8), l.setFont("helvetica", "bold"), l.text(s.entityRef, n - o - 2, 31, { align: "right" }), l.setTextColor(30, 30, 30)), l.setDrawColor(180, 190, 210), l.setLineWidth(0.4), l.rect(o, c, i, 28, "S"), l.line(o + i / 2, c, o + i / 2, c + 28), l.line(o, c + 14, o + i / 2, c + 14), l.setFontSize(8), l.setFont("helvetica", "bold"), l.setTextColor(80, 90, 110), l.text("VESSEL:", o + 3, c + 6), l.setFont("helvetica", "bold"), l.setTextColor(20, 20, 20), l.setFontSize(10), l.text(String(s.vessel || "—").toUpperCase(), o + 22, c + 6), l.setFontSize(8), l.setFont("helvetica", "bold"), l.setTextColor(80, 90, 110), l.text("DATE / PLACE:", o + 3, c + 20), l.setFont("helvetica", "normal"), l.setTextColor(20, 20, 20), l.text(`${s.date || "—"} / ${s.vessel || "—"}`, o + 33, c + 20);
857
- const R = o + i / 2 + 3;
858
- l.setFontSize(8), l.setFont("helvetica", "bold"), l.setTextColor(80, 90, 110), l.text("KIND OF DRILL:", R, c + 6), l.setFontSize(11), l.setFont("helvetica", "bold"), l.setTextColor(26, 54, 107), l.text(String(s.entity_subtype || "—").toUpperCase(), R, c + 16), l.setFontSize(7.5), l.setFont("helvetica", "italic"), l.setTextColor(120, 120, 120), l.text("RELEVANT IMAGES/NOTES ARE ATTACHED", R, c + 23), c += 32, x("Drill Details"), E("Drill Master / Conducted By", s.entity_creator), E("Duration", s.entity_duration), E("Objectives", s.entity_objectives), E("Submitted By", s.submittedBy), E("Submitted At", this.formatDate(s.submittedAt)), c += 2;
871
+ const T = o + i / 2 + 3;
872
+ l.setFontSize(8), l.setFont("helvetica", "bold"), l.setTextColor(80, 90, 110), l.text("KIND OF DRILL:", T, c + 6), l.setFontSize(11), l.setFont("helvetica", "bold"), l.setTextColor(26, 54, 107), l.text(String(s.entity_subtype || "—").toUpperCase(), T, c + 16), l.setFontSize(7.5), l.setFont("helvetica", "italic"), l.setTextColor(120, 120, 120), l.text("RELEVANT IMAGES/NOTES ARE ATTACHED", T, c + 23), c += 32, x("Drill Details"), E("Drill Master / Conducted By", s.entity_creator), E("Duration", s.entity_duration), E("Objectives", s.entity_objectives), E("Submitted By", s.submittedBy), E("Submitted At", this.formatDate(s.submittedAt)), c += 2;
859
873
  const N = s.entity_participants || 0;
860
874
  x(`Crew Participation — ${N} member${N !== 1 ? "s" : ""} participated`);
861
875
  const M = (() => {
@@ -947,12 +961,12 @@ const tt = {
947
961
  l.setFillColor(26, 54, 107), l.rect(0, 0, n, 16, "F"), l.setTextColor(255, 255, 255), l.setFontSize(12), l.setFont("helvetica", "bold");
948
962
  const E = (s.entity_subtype || s.entityType || "INCIDENT").toUpperCase() + " REPORT";
949
963
  l.text(E, o, 10), l.setFontSize(7.5), l.setFont("helvetica", "normal"), l.setTextColor(200, 215, 240), l.text(`Ref: ${s.entityRef || "—"}`, n - o, 8, { align: "right" }), l.text(`Date: ${s.date || "—"}`, n - o, 13, { align: "right" }), c = 20, l.setFontSize(8), l.setFont("helvetica", "bold"), l.setTextColor(80, 90, 110), l.text("FORM NUMBER:", o, c + 4), l.setFont("helvetica", "normal"), l.setTextColor(20, 20, 20), l.text(s.entityRef || "—", o + 30, c + 4), l.setFont("helvetica", "bold"), l.setTextColor(80, 90, 110), l.text("SUBMITTED BY:", n / 2, c + 4), l.setFont("helvetica", "normal"), l.setTextColor(20, 20, 20), l.text(s.submittedBy || "—", n / 2 + 28, c + 4), c += 10;
950
- const R = (i - 2) / 2;
951
- l.setDrawColor(140, 150, 165), l.setLineWidth(0.35), l.rect(o, c, R, 14, "S"), l.rect(o + R + 2, c, R, 14, "S"), l.setFontSize(7.5), l.setFont("helvetica", "bold"), l.setTextColor(80, 90, 110), l.text("VESSEL NAME", o + 3, c + 5), l.text("SEVERITY / TYPE", o + R + 5, c + 5), l.setFontSize(10), l.setFont("helvetica", "bold"), l.setTextColor(20, 20, 20), l.text(String(s.vessel || "—"), o + 3, c + 12), l.text(
964
+ const T = (i - 2) / 2;
965
+ l.setDrawColor(140, 150, 165), l.setLineWidth(0.35), l.rect(o, c, T, 14, "S"), l.rect(o + T + 2, c, T, 14, "S"), l.setFontSize(7.5), l.setFont("helvetica", "bold"), l.setTextColor(80, 90, 110), l.text("VESSEL NAME", o + 3, c + 5), l.text("SEVERITY / TYPE", o + T + 5, c + 5), l.setFontSize(10), l.setFont("helvetica", "bold"), l.setTextColor(20, 20, 20), l.text(String(s.vessel || "—"), o + 3, c + 12), l.text(
952
966
  `${s.entity_subtype || "—"} · ${s.severity || s.entity_subtype || "—"}`,
953
- o + R + 5,
967
+ o + T + 5,
954
968
  c + 12
955
- ), c += 18, l.setDrawColor(140, 150, 165), l.setLineWidth(0.35), l.rect(o, c, R, 10, "S"), l.rect(o + R + 2, c, R, 10, "S"), l.setFontSize(7.5), l.setFont("helvetica", "bold"), l.setTextColor(80, 90, 110), l.text("MANAGEMENT OFFICE", o + 3, c + 4), l.text("DATE", o + R + 5, c + 4), l.setFontSize(9), l.setFont("helvetica", "normal"), l.setTextColor(20, 20, 20), l.text("—", o + 3, c + 9), l.text(s.date || "—", o + R + 5, c + 9), c += 14, x("Description of Event", s.findings, 24), x(
969
+ ), c += 18, l.setDrawColor(140, 150, 165), l.setLineWidth(0.35), l.rect(o, c, T, 10, "S"), l.rect(o + T + 2, c, T, 10, "S"), l.setFontSize(7.5), l.setFont("helvetica", "bold"), l.setTextColor(80, 90, 110), l.text("MANAGEMENT OFFICE", o + 3, c + 4), l.text("DATE", o + T + 5, c + 4), l.setFontSize(9), l.setFont("helvetica", "normal"), l.setTextColor(20, 20, 20), l.text("—", o + 3, c + 9), l.text(s.date || "—", o + T + 5, c + 9), c += 14, x("Description of Event", s.findings, 24), x(
956
970
  `Possible Consequences
957
971
  (e.g. Personal injury, damage, collision, grounding, fire, pollution etc.)`,
958
972
  s.inc_consequences || null,
@@ -1010,12 +1024,12 @@ const tt = {
1010
1024
  const A = F % 2, P = Math.floor(F / 2), m = n + A * E, g = c + P * 10;
1011
1025
  l.setFontSize(9), l.setFont("helvetica", "bold"), l.setTextColor(100, 120, 160), l.text(k[0].toUpperCase(), m, g), l.setFont("helvetica", "normal"), l.setTextColor(40, 40, 40), l.text(String(k[1]), m, g + 4.5);
1012
1026
  }), c += Math.ceil(x.length / 2) * 10 + 6;
1013
- const R = (k, F) => {
1027
+ const T = (k, F) => {
1014
1028
  F && (c > 250 && (l.addPage(), c = 20), l.setFillColor(240, 245, 255), l.roundedRect(n, c, i, 7, 1, 1, "F"), l.setFont("helvetica", "bold"), l.setFontSize(9), l.setTextColor(30, 60, 114), l.text(k.toUpperCase(), n + 3, c + 5), c += 10, l.setFont("helvetica", "normal"), l.setFontSize(10), l.setTextColor(40, 40, 40), l.splitTextToSize(F, i).forEach((A) => {
1015
1029
  c > 272 && (l.addPage(), c = 20), l.text(A, n, c), c += 5.5;
1016
1030
  }), c += 4);
1017
1031
  };
1018
- R("Findings / Summary", s.findings), R("Corrective Actions", s.correctiveActions);
1032
+ T("Findings / Summary", s.findings), T("Corrective Actions", s.correctiveActions);
1019
1033
  for (const k of e)
1020
1034
  try {
1021
1035
  let F;
@@ -1134,7 +1148,7 @@ const tt = {
1134
1148
  }, kt = ["onClick"], Ct = { class: "rc-ref" }, Ft = { class: "rc-title" }, Dt = { class: "rc-meta" }, xt = {
1135
1149
  key: 0,
1136
1150
  class: "rc-files"
1137
- }, St = ["onClick"], Tt = { class: "rc-actions" }, Rt = ["onClick"], At = ["onClick", "disabled"], Pt = {
1151
+ }, St = ["onClick"], Rt = { class: "rc-actions" }, Tt = ["onClick"], At = ["onClick", "disabled"], Pt = {
1138
1152
  key: 0,
1139
1153
  class: "spinner-xs"
1140
1154
  }, It = {
@@ -1164,7 +1178,7 @@ const tt = {
1164
1178
  }, ps = { class: "ffi-meta" }, fs = { class: "ffi-name" }, hs = { class: "ffi-sub" }, vs = { class: "ffi-acts" }, gs = ["href"], bs = {
1165
1179
  key: 0,
1166
1180
  class: "ffi-empty"
1167
- }, ys = { class: "af-zip-row" }, ws = ["onClick", "disabled"], _s = { key: 0 }, ks = { key: 1 }, Cs = { class: "af-zip-hint" }, Fs = { class: "section-heading" }, Ds = { class: "section-count" }, xs = { class: "folders-list" }, Ss = ["onClick"], Ts = { class: "af-icon-wrap" }, Rs = {
1181
+ }, ys = { class: "af-zip-row" }, ws = ["onClick", "disabled"], _s = { key: 0 }, ks = { key: 1 }, Cs = { class: "af-zip-hint" }, Fs = { class: "section-heading" }, Ds = { class: "section-count" }, xs = { class: "folders-list" }, Ss = ["onClick"], Rs = { class: "af-icon-wrap" }, Ts = {
1168
1182
  class: "af-count-badge",
1169
1183
  style: { background: "#f0ad4e", color: "#664d03" }
1170
1184
  }, As = { class: "af-meta" }, Ps = { class: "af-ref" }, Is = { class: "af-sub" }, Es = { class: "text-muted" }, qs = { class: "af-actions" }, Ns = ["onClick"], Ms = ["onClick"], Ls = {
@@ -1194,7 +1208,7 @@ const tt = {
1194
1208
  }, vi = {
1195
1209
  key: 3,
1196
1210
  class: "drill-checklist-box"
1197
- }, gi = { class: "checklist-grid" }, bi = { class: "checklist-checkbox" }, yi = ["checked", "onChange"], wi = { class: "custom-check" }, _i = { class: "checklist-q" }, ki = { class: "input-row mt-3" }, Ci = { class: "form-group" }, Fi = ["placeholder"], Di = { class: "form-group" }, xi = { class: "input-row" }, Si = { class: "form-group" }, Ti = { class: "form-group" }, Ri = { class: "form-label fw-semibold" }, Ai = {
1211
+ }, gi = { class: "checklist-grid" }, bi = { class: "checklist-checkbox" }, yi = ["checked", "onChange"], wi = { class: "custom-check" }, _i = { class: "checklist-q" }, ki = { class: "input-row mt-3" }, Ci = { class: "form-group" }, Fi = ["placeholder"], Di = { class: "form-group" }, xi = { class: "input-row" }, Si = { class: "form-group" }, Ri = { class: "form-group" }, Ti = { class: "form-label fw-semibold" }, Ai = {
1198
1212
  key: 0,
1199
1213
  class: "form-hint"
1200
1214
  }, Pi = ["placeholder"], Ii = {
@@ -1242,8 +1256,8 @@ const tt = {
1242
1256
  }, wn = { class: "view-text" }, _n = {
1243
1257
  key: 1,
1244
1258
  class: "view-section"
1245
- }, kn = { class: "attached-files mt-1" }, Cn = ["href"], Fn = { class: "text-muted ms-1" }, Dn = { class: "modal-footer" }, xn = ["disabled"], Sn = { key: 0 }, Tn = { key: 1 };
1246
- function Rn(s, e, u, l, n, o) {
1259
+ }, kn = { class: "attached-files mt-1" }, Cn = ["href"], Fn = { class: "text-muted ms-1" }, Dn = { class: "modal-footer" }, xn = ["disabled"], Sn = { key: 0 }, Rn = { key: 1 };
1260
+ function Tn(s, e, u, l, n, o) {
1247
1261
  return r(), a("div", st, [
1248
1262
  H(W, { name: "slide-down" }, {
1249
1263
  default: Q(() => [
@@ -1390,20 +1404,20 @@ function Rn(s, e, u, l, n, o) {
1390
1404
  ])) : p("", !0),
1391
1405
  t("button", {
1392
1406
  class: v(["rc-folder-pill", o.reportTypeClass(i)]),
1393
- onClick: T((h) => o.jumpToFolder(i), ["stop"]),
1407
+ onClick: R((h) => o.jumpToFolder(i), ["stop"]),
1394
1408
  title: "View folder"
1395
1409
  }, [
1396
1410
  e[72] || (e[72] = t("i", { class: "bi bi-folder-fill me-1" }, null, -1)),
1397
1411
  f(" " + d(i.entityRef || i.title), 1)
1398
1412
  ], 10, St),
1399
- t("div", Tt, [
1413
+ t("div", Rt, [
1400
1414
  t("button", {
1401
1415
  class: "rc-btn rc-btn--view",
1402
1416
  onClick: (h) => o.viewReport(i),
1403
1417
  title: "View"
1404
1418
  }, e[73] || (e[73] = [
1405
1419
  t("i", { class: "bi bi-eye" }, null, -1)
1406
- ]), 8, Rt),
1420
+ ]), 8, Tt),
1407
1421
  t("button", {
1408
1422
  class: "rc-btn rc-btn--download",
1409
1423
  onClick: (h) => o.downloadReport(i),
@@ -1468,7 +1482,7 @@ function Rn(s, e, u, l, n, o) {
1468
1482
  t("div", es, [
1469
1483
  t("button", {
1470
1484
  class: "rc-btn rc-btn--download",
1471
- onClick: T((h) => o.downloadReport(i), ["stop"]),
1485
+ onClick: R((h) => o.downloadReport(i), ["stop"]),
1472
1486
  disabled: n.generatingPdf === i.id,
1473
1487
  title: "Download ZIP"
1474
1488
  }, [
@@ -1496,14 +1510,14 @@ function Rn(s, e, u, l, n, o) {
1496
1510
  t("div", as, [
1497
1511
  t("button", {
1498
1512
  class: "rc-btn rc-btn--view",
1499
- onClick: T((h) => o.viewReport(i), ["stop"]),
1513
+ onClick: R((h) => o.viewReport(i), ["stop"]),
1500
1514
  title: "Preview"
1501
1515
  }, e[79] || (e[79] = [
1502
1516
  t("i", { class: "bi bi-eye" }, null, -1)
1503
1517
  ]), 8, ds),
1504
1518
  t("button", {
1505
1519
  class: "rc-btn rc-btn--download",
1506
- onClick: T((h) => o.downloadReportPdfOnly(i), ["stop"]),
1520
+ onClick: R((h) => o.downloadReportPdfOnly(i), ["stop"]),
1507
1521
  disabled: n.generatingPdf === i.id + "-pdf",
1508
1522
  title: "Download PDF only"
1509
1523
  }, [
@@ -1585,9 +1599,9 @@ function Rn(s, e, u, l, n, o) {
1585
1599
  class: "af-header",
1586
1600
  onClick: (c) => o.toggleFolder("user-" + i.id)
1587
1601
  }, [
1588
- t("div", Ts, [
1602
+ t("div", Rs, [
1589
1603
  e[87] || (e[87] = t("i", { class: "bi bi-folder-fill af-folder-icon color--user" }, null, -1)),
1590
- t("span", Rs, d(i.files.length), 1)
1604
+ t("span", Ts, d(i.files.length), 1)
1591
1605
  ]),
1592
1606
  t("div", As, [
1593
1607
  t("span", Ps, d(i.name), 1),
@@ -1599,14 +1613,14 @@ function Rn(s, e, u, l, n, o) {
1599
1613
  t("button", {
1600
1614
  class: "rc-btn",
1601
1615
  style: { color: "#6f42c1" },
1602
- onClick: T((c) => o.selectFolder(i), ["stop"]),
1616
+ onClick: R((c) => o.selectFolder(i), ["stop"]),
1603
1617
  title: "Add Files"
1604
1618
  }, e[88] || (e[88] = [
1605
1619
  t("i", { class: "bi bi-file-earmark-plus" }, null, -1)
1606
1620
  ]), 8, Ns),
1607
1621
  t("button", {
1608
1622
  class: "rc-btn rc-btn--danger",
1609
- onClick: T((c) => s.$emit("folder-delete-requested", i.id), ["stop"]),
1623
+ onClick: R((c) => s.$emit("folder-delete-requested", i.id), ["stop"]),
1610
1624
  title: "Delete"
1611
1625
  }, e[89] || (e[89] = [
1612
1626
  t("i", { class: "bi bi-trash" }, null, -1)
@@ -1680,7 +1694,7 @@ function Rn(s, e, u, l, n, o) {
1680
1694
  ])) : p("", !0),
1681
1695
  t("div", {
1682
1696
  class: v(["modal", { show: n.showNewFolderModal }]),
1683
- onClick: e[16] || (e[16] = T((i) => n.showNewFolderModal = !1, ["self"]))
1697
+ onClick: e[16] || (e[16] = R((i) => n.showNewFolderModal = !1, ["self"]))
1684
1698
  }, [
1685
1699
  t("div", Ws, [
1686
1700
  t("div", Qs, [
@@ -1725,7 +1739,7 @@ function Rn(s, e, u, l, n, o) {
1725
1739
  ], 2),
1726
1740
  t("div", {
1727
1741
  class: v(["modal", { show: n.showReportModal }]),
1728
- onClick: e[43] || (e[43] = T((...i) => o.closeReportForm && o.closeReportForm(...i), ["self"]))
1742
+ onClick: e[43] || (e[43] = R((...i) => o.closeReportForm && o.closeReportForm(...i), ["self"]))
1729
1743
  }, [
1730
1744
  t("div", $s, [
1731
1745
  t("div", Xs, [
@@ -1907,8 +1921,8 @@ function Rn(s, e, u, l, n, o) {
1907
1921
  ])
1908
1922
  ])
1909
1923
  ]),
1910
- t("div", Ti, [
1911
- t("label", Ri, [
1924
+ t("div", Ri, [
1925
+ t("label", Ti, [
1912
1926
  f(d(n.reportForm.entity_type === "incident" ? "Description of Event (Findings) *" : "Findings / Summary *") + " ", 1),
1913
1927
  n.reportForm.entity_type === "incident" ? (r(), a("span", Ai, "Pre-filled from incident objective — edit as needed")) : p("", !0)
1914
1928
  ]),
@@ -2031,9 +2045,9 @@ Then describe the drill scenario and findings…` : n.reportForm.entity_type ===
2031
2045
  t("div", {
2032
2046
  class: "file-drop-zone",
2033
2047
  onClick: e[37] || (e[37] = (i) => s.$refs.reportFileInput.click()),
2034
- onDragover: e[38] || (e[38] = T(() => {
2048
+ onDragover: e[38] || (e[38] = R(() => {
2035
2049
  }, ["prevent"])),
2036
- onDrop: e[39] || (e[39] = T((...i) => o.handleReportFileDrop && o.handleReportFileDrop(...i), ["prevent"]))
2050
+ onDrop: e[39] || (e[39] = R((...i) => o.handleReportFileDrop && o.handleReportFileDrop(...i), ["prevent"]))
2037
2051
  }, [
2038
2052
  e[131] || (e[131] = t("i", {
2039
2053
  class: "bi bi-cloud-upload",
@@ -2050,7 +2064,7 @@ Then describe the drill scenario and findings…` : n.reportForm.entity_type ===
2050
2064
  }, null, 2),
2051
2065
  f(d(i.name) + " ", 1),
2052
2066
  t("button", {
2053
- onClick: T((h) => o.removeReportFile(c), ["stop"])
2067
+ onClick: R((h) => o.removeReportFile(c), ["stop"])
2054
2068
  }, e[130] || (e[130] = [
2055
2069
  t("i", { class: "bi bi-x" }, null, -1)
2056
2070
  ]), 8, zi)
@@ -2099,7 +2113,7 @@ Then describe the drill scenario and findings…` : n.reportForm.entity_type ===
2099
2113
  ], 2),
2100
2114
  t("div", {
2101
2115
  class: v(["modal", { show: n.showViewModal }]),
2102
- onClick: e[48] || (e[48] = T((...i) => o.closeViewer && o.closeViewer(...i), ["self"]))
2116
+ onClick: e[48] || (e[48] = R((...i) => o.closeViewer && o.closeViewer(...i), ["self"]))
2103
2117
  }, [
2104
2118
  t("div", Ki, [
2105
2119
  n.viewingReport ? (r(), a("div", $i, [
@@ -2214,7 +2228,7 @@ Then describe the drill scenario and findings…` : n.reportForm.entity_type ===
2214
2228
  n.generatingPdf === n.viewingReport.id ? (r(), a("span", Sn, e[155] || (e[155] = [
2215
2229
  t("span", { class: "spinner-sm" }, null, -1),
2216
2230
  f(" Building ZIP…", -1)
2217
- ]))) : (r(), a("span", Tn, e[156] || (e[156] = [
2231
+ ]))) : (r(), a("span", Rn, e[156] || (e[156] = [
2218
2232
  t("i", { class: "bi bi-file-zip me-1" }, null, -1),
2219
2233
  f("Download ZIP", -1)
2220
2234
  ])))
@@ -2232,7 +2246,7 @@ Then describe the drill scenario and findings…` : n.reportForm.entity_type ===
2232
2246
  }, null, 544)
2233
2247
  ]);
2234
2248
  }
2235
- const An = /* @__PURE__ */ O(tt, [["render", Rn], ["__scopeId", "data-v-9e048de6"]]), Pn = {
2249
+ const An = /* @__PURE__ */ O(tt, [["render", Tn], ["__scopeId", "data-v-9e048de6"]]), Pn = {
2236
2250
  name: "OceanHelmMaintenance",
2237
2251
  props: {
2238
2252
  vesselInfo: {
@@ -2605,7 +2619,7 @@ const An = /* @__PURE__ */ O(tt, [["render", Rn], ["__scopeId", "data-v-9e048de6
2605
2619
  }, Mn = { key: 1 }, Ln = { class: "container" }, Vn = { class: "d-flex justify-content-between align-items-center" }, On = { class: "progress-container" }, Un = { class: "progress-info" }, jn = { class: "progress-bar" }, Bn = { class: "checklist" }, Gn = ["onClick"], zn = { key: 0 }, Hn = ["onClick"], Wn = ["onClick"], Qn = { key: 0 }, Jn = { class: "checklist" }, Yn = { class: "checklist-item" }, Zn = { class: "attachment-area" }, Kn = {
2606
2620
  key: 2,
2607
2621
  class: "status"
2608
- }, $n = { class: "form-group" }, Xn = { class: "form-group" }, eo = { class: "input-group" }, to = { class: "form-group" }, so = { class: "form-group" }, io = { class: "input-group" }, no = { class: "form-group" }, oo = { class: "form-group" }, lo = { class: "input-group" }, ro = { class: "form-group" }, ao = { class: "form-group" }, uo = ["value"], co = { class: "input-group" }, mo = { class: "form-group" }, po = { class: "input-group" }, fo = { class: "form-group" }, ho = { class: "form-group" }, vo = { class: "form-group" }, go = { class: "checkbox-group" }, bo = { class: "checkbox-item" }, yo = { class: "checkbox-item" }, wo = { class: "input-group" }, _o = { class: "form-group" }, ko = { class: "form-group" }, Co = { class: "form-group" }, Fo = { class: "attachment-area" }, Do = { class: "action-buttons" }, xo = ["disabled"], So = { class: "task-table-wrapper" }, To = { class: "table-controls" }, Ro = { class: "filters" }, Ao = { class: "task-table" }, Po = ["onClick"], Io = ["onClick"], Eo = { key: 0 }, qo = {
2622
+ }, $n = { class: "form-group" }, Xn = { class: "form-group" }, eo = { class: "input-group" }, to = { class: "form-group" }, so = { class: "form-group" }, io = { class: "input-group" }, no = { class: "form-group" }, oo = { class: "form-group" }, lo = { class: "input-group" }, ro = { class: "form-group" }, ao = { class: "form-group" }, uo = ["value"], co = { class: "input-group" }, mo = { class: "form-group" }, po = { class: "input-group" }, fo = { class: "form-group" }, ho = { class: "form-group" }, vo = { class: "form-group" }, go = { class: "checkbox-group" }, bo = { class: "checkbox-item" }, yo = { class: "checkbox-item" }, wo = { class: "input-group" }, _o = { class: "form-group" }, ko = { class: "form-group" }, Co = { class: "form-group" }, Fo = { class: "attachment-area" }, Do = { class: "action-buttons" }, xo = ["disabled"], So = { class: "task-table-wrapper" }, Ro = { class: "table-controls" }, To = { class: "filters" }, Ao = { class: "task-table" }, Po = ["onClick"], Io = ["onClick"], Eo = { key: 0 }, qo = {
2609
2623
  class: "alert alert-primary",
2610
2624
  role: "alert"
2611
2625
  }, No = { class: "mb-0" }, Mo = {
@@ -2649,7 +2663,7 @@ function kl(s, e, u, l, n, o) {
2649
2663
  o.showAddTaskButton ? (r(), a("button", {
2650
2664
  key: 0,
2651
2665
  class: "btn btn-outline-custom",
2652
- onClick: e[0] || (e[0] = T((i) => o.addTask(), ["prevent"]))
2666
+ onClick: e[0] || (e[0] = R((i) => o.addTask(), ["prevent"]))
2653
2667
  }, e[28] || (e[28] = [
2654
2668
  f(" Manually Add Task ", -1),
2655
2669
  t("i", { class: "fas fa-plus" }, null, -1)
@@ -2727,7 +2741,7 @@ function kl(s, e, u, l, n, o) {
2727
2741
  o.completedCount === n.checklists.length ? (r(), a("div", Kn, " All tasks completed! ✅ ")) : p("", !0),
2728
2742
  t("button", {
2729
2743
  class: "reset-button",
2730
- onClick: e[3] || (e[3] = T((...i) => o.resetTasks && o.resetTasks(...i), ["prevent"]))
2744
+ onClick: e[3] || (e[3] = R((...i) => o.resetTasks && o.resetTasks(...i), ["prevent"]))
2731
2745
  }, d(o.checklistButtonLabel), 1)
2732
2746
  ])
2733
2747
  ]))
@@ -2957,7 +2971,7 @@ function kl(s, e, u, l, n, o) {
2957
2971
  t("button", {
2958
2972
  type: "button",
2959
2973
  class: "btn btn-primary",
2960
- onClick: e[21] || (e[21] = T((...i) => o.saveSchedule && o.saveSchedule(...i), ["prevent"])),
2974
+ onClick: e[21] || (e[21] = R((...i) => o.saveSchedule && o.saveSchedule(...i), ["prevent"])),
2961
2975
  disabled: n.isSaving
2962
2976
  }, d(n.isSaving ? "Saving..." : "Save Schedule"), 9, xo)
2963
2977
  ])
@@ -2970,8 +2984,8 @@ function kl(s, e, u, l, n, o) {
2970
2984
  }, [
2971
2985
  e[68] || (e[68] = t("h2", null, "All Maintenance", -1)),
2972
2986
  t("div", So, [
2973
- t("div", To, [
2974
- t("div", Ro, [
2987
+ t("div", Ro, [
2988
+ t("div", To, [
2975
2989
  t("button", {
2976
2990
  class: v({ active: n.activeFilter === "due" }),
2977
2991
  onClick: e[22] || (e[22] = (i) => o.setFilter("due"))
@@ -3223,7 +3237,7 @@ const Fl = {
3223
3237
  }[s] || "badge-view";
3224
3238
  }
3225
3239
  }
3226
- }, Dl = { class: "activity-logs" }, xl = { class: "a-controls" }, Sl = { class: "a-search-box" }, Tl = ["value"], Rl = ["value"], Al = { class: "stats-grid" }, Pl = { class: "stat-card" }, Il = { class: "value" }, El = { class: "stat-card" }, ql = { class: "value" }, Nl = { class: "stat-card" }, Ml = { class: "value" }, Ll = { class: "logs-container" }, Vl = {
3240
+ }, Dl = { class: "activity-logs" }, xl = { class: "a-controls" }, Sl = { class: "a-search-box" }, Rl = ["value"], Tl = ["value"], Al = { class: "stats-grid" }, Pl = { class: "stat-card" }, Il = { class: "value" }, El = { class: "stat-card" }, ql = { class: "value" }, Nl = { class: "stat-card" }, Ml = { class: "value" }, Ll = { class: "logs-container" }, Vl = {
3227
3241
  key: 0,
3228
3242
  class: "loading"
3229
3243
  }, Ol = {
@@ -3239,7 +3253,7 @@ function Jl(s, e, u, l, n, o) {
3239
3253
  placeholder: "Search activities, users, or actions...",
3240
3254
  value: u.searchTerm,
3241
3255
  onInput: e[0] || (e[0] = (i) => s.$emit("update:searchTerm", i.target.value))
3242
- }, null, 40, Tl)
3256
+ }, null, 40, Rl)
3243
3257
  ]),
3244
3258
  t("select", {
3245
3259
  class: "filter-select",
@@ -3247,7 +3261,7 @@ function Jl(s, e, u, l, n, o) {
3247
3261
  onChange: e[1] || (e[1] = (i) => s.$emit("update:selectedFilter", i.target.value))
3248
3262
  }, e[6] || (e[6] = [
3249
3263
  V('<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)
3250
- ]), 40, Rl),
3264
+ ]), 40, Tl),
3251
3265
  t("button", {
3252
3266
  class: "btn btn-primary",
3253
3267
  onClick: e[2] || (e[2] = (i) => s.$emit("refresh"))
@@ -3955,10 +3969,10 @@ const Zl = {
3955
3969
  }, Sr = {
3956
3970
  key: 2,
3957
3971
  class: "loading-state"
3958
- }, Tr = {
3972
+ }, Rr = {
3959
3973
  key: 3,
3960
3974
  class: "timesheet-view"
3961
- }, Rr = { class: "timesheet-header" }, Ar = { class: "timesheet-controls" }, Pr = { class: "timesheet-summary" }, Ir = { class: "summary-card" }, Er = { class: "summary-value" }, qr = { class: "summary-card" }, Nr = { class: "summary-value" }, Mr = { class: "summary-card" }, Lr = { class: "summary-value" }, Vr = {
3975
+ }, Tr = { class: "timesheet-header" }, Ar = { class: "timesheet-controls" }, Pr = { class: "timesheet-summary" }, Ir = { class: "summary-card" }, Er = { class: "summary-value" }, qr = { class: "summary-card" }, Nr = { class: "summary-value" }, Mr = { class: "summary-card" }, Lr = { class: "summary-value" }, Vr = {
3962
3976
  key: 0,
3963
3977
  class: "no-results"
3964
3978
  }, Or = {
@@ -3994,7 +4008,7 @@ const Zl = {
3994
4008
  }, Sa = {
3995
4009
  key: 6,
3996
4010
  class: "add-crew-form"
3997
- }, Ta = { class: "form-row" }, Ra = { class: "form-group" }, Aa = {
4011
+ }, Ra = { class: "form-row" }, Ta = { class: "form-group" }, Aa = {
3998
4012
  key: 0,
3999
4013
  class: "error-message"
4000
4014
  }, Pa = { class: "form-group" }, Ia = ["value"], Ea = { class: "form-row" }, qa = { class: "form-group" }, Na = {
@@ -4136,8 +4150,8 @@ function sd(s, e, u, l, n, o) {
4136
4150
  t("span", { class: "visually-hidden" }, "Loading crew...")
4137
4151
  ], -1),
4138
4152
  t("p", null, "Loading crew members...", -1)
4139
- ]))) : n.showTimesheet && !n.showAddForm && !n.showGuestForm ? (r(), a("div", Tr, [
4140
- t("div", Rr, [
4153
+ ]))) : n.showTimesheet && !n.showAddForm && !n.showGuestForm ? (r(), a("div", Rr, [
4154
+ t("div", Tr, [
4141
4155
  e[43] || (e[43] = t("h3", null, [
4142
4156
  t("i", { class: "bi bi-table" }),
4143
4157
  f(" Crew Activity Timesheet")
@@ -4355,8 +4369,8 @@ function sd(s, e, u, l, n, o) {
4355
4369
  ])) : !u.loading && !n.showTimesheet && !n.showAddForm && !n.showGuestForm ? (r(), a("div", xa, d(u.crew.length === 0 ? "No crew members found." : "No crew members found matching your search criteria."), 1)) : p("", !0),
4356
4370
  n.showAddForm ? (r(), a("div", Sa, [
4357
4371
  e[68] || (e[68] = t("h2", null, "Add New Crew Member", -1)),
4358
- t("div", Ta, [
4359
- t("div", Ra, [
4372
+ t("div", Ra, [
4373
+ t("div", Ta, [
4360
4374
  e[63] || (e[63] = t("label", { for: "crew-name" }, "Full Name *", -1)),
4361
4375
  b(t("input", {
4362
4376
  type: "text",
@@ -4811,7 +4825,7 @@ const nd = {
4811
4825
  }, od = { class: "s-container container" }, ld = { class: "nav-tabs" }, rd = ["onClick"], ad = {
4812
4826
  key: 0,
4813
4827
  class: "tab-content active"
4814
- }, dd = { class: "form-grid" }, ud = { class: "form-group" }, cd = ["value"], md = { class: "form-group" }, pd = ["value"], fd = { class: "form-group" }, hd = ["value"], vd = { class: "form-group" }, gd = ["min"], bd = { class: "form-group" }, yd = { class: "items-section" }, wd = { class: "items-header" }, _d = { class: "form-group" }, kd = ["onUpdate:modelValue"], Cd = { class: "form-group" }, Fd = ["onUpdate:modelValue"], Dd = { class: "form-group" }, xd = ["onUpdate:modelValue"], Sd = { class: "form-group" }, Td = ["onUpdate:modelValue"], Rd = ["value"], Ad = { class: "form-group" }, Pd = ["onUpdate:modelValue"], Id = ["onClick"], Ed = { class: "action-buttons" }, qd = ["disabled"], Nd = {
4828
+ }, dd = { class: "form-grid" }, ud = { class: "form-group" }, cd = ["value"], md = { class: "form-group" }, pd = ["value"], fd = { class: "form-group" }, hd = ["value"], vd = { class: "form-group" }, gd = ["min"], bd = { class: "form-group" }, yd = { class: "items-section" }, wd = { class: "items-header" }, _d = { class: "form-group" }, kd = ["onUpdate:modelValue"], Cd = { class: "form-group" }, Fd = ["onUpdate:modelValue"], Dd = { class: "form-group" }, xd = ["onUpdate:modelValue"], Sd = { class: "form-group" }, Rd = ["onUpdate:modelValue"], Td = ["value"], Ad = { class: "form-group" }, Pd = ["onUpdate:modelValue"], Id = ["onClick"], Ed = { class: "action-buttons" }, qd = ["disabled"], Nd = {
4815
4829
  key: 1,
4816
4830
  class: "tab-content active"
4817
4831
  }, Md = { class: "requisition-list" }, Ld = { class: "requisition-header" }, Vd = { class: "requisition-id" }, Od = { class: "requisition-details" }, Ud = { class: "detail-label" }, jd = { class: "detail-value" }, Bd = {
@@ -4841,7 +4855,7 @@ const nd = {
4841
4855
  }, xu = {
4842
4856
  class: "requisition-list",
4843
4857
  id: "receivingQueue"
4844
- }, Su = { class: "requisition-header" }, Tu = { class: "requisition-id" }, Ru = { class: "requisition-details" }, Au = { class: "detail-label" }, Pu = { class: "detail-value" }, Iu = { class: "detail-item" }, Eu = { class: "detail-value" }, qu = { class: "detail-item" }, Nu = { class: "item-list" }, Mu = ["onClick"], Lu = {
4858
+ }, Su = { class: "requisition-header" }, Ru = { class: "requisition-id" }, Tu = { class: "requisition-details" }, Au = { class: "detail-label" }, Pu = { class: "detail-value" }, Iu = { class: "detail-item" }, Eu = { class: "detail-value" }, qu = { class: "detail-item" }, Nu = { class: "item-list" }, Mu = ["onClick"], Lu = {
4845
4859
  key: 6,
4846
4860
  class: "tab-content active"
4847
4861
  }, Vu = {
@@ -4853,12 +4867,12 @@ const nd = {
4853
4867
  }, pc = ["onUpdate:modelValue"], fc = { key: 0 }, hc = ["onClick"], vc = { key: 1 }, gc = ["onClick"], bc = ["onClick"], yc = {
4854
4868
  key: 0,
4855
4869
  class: "justification-note"
4856
- }, wc = { class: "totals" }, _c = { class: "total-row" }, kc = { class: "total-row" }, Cc = { class: "total-row" }, Fc = { class: "total-row grand-total" }, Dc = { class: "modal-content" }, xc = { style: { "margin-bottom": "15px", color: "#666" } }, Sc = { class: "modal-buttons" }, Tc = ["disabled"], Rc = {
4870
+ }, wc = { class: "totals" }, _c = { class: "total-row" }, kc = { class: "total-row" }, Cc = { class: "total-row" }, Fc = { class: "total-row grand-total" }, Dc = { class: "modal-content" }, xc = { style: { "margin-bottom": "15px", color: "#666" } }, Sc = { class: "modal-buttons" }, Rc = ["disabled"], Tc = {
4857
4871
  key: 7,
4858
4872
  class: "tab-content active"
4859
4873
  };
4860
4874
  function Ac(s, e, u, l, n, o) {
4861
- var i, c, h, x, E, R, N, M, q, k, F, A, P;
4875
+ var i, c, h, x, E, T, N, M, q, k, F, A, P;
4862
4876
  return r(), a("div", od, [
4863
4877
  e[60] || (e[60] = t("div", { class: "header" }, [
4864
4878
  t("h1", null, "OceanHelm Requisition System"),
@@ -4873,7 +4887,7 @@ function Ac(s, e, u, l, n, o) {
4873
4887
  ]),
4874
4888
  n.activeTab === "new-requisition" ? (r(), a("div", ad, [
4875
4889
  t("form", {
4876
- onSubmit: e[5] || (e[5] = T((...m) => o.handleSubmitRequisition && o.handleSubmitRequisition(...m), ["prevent"]))
4890
+ onSubmit: e[5] || (e[5] = R((...m) => o.handleSubmitRequisition && o.handleSubmitRequisition(...m), ["prevent"]))
4877
4891
  }, [
4878
4892
  t("div", dd, [
4879
4893
  t("div", ud, [
@@ -5001,8 +5015,8 @@ function Ac(s, e, u, l, n, o) {
5001
5015
  (r(!0), a(y, null, w(n.units, (D) => (r(), a("option", {
5002
5016
  key: D,
5003
5017
  value: D
5004
- }, d(D), 9, Rd))), 128))
5005
- ], 8, Td), [
5018
+ }, d(D), 9, Td))), 128))
5019
+ ], 8, Rd), [
5006
5020
  [I, m.unit]
5007
5021
  ])
5008
5022
  ]),
@@ -5219,9 +5233,9 @@ function Ac(s, e, u, l, n, o) {
5219
5233
  class: "requisition-card"
5220
5234
  }, [
5221
5235
  t("div", Su, [
5222
- t("div", Tu, d(m.id), 1)
5236
+ t("div", Ru, d(m.id), 1)
5223
5237
  ]),
5224
- t("div", Ru, [
5238
+ t("div", Tu, [
5225
5239
  (r(!0), a(y, null, w(n.requisitionFields, (g) => (r(), a("div", {
5226
5240
  class: "detail-item",
5227
5241
  key: g.label
@@ -5271,7 +5285,7 @@ function Ac(s, e, u, l, n, o) {
5271
5285
  ]),
5272
5286
  t("div", Yu, [
5273
5287
  e[39] || (e[39] = t("span", { class: "info-label" }, "Address:", -1)),
5274
- t("span", Zu, d(n.vendorInfo.address || ((R = n.poDetails.vendorInfo) == null ? void 0 : R.address) || "N/A"), 1)
5288
+ t("span", Zu, d(n.vendorInfo.address || ((T = n.poDetails.vendorInfo) == null ? void 0 : T.address) || "N/A"), 1)
5275
5289
  ])
5276
5290
  ]),
5277
5291
  t("div", Ku, [
@@ -5387,7 +5401,7 @@ function Ac(s, e, u, l, n, o) {
5387
5401
  n.showJustificationModal ? (r(), a("div", {
5388
5402
  key: 0,
5389
5403
  class: "justification-modal",
5390
- onClick: e[10] || (e[10] = T((...m) => o.closeJustificationModal && o.closeJustificationModal(...m), ["self"]))
5404
+ onClick: e[10] || (e[10] = R((...m) => o.closeJustificationModal && o.closeJustificationModal(...m), ["self"]))
5391
5405
  }, [
5392
5406
  t("div", Dc, [
5393
5407
  e[58] || (e[58] = t("h3", null, "Price Change Justification Required", -1)),
@@ -5414,7 +5428,7 @@ function Ac(s, e, u, l, n, o) {
5414
5428
  onClick: e[9] || (e[9] = (...m) => o.confirmPriceChange && o.confirmPriceChange(...m)),
5415
5429
  class: "save-btn",
5416
5430
  disabled: !n.justificationText.trim()
5417
- }, " Confirm Change ", 8, Tc)
5431
+ }, " Confirm Change ", 8, Rc)
5418
5432
  ])
5419
5433
  ])
5420
5434
  ])) : p("", !0),
@@ -5425,7 +5439,7 @@ function Ac(s, e, u, l, n, o) {
5425
5439
  onClick: e[11] || (e[11] = (m) => o.handleFinishPO(n.poDetails.id))
5426
5440
  }, "Approve PO"))
5427
5441
  ])) : p("", !0),
5428
- n.activeTab === "workflow" ? (r(), a("div", Rc, e[59] || (e[59] = [
5442
+ n.activeTab === "workflow" ? (r(), a("div", Tc, e[59] || (e[59] = [
5429
5443
  V('<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)
5430
5444
  ]))) : p("", !0)
5431
5445
  ]);
@@ -5441,7 +5455,7 @@ const Pc = /* @__PURE__ */ O(nd, [["render", Ac]]), Ec = (s = {}) => ({
5441
5455
  type: "link",
5442
5456
  label: "Home",
5443
5457
  icon: "bi bi-house",
5444
- roles: ["owner", "staff", "captain"],
5458
+ roles: ["owner", "super-staff", "staff", "captain"],
5445
5459
  href: "/app/dashboard",
5446
5460
  active: !0
5447
5461
  },
@@ -5453,6 +5467,7 @@ const Pc = /* @__PURE__ */ O(nd, [["render", Ac]]), Ec = (s = {}) => ({
5453
5467
  roles: ["crew"]
5454
5468
  },
5455
5469
  {
5470
+ // Activity Log — intentionally excluded from super-staff
5456
5471
  type: "link",
5457
5472
  label: "Activity Log",
5458
5473
  icon: "bi bi-activity",
@@ -5464,7 +5479,7 @@ const Pc = /* @__PURE__ */ O(nd, [["render", Ac]]), Ec = (s = {}) => ({
5464
5479
  label: "People Manager",
5465
5480
  icon: "bi bi-person-plus",
5466
5481
  href: "/app/people-manager",
5467
- roles: ["owner"]
5482
+ roles: ["owner", "super-staff"]
5468
5483
  },
5469
5484
  {
5470
5485
  type: "text",
@@ -5473,7 +5488,7 @@ const Pc = /* @__PURE__ */ O(nd, [["render", Ac]]), Ec = (s = {}) => ({
5473
5488
  {
5474
5489
  type: "dropdown",
5475
5490
  label: "Compliance",
5476
- roles: ["owner", "staff", "captain"],
5491
+ roles: ["owner", "super-staff", "staff", "captain"],
5477
5492
  icon: "bi bi-list-ul",
5478
5493
  children: [
5479
5494
  { label: "Vessel Certification", action: "vessel-cert" },
@@ -5485,56 +5500,86 @@ const Pc = /* @__PURE__ */ O(nd, [["render", Ac]]), Ec = (s = {}) => ({
5485
5500
  },
5486
5501
  {
5487
5502
  // ── HR MODULE ──────────────────────────────────────────────────────────
5488
- // Clock-in/out is office-only (owner + staff roles).
5489
- // Payroll and appraisal will also cover crew in a later release.
5503
+ // Visible to owner, super-staff, and staff with the 'hr' category.
5504
+ // Category-based filtering is handled by the sidebar's permissionChecker.
5490
5505
  type: "dropdown",
5491
5506
  label: "HR",
5492
5507
  icon: "bi bi-people-fill",
5493
- roles: ["owner", "staff"],
5508
+ roles: ["owner", "super-staff", "staff"],
5509
+ categories: ["hr"],
5510
+ // staff must also have this category
5494
5511
  children: [
5495
5512
  {
5496
5513
  label: "Attendance",
5497
5514
  action: "hr-attendance",
5498
- roles: ["owner", "staff"]
5515
+ roles: ["owner", "super-staff", "staff"],
5516
+ categories: ["hr"]
5499
5517
  },
5500
5518
  {
5501
5519
  label: "Payroll",
5502
5520
  action: "hr-payroll",
5503
- roles: ["owner", "staff"]
5521
+ roles: ["owner", "super-staff", "staff"],
5522
+ categories: ["hr"]
5504
5523
  },
5505
5524
  {
5506
5525
  label: "Appraisals",
5507
5526
  action: "hr-appraisals",
5508
- roles: ["owner", "staff"]
5527
+ roles: ["owner", "super-staff", "staff"],
5528
+ categories: ["hr"]
5509
5529
  },
5510
5530
  {
5511
5531
  label: "Leave Management",
5512
5532
  action: "hr-leave",
5513
- roles: ["owner", "staff"]
5533
+ roles: ["owner", "super-staff", "staff"],
5534
+ categories: ["hr"]
5514
5535
  },
5515
5536
  {
5516
5537
  label: "Disciplinary Log",
5517
- // Coming next
5518
5538
  action: "hr-disciplinary",
5519
5539
  roles: ["owner"]
5540
+ // owner-only, no category gate needed
5541
+ }
5542
+ ]
5543
+ },
5544
+ {
5545
+ // ── RECRUITMENT MODULE ─────────────────────────────────────────────────
5546
+ // Accessible to owner, super-staff, and staff with the 'hr' category.
5547
+ type: "dropdown",
5548
+ label: "Recruitment",
5549
+ icon: "bi bi-person-fill-add",
5550
+ roles: ["owner", "super-staff", "staff"],
5551
+ categories: ["hr"],
5552
+ // staff must also have this category
5553
+ children: [
5554
+ {
5555
+ label: "Recruitment Tracker",
5556
+ action: "recruitment-tracker",
5557
+ roles: ["owner", "super-staff", "staff"],
5558
+ categories: ["hr"]
5559
+ },
5560
+ {
5561
+ label: "Recruitment Builder",
5562
+ action: "recruitment-builder",
5563
+ roles: ["owner", "super-staff", "staff"],
5564
+ categories: ["hr"]
5520
5565
  }
5521
5566
  ]
5522
5567
  },
5523
- /* ── end HR MODULE ── */
5568
+ /* ── end HR / RECRUITMENT MODULES ── */
5524
5569
  {
5525
5570
  type: "button",
5526
5571
  label: "Maintenance",
5527
5572
  icon: "bi bi-tools",
5528
5573
  action: "maintenance",
5529
- roles: ["owner", "staff", "captain"]
5574
+ roles: ["owner", "super-staff", "staff", "captain"]
5530
5575
  },
5531
5576
  {
5532
5577
  type: "dropdown",
5533
5578
  label: "Crew Management",
5534
5579
  icon: "bi bi-people",
5535
- roles: ["owner", "staff", "captain"],
5580
+ roles: ["owner", "super-staff", "staff", "captain"],
5536
5581
  children: [
5537
- { label: "All Crew", action: "crew-all", roles: ["owner", "staff"] },
5582
+ { label: "All Crew", action: "crew-all", roles: ["owner", "super-staff", "staff"] },
5538
5583
  { label: "Get Crew by Vessel", action: "crew-by-vessel" },
5539
5584
  { label: "Schedule", action: "schedule" }
5540
5585
  ]
@@ -5543,10 +5588,10 @@ const Pc = /* @__PURE__ */ O(nd, [["render", Ac]]), Ec = (s = {}) => ({
5543
5588
  type: "dropdown",
5544
5589
  label: "Inventory Management",
5545
5590
  icon: "bi bi-clipboard-data",
5546
- roles: ["owner", "staff", "captain"],
5591
+ roles: ["owner", "super-staff", "staff", "captain"],
5547
5592
  children: [
5548
- { label: "Parts Inventory", action: "inventory", roles: ["owner", "staff", "captain"] },
5549
- { label: "Bunkering", action: "fuel", roles: ["owner", "staff", "captain"] }
5593
+ { label: "Parts Inventory", action: "inventory", roles: ["owner", "super-staff", "staff", "captain"] },
5594
+ { label: "Bunkering", action: "fuel", roles: ["owner", "super-staff", "staff", "captain"] }
5550
5595
  ]
5551
5596
  },
5552
5597
  {
@@ -5554,21 +5599,21 @@ const Pc = /* @__PURE__ */ O(nd, [["render", Ac]]), Ec = (s = {}) => ({
5554
5599
  label: "Requisition Processing",
5555
5600
  icon: "bi bi-calendar-check",
5556
5601
  href: "/app/requisition",
5557
- roles: ["owner", "staff", "captain"]
5602
+ roles: ["owner", "super-staff", "staff", "captain"]
5558
5603
  },
5559
5604
  {
5560
5605
  type: "button",
5561
5606
  label: "Voyage Manager",
5562
5607
  icon: "fas fa-ship",
5563
5608
  action: "coming-soon",
5564
- roles: ["owner", "staff", "captain"]
5609
+ roles: ["owner", "super-staff", "staff", "captain"]
5565
5610
  },
5566
5611
  {
5567
5612
  type: "button",
5568
5613
  label: "Vessel Log",
5569
5614
  icon: "bi bi-file-ruled",
5570
5615
  action: "coming-soon",
5571
- roles: ["owner", "staff", "captain"]
5616
+ roles: ["owner", "super-staff", "staff", "captain"]
5572
5617
  },
5573
5618
  {
5574
5619
  type: "button",
@@ -5589,7 +5634,7 @@ const Pc = /* @__PURE__ */ O(nd, [["render", Ac]]), Ec = (s = {}) => ({
5589
5634
  label: "Settings",
5590
5635
  icon: "bi bi-gear",
5591
5636
  action: "settings",
5592
- roles: ["owner", "staff"]
5637
+ roles: ["owner", "super-staff", "staff"]
5593
5638
  },
5594
5639
  {
5595
5640
  type: "button",