oceanhelm 0.0.14 → 0.0.16

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,9 +1,9 @@
1
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
- const u = s.__vccOpts || s;
3
+ const c = s.__vccOpts || s;
4
4
  for (const [l, n] of e)
5
- u[l] = n;
6
- return u;
5
+ c[l] = n;
6
+ return c;
7
7
  }, X = {
8
8
  name: "ConfigurableSidebar",
9
9
  props: {
@@ -83,8 +83,8 @@ const O = (s, e) => {
83
83
  var l, n;
84
84
  if (this.permissionChecker)
85
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)));
86
+ const e = ((l = this.userProfile) == null ? void 0 : l.role) || "", c = ((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((u) => c.includes(u)));
88
88
  },
89
89
  // Navigation handling
90
90
  handleNavigation(s) {
@@ -101,12 +101,12 @@ const O = (s, e) => {
101
101
  },
102
102
  // Responsive behaviour
103
103
  initializeResponsiveBehavior() {
104
- const s = document.getElementById("sidebarToggle"), e = document.getElementById("sidebar"), u = document.getElementById("content");
105
- !s || !e || !u || (window.innerWidth >= 768 && (e.classList.toggle("active"), u.classList.toggle("active")), s.addEventListener("click", () => {
106
- e.classList.toggle("active"), u.classList.toggle("active");
104
+ const s = document.getElementById("sidebarToggle"), e = document.getElementById("sidebar"), c = document.getElementById("content");
105
+ !s || !e || !c || (window.innerWidth >= 768 && (e.classList.toggle("active"), c.classList.toggle("active")), s.addEventListener("click", () => {
106
+ e.classList.toggle("active"), c.classList.toggle("active");
107
107
  }), document.addEventListener("click", (l) => {
108
108
  const n = e.contains(l.target), o = s.contains(l.target);
109
- !n && !o && window.innerWidth < 768 && e.classList.contains("active") && (e.classList.remove("active"), u.classList.remove("active"));
109
+ !n && !o && window.innerWidth < 768 && e.classList.contains("active") && (e.classList.remove("active"), c.classList.remove("active"));
110
110
  }));
111
111
  }
112
112
  },
@@ -117,18 +117,18 @@ const O = (s, e) => {
117
117
  }, te = { style: { "margin-left": "45px" } }, se = { class: "list-unstyled components mt-4" }, ie = ["onClick"], ne = ["href", "onClick"], oe = ["onClick"], le = ["onClick"], re = { class: "sidebar-dropdown" }, ae = ["onClick"], de = {
118
118
  key: 3,
119
119
  class: "dropdown-divider"
120
- }, ue = { key: 4 };
121
- function ce(s, e, u, l, n, o) {
120
+ }, ce = { key: 4 };
121
+ function ue(s, e, c, l, n, o) {
122
122
  return r(), a("nav", {
123
123
  id: "sidebar",
124
124
  class: v(o.sidebarClasses)
125
125
  }, [
126
- u.showLogo ? (r(), a("div", ee, [
127
- t("span", te, d(u.brandName), 1)
126
+ c.showLogo ? (r(), a("div", ee, [
127
+ t("span", te, d(c.brandName), 1)
128
128
  ])) : p("", !0),
129
129
  t("ul", se, [
130
- (r(!0), a(y, null, w(o.filteredMenuItems, (i, c) => (r(), a("li", {
131
- key: c,
130
+ (r(!0), a(y, null, w(o.filteredMenuItems, (i, u) => (r(), a("li", {
131
+ key: u,
132
132
  class: v({ active: i.active, dropdown: i.type === "dropdown" }),
133
133
  onClick: (h) => o.handleItemClick(i)
134
134
  }, [
@@ -177,13 +177,13 @@ function ce(s, e, u, l, n, o) {
177
177
  ], 512), [
178
178
  [B, i.open]
179
179
  ])
180
- ], 64)) : i.type === "separator" ? (r(), a("div", de)) : i.type === "text" ? (r(), a("a", ue, d(i.label), 1)) : p("", !0)
180
+ ], 64)) : i.type === "separator" ? (r(), a("div", de)) : i.type === "text" ? (r(), a("a", ce, d(i.label), 1)) : p("", !0)
181
181
  ], 10, ie))), 128))
182
182
  ]),
183
183
  K(s.$slots, "footer")
184
184
  ], 2);
185
185
  }
186
- const me = /* @__PURE__ */ O(X, [["render", ce]]);
186
+ const me = /* @__PURE__ */ O(X, [["render", ue]]);
187
187
  const pe = {
188
188
  name: "VesselList",
189
189
  props: {
@@ -304,19 +304,19 @@ const pe = {
304
304
  return `status-${(s == null ? void 0 : s.toLowerCase()) || ""}`;
305
305
  },
306
306
  getDuration(s, e) {
307
- const u = /* @__PURE__ */ new Date(), l = new Date(s), n = u - l;
307
+ const c = /* @__PURE__ */ new Date(), l = new Date(s), n = c - l;
308
308
  if (n < 0)
309
309
  return "Invalid (future date)";
310
- const o = Math.floor(n / (1e3 * 60 * 60)), i = Math.floor(o / 24), c = o % 24;
310
+ const o = Math.floor(n / (1e3 * 60 * 60)), i = Math.floor(o / 24), u = o % 24;
311
311
  let h = "";
312
- return i > 0 && (h += `${i} day${i > 1 ? "s" : ""}`), c > 0 && (h += (h ? " " : "") + `${c} hr${c > 1 ? "s" : ""}`), h || "0 hr";
312
+ return i > 0 && (h += `${i} day${i > 1 ? "s" : ""}`), u > 0 && (h += (h ? " " : "") + `${u} hr${u > 1 ? "s" : ""}`), h || "0 hr";
313
313
  },
314
314
  setVesselDate(s) {
315
315
  this.$emit("date-change", s);
316
316
  },
317
317
  grantAccess(s) {
318
- const { role: e, vessel: u } = this.userProfile;
319
- return e === "owner" || e === "staff" || e === "captain" && u === s.name;
318
+ const { role: e, vessel: c, categories: l = [] } = this.userProfile;
319
+ return this.userRole = l.includes("marine-staff") ? "marine-staff" : "staff", e === "owner" || e === "marine-staff" || e === "captain" && c === s.name;
320
320
  },
321
321
  getDaysToExpiry(s) {
322
322
  if (!s)
@@ -357,7 +357,7 @@ const pe = {
357
357
  key: 1,
358
358
  class: "col-6"
359
359
  }, Be = { class: "text-muted" }, Ge = ["onClick"], ze = { class: "action-icon v-left delete" }, He = ["onClick"], We = ["onClick"];
360
- function Qe(s, e, u, l, n, o) {
360
+ function Qe(s, e, c, l, n, o) {
361
361
  return r(), a(y, null, [
362
362
  t("div", fe, [
363
363
  t("div", he, [
@@ -430,7 +430,7 @@ function Qe(s, e, u, l, n, o) {
430
430
  t("strong", null, d(n.activeFilter), 1),
431
431
  f(" vessels (" + d(o.filteredVessels.length) + ") ", 1)
432
432
  ])) : p("", !0),
433
- u.loading ? (r(), a("div", Fe, e[12] || (e[12] = [
433
+ c.loading ? (r(), a("div", Fe, e[12] || (e[12] = [
434
434
  t("div", {
435
435
  class: "spinner-border text-primary",
436
436
  role: "status"
@@ -453,7 +453,7 @@ function Qe(s, e, u, l, n, o) {
453
453
  }, [
454
454
  t("div", {
455
455
  class: "vessel-card",
456
- onClick: (c) => o.handleVesselClick(i)
456
+ onClick: (u) => o.handleVesselClick(i)
457
457
  }, [
458
458
  t("div", Pe, [
459
459
  e[17] || (e[17] = t("div", { class: "vessel-icon v-left" }, [
@@ -484,7 +484,7 @@ function Qe(s, e, u, l, n, o) {
484
484
  t("button", {
485
485
  type: "button",
486
486
  class: "btn btn-outline-primary btn-sm mt-1",
487
- onClick: R((c) => o.setVesselDate(i.registrationNumber), ["stop"])
487
+ onClick: R((u) => o.setVesselDate(i.registrationNumber), ["stop"])
488
488
  }, " Set Date ", 8, Ge)
489
489
  ]))
490
490
  ])
@@ -493,12 +493,12 @@ function Qe(s, e, u, l, n, o) {
493
493
  t("div", ze, [
494
494
  t("i", {
495
495
  class: "bi bi-trash",
496
- onClick: R((c) => o.handleDeleteVessel(i), ["stop"])
496
+ onClick: R((u) => o.handleDeleteVessel(i), ["stop"])
497
497
  }, null, 8, He)
498
498
  ]),
499
499
  t("button", {
500
500
  class: "btn btn-primary",
501
- onClick: R((c) => o.handleToggleStatus(i), ["stop"])
501
+ onClick: R((u) => o.handleToggleStatus(i), ["stop"])
502
502
  }, d(i.status === "Active" ? "Mark Inactive" : "Mark Active"), 9, We)
503
503
  ], 8, Ae)
504
504
  ]))), 128))
@@ -532,9 +532,9 @@ const Ye = {
532
532
  }
533
533
  }
534
534
  }, Ze = { class: "page-header d-flex justify-content-between align-items-center" }, Ke = { style: { "margin-left": "20px" } }, $e = { class: "d-flex" };
535
- function Xe(s, e, u, l, n, o) {
535
+ function Xe(s, e, c, l, n, o) {
536
536
  return r(), a("div", Ze, [
537
- t("h4", Ke, d(u.name), 1),
537
+ t("h4", Ke, d(c.name), 1),
538
538
  t("div", $e, [
539
539
  this.userProfile.role == "owner" ? (r(), a("button", {
540
540
  key: 0,
@@ -608,8 +608,8 @@ const tt = {
608
608
  manualReports() {
609
609
  return this.reports.filter(
610
610
  (s) => {
611
- var e, u;
612
- return s.entityType === "manual" || !s.entityType && !((e = s.entityRef) != null && e.startsWith("DRILL")) && !((u = s.entityRef) != null && u.startsWith("INC"));
611
+ var e, c;
612
+ return s.entityType === "manual" || !s.entityType && !((e = s.entityRef) != null && e.startsWith("DRILL")) && !((c = s.entityRef) != null && c.startsWith("INC"));
613
613
  }
614
614
  );
615
615
  },
@@ -657,6 +657,7 @@ const tt = {
657
657
  submittedBy: "",
658
658
  vessel: "",
659
659
  folderId: "",
660
+ folderName: "",
660
661
  date: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
661
662
  findings: "",
662
663
  correctiveActions: "",
@@ -672,7 +673,6 @@ const tt = {
672
673
  entity_participants: null,
673
674
  selectedMissing: "",
674
675
  drillChecklist: [!0, !0, !0, !0, !0],
675
- // incident-specific structured fields
676
676
  inc_consequences: "",
677
677
  inc_factors: "",
678
678
  inc_immediate_action: "",
@@ -697,8 +697,8 @@ const tt = {
697
697
  return "DRILL";
698
698
  if (e === "incident")
699
699
  return "INCIDENT";
700
- const u = (s == null ? void 0 : s.manualCategory) || (s == null ? void 0 : s.manual_category);
701
- return u ? u.toUpperCase() : "MANUAL";
700
+ const c = (s == null ? void 0 : s.manualCategory) || (s == null ? void 0 : s.manual_category);
701
+ return c ? c.toUpperCase() : "MANUAL";
702
702
  },
703
703
  fileIcon(s) {
704
704
  return s ? s.startsWith("image/") ? "bi-file-earmark-image" : s === "application/pdf" ? "bi-file-earmark-pdf-fill" : s.includes("word") ? "bi-file-earmark-word" : s.includes("sheet") || s.includes("excel") ? "bi-file-earmark-excel" : "bi-file-earmark" : "bi-file-earmark";
@@ -715,6 +715,10 @@ const tt = {
715
715
  openReportForm(s = "qhse") {
716
716
  this.reportForm = this.emptyForm(), this.reportForm.report_type = s, s === "qhse" && this.pendingContext && (this.reportForm.entity_creator = this.pendingContext.entity_creator, this.reportForm.entity_objectives = this.pendingContext.entity_objectives, this.reportForm.entity_subtype = this.pendingContext.entity_subtype, this.reportForm.entity_duration = this.pendingContext.entity_duration, this.reportForm.entity_participants = this.pendingContext.entity_participants, this.reportForm.entity_type = this.pendingContext.entity_type, this.reportForm.entity_id = this.pendingContext.entity_id, this.reportForm.entity_ref = this.pendingContext.entity_ref, this.reportForm.entity_label = this.pendingContext.title, this.reportForm.title = this.pendingContext.title || `Report — ${this.pendingContext.entity_ref}`, this.pendingContext.entity_type === "incident" && this.pendingContext.entity_objectives && (this.reportForm.findings = this.pendingContext.entity_objectives)), this.showReportModal = !0;
717
717
  },
718
+ // ─── FIX: Open manual report modal pre-linked to a custom folder ─────────
719
+ openManualReportForFolder(s) {
720
+ this.reportForm = this.emptyForm(), this.reportForm.report_type = "manual", this.reportForm.folderId = s.id, this.reportForm.folderName = s.name, this.showReportModal = !0;
721
+ },
718
722
  closeReportForm() {
719
723
  this.showReportModal = !1;
720
724
  },
@@ -739,35 +743,35 @@ const tt = {
739
743
  this.reportForm.entity_type = s.entity_type, this.reportForm.entity_id = s.entity_id, this.reportForm.entity_ref = s.entity_ref, this.reportForm.entity_label = s.label, this.reportForm.entity_creator = s.entity_creator || "", this.reportForm.entity_objectives = s.entity_objectives || "", this.reportForm.entity_subtype = s.entity_subtype || "", this.reportForm.entity_duration = s.entity_duration || "", this.reportForm.entity_participants = s.entity_participants || null, this.reportForm.title || (this.reportForm.title = `Report — ${s.entity_ref}`), s.entity_type === "incident" && s.entity_objectives && !this.reportForm.findings && (this.reportForm.findings = s.entity_objectives);
740
744
  },
741
745
  requestSubmitReport() {
742
- !this.reportForm.title || !this.reportForm.submittedBy || !this.reportForm.findings || this.$emit("report-submit-requested", {
743
- entity_type: this.reportForm.report_type === "manual" ? "manual" : this.reportForm.entity_type,
744
- entity_id: this.reportForm.entity_id || null,
745
- entity_ref: this.reportForm.report_type === "manual" ? this.reportForm.manual_ref || null : this.reportForm.entity_ref,
746
+ if (!this.reportForm.title || !this.reportForm.submittedBy || !this.reportForm.findings)
747
+ return;
748
+ const s = this.reportForm.report_type === "manual", e = {
749
+ entity_type: s ? "manual" : this.reportForm.entity_type || null,
750
+ entity_ref: s ? this.reportForm.manual_ref || null : this.reportForm.entity_ref || null,
746
751
  title: this.reportForm.title,
747
752
  submittedBy: this.reportForm.submittedBy,
748
753
  vessel: this.reportForm.vessel || null,
749
754
  date: this.reportForm.date,
750
755
  findings: this.reportForm.findings,
751
756
  correctiveActions: this.reportForm.correctiveActions || null,
752
- folderId: null,
753
- folderName: null,
754
- manual_category: this.reportForm.report_type === "manual" ? this.reportForm.manual_category : null,
757
+ folderId: this.reportForm.folderId || null,
758
+ folderName: this.reportForm.folderName || null,
759
+ manual_category: s ? this.reportForm.manual_category : null,
755
760
  files: this.reportForm.files,
756
- // drill / incident enrichment fields
757
761
  entity_subtype: this.reportForm.entity_subtype || null,
758
762
  entity_creator: this.reportForm.entity_creator || null,
759
763
  entity_objectives: this.reportForm.entity_objectives || null,
760
764
  entity_duration: this.reportForm.entity_duration || null,
761
765
  entity_participants: this.reportForm.entity_participants || null,
762
766
  drill_checklist: [...this.reportForm.drillChecklist],
763
- // incident structured fields
764
767
  inc_consequences: this.reportForm.inc_consequences || null,
765
768
  inc_factors: this.reportForm.inc_factors || null,
766
769
  inc_immediate_action: this.reportForm.inc_immediate_action || null,
767
770
  inc_direct_cause: this.reportForm.inc_direct_cause || null,
768
771
  inc_root_cause: this.reportForm.inc_root_cause || null,
769
772
  inc_remarks: this.reportForm.inc_remarks || null
770
- });
773
+ };
774
+ !s && this.reportForm.entity_id && (e.entity_id = this.reportForm.entity_id), this.$emit("report-submit-requested", e);
771
775
  },
772
776
  resetForm() {
773
777
  this.reportForm = this.emptyForm();
@@ -784,15 +788,14 @@ const tt = {
784
788
  closeViewer() {
785
789
  this.showViewModal = !1, this.viewingReport = null;
786
790
  },
787
- // Closes the modal immediately, then emits so ReportsView can confirm + delete
788
791
  requestDeleteReport(s) {
789
792
  this.closeViewer(), this.$emit("report-delete-requested", s);
790
793
  },
791
794
  scrollToReport(s) {
792
795
  this.$nextTick(() => {
793
- var u;
796
+ var c;
794
797
  const e = this.$refs["report-" + s];
795
- e && ((u = Array.isArray(e) ? e[0] : e) == null || u.scrollIntoView({ behavior: "smooth", block: "center" }));
798
+ e && ((c = Array.isArray(e) ? e[0] : e) == null || c.scrollIntoView({ behavior: "smooth", block: "center" }));
796
799
  });
797
800
  },
798
801
  jumpToFolder(s) {
@@ -800,7 +803,7 @@ const tt = {
800
803
  const e = "auto-" + s.id;
801
804
  this.expandedFolders.includes(e) || this.expandedFolders.push(e), this.$nextTick(() => {
802
805
  var n;
803
- const u = s.entityRef || s.id, l = this.$refs["folder-" + u];
806
+ const c = s.entityRef || s.id, l = this.$refs["folder-" + c];
804
807
  l && ((n = Array.isArray(l) ? l[0] : l) == null || n.scrollIntoView({ behavior: "smooth", block: "center" }));
805
808
  });
806
809
  },
@@ -809,10 +812,10 @@ const tt = {
809
812
  this.generatingPdf = s.id;
810
813
  try {
811
814
  await this._loadLibraries();
812
- const e = this.getFilesForReport(s.id), u = e.filter((n) => {
815
+ const e = this.getFilesForReport(s.id), c = e.filter((n) => {
813
816
  var o;
814
817
  return (o = n.type) == null ? void 0 : o.startsWith("image/");
815
- }), l = await this._buildReportPdf(s, u);
818
+ }), l = await this._buildReportPdf(s, c);
816
819
  await this._buildAndDownloadZip(s, l, e);
817
820
  } catch (e) {
818
821
  console.error("ZIP generation failed:", e), alert("Failed to generate download: " + e.message);
@@ -827,7 +830,7 @@ const tt = {
827
830
  const e = this.getFilesForReport(s.id).filter((n) => {
828
831
  var o;
829
832
  return (o = n.type) == null ? void 0 : o.startsWith("image/");
830
- }), u = await this._buildReportPdf(s, e), l = new Blob([u], { type: "application/pdf" });
833
+ }), c = await this._buildReportPdf(s, e), l = new Blob([c], { type: "application/pdf" });
831
834
  this._triggerDownload(l, `${this.safeRef(s)}_report.pdf`);
832
835
  } catch (e) {
833
836
  alert("Failed to generate PDF: " + e.message);
@@ -839,37 +842,37 @@ const tt = {
839
842
  window.jspdf || await this._loadScript("https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"), window.JSZip || await this._loadScript("https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js");
840
843
  },
841
844
  _loadScript(s) {
842
- return new Promise((e, u) => {
845
+ return new Promise((e, c) => {
843
846
  if (document.querySelector(`script[src="${s}"]`)) {
844
847
  e();
845
848
  return;
846
849
  }
847
850
  const l = document.createElement("script");
848
- l.src = s, l.onload = e, l.onerror = u, document.head.appendChild(l);
851
+ l.src = s, l.onload = e, l.onerror = c, document.head.appendChild(l);
849
852
  });
850
853
  },
851
854
  // ─── PDF router ──────────────────────────────────────────────────────────
852
855
  async _buildReportPdf(s, e = []) {
853
- const u = s.entityType || s.entity_type;
854
- return u === "drill" ? this._buildDrillPdf(s, e) : u === "incident" ? this._buildIncidentPdf(s, e) : this._buildManualPdf(s, e);
856
+ const c = s.entityType || s.entity_type;
857
+ return c === "drill" ? this._buildDrillPdf(s, e) : c === "incident" ? this._buildIncidentPdf(s, e) : this._buildManualPdf(s, e);
855
858
  },
856
859
  // ─── DRILL PDF ───────────────────────────────────────────────────────────
857
860
  async _buildDrillPdf(s, e = []) {
858
861
  var G, U;
859
- const { jsPDF: u } = window.jspdf, l = new u({ orientation: "portrait", unit: "mm", format: "a4" }), n = 210, o = 15, i = n - o * 2;
860
- let c = 0;
862
+ const { jsPDF: c } = window.jspdf, l = new c({ orientation: "portrait", unit: "mm", format: "a4" }), n = 210, o = 15, i = n - o * 2;
863
+ let u = 0;
861
864
  const h = (C = 10) => {
862
- c + C > 275 && (l.addPage(), c = 20);
865
+ u + C > 275 && (l.addPage(), u = 20);
863
866
  }, x = (C) => {
864
- h(12), l.setFillColor(26, 54, 107), l.rect(o, c, i, 7, "F"), l.setTextColor(255, 255, 255), l.setFontSize(8.5), l.setFont("helvetica", "bold"), l.text(C.toUpperCase(), o + 3, c + 5), c += 10, l.setTextColor(30, 30, 30);
867
+ h(12), l.setFillColor(26, 54, 107), l.rect(o, u, i, 7, "F"), l.setTextColor(255, 255, 255), l.setFontSize(8.5), l.setFont("helvetica", "bold"), l.text(C.toUpperCase(), o + 3, u + 5), u += 10, l.setTextColor(30, 30, 30);
865
868
  }, E = (C, S, L = 68) => {
866
- h(7), l.setFontSize(9), l.setFont("helvetica", "bold"), l.setTextColor(80, 90, 110), l.text(C, o + 2, c), l.setFont("helvetica", "normal"), l.setTextColor(20, 20, 20), l.text(":", o + L - 6, c);
869
+ h(7), l.setFontSize(9), l.setFont("helvetica", "bold"), l.setTextColor(80, 90, 110), l.text(C, o + 2, u), l.setFont("helvetica", "normal"), l.setTextColor(20, 20, 20), l.text(":", o + L - 6, u);
867
870
  const j = l.splitTextToSize(String(S || "—"), i - L - 4);
868
- l.text(j, o + L, c), c += Math.max(j.length * 5, 5) + 2;
871
+ l.text(j, o + L, u), u += Math.max(j.length * 5, 5) + 2;
869
872
  };
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);
873
+ 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" }), u = 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, u, i, 28, "S"), l.line(o + i / 2, u, o + i / 2, u + 28), l.line(o, u + 14, o + i / 2, u + 14), l.setFontSize(8), l.setFont("helvetica", "bold"), l.setTextColor(80, 90, 110), l.text("VESSEL:", o + 3, u + 6), l.setFont("helvetica", "bold"), l.setTextColor(20, 20, 20), l.setFontSize(10), l.text(String(s.vessel || "—").toUpperCase(), o + 22, u + 6), l.setFontSize(8), l.setFont("helvetica", "bold"), l.setTextColor(80, 90, 110), l.text("DATE / PLACE:", o + 3, u + 20), l.setFont("helvetica", "normal"), l.setTextColor(20, 20, 20), l.text(`${s.date || "—"} / ${s.vessel || "—"}`, o + 33, u + 20);
871
874
  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;
875
+ l.setFontSize(8), l.setFont("helvetica", "bold"), l.setTextColor(80, 90, 110), l.text("KIND OF DRILL:", T, u + 6), l.setFontSize(11), l.setFont("helvetica", "bold"), l.setTextColor(26, 54, 107), l.text(String(s.entity_subtype || "—").toUpperCase(), T, u + 16), l.setFontSize(7.5), l.setFont("helvetica", "italic"), l.setTextColor(120, 120, 120), l.text("RELEVANT IMAGES/NOTES ARE ATTACHED", T, u + 23), u += 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)), u += 2;
873
876
  const N = s.entity_participants || 0;
874
877
  x(`Crew Participation — ${N} member${N !== 1 ? "s" : ""} participated`);
875
878
  const M = (() => {
@@ -881,13 +884,13 @@ const tt = {
881
884
  })();
882
885
  h(14);
883
886
  const q = o, k = 12, F = o + k, A = i - k;
884
- l.setFillColor(235, 240, 250), l.rect(q, c, i, 7, "F"), l.setFontSize(8), l.setFont("helvetica", "bold"), l.setTextColor(26, 54, 107), l.text("NO.", q + 2, c + 5), l.text("NAME / RANK", F + 2, c + 5), c += 8, M.length > 0 ? M.forEach((C, S) => {
885
- h(7), S % 2 === 0 && (l.setFillColor(249, 250, 252), l.rect(q, c - 1, i, 7, "F")), l.setFontSize(8.5), l.setFont("helvetica", "normal"), l.setTextColor(30, 30, 30), l.text(String(S + 1), q + 2, c + 4), l.text(l.splitTextToSize(C, A - 4)[0], F + 2, c + 4), c += 7;
887
+ l.setFillColor(235, 240, 250), l.rect(q, u, i, 7, "F"), l.setFontSize(8), l.setFont("helvetica", "bold"), l.setTextColor(26, 54, 107), l.text("NO.", q + 2, u + 5), l.text("NAME / RANK", F + 2, u + 5), u += 8, M.length > 0 ? M.forEach((C, S) => {
888
+ h(7), S % 2 === 0 && (l.setFillColor(249, 250, 252), l.rect(q, u - 1, i, 7, "F")), l.setFontSize(8.5), l.setFont("helvetica", "normal"), l.setTextColor(30, 30, 30), l.text(String(S + 1), q + 2, u + 4), l.text(l.splitTextToSize(C, A - 4)[0], F + 2, u + 4), u += 7;
886
889
  }) : (h(8), l.setFontSize(8.5), l.setFont("helvetica", "italic"), l.setTextColor(150, 150, 150), l.text(
887
890
  `${N} crew members participated — attach signed crew list with participants' signatures`,
888
891
  F + 2,
889
- c + 4
890
- ), c += 8), c += 4, x("Comments");
892
+ u + 4
893
+ ), u += 8), u += 4, x("Comments");
891
894
  const P = [
892
895
  "Is the reaction of crew members satisfactory?",
893
896
  "Is the equipment functioning properly?",
@@ -907,8 +910,8 @@ const tt = {
907
910
  P.forEach((C, S) => {
908
911
  h(9);
909
912
  const L = m[S] !== !1;
910
- l.setFontSize(8.5), l.setFont("helvetica", "normal"), l.setTextColor(30, 30, 30), l.text(`${S + 1}. ${C}`, o + 3, c + 5), L ? (l.setFillColor(212, 237, 218), l.roundedRect(n - o - 18, c + 1, 18, 6, 2, 2, "F"), l.setTextColor(21, 87, 36), l.setFont("helvetica", "bold"), l.setFontSize(7.5), l.text("YES", n - o - 9, c + 5.5, { align: "center" })) : (l.setFillColor(248, 215, 218), l.roundedRect(n - o - 18, c + 1, 18, 6, 2, 2, "F"), l.setTextColor(114, 28, 36), l.setFont("helvetica", "bold"), l.setFontSize(7.5), l.text("NO", n - o - 9, c + 5.5, { align: "center" })), c += 9;
911
- }), c += 3;
913
+ l.setFontSize(8.5), l.setFont("helvetica", "normal"), l.setTextColor(30, 30, 30), l.text(`${S + 1}. ${C}`, o + 3, u + 5), L ? (l.setFillColor(212, 237, 218), l.roundedRect(n - o - 18, u + 1, 18, 6, 2, 2, "F"), l.setTextColor(21, 87, 36), l.setFont("helvetica", "bold"), l.setFontSize(7.5), l.text("YES", n - o - 9, u + 5.5, { align: "center" })) : (l.setFillColor(248, 215, 218), l.roundedRect(n - o - 18, u + 1, 18, 6, 2, 2, "F"), l.setTextColor(114, 28, 36), l.setFont("helvetica", "bold"), l.setFontSize(7.5), l.text("NO", n - o - 9, u + 5.5, { align: "center" })), u += 9;
914
+ }), u += 3;
912
915
  const g = (() => {
913
916
  const C = (s.findings || "").trim();
914
917
  return /^CREW:/i.test(C) ? C.split(/\n\n+/).slice(1).join(`
@@ -916,10 +919,10 @@ const tt = {
916
919
  `).trim() : C;
917
920
  })();
918
921
  g && (x("Drill Scenario & Findings"), h(10), l.setFontSize(9), l.setFont("helvetica", "normal"), l.setTextColor(30, 30, 30), l.splitTextToSize(g, i - 6).forEach((S) => {
919
- h(6), l.text(S, o + 3, c), c += 5.5;
920
- }), c += 4), s.correctiveActions && (x("Suggestions for Improvement & Corrective Actions"), h(10), l.setFontSize(9), l.setFont("helvetica", "normal"), l.setTextColor(30, 30, 30), l.splitTextToSize(s.correctiveActions, i - 6).forEach((S) => {
921
- h(6), l.text(S, o + 3, c), c += 5.5;
922
- }), c += 4), h(22), x("Remarks"), l.setDrawColor(180, 190, 210), l.setLineWidth(0.3), l.rect(o, c, i, 16, "S"), l.setFontSize(8.5), l.setFont("helvetica", "italic"), l.setTextColor(140, 140, 140), l.text("Drill carried out satisfactorily.", o + 3, c + 8), c += 20;
922
+ h(6), l.text(S, o + 3, u), u += 5.5;
923
+ }), u += 4), s.correctiveActions && (x("Suggestions for Improvement & Corrective Actions"), h(10), l.setFontSize(9), l.setFont("helvetica", "normal"), l.setTextColor(30, 30, 30), l.splitTextToSize(s.correctiveActions, i - 6).forEach((S) => {
924
+ h(6), l.text(S, o + 3, u), u += 5.5;
925
+ }), u += 4), h(22), x("Remarks"), l.setDrawColor(180, 190, 210), l.setLineWidth(0.3), l.rect(o, u, i, 16, "S"), l.setFontSize(8.5), l.setFont("helvetica", "italic"), l.setTextColor(140, 140, 140), l.text("Drill carried out satisfactorily.", o + 3, u + 8), u += 20;
923
926
  for (const C of e)
924
927
  try {
925
928
  let S;
@@ -927,7 +930,7 @@ const tt = {
927
930
  continue;
928
931
  h(30), x("Attachment: " + C.name);
929
932
  const L = l.getImageProperties(S), j = Math.min(i / L.width, 80 / L.height), Z = L.width * j, z = L.height * j;
930
- h(z + 5), l.addImage(S, ((U = (G = C.type) == null ? void 0 : G.split("/")[1]) == null ? void 0 : U.toUpperCase()) || "JPEG", o, c, Z, z), c += z + 8;
933
+ h(z + 5), l.addImage(S, ((U = (G = C.type) == null ? void 0 : G.split("/")[1]) == null ? void 0 : U.toUpperCase()) || "JPEG", o, u, Z, z), u += z + 8;
931
934
  } catch (S) {
932
935
  console.warn("Could not embed image", C.name, S);
933
936
  }
@@ -939,34 +942,34 @@ const tt = {
939
942
  // ─── INCIDENT PDF ────────────────────────────────────────────────────────
940
943
  async _buildIncidentPdf(s, e = []) {
941
944
  var M, q;
942
- const { jsPDF: u } = window.jspdf, l = new u({ orientation: "portrait", unit: "mm", format: "a4" }), n = 210, o = 15, i = n - o * 2;
943
- let c = 0;
945
+ const { jsPDF: c } = window.jspdf, l = new c({ orientation: "portrait", unit: "mm", format: "a4" }), n = 210, o = 15, i = n - o * 2;
946
+ let u = 0;
944
947
  const h = (k = 10) => {
945
- c + k > 275 && (l.addPage(), c = 20);
948
+ u + k > 275 && (l.addPage(), u = 20);
946
949
  }, x = (k, F, A = 18) => {
947
950
  const P = F ? l.splitTextToSize(String(F), i - 6) : [], m = P.length * 5.5, g = Math.max(A, m + 14);
948
- h(g + 4), l.setDrawColor(140, 150, 165), l.setLineWidth(0.35), l.rect(o, c, i, g, "S"), l.setFontSize(7.5), l.setFont("helvetica", "bold"), l.setTextColor(70, 80, 100);
951
+ h(g + 4), l.setDrawColor(140, 150, 165), l.setLineWidth(0.35), l.rect(o, u, i, g, "S"), l.setFontSize(7.5), l.setFont("helvetica", "bold"), l.setTextColor(70, 80, 100);
949
952
  const D = l.splitTextToSize(k.toUpperCase(), i - 6);
950
- D.forEach((U, C) => l.text(U, o + 3, c + 5 + C * 4));
953
+ D.forEach((U, C) => l.text(U, o + 3, u + 5 + C * 4));
951
954
  const G = D.length * 4 + 2;
952
- if (l.setDrawColor(200, 208, 220), l.setLineWidth(0.2), l.line(o + 1, c + G + 2, o + i - 1, c + G + 2), P.length > 0) {
955
+ if (l.setDrawColor(200, 208, 220), l.setLineWidth(0.2), l.line(o + 1, u + G + 2, o + i - 1, u + G + 2), P.length > 0) {
953
956
  l.setFontSize(9.5), l.setFont("helvetica", "normal"), l.setTextColor(20, 20, 20);
954
- let U = c + G + 7;
957
+ let U = u + G + 7;
955
958
  P.forEach((C) => {
956
959
  l.text(C, o + 3, U), U += 5.5;
957
960
  });
958
961
  }
959
- c += g + 3;
962
+ u += g + 3;
960
963
  };
961
964
  l.setFillColor(26, 54, 107), l.rect(0, 0, n, 16, "F"), l.setTextColor(255, 255, 255), l.setFontSize(12), l.setFont("helvetica", "bold");
962
965
  const E = (s.entity_subtype || s.entityType || "INCIDENT").toUpperCase() + " REPORT";
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;
966
+ 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" }), u = 20, l.setFontSize(8), l.setFont("helvetica", "bold"), l.setTextColor(80, 90, 110), l.text("FORM NUMBER:", o, u + 4), l.setFont("helvetica", "normal"), l.setTextColor(20, 20, 20), l.text(s.entityRef || "—", o + 30, u + 4), l.setFont("helvetica", "bold"), l.setTextColor(80, 90, 110), l.text("SUBMITTED BY:", n / 2, u + 4), l.setFont("helvetica", "normal"), l.setTextColor(20, 20, 20), l.text(s.submittedBy || "—", n / 2 + 28, u + 4), u += 10;
964
967
  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(
968
+ l.setDrawColor(140, 150, 165), l.setLineWidth(0.35), l.rect(o, u, T, 14, "S"), l.rect(o + T + 2, u, T, 14, "S"), l.setFontSize(7.5), l.setFont("helvetica", "bold"), l.setTextColor(80, 90, 110), l.text("VESSEL NAME", o + 3, u + 5), l.text("SEVERITY / TYPE", o + T + 5, u + 5), l.setFontSize(10), l.setFont("helvetica", "bold"), l.setTextColor(20, 20, 20), l.text(String(s.vessel || "—"), o + 3, u + 12), l.text(
966
969
  `${s.entity_subtype || "—"} · ${s.severity || s.entity_subtype || "—"}`,
967
970
  o + T + 5,
968
- c + 12
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(
971
+ u + 12
972
+ ), u += 18, l.setDrawColor(140, 150, 165), l.setLineWidth(0.35), l.rect(o, u, T, 10, "S"), l.rect(o + T + 2, u, T, 10, "S"), l.setFontSize(7.5), l.setFont("helvetica", "bold"), l.setTextColor(80, 90, 110), l.text("MANAGEMENT OFFICE", o + 3, u + 4), l.text("DATE", o + T + 5, u + 4), l.setFontSize(9), l.setFont("helvetica", "normal"), l.setTextColor(20, 20, 20), l.text("—", o + 3, u + 9), l.text(s.date || "—", o + T + 5, u + 9), u += 14, x("Description of Event", s.findings, 24), x(
970
973
  `Possible Consequences
971
974
  (e.g. Personal injury, damage, collision, grounding, fire, pollution etc.)`,
972
975
  s.inc_consequences || null,
@@ -992,13 +995,13 @@ const tt = {
992
995
  let F;
993
996
  if (k.file instanceof File ? F = await this._fileToDataUrl(k.file) : k.publicUrl && (F = await this._fetchImageAsDataUrl(k.publicUrl)), !F)
994
997
  continue;
995
- h(30), l.setFillColor(235, 240, 250), l.rect(o, c, i, 7, "F"), l.setFontSize(8), l.setFont("helvetica", "bold"), l.setTextColor(26, 54, 107), l.text("ATTACHMENT: " + k.name, o + 3, c + 5), c += 10;
998
+ h(30), l.setFillColor(235, 240, 250), l.rect(o, u, i, 7, "F"), l.setFontSize(8), l.setFont("helvetica", "bold"), l.setTextColor(26, 54, 107), l.text("ATTACHMENT: " + k.name, o + 3, u + 5), u += 10;
996
999
  const A = l.getImageProperties(F), P = Math.min(i / A.width, 80 / A.height), m = A.width * P, g = A.height * P;
997
- h(g + 5), l.addImage(F, ((q = (M = k.type) == null ? void 0 : M.split("/")[1]) == null ? void 0 : q.toUpperCase()) || "JPEG", o, c, m, g), c += g + 8;
1000
+ h(g + 5), l.addImage(F, ((q = (M = k.type) == null ? void 0 : M.split("/")[1]) == null ? void 0 : q.toUpperCase()) || "JPEG", o, u, m, g), u += g + 8;
998
1001
  } catch (F) {
999
1002
  console.warn("Could not embed image", k.name, F);
1000
1003
  }
1001
- h(14), c += 4, l.setFontSize(8.5), l.setFont("helvetica", "italic"), l.setTextColor(100, 110, 130), l.text("Closed out on board / Office support required (delete as applicable)", o, c), c += 8;
1004
+ h(14), u += 4, l.setFontSize(8.5), l.setFont("helvetica", "italic"), l.setTextColor(100, 110, 130), l.text("Closed out on board / Office support required (delete as applicable)", o, u), u += 8;
1002
1005
  const N = l.getNumberOfPages();
1003
1006
  for (let k = 1; k <= N; k++)
1004
1007
  l.setPage(k), l.setFillColor(26, 54, 107), l.rect(0, 287, n, 10, "F"), l.setTextColor(180, 200, 240), l.setFontSize(7.5), l.setFont("helvetica", "normal"), l.text(`Incident Report · Generated ${(/* @__PURE__ */ new Date()).toLocaleDateString("en-GB")} · Page ${k} of ${N}`, o, 293), s.entityRef && l.text(s.entityRef, n - o, 293, { align: "right" });
@@ -1007,11 +1010,11 @@ const tt = {
1007
1010
  // ─── MANUAL PDF ──────────────────────────────────────────────────────────
1008
1011
  async _buildManualPdf(s, e = []) {
1009
1012
  var M, q;
1010
- const { jsPDF: u } = window.jspdf, l = new u({ orientation: "portrait", unit: "mm", format: "a4" }), n = 18, o = 210, i = o - n * 2;
1011
- let c = 0;
1012
- l.setFillColor(30, 60, 114), l.rect(0, 0, o, 28, "F"), l.setTextColor(255, 255, 255), l.setFontSize(16), l.setFont("helvetica", "bold"), l.text("QHSE REPORT", n, 11), l.setFontSize(9), l.setFont("helvetica", "normal"), l.text(this.reportTypeLabel(s), n, 18), s.entityRef && (l.setFontSize(10), l.setFont("helvetica", "bold"), l.text(s.entityRef, o - n, 18, { align: "right" })), c = 36, l.setTextColor(30, 60, 114), l.setFontSize(13), l.setFont("helvetica", "bold");
1013
+ const { jsPDF: c } = window.jspdf, l = new c({ orientation: "portrait", unit: "mm", format: "a4" }), n = 18, o = 210, i = o - n * 2;
1014
+ let u = 0;
1015
+ l.setFillColor(30, 60, 114), l.rect(0, 0, o, 28, "F"), l.setTextColor(255, 255, 255), l.setFontSize(16), l.setFont("helvetica", "bold"), l.text("QHSE REPORT", n, 11), l.setFontSize(9), l.setFont("helvetica", "normal"), l.text(this.reportTypeLabel(s), n, 18), s.entityRef && (l.setFontSize(10), l.setFont("helvetica", "bold"), l.text(s.entityRef, o - n, 18, { align: "right" })), u = 36, l.setTextColor(30, 60, 114), l.setFontSize(13), l.setFont("helvetica", "bold");
1013
1016
  const h = l.splitTextToSize(s.title, i);
1014
- l.text(h, n, c), c += h.length * 6 + 4, l.setDrawColor(200, 210, 230), l.line(n, c, o - n, c), c += 6;
1017
+ l.text(h, n, u), u += h.length * 6 + 4, l.setDrawColor(200, 210, 230), l.line(n, u, o - n, u), u += 6;
1015
1018
  const x = [
1016
1019
  ["Submitted By", s.submittedBy || "—"],
1017
1020
  ["Date", s.date || "—"],
@@ -1021,13 +1024,13 @@ const tt = {
1021
1024
  s.manualCategory && x.splice(2, 0, ["Category", s.manualCategory]);
1022
1025
  const E = i / 2;
1023
1026
  x.forEach((k, F) => {
1024
- const A = F % 2, P = Math.floor(F / 2), m = n + A * E, g = c + P * 10;
1027
+ const A = F % 2, P = Math.floor(F / 2), m = n + A * E, g = u + P * 10;
1025
1028
  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);
1026
- }), c += Math.ceil(x.length / 2) * 10 + 6;
1029
+ }), u += Math.ceil(x.length / 2) * 10 + 6;
1027
1030
  const T = (k, F) => {
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) => {
1029
- c > 272 && (l.addPage(), c = 20), l.text(A, n, c), c += 5.5;
1030
- }), c += 4);
1031
+ F && (u > 250 && (l.addPage(), u = 20), l.setFillColor(240, 245, 255), l.roundedRect(n, u, i, 7, 1, 1, "F"), l.setFont("helvetica", "bold"), l.setFontSize(9), l.setTextColor(30, 60, 114), l.text(k.toUpperCase(), n + 3, u + 5), u += 10, l.setFont("helvetica", "normal"), l.setFontSize(10), l.setTextColor(40, 40, 40), l.splitTextToSize(F, i).forEach((A) => {
1032
+ u > 272 && (l.addPage(), u = 20), l.text(A, n, u), u += 5.5;
1033
+ }), u += 4);
1031
1034
  };
1032
1035
  T("Findings / Summary", s.findings), T("Corrective Actions", s.correctiveActions);
1033
1036
  for (const k of e)
@@ -1035,9 +1038,9 @@ const tt = {
1035
1038
  let F;
1036
1039
  if (k.file instanceof File ? F = await this._fileToDataUrl(k.file) : k.publicUrl && (F = await this._fetchImageAsDataUrl(k.publicUrl)), !F)
1037
1040
  continue;
1038
- c > 220 && (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("ATTACHMENT: " + k.name, n + 3, c + 5), c += 10;
1041
+ u > 220 && (l.addPage(), u = 20), l.setFillColor(240, 245, 255), l.roundedRect(n, u, i, 7, 1, 1, "F"), l.setFont("helvetica", "bold"), l.setFontSize(9), l.setTextColor(30, 60, 114), l.text("ATTACHMENT: " + k.name, n + 3, u + 5), u += 10;
1039
1042
  const A = l.getImageProperties(F), P = Math.min(i / A.width, 80 / A.height), m = A.width * P, g = A.height * P;
1040
- c + g > 272 && (l.addPage(), c = 20), l.addImage(F, ((q = (M = k.type) == null ? void 0 : M.split("/")[1]) == null ? void 0 : q.toUpperCase()) || "JPEG", n, c, m, g), c += g + 8;
1043
+ u + g > 272 && (l.addPage(), u = 20), l.addImage(F, ((q = (M = k.type) == null ? void 0 : M.split("/")[1]) == null ? void 0 : q.toUpperCase()) || "JPEG", n, u, m, g), u += g + 8;
1041
1044
  } catch (F) {
1042
1045
  console.warn("Could not embed image", k.name, F);
1043
1046
  }
@@ -1047,23 +1050,23 @@ const tt = {
1047
1050
  return l.output("arraybuffer");
1048
1051
  },
1049
1052
  // ─── ZIP builder ─────────────────────────────────────────────────────────
1050
- async _buildAndDownloadZip(s, e, u) {
1053
+ async _buildAndDownloadZip(s, e, c) {
1051
1054
  const l = new window.JSZip(), n = this.safeRef(s), o = l.folder(n);
1052
1055
  o.file(`${n}_report.pdf`, e);
1053
- for (const c of u)
1056
+ for (const u of c)
1054
1057
  try {
1055
1058
  let h;
1056
- if (c.file instanceof File)
1057
- h = await c.file.arrayBuffer();
1058
- else if (c.publicUrl) {
1059
- const x = await fetch(c.publicUrl);
1059
+ if (u.file instanceof File)
1060
+ h = await u.file.arrayBuffer();
1061
+ else if (u.publicUrl) {
1062
+ const x = await fetch(u.publicUrl);
1060
1063
  if (!x.ok)
1061
1064
  throw new Error(`HTTP ${x.status}`);
1062
1065
  h = await x.arrayBuffer();
1063
1066
  }
1064
- h && o.file(c.name, h);
1067
+ h && o.file(u.name, h);
1065
1068
  } catch (h) {
1066
- console.warn(`Could not add ${c.name} to ZIP:`, h);
1069
+ console.warn(`Could not add ${u.name} to ZIP:`, h);
1067
1070
  }
1068
1071
  const i = await l.generateAsync({
1069
1072
  type: "blob",
@@ -1073,13 +1076,13 @@ const tt = {
1073
1076
  this._triggerDownload(i, `${n}.zip`);
1074
1077
  },
1075
1078
  _triggerDownload(s, e) {
1076
- const u = URL.createObjectURL(s), l = document.createElement("a");
1077
- l.href = u, l.download = e, document.body.appendChild(l), l.click(), document.body.removeChild(l), setTimeout(() => URL.revokeObjectURL(u), 5e3);
1079
+ const c = URL.createObjectURL(s), l = document.createElement("a");
1080
+ l.href = c, l.download = e, document.body.appendChild(l), l.click(), document.body.removeChild(l), setTimeout(() => URL.revokeObjectURL(c), 5e3);
1078
1081
  },
1079
1082
  _fileToDataUrl(s) {
1080
- return new Promise((e, u) => {
1083
+ return new Promise((e, c) => {
1081
1084
  const l = new FileReader();
1082
- l.onload = () => e(l.result), l.onerror = u, l.readAsDataURL(s);
1085
+ l.onload = () => e(l.result), l.onerror = c, l.readAsDataURL(s);
1083
1086
  });
1084
1087
  },
1085
1088
  async _fetchImageAsDataUrl(s) {
@@ -1104,6 +1107,7 @@ const tt = {
1104
1107
  requestCreateFolder() {
1105
1108
  this.newFolderName.trim() && (this.$emit("folder-create-requested", this.newFolderName.trim()), this.newFolderName = "", this.showNewFolderModal = !1, this.activeTab = "folders");
1106
1109
  },
1110
+ // Legacy raw file picker — kept in case parent still uses files-add-requested directly
1107
1111
  selectFolder(s) {
1108
1112
  this.selectedFolder = s, this.$refs.fileInput.click();
1109
1113
  },
@@ -1111,12 +1115,12 @@ const tt = {
1111
1115
  const e = Array.from(s.target.files);
1112
1116
  !this.selectedFolder || e.length === 0 || (this.$emit("files-add-requested", {
1113
1117
  folderId: this.selectedFolder.id,
1114
- files: e.map((u) => ({
1118
+ files: e.map((c) => ({
1115
1119
  id: Date.now() + Math.random(),
1116
- name: u.name,
1117
- size: u.size,
1118
- type: u.type,
1119
- file: u,
1120
+ name: c.name,
1121
+ size: c.size,
1122
+ type: c.type,
1123
+ file: c,
1120
1124
  addedAt: /* @__PURE__ */ new Date()
1121
1125
  }))
1122
1126
  }), s.target.value = "", this.selectedFolder = null);
@@ -1129,8 +1133,8 @@ const tt = {
1129
1133
  formatFileSize(s) {
1130
1134
  if (!s)
1131
1135
  return "0 B";
1132
- const e = 1024, u = ["B", "KB", "MB", "GB"], l = Math.floor(Math.log(s) / Math.log(e));
1133
- return Math.round(s / Math.pow(e, l) * 100) / 100 + " " + u[l];
1136
+ const e = 1024, c = ["B", "KB", "MB", "GB"], l = Math.floor(Math.log(s) / Math.log(e));
1137
+ return Math.round(s / Math.pow(e, l) * 100) / 100 + " " + c[l];
1134
1138
  },
1135
1139
  formatDate(s) {
1136
1140
  return s ? new Date(s).toLocaleDateString("en-GB", { day: "2-digit", month: "short", year: "numeric" }) : "—";
@@ -1139,7 +1143,7 @@ const tt = {
1139
1143
  }, st = { class: "reports-container" }, it = {
1140
1144
  key: 0,
1141
1145
  class: "missing-banner"
1142
- }, nt = { class: "missing-banner-inner" }, ot = { class: "missing-content" }, lt = { key: 0 }, rt = { class: "ref-chip" }, at = { key: 1 }, dt = { key: 2 }, ut = { class: "page-header d-flex justify-content-between align-items-center" }, ct = { class: "header-actions" }, mt = { class: "btn-group-split" }, pt = { class: "tab-nav" }, ft = { class: "tab-count" }, ht = { class: "tab-count drill" }, vt = { class: "tab-count incident" }, gt = { class: "tab-count manual" }, bt = { class: "tab-count" }, yt = {
1146
+ }, nt = { class: "missing-banner-inner" }, ot = { class: "missing-content" }, lt = { key: 0 }, rt = { class: "ref-chip" }, at = { key: 1 }, dt = { key: 2 }, ct = { class: "page-header d-flex justify-content-between align-items-center" }, ut = { class: "header-actions" }, mt = { class: "btn-group-split" }, pt = { class: "tab-nav" }, ft = { class: "tab-count" }, ht = { class: "tab-count drill" }, vt = { class: "tab-count incident" }, gt = { class: "tab-count manual" }, bt = { class: "tab-count" }, yt = {
1143
1147
  key: 0,
1144
1148
  class: "loading-container"
1145
1149
  }, wt = { key: 1 }, _t = {
@@ -1169,7 +1173,7 @@ const tt = {
1169
1173
  }, ns = {
1170
1174
  key: 0,
1171
1175
  class: "af-contents"
1172
- }, os = ["onClick"], ls = { class: "ffi-meta" }, rs = { class: "ffi-name" }, as = { class: "ffi-acts" }, ds = ["onClick"], us = ["onClick", "disabled"], cs = {
1176
+ }, os = ["onClick"], ls = { class: "ffi-meta" }, rs = { class: "ffi-name" }, as = { class: "ffi-acts" }, ds = ["onClick"], cs = ["onClick", "disabled"], us = {
1173
1177
  key: 0,
1174
1178
  class: "spinner-xs"
1175
1179
  }, ms = {
@@ -1191,93 +1195,96 @@ const tt = {
1191
1195
  key: 2,
1192
1196
  class: "empty-state text-center"
1193
1197
  }, Ws = { class: "modal-dialog modal-dialog-centered" }, Qs = { class: "modal-content" }, Js = { class: "modal-header" }, Ys = { class: "modal-body" }, Zs = { class: "modal-footer" }, Ks = ["disabled"], $s = { class: "modal-dialog modal-dialog-centered modal-lg" }, Xs = { class: "modal-content" }, ei = { class: "modal-header rpt-modal-header" }, ti = { class: "modal-title" }, si = {
1198
+ key: 0,
1199
+ class: "folder-context-badge"
1200
+ }, ii = {
1194
1201
  key: 0,
1195
1202
  class: "modal-type-toggle"
1196
- }, ii = { class: "modal-body" }, ni = {
1203
+ }, ni = { class: "modal-body" }, oi = {
1197
1204
  key: 0,
1198
1205
  class: "rpt-entity-box"
1199
- }, oi = {
1206
+ }, li = {
1200
1207
  key: 0,
1201
1208
  class: "prefilled-entity"
1202
- }, li = { class: "text-muted ms-2" }, ri = { key: 1 }, ai = { label: "Missing Drill Reports" }, di = ["value"], ui = { label: "Missing Incident Reports" }, ci = ["value"], mi = {
1209
+ }, ri = { class: "text-muted ms-2" }, ai = { key: 1 }, di = { label: "Missing Drill Reports" }, ci = ["value"], ui = { label: "Missing Incident Reports" }, mi = ["value"], pi = {
1203
1210
  key: 1,
1204
1211
  class: "input-row"
1205
- }, pi = { class: "form-group" }, fi = { class: "form-group" }, hi = {
1212
+ }, fi = { class: "form-group" }, hi = { class: "form-group" }, vi = {
1206
1213
  key: 2,
1207
1214
  class: "crew-hint"
1208
- }, vi = {
1215
+ }, gi = {
1209
1216
  key: 3,
1210
1217
  class: "drill-checklist-box"
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 = {
1218
+ }, bi = { class: "checklist-grid" }, yi = { class: "checklist-checkbox" }, wi = ["checked", "onChange"], _i = { class: "custom-check" }, ki = { class: "checklist-q" }, Ci = { class: "input-row mt-3" }, Fi = { class: "form-group" }, Di = ["placeholder"], xi = { class: "form-group" }, Si = { class: "input-row" }, Ri = { class: "form-group" }, Ti = { class: "form-group" }, Ai = { class: "form-label fw-semibold" }, Pi = {
1212
1219
  key: 0,
1213
1220
  class: "form-hint"
1214
- }, Pi = ["placeholder"], Ii = {
1221
+ }, Ii = ["placeholder"], Ei = {
1215
1222
  key: 4,
1216
1223
  class: "incident-fields-box"
1217
- }, Ei = { class: "form-group" }, qi = { class: "form-group" }, Ni = { class: "form-group" }, Mi = {
1224
+ }, qi = { class: "form-group" }, Ni = { class: "form-group" }, Mi = { class: "form-group" }, Li = {
1218
1225
  class: "input-row",
1219
1226
  style: { "margin-bottom": "0" }
1220
- }, Li = { class: "form-group" }, Vi = { class: "form-group" }, Oi = { class: "form-group" }, Ui = {
1227
+ }, Vi = { class: "form-group" }, Oi = { class: "form-group" }, Ui = { class: "form-group" }, ji = {
1221
1228
  class: "form-group",
1222
1229
  style: { "margin-bottom": "0" }
1223
- }, ji = {
1230
+ }, Bi = {
1224
1231
  key: 5,
1225
1232
  class: "form-group"
1226
- }, Bi = { class: "form-group" }, Gi = {
1233
+ }, Gi = { class: "form-group" }, zi = {
1227
1234
  key: 0,
1228
1235
  class: "attached-files"
1229
- }, zi = ["onClick"], Hi = {
1236
+ }, Hi = ["onClick"], Wi = {
1230
1237
  key: 6,
1231
1238
  class: "zip-hint"
1232
- }, Wi = { key: 0 }, Qi = { class: "modal-footer" }, Ji = ["disabled"], Yi = { key: 0 }, Zi = { key: 1 }, Ki = { class: "modal-dialog modal-dialog-centered modal-lg" }, $i = {
1239
+ }, Qi = { key: 0 }, Ji = { class: "modal-footer" }, Yi = ["disabled"], Zi = { key: 0 }, Ki = { key: 1 }, $i = { class: "modal-dialog modal-dialog-centered modal-lg" }, Xi = {
1233
1240
  key: 0,
1234
1241
  class: "modal-content"
1235
- }, Xi = { class: "modal-header rpt-modal-header" }, en = { class: "d-flex align-items-center gap-2" }, tn = { style: { color: "#fff" } }, sn = { class: "modal-body" }, nn = { class: "view-grid" }, on = { class: "view-item" }, ln = { class: "ref-mono" }, rn = { class: "view-item" }, an = {
1242
+ }, en = { class: "modal-header rpt-modal-header" }, tn = { class: "d-flex align-items-center gap-2" }, sn = { style: { color: "#fff" } }, nn = { class: "modal-body" }, on = { class: "view-grid" }, ln = { class: "view-item" }, rn = { class: "ref-mono" }, an = { class: "view-item" }, dn = {
1236
1243
  key: 0,
1237
1244
  class: "view-item"
1238
- }, dn = { class: "view-item" }, un = { class: "view-item" }, cn = {
1245
+ }, cn = { class: "view-item" }, un = { class: "view-item" }, mn = {
1239
1246
  key: 1,
1240
1247
  class: "view-item"
1241
- }, mn = { class: "view-item" }, pn = {
1248
+ }, pn = { class: "view-item" }, fn = {
1242
1249
  key: 2,
1243
1250
  class: "view-item"
1244
- }, fn = {
1251
+ }, hn = {
1245
1252
  key: 3,
1246
1253
  class: "view-item"
1247
- }, hn = {
1254
+ }, vn = {
1248
1255
  key: 4,
1249
1256
  class: "view-item"
1250
- }, vn = {
1257
+ }, gn = {
1251
1258
  key: 5,
1252
1259
  class: "view-item"
1253
- }, gn = { class: "view-section" }, bn = { class: "view-text" }, yn = {
1260
+ }, bn = { class: "view-section" }, yn = { class: "view-text" }, wn = {
1254
1261
  key: 0,
1255
1262
  class: "view-section"
1256
- }, wn = { class: "view-text" }, _n = {
1263
+ }, _n = { class: "view-text" }, kn = {
1257
1264
  key: 1,
1258
1265
  class: "view-section"
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) {
1266
+ }, Cn = { class: "attached-files mt-1" }, Fn = ["href"], Dn = { class: "text-muted ms-1" }, xn = { class: "modal-footer" }, Sn = ["disabled"], Rn = { key: 0 }, Tn = { key: 1 };
1267
+ function An(s, e, c, l, n, o) {
1261
1268
  return r(), a("div", st, [
1262
1269
  H(W, { name: "slide-down" }, {
1263
1270
  default: Q(() => [
1264
- !n.bannerDismissed && (u.pendingContext || u.missingReports.length > 0) ? (r(), a("div", it, [
1271
+ !n.bannerDismissed && (c.pendingContext || c.missingReports.length > 0) ? (r(), a("div", it, [
1265
1272
  t("div", nt, [
1266
- e[54] || (e[54] = t("div", { class: "missing-icon" }, [
1273
+ e[53] || (e[53] = t("div", { class: "missing-icon" }, [
1267
1274
  t("i", { class: "bi bi-exclamation-triangle-fill" })
1268
1275
  ], -1)),
1269
1276
  t("div", ot, [
1270
- u.pendingContext ? (r(), a("strong", lt, [
1271
- e[50] || (e[50] = f(" Action Required — Report for ", -1)),
1272
- t("span", rt, d(u.pendingContext.entity_ref), 1),
1273
- e[51] || (e[51] = f(" must be submitted ", -1))
1274
- ])) : (r(), a("strong", at, d(u.missingReports.length) + " report" + d(u.missingReports.length > 1 ? "s" : "") + " awaiting submission ", 1)),
1275
- u.pendingContext ? (r(), a("p", dt, d(u.pendingContext.title), 1)) : p("", !0)
1277
+ c.pendingContext ? (r(), a("strong", lt, [
1278
+ e[49] || (e[49] = f(" Action Required — Report for ", -1)),
1279
+ t("span", rt, d(c.pendingContext.entity_ref), 1),
1280
+ e[50] || (e[50] = f(" must be submitted ", -1))
1281
+ ])) : (r(), a("strong", at, d(c.missingReports.length) + " report" + d(c.missingReports.length > 1 ? "s" : "") + " awaiting submission ", 1)),
1282
+ c.pendingContext ? (r(), a("p", dt, d(c.pendingContext.title), 1)) : p("", !0)
1276
1283
  ]),
1277
1284
  t("button", {
1278
1285
  class: "btn btn-warning btn-sm fw-bold",
1279
1286
  onClick: e[0] || (e[0] = (i) => o.openReportForm("qhse"))
1280
- }, e[52] || (e[52] = [
1287
+ }, e[51] || (e[51] = [
1281
1288
  t("i", { class: "bi bi-pencil-square me-1" }, null, -1),
1282
1289
  f(" Submit Report ", -1)
1283
1290
  ])),
@@ -1285,7 +1292,7 @@ function Tn(s, e, u, l, n, o) {
1285
1292
  class: "btn-dismiss",
1286
1293
  onClick: e[1] || (e[1] = (...i) => o.dismissBanner && o.dismissBanner(...i)),
1287
1294
  title: "Dismiss"
1288
- }, e[53] || (e[53] = [
1295
+ }, e[52] || (e[52] = [
1289
1296
  t("i", { class: "bi bi-x-lg" }, null, -1)
1290
1297
  ]))
1291
1298
  ])
@@ -1293,33 +1300,26 @@ function Tn(s, e, u, l, n, o) {
1293
1300
  ]),
1294
1301
  _: 1
1295
1302
  }),
1296
- t("div", ut, [
1297
- e[58] || (e[58] = t("div", null, [
1303
+ t("div", ct, [
1304
+ e[56] || (e[56] = t("div", null, [
1298
1305
  t("h4", { class: "page-title" }, "Reports"),
1299
1306
  t("p", { class: "page-subtitle" }, "Document Management & QHSE Reports")
1300
1307
  ], -1)),
1301
- t("div", ct, [
1308
+ t("div", ut, [
1302
1309
  t("div", mt, [
1303
1310
  t("button", {
1304
1311
  class: "btn btn-outline-primary",
1305
1312
  onClick: e[2] || (e[2] = (i) => o.openReportForm("qhse"))
1306
- }, e[55] || (e[55] = [
1313
+ }, e[54] || (e[54] = [
1307
1314
  t("i", { class: "bi bi-shield-check" }, null, -1),
1308
1315
  f(" QHSE Report ", -1)
1309
1316
  ])),
1310
1317
  t("button", {
1311
1318
  class: "btn btn-outline-secondary",
1312
1319
  onClick: e[3] || (e[3] = (i) => o.openReportForm("manual"))
1313
- }, e[56] || (e[56] = [
1320
+ }, e[55] || (e[55] = [
1314
1321
  t("i", { class: "bi bi-file-earmark-plus" }, null, -1),
1315
1322
  f(" Manual Report ", -1)
1316
- ])),
1317
- t("button", {
1318
- class: "btn btn-primary",
1319
- onClick: e[4] || (e[4] = (i) => n.showNewFolderModal = !0)
1320
- }, e[57] || (e[57] = [
1321
- t("i", { class: "bi bi-folder-plus" }, null, -1),
1322
- f(" New Folder ", -1)
1323
1323
  ]))
1324
1324
  ])
1325
1325
  ])
@@ -1327,52 +1327,52 @@ function Tn(s, e, u, l, n, o) {
1327
1327
  t("div", pt, [
1328
1328
  t("button", {
1329
1329
  class: v(["tab-btn", { active: n.activeTab === "all" }]),
1330
- onClick: e[5] || (e[5] = (i) => n.activeTab = "all")
1330
+ onClick: e[4] || (e[4] = (i) => n.activeTab = "all")
1331
1331
  }, [
1332
- e[59] || (e[59] = f(" All Reports ", -1)),
1333
- t("span", ft, d(u.reports.length), 1)
1332
+ e[57] || (e[57] = f(" All Reports ", -1)),
1333
+ t("span", ft, d(c.reports.length), 1)
1334
1334
  ], 2),
1335
1335
  t("button", {
1336
1336
  class: v(["tab-btn", { active: n.activeTab === "drill" }]),
1337
- onClick: e[6] || (e[6] = (i) => n.activeTab = "drill")
1337
+ onClick: e[5] || (e[5] = (i) => n.activeTab = "drill")
1338
1338
  }, [
1339
- e[60] || (e[60] = t("i", { class: "bi bi-people-fill me-1" }, null, -1)),
1340
- e[61] || (e[61] = f("Drills ", -1)),
1339
+ e[58] || (e[58] = t("i", { class: "bi bi-people-fill me-1" }, null, -1)),
1340
+ e[59] || (e[59] = f("Drills ", -1)),
1341
1341
  t("span", ht, d(o.drillReports.length), 1)
1342
1342
  ], 2),
1343
1343
  t("button", {
1344
1344
  class: v(["tab-btn", { active: n.activeTab === "incident" }]),
1345
- onClick: e[7] || (e[7] = (i) => n.activeTab = "incident")
1345
+ onClick: e[6] || (e[6] = (i) => n.activeTab = "incident")
1346
1346
  }, [
1347
- e[62] || (e[62] = t("i", { class: "bi bi-exclamation-octagon-fill me-1" }, null, -1)),
1348
- e[63] || (e[63] = f("Incidents ", -1)),
1347
+ e[60] || (e[60] = t("i", { class: "bi bi-exclamation-octagon-fill me-1" }, null, -1)),
1348
+ e[61] || (e[61] = f("Incidents ", -1)),
1349
1349
  t("span", vt, d(o.incidentReports.length), 1)
1350
1350
  ], 2),
1351
1351
  t("button", {
1352
1352
  class: v(["tab-btn", { active: n.activeTab === "manual" }]),
1353
- onClick: e[8] || (e[8] = (i) => n.activeTab = "manual")
1353
+ onClick: e[7] || (e[7] = (i) => n.activeTab = "manual")
1354
1354
  }, [
1355
- e[64] || (e[64] = t("i", { class: "bi bi-file-earmark-text me-1" }, null, -1)),
1356
- e[65] || (e[65] = f("Manual ", -1)),
1355
+ e[62] || (e[62] = t("i", { class: "bi bi-file-earmark-text me-1" }, null, -1)),
1356
+ e[63] || (e[63] = f("Manual ", -1)),
1357
1357
  t("span", gt, d(o.manualReports.length), 1)
1358
1358
  ], 2),
1359
1359
  t("button", {
1360
1360
  class: v(["tab-btn", { active: n.activeTab === "folders" }]),
1361
- onClick: e[9] || (e[9] = (i) => n.activeTab = "folders")
1361
+ onClick: e[8] || (e[8] = (i) => n.activeTab = "folders")
1362
1362
  }, [
1363
- e[66] || (e[66] = t("i", { class: "bi bi-folder-fill me-1" }, null, -1)),
1364
- e[67] || (e[67] = f("Folders ", -1)),
1365
- t("span", bt, d(u.reports.length + u.folders.length), 1)
1363
+ e[64] || (e[64] = t("i", { class: "bi bi-folder-fill me-1" }, null, -1)),
1364
+ e[65] || (e[65] = f("Folders ", -1)),
1365
+ t("span", bt, d(c.reports.length + c.folders.length), 1)
1366
1366
  ], 2)
1367
1367
  ]),
1368
- u.isLoading ? (r(), a("div", yt, e[68] || (e[68] = [
1368
+ c.isLoading ? (r(), a("div", yt, e[66] || (e[66] = [
1369
1369
  t("div", { class: "spinner" }, null, -1),
1370
1370
  t("p", null, "Loading reports…", -1)
1371
1371
  ]))) : p("", !0),
1372
- n.activeTab !== "folders" && !u.isLoading ? (r(), a("div", wt, [
1372
+ n.activeTab !== "folders" && !c.isLoading ? (r(), a("div", wt, [
1373
1373
  o.filteredReports.length > 0 ? (r(), a("div", _t, [
1374
1374
  (r(!0), a(y, null, w(o.filteredReports, (i) => {
1375
- var c;
1375
+ var u;
1376
1376
  return r(), a("div", {
1377
1377
  key: i.id,
1378
1378
  ref_for: !0,
@@ -1389,17 +1389,17 @@ function Tn(s, e, u, l, n, o) {
1389
1389
  class: "rc-body",
1390
1390
  onClick: (h) => o.viewReport(i)
1391
1391
  }, [
1392
- t("strong", Ct, d(i.entityRef || ((c = i.id) == null ? void 0 : c.slice(0, 8).toUpperCase())), 1),
1392
+ t("strong", Ct, d(i.entityRef || ((u = i.id) == null ? void 0 : u.slice(0, 8).toUpperCase())), 1),
1393
1393
  t("span", Ft, d(i.title), 1),
1394
1394
  t("span", Dt, [
1395
- e[69] || (e[69] = t("i", { class: "bi bi-person-fill me-1" }, null, -1)),
1395
+ e[67] || (e[67] = t("i", { class: "bi bi-person-fill me-1" }, null, -1)),
1396
1396
  f(d(i.submittedBy) + "  ·  ", 1),
1397
- e[70] || (e[70] = t("i", { class: "bi bi-calendar3 me-1" }, null, -1)),
1397
+ e[68] || (e[68] = t("i", { class: "bi bi-calendar3 me-1" }, null, -1)),
1398
1398
  f(d(o.formatDate(i.submittedAt)), 1)
1399
1399
  ])
1400
1400
  ], 8, kt),
1401
1401
  o.getFilesForReport(i.id).length > 0 ? (r(), a("div", xt, [
1402
- e[71] || (e[71] = t("i", { class: "bi bi-paperclip" }, null, -1)),
1402
+ e[69] || (e[69] = t("i", { class: "bi bi-paperclip" }, null, -1)),
1403
1403
  f(" " + d(o.getFilesForReport(i.id).length), 1)
1404
1404
  ])) : p("", !0),
1405
1405
  t("button", {
@@ -1407,7 +1407,7 @@ function Tn(s, e, u, l, n, o) {
1407
1407
  onClick: R((h) => o.jumpToFolder(i), ["stop"]),
1408
1408
  title: "View folder"
1409
1409
  }, [
1410
- e[72] || (e[72] = t("i", { class: "bi bi-folder-fill me-1" }, null, -1)),
1410
+ e[70] || (e[70] = t("i", { class: "bi bi-folder-fill me-1" }, null, -1)),
1411
1411
  f(" " + d(i.entityRef || i.title), 1)
1412
1412
  ], 10, St),
1413
1413
  t("div", Rt, [
@@ -1415,7 +1415,7 @@ function Tn(s, e, u, l, n, o) {
1415
1415
  class: "rc-btn rc-btn--view",
1416
1416
  onClick: (h) => o.viewReport(i),
1417
1417
  title: "View"
1418
- }, e[73] || (e[73] = [
1418
+ }, e[71] || (e[71] = [
1419
1419
  t("i", { class: "bi bi-eye" }, null, -1)
1420
1420
  ]), 8, Tt),
1421
1421
  t("button", {
@@ -1431,7 +1431,7 @@ function Tn(s, e, u, l, n, o) {
1431
1431
  }), 128))
1432
1432
  ])) : p("", !0),
1433
1433
  o.filteredReports.length === 0 ? (r(), a("div", Et, [
1434
- e[74] || (e[74] = t("i", {
1434
+ e[72] || (e[72] = t("i", {
1435
1435
  class: "bi bi-file-earmark-x",
1436
1436
  style: { "font-size": "3.5rem", color: "#ccc" }
1437
1437
  }, null, -1)),
@@ -1441,17 +1441,17 @@ function Tn(s, e, u, l, n, o) {
1441
1441
  ])
1442
1442
  ])) : p("", !0)
1443
1443
  ])) : p("", !0),
1444
- n.activeTab === "folders" && !u.isLoading ? (r(), a("div", Ut, [
1445
- u.reports.length > 0 ? (r(), a("div", jt, [
1444
+ n.activeTab === "folders" && !c.isLoading ? (r(), a("div", Ut, [
1445
+ c.reports.length > 0 ? (r(), a("div", jt, [
1446
1446
  t("div", Bt, [
1447
- e[75] || (e[75] = t("i", { class: "bi bi-folder-symlink-fill text-primary me-1" }, null, -1)),
1448
- e[76] || (e[76] = f(" Report Folders ", -1)),
1449
- t("span", Gt, d(u.reports.length), 1),
1450
- e[77] || (e[77] = t("span", { class: "section-hint" }, "Auto-generated · one per submitted report", -1))
1447
+ e[73] || (e[73] = t("i", { class: "bi bi-folder-symlink-fill text-primary me-1" }, null, -1)),
1448
+ e[74] || (e[74] = f(" Report Folders ", -1)),
1449
+ t("span", Gt, d(c.reports.length), 1),
1450
+ e[75] || (e[75] = t("span", { class: "section-hint" }, "Auto-generated · one per submitted report", -1))
1451
1451
  ]),
1452
1452
  t("div", zt, [
1453
- (r(!0), a(y, null, w(u.reports, (i) => {
1454
- var c;
1453
+ (r(!0), a(y, null, w(c.reports, (i) => {
1454
+ var u;
1455
1455
  return r(), a("div", {
1456
1456
  key: "af-" + i.id,
1457
1457
  ref_for: !0,
@@ -1469,7 +1469,7 @@ function Tn(s, e, u, l, n, o) {
1469
1469
  t("span", Qt, d(1 + o.getFilesForReport(i.id).length), 1)
1470
1470
  ]),
1471
1471
  t("div", Jt, [
1472
- t("span", Yt, d(i.entityRef || ((c = i.id) == null ? void 0 : c.slice(0, 8).toUpperCase())), 1),
1472
+ t("span", Yt, d(i.entityRef || ((u = i.id) == null ? void 0 : u.slice(0, 8).toUpperCase())), 1),
1473
1473
  t("span", Zt, d(i.title), 1),
1474
1474
  t("div", Kt, [
1475
1475
  t("span", {
@@ -1500,19 +1500,19 @@ function Tn(s, e, u, l, n, o) {
1500
1500
  class: "ffi ffi--report",
1501
1501
  onClick: (h) => o.viewReport(i)
1502
1502
  }, [
1503
- e[80] || (e[80] = t("div", { class: "ffi-icon ffi-icon--pdf" }, [
1503
+ e[78] || (e[78] = t("div", { class: "ffi-icon ffi-icon--pdf" }, [
1504
1504
  t("i", { class: "bi bi-file-earmark-pdf-fill" })
1505
1505
  ], -1)),
1506
1506
  t("div", ls, [
1507
1507
  t("span", rs, d(o.safeRef(i)) + "_report.pdf", 1),
1508
- e[78] || (e[78] = t("span", { class: "ffi-sub" }, "Generated report sheet · click to preview", -1))
1508
+ e[76] || (e[76] = t("span", { class: "ffi-sub" }, "Generated report sheet · click to preview", -1))
1509
1509
  ]),
1510
1510
  t("div", as, [
1511
1511
  t("button", {
1512
1512
  class: "rc-btn rc-btn--view",
1513
1513
  onClick: R((h) => o.viewReport(i), ["stop"]),
1514
1514
  title: "Preview"
1515
- }, e[79] || (e[79] = [
1515
+ }, e[77] || (e[77] = [
1516
1516
  t("i", { class: "bi bi-eye" }, null, -1)
1517
1517
  ]), 8, ds),
1518
1518
  t("button", {
@@ -1521,8 +1521,8 @@ function Tn(s, e, u, l, n, o) {
1521
1521
  disabled: n.generatingPdf === i.id + "-pdf",
1522
1522
  title: "Download PDF only"
1523
1523
  }, [
1524
- n.generatingPdf === i.id + "-pdf" ? (r(), a("span", cs)) : (r(), a("i", ms))
1525
- ], 8, us)
1524
+ n.generatingPdf === i.id + "-pdf" ? (r(), a("span", us)) : (r(), a("i", ms))
1525
+ ], 8, cs)
1526
1526
  ])
1527
1527
  ], 8, os),
1528
1528
  (r(!0), a(y, null, w(o.getFilesForReport(i.id), (h) => (r(), a("div", {
@@ -1548,12 +1548,12 @@ function Tn(s, e, u, l, n, o) {
1548
1548
  rel: "noopener",
1549
1549
  class: "rc-btn rc-btn--view",
1550
1550
  title: "Open"
1551
- }, e[81] || (e[81] = [
1551
+ }, e[79] || (e[79] = [
1552
1552
  t("i", { class: "bi bi-box-arrow-up-right" }, null, -1)
1553
1553
  ]), 8, gs)) : p("", !0)
1554
1554
  ])
1555
1555
  ]))), 128)),
1556
- o.getFilesForReport(i.id).length === 0 ? (r(), a("div", bs, e[82] || (e[82] = [
1556
+ o.getFilesForReport(i.id).length === 0 ? (r(), a("div", bs, e[80] || (e[80] = [
1557
1557
  t("i", { class: "bi bi-paperclip me-1" }, null, -1),
1558
1558
  f("No attachments — ZIP will contain the report PDF only ", -1)
1559
1559
  ]))) : p("", !0),
@@ -1563,10 +1563,10 @@ function Tn(s, e, u, l, n, o) {
1563
1563
  onClick: (h) => o.downloadReport(i),
1564
1564
  disabled: n.generatingPdf === i.id
1565
1565
  }, [
1566
- n.generatingPdf === i.id ? (r(), a("span", _s, e[83] || (e[83] = [
1566
+ n.generatingPdf === i.id ? (r(), a("span", _s, e[81] || (e[81] = [
1567
1567
  t("span", { class: "spinner-xs me-1" }, null, -1),
1568
1568
  f("Building ZIP… ", -1)
1569
- ]))) : (r(), a("span", ks, e[84] || (e[84] = [
1569
+ ]))) : (r(), a("span", ks, e[82] || (e[82] = [
1570
1570
  t("i", { class: "bi bi-file-zip me-1" }, null, -1),
1571
1571
  f("Download all as ZIP ", -1)
1572
1572
  ])))
@@ -1581,26 +1581,26 @@ function Tn(s, e, u, l, n, o) {
1581
1581
  }), 128))
1582
1582
  ])
1583
1583
  ])) : p("", !0),
1584
- u.folders.length > 0 ? (r(), a("div", {
1584
+ c.folders.length > 0 ? (r(), a("div", {
1585
1585
  key: 1,
1586
- class: v({ "mt-4": u.reports.length > 0 })
1586
+ class: v({ "mt-4": c.reports.length > 0 })
1587
1587
  }, [
1588
1588
  t("div", Fs, [
1589
- e[85] || (e[85] = t("i", { class: "bi bi-folder-plus text-warning me-1" }, null, -1)),
1590
- e[86] || (e[86] = f(" Custom Folders ", -1)),
1591
- t("span", Ds, d(u.folders.length), 1)
1589
+ e[83] || (e[83] = t("i", { class: "bi bi-folder-plus text-warning me-1" }, null, -1)),
1590
+ e[84] || (e[84] = f(" Custom Folders ", -1)),
1591
+ t("span", Ds, d(c.folders.length), 1)
1592
1592
  ]),
1593
1593
  t("div", xs, [
1594
- (r(!0), a(y, null, w(u.folders, (i) => (r(), a("div", {
1594
+ (r(!0), a(y, null, w(c.folders, (i) => (r(), a("div", {
1595
1595
  key: "uf-" + i.id,
1596
1596
  class: v(["user-folder-card", { "is-open": n.expandedFolders.includes("user-" + i.id) }])
1597
1597
  }, [
1598
1598
  t("div", {
1599
1599
  class: "af-header",
1600
- onClick: (c) => o.toggleFolder("user-" + i.id)
1600
+ onClick: (u) => o.toggleFolder("user-" + i.id)
1601
1601
  }, [
1602
1602
  t("div", Rs, [
1603
- e[87] || (e[87] = t("i", { class: "bi bi-folder-fill af-folder-icon color--user" }, null, -1)),
1603
+ e[85] || (e[85] = t("i", { class: "bi bi-folder-fill af-folder-icon color--user" }, null, -1)),
1604
1604
  t("span", Ts, d(i.files.length), 1)
1605
1605
  ]),
1606
1606
  t("div", As, [
@@ -1613,16 +1613,16 @@ function Tn(s, e, u, l, n, o) {
1613
1613
  t("button", {
1614
1614
  class: "rc-btn",
1615
1615
  style: { color: "#6f42c1" },
1616
- onClick: R((c) => o.selectFolder(i), ["stop"]),
1617
- title: "Add Files"
1618
- }, e[88] || (e[88] = [
1616
+ onClick: R((u) => o.openManualReportForFolder(i), ["stop"]),
1617
+ title: "Add Report / Files"
1618
+ }, e[86] || (e[86] = [
1619
1619
  t("i", { class: "bi bi-file-earmark-plus" }, null, -1)
1620
1620
  ]), 8, Ns),
1621
1621
  t("button", {
1622
1622
  class: "rc-btn rc-btn--danger",
1623
- onClick: R((c) => s.$emit("folder-delete-requested", i.id), ["stop"]),
1623
+ onClick: R((u) => s.$emit("folder-delete-requested", i.id), ["stop"]),
1624
1624
  title: "Delete"
1625
- }, e[89] || (e[89] = [
1625
+ }, e[87] || (e[87] = [
1626
1626
  t("i", { class: "bi bi-trash" }, null, -1)
1627
1627
  ]), 8, Ms),
1628
1628
  t("i", {
@@ -1633,40 +1633,40 @@ function Tn(s, e, u, l, n, o) {
1633
1633
  H(W, { name: "folder-expand" }, {
1634
1634
  default: Q(() => [
1635
1635
  n.expandedFolders.includes("user-" + i.id) ? (r(), a("div", Ls, [
1636
- (r(!0), a(y, null, w(i.files, (c) => (r(), a("div", {
1637
- key: c.id,
1636
+ (r(!0), a(y, null, w(i.files, (u) => (r(), a("div", {
1637
+ key: u.id,
1638
1638
  class: "ffi"
1639
1639
  }, [
1640
1640
  t("div", {
1641
- class: v(["ffi-icon", o.ffiIconClass(c)])
1641
+ class: v(["ffi-icon", o.ffiIconClass(u)])
1642
1642
  }, [
1643
1643
  t("i", {
1644
- class: v(["bi", o.fileIcon(c.type)])
1644
+ class: v(["bi", o.fileIcon(u.type)])
1645
1645
  }, null, 2)
1646
1646
  ], 2),
1647
1647
  t("div", Vs, [
1648
- t("span", Os, d(c.name), 1),
1649
- t("span", Us, d(o.formatFileSize(c.size)), 1)
1648
+ t("span", Os, d(u.name), 1),
1649
+ t("span", Us, d(o.formatFileSize(u.size)), 1)
1650
1650
  ]),
1651
1651
  t("div", js, [
1652
1652
  t("button", {
1653
1653
  class: "rc-btn rc-btn--danger",
1654
- onClick: (h) => s.$emit("file-remove-requested", { folderId: i.id, fileId: c.id }),
1654
+ onClick: (h) => s.$emit("file-remove-requested", { folderId: i.id, fileId: u.id }),
1655
1655
  title: "Remove"
1656
- }, e[90] || (e[90] = [
1656
+ }, e[88] || (e[88] = [
1657
1657
  t("i", { class: "bi bi-x-circle" }, null, -1)
1658
1658
  ]), 8, Bs)
1659
1659
  ])
1660
1660
  ]))), 128)),
1661
1661
  i.files.length === 0 ? (r(), a("div", Gs, [
1662
- e[92] || (e[92] = t("i", { class: "bi bi-inbox me-1" }, null, -1)),
1663
- e[93] || (e[93] = f("Empty folder ", -1)),
1662
+ e[90] || (e[90] = t("i", { class: "bi bi-inbox me-1" }, null, -1)),
1663
+ e[91] || (e[91] = f("Empty folder ", -1)),
1664
1664
  t("button", {
1665
1665
  class: "btn btn-sm btn-outline-secondary ms-2",
1666
- onClick: (c) => o.selectFolder(i)
1667
- }, e[91] || (e[91] = [
1666
+ onClick: (u) => o.openManualReportForFolder(i)
1667
+ }, e[89] || (e[89] = [
1668
1668
  t("i", { class: "bi bi-file-earmark-plus me-1" }, null, -1),
1669
- f("Add Files ", -1)
1669
+ f("Add Report ", -1)
1670
1670
  ]), 8, zs)
1671
1671
  ])) : p("", !0)
1672
1672
  ])) : p("", !0)
@@ -1676,17 +1676,17 @@ function Tn(s, e, u, l, n, o) {
1676
1676
  ], 2))), 128))
1677
1677
  ])
1678
1678
  ], 2)) : p("", !0),
1679
- u.reports.length === 0 && u.folders.length === 0 ? (r(), a("div", Hs, [
1680
- e[95] || (e[95] = t("i", {
1679
+ c.reports.length === 0 && c.folders.length === 0 ? (r(), a("div", Hs, [
1680
+ e[93] || (e[93] = t("i", {
1681
1681
  class: "bi bi-folder2-open",
1682
1682
  style: { "font-size": "3.5rem", color: "#ccc" }
1683
1683
  }, null, -1)),
1684
- e[96] || (e[96] = t("h5", { class: "mt-3 text-muted" }, "No folders yet", -1)),
1685
- e[97] || (e[97] = t("p", { class: "text-muted" }, "Each submitted report auto-creates a folder here. You can also create custom folders.", -1)),
1684
+ e[94] || (e[94] = t("h5", { class: "mt-3 text-muted" }, "No folders yet", -1)),
1685
+ e[95] || (e[95] = t("p", { class: "text-muted" }, "Each submitted report auto-creates a folder here. You can also create custom folders.", -1)),
1686
1686
  t("button", {
1687
1687
  class: "btn btn-primary mt-2",
1688
- onClick: e[10] || (e[10] = (i) => n.showNewFolderModal = !0)
1689
- }, e[94] || (e[94] = [
1688
+ onClick: e[9] || (e[9] = (i) => n.showNewFolderModal = !0)
1689
+ }, e[92] || (e[92] = [
1690
1690
  t("i", { class: "bi bi-folder-plus me-1" }, null, -1),
1691
1691
  f(" New Folder ", -1)
1692
1692
  ]))
@@ -1694,28 +1694,28 @@ function Tn(s, e, u, l, n, o) {
1694
1694
  ])) : p("", !0),
1695
1695
  t("div", {
1696
1696
  class: v(["modal", { show: n.showNewFolderModal }]),
1697
- onClick: e[16] || (e[16] = R((i) => n.showNewFolderModal = !1, ["self"]))
1697
+ onClick: e[15] || (e[15] = R((i) => n.showNewFolderModal = !1, ["self"]))
1698
1698
  }, [
1699
1699
  t("div", Ws, [
1700
1700
  t("div", Qs, [
1701
1701
  t("div", Js, [
1702
- e[98] || (e[98] = t("h5", { class: "modal-title" }, [
1702
+ e[96] || (e[96] = t("h5", { class: "modal-title" }, [
1703
1703
  t("i", { class: "bi bi-folder-plus me-2" }),
1704
1704
  f("Create New Folder")
1705
1705
  ], -1)),
1706
1706
  t("button", {
1707
1707
  type: "button",
1708
1708
  class: "btn-close",
1709
- onClick: e[11] || (e[11] = (i) => n.showNewFolderModal = !1)
1709
+ onClick: e[10] || (e[10] = (i) => n.showNewFolderModal = !1)
1710
1710
  })
1711
1711
  ]),
1712
1712
  t("div", Ys, [
1713
- e[99] || (e[99] = t("label", { class: "form-label" }, "Folder Name", -1)),
1713
+ e[97] || (e[97] = t("label", { class: "form-label" }, "Folder Name", -1)),
1714
1714
  b(t("input", {
1715
1715
  type: "text",
1716
1716
  class: "form-control",
1717
- "onUpdate:modelValue": e[12] || (e[12] = (i) => n.newFolderName = i),
1718
- onKeyup: e[13] || (e[13] = $((...i) => o.requestCreateFolder && o.requestCreateFolder(...i), ["enter"])),
1717
+ "onUpdate:modelValue": e[11] || (e[11] = (i) => n.newFolderName = i),
1718
+ onKeyup: e[12] || (e[12] = $((...i) => o.requestCreateFolder && o.requestCreateFolder(...i), ["enter"])),
1719
1719
  placeholder: "e.g., Q1 2025 Drills"
1720
1720
  }, null, 544), [
1721
1721
  [_, n.newFolderName]
@@ -1725,12 +1725,12 @@ function Tn(s, e, u, l, n, o) {
1725
1725
  t("button", {
1726
1726
  type: "button",
1727
1727
  class: "btn btn-secondary",
1728
- onClick: e[14] || (e[14] = (i) => n.showNewFolderModal = !1)
1728
+ onClick: e[13] || (e[13] = (i) => n.showNewFolderModal = !1)
1729
1729
  }, "Cancel"),
1730
1730
  t("button", {
1731
1731
  type: "button",
1732
1732
  class: "btn btn-primary",
1733
- onClick: e[15] || (e[15] = (...i) => o.requestCreateFolder && o.requestCreateFolder(...i)),
1733
+ onClick: e[14] || (e[14] = (...i) => o.requestCreateFolder && o.requestCreateFolder(...i)),
1734
1734
  disabled: !n.newFolderName.trim()
1735
1735
  }, "Create Folder", 8, Ks)
1736
1736
  ])
@@ -1739,7 +1739,7 @@ function Tn(s, e, u, l, n, o) {
1739
1739
  ], 2),
1740
1740
  t("div", {
1741
1741
  class: v(["modal", { show: n.showReportModal }]),
1742
- onClick: e[43] || (e[43] = R((...i) => o.closeReportForm && o.closeReportForm(...i), ["self"]))
1742
+ onClick: e[42] || (e[42] = R((...i) => o.closeReportForm && o.closeReportForm(...i), ["self"]))
1743
1743
  }, [
1744
1744
  t("div", $s, [
1745
1745
  t("div", Xs, [
@@ -1748,81 +1748,85 @@ function Tn(s, e, u, l, n, o) {
1748
1748
  t("i", {
1749
1749
  class: v(n.reportForm.report_type === "manual" ? "bi bi-file-earmark-text me-2" : "bi bi-shield-check me-2")
1750
1750
  }, null, 2),
1751
- f(" " + d(n.reportForm.report_type === "manual" ? "New Manual Report" : "Submit QHSE Report"), 1)
1751
+ f(" " + d(n.reportForm.report_type === "manual" ? "New Manual Report" : "Submit QHSE Report") + " ", 1),
1752
+ n.reportForm.folderName ? (r(), a("span", si, [
1753
+ e[98] || (e[98] = t("i", { class: "bi bi-folder-fill me-1" }, null, -1)),
1754
+ f(d(n.reportForm.folderName), 1)
1755
+ ])) : p("", !0)
1752
1756
  ]),
1753
- u.pendingContext ? p("", !0) : (r(), a("div", si, [
1757
+ !c.pendingContext && !n.reportForm.folderId ? (r(), a("div", ii, [
1754
1758
  t("button", {
1755
1759
  class: v(["type-toggle-btn", { active: n.reportForm.report_type === "qhse" }]),
1756
- onClick: e[17] || (e[17] = (i) => n.reportForm.report_type = "qhse")
1757
- }, e[100] || (e[100] = [
1760
+ onClick: e[16] || (e[16] = (i) => n.reportForm.report_type = "qhse")
1761
+ }, e[99] || (e[99] = [
1758
1762
  t("i", { class: "bi bi-shield-check me-1" }, null, -1),
1759
1763
  f("QHSE ", -1)
1760
1764
  ]), 2),
1761
1765
  t("button", {
1762
1766
  class: v(["type-toggle-btn", { active: n.reportForm.report_type === "manual" }]),
1763
- onClick: e[18] || (e[18] = (i) => n.reportForm.report_type = "manual")
1764
- }, e[101] || (e[101] = [
1767
+ onClick: e[17] || (e[17] = (i) => n.reportForm.report_type = "manual")
1768
+ }, e[100] || (e[100] = [
1765
1769
  t("i", { class: "bi bi-file-earmark-text me-1" }, null, -1),
1766
1770
  f("Manual ", -1)
1767
1771
  ]), 2)
1768
- ])),
1772
+ ])) : p("", !0),
1769
1773
  t("button", {
1770
1774
  type: "button",
1771
1775
  class: "btn-close btn-close-white",
1772
- onClick: e[19] || (e[19] = (...i) => o.closeReportForm && o.closeReportForm(...i))
1776
+ onClick: e[18] || (e[18] = (...i) => o.closeReportForm && o.closeReportForm(...i))
1773
1777
  })
1774
1778
  ]),
1775
- t("div", ii, [
1776
- n.reportForm.report_type === "qhse" ? (r(), a("div", ni, [
1777
- e[105] || (e[105] = t("label", { class: "form-label fw-semibold" }, [
1779
+ t("div", ni, [
1780
+ n.reportForm.report_type === "qhse" ? (r(), a("div", oi, [
1781
+ e[104] || (e[104] = t("label", { class: "form-label fw-semibold" }, [
1778
1782
  t("i", { class: "bi bi-link-45deg me-1" }),
1779
1783
  f("Link to Drill / Incident")
1780
1784
  ], -1)),
1781
- n.reportForm.entity_ref && n.reportForm.entity_type ? (r(), a("div", oi, [
1785
+ n.reportForm.entity_ref && n.reportForm.entity_type ? (r(), a("div", li, [
1782
1786
  t("span", {
1783
1787
  class: v(["entity-chip", n.reportForm.entity_type])
1784
1788
  }, d(n.reportForm.entity_type === "drill" ? "DRILL" : "INCIDENT"), 3),
1785
1789
  t("strong", null, d(n.reportForm.entity_ref), 1),
1786
- t("span", li, d(n.reportForm.entity_label), 1),
1790
+ t("span", ri, d(n.reportForm.entity_label), 1),
1787
1791
  t("button", {
1788
1792
  class: "btn btn-link btn-sm text-danger ms-auto",
1789
- onClick: e[20] || (e[20] = (...i) => o.clearEntityLink && o.clearEntityLink(...i))
1790
- }, e[102] || (e[102] = [
1793
+ onClick: e[19] || (e[19] = (...i) => o.clearEntityLink && o.clearEntityLink(...i))
1794
+ }, e[101] || (e[101] = [
1791
1795
  t("i", { class: "bi bi-x-circle" }, null, -1),
1792
1796
  f(" Clear", -1)
1793
1797
  ]))
1794
- ])) : (r(), a("div", ri, [
1798
+ ])) : (r(), a("div", ai, [
1795
1799
  b(t("select", {
1796
1800
  class: "form-control",
1797
- "onUpdate:modelValue": e[21] || (e[21] = (i) => n.reportForm.selectedMissing = i),
1798
- onChange: e[22] || (e[22] = (...i) => o.applyMissingSelection && o.applyMissingSelection(...i))
1801
+ "onUpdate:modelValue": e[20] || (e[20] = (i) => n.reportForm.selectedMissing = i),
1802
+ onChange: e[21] || (e[21] = (...i) => o.applyMissingSelection && o.applyMissingSelection(...i))
1799
1803
  }, [
1800
- e[103] || (e[103] = t("option", { value: "" }, "— Select a missing report (optional) —", -1)),
1801
- t("optgroup", ai, [
1802
- (r(!0), a(y, null, w(u.missingReports.filter((i) => i.entity_type === "drill"), (i) => (r(), a("option", {
1804
+ e[102] || (e[102] = t("option", { value: "" }, "— Select a missing report (optional) —", -1)),
1805
+ t("optgroup", di, [
1806
+ (r(!0), a(y, null, w(c.missingReports.filter((i) => i.entity_type === "drill"), (i) => (r(), a("option", {
1803
1807
  key: i.entity_id,
1804
1808
  value: JSON.stringify(i)
1805
- }, d(i.entity_ref) + " — " + d(i.label), 9, di))), 128))
1809
+ }, d(i.entity_ref) + " — " + d(i.label), 9, ci))), 128))
1806
1810
  ]),
1807
1811
  t("optgroup", ui, [
1808
- (r(!0), a(y, null, w(u.missingReports.filter((i) => i.entity_type === "incident"), (i) => (r(), a("option", {
1812
+ (r(!0), a(y, null, w(c.missingReports.filter((i) => i.entity_type === "incident"), (i) => (r(), a("option", {
1809
1813
  key: i.entity_id,
1810
1814
  value: JSON.stringify(i)
1811
- }, d(i.entity_ref) + " — " + d(i.label), 9, ci))), 128))
1815
+ }, d(i.entity_ref) + " — " + d(i.label), 9, mi))), 128))
1812
1816
  ])
1813
1817
  ], 544), [
1814
1818
  [I, n.reportForm.selectedMissing]
1815
1819
  ]),
1816
- e[104] || (e[104] = t("small", { class: "text-muted" }, "Linking will mark the drill / incident as reported.", -1))
1820
+ e[103] || (e[103] = t("small", { class: "text-muted" }, "Linking will mark the drill / incident as reported.", -1))
1817
1821
  ]))
1818
1822
  ])) : p("", !0),
1819
- n.reportForm.report_type === "manual" ? (r(), a("div", mi, [
1820
- t("div", pi, [
1821
- e[107] || (e[107] = t("label", { class: "form-label fw-semibold" }, "Report Category", -1)),
1823
+ n.reportForm.report_type === "manual" ? (r(), a("div", pi, [
1824
+ t("div", fi, [
1825
+ e[106] || (e[106] = t("label", { class: "form-label fw-semibold" }, "Report Category", -1)),
1822
1826
  b(t("select", {
1823
1827
  class: "form-control",
1824
- "onUpdate:modelValue": e[23] || (e[23] = (i) => n.reportForm.manual_category = i)
1825
- }, e[106] || (e[106] = [
1828
+ "onUpdate:modelValue": e[22] || (e[22] = (i) => n.reportForm.manual_category = i)
1829
+ }, e[105] || (e[105] = [
1826
1830
  t("option", null, "General", -1),
1827
1831
  t("option", null, "Maintenance", -1),
1828
1832
  t("option", null, "Safety Observation", -1),
@@ -1834,240 +1838,240 @@ function Tn(s, e, u, l, n, o) {
1834
1838
  [I, n.reportForm.manual_category]
1835
1839
  ])
1836
1840
  ]),
1837
- t("div", fi, [
1838
- e[108] || (e[108] = t("label", { class: "form-label fw-semibold" }, "Reference Number", -1)),
1841
+ t("div", hi, [
1842
+ e[107] || (e[107] = t("label", { class: "form-label fw-semibold" }, "Reference Number", -1)),
1839
1843
  b(t("input", {
1840
1844
  type: "text",
1841
1845
  class: "form-control",
1842
- "onUpdate:modelValue": e[24] || (e[24] = (i) => n.reportForm.manual_ref = i),
1846
+ "onUpdate:modelValue": e[23] || (e[23] = (i) => n.reportForm.manual_ref = i),
1843
1847
  placeholder: "e.g. RPT-2025-001"
1844
1848
  }, null, 512), [
1845
1849
  [_, n.reportForm.manual_ref]
1846
1850
  ])
1847
1851
  ])
1848
1852
  ])) : p("", !0),
1849
- n.reportForm.entity_type === "drill" ? (r(), a("div", hi, [
1850
- e[112] || (e[112] = t("i", { class: "bi bi-info-circle-fill me-1" }, null, -1)),
1853
+ n.reportForm.entity_type === "drill" ? (r(), a("div", vi, [
1854
+ e[111] || (e[111] = t("i", { class: "bi bi-info-circle-fill me-1" }, null, -1)),
1851
1855
  t("span", null, [
1852
- e[109] || (e[109] = t("strong", null, "Crew list tip:", -1)),
1853
- e[110] || (e[110] = f(" Start your Findings with ", -1)),
1854
- e[111] || (e[111] = t("code", null, "CREW: Name (Rank), Name (Rank), …", -1)),
1856
+ e[108] || (e[108] = t("strong", null, "Crew list tip:", -1)),
1857
+ e[109] || (e[109] = f(" Start your Findings with ", -1)),
1858
+ e[110] || (e[110] = t("code", null, "CREW: Name (Rank), Name (Rank), …", -1)),
1855
1859
  f(" to generate a named crew participation table in the PDF. Otherwise the PDF will show the total count (" + d(n.reportForm.entity_participants || 0) + " members) with a note to attach the signed list. ", 1)
1856
1860
  ])
1857
1861
  ])) : p("", !0),
1858
- n.reportForm.entity_type === "drill" ? (r(), a("div", vi, [
1859
- e[113] || (e[113] = t("div", { class: "drill-checklist-title" }, [
1862
+ n.reportForm.entity_type === "drill" ? (r(), a("div", gi, [
1863
+ e[112] || (e[112] = t("div", { class: "drill-checklist-title" }, [
1860
1864
  t("i", { class: "bi bi-clipboard2-check me-1" }),
1861
1865
  f(" Comments Checklist "),
1862
1866
  t("span", { class: "checklist-hint" }, "Tick = YES · unticked = NO in the PDF")
1863
1867
  ], -1)),
1864
- t("div", gi, [
1865
- (r(!0), a(y, null, w(n.drillChecklistQuestions, (i, c) => (r(), a("label", {
1866
- key: c,
1867
- class: v(["checklist-item", { checked: n.reportForm.drillChecklist[c] }])
1868
+ t("div", bi, [
1869
+ (r(!0), a(y, null, w(n.drillChecklistQuestions, (i, u) => (r(), a("label", {
1870
+ key: u,
1871
+ class: v(["checklist-item", { checked: n.reportForm.drillChecklist[u] }])
1868
1872
  }, [
1869
- t("div", bi, [
1873
+ t("div", yi, [
1870
1874
  t("input", {
1871
1875
  type: "checkbox",
1872
- checked: n.reportForm.drillChecklist[c],
1873
- onChange: (h) => n.reportForm.drillChecklist[c] = h.target.checked
1874
- }, null, 40, yi),
1875
- t("span", wi, [
1876
+ checked: n.reportForm.drillChecklist[u],
1877
+ onChange: (h) => n.reportForm.drillChecklist[u] = h.target.checked
1878
+ }, null, 40, wi),
1879
+ t("span", _i, [
1876
1880
  t("i", {
1877
- class: v(["bi", n.reportForm.drillChecklist[c] ? "bi-check-lg" : "bi-x-lg"])
1881
+ class: v(["bi", n.reportForm.drillChecklist[u] ? "bi-check-lg" : "bi-x-lg"])
1878
1882
  }, null, 2)
1879
1883
  ])
1880
1884
  ]),
1881
- t("span", _i, d(i), 1),
1885
+ t("span", ki, d(i), 1),
1882
1886
  t("span", {
1883
- class: v(["checklist-answer", n.reportForm.drillChecklist[c] ? "answer-yes" : "answer-no"])
1884
- }, d(n.reportForm.drillChecklist[c] ? "YES" : "NO"), 3)
1887
+ class: v(["checklist-answer", n.reportForm.drillChecklist[u] ? "answer-yes" : "answer-no"])
1888
+ }, d(n.reportForm.drillChecklist[u] ? "YES" : "NO"), 3)
1885
1889
  ], 2))), 128))
1886
1890
  ])
1887
1891
  ])) : p("", !0),
1888
- t("div", ki, [
1889
- t("div", Ci, [
1890
- e[114] || (e[114] = t("label", { class: "form-label fw-semibold" }, "Report Title *", -1)),
1892
+ t("div", Ci, [
1893
+ t("div", Fi, [
1894
+ e[113] || (e[113] = t("label", { class: "form-label fw-semibold" }, "Report Title *", -1)),
1891
1895
  b(t("input", {
1892
1896
  type: "text",
1893
1897
  class: "form-control",
1894
- "onUpdate:modelValue": e[25] || (e[25] = (i) => n.reportForm.title = i),
1898
+ "onUpdate:modelValue": e[24] || (e[24] = (i) => n.reportForm.title = i),
1895
1899
  placeholder: n.reportForm.entity_ref ? `Report — ${n.reportForm.entity_ref}` : "Enter report title"
1896
- }, null, 8, Fi), [
1900
+ }, null, 8, Di), [
1897
1901
  [_, n.reportForm.title]
1898
1902
  ])
1899
1903
  ]),
1900
- t("div", Di, [
1901
- e[115] || (e[115] = t("label", { class: "form-label fw-semibold" }, "Submitted By *", -1)),
1904
+ t("div", xi, [
1905
+ e[114] || (e[114] = t("label", { class: "form-label fw-semibold" }, "Submitted By *", -1)),
1902
1906
  b(t("input", {
1903
1907
  type: "text",
1904
1908
  class: "form-control",
1905
- "onUpdate:modelValue": e[26] || (e[26] = (i) => n.reportForm.submittedBy = i),
1909
+ "onUpdate:modelValue": e[25] || (e[25] = (i) => n.reportForm.submittedBy = i),
1906
1910
  placeholder: "Your name"
1907
1911
  }, null, 512), [
1908
1912
  [_, n.reportForm.submittedBy]
1909
1913
  ])
1910
1914
  ])
1911
1915
  ]),
1912
- t("div", xi, [
1913
- t("div", Si, [
1914
- e[116] || (e[116] = t("label", { class: "form-label fw-semibold" }, "Date", -1)),
1916
+ t("div", Si, [
1917
+ t("div", Ri, [
1918
+ e[115] || (e[115] = t("label", { class: "form-label fw-semibold" }, "Date", -1)),
1915
1919
  b(t("input", {
1916
1920
  type: "date",
1917
1921
  class: "form-control",
1918
- "onUpdate:modelValue": e[27] || (e[27] = (i) => n.reportForm.date = i)
1922
+ "onUpdate:modelValue": e[26] || (e[26] = (i) => n.reportForm.date = i)
1919
1923
  }, null, 512), [
1920
1924
  [_, n.reportForm.date]
1921
1925
  ])
1922
1926
  ])
1923
1927
  ]),
1924
- t("div", Ri, [
1925
- t("label", Ti, [
1928
+ t("div", Ti, [
1929
+ t("label", Ai, [
1926
1930
  f(d(n.reportForm.entity_type === "incident" ? "Description of Event (Findings) *" : "Findings / Summary *") + " ", 1),
1927
- n.reportForm.entity_type === "incident" ? (r(), a("span", Ai, "Pre-filled from incident objective — edit as needed")) : p("", !0)
1931
+ n.reportForm.entity_type === "incident" ? (r(), a("span", Pi, "Pre-filled from incident objective — edit as needed")) : p("", !0)
1928
1932
  ]),
1929
1933
  b(t("textarea", {
1930
1934
  class: "form-control",
1931
1935
  rows: "4",
1932
- "onUpdate:modelValue": e[28] || (e[28] = (i) => n.reportForm.findings = i),
1936
+ "onUpdate:modelValue": e[27] || (e[27] = (i) => n.reportForm.findings = i),
1933
1937
  placeholder: n.reportForm.entity_type === "drill" ? `CREW: John Smith (Master), Jane Doe (Chief Officer), …
1934
1938
 
1935
1939
  Then describe the drill scenario and findings…` : n.reportForm.entity_type === "incident" ? "Describe what happened, when, and where…" : "Describe findings, observations, and outcomes…"
1936
- }, " ", 8, Pi), [
1940
+ }, " ", 8, Ii), [
1937
1941
  [_, n.reportForm.findings]
1938
1942
  ])
1939
1943
  ]),
1940
- n.reportForm.entity_type === "incident" ? (r(), a("div", Ii, [
1941
- e[128] || (e[128] = t("div", { class: "incident-fields-title" }, [
1944
+ n.reportForm.entity_type === "incident" ? (r(), a("div", Ei, [
1945
+ e[127] || (e[127] = t("div", { class: "incident-fields-title" }, [
1942
1946
  t("i", { class: "bi bi-layout-text-window-reverse me-1" }),
1943
1947
  f(" Incident Report Fields "),
1944
1948
  t("span", { class: "checklist-hint" }, "These map directly to the PDF sections")
1945
1949
  ], -1)),
1946
- t("div", Ei, [
1947
- e[117] || (e[117] = t("label", { class: "form-label fw-semibold" }, "Possible Consequences", -1)),
1948
- e[118] || (e[118] = t("div", { class: "field-hint" }, "e.g. Personal injury, damage, collision, grounding, fire, pollution", -1)),
1950
+ t("div", qi, [
1951
+ e[116] || (e[116] = t("label", { class: "form-label fw-semibold" }, "Possible Consequences", -1)),
1952
+ e[117] || (e[117] = t("div", { class: "field-hint" }, "e.g. Personal injury, damage, collision, grounding, fire, pollution", -1)),
1949
1953
  b(t("textarea", {
1950
1954
  class: "form-control",
1951
1955
  rows: "2",
1952
- "onUpdate:modelValue": e[29] || (e[29] = (i) => n.reportForm.inc_consequences = i),
1956
+ "onUpdate:modelValue": e[28] || (e[28] = (i) => n.reportForm.inc_consequences = i),
1953
1957
  placeholder: "Describe possible consequences…"
1954
1958
  }, null, 512), [
1955
1959
  [_, n.reportForm.inc_consequences]
1956
1960
  ])
1957
1961
  ]),
1958
- t("div", qi, [
1959
- e[119] || (e[119] = t("label", { class: "form-label fw-semibold" }, "Relevant Factors / Conditions Surrounding the Event", -1)),
1960
- e[120] || (e[120] = t("div", { class: "field-hint" }, "e.g. weather, lighting, fatigue, time pressure", -1)),
1962
+ t("div", Ni, [
1963
+ e[118] || (e[118] = t("label", { class: "form-label fw-semibold" }, "Relevant Factors / Conditions Surrounding the Event", -1)),
1964
+ e[119] || (e[119] = t("div", { class: "field-hint" }, "e.g. weather, lighting, fatigue, time pressure", -1)),
1961
1965
  b(t("textarea", {
1962
1966
  class: "form-control",
1963
1967
  rows: "2",
1964
- "onUpdate:modelValue": e[30] || (e[30] = (i) => n.reportForm.inc_factors = i),
1968
+ "onUpdate:modelValue": e[29] || (e[29] = (i) => n.reportForm.inc_factors = i),
1965
1969
  placeholder: "Describe relevant factors and conditions…"
1966
1970
  }, null, 512), [
1967
1971
  [_, n.reportForm.inc_factors]
1968
1972
  ])
1969
1973
  ]),
1970
- t("div", Ni, [
1971
- e[121] || (e[121] = t("label", { class: "form-label fw-semibold" }, "Immediate Action Taken", -1)),
1974
+ t("div", Mi, [
1975
+ e[120] || (e[120] = t("label", { class: "form-label fw-semibold" }, "Immediate Action Taken", -1)),
1972
1976
  b(t("textarea", {
1973
1977
  class: "form-control",
1974
1978
  rows: "2",
1975
- "onUpdate:modelValue": e[31] || (e[31] = (i) => n.reportForm.inc_immediate_action = i),
1979
+ "onUpdate:modelValue": e[30] || (e[30] = (i) => n.reportForm.inc_immediate_action = i),
1976
1980
  placeholder: "What was done immediately after the event?"
1977
1981
  }, null, 512), [
1978
1982
  [_, n.reportForm.inc_immediate_action]
1979
1983
  ])
1980
1984
  ]),
1981
- t("div", Mi, [
1982
- t("div", Li, [
1983
- e[122] || (e[122] = t("label", { class: "form-label fw-semibold" }, "Direct Cause", -1)),
1984
- e[123] || (e[123] = t("div", { class: "field-hint" }, "e.g. failure to follow procedures, defective equipment ", -1)),
1985
+ t("div", Li, [
1986
+ t("div", Vi, [
1987
+ e[121] || (e[121] = t("label", { class: "form-label fw-semibold" }, "Direct Cause", -1)),
1988
+ e[122] || (e[122] = t("div", { class: "field-hint" }, "e.g. failure to follow procedures, defective equipment ", -1)),
1985
1989
  b(t("textarea", {
1986
1990
  class: "form-control",
1987
1991
  rows: "3",
1988
- "onUpdate:modelValue": e[32] || (e[32] = (i) => n.reportForm.inc_direct_cause = i),
1992
+ "onUpdate:modelValue": e[31] || (e[31] = (i) => n.reportForm.inc_direct_cause = i),
1989
1993
  placeholder: "Direct cause of the event…"
1990
1994
  }, null, 512), [
1991
1995
  [_, n.reportForm.inc_direct_cause]
1992
1996
  ])
1993
1997
  ]),
1994
- t("div", Vi, [
1995
- e[124] || (e[124] = t("label", { class: "form-label fw-semibold" }, "Root Cause", -1)),
1996
- e[125] || (e[125] = t("div", { class: "field-hint" }, "e.g. lack of training, management factors", -1)),
1998
+ t("div", Oi, [
1999
+ e[123] || (e[123] = t("label", { class: "form-label fw-semibold" }, "Root Cause", -1)),
2000
+ e[124] || (e[124] = t("div", { class: "field-hint" }, "e.g. lack of training, management factors", -1)),
1997
2001
  b(t("textarea", {
1998
2002
  class: "form-control",
1999
2003
  rows: "3",
2000
- "onUpdate:modelValue": e[33] || (e[33] = (i) => n.reportForm.inc_root_cause = i),
2004
+ "onUpdate:modelValue": e[32] || (e[32] = (i) => n.reportForm.inc_root_cause = i),
2001
2005
  placeholder: "Root / underlying cause…"
2002
2006
  }, null, 512), [
2003
2007
  [_, n.reportForm.inc_root_cause]
2004
2008
  ])
2005
2009
  ])
2006
2010
  ]),
2007
- t("div", Oi, [
2008
- e[126] || (e[126] = t("label", { class: "form-label fw-semibold" }, "Action Taken to Avoid Re-occurrence", -1)),
2011
+ t("div", Ui, [
2012
+ e[125] || (e[125] = t("label", { class: "form-label fw-semibold" }, "Action Taken to Avoid Re-occurrence", -1)),
2009
2013
  b(t("textarea", {
2010
2014
  class: "form-control",
2011
2015
  rows: "2",
2012
- "onUpdate:modelValue": e[34] || (e[34] = (i) => n.reportForm.correctiveActions = i),
2016
+ "onUpdate:modelValue": e[33] || (e[33] = (i) => n.reportForm.correctiveActions = i),
2013
2017
  placeholder: "Corrective actions and preventive measures…"
2014
2018
  }, null, 512), [
2015
2019
  [_, n.reportForm.correctiveActions]
2016
2020
  ])
2017
2021
  ]),
2018
- t("div", Ui, [
2019
- e[127] || (e[127] = t("label", { class: "form-label fw-semibold" }, "Any Other Remarks", -1)),
2022
+ t("div", ji, [
2023
+ e[126] || (e[126] = t("label", { class: "form-label fw-semibold" }, "Any Other Remarks", -1)),
2020
2024
  b(t("textarea", {
2021
2025
  class: "form-control",
2022
2026
  rows: "2",
2023
- "onUpdate:modelValue": e[35] || (e[35] = (i) => n.reportForm.inc_remarks = i),
2027
+ "onUpdate:modelValue": e[34] || (e[34] = (i) => n.reportForm.inc_remarks = i),
2024
2028
  placeholder: "Additional remarks…"
2025
2029
  }, null, 512), [
2026
2030
  [_, n.reportForm.inc_remarks]
2027
2031
  ])
2028
2032
  ])
2029
- ])) : (r(), a("div", ji, [
2030
- e[129] || (e[129] = t("label", { class: "form-label fw-semibold" }, "Corrective Actions", -1)),
2033
+ ])) : (r(), a("div", Bi, [
2034
+ e[128] || (e[128] = t("label", { class: "form-label fw-semibold" }, "Corrective Actions", -1)),
2031
2035
  b(t("textarea", {
2032
2036
  class: "form-control",
2033
2037
  rows: "3",
2034
- "onUpdate:modelValue": e[36] || (e[36] = (i) => n.reportForm.correctiveActions = i),
2038
+ "onUpdate:modelValue": e[35] || (e[35] = (i) => n.reportForm.correctiveActions = i),
2035
2039
  placeholder: "List any corrective actions required or taken…"
2036
2040
  }, null, 512), [
2037
2041
  [_, n.reportForm.correctiveActions]
2038
2042
  ])
2039
2043
  ])),
2040
- t("div", Bi, [
2041
- e[133] || (e[133] = t("label", { class: "form-label fw-semibold" }, [
2044
+ t("div", Gi, [
2045
+ e[132] || (e[132] = t("label", { class: "form-label fw-semibold" }, [
2042
2046
  f(" Attach Files "),
2043
2047
  t("span", { class: "form-hint" }, "Images embed in PDF · all files go into the ZIP")
2044
2048
  ], -1)),
2045
2049
  t("div", {
2046
2050
  class: "file-drop-zone",
2047
- onClick: e[37] || (e[37] = (i) => s.$refs.reportFileInput.click()),
2048
- onDragover: e[38] || (e[38] = R(() => {
2051
+ onClick: e[36] || (e[36] = (i) => s.$refs.reportFileInput.click()),
2052
+ onDragover: e[37] || (e[37] = R(() => {
2049
2053
  }, ["prevent"])),
2050
- onDrop: e[39] || (e[39] = R((...i) => o.handleReportFileDrop && o.handleReportFileDrop(...i), ["prevent"]))
2054
+ onDrop: e[38] || (e[38] = R((...i) => o.handleReportFileDrop && o.handleReportFileDrop(...i), ["prevent"]))
2051
2055
  }, [
2052
- e[131] || (e[131] = t("i", {
2056
+ e[130] || (e[130] = t("i", {
2053
2057
  class: "bi bi-cloud-upload",
2054
2058
  style: { "font-size": "2rem", color: "#6c757d" }
2055
2059
  }, null, -1)),
2056
- e[132] || (e[132] = t("p", { class: "mb-0 mt-2 text-muted" }, "Click or drag files here (PNG, JPG, PDF…)", -1)),
2057
- n.reportForm.files.length > 0 ? (r(), a("div", Gi, [
2058
- (r(!0), a(y, null, w(n.reportForm.files, (i, c) => (r(), a("span", {
2060
+ e[131] || (e[131] = t("p", { class: "mb-0 mt-2 text-muted" }, "Click or drag files here (PNG, JPG, PDF…)", -1)),
2061
+ n.reportForm.files.length > 0 ? (r(), a("div", zi, [
2062
+ (r(!0), a(y, null, w(n.reportForm.files, (i, u) => (r(), a("span", {
2059
2063
  class: "attached-chip",
2060
- key: c
2064
+ key: u
2061
2065
  }, [
2062
2066
  t("i", {
2063
2067
  class: v(["bi me-1", o.fileIcon(i.type)])
2064
2068
  }, null, 2),
2065
2069
  f(d(i.name) + " ", 1),
2066
2070
  t("button", {
2067
- onClick: R((h) => o.removeReportFile(c), ["stop"])
2068
- }, e[130] || (e[130] = [
2071
+ onClick: R((h) => o.removeReportFile(u), ["stop"])
2072
+ }, e[129] || (e[129] = [
2069
2073
  t("i", { class: "bi bi-x" }, null, -1)
2070
- ]), 8, zi)
2074
+ ]), 8, Hi)
2071
2075
  ]))), 128))
2072
2076
  ])) : p("", !0)
2073
2077
  ], 32),
@@ -2076,118 +2080,118 @@ Then describe the drill scenario and findings…` : n.reportForm.entity_type ===
2076
2080
  type: "file",
2077
2081
  multiple: "",
2078
2082
  style: { display: "none" },
2079
- onChange: e[40] || (e[40] = (...i) => o.handleReportFileAttach && o.handleReportFileAttach(...i))
2083
+ onChange: e[39] || (e[39] = (...i) => o.handleReportFileAttach && o.handleReportFileAttach(...i))
2080
2084
  }, null, 544)
2081
2085
  ]),
2082
- n.reportForm.title || n.reportForm.files.length > 0 ? (r(), a("div", Hi, [
2083
- e[134] || (e[134] = t("i", { class: "bi bi-file-zip me-1" }, null, -1)),
2084
- e[135] || (e[135] = f(" Download will produce ", -1)),
2086
+ n.reportForm.title || n.reportForm.files.length > 0 ? (r(), a("div", Wi, [
2087
+ e[133] || (e[133] = t("i", { class: "bi bi-file-zip me-1" }, null, -1)),
2088
+ e[134] || (e[134] = f(" Download will produce ", -1)),
2085
2089
  t("strong", null, d(o.zipName) + ".zip", 1),
2086
- e[136] || (e[136] = f(" containing the report PDF ", -1)),
2087
- n.reportForm.files.length ? (r(), a("span", Wi, " + " + d(n.reportForm.files.length) + " attachment" + d(n.reportForm.files.length !== 1 ? "s" : ""), 1)) : p("", !0)
2090
+ e[135] || (e[135] = f(" containing the report PDF ", -1)),
2091
+ n.reportForm.files.length ? (r(), a("span", Qi, " + " + d(n.reportForm.files.length) + " attachment" + d(n.reportForm.files.length !== 1 ? "s" : ""), 1)) : p("", !0)
2088
2092
  ])) : p("", !0)
2089
2093
  ]),
2090
- t("div", Qi, [
2094
+ t("div", Ji, [
2091
2095
  t("button", {
2092
2096
  type: "button",
2093
2097
  class: "btn btn-secondary",
2094
- onClick: e[41] || (e[41] = (...i) => o.closeReportForm && o.closeReportForm(...i))
2098
+ onClick: e[40] || (e[40] = (...i) => o.closeReportForm && o.closeReportForm(...i))
2095
2099
  }, "Cancel"),
2096
2100
  t("button", {
2097
2101
  type: "button",
2098
2102
  class: "btn btn-success",
2099
- onClick: e[42] || (e[42] = (...i) => o.requestSubmitReport && o.requestSubmitReport(...i)),
2100
- disabled: u.isSubmitting || !n.reportForm.title || !n.reportForm.submittedBy || !n.reportForm.findings
2103
+ onClick: e[41] || (e[41] = (...i) => o.requestSubmitReport && o.requestSubmitReport(...i)),
2104
+ disabled: c.isSubmitting || !n.reportForm.title || !n.reportForm.submittedBy || !n.reportForm.findings
2101
2105
  }, [
2102
- u.isSubmitting ? (r(), a("span", Yi, e[137] || (e[137] = [
2106
+ c.isSubmitting ? (r(), a("span", Zi, e[136] || (e[136] = [
2103
2107
  t("span", { class: "spinner-sm" }, null, -1),
2104
2108
  f(" Submitting…", -1)
2105
- ]))) : (r(), a("span", Zi, e[138] || (e[138] = [
2109
+ ]))) : (r(), a("span", Ki, e[137] || (e[137] = [
2106
2110
  t("i", { class: "bi bi-check-circle me-1" }, null, -1),
2107
2111
  f("Submit Report", -1)
2108
2112
  ])))
2109
- ], 8, Ji)
2113
+ ], 8, Yi)
2110
2114
  ])
2111
2115
  ])
2112
2116
  ])
2113
2117
  ], 2),
2114
2118
  t("div", {
2115
2119
  class: v(["modal", { show: n.showViewModal }]),
2116
- onClick: e[48] || (e[48] = R((...i) => o.closeViewer && o.closeViewer(...i), ["self"]))
2120
+ onClick: e[47] || (e[47] = R((...i) => o.closeViewer && o.closeViewer(...i), ["self"]))
2117
2121
  }, [
2118
- t("div", Ki, [
2119
- n.viewingReport ? (r(), a("div", $i, [
2120
- t("div", Xi, [
2121
- t("div", en, [
2122
+ t("div", $i, [
2123
+ n.viewingReport ? (r(), a("div", Xi, [
2124
+ t("div", en, [
2125
+ t("div", tn, [
2122
2126
  t("span", {
2123
2127
  class: v(["entity-chip me-2", o.reportTypeClass(n.viewingReport)])
2124
2128
  }, d(o.reportTypeLabel(n.viewingReport)), 3),
2125
- t("strong", tn, d(n.viewingReport.title), 1)
2129
+ t("strong", sn, d(n.viewingReport.title), 1)
2126
2130
  ]),
2127
2131
  t("button", {
2128
2132
  type: "button",
2129
2133
  class: "btn-close btn-close-white",
2130
- onClick: e[44] || (e[44] = (...i) => o.closeViewer && o.closeViewer(...i))
2134
+ onClick: e[43] || (e[43] = (...i) => o.closeViewer && o.closeViewer(...i))
2131
2135
  })
2132
2136
  ]),
2133
- t("div", sn, [
2134
- t("div", nn, [
2135
- t("div", on, [
2136
- e[139] || (e[139] = t("label", null, "Reference", -1)),
2137
- t("span", ln, d(n.viewingReport.entityRef || "—"), 1)
2137
+ t("div", nn, [
2138
+ t("div", on, [
2139
+ t("div", ln, [
2140
+ e[138] || (e[138] = t("label", null, "Reference", -1)),
2141
+ t("span", rn, d(n.viewingReport.entityRef || "—"), 1)
2138
2142
  ]),
2139
- t("div", rn, [
2140
- e[140] || (e[140] = t("label", null, "Type", -1)),
2143
+ t("div", an, [
2144
+ e[139] || (e[139] = t("label", null, "Type", -1)),
2141
2145
  t("span", null, d(o.reportTypeLabel(n.viewingReport)), 1)
2142
2146
  ]),
2143
- n.viewingReport.manualCategory ? (r(), a("div", an, [
2144
- e[141] || (e[141] = t("label", null, "Category", -1)),
2147
+ n.viewingReport.manualCategory ? (r(), a("div", dn, [
2148
+ e[140] || (e[140] = t("label", null, "Category", -1)),
2145
2149
  t("span", null, d(n.viewingReport.manualCategory), 1)
2146
2150
  ])) : p("", !0),
2147
- t("div", dn, [
2148
- e[142] || (e[142] = t("label", null, "Submitted By", -1)),
2151
+ t("div", cn, [
2152
+ e[141] || (e[141] = t("label", null, "Submitted By", -1)),
2149
2153
  t("span", null, d(n.viewingReport.submittedBy), 1)
2150
2154
  ]),
2151
2155
  t("div", un, [
2152
- e[143] || (e[143] = t("label", null, "Date", -1)),
2156
+ e[142] || (e[142] = t("label", null, "Date", -1)),
2153
2157
  t("span", null, d(n.viewingReport.date), 1)
2154
2158
  ]),
2155
- n.viewingReport.vessel ? (r(), a("div", cn, [
2156
- e[144] || (e[144] = t("label", null, "Vessel / Location", -1)),
2159
+ n.viewingReport.vessel ? (r(), a("div", mn, [
2160
+ e[143] || (e[143] = t("label", null, "Vessel / Location", -1)),
2157
2161
  t("span", null, d(n.viewingReport.vessel), 1)
2158
2162
  ])) : p("", !0),
2159
- t("div", mn, [
2160
- e[145] || (e[145] = t("label", null, "Submitted At", -1)),
2163
+ t("div", pn, [
2164
+ e[144] || (e[144] = t("label", null, "Submitted At", -1)),
2161
2165
  t("span", null, d(o.formatDate(n.viewingReport.submittedAt)), 1)
2162
2166
  ]),
2163
- n.viewingReport.entity_subtype ? (r(), a("div", pn, [
2164
- e[146] || (e[146] = t("label", null, "Drill Type", -1)),
2167
+ n.viewingReport.entity_subtype ? (r(), a("div", fn, [
2168
+ e[145] || (e[145] = t("label", null, "Drill Type", -1)),
2165
2169
  t("span", null, d(n.viewingReport.entity_subtype), 1)
2166
2170
  ])) : p("", !0),
2167
- n.viewingReport.entity_creator ? (r(), a("div", fn, [
2168
- e[147] || (e[147] = t("label", null, "Drill Master", -1)),
2171
+ n.viewingReport.entity_creator ? (r(), a("div", hn, [
2172
+ e[146] || (e[146] = t("label", null, "Drill Master", -1)),
2169
2173
  t("span", null, d(n.viewingReport.entity_creator), 1)
2170
2174
  ])) : p("", !0),
2171
- n.viewingReport.entity_duration ? (r(), a("div", hn, [
2172
- e[148] || (e[148] = t("label", null, "Duration", -1)),
2175
+ n.viewingReport.entity_duration ? (r(), a("div", vn, [
2176
+ e[147] || (e[147] = t("label", null, "Duration", -1)),
2173
2177
  t("span", null, d(n.viewingReport.entity_duration), 1)
2174
2178
  ])) : p("", !0),
2175
- n.viewingReport.entity_participants ? (r(), a("div", vn, [
2176
- e[149] || (e[149] = t("label", null, "Participants", -1)),
2179
+ n.viewingReport.entity_participants ? (r(), a("div", gn, [
2180
+ e[148] || (e[148] = t("label", null, "Participants", -1)),
2177
2181
  t("span", null, d(n.viewingReport.entity_participants), 1)
2178
2182
  ])) : p("", !0)
2179
2183
  ]),
2180
- t("div", gn, [
2181
- e[150] || (e[150] = t("label", null, "Findings / Summary", -1)),
2182
- t("div", bn, d(n.viewingReport.findings), 1)
2184
+ t("div", bn, [
2185
+ e[149] || (e[149] = t("label", null, "Findings / Summary", -1)),
2186
+ t("div", yn, d(n.viewingReport.findings), 1)
2183
2187
  ]),
2184
- n.viewingReport.correctiveActions ? (r(), a("div", yn, [
2185
- e[151] || (e[151] = t("label", null, "Corrective Actions", -1)),
2186
- t("div", wn, d(n.viewingReport.correctiveActions), 1)
2188
+ n.viewingReport.correctiveActions ? (r(), a("div", wn, [
2189
+ e[150] || (e[150] = t("label", null, "Corrective Actions", -1)),
2190
+ t("div", _n, d(n.viewingReport.correctiveActions), 1)
2187
2191
  ])) : p("", !0),
2188
- o.getFilesForReport(n.viewingReport.id).length > 0 ? (r(), a("div", _n, [
2189
- e[153] || (e[153] = t("label", null, "Attachments", -1)),
2190
- t("div", kn, [
2192
+ o.getFilesForReport(n.viewingReport.id).length > 0 ? (r(), a("div", kn, [
2193
+ e[152] || (e[152] = t("label", null, "Attachments", -1)),
2194
+ t("div", Cn, [
2191
2195
  (r(!0), a(y, null, w(o.getFilesForReport(n.viewingReport.id), (i) => (r(), a("a", {
2192
2196
  key: i.id,
2193
2197
  href: i.publicUrl,
@@ -2199,40 +2203,40 @@ Then describe the drill scenario and findings…` : n.reportForm.entity_type ===
2199
2203
  class: v(["bi me-1", o.fileIcon(i.type)])
2200
2204
  }, null, 2),
2201
2205
  f(d(i.name) + " ", 1),
2202
- t("small", Fn, "(" + d(o.formatFileSize(i.size)) + ")", 1),
2203
- e[152] || (e[152] = t("i", {
2206
+ t("small", Dn, "(" + d(o.formatFileSize(i.size)) + ")", 1),
2207
+ e[151] || (e[151] = t("i", {
2204
2208
  class: "bi bi-box-arrow-up-right ms-1",
2205
2209
  style: { "font-size": "10px" }
2206
2210
  }, null, -1))
2207
- ], 8, Cn))), 128))
2211
+ ], 8, Fn))), 128))
2208
2212
  ])
2209
2213
  ])) : p("", !0)
2210
2214
  ]),
2211
- t("div", Dn, [
2215
+ t("div", xn, [
2212
2216
  t("button", {
2213
2217
  class: "btn btn-danger btn-sm me-auto",
2214
- onClick: e[45] || (e[45] = (i) => o.requestDeleteReport(n.viewingReport.id))
2215
- }, e[154] || (e[154] = [
2218
+ onClick: e[44] || (e[44] = (i) => o.requestDeleteReport(n.viewingReport.id))
2219
+ }, e[153] || (e[153] = [
2216
2220
  t("i", { class: "bi bi-trash" }, null, -1),
2217
2221
  f(" Delete ", -1)
2218
2222
  ])),
2219
2223
  t("button", {
2220
2224
  class: "btn btn-secondary",
2221
- onClick: e[46] || (e[46] = (...i) => o.closeViewer && o.closeViewer(...i))
2225
+ onClick: e[45] || (e[45] = (...i) => o.closeViewer && o.closeViewer(...i))
2222
2226
  }, "Close"),
2223
2227
  t("button", {
2224
2228
  class: "btn btn-primary",
2225
- onClick: e[47] || (e[47] = (i) => o.downloadReport(n.viewingReport)),
2229
+ onClick: e[46] || (e[46] = (i) => o.downloadReport(n.viewingReport)),
2226
2230
  disabled: n.generatingPdf === n.viewingReport.id
2227
2231
  }, [
2228
- n.generatingPdf === n.viewingReport.id ? (r(), a("span", Sn, e[155] || (e[155] = [
2232
+ n.generatingPdf === n.viewingReport.id ? (r(), a("span", Rn, e[154] || (e[154] = [
2229
2233
  t("span", { class: "spinner-sm" }, null, -1),
2230
2234
  f(" Building ZIP…", -1)
2231
- ]))) : (r(), a("span", Rn, e[156] || (e[156] = [
2235
+ ]))) : (r(), a("span", Tn, e[155] || (e[155] = [
2232
2236
  t("i", { class: "bi bi-file-zip me-1" }, null, -1),
2233
2237
  f("Download ZIP", -1)
2234
2238
  ])))
2235
- ], 8, xn)
2239
+ ], 8, Sn)
2236
2240
  ])
2237
2241
  ])) : p("", !0)
2238
2242
  ])
@@ -2242,11 +2246,11 @@ Then describe the drill scenario and findings…` : n.reportForm.entity_type ===
2242
2246
  type: "file",
2243
2247
  multiple: "",
2244
2248
  style: { display: "none" },
2245
- onChange: e[49] || (e[49] = (...i) => o.handleFileSelection && o.handleFileSelection(...i))
2249
+ onChange: e[48] || (e[48] = (...i) => o.handleFileSelection && o.handleFileSelection(...i))
2246
2250
  }, null, 544)
2247
2251
  ]);
2248
2252
  }
2249
- const An = /* @__PURE__ */ O(tt, [["render", Tn], ["__scopeId", "data-v-9e048de6"]]), Pn = {
2253
+ const Pn = /* @__PURE__ */ O(tt, [["render", An], ["__scopeId", "data-v-0ae16227"]]), In = {
2250
2254
  name: "OceanHelmMaintenance",
2251
2255
  props: {
2252
2256
  vesselInfo: {
@@ -2352,7 +2356,7 @@ const An = /* @__PURE__ */ O(tt, [["render", Tn], ["__scopeId", "data-v-9e048de6
2352
2356
  if (this.activeFilter === "all" ? s = s.filter((e) => e.status === "Overdue" || e.status === "Soon" || e.status === "Completed") : this.activeFilter === "due" ? s = s.filter((e) => e.status === "Overdue" || e.status === "Soon") : this.activeFilter === "completed" && (s = s.filter((e) => e.status === "Completed")), this.searchQuery) {
2353
2357
  const e = this.searchQuery.toLowerCase();
2354
2358
  s = s.filter(
2355
- (u) => u.component.toLowerCase().includes(e) || u.taskName.toLowerCase().includes(e) || u.assignedTo.toLowerCase().includes(e)
2359
+ (c) => c.component.toLowerCase().includes(e) || c.taskName.toLowerCase().includes(e) || c.assignedTo.toLowerCase().includes(e)
2356
2360
  );
2357
2361
  }
2358
2362
  return s;
@@ -2392,12 +2396,12 @@ const An = /* @__PURE__ */ O(tt, [["render", Tn], ["__scopeId", "data-v-9e048de6
2392
2396
  message: "Enter the task details",
2393
2397
  callback: (e) => {
2394
2398
  if (e) {
2395
- const u = {
2399
+ const c = {
2396
2400
  id: Date.now(),
2397
2401
  text: e,
2398
2402
  completed: !1
2399
2403
  };
2400
- this.checklists.push(u);
2404
+ this.checklists.push(c);
2401
2405
  }
2402
2406
  }
2403
2407
  });
@@ -2409,8 +2413,8 @@ const An = /* @__PURE__ */ O(tt, [["render", Tn], ["__scopeId", "data-v-9e048de6
2409
2413
  this.isLoading = !0, this.$emit("generate-checklist", {
2410
2414
  component: s,
2411
2415
  callback: (e) => {
2412
- this.checklists = e.map((u) => ({
2413
- ...u,
2416
+ this.checklists = e.map((c) => ({
2417
+ ...c,
2414
2418
  completed: !1
2415
2419
  })), this.isLoading = !1;
2416
2420
  }
@@ -2418,12 +2422,12 @@ const An = /* @__PURE__ */ O(tt, [["render", Tn], ["__scopeId", "data-v-9e048de6
2418
2422
  },
2419
2423
  showMaintenance(s) {
2420
2424
  if (this.deepAccess()) {
2421
- const e = this.tasks.find((u) => u.component === s);
2425
+ const e = this.tasks.find((c) => c.component === s);
2422
2426
  e && e.checklistProgress ? this.checklists = [...e.checklistProgress] : this.loadChecklist(s), this.after = e == null ? void 0 : e.after, this.currentTask = s, this.lastSection = "inventory", this.activeSection = "maintenance";
2423
2427
  }
2424
2428
  },
2425
2429
  printMaintenance(s) {
2426
- const e = this.tasks.find((u) => u.component === s);
2430
+ const e = this.tasks.find((c) => c.component === s);
2427
2431
  this.maintenanceTasks = [e], this.loadMaintenanceData(), this.showReport = !0, this.$nextTick(() => {
2428
2432
  setTimeout(() => {
2429
2433
  window.print(), this.showReport = !1;
@@ -2471,31 +2475,31 @@ const An = /* @__PURE__ */ O(tt, [["render", Tn], ["__scopeId", "data-v-9e048de6
2471
2475
  const s = this.form.lastPerformed ? new Date(this.form.lastPerformed) : null, e = this.form.recurrence;
2472
2476
  if (!s || !e)
2473
2477
  return;
2474
- let u = new Date(s);
2478
+ let c = new Date(s);
2475
2479
  switch (e) {
2476
2480
  case "daily":
2477
- u.setDate(u.getDate() + 1);
2481
+ c.setDate(c.getDate() + 1);
2478
2482
  break;
2479
2483
  case "weekly":
2480
- u.setDate(u.getDate() + 7);
2484
+ c.setDate(c.getDate() + 7);
2481
2485
  break;
2482
2486
  case "monthly":
2483
- u.setMonth(u.getMonth() + 1);
2487
+ c.setMonth(c.getMonth() + 1);
2484
2488
  break;
2485
2489
  case "quarterly":
2486
- u.setMonth(u.getMonth() + 3);
2490
+ c.setMonth(c.getMonth() + 3);
2487
2491
  break;
2488
2492
  case "semi-annual":
2489
- u.setMonth(u.getMonth() + 6);
2493
+ c.setMonth(c.getMonth() + 6);
2490
2494
  break;
2491
2495
  case "annual":
2492
- u.setFullYear(u.getFullYear() + 1);
2496
+ c.setFullYear(c.getFullYear() + 1);
2493
2497
  break;
2494
2498
  case "once":
2495
2499
  case "custom":
2496
2500
  return;
2497
2501
  }
2498
- this.form.nextDue = u.toISOString().split("T")[0];
2502
+ this.form.nextDue = c.toISOString().split("T")[0];
2499
2503
  },
2500
2504
  calculateRemainingDays() {
2501
2505
  if (!this.form.nextDue) {
@@ -2504,7 +2508,7 @@ const An = /* @__PURE__ */ O(tt, [["render", Tn], ["__scopeId", "data-v-9e048de6
2504
2508
  }
2505
2509
  const s = /* @__PURE__ */ new Date(), e = new Date(this.form.nextDue);
2506
2510
  s.setHours(0, 0, 0, 0), e.setHours(0, 0, 0, 0);
2507
- const u = e - s, l = Math.ceil(u / (1e3 * 60 * 60 * 24));
2511
+ const c = e - s, l = Math.ceil(c / (1e3 * 60 * 60 * 24));
2508
2512
  this.form.remainingDays = `${l} Days`;
2509
2513
  },
2510
2514
  async saveSchedule() {
@@ -2513,7 +2517,7 @@ const An = /* @__PURE__ */ O(tt, [["render", Tn], ["__scopeId", "data-v-9e048de6
2513
2517
  return;
2514
2518
  }
2515
2519
  const s = { ...this.form };
2516
- if (this.form.component === "Other" && this.form.customComponent && (s.component = this.form.customComponent), s.email = this.companyInfo.email, this.tasks.some((u) => u.component === s.component)) {
2520
+ if (this.form.component === "Other" && this.form.customComponent && (s.component = this.form.customComponent), s.email = this.companyInfo.email, this.tasks.some((c) => c.component === s.component)) {
2517
2521
  this.$emit("show-message", {
2518
2522
  type: "error",
2519
2523
  title: "Duplicate Component",
@@ -2524,8 +2528,8 @@ const An = /* @__PURE__ */ O(tt, [["render", Tn], ["__scopeId", "data-v-9e048de6
2524
2528
  delete s.customComponent, this.$emit("save-schedule", {
2525
2529
  taskData: s,
2526
2530
  file: s.attachments.file,
2527
- callback: (u) => {
2528
- this.isSaving = !1, u && (this.loadChecklist(s.component), this.lastSection = "schedule", this.currentTask = s.component, this.resetForm(), this.activeSection = "maintenance");
2531
+ callback: (c) => {
2532
+ this.isSaving = !1, c && (this.loadChecklist(s.component), this.lastSection = "schedule", this.currentTask = s.component, this.resetForm(), this.activeSection = "maintenance");
2529
2533
  }
2530
2534
  });
2531
2535
  },
@@ -2556,14 +2560,14 @@ const An = /* @__PURE__ */ O(tt, [["render", Tn], ["__scopeId", "data-v-9e048de6
2556
2560
  s.completed = !s.completed;
2557
2561
  },
2558
2562
  async resetTasks() {
2559
- const e = this.checklists.every((l) => l.completed) ? "Completed" : "Soon", u = {
2563
+ const e = this.checklists.every((l) => l.completed) ? "Completed" : "Soon", c = {
2560
2564
  checklistProgress: [...this.checklists],
2561
2565
  status: e,
2562
2566
  component: this.currentTask,
2563
2567
  after: this.after
2564
2568
  };
2565
2569
  this.$emit("update-task", {
2566
- updateData: u,
2570
+ updateData: c,
2567
2571
  file: this.fileattachments.file,
2568
2572
  tasks: this.tasks,
2569
2573
  callback: (l, n) => {
@@ -2591,7 +2595,7 @@ const An = /* @__PURE__ */ O(tt, [["render", Tn], ["__scopeId", "data-v-9e048de6
2591
2595
  getChecklistProgress(s) {
2592
2596
  if (!s.checklistProgress || s.checklistProgress.length === 0)
2593
2597
  return 0;
2594
- const e = s.checklistProgress.filter((u) => u.completed).length;
2598
+ const e = s.checklistProgress.filter((c) => c.completed).length;
2595
2599
  return Math.round(e / s.checklistProgress.length * 100);
2596
2600
  },
2597
2601
  getCompletedChecklistItems(s) {
@@ -2613,52 +2617,52 @@ const An = /* @__PURE__ */ O(tt, [["render", Tn], ["__scopeId", "data-v-9e048de6
2613
2617
  });
2614
2618
  }
2615
2619
  }
2616
- }, In = { key: 0 }, En = ["onClick"], qn = { class: "content" }, Nn = {
2620
+ }, En = { key: 0 }, qn = ["onClick"], Nn = { class: "content" }, Mn = {
2617
2621
  key: 0,
2618
2622
  class: "loading-container"
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 = {
2623
+ }, Ln = { key: 1 }, Vn = { class: "container" }, On = { class: "d-flex justify-content-between align-items-center" }, Un = { class: "progress-container" }, jn = { class: "progress-info" }, Bn = { class: "progress-bar" }, Gn = { class: "checklist" }, zn = ["onClick"], Hn = { key: 0 }, Wn = ["onClick"], Qn = ["onClick"], Jn = { key: 0 }, Yn = { class: "checklist" }, Zn = { class: "checklist-item" }, Kn = { class: "attachment-area" }, $n = {
2620
2624
  key: 2,
2621
2625
  class: "status"
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 = {
2626
+ }, Xn = { class: "form-group" }, eo = { class: "form-group" }, to = { class: "input-group" }, so = { class: "form-group" }, io = { class: "form-group" }, no = { class: "input-group" }, oo = { class: "form-group" }, lo = { class: "form-group" }, ro = { class: "input-group" }, ao = { class: "form-group" }, co = { class: "form-group" }, uo = ["value"], mo = { class: "input-group" }, po = { class: "form-group" }, fo = { class: "input-group" }, ho = { class: "form-group" }, vo = { class: "form-group" }, go = { class: "form-group" }, bo = { class: "checkbox-group" }, yo = { class: "checkbox-item" }, wo = { class: "checkbox-item" }, _o = { class: "input-group" }, ko = { class: "form-group" }, Co = { class: "form-group" }, Fo = { class: "form-group" }, Do = { class: "attachment-area" }, xo = { class: "action-buttons" }, So = ["disabled"], Ro = { class: "task-table-wrapper" }, To = { class: "table-controls" }, Ao = { class: "filters" }, Po = { class: "task-table" }, Io = ["onClick"], Eo = ["onClick"], qo = { key: 0 }, No = {
2623
2627
  class: "alert alert-primary",
2624
2628
  role: "alert"
2625
- }, No = { class: "mb-0" }, Mo = {
2629
+ }, Mo = { class: "mb-0" }, Lo = {
2626
2630
  class: "report-container",
2627
2631
  ref: "reportContainer"
2628
- }, Lo = { class: "report-info" }, Vo = { class: "info-box" }, Oo = { class: "info-box" }, Uo = { class: "info-box" }, jo = { class: "section" }, Bo = { class: "summary-grid" }, Go = { class: "summary-card" }, zo = { class: "summary-number" }, Ho = { class: "section" }, Wo = { class: "task-header" }, Qo = { class: "task-title" }, Jo = { class: "task-component" }, Yo = { class: "task-details" }, Zo = { class: "detail-item" }, Ko = { class: "detail-value" }, $o = { class: "detail-item" }, Xo = { class: "detail-value" }, el = { class: "detail-item" }, tl = { class: "detail-value" }, sl = { class: "detail-item" }, il = { class: "detail-value" }, nl = { class: "detail-item" }, ol = { class: "detail-value" }, ll = { class: "detail-item" }, rl = { class: "detail-value" }, al = {
2632
+ }, Vo = { class: "report-info" }, Oo = { class: "info-box" }, Uo = { class: "info-box" }, jo = { class: "info-box" }, Bo = { class: "section" }, Go = { class: "summary-grid" }, zo = { class: "summary-card" }, Ho = { class: "summary-number" }, Wo = { class: "section" }, Qo = { class: "task-header" }, Jo = { class: "task-title" }, Yo = { class: "task-component" }, Zo = { class: "task-details" }, Ko = { class: "detail-item" }, $o = { class: "detail-value" }, Xo = { class: "detail-item" }, el = { class: "detail-value" }, tl = { class: "detail-item" }, sl = { class: "detail-value" }, il = { class: "detail-item" }, nl = { class: "detail-value" }, ol = { class: "detail-item" }, ll = { class: "detail-value" }, rl = { class: "detail-item" }, al = { class: "detail-value" }, dl = {
2629
2633
  key: 0,
2630
2634
  style: { margin: "15px 0", padding: "10px", background: "white", "border-radius": "5px" }
2631
- }, dl = { class: "detail-value" }, ul = {
2635
+ }, cl = { class: "detail-value" }, ul = {
2632
2636
  key: 1,
2633
2637
  style: { margin: "15px 0", padding: "10px", background: "white", "border-radius": "5px" }
2634
- }, cl = { class: "detail-value" }, ml = {
2638
+ }, ml = { class: "detail-value" }, pl = {
2635
2639
  key: 2,
2636
2640
  class: "checklist-progress"
2637
- }, pl = { class: "progress-bar" }, fl = { style: { "font-size": "0.9em", color: "#666", "margin-top": "5px" } }, hl = { class: "checklist-items" }, vl = { class: "checklist-icon" }, gl = { class: "section" }, bl = { class: "info-box" }, yl = { class: "signature-section" }, wl = { class: "signature-box" }, _l = { style: { "margin-top": "10px", color: "#666" } };
2638
- function kl(s, e, u, l, n, o) {
2639
- return n.ready ? (r(), a("div", In, [
2641
+ }, fl = { class: "progress-bar" }, hl = { style: { "font-size": "0.9em", color: "#666", "margin-top": "5px" } }, vl = { class: "checklist-items" }, gl = { class: "checklist-icon" }, bl = { class: "section" }, yl = { class: "info-box" }, wl = { class: "signature-section" }, _l = { class: "signature-box" }, kl = { style: { "margin-top": "10px", color: "#666" } };
2642
+ function Cl(s, e, c, l, n, o) {
2643
+ return n.ready ? (r(), a("div", En, [
2640
2644
  t("div", null, [
2641
2645
  b(t("nav", null, [
2642
2646
  (r(!0), a(y, null, w(n.sections, (i) => (r(), a("button", {
2643
2647
  key: i.id,
2644
2648
  class: v(["nav-btn", { active: n.activeSection === i.id }]),
2645
- onClick: (c) => o.handleSectionClick(i)
2646
- }, d(i.icon) + " " + d(i.name), 11, En))), 128))
2649
+ onClick: (u) => o.handleSectionClick(i)
2650
+ }, d(i.icon) + " " + d(i.name), 11, qn))), 128))
2647
2651
  ], 512), [
2648
2652
  [B, !n.showReport]
2649
2653
  ]),
2650
- b(t("div", qn, [
2654
+ b(t("div", Nn, [
2651
2655
  b(t("section", {
2652
2656
  class: v(["form-section", { active: n.activeSection === "maintenance" }])
2653
2657
  }, [
2654
2658
  e[37] || (e[37] = t("h2", null, "🛠️ Maintenance Tasks", -1)),
2655
- n.isLoading ? (r(), a("div", Nn, e[27] || (e[27] = [
2659
+ n.isLoading ? (r(), a("div", Mn, e[27] || (e[27] = [
2656
2660
  t("div", { class: "loading-spinner" }, null, -1),
2657
2661
  t("p", null, "Loading checklist...", -1)
2658
2662
  ]))) : p("", !0),
2659
- n.isLoading ? p("", !0) : (r(), a("form", Mn, [
2660
- t("div", Ln, [
2661
- t("div", Vn, [
2663
+ n.isLoading ? p("", !0) : (r(), a("form", Ln, [
2664
+ t("div", Vn, [
2665
+ t("div", On, [
2662
2666
  e[29] || (e[29] = t("h1", null, "Maintenance Checklist", -1)),
2663
2667
  o.showAddTaskButton ? (r(), a("button", {
2664
2668
  key: 0,
@@ -2669,44 +2673,44 @@ function kl(s, e, u, l, n, o) {
2669
2673
  t("i", { class: "fas fa-plus" }, null, -1)
2670
2674
  ]))) : p("", !0)
2671
2675
  ]),
2672
- t("div", On, [
2673
- t("div", Un, " Progress: " + d(o.progress) + "% (" + d(o.completedCount.length) + "/" + d(n.checklists.length) + ") ", 1),
2674
- t("div", jn, [
2676
+ t("div", Un, [
2677
+ t("div", jn, " Progress: " + d(o.progress) + "% (" + d(o.completedCount.length) + "/" + d(n.checklists.length) + ") ", 1),
2678
+ t("div", Bn, [
2675
2679
  t("div", {
2676
2680
  class: "progress-fill",
2677
2681
  style: J({ width: o.progress + "%" })
2678
2682
  }, null, 4)
2679
2683
  ])
2680
2684
  ]),
2681
- t("ul", Bn, [
2685
+ t("ul", Gn, [
2682
2686
  (r(!0), a(y, null, w(n.checklists, (i) => (r(), a("li", {
2683
2687
  key: i.id,
2684
2688
  class: "checklist-item"
2685
2689
  }, [
2686
2690
  t("div", {
2687
2691
  class: v(["checkbox", { checked: i.completed }]),
2688
- onClick: (c) => o.toggleTask(i)
2692
+ onClick: (u) => o.toggleTask(i)
2689
2693
  }, [
2690
- i.completed ? (r(), a("span", zn, "✓")) : p("", !0)
2691
- ], 10, Gn),
2694
+ i.completed ? (r(), a("span", Hn, "✓")) : p("", !0)
2695
+ ], 10, zn),
2692
2696
  t("span", {
2693
2697
  class: v(["task-text", { completed: i.completed }]),
2694
- onClick: (c) => o.toggleTask(i)
2695
- }, d(i.text), 11, Hn),
2698
+ onClick: (u) => o.toggleTask(i)
2699
+ }, d(i.text), 11, Wn),
2696
2700
  o.showAddTaskButton ? (r(), a("button", {
2697
2701
  key: 0,
2698
2702
  class: "delete-btn",
2699
- onClick: (c) => o.deleteTask(i.id),
2703
+ onClick: (u) => o.deleteTask(i.id),
2700
2704
  title: "Delete task"
2701
2705
  }, e[30] || (e[30] = [
2702
2706
  V('<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)
2703
- ]), 8, Wn)) : p("", !0)
2707
+ ]), 8, Qn)) : p("", !0)
2704
2708
  ]))), 128))
2705
2709
  ]),
2706
- n.after ? (r(), a("div", Qn, [
2710
+ n.after ? (r(), a("div", Jn, [
2707
2711
  e[33] || (e[33] = t("label", null, "Upload Image Evidence", -1)),
2708
- t("ul", Jn, [
2709
- t("li", Yn, [
2712
+ t("ul", Yn, [
2713
+ t("li", Zn, [
2710
2714
  e[32] || (e[32] = t("span", { class: "task-text" }, " Image Evidence Already Uploaded ", -1)),
2711
2715
  t("button", {
2712
2716
  type: "button",
@@ -2724,7 +2728,7 @@ function kl(s, e, u, l, n, o) {
2724
2728
  }, [
2725
2729
  e[35] || (e[35] = t("label", null, "Upload Image Evidence", -1)),
2726
2730
  e[36] || (e[36] = t("p", null, "You can only upload one image evidence here.", -1)),
2727
- t("div", Zn, [
2731
+ t("div", Kn, [
2728
2732
  t("p", null, d(n.fileText), 1),
2729
2733
  t("input", {
2730
2734
  type: "file",
@@ -2738,7 +2742,7 @@ function kl(s, e, u, l, n, o) {
2738
2742
  }, "Browse Files", -1))
2739
2743
  ])
2740
2744
  ])),
2741
- o.completedCount === n.checklists.length ? (r(), a("div", Kn, " All tasks completed! ✅ ")) : p("", !0),
2745
+ o.completedCount === n.checklists.length ? (r(), a("div", $n, " All tasks completed! ✅ ")) : p("", !0),
2742
2746
  t("button", {
2743
2747
  class: "reset-button",
2744
2748
  onClick: e[3] || (e[3] = R((...i) => o.resetTasks && o.resetTasks(...i), ["prevent"]))
@@ -2753,7 +2757,7 @@ function kl(s, e, u, l, n, o) {
2753
2757
  }, [
2754
2758
  e[62] || (e[62] = t("h2", null, "📅 Maintenance Schedule", -1)),
2755
2759
  t("form", null, [
2756
- t("div", $n, [
2760
+ t("div", Xn, [
2757
2761
  e[38] || (e[38] = t("label", { for: "task-name" }, "Task Name", -1)),
2758
2762
  b(t("input", {
2759
2763
  type: "text",
@@ -2764,7 +2768,7 @@ function kl(s, e, u, l, n, o) {
2764
2768
  [_, n.form.taskName]
2765
2769
  ])
2766
2770
  ]),
2767
- t("div", Xn, [
2771
+ t("div", eo, [
2768
2772
  e[39] || (e[39] = t("label", { for: "task-description" }, "Description", -1)),
2769
2773
  b(t("textarea", {
2770
2774
  id: "task-description",
@@ -2774,8 +2778,8 @@ function kl(s, e, u, l, n, o) {
2774
2778
  [_, n.form.description]
2775
2779
  ])
2776
2780
  ]),
2777
- t("div", eo, [
2778
- t("div", to, [
2781
+ t("div", to, [
2782
+ t("div", so, [
2779
2783
  e[41] || (e[41] = t("label", { for: "maintenance-type" }, "Maintenance Type", -1)),
2780
2784
  b(t("select", {
2781
2785
  id: "maintenance-type",
@@ -2787,7 +2791,7 @@ function kl(s, e, u, l, n, o) {
2787
2791
  [I, n.form.maintenanceType]
2788
2792
  ])
2789
2793
  ]),
2790
- t("div", so, [
2794
+ t("div", io, [
2791
2795
  e[43] || (e[43] = t("label", { for: "component" }, "Component/System", -1)),
2792
2796
  b(t("select", {
2793
2797
  id: "component",
@@ -2809,8 +2813,8 @@ function kl(s, e, u, l, n, o) {
2809
2813
  ]) : p("", !0)
2810
2814
  ])
2811
2815
  ]),
2812
- t("div", io, [
2813
- t("div", no, [
2816
+ t("div", no, [
2817
+ t("div", oo, [
2814
2818
  e[45] || (e[45] = t("label", { for: "priority" }, "Priority", -1)),
2815
2819
  b(t("select", {
2816
2820
  id: "priority",
@@ -2825,7 +2829,7 @@ function kl(s, e, u, l, n, o) {
2825
2829
  [I, n.form.priority]
2826
2830
  ])
2827
2831
  ]),
2828
- t("div", oo, [
2832
+ t("div", lo, [
2829
2833
  e[46] || (e[46] = t("label", { for: "status" }, "Status", -1)),
2830
2834
  b(t("input", {
2831
2835
  type: "text",
@@ -2837,8 +2841,8 @@ function kl(s, e, u, l, n, o) {
2837
2841
  ])
2838
2842
  ])
2839
2843
  ]),
2840
- t("div", lo, [
2841
- t("div", ro, [
2844
+ t("div", ro, [
2845
+ t("div", ao, [
2842
2846
  e[47] || (e[47] = t("label", { for: "estimated-hours" }, "Estimated Hours", -1)),
2843
2847
  b(t("input", {
2844
2848
  type: "number",
@@ -2851,14 +2855,14 @@ function kl(s, e, u, l, n, o) {
2851
2855
  ])
2852
2856
  ])
2853
2857
  ]),
2854
- t("div", ao, [
2858
+ t("div", co, [
2855
2859
  e[49] || (e[49] = t("label", { for: "assigned-to" }, "Assigned To", -1)),
2856
2860
  b(t("select", {
2857
2861
  id: "assigned-to",
2858
2862
  "onUpdate:modelValue": e[12] || (e[12] = (i) => n.form.assignedTo = i)
2859
2863
  }, [
2860
2864
  e[48] || (e[48] = t("option", { value: "" }, "-- Select Personnel --", -1)),
2861
- (r(!0), a(y, null, w(u.vesselCrew, (i) => (r(), a("option", {
2865
+ (r(!0), a(y, null, w(c.vesselCrew, (i) => (r(), a("option", {
2862
2866
  key: i.id,
2863
2867
  value: `${i.name} - ${i.role}`
2864
2868
  }, d(i.name) + " - " + d(i.role), 9, uo))), 128))
@@ -2866,8 +2870,8 @@ function kl(s, e, u, l, n, o) {
2866
2870
  [I, n.form.assignedTo]
2867
2871
  ])
2868
2872
  ]),
2869
- t("div", co, [
2870
- t("div", mo, [
2873
+ t("div", mo, [
2874
+ t("div", po, [
2871
2875
  e[51] || (e[51] = t("label", { for: "recurrence-type" }, "Recurrence", -1)),
2872
2876
  b(t("select", {
2873
2877
  id: "recurrence-type",
@@ -2880,8 +2884,8 @@ function kl(s, e, u, l, n, o) {
2880
2884
  ])
2881
2885
  ])
2882
2886
  ]),
2883
- t("div", po, [
2884
- t("div", fo, [
2887
+ t("div", fo, [
2888
+ t("div", ho, [
2885
2889
  e[52] || (e[52] = t("label", { for: "last-performed" }, "Last Performed Date", -1)),
2886
2890
  b(t("input", {
2887
2891
  type: "date",
@@ -2891,7 +2895,7 @@ function kl(s, e, u, l, n, o) {
2891
2895
  [_, n.form.lastPerformed]
2892
2896
  ])
2893
2897
  ]),
2894
- t("div", ho, [
2898
+ t("div", vo, [
2895
2899
  e[53] || (e[53] = t("label", { for: "next-due" }, "Due Date", -1)),
2896
2900
  b(t("input", {
2897
2901
  type: "date",
@@ -2903,10 +2907,10 @@ function kl(s, e, u, l, n, o) {
2903
2907
  ])
2904
2908
  ])
2905
2909
  ]),
2906
- t("div", vo, [
2910
+ t("div", go, [
2907
2911
  e[56] || (e[56] = t("label", null, "Notifications", -1)),
2908
- t("div", go, [
2909
- t("div", bo, [
2912
+ t("div", bo, [
2913
+ t("div", yo, [
2910
2914
  b(t("input", {
2911
2915
  type: "checkbox",
2912
2916
  id: "notify-email",
@@ -2916,7 +2920,7 @@ function kl(s, e, u, l, n, o) {
2916
2920
  ]),
2917
2921
  e[54] || (e[54] = t("label", { for: "notify-email" }, "Email Notification", -1))
2918
2922
  ]),
2919
- t("div", yo, [
2923
+ t("div", wo, [
2920
2924
  b(t("input", {
2921
2925
  type: "checkbox",
2922
2926
  id: "notify-sms",
@@ -2928,8 +2932,8 @@ function kl(s, e, u, l, n, o) {
2928
2932
  ])
2929
2933
  ])
2930
2934
  ]),
2931
- t("div", wo, [
2932
- t("div", _o, [
2935
+ t("div", _o, [
2936
+ t("div", ko, [
2933
2937
  e[58] || (e[58] = t("label", { for: "reminder-days" }, "Reminder (Days Before)", -1)),
2934
2938
  b(t("select", {
2935
2939
  id: "reminder-days",
@@ -2941,7 +2945,7 @@ function kl(s, e, u, l, n, o) {
2941
2945
  ])
2942
2946
  ])
2943
2947
  ]),
2944
- t("div", ko, [
2948
+ t("div", Co, [
2945
2949
  e[59] || (e[59] = t("label", { for: "schedule-notes" }, "Notes", -1)),
2946
2950
  b(t("textarea", {
2947
2951
  id: "schedule-notes",
@@ -2950,9 +2954,9 @@ function kl(s, e, u, l, n, o) {
2950
2954
  [_, n.form.notes]
2951
2955
  ])
2952
2956
  ]),
2953
- t("div", Co, [
2957
+ t("div", Fo, [
2954
2958
  e[61] || (e[61] = t("label", null, "Attachments", -1)),
2955
- t("div", Fo, [
2959
+ t("div", Do, [
2956
2960
  t("p", null, d(n.imgText), 1),
2957
2961
  t("input", {
2958
2962
  type: "file",
@@ -2967,13 +2971,13 @@ function kl(s, e, u, l, n, o) {
2967
2971
  }, "Browse Files", -1))
2968
2972
  ])
2969
2973
  ]),
2970
- t("div", Do, [
2974
+ t("div", xo, [
2971
2975
  t("button", {
2972
2976
  type: "button",
2973
2977
  class: "btn btn-primary",
2974
2978
  onClick: e[21] || (e[21] = R((...i) => o.saveSchedule && o.saveSchedule(...i), ["prevent"])),
2975
2979
  disabled: n.isSaving
2976
- }, d(n.isSaving ? "Saving..." : "Save Schedule"), 9, xo)
2980
+ }, d(n.isSaving ? "Saving..." : "Save Schedule"), 9, So)
2977
2981
  ])
2978
2982
  ])
2979
2983
  ], 2), [
@@ -2983,9 +2987,9 @@ function kl(s, e, u, l, n, o) {
2983
2987
  class: v(["form-section", { active: n.activeSection === "inventory" }])
2984
2988
  }, [
2985
2989
  e[68] || (e[68] = t("h2", null, "All Maintenance", -1)),
2986
- t("div", So, [
2987
- t("div", Ro, [
2988
- t("div", To, [
2990
+ t("div", Ro, [
2991
+ t("div", To, [
2992
+ t("div", Ao, [
2989
2993
  t("button", {
2990
2994
  class: v({ active: n.activeFilter === "due" }),
2991
2995
  onClick: e[22] || (e[22] = (i) => o.setFilter("due"))
@@ -3007,7 +3011,7 @@ function kl(s, e, u, l, n, o) {
3007
3011
  ])
3008
3012
  ])
3009
3013
  ]),
3010
- t("table", Ao, [
3014
+ t("table", Po, [
3011
3015
  e[63] || (e[63] = t("thead", null, [
3012
3016
  t("tr", null, [
3013
3017
  t("th", null, "Equipment"),
@@ -3038,23 +3042,23 @@ function kl(s, e, u, l, n, o) {
3038
3042
  t("td", null, [
3039
3043
  i.status === "Completed" ? (r(), a("button", {
3040
3044
  key: 0,
3041
- onClick: (c) => o.printMaintenance(i.component),
3045
+ onClick: (u) => o.printMaintenance(i.component),
3042
3046
  class: "status-action"
3043
- }, "Print", 8, Po)) : (r(), a("button", {
3047
+ }, "Print", 8, Io)) : (r(), a("button", {
3044
3048
  key: 1,
3045
- onClick: (c) => o.showMaintenance(i.component),
3049
+ onClick: (u) => o.showMaintenance(i.component),
3046
3050
  class: "status-action"
3047
- }, "Start", 8, Io))
3051
+ }, "Start", 8, Eo))
3048
3052
  ])
3049
3053
  ]))), 128))
3050
3054
  ])
3051
3055
  ]),
3052
- u.tasks.length ? p("", !0) : (r(), a("div", Eo, [
3053
- t("div", qo, [
3056
+ c.tasks.length ? p("", !0) : (r(), a("div", qo, [
3057
+ t("div", No, [
3054
3058
  e[65] || (e[65] = t("h4", { class: "alert-heading" }, "Such Empty!!!", -1)),
3055
3059
  e[66] || (e[66] = t("p", null, "You have no maintenance, because you have not scheduled any for this ship.", -1)),
3056
3060
  e[67] || (e[67] = t("hr", null, null, -1)),
3057
- t("p", No, [
3061
+ t("p", Mo, [
3058
3062
  e[64] || (e[64] = f("Navigate to the schedule tab, to start scheduling. Or click on this button to ", -1)),
3059
3063
  t("button", {
3060
3064
  type: "button",
@@ -3071,20 +3075,20 @@ function kl(s, e, u, l, n, o) {
3071
3075
  ], 512), [
3072
3076
  [B, !n.showReport]
3073
3077
  ]),
3074
- b(t("div", Mo, [
3078
+ b(t("div", Lo, [
3075
3079
  e[89] || (e[89] = t("div", { class: "header" }, [
3076
3080
  t("div", { class: "report-title" }, "MAINTENANCE TASK REPORT")
3077
3081
  ], -1)),
3078
- t("div", Lo, [
3079
- t("div", Vo, [
3082
+ t("div", Vo, [
3083
+ t("div", Oo, [
3080
3084
  e[69] || (e[69] = t("div", { class: "info-label" }, "Report Generated:", -1)),
3081
3085
  t("div", null, d(n.reportDate), 1)
3082
3086
  ]),
3083
- t("div", Oo, [
3087
+ t("div", Uo, [
3084
3088
  e[70] || (e[70] = t("div", { class: "info-label" }, "Report ID:", -1)),
3085
3089
  t("div", null, d(n.reportId), 1)
3086
3090
  ]),
3087
- t("div", Uo, [
3091
+ t("div", jo, [
3088
3092
  e[71] || (e[71] = t("div", { class: "info-label" }, "Total Tasks:", -1)),
3089
3093
  t("div", null, d(n.maintenanceTasks.length), 1)
3090
3094
  ]),
@@ -3093,111 +3097,111 @@ function kl(s, e, u, l, n, o) {
3093
3097
  t("div", null, "OceanHelm System")
3094
3098
  ], -1))
3095
3099
  ]),
3096
- t("div", jo, [
3100
+ t("div", Bo, [
3097
3101
  e[75] || (e[75] = t("div", { class: "section-title" }, "📊 Task Summary", -1)),
3098
- t("div", Bo, [
3102
+ t("div", Go, [
3099
3103
  e[74] || (e[74] = V('<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)),
3100
- t("div", Go, [
3101
- t("div", zo, d(o.totalEstimatedHours), 1),
3104
+ t("div", zo, [
3105
+ t("div", Ho, d(o.totalEstimatedHours), 1),
3102
3106
  e[73] || (e[73] = t("div", { class: "summary-label" }, "Total Hours", -1))
3103
3107
  ])
3104
3108
  ])
3105
3109
  ]),
3106
- t("div", Ho, [
3110
+ t("div", Wo, [
3107
3111
  e[85] || (e[85] = t("div", { class: "section-title" }, "🔧 Maintenance Tasks", -1)),
3108
3112
  (r(!0), a(y, null, w(n.maintenanceTasks, (i) => (r(), a("div", {
3109
3113
  key: i.taskName,
3110
3114
  class: v(["task-item", o.getTaskStatusClass(i)])
3111
3115
  }, [
3112
- t("div", Wo, [
3116
+ t("div", Qo, [
3113
3117
  t("div", null, [
3114
- t("div", Qo, [
3118
+ t("div", Jo, [
3115
3119
  f(d(i.taskName) + " ", 1),
3116
3120
  t("span", {
3117
3121
  class: v(["maintenance-type", "type-" + i.maintenanceType])
3118
3122
  }, d(i.maintenanceType), 3)
3119
3123
  ]),
3120
- t("div", Jo, "Component: " + d(i.component), 1)
3124
+ t("div", Yo, "Component: " + d(i.component), 1)
3121
3125
  ]),
3122
3126
  t("span", {
3123
3127
  class: v(["status-badge", "status-" + i.status.toLowerCase().replace(" ", "-")])
3124
3128
  }, d(i.status), 3)
3125
3129
  ]),
3126
- t("div", Yo, [
3127
- t("div", Zo, [
3130
+ t("div", Zo, [
3131
+ t("div", Ko, [
3128
3132
  e[76] || (e[76] = t("div", { class: "detail-label" }, "Assigned To", -1)),
3129
- t("div", Ko, d(i.assignedTo), 1)
3133
+ t("div", $o, d(i.assignedTo), 1)
3130
3134
  ]),
3131
- t("div", $o, [
3135
+ t("div", Xo, [
3132
3136
  e[77] || (e[77] = t("div", { class: "detail-label" }, "Estimated Hours", -1)),
3133
- t("div", Xo, d(i.estimatedHours) + " hours", 1)
3137
+ t("div", el, d(i.estimatedHours) + " hours", 1)
3134
3138
  ]),
3135
- t("div", el, [
3139
+ t("div", tl, [
3136
3140
  e[78] || (e[78] = t("div", { class: "detail-label" }, "Last Performed", -1)),
3137
- t("div", tl, d(o.formatDate(i.lastPerformed)), 1)
3141
+ t("div", sl, d(o.formatDate(i.lastPerformed)), 1)
3138
3142
  ]),
3139
- t("div", sl, [
3143
+ t("div", il, [
3140
3144
  e[79] || (e[79] = t("div", { class: "detail-label" }, "Next Due", -1)),
3141
- t("div", il, d(o.formatDate(i.nextDue)), 1)
3145
+ t("div", nl, d(o.formatDate(i.nextDue)), 1)
3142
3146
  ]),
3143
- t("div", nl, [
3147
+ t("div", ol, [
3144
3148
  e[80] || (e[80] = t("div", { class: "detail-label" }, "Recurrence", -1)),
3145
- t("div", ol, d(i.recurrence), 1)
3149
+ t("div", ll, d(i.recurrence), 1)
3146
3150
  ]),
3147
- t("div", ll, [
3151
+ t("div", rl, [
3148
3152
  e[81] || (e[81] = t("div", { class: "detail-label" }, "Remaining Days", -1)),
3149
- t("div", rl, d(i.remainingDays) + " days", 1)
3153
+ t("div", al, d(i.remainingDays) + " days", 1)
3150
3154
  ])
3151
3155
  ]),
3152
- i.description ? (r(), a("div", al, [
3156
+ i.description ? (r(), a("div", dl, [
3153
3157
  e[82] || (e[82] = t("div", { class: "detail-label" }, "Description", -1)),
3154
- t("div", dl, d(i.description), 1)
3158
+ t("div", cl, d(i.description), 1)
3155
3159
  ])) : p("", !0),
3156
3160
  i.notes ? (r(), a("div", ul, [
3157
3161
  e[83] || (e[83] = t("div", { class: "detail-label" }, "Notes", -1)),
3158
- t("div", cl, d(i.notes), 1)
3162
+ t("div", ml, d(i.notes), 1)
3159
3163
  ])) : p("", !0),
3160
- i.checklistProgress && i.checklistProgress.length > 0 ? (r(), a("div", ml, [
3164
+ i.checklistProgress && i.checklistProgress.length > 0 ? (r(), a("div", pl, [
3161
3165
  e[84] || (e[84] = t("div", { class: "detail-label" }, "Checklist Progress", -1)),
3162
- t("div", pl, [
3166
+ t("div", fl, [
3163
3167
  t("div", {
3164
3168
  class: "progress-fill",
3165
3169
  style: J({ width: o.getChecklistProgress(i) + "%" })
3166
3170
  }, null, 4)
3167
3171
  ]),
3168
- t("div", fl, d(o.getCompletedChecklistItems(i)) + " of " + d(i.checklistProgress.length) + " items completed (" + d(o.getChecklistProgress(i)) + "%) ", 1),
3169
- t("div", hl, [
3170
- (r(!0), a(y, null, w(i.checklistProgress, (c, h) => (r(), a("div", {
3172
+ t("div", hl, d(o.getCompletedChecklistItems(i)) + " of " + d(i.checklistProgress.length) + " items completed (" + d(o.getChecklistProgress(i)) + "%) ", 1),
3173
+ t("div", vl, [
3174
+ (r(!0), a(y, null, w(i.checklistProgress, (u, h) => (r(), a("div", {
3171
3175
  key: h,
3172
3176
  class: "checklist-item"
3173
3177
  }, [
3174
- t("span", vl, d(c.completed ? "✅" : "⭕"), 1),
3175
- t("span", null, d(c.text || "Checklist Item " + (h + 1)), 1)
3178
+ t("span", gl, d(u.completed ? "✅" : "⭕"), 1),
3179
+ t("span", null, d(u.text || "Checklist Item " + (h + 1)), 1)
3176
3180
  ]))), 128))
3177
3181
  ])
3178
3182
  ])) : p("", !0)
3179
3183
  ], 2))), 128))
3180
3184
  ]),
3181
- t("div", gl, [
3185
+ t("div", bl, [
3182
3186
  e[86] || (e[86] = t("div", { class: "section-title" }, "📋 Recommendations", -1)),
3183
- t("div", bl, [
3187
+ t("div", yl, [
3184
3188
  t("ul", null, [
3185
3189
  (r(!0), a(y, null, w(o.generateRecommendations(), (i) => (r(), a("li", { key: i }, d(i), 1))), 128))
3186
3190
  ])
3187
3191
  ])
3188
3192
  ]),
3189
- t("div", yl, [
3193
+ t("div", wl, [
3190
3194
  e[88] || (e[88] = t("div", { class: "signature-box" }, [
3191
3195
  t("div", null, [
3192
3196
  t("strong", null, "Report Generated By")
3193
3197
  ]),
3194
3198
  t("div", { style: { "margin-top": "10px", color: "#666" } }, "OceanHelm Maintenance System")
3195
3199
  ], -1)),
3196
- t("div", wl, [
3200
+ t("div", _l, [
3197
3201
  e[87] || (e[87] = t("div", null, [
3198
3202
  t("strong", null, "Date")
3199
3203
  ], -1)),
3200
- t("div", _l, d(n.reportDate), 1)
3204
+ t("div", kl, d(n.reportDate), 1)
3201
3205
  ])
3202
3206
  ])
3203
3207
  ], 512), [
@@ -3206,8 +3210,8 @@ function kl(s, e, u, l, n, o) {
3206
3210
  ])
3207
3211
  ])) : p("", !0);
3208
3212
  }
3209
- const Cl = /* @__PURE__ */ O(Pn, [["render", kl]]);
3210
- const Fl = {
3213
+ const Fl = /* @__PURE__ */ O(In, [["render", Cl]]);
3214
+ const Dl = {
3211
3215
  name: "ActivityLogs",
3212
3216
  props: {
3213
3217
  loading: Boolean,
@@ -3237,31 +3241,31 @@ const Fl = {
3237
3241
  }[s] || "badge-view";
3238
3242
  }
3239
3243
  }
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 = {
3244
+ }, xl = { class: "activity-logs" }, Sl = { class: "a-controls" }, Rl = { class: "a-search-box" }, Tl = ["value"], Al = ["value"], Pl = { class: "stats-grid" }, Il = { class: "stat-card" }, El = { class: "value" }, ql = { class: "stat-card" }, Nl = { class: "value" }, Ml = { class: "stat-card" }, Ll = { class: "value" }, Vl = { class: "logs-container" }, Ol = {
3241
3245
  key: 0,
3242
3246
  class: "loading"
3243
- }, Ol = {
3247
+ }, Ul = {
3244
3248
  key: 1,
3245
3249
  class: "no-logs"
3246
- }, Ul = { key: 2 }, jl = { class: "logs-table" }, Bl = { style: { color: "gray" } }, Gl = { style: { color: "gray" } }, zl = { class: "pagination" }, Hl = ["disabled"], Wl = ["onClick"], Ql = ["disabled"];
3247
- function Jl(s, e, u, l, n, o) {
3248
- return r(), a("div", Dl, [
3249
- t("div", xl, [
3250
- t("div", Sl, [
3250
+ }, jl = { key: 2 }, Bl = { class: "logs-table" }, Gl = { style: { color: "gray" } }, zl = { style: { color: "gray" } }, Hl = { class: "pagination" }, Wl = ["disabled"], Ql = ["onClick"], Jl = ["disabled"];
3251
+ function Yl(s, e, c, l, n, o) {
3252
+ return r(), a("div", xl, [
3253
+ t("div", Sl, [
3254
+ t("div", Rl, [
3251
3255
  t("input", {
3252
3256
  type: "text",
3253
3257
  placeholder: "Search activities, users, or actions...",
3254
- value: u.searchTerm,
3258
+ value: c.searchTerm,
3255
3259
  onInput: e[0] || (e[0] = (i) => s.$emit("update:searchTerm", i.target.value))
3256
- }, null, 40, Rl)
3260
+ }, null, 40, Tl)
3257
3261
  ]),
3258
3262
  t("select", {
3259
3263
  class: "filter-select",
3260
- value: u.selectedFilter,
3264
+ value: c.selectedFilter,
3261
3265
  onChange: e[1] || (e[1] = (i) => s.$emit("update:selectedFilter", i.target.value))
3262
3266
  }, e[6] || (e[6] = [
3263
3267
  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)
3264
- ]), 40, Tl),
3268
+ ]), 40, Al),
3265
3269
  t("button", {
3266
3270
  class: "btn btn-primary",
3267
3271
  onClick: e[2] || (e[2] = (i) => s.$emit("refresh"))
@@ -3271,33 +3275,33 @@ function Jl(s, e, u, l, n, o) {
3271
3275
  onClick: e[3] || (e[3] = (i) => s.$emit("download"))
3272
3276
  }, "📥 Download Report")
3273
3277
  ]),
3274
- t("div", Al, [
3275
- t("div", Pl, [
3278
+ t("div", Pl, [
3279
+ t("div", Il, [
3276
3280
  e[7] || (e[7] = t("h3", null, "Total Activities", -1)),
3277
- t("div", Il, d(u.totalActivities), 1)
3281
+ t("div", El, d(c.totalActivities), 1)
3278
3282
  ]),
3279
- t("div", El, [
3283
+ t("div", ql, [
3280
3284
  e[8] || (e[8] = t("h3", null, "Today's Activities", -1)),
3281
- t("div", ql, d(u.todayActivities), 1)
3285
+ t("div", Nl, d(c.todayActivities), 1)
3282
3286
  ]),
3283
- t("div", Nl, [
3287
+ t("div", Ml, [
3284
3288
  e[9] || (e[9] = t("h3", null, "Active Users", -1)),
3285
- t("div", Ml, d(u.activeUsers), 1)
3289
+ t("div", Ll, d(c.activeUsers), 1)
3286
3290
  ]),
3287
3291
  e[10] || (e[10] = t("div", { class: "stat-card" }, [
3288
3292
  t("h3", null, "Important"),
3289
3293
  t("div", { class: "badge-danger" }, " Logs are deleted at the end of every month, please download a copy ")
3290
3294
  ], -1))
3291
3295
  ]),
3292
- t("div", Ll, [
3293
- u.loading ? (r(), a("div", Vl, e[11] || (e[11] = [
3296
+ t("div", Vl, [
3297
+ c.loading ? (r(), a("div", Ol, e[11] || (e[11] = [
3294
3298
  t("div", { class: "spinner" }, null, -1),
3295
3299
  t("p", null, "Loading activity logs...", -1)
3296
- ]))) : u.logs.length === 0 ? (r(), a("div", Ol, e[12] || (e[12] = [
3300
+ ]))) : c.logs.length === 0 ? (r(), a("div", Ul, e[12] || (e[12] = [
3297
3301
  t("h3", null, "No activities found", -1),
3298
3302
  t("p", null, "Try adjusting your search or filter criteria", -1)
3299
- ]))) : (r(), a("div", Ul, [
3300
- t("table", jl, [
3303
+ ]))) : (r(), a("div", jl, [
3304
+ t("table", Bl, [
3301
3305
  e[13] || (e[13] = t("thead", null, [
3302
3306
  t("tr", null, [
3303
3307
  t("th", null, "Timestamp"),
@@ -3308,13 +3312,13 @@ function Jl(s, e, u, l, n, o) {
3308
3312
  ])
3309
3313
  ], -1)),
3310
3314
  t("tbody", null, [
3311
- (r(!0), a(y, null, w(u.paginatedLogs, (i) => (r(), a("tr", {
3315
+ (r(!0), a(y, null, w(c.paginatedLogs, (i) => (r(), a("tr", {
3312
3316
  key: i.id
3313
3317
  }, [
3314
3318
  t("td", null, d(o.formatDate(i.timestamp)), 1),
3315
3319
  t("td", null, [
3316
3320
  t("div", null, d(i.user_name), 1),
3317
- t("small", Bl, d(i.email), 1)
3321
+ t("small", Gl, d(i.email), 1)
3318
3322
  ]),
3319
3323
  t("td", null, [
3320
3324
  t("span", {
@@ -3323,36 +3327,36 @@ function Jl(s, e, u, l, n, o) {
3323
3327
  ]),
3324
3328
  t("td", null, [
3325
3329
  f(d(i.details.status) + " ", 1),
3326
- (r(!0), a(y, null, w(i.details.information, (c, h) => (r(), a("div", { key: h }, [
3330
+ (r(!0), a(y, null, w(i.details.information, (u, h) => (r(), a("div", { key: h }, [
3327
3331
  t("strong", null, d(h) + ": ", 1),
3328
- t("small", Gl, d((c == null ? void 0 : c.from) ?? "") + " → " + d((c == null ? void 0 : c.to) ?? c ?? ""), 1)
3332
+ t("small", zl, d((u == null ? void 0 : u.from) ?? "") + " → " + d((u == null ? void 0 : u.to) ?? u ?? ""), 1)
3329
3333
  ]))), 128))
3330
3334
  ]),
3331
3335
  t("td", null, d(i.table_name), 1)
3332
3336
  ]))), 128))
3333
3337
  ])
3334
3338
  ]),
3335
- t("div", zl, [
3339
+ t("div", Hl, [
3336
3340
  t("button", {
3337
- onClick: e[4] || (e[4] = (i) => s.$emit("change-page", u.currentPage - 1)),
3338
- disabled: u.currentPage === 1
3339
- }, " Previous ", 8, Hl),
3340
- (r(!0), a(y, null, w(u.totalPages, (i) => (r(), a("button", {
3341
+ onClick: e[4] || (e[4] = (i) => s.$emit("change-page", c.currentPage - 1)),
3342
+ disabled: c.currentPage === 1
3343
+ }, " Previous ", 8, Wl),
3344
+ (r(!0), a(y, null, w(c.totalPages, (i) => (r(), a("button", {
3341
3345
  key: i,
3342
- onClick: (c) => s.$emit("change-page", i),
3343
- class: v({ active: u.currentPage === i })
3344
- }, d(i), 11, Wl))), 128)),
3346
+ onClick: (u) => s.$emit("change-page", i),
3347
+ class: v({ active: c.currentPage === i })
3348
+ }, d(i), 11, Ql))), 128)),
3345
3349
  t("button", {
3346
- onClick: e[5] || (e[5] = (i) => s.$emit("change-page", u.currentPage + 1)),
3347
- disabled: u.currentPage === u.totalPages
3348
- }, " Next ", 8, Ql)
3350
+ onClick: e[5] || (e[5] = (i) => s.$emit("change-page", c.currentPage + 1)),
3351
+ disabled: c.currentPage === c.totalPages
3352
+ }, " Next ", 8, Jl)
3349
3353
  ])
3350
3354
  ]))
3351
3355
  ])
3352
3356
  ]);
3353
3357
  }
3354
- const Yl = /* @__PURE__ */ O(Fl, [["render", Jl]]);
3355
- const Zl = {
3358
+ const Zl = /* @__PURE__ */ O(Dl, [["render", Yl]]);
3359
+ const Kl = {
3356
3360
  name: "CrewManagement",
3357
3361
  props: {
3358
3362
  crew: {
@@ -3460,32 +3464,32 @@ const Zl = {
3460
3464
  return (s) => !s.certifications || s.certifications.length === 0 ? [] : s.certifications.filter((e) => {
3461
3465
  if (!e.verifications || e.verifications.length === 0)
3462
3466
  return !1;
3463
- const u = e.verifications.find(
3467
+ const c = e.verifications.find(
3464
3468
  (l) => l.companyId === this.currentCompanyId
3465
3469
  );
3466
- return u && u.status === "approved";
3470
+ return c && c.status === "approved";
3467
3471
  });
3468
3472
  },
3469
3473
  filteredCrew() {
3470
3474
  return this.crew.filter((s) => {
3471
- const e = this.searchQuery === "" || s.name.toLowerCase().includes(this.searchQuery.toLowerCase()) || s.role.toLowerCase().includes(this.searchQuery.toLowerCase()) || s.vessel && s.vessel.toLowerCase().includes(this.searchQuery.toLowerCase()), u = this.filterStatus === "all" || s.status === this.filterStatus;
3472
- return e && u;
3475
+ const e = this.searchQuery === "" || s.name.toLowerCase().includes(this.searchQuery.toLowerCase()) || s.role.toLowerCase().includes(this.searchQuery.toLowerCase()) || s.vessel && s.vessel.toLowerCase().includes(this.searchQuery.toLowerCase()), c = this.filterStatus === "all" || s.status === this.filterStatus;
3476
+ return e && c;
3473
3477
  });
3474
3478
  },
3475
3479
  allTimesheetEntries() {
3476
3480
  const s = [];
3477
3481
  return this.crew.forEach((e) => {
3478
- e.log && e.log.length > 0 && e.log.forEach((u, l) => {
3482
+ e.log && e.log.length > 0 && e.log.forEach((c, l) => {
3479
3483
  s.push({
3480
- ...u,
3484
+ ...c,
3481
3485
  crewName: e.name,
3482
3486
  role: e.role,
3483
3487
  crewId: e.id,
3484
3488
  uniqueId: `${e.id}-${l}`
3485
3489
  });
3486
3490
  });
3487
- }), s.sort((e, u) => {
3488
- const l = new Date(e.timestamp), n = new Date(u.timestamp);
3491
+ }), s.sort((e, c) => {
3492
+ const l = new Date(e.timestamp), n = new Date(c.timestamp);
3489
3493
  return this.timesheetSortOrder === "desc" ? n - l : l - n;
3490
3494
  });
3491
3495
  },
@@ -3494,7 +3498,7 @@ const Zl = {
3494
3498
  if (this.timesheetFilter !== "all" && (s = s.filter((e) => e.action === this.timesheetFilter)), this.timesheetSearch) {
3495
3499
  const e = this.timesheetSearch.toLowerCase();
3496
3500
  s = s.filter(
3497
- (u) => u.crewName.toLowerCase().includes(e) || u.role.toLowerCase().includes(e) || u.action.toLowerCase().includes(e) || u.vessel && u.vessel.toLowerCase().includes(e) || u.notes && u.notes.toLowerCase().includes(e)
3501
+ (c) => c.crewName.toLowerCase().includes(e) || c.role.toLowerCase().includes(e) || c.action.toLowerCase().includes(e) || c.vessel && c.vessel.toLowerCase().includes(e) || c.notes && c.notes.toLowerCase().includes(e)
3498
3502
  );
3499
3503
  }
3500
3504
  return this.sortTimesheetEntries(s);
@@ -3505,8 +3509,8 @@ const Zl = {
3505
3509
  timesheetDateRange() {
3506
3510
  if (this.filteredTimesheetEntries.length === 0)
3507
3511
  return "N/A";
3508
- const s = this.filteredTimesheetEntries.map((n) => new Date(n.timestamp)), e = new Date(Math.min(...s)), u = new Date(Math.max(...s)), l = (n) => n.toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
3509
- return `${l(e)} - ${l(u)}`;
3512
+ const s = this.filteredTimesheetEntries.map((n) => new Date(n.timestamp)), e = new Date(Math.min(...s)), c = new Date(Math.max(...s)), l = (n) => n.toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
3513
+ return `${l(e)} - ${l(c)}`;
3510
3514
  },
3511
3515
  canAddCrew() {
3512
3516
  return this.config.enableAdd && this.hasPermission("add");
@@ -3569,7 +3573,7 @@ const Zl = {
3569
3573
  },
3570
3574
  methods: {
3571
3575
  hasPermission(s) {
3572
- const { role: e, vessel: u } = this.userProfile, l = u === this.vesselName;
3576
+ const { role: e, vessel: c } = this.userProfile, l = c === this.vesselName;
3573
3577
  let o = {
3574
3578
  owner: ["add", "edit", "delete", "assign", "view"],
3575
3579
  staff: ["add", "edit", "assign", "view"],
@@ -3604,7 +3608,7 @@ const Zl = {
3604
3608
  }
3605
3609
  if (!e || !e.timestamp)
3606
3610
  return "N/A";
3607
- const u = new Date(e.timestamp), n = Math.abs(/* @__PURE__ */ new Date() - u);
3611
+ const c = new Date(e.timestamp), n = Math.abs(/* @__PURE__ */ new Date() - c);
3608
3612
  return Math.floor(n / (1e3 * 60 * 60 * 24));
3609
3613
  },
3610
3614
  /**
@@ -3627,10 +3631,10 @@ const Zl = {
3627
3631
  return !s.certifications || s.certifications.length === 0 ? 0 : s.certifications.filter((e) => {
3628
3632
  if (!e.verifications || e.verifications.length === 0)
3629
3633
  return !0;
3630
- const u = e.verifications.find(
3634
+ const c = e.verifications.find(
3631
3635
  (l) => l.companyId === this.currentCompanyId
3632
3636
  );
3633
- return !u || u.status === "pending";
3637
+ return !c || c.status === "pending";
3634
3638
  }).length;
3635
3639
  },
3636
3640
  /**
@@ -3682,7 +3686,7 @@ const Zl = {
3682
3686
  }
3683
3687
  let e = null;
3684
3688
  if (s.nextShift) {
3685
- const u = new Date(s.nextShift), n = Math.abs(/* @__PURE__ */ new Date() - u);
3689
+ const c = new Date(s.nextShift), n = Math.abs(/* @__PURE__ */ new Date() - c);
3686
3690
  e = Math.ceil(n / (1e3 * 60 * 60 * 24));
3687
3691
  }
3688
3692
  this.$emit("guest-checkout", { member: s, duration: e });
@@ -3716,20 +3720,20 @@ const Zl = {
3716
3720
  },
3717
3721
  sortTimesheetEntries(s) {
3718
3722
  const e = [...s];
3719
- return e.sort((u, l) => {
3723
+ return e.sort((c, l) => {
3720
3724
  let n, o;
3721
3725
  switch (this.timesheetSortKey) {
3722
3726
  case "timestamp":
3723
- n = new Date(u.timestamp), o = new Date(l.timestamp);
3727
+ n = new Date(c.timestamp), o = new Date(l.timestamp);
3724
3728
  break;
3725
3729
  case "crewName":
3726
- n = u.crewName.toLowerCase(), o = l.crewName.toLowerCase();
3730
+ n = c.crewName.toLowerCase(), o = l.crewName.toLowerCase();
3727
3731
  break;
3728
3732
  case "role":
3729
- n = u.role.toLowerCase(), o = l.role.toLowerCase();
3733
+ n = c.role.toLowerCase(), o = l.role.toLowerCase();
3730
3734
  break;
3731
3735
  case "action":
3732
- n = u.action.toLowerCase(), o = l.action.toLowerCase();
3736
+ n = c.action.toLowerCase(), o = l.action.toLowerCase();
3733
3737
  break;
3734
3738
  default:
3735
3739
  return 0;
@@ -3744,27 +3748,27 @@ const Zl = {
3744
3748
  if (!this.validateForm())
3745
3749
  return;
3746
3750
  if (this.newCrew.certifications.some((o) => {
3747
- const i = o.name.trim() !== "", c = o.expiryDate !== "", h = o.imageFile !== null;
3748
- return (i || c || h) && !(i && c && h);
3751
+ const i = o.name.trim() !== "", u = o.expiryDate !== "", h = o.imageFile !== null;
3752
+ return (i || u || h) && !(i && u && h);
3749
3753
  })) {
3750
3754
  this.$emit("incomplete-certification");
3751
3755
  return;
3752
3756
  }
3753
- const e = this.newCrew.certifications.filter((o) => o.name.trim() !== "" && o.expiryDate !== "" && o.imageFile !== null), u = this.newCrew.role === "Other" ? this.newCrew.customRole : this.newCrew.role, l = await Promise.all(
3757
+ const e = this.newCrew.certifications.filter((o) => o.name.trim() !== "" && o.expiryDate !== "" && o.imageFile !== null), c = this.newCrew.role === "Other" ? this.newCrew.customRole : this.newCrew.role, l = await Promise.all(
3754
3758
  e.map(async (o, i) => {
3755
- const c = await this.uploadCertificationImage(o.imageFile, this.newCrew.email);
3759
+ const u = await this.uploadCertificationImage(o.imageFile, this.newCrew.email);
3756
3760
  return {
3757
3761
  name: o.name,
3758
3762
  expiryDate: o.expiryDate,
3759
3763
  imageName: o.imageName,
3760
3764
  imageType: o.imageType,
3761
- imageUrl: c.publicUrl
3765
+ imageUrl: u.publicUrl
3762
3766
  // Add the public URL here
3763
3767
  };
3764
3768
  })
3765
3769
  ), n = {
3766
3770
  name: this.newCrew.name,
3767
- role: u,
3771
+ role: c,
3768
3772
  status: "unavailable",
3769
3773
  certifications: l,
3770
3774
  notes: this.newCrew.notes,
@@ -3777,12 +3781,12 @@ const Zl = {
3777
3781
  },
3778
3782
  // Add this helper method to handle the upload:
3779
3783
  async uploadCertificationImage(s, e) {
3780
- return new Promise((u, l) => {
3784
+ return new Promise((c, l) => {
3781
3785
  this.$emit("upload-cert-image", {
3782
3786
  file: s,
3783
3787
  email: e,
3784
3788
  callback: (n) => {
3785
- n.error ? l(n.error) : u(n);
3789
+ n.error ? l(n.error) : c(n);
3786
3790
  }
3787
3791
  });
3788
3792
  });
@@ -3811,7 +3815,7 @@ const Zl = {
3811
3815
  }
3812
3816
  let e = null;
3813
3817
  if (s.nextShift) {
3814
- const u = new Date(s.nextShift), n = Math.abs(/* @__PURE__ */ new Date() - u);
3818
+ const c = new Date(s.nextShift), n = Math.abs(/* @__PURE__ */ new Date() - c);
3815
3819
  e = Math.ceil(n / (1e3 * 60 * 60 * 24));
3816
3820
  }
3817
3821
  this.$emit("crew-deboard", { member: s, duration: e });
@@ -3884,23 +3888,23 @@ const Zl = {
3884
3888
  this.newCrew.certifications.splice(s, 1);
3885
3889
  },
3886
3890
  handleCertImageUpload(s, e) {
3887
- const u = s.target.files[0];
3888
- if (!u)
3891
+ const c = s.target.files[0];
3892
+ if (!c)
3889
3893
  return;
3890
3894
  const l = this.newCrew.certifications[e];
3891
- if (l.imageFile = u, l.imageName = u.name, l.imageType = u.type.includes("pdf") ? "pdf" : "image", l.imageType === "image") {
3895
+ if (l.imageFile = c, l.imageName = c.name, l.imageType = c.type.includes("pdf") ? "pdf" : "image", l.imageType === "image") {
3892
3896
  const n = new FileReader();
3893
3897
  n.onload = (o) => {
3894
3898
  l.imagePreview = o.target.result;
3895
- }, n.readAsDataURL(u);
3899
+ }, n.readAsDataURL(c);
3896
3900
  } else
3897
3901
  l.imagePreview = "pdf";
3898
3902
  },
3899
3903
  removeCertImage(s) {
3900
3904
  const e = this.newCrew.certifications[s];
3901
3905
  e.imageFile = null, e.imagePreview = null, e.imageName = "", e.imageType = "";
3902
- const u = document.getElementById("cert-image-" + s);
3903
- u && (u.value = "");
3906
+ const c = document.getElementById("cert-image-" + s);
3907
+ c && (c.value = "");
3904
3908
  },
3905
3909
  formatStatus(s) {
3906
3910
  return s ? s.charAt(0).toUpperCase() + s.slice(1) : "";
@@ -3925,8 +3929,8 @@ const Zl = {
3925
3929
  getExpiryStatus(s) {
3926
3930
  if (!s)
3927
3931
  return "none";
3928
- const e = new Date(s), u = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
3929
- return l.setMonth(u.getMonth() + 1), e <= u ? "expired" : e <= l ? "expiringSoon" : "valid";
3932
+ const e = new Date(s), c = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
3933
+ return l.setMonth(c.getMonth() + 1), e <= c ? "expired" : e <= l ? "expiringSoon" : "valid";
3930
3934
  },
3931
3935
  formatLogDate(s) {
3932
3936
  return s ? new Date(s).toLocaleDateString("en-US", {
@@ -3954,92 +3958,92 @@ const Zl = {
3954
3958
  }[s] || "bi bi-circle-fill";
3955
3959
  }
3956
3960
  }
3957
- }, Kl = { class: "crew-management" }, $l = {
3961
+ }, $l = { class: "crew-management" }, Xl = {
3958
3962
  key: 0,
3959
3963
  class: "wave-bg"
3960
- }, Xl = { class: "crew-section" }, er = { class: "crew-section-header" }, tr = { class: "crew-subhead" }, sr = { class: "header-actions" }, ir = {
3964
+ }, er = { class: "crew-section" }, tr = { class: "crew-section-header" }, sr = { class: "crew-subhead" }, ir = { class: "header-actions" }, nr = {
3961
3965
  key: 0,
3962
3966
  class: "personnel-summary"
3963
- }, nr = { class: "summary-header" }, or = { class: "summary-date" }, lr = { class: "summary-cards" }, rr = { class: "summary-card total-card" }, ar = { class: "card-content" }, dr = { class: "card-value" }, ur = { class: "summary-card crew-card" }, cr = { class: "card-content" }, mr = { class: "card-value" }, pr = { class: "summary-card guest-card-summary" }, fr = { class: "card-content" }, hr = { class: "card-value" }, vr = {
3967
+ }, or = { class: "summary-header" }, lr = { class: "summary-date" }, rr = { class: "summary-cards" }, ar = { class: "summary-card total-card" }, dr = { class: "card-content" }, cr = { class: "card-value" }, ur = { class: "summary-card crew-card" }, mr = { class: "card-content" }, pr = { class: "card-value" }, fr = { class: "summary-card guest-card-summary" }, hr = { class: "card-content" }, vr = { class: "card-value" }, gr = {
3964
3968
  key: 0,
3965
3969
  class: "vessel-breakdown"
3966
- }, gr = { class: "vessel-cards" }, br = { class: "vessel-name" }, yr = { class: "vessel-stats" }, wr = { class: "stat-item" }, _r = { class: "stat-value" }, kr = { class: "stat-item" }, Cr = { class: "stat-value" }, Fr = { class: "stat-item total-stat" }, Dr = { class: "stat-value" }, xr = {
3970
+ }, br = { class: "vessel-cards" }, yr = { class: "vessel-name" }, wr = { class: "vessel-stats" }, _r = { class: "stat-item" }, kr = { class: "stat-value" }, Cr = { class: "stat-item" }, Fr = { class: "stat-value" }, Dr = { class: "stat-item total-stat" }, xr = { class: "stat-value" }, Sr = {
3967
3971
  key: 1,
3968
3972
  class: "search-filter"
3969
- }, Sr = {
3973
+ }, Rr = {
3970
3974
  key: 2,
3971
3975
  class: "loading-state"
3972
- }, Rr = {
3976
+ }, Tr = {
3973
3977
  key: 3,
3974
3978
  class: "timesheet-view"
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 = {
3979
+ }, Ar = { class: "timesheet-header" }, Pr = { class: "timesheet-controls" }, Ir = { class: "timesheet-summary" }, Er = { class: "summary-card" }, qr = { class: "summary-value" }, Nr = { class: "summary-card" }, Mr = { class: "summary-value" }, Lr = { class: "summary-card" }, Vr = { class: "summary-value" }, Or = {
3976
3980
  key: 0,
3977
3981
  class: "no-results"
3978
- }, Or = {
3982
+ }, Ur = {
3979
3983
  key: 1,
3980
3984
  class: "timesheet-table-container"
3981
- }, Ur = { class: "timesheet-table" }, jr = { class: "timestamp-cell" }, Br = { class: "crew-name-cell" }, Gr = { class: "role-cell" }, zr = { class: "action-cell" }, Hr = { class: "vessel-cell" }, Wr = { class: "duration-cell" }, Qr = { class: "notes-cell" }, Jr = {
3985
+ }, jr = { class: "timesheet-table" }, Br = { class: "timestamp-cell" }, Gr = { class: "crew-name-cell" }, zr = { class: "role-cell" }, Hr = { class: "action-cell" }, Wr = { class: "vessel-cell" }, Qr = { class: "duration-cell" }, Jr = { class: "notes-cell" }, Yr = {
3982
3986
  key: 4,
3983
3987
  class: "crew-grid"
3984
- }, Yr = { class: "crew-name" }, Zr = { class: "crew-role" }, Kr = {
3988
+ }, Zr = { class: "crew-name" }, Kr = { class: "crew-role" }, $r = {
3985
3989
  key: 0,
3986
3990
  class: "crew-certifications"
3987
- }, $r = ["onClick"], Xr = {
3991
+ }, Xr = ["onClick"], ea = {
3988
3992
  key: 0,
3989
3993
  class: "certification-tag text-muted"
3990
- }, ea = ["onClick"], ta = { key: 1 }, sa = { class: "crew-availability" }, ia = { class: "crew-availability" }, na = { class: "crew-availability" }, oa = { key: 2 }, la = { class: "crew-availability" }, ra = { class: "crew-availability" }, aa = { class: "crew-availability" }, da = { class: "action-buttons" }, ua = {
3994
+ }, ta = ["onClick"], sa = { key: 1 }, ia = { class: "crew-availability" }, na = { class: "crew-availability" }, oa = { class: "crew-availability" }, la = { key: 2 }, ra = { class: "crew-availability" }, aa = { class: "crew-availability" }, da = { class: "crew-availability" }, ca = { class: "action-buttons" }, ua = {
3991
3995
  key: 0,
3992
3996
  class: "status-available crew-availability vcard"
3993
- }, ca = {
3997
+ }, ma = {
3994
3998
  key: 1,
3995
3999
  class: "status-unavailable crew-availability vcard"
3996
- }, ma = ["onClick"], pa = ["onClick"], fa = ["onClick"], ha = ["onClick"], va = { class: "crew-footer" }, ga = {
4000
+ }, pa = ["onClick"], fa = ["onClick"], ha = ["onClick"], va = ["onClick"], ga = { class: "crew-footer" }, ba = {
3997
4001
  key: 0,
3998
4002
  class: "crew-log-toggle"
3999
- }, ba = ["onClick"], ya = ["onClick"], wa = {
4003
+ }, ya = ["onClick"], wa = ["onClick"], _a = {
4000
4004
  key: 3,
4001
4005
  class: "crew-log"
4002
- }, _a = { class: "log-date" }, ka = { class: "log-details" }, Ca = { key: 0 }, Fa = { key: 1 }, Da = {
4006
+ }, ka = { class: "log-date" }, Ca = { class: "log-details" }, Fa = { key: 0 }, Da = { key: 1 }, xa = {
4003
4007
  key: 0,
4004
4008
  class: "log-notes"
4005
- }, xa = {
4009
+ }, Sa = {
4006
4010
  key: 5,
4007
4011
  class: "no-results"
4008
- }, Sa = {
4012
+ }, Ra = {
4009
4013
  key: 6,
4010
4014
  class: "add-crew-form"
4011
- }, Ra = { class: "form-row" }, Ta = { class: "form-group" }, Aa = {
4015
+ }, Ta = { class: "form-row" }, Aa = { class: "form-group" }, Pa = {
4012
4016
  key: 0,
4013
4017
  class: "error-message"
4014
- }, Pa = { class: "form-group" }, Ia = ["value"], Ea = { class: "form-row" }, qa = { class: "form-group" }, Na = {
4018
+ }, Ia = { class: "form-group" }, Ea = ["value"], qa = { class: "form-row" }, Na = { class: "form-group" }, Ma = {
4015
4019
  key: 0,
4016
4020
  class: "error-message"
4017
- }, Ma = { class: "form-row" }, La = { class: "form-group" }, Va = { class: "form-actions" }, Oa = {
4021
+ }, La = { class: "form-row" }, Va = { class: "form-group" }, Oa = { class: "form-actions" }, Ua = {
4018
4022
  key: 7,
4019
4023
  class: "add-crew-form"
4020
- }, Ua = { class: "form-row" }, ja = { class: "form-group" }, Ba = {
4024
+ }, ja = { class: "form-row" }, Ba = { class: "form-group" }, Ga = {
4021
4025
  key: 0,
4022
4026
  class: "error-message"
4023
- }, Ga = { class: "form-group" }, za = {
4027
+ }, za = { class: "form-group" }, Ha = {
4024
4028
  key: 0,
4025
4029
  class: "form-row"
4026
- }, Ha = { class: "form-group" }, Wa = ["value"], Qa = {
4030
+ }, Wa = { class: "form-group" }, Qa = ["value"], Ja = {
4027
4031
  key: 0,
4028
4032
  class: "error-message"
4029
- }, Ja = { class: "form-row" }, Ya = { class: "form-group" }, Za = {
4033
+ }, Ya = { class: "form-row" }, Za = { class: "form-group" }, Ka = {
4030
4034
  key: 0,
4031
4035
  class: "error-message"
4032
- }, Ka = { class: "form-group" }, $a = {
4036
+ }, $a = { class: "form-group" }, Xa = {
4033
4037
  key: 0,
4034
4038
  class: "error-message"
4035
- }, Xa = { class: "form-row" }, ed = { class: "form-group" }, td = { class: "form-actions" };
4036
- function sd(s, e, u, l, n, o) {
4037
- return r(), a("div", Kl, [
4038
- u.config.showWaveBackground ? (r(), a("div", $l)) : p("", !0),
4039
- t("div", Xl, [
4040
- t("div", er, [
4041
- t("h4", tr, d(o.sectionTitle), 1),
4042
- t("div", sr, [
4039
+ }, ed = { class: "form-row" }, td = { class: "form-group" }, sd = { class: "form-actions" };
4040
+ function id(s, e, c, l, n, o) {
4041
+ return r(), a("div", $l, [
4042
+ c.config.showWaveBackground ? (r(), a("div", Xl)) : p("", !0),
4043
+ t("div", er, [
4044
+ t("div", tr, [
4045
+ t("h4", sr, d(o.sectionTitle), 1),
4046
+ t("div", ir, [
4043
4047
  o.canAddCrew ? (r(), a("button", {
4044
4048
  key: 0,
4045
4049
  class: "btn btn-secondary",
@@ -4052,21 +4056,21 @@ function sd(s, e, u, l, n, o) {
4052
4056
  }, d(n.showAddForm ? "Cancel" : "+ Add Crew Member"), 1)) : p("", !0)
4053
4057
  ])
4054
4058
  ]),
4055
- !n.showAddForm && !n.showGuestForm && !n.showTimesheet ? (r(), a("div", ir, [
4056
- t("div", nr, [
4059
+ !n.showAddForm && !n.showGuestForm && !n.showTimesheet ? (r(), a("div", nr, [
4060
+ t("div", or, [
4057
4061
  e[29] || (e[29] = t("h3", null, [
4058
4062
  t("i", { class: "bi bi-people-fill" }),
4059
4063
  f(" Personnel Onboard Summary")
4060
4064
  ], -1)),
4061
- t("div", or, d(o.currentDate), 1)
4065
+ t("div", lr, d(o.currentDate), 1)
4062
4066
  ]),
4063
- t("div", lr, [
4064
- t("div", rr, [
4067
+ t("div", rr, [
4068
+ t("div", ar, [
4065
4069
  e[31] || (e[31] = t("div", { class: "card-icon" }, [
4066
4070
  t("i", { class: "bi bi-people" })
4067
4071
  ], -1)),
4068
- t("div", ar, [
4069
- t("div", dr, d(o.totalOnboard), 1),
4072
+ t("div", dr, [
4073
+ t("div", cr, d(o.totalOnboard), 1),
4070
4074
  e[30] || (e[30] = t("div", { class: "card-label" }, "Total Onboard", -1))
4071
4075
  ])
4072
4076
  ]),
@@ -4074,48 +4078,48 @@ function sd(s, e, u, l, n, o) {
4074
4078
  e[33] || (e[33] = t("div", { class: "card-icon" }, [
4075
4079
  t("i", { class: "bi bi-person-badge" })
4076
4080
  ], -1)),
4077
- t("div", cr, [
4078
- t("div", mr, d(o.crewOnboard), 1),
4081
+ t("div", mr, [
4082
+ t("div", pr, d(o.crewOnboard), 1),
4079
4083
  e[32] || (e[32] = t("div", { class: "card-label" }, "Crew Onboard", -1))
4080
4084
  ])
4081
4085
  ]),
4082
- t("div", pr, [
4086
+ t("div", fr, [
4083
4087
  e[35] || (e[35] = t("div", { class: "card-icon" }, [
4084
4088
  t("i", { class: "bi bi-person-check" })
4085
4089
  ], -1)),
4086
- t("div", fr, [
4087
- t("div", hr, d(o.guestsOnboard), 1),
4090
+ t("div", hr, [
4091
+ t("div", vr, d(o.guestsOnboard), 1),
4088
4092
  e[34] || (e[34] = t("div", { class: "card-label" }, "Guests Onboard", -1))
4089
4093
  ])
4090
4094
  ])
4091
4095
  ]),
4092
- Object.keys(o.personnelByVessel).length > 0 ? (r(), a("div", vr, [
4096
+ Object.keys(o.personnelByVessel).length > 0 ? (r(), a("div", gr, [
4093
4097
  e[39] || (e[39] = t("h4", null, "Breakdown by Vessel", -1)),
4094
- t("div", gr, [
4095
- (r(!0), a(y, null, w(o.personnelByVessel, (i, c) => (r(), a("div", {
4096
- key: c,
4098
+ t("div", br, [
4099
+ (r(!0), a(y, null, w(o.personnelByVessel, (i, u) => (r(), a("div", {
4100
+ key: u,
4097
4101
  class: "vessel-card"
4098
4102
  }, [
4099
- t("div", br, d(c), 1),
4100
- t("div", yr, [
4101
- t("div", wr, [
4103
+ t("div", yr, d(u), 1),
4104
+ t("div", wr, [
4105
+ t("div", _r, [
4102
4106
  e[36] || (e[36] = t("span", { class: "stat-label" }, "Crew:", -1)),
4103
- t("span", _r, d(i.crew), 1)
4107
+ t("span", kr, d(i.crew), 1)
4104
4108
  ]),
4105
- t("div", kr, [
4109
+ t("div", Cr, [
4106
4110
  e[37] || (e[37] = t("span", { class: "stat-label" }, "Guests:", -1)),
4107
- t("span", Cr, d(i.guests), 1)
4111
+ t("span", Fr, d(i.guests), 1)
4108
4112
  ]),
4109
- t("div", Fr, [
4113
+ t("div", Dr, [
4110
4114
  e[38] || (e[38] = t("span", { class: "stat-label" }, "Total:", -1)),
4111
- t("span", Dr, d(i.total), 1)
4115
+ t("span", xr, d(i.total), 1)
4112
4116
  ])
4113
4117
  ])
4114
4118
  ]))), 128))
4115
4119
  ])
4116
4120
  ])) : p("", !0)
4117
4121
  ])) : p("", !0),
4118
- !n.showAddForm && !n.showGuestForm ? (r(), a("div", xr, [
4122
+ !n.showAddForm && !n.showGuestForm ? (r(), a("div", Sr, [
4119
4123
  b(t("input", {
4120
4124
  type: "text",
4121
4125
  placeholder: "Search crew by name or role...",
@@ -4142,7 +4146,7 @@ function sd(s, e, u, l, n, o) {
4142
4146
  f(" " + d(n.showTimesheet ? "Show Crew Cards" : "Show Timesheet"), 1)
4143
4147
  ])
4144
4148
  ])) : p("", !0),
4145
- u.loading && !n.showAddForm && !n.showGuestForm ? (r(), a("div", Sr, e[41] || (e[41] = [
4149
+ c.loading && !n.showAddForm && !n.showGuestForm ? (r(), a("div", Rr, e[41] || (e[41] = [
4146
4150
  t("div", {
4147
4151
  class: "spinner-border text-primary",
4148
4152
  role: "status"
@@ -4150,13 +4154,13 @@ function sd(s, e, u, l, n, o) {
4150
4154
  t("span", { class: "visually-hidden" }, "Loading crew...")
4151
4155
  ], -1),
4152
4156
  t("p", null, "Loading crew members...", -1)
4153
- ]))) : n.showTimesheet && !n.showAddForm && !n.showGuestForm ? (r(), a("div", Rr, [
4154
- t("div", Tr, [
4157
+ ]))) : n.showTimesheet && !n.showAddForm && !n.showGuestForm ? (r(), a("div", Tr, [
4158
+ t("div", Ar, [
4155
4159
  e[43] || (e[43] = t("h3", null, [
4156
4160
  t("i", { class: "bi bi-table" }),
4157
4161
  f(" Crew Activity Timesheet")
4158
4162
  ], -1)),
4159
- t("div", Ar, [
4163
+ t("div", Pr, [
4160
4164
  b(t("select", {
4161
4165
  "onUpdate:modelValue": e[7] || (e[7] = (i) => n.timesheetFilter = i),
4162
4166
  onChange: e[8] || (e[8] = (...i) => o.filterTimesheet && o.filterTimesheet(...i))
@@ -4175,22 +4179,22 @@ function sd(s, e, u, l, n, o) {
4175
4179
  ])
4176
4180
  ])
4177
4181
  ]),
4178
- t("div", Pr, [
4179
- t("div", Ir, [
4182
+ t("div", Ir, [
4183
+ t("div", Er, [
4180
4184
  e[44] || (e[44] = t("span", { class: "summary-label" }, "Total Entries:", -1)),
4181
- t("span", Er, d(o.filteredTimesheetEntries.length), 1)
4185
+ t("span", qr, d(o.filteredTimesheetEntries.length), 1)
4182
4186
  ]),
4183
- t("div", qr, [
4187
+ t("div", Nr, [
4184
4188
  e[45] || (e[45] = t("span", { class: "summary-label" }, "Crew Members:", -1)),
4185
- t("span", Nr, d(o.uniqueCrewCount), 1)
4189
+ t("span", Mr, d(o.uniqueCrewCount), 1)
4186
4190
  ]),
4187
- t("div", Mr, [
4191
+ t("div", Lr, [
4188
4192
  e[46] || (e[46] = t("span", { class: "summary-label" }, "Date Range:", -1)),
4189
- t("span", Lr, d(o.timesheetDateRange), 1)
4193
+ t("span", Vr, d(o.timesheetDateRange), 1)
4190
4194
  ])
4191
4195
  ]),
4192
- o.filteredTimesheetEntries.length === 0 ? (r(), a("div", Vr, " No timesheet entries found. ")) : (r(), a("div", Or, [
4193
- t("table", Ur, [
4196
+ o.filteredTimesheetEntries.length === 0 ? (r(), a("div", Or, " No timesheet entries found. ")) : (r(), a("div", Ur, [
4197
+ t("table", jr, [
4194
4198
  t("thead", null, [
4195
4199
  t("tr", null, [
4196
4200
  t("th", {
@@ -4227,12 +4231,12 @@ function sd(s, e, u, l, n, o) {
4227
4231
  key: i.uniqueId,
4228
4232
  class: v(o.getTimesheetRowClass(i.action))
4229
4233
  }, [
4230
- t("td", jr, d(o.formatLogDate(i.timestamp)), 1),
4231
- t("td", Br, [
4234
+ t("td", Br, d(o.formatLogDate(i.timestamp)), 1),
4235
+ t("td", Gr, [
4232
4236
  t("strong", null, d(i.crewName), 1)
4233
4237
  ]),
4234
- t("td", Gr, d(i.role), 1),
4235
- t("td", zr, [
4238
+ t("td", zr, d(i.role), 1),
4239
+ t("td", Hr, [
4236
4240
  t("span", {
4237
4241
  class: v(["action-badge", o.getLogActionClass(i.action)])
4238
4242
  }, [
@@ -4242,14 +4246,14 @@ function sd(s, e, u, l, n, o) {
4242
4246
  f(" " + d(i.action), 1)
4243
4247
  ], 2)
4244
4248
  ]),
4245
- t("td", Hr, d(i.vessel || "N/A"), 1),
4246
- t("td", Wr, d(i.duration ? i.duration + " days" : "N/A"), 1),
4247
- t("td", Qr, d(i.notes || "-"), 1)
4249
+ t("td", Wr, d(i.vessel || "N/A"), 1),
4250
+ t("td", Qr, d(i.duration ? i.duration + " days" : "N/A"), 1),
4251
+ t("td", Jr, d(i.notes || "-"), 1)
4248
4252
  ], 2))), 128))
4249
4253
  ])
4250
4254
  ])
4251
4255
  ]))
4252
- ])) : o.filteredCrew.length > 0 && !n.showAddForm && !n.showGuestForm ? (r(), a("div", Jr, [
4256
+ ])) : o.filteredCrew.length > 0 && !n.showAddForm && !n.showGuestForm ? (r(), a("div", Yr, [
4253
4257
  (r(!0), a(y, null, w(o.filteredCrew, (i) => (r(), a("div", {
4254
4258
  key: i.id,
4255
4259
  class: v(["crew-card", { unavailable: i.status === "unavailable", "guest-card": i.role === "guest" }])
@@ -4257,120 +4261,120 @@ function sd(s, e, u, l, n, o) {
4257
4261
  t("div", {
4258
4262
  class: v(["crew-status-badge", o.getStatusClass(i.status)])
4259
4263
  }, d(o.formatStatus(i.status)), 3),
4260
- t("div", Yr, d(i.name), 1),
4261
- t("div", Zr, d(i.role === "guest" ? "Guest" : i.role), 1),
4262
- i.role !== "guest" ? (r(), a("div", Kr, [
4263
- (r(!0), a(y, null, w(o.getApprovedCertifications(i), (c) => (r(), a("div", {
4264
- key: c.name,
4265
- class: v(["certification-tag", o.getCertificationClass(c.expiryDate)]),
4266
- onClick: (h) => o.handleViewCertification(c, i)
4267
- }, d(c.name), 11, $r))), 128)),
4268
- o.getPendingCertificationsCount(i) > 0 ? (r(), a("div", Xr, [
4264
+ t("div", Zr, d(i.name), 1),
4265
+ t("div", Kr, d(i.role === "guest" ? "Guest" : i.role), 1),
4266
+ i.role !== "guest" ? (r(), a("div", $r, [
4267
+ (r(!0), a(y, null, w(o.getApprovedCertifications(i), (u) => (r(), a("div", {
4268
+ key: u.name,
4269
+ class: v(["certification-tag", o.getCertificationClass(u.expiryDate)]),
4270
+ onClick: (h) => o.handleViewCertification(u, i)
4271
+ }, d(u.name), 11, Xr))), 128)),
4272
+ o.getPendingCertificationsCount(i) > 0 ? (r(), a("div", ea, [
4269
4273
  e[54] || (e[54] = t("i", { class: "bi bi-clock-history" }, null, -1)),
4270
4274
  f(" " + d(o.getPendingCertificationsCount(i)) + " pending ", 1)
4271
4275
  ])) : p("", !0),
4272
4276
  o.canEditCrew ? (r(), a("i", {
4273
4277
  key: 1,
4274
4278
  class: "bi bi-patch-plus-fill icon",
4275
- onClick: (c) => o.handleAddCertification(i)
4276
- }, null, 8, ea)) : p("", !0)
4279
+ onClick: (u) => o.handleAddCertification(i)
4280
+ }, null, 8, ta)) : p("", !0)
4277
4281
  ])) : p("", !0),
4278
- i.role === "guest" ? (r(), a("div", ta, [
4279
- t("div", sa, [
4282
+ i.role === "guest" ? (r(), a("div", sa, [
4283
+ t("div", ia, [
4280
4284
  e[55] || (e[55] = t("strong", null, "Arrival Date:", -1)),
4281
4285
  f(" " + d(i.nextShift || "Not Recorded"), 1)
4282
4286
  ]),
4283
- t("div", ia, [
4287
+ t("div", na, [
4284
4288
  e[56] || (e[56] = t("strong", null, "Expected Days Onboard:", -1)),
4285
4289
  f(" " + d(i.onBoard || "Not Specified"), 1)
4286
4290
  ]),
4287
- t("div", na, [
4291
+ t("div", oa, [
4288
4292
  e[57] || (e[57] = t("strong", null, "Days Onboard:", -1)),
4289
4293
  f(" " + d(o.getGuestDaysOnboard(i)), 1)
4290
4294
  ])
4291
- ])) : (r(), a("div", oa, [
4292
- t("div", la, [
4295
+ ])) : (r(), a("div", la, [
4296
+ t("div", ra, [
4293
4297
  e[58] || (e[58] = t("strong", null, "Embarkation Date:", -1)),
4294
4298
  f(" " + d(o.getEmbarkationDate(i)), 1)
4295
4299
  ]),
4296
- t("div", ra, [
4300
+ t("div", aa, [
4297
4301
  e[59] || (e[59] = t("strong", null, "Expected Days Onboard:", -1)),
4298
4302
  f(" " + d(i.onBoard || "Not Scheduled"), 1)
4299
4303
  ]),
4300
- t("div", aa, [
4304
+ t("div", da, [
4301
4305
  e[60] || (e[60] = t("strong", null, "Days Onboard:", -1)),
4302
4306
  f(" " + d(o.getDaysOnboard(i)), 1)
4303
4307
  ])
4304
4308
  ])),
4305
- t("div", da, [
4306
- i.vessel ? (r(), a("div", ua, " Vessel: " + d(i.vessel), 1)) : (r(), a("div", ca, " Vessel: Unassigned ")),
4309
+ t("div", ca, [
4310
+ i.vessel ? (r(), a("div", ua, " Vessel: " + d(i.vessel), 1)) : (r(), a("div", ma, " Vessel: Unassigned ")),
4307
4311
  i.role === "guest" && i.status === "onboard" ? (r(), a("button", {
4308
4312
  key: 2,
4309
4313
  class: "btn btn-warning",
4310
- onClick: (c) => o.handleCheckoutGuest(i)
4311
- }, " Check Out ", 8, ma)) : p("", !0),
4314
+ onClick: (u) => o.handleCheckoutGuest(i)
4315
+ }, " Check Out ", 8, pa)) : p("", !0),
4312
4316
  i.role !== "guest" ? (r(), a(y, { key: 3 }, [
4313
4317
  o.canAssignShift && i.status === "available" ? (r(), a("button", {
4314
4318
  key: 0,
4315
4319
  class: "btn btn-primary",
4316
- onClick: (c) => o.handleAssignShift(i)
4317
- }, " Assign Shift ", 8, pa)) : p("", !0),
4320
+ onClick: (u) => o.handleAssignShift(i)
4321
+ }, " Assign Shift ", 8, fa)) : p("", !0),
4318
4322
  o.canDeboardCrew && i.status === "onduty" ? (r(), a("button", {
4319
4323
  key: 1,
4320
4324
  class: "btn btn-success",
4321
- onClick: (c) => o.handleCheckinCrew(i)
4322
- }, " Check In ", 8, fa)) : p("", !0),
4325
+ onClick: (u) => o.handleCheckinCrew(i)
4326
+ }, " Check In ", 8, ha)) : p("", !0),
4323
4327
  o.canDeboardCrew && i.status === "onboard" ? (r(), a("button", {
4324
4328
  key: 2,
4325
4329
  class: "btn btn-warning",
4326
- onClick: (c) => o.handleDeboardCrew(i)
4327
- }, " Deboard ", 8, ha)) : p("", !0)
4330
+ onClick: (u) => o.handleDeboardCrew(i)
4331
+ }, " Deboard ", 8, va)) : p("", !0)
4328
4332
  ], 64)) : p("", !0)
4329
4333
  ]),
4330
- t("div", va, [
4331
- i.log && i.log.length > 0 ? (r(), a("div", ga, [
4334
+ t("div", ga, [
4335
+ i.log && i.log.length > 0 ? (r(), a("div", ba, [
4332
4336
  t("button", {
4333
4337
  class: "btn btn-link btn-sm log-toggle-btn",
4334
- onClick: (c) => o.toggleCrewLog(i.id)
4338
+ onClick: (u) => o.toggleCrewLog(i.id)
4335
4339
  }, [
4336
4340
  e[61] || (e[61] = t("i", { class: "bi bi-clock-history" }, null, -1)),
4337
4341
  f(" View Log (" + d(i.log.length) + ") ", 1)
4338
- ], 8, ba)
4342
+ ], 8, ya)
4339
4343
  ])) : p("", !0),
4340
4344
  o.canDeleteCrew ? (r(), a("i", {
4341
4345
  key: 1,
4342
4346
  class: "bi bi-trash icon delete-icon",
4343
- onClick: (c) => o.handleDeleteCrew(i)
4344
- }, null, 8, ya)) : p("", !0)
4347
+ onClick: (u) => o.handleDeleteCrew(i)
4348
+ }, null, 8, wa)) : p("", !0)
4345
4349
  ]),
4346
- n.expandedLogs.includes(i.id) ? (r(), a("div", wa, [
4350
+ n.expandedLogs.includes(i.id) ? (r(), a("div", _a, [
4347
4351
  e[62] || (e[62] = t("h4", null, "Crew Activity Log", -1)),
4348
- (r(!0), a(y, null, w(i.log, (c, h) => (r(), a("div", {
4352
+ (r(!0), a(y, null, w(i.log, (u, h) => (r(), a("div", {
4349
4353
  key: h,
4350
4354
  class: "log-entry"
4351
4355
  }, [
4352
- t("div", _a, d(o.formatLogDate(c.timestamp)), 1),
4356
+ t("div", ka, d(o.formatLogDate(u.timestamp)), 1),
4353
4357
  t("div", {
4354
- class: v(["log-action", o.getLogActionClass(c.action)])
4358
+ class: v(["log-action", o.getLogActionClass(u.action)])
4355
4359
  }, [
4356
4360
  t("i", {
4357
- class: v(o.getLogIcon(c.action))
4361
+ class: v(o.getLogIcon(u.action))
4358
4362
  }, null, 2),
4359
- f(" " + d(c.action), 1)
4363
+ f(" " + d(u.action), 1)
4360
4364
  ], 2),
4361
- t("div", ka, [
4362
- c.vessel ? (r(), a("span", Ca, "Vessel: " + d(c.vessel), 1)) : p("", !0),
4363
- c.duration ? (r(), a("span", Fa, " | Duration: " + d(c.duration) + " days", 1)) : p("", !0)
4365
+ t("div", Ca, [
4366
+ u.vessel ? (r(), a("span", Fa, "Vessel: " + d(u.vessel), 1)) : p("", !0),
4367
+ u.duration ? (r(), a("span", Da, " | Duration: " + d(u.duration) + " days", 1)) : p("", !0)
4364
4368
  ]),
4365
- c.notes ? (r(), a("div", Da, d(c.notes), 1)) : p("", !0)
4369
+ u.notes ? (r(), a("div", xa, d(u.notes), 1)) : p("", !0)
4366
4370
  ]))), 128))
4367
4371
  ])) : p("", !0)
4368
4372
  ], 2))), 128))
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),
4370
- n.showAddForm ? (r(), a("div", Sa, [
4373
+ ])) : !c.loading && !n.showTimesheet && !n.showAddForm && !n.showGuestForm ? (r(), a("div", Sa, d(c.crew.length === 0 ? "No crew members found." : "No crew members found matching your search criteria."), 1)) : p("", !0),
4374
+ n.showAddForm ? (r(), a("div", Ra, [
4371
4375
  e[68] || (e[68] = t("h2", null, "Add New Crew Member", -1)),
4372
- t("div", Ra, [
4373
- t("div", Ta, [
4376
+ t("div", Ta, [
4377
+ t("div", Aa, [
4374
4378
  e[63] || (e[63] = t("label", { for: "crew-name" }, "Full Name *", -1)),
4375
4379
  b(t("input", {
4376
4380
  type: "text",
@@ -4380,18 +4384,18 @@ function sd(s, e, u, l, n, o) {
4380
4384
  }, null, 2), [
4381
4385
  [_, n.newCrew.name]
4382
4386
  ]),
4383
- n.formErrors.name ? (r(), a("div", Aa, d(n.formErrors.name), 1)) : p("", !0)
4387
+ n.formErrors.name ? (r(), a("div", Pa, d(n.formErrors.name), 1)) : p("", !0)
4384
4388
  ]),
4385
- t("div", Pa, [
4389
+ t("div", Ia, [
4386
4390
  e[65] || (e[65] = t("label", { for: "crew-role" }, "Role/Position *", -1)),
4387
4391
  b(t("select", {
4388
4392
  id: "crew-role",
4389
4393
  "onUpdate:modelValue": e[15] || (e[15] = (i) => n.newCrew.role = i)
4390
4394
  }, [
4391
- (r(!0), a(y, null, w(u.availableRoles, (i) => (r(), a("option", {
4395
+ (r(!0), a(y, null, w(c.availableRoles, (i) => (r(), a("option", {
4392
4396
  key: i,
4393
4397
  value: i
4394
- }, d(i), 9, Ia))), 128)),
4398
+ }, d(i), 9, Ea))), 128)),
4395
4399
  e[64] || (e[64] = t("option", { value: "Other" }, "Other", -1))
4396
4400
  ], 512), [
4397
4401
  [I, n.newCrew.role]
@@ -4407,8 +4411,8 @@ function sd(s, e, u, l, n, o) {
4407
4411
  ]) : p("", !0)
4408
4412
  ])
4409
4413
  ]),
4410
- t("div", Ea, [
4411
- t("div", qa, [
4414
+ t("div", qa, [
4415
+ t("div", Na, [
4412
4416
  e[66] || (e[66] = t("label", { for: "crew-email" }, "Email Address *", -1)),
4413
4417
  b(t("input", {
4414
4418
  type: "email",
@@ -4418,11 +4422,11 @@ function sd(s, e, u, l, n, o) {
4418
4422
  }, null, 2), [
4419
4423
  [_, n.newCrew.email]
4420
4424
  ]),
4421
- n.formErrors.email ? (r(), a("div", Na, d(n.formErrors.email), 1)) : p("", !0)
4425
+ n.formErrors.email ? (r(), a("div", Ma, d(n.formErrors.email), 1)) : p("", !0)
4422
4426
  ])
4423
4427
  ]),
4424
- t("div", Ma, [
4425
- t("div", La, [
4428
+ t("div", La, [
4429
+ t("div", Va, [
4426
4430
  e[67] || (e[67] = t("label", { for: "crew-notes" }, "Notes", -1)),
4427
4431
  b(t("textarea", {
4428
4432
  id: "crew-notes",
@@ -4433,7 +4437,7 @@ function sd(s, e, u, l, n, o) {
4433
4437
  ])
4434
4438
  ])
4435
4439
  ]),
4436
- t("div", Va, [
4440
+ t("div", Oa, [
4437
4441
  t("button", {
4438
4442
  class: "btn btn-secondary",
4439
4443
  onClick: e[19] || (e[19] = (...i) => o.handleCancelForm && o.handleCancelForm(...i))
@@ -4444,10 +4448,10 @@ function sd(s, e, u, l, n, o) {
4444
4448
  }, "Add Crew Member")
4445
4449
  ])
4446
4450
  ])) : p("", !0),
4447
- n.showGuestForm ? (r(), a("div", Oa, [
4451
+ n.showGuestForm ? (r(), a("div", Ua, [
4448
4452
  e[76] || (e[76] = t("h2", null, "Check-in Guest", -1)),
4449
- t("div", Ua, [
4450
- t("div", ja, [
4453
+ t("div", ja, [
4454
+ t("div", Ba, [
4451
4455
  e[69] || (e[69] = t("label", { for: "guest-name" }, "Full Name *", -1)),
4452
4456
  b(t("input", {
4453
4457
  type: "text",
@@ -4457,9 +4461,9 @@ function sd(s, e, u, l, n, o) {
4457
4461
  }, null, 2), [
4458
4462
  [_, n.newGuest.name]
4459
4463
  ]),
4460
- n.guestFormErrors.name ? (r(), a("div", Ba, d(n.guestFormErrors.name), 1)) : p("", !0)
4464
+ n.guestFormErrors.name ? (r(), a("div", Ga, d(n.guestFormErrors.name), 1)) : p("", !0)
4461
4465
  ]),
4462
- t("div", Ga, [
4466
+ t("div", za, [
4463
4467
  e[70] || (e[70] = t("label", { for: "guest-email" }, "Email Address", -1)),
4464
4468
  b(t("input", {
4465
4469
  type: "email",
@@ -4470,8 +4474,8 @@ function sd(s, e, u, l, n, o) {
4470
4474
  ])
4471
4475
  ])
4472
4476
  ]),
4473
- u.vesselName ? p("", !0) : (r(), a("div", za, [
4474
- t("div", Ha, [
4477
+ c.vesselName ? p("", !0) : (r(), a("div", Ha, [
4478
+ t("div", Wa, [
4475
4479
  e[72] || (e[72] = t("label", { for: "guest-vessel" }, "Vessel *", -1)),
4476
4480
  b(t("select", {
4477
4481
  id: "guest-vessel",
@@ -4482,15 +4486,15 @@ function sd(s, e, u, l, n, o) {
4482
4486
  (r(!0), a(y, null, w(o.availableVessels, (i) => (r(), a("option", {
4483
4487
  key: i,
4484
4488
  value: i
4485
- }, d(i), 9, Wa))), 128))
4489
+ }, d(i), 9, Qa))), 128))
4486
4490
  ], 2), [
4487
4491
  [I, n.newGuest.vessel]
4488
4492
  ]),
4489
- n.guestFormErrors.vessel ? (r(), a("div", Qa, d(n.guestFormErrors.vessel), 1)) : p("", !0)
4493
+ n.guestFormErrors.vessel ? (r(), a("div", Ja, d(n.guestFormErrors.vessel), 1)) : p("", !0)
4490
4494
  ])
4491
4495
  ])),
4492
- t("div", Ja, [
4493
- t("div", Ya, [
4496
+ t("div", Ya, [
4497
+ t("div", Za, [
4494
4498
  e[73] || (e[73] = t("label", { for: "guest-arrival" }, "Arrival Date *", -1)),
4495
4499
  b(t("input", {
4496
4500
  type: "date",
@@ -4500,9 +4504,9 @@ function sd(s, e, u, l, n, o) {
4500
4504
  }, null, 2), [
4501
4505
  [_, n.newGuest.arrivalDate]
4502
4506
  ]),
4503
- n.guestFormErrors.arrivalDate ? (r(), a("div", Za, d(n.guestFormErrors.arrivalDate), 1)) : p("", !0)
4507
+ n.guestFormErrors.arrivalDate ? (r(), a("div", Ka, d(n.guestFormErrors.arrivalDate), 1)) : p("", !0)
4504
4508
  ]),
4505
- t("div", Ka, [
4509
+ t("div", $a, [
4506
4510
  e[74] || (e[74] = t("label", { for: "guest-expected-days" }, "Expected Days Onboard *", -1)),
4507
4511
  b(t("input", {
4508
4512
  type: "number",
@@ -4513,11 +4517,11 @@ function sd(s, e, u, l, n, o) {
4513
4517
  }, null, 2), [
4514
4518
  [_, n.newGuest.expectedDays]
4515
4519
  ]),
4516
- n.guestFormErrors.expectedDays ? (r(), a("div", $a, d(n.guestFormErrors.expectedDays), 1)) : p("", !0)
4520
+ n.guestFormErrors.expectedDays ? (r(), a("div", Xa, d(n.guestFormErrors.expectedDays), 1)) : p("", !0)
4517
4521
  ])
4518
4522
  ]),
4519
- t("div", Xa, [
4520
- t("div", ed, [
4523
+ t("div", ed, [
4524
+ t("div", td, [
4521
4525
  e[75] || (e[75] = t("label", { for: "guest-notes" }, "Notes", -1)),
4522
4526
  b(t("textarea", {
4523
4527
  id: "guest-notes",
@@ -4529,7 +4533,7 @@ function sd(s, e, u, l, n, o) {
4529
4533
  ])
4530
4534
  ])
4531
4535
  ]),
4532
- t("div", td, [
4536
+ t("div", sd, [
4533
4537
  t("button", {
4534
4538
  class: "btn btn-secondary",
4535
4539
  onClick: e[27] || (e[27] = (...i) => o.handleCancelGuestForm && o.handleCancelGuestForm(...i))
@@ -4543,8 +4547,8 @@ function sd(s, e, u, l, n, o) {
4543
4547
  ])
4544
4548
  ]);
4545
4549
  }
4546
- const id = /* @__PURE__ */ O(Zl, [["render", sd]]);
4547
- const nd = {
4550
+ const nd = /* @__PURE__ */ O(Kl, [["render", id]]);
4551
+ const od = {
4548
4552
  name: "RequisitionSystem",
4549
4553
  props: {
4550
4554
  userProfile: {
@@ -4661,8 +4665,8 @@ const nd = {
4661
4665
  },
4662
4666
  subTotal() {
4663
4667
  return (this.poDetails.items || []).reduce((s, e) => {
4664
- const u = e.unitPrice || e.cost || 0;
4665
- return s + u * (e.qty || 0);
4668
+ const c = e.unitPrice || e.cost || 0;
4669
+ return s + c * (e.qty || 0);
4666
4670
  }, 0);
4667
4671
  },
4668
4672
  grandTotal() {
@@ -4681,8 +4685,8 @@ const nd = {
4681
4685
  return this.currentItemIndex !== null ? this.poDetails.items[this.currentItemIndex] : null;
4682
4686
  },
4683
4687
  myRequisitions() {
4684
- var e, u;
4685
- const s = ((e = this.userProfile) == null ? void 0 : e.id) || ((u = this.userProfile) == null ? void 0 : u.profile_id);
4688
+ var e, c;
4689
+ const s = ((e = this.userProfile) == null ? void 0 : e.id) || ((c = this.userProfile) == null ? void 0 : c.profile_id);
4686
4690
  return (this.requisitions || []).filter((l) => l.profile_id == s);
4687
4691
  }
4688
4692
  },
@@ -4779,7 +4783,7 @@ const nd = {
4779
4783
  this.$emit("accept-delivery", s);
4780
4784
  },
4781
4785
  collectFormData(s) {
4782
- var e, u, l;
4786
+ var e, c, l;
4783
4787
  return {
4784
4788
  id: "REQ-" + Date.now(),
4785
4789
  requestor: ((e = this.userProfile) == null ? void 0 : e.full_name) || "Unknown",
@@ -4790,7 +4794,7 @@ const nd = {
4790
4794
  items: this.form.items.map((n) => ({ ...n })),
4791
4795
  status: s,
4792
4796
  submittedDate: (/* @__PURE__ */ new Date()).toLocaleDateString(),
4793
- profile_id: ((u = this.userProfile) == null ? void 0 : u.id) || ((l = this.userProfile) == null ? void 0 : l.profile_id)
4797
+ profile_id: ((c = this.userProfile) == null ? void 0 : c.id) || ((l = this.userProfile) == null ? void 0 : l.profile_id)
4794
4798
  };
4795
4799
  },
4796
4800
  resetForm() {
@@ -4822,85 +4826,85 @@ const nd = {
4822
4826
  created() {
4823
4827
  this.addItem();
4824
4828
  }
4825
- }, od = { class: "s-container container" }, ld = { class: "nav-tabs" }, rd = ["onClick"], ad = {
4829
+ }, ld = { class: "s-container container" }, rd = { class: "nav-tabs" }, ad = ["onClick"], dd = {
4826
4830
  key: 0,
4827
4831
  class: "tab-content active"
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 = {
4832
+ }, cd = { class: "form-grid" }, ud = { class: "form-group" }, md = ["value"], pd = { class: "form-group" }, fd = ["value"], hd = { class: "form-group" }, vd = ["value"], gd = { class: "form-group" }, bd = ["min"], yd = { class: "form-group" }, wd = { class: "items-section" }, _d = { class: "items-header" }, kd = { class: "form-group" }, Cd = ["onUpdate:modelValue"], Fd = { class: "form-group" }, Dd = ["onUpdate:modelValue"], xd = { class: "form-group" }, Sd = ["onUpdate:modelValue"], Rd = { class: "form-group" }, Td = ["onUpdate:modelValue"], Ad = ["value"], Pd = { class: "form-group" }, Id = ["onUpdate:modelValue"], Ed = ["onClick"], qd = { class: "action-buttons" }, Nd = ["disabled"], Md = {
4829
4833
  key: 1,
4830
4834
  class: "tab-content active"
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 = {
4835
+ }, Ld = { class: "requisition-list" }, Vd = { class: "requisition-header" }, Od = { class: "requisition-id" }, Ud = { class: "requisition-details" }, jd = { class: "detail-label" }, Bd = { class: "detail-value" }, Gd = {
4832
4836
  key: 0,
4833
4837
  class: "form-group comments-section"
4834
- }, Gd = ["onClick"], zd = {
4838
+ }, zd = ["onClick"], Hd = {
4835
4839
  key: 2,
4836
4840
  class: "tab-content active"
4837
- }, Hd = { class: "requisition-list" }, Wd = { class: "requisition-header" }, Qd = { class: "requisition-id" }, Jd = { class: "requisition-details" }, Yd = { class: "detail-label" }, Zd = { class: "detail-value" }, Kd = {
4841
+ }, Wd = { class: "requisition-list" }, Qd = { class: "requisition-header" }, Jd = { class: "requisition-id" }, Yd = { class: "requisition-details" }, Zd = { class: "detail-label" }, Kd = { class: "detail-value" }, $d = {
4838
4842
  key: 0,
4839
4843
  class: "form-group comments-section"
4840
- }, $d = ["onClick"], Xd = {
4844
+ }, Xd = ["onClick"], ec = {
4841
4845
  key: 3,
4842
4846
  class: "tab-content active"
4843
- }, eu = {
4847
+ }, tc = {
4844
4848
  class: "requisition-list",
4845
4849
  id: "approvalsQueue"
4846
- }, tu = { class: "requisition-header" }, su = { class: "requisition-id" }, iu = { class: "requisition-details" }, nu = { class: "detail-label" }, ou = { class: "detail-value" }, lu = { class: "detail-item" }, ru = { class: "detail-value" }, au = { class: "detail-item" }, du = { class: "item-list" }, uu = ["onClick"], cu = ["onClick"], mu = ["onClick"], pu = {
4850
+ }, sc = { class: "requisition-header" }, ic = { class: "requisition-id" }, nc = { class: "requisition-details" }, oc = { class: "detail-label" }, lc = { class: "detail-value" }, rc = { class: "detail-item" }, ac = { class: "detail-value" }, dc = { class: "detail-item" }, cc = { class: "item-list" }, uc = ["onClick"], mc = ["onClick"], pc = ["onClick"], fc = {
4847
4851
  key: 4,
4848
4852
  class: "tab-content active"
4849
- }, fu = {
4853
+ }, hc = {
4850
4854
  class: "requisition-list",
4851
4855
  id: "purchasingQueue"
4852
- }, hu = { class: "requisition-header" }, vu = { class: "requisition-id" }, gu = { class: "requisition-details" }, bu = { class: "detail-label" }, yu = { class: "detail-value" }, wu = { class: "detail-item" }, _u = { class: "detail-value" }, ku = { class: "detail-item" }, Cu = { class: "item-list" }, Fu = ["onClick"], Du = {
4856
+ }, vc = { class: "requisition-header" }, gc = { class: "requisition-id" }, bc = { class: "requisition-details" }, yc = { class: "detail-label" }, wc = { class: "detail-value" }, _c = { class: "detail-item" }, kc = { class: "detail-value" }, Cc = { class: "detail-item" }, Fc = { class: "item-list" }, Dc = ["onClick"], xc = {
4853
4857
  key: 5,
4854
4858
  class: "tab-content active"
4855
- }, xu = {
4859
+ }, Sc = {
4856
4860
  class: "requisition-list",
4857
4861
  id: "receivingQueue"
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 = {
4862
+ }, Rc = { class: "requisition-header" }, Tc = { class: "requisition-id" }, Ac = { class: "requisition-details" }, Pc = { class: "detail-label" }, Ic = { class: "detail-value" }, Ec = { class: "detail-item" }, qc = { class: "detail-value" }, Nc = { class: "detail-item" }, Mc = { class: "item-list" }, Lc = ["onClick"], Vc = {
4859
4863
  key: 6,
4860
4864
  class: "tab-content active"
4861
- }, Vu = {
4865
+ }, Oc = {
4862
4866
  class: "po-content",
4863
4867
  id: "po-content"
4864
- }, Ou = { class: "po-header" }, Uu = { class: "company-info" }, ju = { class: "info-row" }, Bu = { class: "info-value" }, Gu = { class: "info-row" }, zu = { class: "info-value" }, Hu = { class: "info-row" }, Wu = { class: "info-value" }, Qu = { class: "info-row" }, Ju = { class: "info-label" }, Yu = { class: "info-row" }, Zu = { class: "info-value" }, Ku = { class: "company-info" }, $u = { class: "info-row" }, Xu = { class: "info-value" }, ec = { class: "info-row" }, tc = { class: "info-value" }, sc = { class: "info-row" }, ic = { class: "info-value" }, nc = { class: "info-row" }, oc = { class: "info-value" }, lc = { class: "info-row" }, rc = { class: "info-value" }, ac = { class: "items-section" }, dc = { class: "items-table" }, uc = { key: 0 }, cc = { key: 0 }, mc = {
4868
+ }, Uc = { class: "po-header" }, jc = { class: "company-info" }, Bc = { class: "info-row" }, Gc = { class: "info-value" }, zc = { class: "info-row" }, Hc = { class: "info-value" }, Wc = { class: "info-row" }, Qc = { class: "info-value" }, Jc = { class: "info-row" }, Yc = { class: "info-label" }, Zc = { class: "info-row" }, Kc = { class: "info-value" }, $c = { class: "company-info" }, Xc = { class: "info-row" }, eu = { class: "info-value" }, tu = { class: "info-row" }, su = { class: "info-value" }, iu = { class: "info-row" }, nu = { class: "info-value" }, ou = { class: "info-row" }, lu = { class: "info-value" }, ru = { class: "info-row" }, au = { class: "info-value" }, du = { class: "items-section" }, cu = { class: "items-table" }, uu = { key: 0 }, mu = { key: 0 }, pu = {
4865
4869
  key: 0,
4866
4870
  class: "price-change-indicator"
4867
- }, pc = ["onUpdate:modelValue"], fc = { key: 0 }, hc = ["onClick"], vc = { key: 1 }, gc = ["onClick"], bc = ["onClick"], yc = {
4871
+ }, fu = ["onUpdate:modelValue"], hu = { key: 0 }, vu = ["onClick"], gu = { key: 1 }, bu = ["onClick"], yu = ["onClick"], wu = {
4868
4872
  key: 0,
4869
4873
  class: "justification-note"
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 = {
4874
+ }, _u = { class: "totals" }, ku = { class: "total-row" }, Cu = { class: "total-row" }, Fu = { class: "total-row" }, Du = { class: "total-row grand-total" }, xu = { class: "modal-content" }, Su = { style: { "margin-bottom": "15px", color: "#666" } }, Ru = { class: "modal-buttons" }, Tu = ["disabled"], Au = {
4871
4875
  key: 7,
4872
4876
  class: "tab-content active"
4873
4877
  };
4874
- function Ac(s, e, u, l, n, o) {
4875
- var i, c, h, x, E, T, N, M, q, k, F, A, P;
4876
- return r(), a("div", od, [
4878
+ function Pu(s, e, c, l, n, o) {
4879
+ var i, u, h, x, E, T, N, M, q, k, F, A, P;
4880
+ return r(), a("div", ld, [
4877
4881
  e[60] || (e[60] = t("div", { class: "header" }, [
4878
4882
  t("h1", null, "OceanHelm Requisition System"),
4879
4883
  t("p", null, "Streamlined Material Request & Ordering Process")
4880
4884
  ], -1)),
4881
- t("div", ld, [
4885
+ t("div", rd, [
4882
4886
  (r(!0), a(y, null, w(o.visibleTabs, (m) => (r(), a("button", {
4883
4887
  key: m.name,
4884
4888
  class: v(["nav-tab", { active: n.activeTab === m.name }]),
4885
4889
  onClick: (g) => o.setActiveTab(m.name)
4886
- }, d(m.label), 11, rd))), 128))
4890
+ }, d(m.label), 11, ad))), 128))
4887
4891
  ]),
4888
- n.activeTab === "new-requisition" ? (r(), a("div", ad, [
4892
+ n.activeTab === "new-requisition" ? (r(), a("div", dd, [
4889
4893
  t("form", {
4890
4894
  onSubmit: e[5] || (e[5] = R((...m) => o.handleSubmitRequisition && o.handleSubmitRequisition(...m), ["prevent"]))
4891
4895
  }, [
4892
- t("div", dd, [
4896
+ t("div", cd, [
4893
4897
  t("div", ud, [
4894
4898
  e[12] || (e[12] = t("label", null, "Requestor Name *", -1)),
4895
4899
  t("input", {
4896
4900
  type: "text",
4897
- value: (i = u.userProfile) == null ? void 0 : i.full_name,
4901
+ value: (i = c.userProfile) == null ? void 0 : i.full_name,
4898
4902
  readonly: "",
4899
4903
  required: "",
4900
4904
  class: "form-control"
4901
- }, null, 8, cd)
4905
+ }, null, 8, md)
4902
4906
  ]),
4903
- t("div", md, [
4907
+ t("div", pd, [
4904
4908
  e[14] || (e[14] = t("label", null, "Department *", -1)),
4905
4909
  b(t("select", {
4906
4910
  "onUpdate:modelValue": e[0] || (e[0] = (m) => n.form.department = m),
@@ -4910,12 +4914,12 @@ function Ac(s, e, u, l, n, o) {
4910
4914
  (r(!0), a(y, null, w(n.departments, (m) => (r(), a("option", {
4911
4915
  key: m,
4912
4916
  value: m
4913
- }, d(m), 9, pd))), 128))
4917
+ }, d(m), 9, fd))), 128))
4914
4918
  ], 512), [
4915
4919
  [I, n.form.department]
4916
4920
  ])
4917
4921
  ]),
4918
- t("div", fd, [
4922
+ t("div", hd, [
4919
4923
  e[16] || (e[16] = t("label", null, "Vessel *", -1)),
4920
4924
  b(t("select", {
4921
4925
  "onUpdate:modelValue": e[1] || (e[1] = (m) => n.form.project = m),
@@ -4926,27 +4930,27 @@ function Ac(s, e, u, l, n, o) {
4926
4930
  disabled: "",
4927
4931
  value: ""
4928
4932
  }, "Select a vessel", -1)),
4929
- (r(!0), a(y, null, w(u.vessels, (m) => (r(), a("option", {
4933
+ (r(!0), a(y, null, w(c.vessels, (m) => (r(), a("option", {
4930
4934
  key: m.id,
4931
4935
  value: m.name
4932
- }, d(m.name), 9, hd))), 128))
4936
+ }, d(m.name), 9, vd))), 128))
4933
4937
  ], 512), [
4934
4938
  [I, n.form.project]
4935
4939
  ])
4936
4940
  ]),
4937
- t("div", vd, [
4941
+ t("div", gd, [
4938
4942
  e[17] || (e[17] = t("label", null, "Date Needed *", -1)),
4939
4943
  b(t("input", {
4940
4944
  type: "date",
4941
4945
  "onUpdate:modelValue": e[2] || (e[2] = (m) => n.form.neededDate = m),
4942
4946
  min: o.today,
4943
4947
  required: ""
4944
- }, null, 8, gd), [
4948
+ }, null, 8, bd), [
4945
4949
  [_, n.form.neededDate]
4946
4950
  ])
4947
4951
  ])
4948
4952
  ]),
4949
- t("div", bd, [
4953
+ t("div", yd, [
4950
4954
  e[18] || (e[18] = t("label", null, "Business Justification *", -1)),
4951
4955
  b(t("textarea", {
4952
4956
  "onUpdate:modelValue": e[3] || (e[3] = (m) => n.form.justification = m),
@@ -4956,8 +4960,8 @@ function Ac(s, e, u, l, n, o) {
4956
4960
  [_, n.form.justification]
4957
4961
  ])
4958
4962
  ]),
4959
- t("div", yd, [
4960
- t("div", wd, [
4963
+ t("div", wd, [
4964
+ t("div", _d, [
4961
4965
  e[19] || (e[19] = t("h3", null, "Requested Items", -1)),
4962
4966
  t("button", {
4963
4967
  type: "button",
@@ -4970,34 +4974,34 @@ function Ac(s, e, u, l, n, o) {
4970
4974
  key: g,
4971
4975
  class: "item-row"
4972
4976
  }, [
4973
- t("div", _d, [
4977
+ t("div", kd, [
4974
4978
  e[20] || (e[20] = t("label", null, "Item Code *", -1)),
4975
4979
  b(t("input", {
4976
4980
  type: "text",
4977
4981
  "onUpdate:modelValue": (D) => m.id = D,
4978
4982
  required: ""
4979
- }, null, 8, kd), [
4983
+ }, null, 8, Cd), [
4980
4984
  [_, m.id]
4981
4985
  ])
4982
4986
  ]),
4983
- t("div", Cd, [
4987
+ t("div", Fd, [
4984
4988
  e[21] || (e[21] = t("label", null, "Item Description *", -1)),
4985
4989
  b(t("input", {
4986
4990
  type: "text",
4987
4991
  "onUpdate:modelValue": (D) => m.desc = D,
4988
4992
  required: ""
4989
- }, null, 8, Fd), [
4993
+ }, null, 8, Dd), [
4990
4994
  [_, m.desc]
4991
4995
  ])
4992
4996
  ]),
4993
- t("div", Dd, [
4997
+ t("div", xd, [
4994
4998
  e[22] || (e[22] = t("label", null, "Quantity *", -1)),
4995
4999
  b(t("input", {
4996
5000
  type: "number",
4997
5001
  "onUpdate:modelValue": (D) => m.qty = D,
4998
5002
  min: "1",
4999
5003
  required: ""
5000
- }, null, 8, xd), [
5004
+ }, null, 8, Sd), [
5001
5005
  [
5002
5006
  _,
5003
5007
  m.qty,
@@ -5006,7 +5010,7 @@ function Ac(s, e, u, l, n, o) {
5006
5010
  ]
5007
5011
  ])
5008
5012
  ]),
5009
- t("div", Sd, [
5013
+ t("div", Rd, [
5010
5014
  e[23] || (e[23] = t("label", null, "Unit *", -1)),
5011
5015
  b(t("select", {
5012
5016
  "onUpdate:modelValue": (D) => m.unit = D,
@@ -5015,12 +5019,12 @@ function Ac(s, e, u, l, n, o) {
5015
5019
  (r(!0), a(y, null, w(n.units, (D) => (r(), a("option", {
5016
5020
  key: D,
5017
5021
  value: D
5018
- }, d(D), 9, Td))), 128))
5019
- ], 8, Rd), [
5022
+ }, d(D), 9, Ad))), 128))
5023
+ ], 8, Td), [
5020
5024
  [I, m.unit]
5021
5025
  ])
5022
5026
  ]),
5023
- t("div", Ad, [
5027
+ t("div", Pd, [
5024
5028
  e[24] || (e[24] = t("label", null, "Est. Unit Cost *", -1)),
5025
5029
  b(t("input", {
5026
5030
  type: "number",
@@ -5029,7 +5033,7 @@ function Ac(s, e, u, l, n, o) {
5029
5033
  min: "0",
5030
5034
  placeholder: "0.00",
5031
5035
  required: ""
5032
- }, null, 8, Pd), [
5036
+ }, null, 8, Id), [
5033
5037
  [
5034
5038
  _,
5035
5039
  m.cost,
@@ -5042,71 +5046,71 @@ function Ac(s, e, u, l, n, o) {
5042
5046
  type: "button",
5043
5047
  class: "remove-item-btn",
5044
5048
  onClick: (D) => o.removeItem(g)
5045
- }, "Remove", 8, Id)
5049
+ }, "Remove", 8, Ed)
5046
5050
  ]))), 128))
5047
5051
  ])
5048
5052
  ]),
5049
- t("div", Ed, [
5053
+ t("div", qd, [
5050
5054
  t("button", {
5051
5055
  type: "submit",
5052
5056
  class: "btn btn-primary-req",
5053
5057
  disabled: n.isSubmitting
5054
- }, d(n.isSubmitting ? "Submitting..." : "Submit Requisition"), 9, qd)
5058
+ }, d(n.isSubmitting ? "Submitting..." : "Submit Requisition"), 9, Nd)
5055
5059
  ])
5056
5060
  ], 32)
5057
5061
  ])) : p("", !0),
5058
- n.activeTab === "all-requisitions" ? (r(), a("div", Nd, [
5059
- t("div", Md, [
5060
- (r(!0), a(y, null, w(u.requisitions, (m) => (r(), a("div", {
5062
+ n.activeTab === "all-requisitions" ? (r(), a("div", Md, [
5063
+ t("div", Ld, [
5064
+ (r(!0), a(y, null, w(c.requisitions, (m) => (r(), a("div", {
5061
5065
  key: m.id,
5062
5066
  class: "requisition-card"
5063
5067
  }, [
5064
- t("div", Ld, [
5065
- t("div", Vd, d(m.id), 1),
5068
+ t("div", Vd, [
5069
+ t("div", Od, d(m.id), 1),
5066
5070
  t("div", {
5067
5071
  class: v(["status-badge", `status-${m.status}`])
5068
5072
  }, d(m.status), 3)
5069
5073
  ]),
5070
- t("div", Od, [
5074
+ t("div", Ud, [
5071
5075
  (r(!0), a(y, null, w(o.getRequisitionFields(m), (g) => (r(), a("div", {
5072
5076
  class: "detail-item",
5073
5077
  key: g.label
5074
5078
  }, [
5075
- t("div", Ud, d(g.label), 1),
5076
- t("div", jd, d(g.value(m)), 1)
5079
+ t("div", jd, d(g.label), 1),
5080
+ t("div", Bd, d(g.value(m)), 1)
5077
5081
  ]))), 128))
5078
5082
  ]),
5079
- m.status === "po-created" || m.status === "delivered" ? (r(), a("div", Bd, [
5083
+ m.status === "po-created" || m.status === "delivered" ? (r(), a("div", Gd, [
5080
5084
  t("button", {
5081
5085
  onClick: (g) => o.handleOpenPO(m.id),
5082
5086
  class: "add-item-btn comments-section"
5083
- }, " Print PO ", 8, Gd)
5087
+ }, " Print PO ", 8, zd)
5084
5088
  ])) : p("", !0)
5085
5089
  ]))), 128))
5086
5090
  ])
5087
5091
  ])) : p("", !0),
5088
- n.activeTab === "my-requisitions" ? (r(), a("div", zd, [
5089
- t("div", Hd, [
5092
+ n.activeTab === "my-requisitions" ? (r(), a("div", Hd, [
5093
+ t("div", Wd, [
5090
5094
  (r(!0), a(y, null, w(o.myRequisitions, (m) => (r(), a("div", {
5091
5095
  key: m.id,
5092
5096
  class: "requisition-card"
5093
5097
  }, [
5094
- t("div", Wd, [
5095
- t("div", Qd, d(m.id), 1),
5098
+ t("div", Qd, [
5099
+ t("div", Jd, d(m.id), 1),
5096
5100
  t("div", {
5097
5101
  class: v(["status-badge", `status-${m.status}`])
5098
5102
  }, d(m.status), 3)
5099
5103
  ]),
5100
- t("div", Jd, [
5104
+ t("div", Yd, [
5101
5105
  (r(!0), a(y, null, w(o.getRequisitionFields(m), (g) => (r(), a("div", {
5102
5106
  class: "detail-item",
5103
5107
  key: g.label
5104
5108
  }, [
5105
- t("div", Yd, d(g.label), 1),
5106
- t("div", Zd, d(g.value(m)), 1)
5109
+ t("div", Zd, d(g.label), 1),
5110
+ t("div", Kd, d(g.value(m)), 1)
5107
5111
  ]))), 128))
5108
5112
  ]),
5109
- m.status === "info-requested" ? (r(), a("div", Kd, [
5113
+ m.status === "info-requested" ? (r(), a("div", $d, [
5110
5114
  e[25] || (e[25] = t("label", { class: "detail-label" }, "Your Response", -1)),
5111
5115
  b(t("textarea", {
5112
5116
  "onUpdate:modelValue": e[6] || (e[6] = (g) => n.infoResponse = g),
@@ -5118,12 +5122,12 @@ function Ac(s, e, u, l, n, o) {
5118
5122
  t("button", {
5119
5123
  onClick: (g) => o.handleSubmitInfoResponse(m),
5120
5124
  class: "add-item-btn comments-section"
5121
- }, " Submit Info ", 8, $d)
5125
+ }, " Submit Info ", 8, Xd)
5122
5126
  ])) : p("", !0)
5123
5127
  ]))), 128))
5124
5128
  ])
5125
5129
  ])) : p("", !0),
5126
- n.activeTab === "approvals" ? (r(), a("div", Xd, [
5130
+ n.activeTab === "approvals" ? (r(), a("div", ec, [
5127
5131
  e[28] || (e[28] = t("div", { style: { "margin-bottom": "20px" } }, [
5128
5132
  t("h3", { style: { color: "#1e40af", "margin-bottom": "15px" } }, "Department Supervisor Dashboard"),
5129
5133
  t("div", { style: { background: "#fef3c7", padding: "15px", "border-radius": "10px", "border-left": "4px solid #f59e0b" } }, [
@@ -5131,30 +5135,30 @@ function Ac(s, e, u, l, n, o) {
5131
5135
  f(" Department Supervisor - Review requests for accuracy, necessity, and budget compliance ")
5132
5136
  ])
5133
5137
  ], -1)),
5134
- t("div", eu, [
5138
+ t("div", tc, [
5135
5139
  (r(!0), a(y, null, w(o.reviewRequisitions, (m) => (r(), a("div", {
5136
5140
  key: m.id,
5137
5141
  class: "requisition-card"
5138
5142
  }, [
5139
- t("div", tu, [
5140
- t("div", su, d(m.id), 1)
5143
+ t("div", sc, [
5144
+ t("div", ic, d(m.id), 1)
5141
5145
  ]),
5142
- t("div", iu, [
5146
+ t("div", nc, [
5143
5147
  (r(!0), a(y, null, w(n.requisitionFields, (g) => (r(), a("div", {
5144
5148
  class: "detail-item",
5145
5149
  key: g.label
5146
5150
  }, [
5147
- t("div", nu, d(g.label), 1),
5148
- t("div", ou, d(g.value(m)), 1)
5151
+ t("div", oc, d(g.label), 1),
5152
+ t("div", lc, d(g.value(m)), 1)
5149
5153
  ]))), 128))
5150
5154
  ]),
5151
- t("div", lu, [
5155
+ t("div", rc, [
5152
5156
  e[26] || (e[26] = t("div", { class: "detail-label" }, "Justification", -1)),
5153
- t("div", ru, d(m.justification || "N/A"), 1)
5157
+ t("div", ac, d(m.justification || "N/A"), 1)
5154
5158
  ]),
5155
- t("div", au, [
5159
+ t("div", dc, [
5156
5160
  e[27] || (e[27] = t("div", { class: "detail-label" }, "Items", -1)),
5157
- t("ul", du, [
5161
+ t("ul", cc, [
5158
5162
  (r(!0), a(y, null, w(m.items, (g, D) => (r(), a("li", { key: D }, d(g.desc) + " - " + d(g.qty) + " " + d(g.unit) + " @ ₦" + d(g.cost.toFixed(2)) + " each ", 1))), 128))
5159
5163
  ])
5160
5164
  ]),
@@ -5162,21 +5166,21 @@ function Ac(s, e, u, l, n, o) {
5162
5166
  type: "button",
5163
5167
  class: "add-item-btn",
5164
5168
  onClick: (g) => o.handleApproveRequisition(m.id)
5165
- }, "Approve", 8, uu),
5169
+ }, "Approve", 8, uc),
5166
5170
  t("button", {
5167
5171
  type: "button",
5168
5172
  class: "marginbox btn-reject",
5169
5173
  onClick: (g) => o.handleDeclineRequisition(m.id)
5170
- }, "Decline", 8, cu),
5174
+ }, "Decline", 8, mc),
5171
5175
  t("button", {
5172
5176
  type: "button",
5173
5177
  class: "marginbox btn-request",
5174
5178
  onClick: (g) => o.handleInfoRequisition(m.id)
5175
- }, "Request Info", 8, mu)
5179
+ }, "Request Info", 8, pc)
5176
5180
  ]))), 128))
5177
5181
  ])
5178
5182
  ])) : p("", !0),
5179
- n.activeTab === "purchasing" ? (r(), a("div", pu, [
5183
+ n.activeTab === "purchasing" ? (r(), a("div", fc, [
5180
5184
  e[31] || (e[31] = t("div", { style: { "margin-bottom": "20px" } }, [
5181
5185
  t("h3", { style: { color: "#1e40af", "margin-bottom": "15px" } }, "Purchasing Department Dashboard"),
5182
5186
  t("div", { style: { background: "#dbeafe", padding: "15px", "border-radius": "10px", "border-left": "4px solid #3b82f6" } }, [
@@ -5184,30 +5188,30 @@ function Ac(s, e, u, l, n, o) {
5184
5188
  f(" Purchasing Team - Convert approved requisitions to Purchase Orders ")
5185
5189
  ])
5186
5190
  ], -1)),
5187
- t("div", fu, [
5191
+ t("div", hc, [
5188
5192
  (r(!0), a(y, null, w(o.poRequisitions, (m) => (r(), a("div", {
5189
5193
  key: m.id,
5190
5194
  class: "requisition-card"
5191
5195
  }, [
5192
- t("div", hu, [
5193
- t("div", vu, d(m.id), 1)
5196
+ t("div", vc, [
5197
+ t("div", gc, d(m.id), 1)
5194
5198
  ]),
5195
- t("div", gu, [
5199
+ t("div", bc, [
5196
5200
  (r(!0), a(y, null, w(n.requisitionFields, (g) => (r(), a("div", {
5197
5201
  class: "detail-item",
5198
5202
  key: g.label
5199
5203
  }, [
5200
- t("div", bu, d(g.label), 1),
5201
- t("div", yu, d(g.value(m)), 1)
5204
+ t("div", yc, d(g.label), 1),
5205
+ t("div", wc, d(g.value(m)), 1)
5202
5206
  ]))), 128))
5203
5207
  ]),
5204
- t("div", wu, [
5208
+ t("div", _c, [
5205
5209
  e[29] || (e[29] = t("div", { class: "detail-label" }, "Justification", -1)),
5206
- t("div", _u, d(m.justification || "N/A"), 1)
5210
+ t("div", kc, d(m.justification || "N/A"), 1)
5207
5211
  ]),
5208
- t("div", ku, [
5212
+ t("div", Cc, [
5209
5213
  e[30] || (e[30] = t("div", { class: "detail-label" }, "Items", -1)),
5210
- t("ul", Cu, [
5214
+ t("ul", Fc, [
5211
5215
  (r(!0), a(y, null, w(m.items, (g, D) => (r(), a("li", { key: D }, d(g.desc) + " - " + d(g.qty) + " " + d(g.unit) + " @ ₦" + d(g.cost.toFixed(2)) + " each ", 1))), 128))
5212
5216
  ])
5213
5217
  ]),
@@ -5215,11 +5219,11 @@ function Ac(s, e, u, l, n, o) {
5215
5219
  type: "button",
5216
5220
  class: "add-item-btn",
5217
5221
  onClick: (g) => o.handleCreatePO(m.id)
5218
- }, "Create PO", 8, Fu)
5222
+ }, "Create PO", 8, Dc)
5219
5223
  ]))), 128))
5220
5224
  ])
5221
5225
  ])) : p("", !0),
5222
- n.activeTab === "receiving" ? (r(), a("div", Du, [
5226
+ n.activeTab === "receiving" ? (r(), a("div", xc, [
5223
5227
  e[34] || (e[34] = t("div", { style: { "margin-bottom": "20px" } }, [
5224
5228
  t("h3", { style: { color: "#1e40af", "margin-bottom": "15px" } }, "Receiving & Inventory Dashboard"),
5225
5229
  t("div", { style: { background: "#dcfce7", padding: "15px", "border-radius": "10px", "border-left": "4px solid #10b981" } }, [
@@ -5227,30 +5231,30 @@ function Ac(s, e, u, l, n, o) {
5227
5231
  f(" Warehouse Team - Process incoming deliveries and update inventory ")
5228
5232
  ])
5229
5233
  ], -1)),
5230
- t("div", xu, [
5234
+ t("div", Sc, [
5231
5235
  (r(!0), a(y, null, w(o.awaitingDelivery, (m) => (r(), a("div", {
5232
5236
  key: m.id,
5233
5237
  class: "requisition-card"
5234
5238
  }, [
5235
- t("div", Su, [
5236
- t("div", Ru, d(m.id), 1)
5239
+ t("div", Rc, [
5240
+ t("div", Tc, d(m.id), 1)
5237
5241
  ]),
5238
- t("div", Tu, [
5242
+ t("div", Ac, [
5239
5243
  (r(!0), a(y, null, w(n.requisitionFields, (g) => (r(), a("div", {
5240
5244
  class: "detail-item",
5241
5245
  key: g.label
5242
5246
  }, [
5243
- t("div", Au, d(g.label), 1),
5244
- t("div", Pu, d(g.value(m)), 1)
5247
+ t("div", Pc, d(g.label), 1),
5248
+ t("div", Ic, d(g.value(m)), 1)
5245
5249
  ]))), 128))
5246
5250
  ]),
5247
- t("div", Iu, [
5251
+ t("div", Ec, [
5248
5252
  e[32] || (e[32] = t("div", { class: "detail-label" }, "Justification", -1)),
5249
- t("div", Eu, d(m.justification || "N/A"), 1)
5253
+ t("div", qc, d(m.justification || "N/A"), 1)
5250
5254
  ]),
5251
- t("div", qu, [
5255
+ t("div", Nc, [
5252
5256
  e[33] || (e[33] = t("div", { class: "detail-label" }, "Items", -1)),
5253
- t("ul", Nu, [
5257
+ t("ul", Mc, [
5254
5258
  (r(!0), a(y, null, w(m.items, (g, D) => (r(), a("li", { key: D }, d(g.desc) + " - " + d(g.qty) + " " + d(g.unit) + " @ ₦" + d(g.cost.toFixed(2)) + " each ", 1))), 128))
5255
5259
  ])
5256
5260
  ]),
@@ -5258,63 +5262,63 @@ function Ac(s, e, u, l, n, o) {
5258
5262
  type: "button",
5259
5263
  class: "add-item-btn",
5260
5264
  onClick: (g) => o.handleAcceptDelivery(m.id)
5261
- }, "Accept Delivery", 8, Mu)
5265
+ }, "Accept Delivery", 8, Lc)
5262
5266
  ]))), 128))
5263
5267
  ])
5264
5268
  ])) : p("", !0),
5265
- n.activeTab === "po" ? (r(), a("div", Lu, [
5266
- t("div", Vu, [
5267
- t("div", Ou, [
5268
- t("div", Uu, [
5269
+ n.activeTab === "po" ? (r(), a("div", Vc, [
5270
+ t("div", Oc, [
5271
+ t("div", Uc, [
5272
+ t("div", jc, [
5269
5273
  e[40] || (e[40] = t("h3", null, "Vendor Information", -1)),
5270
- t("div", ju, [
5274
+ t("div", Bc, [
5271
5275
  e[35] || (e[35] = t("span", { class: "info-label" }, "Company:", -1)),
5272
- t("span", Bu, d(n.vendorInfo.company || ((c = n.poDetails.vendorInfo) == null ? void 0 : c.company) || "N/A"), 1)
5276
+ t("span", Gc, d(n.vendorInfo.company || ((u = n.poDetails.vendorInfo) == null ? void 0 : u.company) || "N/A"), 1)
5273
5277
  ]),
5274
- t("div", Gu, [
5278
+ t("div", zc, [
5275
5279
  e[36] || (e[36] = t("span", { class: "info-label" }, "Contact:", -1)),
5276
- t("span", zu, d(n.vendorInfo.contact || ((h = n.poDetails.vendorInfo) == null ? void 0 : h.contact) || "N/A"), 1)
5280
+ t("span", Hc, d(n.vendorInfo.contact || ((h = n.poDetails.vendorInfo) == null ? void 0 : h.contact) || "N/A"), 1)
5277
5281
  ]),
5278
- t("div", Hu, [
5282
+ t("div", Wc, [
5279
5283
  e[37] || (e[37] = t("span", { class: "info-label" }, "Email:", -1)),
5280
- t("span", Wu, d(n.vendorInfo.email || ((x = n.poDetails.vendorInfo) == null ? void 0 : x.email) || "N/A"), 1)
5284
+ t("span", Qc, d(n.vendorInfo.email || ((x = n.poDetails.vendorInfo) == null ? void 0 : x.email) || "N/A"), 1)
5281
5285
  ]),
5282
- t("div", Qu, [
5286
+ t("div", Jc, [
5283
5287
  e[38] || (e[38] = t("span", { class: "info-label" }, "Phone:", -1)),
5284
- t("span", Ju, d(n.vendorInfo.phone || ((E = n.poDetails.vendorInfo) == null ? void 0 : E.phone) || "N/A"), 1)
5288
+ t("span", Yc, d(n.vendorInfo.phone || ((E = n.poDetails.vendorInfo) == null ? void 0 : E.phone) || "N/A"), 1)
5285
5289
  ]),
5286
- t("div", Yu, [
5290
+ t("div", Zc, [
5287
5291
  e[39] || (e[39] = t("span", { class: "info-label" }, "Address:", -1)),
5288
- t("span", Zu, d(n.vendorInfo.address || ((T = n.poDetails.vendorInfo) == null ? void 0 : T.address) || "N/A"), 1)
5292
+ t("span", Kc, d(n.vendorInfo.address || ((T = n.poDetails.vendorInfo) == null ? void 0 : T.address) || "N/A"), 1)
5289
5293
  ])
5290
5294
  ]),
5291
- t("div", Ku, [
5295
+ t("div", $c, [
5292
5296
  e[46] || (e[46] = t("h3", null, "Purchase Order Details", -1)),
5293
- t("div", $u, [
5297
+ t("div", Xc, [
5294
5298
  e[41] || (e[41] = t("span", { class: "info-label" }, "PO Number:", -1)),
5295
- t("span", Xu, d(n.poDetails.id), 1)
5299
+ t("span", eu, d(n.poDetails.id), 1)
5296
5300
  ]),
5297
- t("div", ec, [
5301
+ t("div", tu, [
5298
5302
  e[42] || (e[42] = t("span", { class: "info-label" }, "Date:", -1)),
5299
- t("span", tc, d(n.vendorInfo.poDate || ((N = n.poDetails.vendorInfo) == null ? void 0 : N.poDate) || o.formatDate(/* @__PURE__ */ new Date())), 1)
5303
+ t("span", su, d(n.vendorInfo.poDate || ((N = n.poDetails.vendorInfo) == null ? void 0 : N.poDate) || o.formatDate(/* @__PURE__ */ new Date())), 1)
5300
5304
  ]),
5301
- t("div", sc, [
5305
+ t("div", iu, [
5302
5306
  e[43] || (e[43] = t("span", { class: "info-label" }, "Requested By:", -1)),
5303
- t("span", ic, d(n.vendorInfo.poApproved || ((M = n.poDetails.vendorInfo) == null ? void 0 : M.poApproved) || "N/A"), 1)
5307
+ t("span", nu, d(n.vendorInfo.poApproved || ((M = n.poDetails.vendorInfo) == null ? void 0 : M.poApproved) || "N/A"), 1)
5304
5308
  ]),
5305
- t("div", nc, [
5309
+ t("div", ou, [
5306
5310
  e[44] || (e[44] = t("span", { class: "info-label" }, "Department:", -1)),
5307
- t("span", oc, "PO-" + d(n.poDetails.department || "N/A"), 1)
5311
+ t("span", lu, "PO-" + d(n.poDetails.department || "N/A"), 1)
5308
5312
  ]),
5309
- t("div", lc, [
5313
+ t("div", ru, [
5310
5314
  e[45] || (e[45] = t("span", { class: "info-label" }, "Delivery Date:", -1)),
5311
- t("span", rc, d(n.poDetails.neededDate || "N/A"), 1)
5315
+ t("span", au, d(n.poDetails.neededDate || "N/A"), 1)
5312
5316
  ])
5313
5317
  ])
5314
5318
  ]),
5315
- t("div", ac, [
5319
+ t("div", du, [
5316
5320
  e[55] || (e[55] = t("h2", { class: "section-title" }, "Order Items", -1)),
5317
- t("table", dc, [
5321
+ t("table", cu, [
5318
5322
  t("thead", null, [
5319
5323
  t("tr", null, [
5320
5324
  e[47] || (e[47] = t("th", null, "Item #", -1)),
@@ -5322,7 +5326,7 @@ function Ac(s, e, u, l, n, o) {
5322
5326
  e[49] || (e[49] = t("th", null, "Quantity", -1)),
5323
5327
  e[50] || (e[50] = t("th", null, "Unit Price", -1)),
5324
5328
  e[51] || (e[51] = t("th", null, "Total", -1)),
5325
- n.isPrinting ? p("", !0) : (r(), a("th", uc, "Actions"))
5329
+ n.isPrinting ? p("", !0) : (r(), a("th", uu, "Actions"))
5326
5330
  ])
5327
5331
  ]),
5328
5332
  t("tbody", null, [
@@ -5338,34 +5342,34 @@ function Ac(s, e, u, l, n, o) {
5338
5342
  step: "0.01",
5339
5343
  min: "0",
5340
5344
  class: v(["price-input", { "price-changed": m.cost !== m.tempPrice }])
5341
- }, null, 10, pc)), [
5345
+ }, null, 10, fu)), [
5342
5346
  [
5343
5347
  _,
5344
5348
  m.tempPrice,
5345
5349
  void 0,
5346
5350
  { number: !0 }
5347
5351
  ]
5348
- ]) : (r(), a("span", cc, [
5352
+ ]) : (r(), a("span", mu, [
5349
5353
  f(" $" + d((m.unitPrice || m.cost || 0).toFixed(2)) + " ", 1),
5350
- m.cost !== m.unitPrice && m.unitPrice ? (r(), a("span", mc, "!")) : p("", !0)
5354
+ m.cost !== m.unitPrice && m.unitPrice ? (r(), a("span", pu, "!")) : p("", !0)
5351
5355
  ]))
5352
5356
  ]),
5353
5357
  t("td", null, "$" + d(((m.unitPrice || m.cost || 0) * (m.qty || 0)).toFixed(2)), 1),
5354
- n.isPrinting ? p("", !0) : (r(), a("td", fc, [
5355
- m.editing ? (r(), a("div", vc, [
5358
+ n.isPrinting ? p("", !0) : (r(), a("td", hu, [
5359
+ m.editing ? (r(), a("div", gu, [
5356
5360
  t("button", {
5357
5361
  onClick: (D) => o.savePrice(g),
5358
5362
  class: "save-btn"
5359
- }, "Save", 8, gc),
5363
+ }, "Save", 8, bu),
5360
5364
  t("button", {
5361
5365
  onClick: (D) => o.cancelEdit(g),
5362
5366
  class: "cancel-btn"
5363
- }, "Cancel", 8, bc)
5367
+ }, "Cancel", 8, yu)
5364
5368
  ])) : (r(), a("button", {
5365
5369
  key: 0,
5366
5370
  onClick: (D) => o.startEdit(g),
5367
5371
  class: "edit-btn"
5368
- }, " Edit Price ", 8, hc))
5372
+ }, " Edit Price ", 8, vu))
5369
5373
  ]))
5370
5374
  ]))), 128))
5371
5375
  ])
@@ -5373,25 +5377,25 @@ function Ac(s, e, u, l, n, o) {
5373
5377
  (r(!0), a(y, null, w(n.poDetails.items || [], (m, g) => (r(), a("div", {
5374
5378
  key: "note-" + g
5375
5379
  }, [
5376
- m.justification ? (r(), a("div", yc, [
5380
+ m.justification ? (r(), a("div", wu, [
5377
5381
  t("strong", null, "Price Change Justification (Item " + d(m.itemNumber || g + 1) + "):", 1),
5378
5382
  f(" " + d(m.justification), 1)
5379
5383
  ])) : p("", !0)
5380
5384
  ]))), 128)),
5381
- t("div", wc, [
5382
- t("div", _c, [
5385
+ t("div", _u, [
5386
+ t("div", ku, [
5383
5387
  e[52] || (e[52] = t("span", null, "Subtotal:", -1)),
5384
5388
  t("span", null, "$" + d(o.subTotal.toFixed(2)), 1)
5385
5389
  ]),
5386
- t("div", kc, [
5390
+ t("div", Cu, [
5387
5391
  t("span", null, "Tax (" + d(n.vendorInfo.tax || ((q = n.poDetails.vendorInfo) == null ? void 0 : q.tax) || 0) + "%):", 1),
5388
5392
  t("span", null, "$" + d(o.calculateTax().toFixed(2)), 1)
5389
5393
  ]),
5390
- t("div", Cc, [
5394
+ t("div", Fu, [
5391
5395
  e[53] || (e[53] = t("span", null, "Shipping:", -1)),
5392
5396
  t("span", null, "$" + d(o.getOptional(n.vendorInfo.shipping)), 1)
5393
5397
  ]),
5394
- t("div", Fc, [
5398
+ t("div", Du, [
5395
5399
  e[54] || (e[54] = t("span", null, "Grand Total:", -1)),
5396
5400
  t("span", null, "$" + d(o.grandTotal.toFixed(2)), 1)
5397
5401
  ])
@@ -5403,9 +5407,9 @@ function Ac(s, e, u, l, n, o) {
5403
5407
  class: "justification-modal",
5404
5408
  onClick: e[10] || (e[10] = R((...m) => o.closeJustificationModal && o.closeJustificationModal(...m), ["self"]))
5405
5409
  }, [
5406
- t("div", Dc, [
5410
+ t("div", xu, [
5407
5411
  e[58] || (e[58] = t("h3", null, "Price Change Justification Required", -1)),
5408
- t("p", xc, [
5412
+ t("p", Su, [
5409
5413
  e[56] || (e[56] = f(" Please provide a justification for changing the price from ", -1)),
5410
5414
  t("strong", null, "$" + d((F = (k = o.currentItem) == null ? void 0 : k.cost) == null ? void 0 : F.toFixed(2)), 1),
5411
5415
  e[57] || (e[57] = f(" to ", -1)),
@@ -5419,7 +5423,7 @@ function Ac(s, e, u, l, n, o) {
5419
5423
  }, null, 512), [
5420
5424
  [_, n.justificationText]
5421
5425
  ]),
5422
- t("div", Sc, [
5426
+ t("div", Ru, [
5423
5427
  t("button", {
5424
5428
  onClick: e[8] || (e[8] = (...m) => o.closeJustificationModal && o.closeJustificationModal(...m)),
5425
5429
  class: "cancel-btn"
@@ -5428,7 +5432,7 @@ function Ac(s, e, u, l, n, o) {
5428
5432
  onClick: e[9] || (e[9] = (...m) => o.confirmPriceChange && o.confirmPriceChange(...m)),
5429
5433
  class: "save-btn",
5430
5434
  disabled: !n.justificationText.trim()
5431
- }, " Confirm Change ", 8, Rc)
5435
+ }, " Confirm Change ", 8, Tu)
5432
5436
  ])
5433
5437
  ])
5434
5438
  ])) : p("", !0),
@@ -5439,18 +5443,18 @@ function Ac(s, e, u, l, n, o) {
5439
5443
  onClick: e[11] || (e[11] = (m) => o.handleFinishPO(n.poDetails.id))
5440
5444
  }, "Approve PO"))
5441
5445
  ])) : p("", !0),
5442
- n.activeTab === "workflow" ? (r(), a("div", Tc, e[59] || (e[59] = [
5446
+ n.activeTab === "workflow" ? (r(), a("div", Au, e[59] || (e[59] = [
5443
5447
  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)
5444
5448
  ]))) : p("", !0)
5445
5449
  ]);
5446
5450
  }
5447
- const Pc = /* @__PURE__ */ O(nd, [["render", Ac]]), Ec = (s = {}) => ({
5451
+ const Iu = /* @__PURE__ */ O(od, [["render", Pu]]), qu = (s = {}) => ({
5448
5452
  brandName: s.brandName || "OceanHelm",
5449
5453
  logoIcon: s.logoIcon || "bi bi-water",
5450
5454
  showLogo: s.showLogo !== !1,
5451
5455
  responsive: s.responsive !== !1,
5452
5456
  ...s
5453
- }), qc = [
5457
+ }), Nu = [
5454
5458
  {
5455
5459
  type: "link",
5456
5460
  label: "Home",
@@ -5488,14 +5492,20 @@ const Pc = /* @__PURE__ */ O(nd, [["render", Ac]]), Ec = (s = {}) => ({
5488
5492
  {
5489
5493
  type: "dropdown",
5490
5494
  label: "Compliance",
5491
- roles: ["owner", "super-staff", "staff", "captain"],
5495
+ roles: ["owner", "staff", "captain"],
5492
5496
  icon: "bi bi-list-ul",
5493
5497
  children: [
5494
5498
  { label: "Vessel Certification", action: "vessel-cert" },
5495
- { label: "Reports", action: "reports" },
5496
- { label: "Crew Certification", action: "crew-cert" },
5497
- { label: "QHSE Compliance", action: "qhse" },
5498
- { label: "Track Garbage", action: "garbage" }
5499
+ {
5500
+ label: "Reports",
5501
+ action: "reports",
5502
+ roles: ["owner", "staff", "captain"],
5503
+ categories: ["marine-staff"]
5504
+ },
5505
+ // only visible to staff who also have the 'marine-staff' category
5506
+ { label: "Crew Certification", action: "crew-cert", roles: ["owner", "staff", "captain"], categories: ["marine-staff"] },
5507
+ { label: "QHSE Compliance", action: "qhse", roles: ["owner", "staff", "captain"], categories: ["marine-staff"] },
5508
+ { label: "Track Garbage", action: "garbage", roles: ["owner", "staff", "captain"], categories: ["marine-staff"] }
5499
5509
  ]
5500
5510
  },
5501
5511
  {
@@ -5505,39 +5515,40 @@ const Pc = /* @__PURE__ */ O(nd, [["render", Ac]]), Ec = (s = {}) => ({
5505
5515
  type: "dropdown",
5506
5516
  label: "HR",
5507
5517
  icon: "bi bi-people-fill",
5508
- roles: ["owner", "super-staff", "staff"],
5518
+ roles: ["owner", "captain", "staff"],
5509
5519
  categories: ["hr"],
5510
5520
  // staff must also have this category
5511
5521
  children: [
5512
5522
  {
5513
5523
  label: "Attendance",
5514
5524
  action: "hr-attendance",
5515
- roles: ["owner", "super-staff", "staff"],
5516
- categories: ["hr"]
5525
+ roles: ["owner", "captain", "staff"],
5526
+ categories: ["hr", "marine-staff"]
5517
5527
  },
5518
5528
  {
5519
5529
  label: "Payroll",
5520
5530
  action: "hr-payroll",
5521
- roles: ["owner", "super-staff", "staff"],
5531
+ roles: ["owner", "staff"],
5522
5532
  categories: ["hr"]
5523
5533
  },
5524
5534
  {
5525
5535
  label: "Appraisals",
5526
5536
  action: "hr-appraisals",
5527
- roles: ["owner", "super-staff", "staff"],
5537
+ roles: ["owner", "captain", "staff"],
5528
5538
  categories: ["hr"]
5529
5539
  },
5530
5540
  {
5531
5541
  label: "Leave Management",
5532
5542
  action: "hr-leave",
5533
- roles: ["owner", "super-staff", "staff"],
5543
+ roles: ["owner", "staff"],
5534
5544
  categories: ["hr"]
5535
5545
  },
5536
5546
  {
5537
5547
  label: "Disciplinary Log",
5538
5548
  action: "hr-disciplinary",
5539
- roles: ["owner"]
5549
+ roles: ["owner", "staff"],
5540
5550
  // owner-only, no category gate needed
5551
+ categories: ["hr"]
5541
5552
  }
5542
5553
  ]
5543
5554
  },
@@ -5552,13 +5563,7 @@ const Pc = /* @__PURE__ */ O(nd, [["render", Ac]]), Ec = (s = {}) => ({
5552
5563
  // staff must also have this category
5553
5564
  children: [
5554
5565
  {
5555
- label: "Recruitment Tracker",
5556
- action: "recruitment-tracker",
5557
- roles: ["owner", "super-staff", "staff"],
5558
- categories: ["hr"]
5559
- },
5560
- {
5561
- label: "Recruitment Builder",
5566
+ label: "Manage Recruitment",
5562
5567
  action: "recruitment-builder",
5563
5568
  roles: ["owner", "super-staff", "staff"],
5564
5569
  categories: ["hr"]
@@ -5571,17 +5576,18 @@ const Pc = /* @__PURE__ */ O(nd, [["render", Ac]]), Ec = (s = {}) => ({
5571
5576
  label: "Maintenance",
5572
5577
  icon: "bi bi-tools",
5573
5578
  action: "maintenance",
5574
- roles: ["owner", "super-staff", "staff", "captain"]
5579
+ roles: ["owner", "staff", "captain"],
5580
+ categories: ["marine-staff"]
5575
5581
  },
5576
5582
  {
5577
5583
  type: "dropdown",
5578
5584
  label: "Crew Management",
5579
5585
  icon: "bi bi-people",
5580
- roles: ["owner", "super-staff", "staff", "captain"],
5586
+ roles: ["owner", "staff", "captain"],
5581
5587
  children: [
5582
- { label: "All Crew", action: "crew-all", roles: ["owner", "super-staff", "staff"] },
5583
- { label: "Get Crew by Vessel", action: "crew-by-vessel" },
5584
- { label: "Schedule", action: "schedule" }
5588
+ { label: "All Crew", action: "crew-all", roles: ["owner", "staff"], categories: ["marine-staff"] },
5589
+ { label: "Get Crew by Vessel", action: "crew-by-vessel", roles: ["owner", "captain", "staff"], categories: ["marine-staff"] },
5590
+ { label: "Schedule", action: "schedule", roles: ["owner", "captain"] }
5585
5591
  ]
5586
5592
  },
5587
5593
  {
@@ -5590,8 +5596,8 @@ const Pc = /* @__PURE__ */ O(nd, [["render", Ac]]), Ec = (s = {}) => ({
5590
5596
  icon: "bi bi-clipboard-data",
5591
5597
  roles: ["owner", "super-staff", "staff", "captain"],
5592
5598
  children: [
5593
- { label: "Parts Inventory", action: "inventory", roles: ["owner", "super-staff", "staff", "captain"] },
5594
- { label: "Bunkering", action: "fuel", roles: ["owner", "super-staff", "staff", "captain"] }
5599
+ { label: "Parts Inventory", action: "inventory", roles: ["owner", "staff", "captain"], categories: ["controller", "marine-staff"] },
5600
+ { label: "Bunkering", action: "fuel", roles: ["owner", "staff", "captain"], categories: ["controller", "marine-staff"] }
5595
5601
  ]
5596
5602
  },
5597
5603
  {
@@ -5599,21 +5605,24 @@ const Pc = /* @__PURE__ */ O(nd, [["render", Ac]]), Ec = (s = {}) => ({
5599
5605
  label: "Requisition Processing",
5600
5606
  icon: "bi bi-calendar-check",
5601
5607
  href: "/app/requisition",
5602
- roles: ["owner", "super-staff", "staff", "captain"]
5608
+ roles: ["owner", "staff", "captain"],
5609
+ categories: ["controller", "marine-staff", "requisitor", "purchaser"]
5603
5610
  },
5604
5611
  {
5605
5612
  type: "button",
5606
5613
  label: "Voyage Manager",
5607
5614
  icon: "fas fa-ship",
5608
5615
  action: "coming-soon",
5609
- roles: ["owner", "super-staff", "staff", "captain"]
5616
+ roles: ["owner", "staff", "captain"],
5617
+ categories: ["marine-staff"]
5610
5618
  },
5611
5619
  {
5612
5620
  type: "button",
5613
5621
  label: "Vessel Log",
5614
5622
  icon: "bi bi-file-ruled",
5615
5623
  action: "coming-soon",
5616
- roles: ["owner", "super-staff", "staff", "captain"]
5624
+ roles: ["owner", "staff", "captain"],
5625
+ categories: ["marine-staff"]
5617
5626
  },
5618
5627
  {
5619
5628
  type: "button",
@@ -5642,23 +5651,23 @@ const Pc = /* @__PURE__ */ O(nd, [["render", Ac]]), Ec = (s = {}) => ({
5642
5651
  icon: "bi bi-question-circle",
5643
5652
  action: "help"
5644
5653
  }
5645
- ], Nc = (s, e) => !s.roles || s.roles.length === 0 ? !0 : s.roles.includes(e == null ? void 0 : e.role), Mc = {
5654
+ ], Mu = (s, e) => !s.roles || s.roles.length === 0 ? !0 : s.roles.includes(e == null ? void 0 : e.role), Lu = {
5646
5655
  install(s, e = {}) {
5647
- s.component("ConfigurableSidebar", me), s.component("VesselLists", Je), s.component("DashHead", et), s.component("Reports", An), s.component("ActivityLogs", Yl), s.component("CrewManagement", id), s.component("RequisitionSystem", Pc), s.component("OceanHelmMaintenance", Cl), s.provide("sidebarConfig", e);
5656
+ s.component("ConfigurableSidebar", me), s.component("VesselLists", Je), s.component("DashHead", et), s.component("Reports", Pn), s.component("ActivityLogs", Zl), s.component("CrewManagement", nd), s.component("RequisitionSystem", Iu), s.component("OceanHelmMaintenance", Fl), s.provide("sidebarConfig", e);
5648
5657
  }
5649
5658
  };
5650
5659
  export {
5651
- Yl as ActivityLogs,
5660
+ Zl as ActivityLogs,
5652
5661
  me as ConfigurableSidebar,
5653
- id as CrewManagement,
5662
+ nd as CrewManagement,
5654
5663
  et as DashHead,
5655
- Cl as OceanHelmMaintenance,
5656
- An as Reports,
5657
- Pc as RequisitionSystem,
5664
+ Fl as OceanHelmMaintenance,
5665
+ Pn as Reports,
5666
+ Iu as RequisitionSystem,
5658
5667
  Je as VesselList,
5659
- Ec as createSidebarConfig,
5660
- Mc as default,
5661
- qc as defaultMenuItems,
5662
- Nc as defaultPermissionChecker
5668
+ qu as createSidebarConfig,
5669
+ Lu as default,
5670
+ Nu as defaultMenuItems,
5671
+ Mu as defaultPermissionChecker
5663
5672
  };
5664
5673
  //# sourceMappingURL=oceanhelm.es.js.map