oceanhelm 0.0.1

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.
@@ -0,0 +1,2 @@
1
+ (function(c,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(c=typeof globalThis<"u"?globalThis:c||self,e(c.OceanHelm={},c.Vue))})(this,function(c,e){"use strict";const kl="",m=(l,t)=>{const s=l.__vccOpts||l;for(const[a,o]of t)s[a]=o;return s},V={name:"ConfigurableSidebar",props:{brandName:{type:String,default:"OceanHelm"},logoIcon:{type:String,default:"bi bi-water"},showLogo:{type:Boolean,default:!0},menuItems:{type:Array,required:!0,default:()=>[]},userProfile:{type:Object,default:()=>({})},responsive:{type:Boolean,default:!0},customClasses:{type:String,default:""},permissionChecker:{type:Function,default:null}},computed:{sidebarClasses(){return this.customClasses},filteredMenuItems(){return this.menuItems.filter(l=>this.hasPermission(l))}},mounted(){this.responsive&&this.initializeResponsiveBehavior()},methods:{hasPermission(l){return this.permissionChecker?this.permissionChecker(l,this.userProfile):!l.roles||l.roles.length===0?!0:l.roles.includes(this.userProfile.role)},handleNavigation(l){var t;this.$emit("navigate",l),l.href&&!l.preventDefault&&(l.external?window.open(l.href,"_blank"):(t=this.$router)==null||t.push(l.href))},handleAction(l){this.$emit("action",l)},handleItemClick(l){this.$emit("item-click",l),l.type},initializeResponsiveBehavior(){const l=document.getElementById("sidebarToggle"),t=document.getElementById("sidebar"),s=document.getElementById("content");!l||!t||!s||(window.innerWidth>=768&&(t.classList.toggle("active"),s.classList.toggle("active")),l.addEventListener("click",()=>{t.classList.toggle("active"),s.classList.toggle("active")}),document.addEventListener("click",a=>{const o=t.contains(a.target),i=l.contains(a.target);!o&&!i&&window.innerWidth<768&&t.classList.contains("active")&&(t.classList.remove("active"),s.classList.remove("active"))}))}},emits:["navigate","action","item-click"]},N={key:0,class:"logo d-flex align-items-center left"},k={class:"list-unstyled components mt-4"},b=["onClick"],w=["href","onClick"],C=["onClick"],u={class:"dropdown-toggle",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},D={class:"dropdown-menu","aria-labelledby":"dropdownMenuLink"},S=["onClick"],B={key:3,class:"dropdown-divider"},_={key:4};function x(l,t,s,a,o,i){return e.openBlock(),e.createElementBlock("nav",{id:"sidebar",class:e.normalizeClass(i.sidebarClasses)},[s.showLogo?(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("i",{class:e.normalizeClass([s.logoIcon,"me-2"])},null,2),e.createElementVNode("span",null,e.toDisplayString(s.brandName),1)])):e.createCommentVNode("",!0),e.createElementVNode("ul",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.filteredMenuItems,(n,r)=>(e.openBlock(),e.createElementBlock("li",{key:r,class:e.normalizeClass({active:n.active,dropdown:n.type==="dropdown"}),onClick:d=>i.handleItemClick(n)},[n.type==="link"?(e.openBlock(),e.createElementBlock("a",{key:0,href:n.href||"#",onClick:e.withModifiers(d=>i.handleNavigation(n),["prevent"])},[n.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(n.icon)},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.label),1)],8,w)):n.type==="button"?(e.openBlock(),e.createElementBlock("a",{key:1,onClick:e.withModifiers(d=>i.handleAction(n),["prevent"]),style:{cursor:"pointer"}},[n.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(n.icon)},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.label),1)],8,C)):n.type==="dropdown"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("a",u,[n.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(n.icon)},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.label),1)]),e.createElementVNode("div",D,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.children,(d,Nl)=>(e.openBlock(),e.createElementBlock("a",{key:Nl,class:"dropdown-item black",onClick:e.withModifiers(Sl=>i.handleAction(d),["prevent"]),style:{cursor:"pointer"}},e.toDisplayString(d.label),9,S))),128))])],64)):n.type==="separator"?(e.openBlock(),e.createElementBlock("div",B)):n.type==="text"?(e.openBlock(),e.createElementBlock("a",_,e.toDisplayString(n.label),1)):e.createCommentVNode("",!0)],10,b))),128))]),e.renderSlot(l.$slots,"footer",{},void 0,!0)],2)}const p=m(V,[["render",x],["__scopeId","data-v-5c9320f4"]]),bl="",T={name:"VesselList",props:{vessels:{type:Array,required:!0,default:()=>[]},userProfile:{type:Object,required:!0,default:()=>({role:"viewer",vessel:null})},loading:{type:Boolean,default:!1},currentRoute:{type:String,default:"dashboard"},config:{type:Object,default:()=>({enableAdd:!0,enableEdit:!0,enableDelete:!0,enableStatusToggle:!0,showCertifications:!0})}},emits:["vessel-add","vessel-click","vessel-edit","vessel-delete","vessel-toggle-status","vessel-navigate","access-denied"],computed:{activeVesselsCount(){return this.vessels.filter(l=>l.status==="Active").length},inactiveVesselsCount(){return this.vessels.filter(l=>l.status==="Inactive").length},canAddVessel(){return this.config.enableAdd&&(this.userProfile.role==="owner"||this.userProfile.role==="staff")}},methods:{handleAddVessel(){if(!this.canAddVessel){this.handleAccessDenied("add vessel");return}this.$emit("vessel-add")},handleVesselClick(l){const t={vessel:l,route:this.currentRoute,id:l.registrationNumber,name:l.name};this.currentRoute==="dashboard"?this.$emit("vessel-click",l):this.$emit("vessel-navigate",t)},handleDeleteVessel(l){if(!this.grantAccess(l)){this.handleAccessDenied("delete vessel");return}this.config.enableDelete&&this.$emit("vessel-delete",l)},handleToggleStatus(l){if(!this.grantAccess(l)){this.handleAccessDenied("change vessel status");return}this.config.enableStatusToggle&&this.$emit("vessel-toggle-status",l)},handleEditVessel(l){if(!this.grantAccess(l)){this.handleAccessDenied("edit vessel");return}this.config.enableEdit&&this.$emit("vessel-edit",l)},handleAccessDenied(l){this.$emit("access-denied",{action:l,userProfile:this.userProfile})},statusClass(l){return`status-${(l==null?void 0:l.toLowerCase())||""}`},grantAccess(l){const{role:t,vessel:s}=this.userProfile;return t==="owner"||t==="staff"||t==="captain"&&s===l.name},getDaysToExpiry(l){if(!l)return null;const t=new Date,a=new Date(l)-t;return Math.ceil(a/(1e3*60*60*24))},getExpiryClass(l){const t=this.getDaysToExpiry(l);return t===null?"":t<30?"cert-critical":t<90?"cert-warning":""}}},A={class:"row mb-3"},M={class:"col-md-4"},P={class:"card border-0 shadow-sm"},L={class:"card-body d-flex align-items-center"},F={class:"mt-2 mb-0"},U={class:"col-md-4"},I={class:"card border-0 shadow-sm"},R={class:"card-body d-flex align-items-center"},O={class:"mt-2 mb-0"},H={key:0,class:"col-md-4"},z={key:0,class:"text-center py-4"},q={key:1,class:"alert alert-primary",role:"alert"},j={key:2,class:"row"},$=["onClick"],Q={class:"card-body d-flex align-items-center"},Y={class:"flex-grow-1"},K={class:"d-flex justify-content-between align-items-center mb-2"},W={class:"card-title mb-0"},G={class:"row"},J={class:"col-6"},X={class:"mb-0"},Z={class:"col-6"},v={class:"mb-0"},ee={class:"action-icon left delete"},te=["onClick"],ne=["onClick"];function le(l,t,s,a,o,i){return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",A,[e.createElementVNode("div",M,[e.createElementVNode("div",P,[e.createElementVNode("div",L,[t[2]||(t[2]=e.createElementVNode("div",{class:"rounded-circle bg-primary bg-opacity-10 p-3 me-3"},[e.createElementVNode("i",{class:"bi bi-check-circle-fill text-primary fs-4"})],-1)),e.createElementVNode("div",null,[t[1]||(t[1]=e.createElementVNode("h6",{class:"mb-0"},"Active Vessels",-1)),e.createElementVNode("h3",F,e.toDisplayString(i.activeVesselsCount),1)])])])]),e.createElementVNode("div",U,[e.createElementVNode("div",I,[e.createElementVNode("div",R,[t[4]||(t[4]=e.createElementVNode("div",{class:"rounded-circle bg-secondary bg-opacity-10 p-3 me-3"},[e.createElementVNode("i",{class:"bi bi-pause-circle-fill text-secondary fs-4"})],-1)),e.createElementVNode("div",null,[t[3]||(t[3]=e.createElementVNode("h6",{class:"mb-0"},"Inactive",-1)),e.createElementVNode("h3",O,e.toDisplayString(i.inactiveVesselsCount),1)])])])]),i.canAddVessel?(e.openBlock(),e.createElementBlock("div",H,[e.createElementVNode("div",{class:"card border-0 shadow-sm",onClick:t[0]||(t[0]=(...n)=>i.handleAddVessel&&i.handleAddVessel(...n))},t[5]||(t[5]=[e.createElementVNode("div",{class:"card-body d-flex align-items-center"},[e.createElementVNode("div",{class:"rounded-circle bg-success bg-opacity-10 p-3 me-3"},[e.createElementVNode("i",{class:"bi bi-patch-plus-fill text-success fs-4"})]),e.createElementVNode("div",null,[e.createElementVNode("h6",{class:"mb-0"},"Add New Vessel")])],-1)]))])):e.createCommentVNode("",!0)]),t[11]||(t[11]=e.createElementVNode("h4",{class:"mb-4"},[e.createElementVNode("i",{class:"bi bi-ship me-2"}),e.createTextVNode("Registered Vessels")],-1)),s.loading?(e.openBlock(),e.createElementBlock("div",z,t[6]||(t[6]=[e.createElementVNode("div",{class:"spinner-border text-primary",role:"status"},[e.createElementVNode("span",{class:"visually-hidden"},"Loading...")],-1),e.createElementVNode("p",{class:"mt-2"},"Loading vessels...",-1)]))):s.vessels.length?(e.openBlock(),e.createElementBlock("div",j,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.vessels,n=>(e.openBlock(),e.createElementBlock("div",{class:"col-lg-6",key:n.registrationNumber||n.id},[e.createElementVNode("div",{class:"vessel-card",onClick:r=>i.handleVesselClick(n)},[e.createElementVNode("div",Q,[t[10]||(t[10]=e.createElementVNode("div",{class:"vessel-icon left"},[e.createElementVNode("i",{class:"fas fa-ship"})],-1)),e.createElementVNode("div",Y,[e.createElementVNode("div",K,[e.createElementVNode("h5",W,e.toDisplayString(n.name),1),e.createElementVNode("span",{class:e.normalizeClass(["vessel-status",i.statusClass(n.status)])},e.toDisplayString(n.status),3)]),e.createElementVNode("div",G,[e.createElementVNode("div",J,[t[8]||(t[8]=e.createElementVNode("small",{class:"text-muted"},"Registration #:",-1)),e.createElementVNode("p",X,e.toDisplayString(n.registrationNumber),1)]),e.createElementVNode("div",Z,[t[9]||(t[9]=e.createElementVNode("small",{class:"text-muted"},"Next Maintenance:",-1)),e.createElementVNode("p",v,e.toDisplayString(n.nextMaintenance||"Not scheduled"),1)])])])]),e.createElementVNode("div",ee,[e.createElementVNode("i",{class:"bi bi-trash",onClick:e.withModifiers(r=>i.handleDeleteVessel(n),["stop"])},null,8,te)]),e.createElementVNode("button",{class:"btn btn-primary",onClick:e.withModifiers(r=>i.handleToggleStatus(n),["stop"])},e.toDisplayString(n.status==="Active"?"Mark Inactive":"Mark Active"),9,ne)],8,$)]))),128))])):(e.openBlock(),e.createElementBlock("div",q,t[7]||(t[7]=[e.createElementVNode("h4",{class:"alert-heading"},"Empty Fleet!",-1),e.createElementVNode("p",null,"You have an empty fleet, you have not added any vessel yet.",-1),e.createElementVNode("hr",null,null,-1),e.createElementVNode("p",{class:"mb-0"},"Click on the add vessel button above, to start adding vessels to your fleet",-1)])))],64)}const h=m(T,[["render",le]]),wl="",oe={name:"DashHead",props:{name:{type:String,required:!0},userProfile:{type:Object,required:!0,default:()=>({role:"viewer",vessel:null})}},emits:["add-user","logged-in"],methods:{addUser(){this.$emit("add-user")},loggedIn(){this.$emit("logged-in")}}},se={class:"page-header d-flex justify-content-between align-items-center"},ie={style:{"margin-left":"20px"}},re={class:"d-flex"};function ae(l,t,s,a,o,i){return e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("h2",ie,e.toDisplayString(s.name),1),e.createElementVNode("div",re,[this.userProfile.role=="owner"?(e.openBlock(),e.createElementBlock("button",{key:0,class:"btn btn-outline-primary me-2",onClick:t[0]||(t[0]=n=>i.addUser())},t[2]||(t[2]=[e.createElementVNode("i",{class:"bi bi-bell"},null,-1),e.createElementVNode("span",{class:"badge bg-danger"},"1",-1)]))):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"btn btn-outline-primary",onClick:t[1]||(t[1]=n=>i.loggedIn())},t[3]||(t[3]=[e.createElementVNode("i",{class:"bi bi-person-circle"},null,-1)]))])])}const f=m(oe,[["render",ae]]),Cl="",de={name:"OceanHelmMaintenance",props:{vesselInfo:{type:Object,required:!0},tasks:{type:Array,default:()=>[]},vesselCrew:{type:Array,default:()=>[]},companyInfo:{type:Object,default:()=>({})},userProfile:{type:Object,required:!0}},emits:["dashboard-navigate","load-checklist","save-schedule","update-task","upload-file","delete-evidence","access-denied","show-message","generate-checklist"],data(){return{ready:!0,isSaving:!1,after:null,lastSection:"",currentTask:"",imgText:"Choose file to upload",fileText:"Drag and drop files here or",fileattachments:{},refreshKey:0,activeSection:"inventory",sections:[{id:"schedule",name:"Schedule",icon:"📅"},{id:"inventory",name:"All Maintenance",icon:"♻️"},{id:"dashboard",name:"Dashboard",icon:"☰",onClick:()=>this.$emit("dashboard-navigate")}],activeFilter:"all",searchQuery:"",checklists:[],isLoading:!1,form:{taskName:"",description:"",maintenanceType:"",component:"",priority:"",dueDate:"",estimatedHours:null,assignedTo:"",recurrence:"",lastPerformed:"",nextDue:"",notifyEmail:!0,notifySms:!0,reminderDays:"1",estimatedDuration:null,notes:"",status:"Soon",email:"",remainingDays:null,attachments:{}},maintenanceTasks:[],showReport:!1,reportDate:new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}),reportId:"MT-"+Math.random().toString(36).substr(2,9).toUpperCase()}},watch:{"form.lastPerformed":"calculateNextDue","form.recurrence":"calculateNextDue","form.nextDue":function(l){this.calculateRemainingDays()}},computed:{filteredTasks(){let l=[...this.tasks];if(this.activeFilter==="all"?l=l.filter(t=>t.status==="Overdue"||t.status==="Soon"||t.status==="Completed"):this.activeFilter==="due"?l=l.filter(t=>t.status==="Overdue"||t.status==="Soon"):this.activeFilter==="completed"&&(l=l.filter(t=>t.status==="Completed")),this.searchQuery){const t=this.searchQuery.toLowerCase();l=l.filter(s=>s.component.toLowerCase().includes(t)||s.taskName.toLowerCase().includes(t)||s.assignedTo.toLowerCase().includes(t))}return l},completedCount(){return this.checklists.filter(l=>l.completed)},progress(){return Math.round(this.completedCount.length/this.checklists.length*100)},checklistButtonLabel(){return this.lastSection==="schedule"?"Approve Maintenance":"Save Checklist"},showAddTaskButton(){return this.checklistButtonLabel!=="Save Checklist"},totalEstimatedHours(){return this.maintenanceTasks.reduce((l,t)=>l+(t.estimatedHours||0),0)}},methods:{grantAccess(l){const t=this.userProfile;return t.role==="owner"||t.role==="staff"||t.role==="captain"&&t.vessel===l},deepAccess(){const l=this.userProfile;return l.role==="owner"||l.role==="captain"?!0:(this.$emit("access-denied","You do not have access to do this"),!1)},deleteTask(l){this.checklists=this.checklists.filter(t=>t.id!==l)},addTask(l){l&&l.preventDefault(),this.$emit("show-message",{type:"prompt",title:"Add New Task",message:"Enter the task details",callback:t=>{if(t){const s={id:Date.now(),text:t,completed:!1};this.checklists.push(s)}}})},setFilter(l){this.activeFilter=l},loadChecklist(l){this.isLoading=!0,this.$emit("generate-checklist",{component:l,callback:t=>{this.checklists=t.map(s=>({...s,completed:!1})),this.isLoading=!1}})},showMaintenance(l){if(this.deepAccess()){const t=this.tasks.find(s=>s.component===l);t&&t.checklistProgress?this.checklists=[...t.checklistProgress]:this.loadChecklist(l),this.after=t==null?void 0:t.after,this.currentTask=l,this.lastSection="inventory",this.activeSection="maintenance"}},printMaintenance(l){const t=this.tasks.find(s=>s.component===l);this.maintenanceTasks=[t],this.loadMaintenanceData(),this.showReport=!0,this.$nextTick(()=>{setTimeout(()=>{window.print(),this.showReport=!1},100)})},switchSchedule(){this.deepAccess()&&(this.activeSection="schedule")},handleFiles(l){this.imgText=l.target.files[0].name,this.form.attachments={file:l.target.files[0]}},handleImg(l){this.fileText=l.target.files[0].name,this.fileattachments={file:l.target.files[0]}},validateForm(){const l=["taskName","description","maintenanceType","component","priority","estimatedHours","recurrence","lastPerformed","assignedTo"];for(const t of l)if(!this.form[t])return this.$emit("show-message",{type:"error",title:"Missing info",message:`Please fill in the required field: ${t}`}),!1;return!0},handleSectionClick(l){this.activeSection=l.id,typeof l.onClick=="function"&&l.onClick()},calculateNextDue(){const l=this.form.lastPerformed?new Date(this.form.lastPerformed):null,t=this.form.recurrence;if(!l||!t)return;let s=new Date(l);switch(t){case"daily":s.setDate(s.getDate()+1);break;case"weekly":s.setDate(s.getDate()+7);break;case"monthly":s.setMonth(s.getMonth()+1);break;case"quarterly":s.setMonth(s.getMonth()+3);break;case"semi-annual":s.setMonth(s.getMonth()+6);break;case"annual":s.setFullYear(s.getFullYear()+1);break;case"once":case"custom":return}this.form.nextDue=s.toISOString().split("T")[0]},calculateRemainingDays(){if(!this.form.nextDue){this.form.remainingDays=null;return}const l=new Date,t=new Date(this.form.nextDue);l.setHours(0,0,0,0),t.setHours(0,0,0,0);const s=t-l,a=Math.ceil(s/(1e3*60*60*24));this.form.remainingDays=`${a} Days`},async saveSchedule(){if(this.isSaving=!0,!this.validateForm()){this.isSaving=!1;return}const l={...this.form};if(this.form.component==="Other"&&this.form.customComponent&&(l.component=this.form.customComponent),l.email=this.companyInfo.email,this.tasks.some(s=>s.component===l.component)){this.$emit("show-message",{type:"error",title:"Duplicate Component",message:`A task with the component "${l.component}" already exists in maintenance`}),this.isSaving=!1;return}delete l.customComponent,this.$emit("save-schedule",{taskData:l,file:l.attachments.file,callback:s=>{this.isSaving=!1,s&&(this.loadChecklist(l.component),this.lastSection="schedule",this.currentTask=l.component,this.resetForm(),this.activeSection="maintenance")}})},resetForm(){this.form={taskName:"",description:"",maintenanceType:"",component:"",priority:"",dueDate:"",estimatedHours:null,assignedTo:"",recurrence:"",lastPerformed:"",nextDue:"",notifyEmail:!0,notifySms:!0,reminderDays:"1",estimatedDuration:null,notes:"",status:"Soon",remainingDays:null,attachments:{}}},toggleTask(l){l.completed=!l.completed},async resetTasks(){const t=this.checklists.every(a=>a.completed)?"Completed":"In Progress",s={checklistProgress:[...this.checklists],status:t,component:this.currentTask,after:this.after};this.$emit("update-task",{updateData:s,file:this.fileattachments.file,callback:(a,o)=>{a&&(o&&(this.after=o),this.fileattachments={},this.fileText="Drag and drop files here or",this.refreshKey+=1,this.activeSection="inventory")}})},loadMaintenanceData(){this.reportId="MT-"+Math.random().toString(36).substr(2,9).toUpperCase(),this.reportDate=new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})},formatDate(l){return l?new Date(l).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"N/A"},getTaskStatusClass(l){return l.status==="Completed"?"completed":l.status==="Overdue"?"overdue":l.status==="In Progress"?"in-progress":"pending"},getChecklistProgress(l){if(!l.checklistProgress||l.checklistProgress.length===0)return 0;const t=l.checklistProgress.filter(s=>s.completed).length;return Math.round(t/l.checklistProgress.length*100)},getCompletedChecklistItems(l){return l.checklistProgress?l.checklistProgress.filter(t=>t.completed).length:0},generateRecommendations(){return["Maintain regular communication with assigned technicians","Ensure all safety protocols are followed during maintenance activities","Update task progress and notes in real-time for accurate reporting"]},deleteEvidence(){this.$emit("delete-evidence",{currentTask:this.currentTask,callback:l=>{l&&(this.after=null,this.fileText="Drag and drop files here or",this.fileattachments={},this.refreshKey+=1)}})}}},ce={key:0},me=["onClick"],pe={class:"content"},he={key:0,class:"loading-container"},fe={key:1},ge={class:"container"},Ee={class:"d-flex justify-content-between align-items-center"},ye={class:"progress-container"},Ve={class:"progress-info"},Ne={class:"progress-bar"},ke={class:"checklist"},be=["onClick"],we={key:0},Ce=["onClick"],ue=["onClick"],De={key:0},Se={class:"checklist"},Be={class:"checklist-item"},_e={class:"attachment-area"},xe={key:2,class:"status"},Te={class:"form-group"},Ae={class:"form-group"},Me={class:"input-group"},Pe={class:"form-group"},Le={class:"form-group"},Fe={class:"input-group"},Ue={class:"form-group"},Ie={class:"form-group"},Re={class:"input-group"},Oe={class:"form-group"},He={class:"form-group"},ze=["value"],qe={class:"input-group"},je={class:"form-group"},$e={class:"input-group"},Qe={class:"form-group"},Ye={class:"form-group"},Ke={class:"form-group"},We={class:"checkbox-group"},Ge={class:"checkbox-item"},Je={class:"checkbox-item"},Xe={class:"input-group"},Ze={class:"form-group"},ve={class:"form-group"},et={class:"form-group"},tt={class:"attachment-area"},nt={class:"action-buttons"},lt=["disabled"],ot={class:"task-table-wrapper"},st={class:"table-controls"},it={class:"filters"},rt={class:"task-table"},at=["onClick"],dt=["onClick"],ct={key:0},mt={class:"alert alert-primary",role:"alert"},pt={class:"mb-0"},ht={class:"report-container",ref:"reportContainer"},ft={class:"report-info"},gt={class:"info-box"},Et={class:"info-box"},yt={class:"info-box"},Vt={class:"section"},Nt={class:"summary-grid"},kt={class:"summary-card"},bt={class:"summary-number"},wt={class:"section"},Ct={class:"task-header"},ut={class:"task-title"},Dt={class:"task-component"},St={class:"task-details"},Bt={class:"detail-item"},_t={class:"detail-value"},xt={class:"detail-item"},Tt={class:"detail-value"},At={class:"detail-item"},Mt={class:"detail-value"},Pt={class:"detail-item"},Lt={class:"detail-value"},Ft={class:"detail-item"},Ut={class:"detail-value"},It={class:"detail-item"},Rt={class:"detail-value"},Ot={key:0,style:{margin:"15px 0",padding:"10px",background:"white","border-radius":"5px"}},Ht={class:"detail-value"},zt={key:1,style:{margin:"15px 0",padding:"10px",background:"white","border-radius":"5px"}},qt={class:"detail-value"},jt={key:2,class:"checklist-progress"},$t={class:"progress-bar"},Qt={style:{"font-size":"0.9em",color:"#666","margin-top":"5px"}},Yt={class:"checklist-items"},Kt={class:"checklist-icon"},Wt={class:"section"},Gt={class:"info-box"},Jt={class:"signature-section"},Xt={class:"signature-box"},Zt={style:{"margin-top":"10px",color:"#666"}};function vt(l,t,s,a,o,i){return o.ready?(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("div",null,[e.withDirectives(e.createElementVNode("nav",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.sections,n=>(e.openBlock(),e.createElementBlock("button",{key:n.id,class:e.normalizeClass(["nav-btn",{active:o.activeSection===n.id}]),onClick:r=>i.handleSectionClick(n)},e.toDisplayString(n.icon)+" "+e.toDisplayString(n.name),11,me))),128))],512),[[e.vShow,!o.showReport]]),e.withDirectives(e.createElementVNode("div",pe,[e.withDirectives(e.createElementVNode("section",{class:e.normalizeClass(["form-section",{active:o.activeSection==="maintenance"}])},[t[37]||(t[37]=e.createElementVNode("h2",null,"🛠️ Maintenance Tasks",-1)),o.isLoading?(e.openBlock(),e.createElementBlock("div",he,t[27]||(t[27]=[e.createElementVNode("div",{class:"loading-spinner"},null,-1),e.createElementVNode("p",null,"Loading checklist...",-1)]))):e.createCommentVNode("",!0),o.isLoading?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("form",fe,[e.createElementVNode("div",ge,[e.createElementVNode("div",Ee,[t[29]||(t[29]=e.createElementVNode("h1",null,"Maintenance Checklist",-1)),i.showAddTaskButton?(e.openBlock(),e.createElementBlock("button",{key:0,class:"btn btn-outline-custom",onClick:t[0]||(t[0]=e.withModifiers(n=>i.addTask(),["prevent"]))},t[28]||(t[28]=[e.createTextVNode(" Manually Add Task ",-1),e.createElementVNode("i",{class:"fas fa-plus"},null,-1)]))):e.createCommentVNode("",!0)]),e.createElementVNode("div",ye,[e.createElementVNode("div",Ve," Progress: "+e.toDisplayString(i.progress)+"% ("+e.toDisplayString(i.completedCount.length)+"/"+e.toDisplayString(o.checklists.length)+") ",1),e.createElementVNode("div",Ne,[e.createElementVNode("div",{class:"progress-fill",style:e.normalizeStyle({width:i.progress+"%"})},null,4)])]),e.createElementVNode("ul",ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.checklists,n=>(e.openBlock(),e.createElementBlock("li",{key:n.id,class:"checklist-item"},[e.createElementVNode("div",{class:e.normalizeClass(["checkbox",{checked:n.completed}]),onClick:r=>i.toggleTask(n)},[n.completed?(e.openBlock(),e.createElementBlock("span",we,"✓")):e.createCommentVNode("",!0)],10,be),e.createElementVNode("span",{class:e.normalizeClass(["task-text",{completed:n.completed}]),onClick:r=>i.toggleTask(n)},e.toDisplayString(n.text),11,Ce),i.showAddTaskButton?(e.openBlock(),e.createElementBlock("button",{key:0,class:"delete-btn",onClick:r=>i.deleteTask(n.id),title:"Delete task"},t[30]||(t[30]=[e.createStaticVNode('<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)]),8,ue)):e.createCommentVNode("",!0)]))),128))]),o.after?(e.openBlock(),e.createElementBlock("div",De,[t[33]||(t[33]=e.createElementVNode("label",null,"Upload Image Evidence",-1)),e.createElementVNode("ul",Se,[e.createElementVNode("li",Be,[t[32]||(t[32]=e.createElementVNode("span",{class:"task-text"}," Image Evidence Already Uploaded ",-1)),e.createElementVNode("button",{type:"button",class:"delete-btn",onClick:t[1]||(t[1]=n=>i.deleteEvidence()),title:"Delete Image"},t[31]||(t[31]=[e.createStaticVNode('<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)]))])])])):(e.openBlock(),e.createElementBlock("div",{class:"form-group",key:o.refreshKey||"default"},[t[35]||(t[35]=e.createElementVNode("label",null,"Upload Image Evidence",-1)),t[36]||(t[36]=e.createElementVNode("p",null,"You can only upload one image evidence here.",-1)),e.createElementVNode("div",_e,[e.createElementVNode("p",null,e.toDisplayString(o.fileText),1),e.createElementVNode("input",{type:"file",id:"evidence-files",class:"file-input",onChange:t[2]||(t[2]=(...n)=>i.handleImg&&i.handleImg(...n))},null,32),t[34]||(t[34]=e.createElementVNode("label",{for:"evidence-files",class:"file-label"},"Browse Files",-1))])])),i.completedCount===o.checklists.length?(e.openBlock(),e.createElementBlock("div",xe," All tasks completed! ✅ ")):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"reset-button",onClick:t[3]||(t[3]=e.withModifiers((...n)=>i.resetTasks&&i.resetTasks(...n),["prevent"]))},e.toDisplayString(i.checklistButtonLabel),1)])]))],2),[[e.vShow,o.activeSection==="maintenance"]]),e.withDirectives(e.createElementVNode("section",{class:e.normalizeClass(["form-section",{active:o.activeSection==="schedule"}])},[t[62]||(t[62]=e.createElementVNode("h2",null,"📅 Maintenance Schedule",-1)),e.createElementVNode("form",null,[e.createElementVNode("div",Te,[t[38]||(t[38]=e.createElementVNode("label",{for:"task-name"},"Task Name",-1)),e.withDirectives(e.createElementVNode("input",{type:"text",id:"task-name","onUpdate:modelValue":t[4]||(t[4]=n=>o.form.taskName=n),required:""},null,512),[[e.vModelText,o.form.taskName]])]),e.createElementVNode("div",Ae,[t[39]||(t[39]=e.createElementVNode("label",{for:"task-description"},"Description",-1)),e.withDirectives(e.createElementVNode("textarea",{id:"task-description","onUpdate:modelValue":t[5]||(t[5]=n=>o.form.description=n),required:""},null,512),[[e.vModelText,o.form.description]])]),e.createElementVNode("div",Me,[e.createElementVNode("div",Pe,[t[41]||(t[41]=e.createElementVNode("label",{for:"maintenance-type"},"Maintenance Type",-1)),e.withDirectives(e.createElementVNode("select",{id:"maintenance-type","onUpdate:modelValue":t[6]||(t[6]=n=>o.form.maintenanceType=n),required:""},t[40]||(t[40]=[e.createStaticVNode('<option value="">-- Select Type --</option><option value="preventive">Preventive</option><option value="corrective">Corrective</option><option value="predictive">Predictive</option><option value="condition">Condition-Based</option>',5)]),512),[[e.vModelSelect,o.form.maintenanceType]])]),e.createElementVNode("div",Le,[t[43]||(t[43]=e.createElementVNode("label",{for:"component"},"Component/System",-1)),e.withDirectives(e.createElementVNode("select",{id:"component","onUpdate:modelValue":t[7]||(t[7]=n=>o.form.component=n),required:""},t[42]||(t[42]=[e.createStaticVNode('<option value="">-- Select Component --</option><option value="engine">Engine</option><option value="hull">Hull</option><option value="electronics">Electronics</option><option value="deck">Deck Machinery</option><option value="plumbing">Plumbing</option><option value="electrical">Electrical</option><option value="hvac">HVAC</option><option value="safety">Safety Systems</option><option value="Other">Other</option>',10)]),512),[[e.vModelSelect,o.form.component]]),o.form.component==="Other"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"text",placeholder:"Enter custom component/system","onUpdate:modelValue":t[8]||(t[8]=n=>o.form.customComponent=n),style:{"margin-top":"8px"}},null,512)),[[e.vModelText,o.form.customComponent]]):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Fe,[e.createElementVNode("div",Ue,[t[45]||(t[45]=e.createElementVNode("label",{for:"priority"},"Priority",-1)),e.withDirectives(e.createElementVNode("select",{id:"priority","onUpdate:modelValue":t[9]||(t[9]=n=>o.form.priority=n),required:""},t[44]||(t[44]=[e.createElementVNode("option",{value:"low"},"Low",-1),e.createElementVNode("option",{value:"medium"},"Medium",-1),e.createElementVNode("option",{value:"high"},"High",-1),e.createElementVNode("option",{value:"critical"},"Critical",-1)]),512),[[e.vModelSelect,o.form.priority]])]),e.createElementVNode("div",Ie,[t[46]||(t[46]=e.createElementVNode("label",{for:"status"},"Status",-1)),e.withDirectives(e.createElementVNode("input",{type:"text",id:"status","onUpdate:modelValue":t[10]||(t[10]=n=>o.form.status=n),readonly:""},null,512),[[e.vModelText,o.form.status]])])]),e.createElementVNode("div",Re,[e.createElementVNode("div",Oe,[t[47]||(t[47]=e.createElementVNode("label",{for:"estimated-hours"},"Estimated Hours",-1)),e.withDirectives(e.createElementVNode("input",{type:"number",id:"estimated-hours","onUpdate:modelValue":t[11]||(t[11]=n=>o.form.estimatedHours=n),min:"0",step:"0.5"},null,512),[[e.vModelText,o.form.estimatedHours]])])]),e.createElementVNode("div",He,[t[49]||(t[49]=e.createElementVNode("label",{for:"assigned-to"},"Assigned To",-1)),e.withDirectives(e.createElementVNode("select",{id:"assigned-to","onUpdate:modelValue":t[12]||(t[12]=n=>o.form.assignedTo=n)},[t[48]||(t[48]=e.createElementVNode("option",{value:""},"-- Select Personnel --",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.vesselCrew,n=>(e.openBlock(),e.createElementBlock("option",{key:n.id,value:`${n.name} - ${n.role}`},e.toDisplayString(n.name)+" - "+e.toDisplayString(n.role),9,ze))),128))],512),[[e.vModelSelect,o.form.assignedTo]])]),e.createElementVNode("div",qe,[e.createElementVNode("div",je,[t[51]||(t[51]=e.createElementVNode("label",{for:"recurrence-type"},"Recurrence",-1)),e.withDirectives(e.createElementVNode("select",{id:"recurrence-type","onUpdate:modelValue":t[13]||(t[13]=n=>o.form.recurrence=n),required:""},t[50]||(t[50]=[e.createStaticVNode('<option value="once">One-time</option><option value="daily">Daily</option><option value="weekly">Weekly</option><option value="monthly">Monthly</option><option value="quarterly">Quarterly</option><option value="semi-annual">Semi-annually</option><option value="annual">Annually</option><option value="custom">Custom Interval</option>',8)]),512),[[e.vModelSelect,o.form.recurrence]])])]),e.createElementVNode("div",$e,[e.createElementVNode("div",Qe,[t[52]||(t[52]=e.createElementVNode("label",{for:"last-performed"},"Last Performed Date",-1)),e.withDirectives(e.createElementVNode("input",{type:"date",id:"last-performed","onUpdate:modelValue":t[14]||(t[14]=n=>o.form.lastPerformed=n)},null,512),[[e.vModelText,o.form.lastPerformed]])]),e.createElementVNode("div",Ye,[t[53]||(t[53]=e.createElementVNode("label",{for:"next-due"},"Due Date",-1)),e.withDirectives(e.createElementVNode("input",{type:"date",id:"next-due","onUpdate:modelValue":t[15]||(t[15]=n=>o.form.nextDue=n),required:""},null,512),[[e.vModelText,o.form.nextDue]])])]),e.createElementVNode("div",Ke,[t[56]||(t[56]=e.createElementVNode("label",null,"Notifications",-1)),e.createElementVNode("div",We,[e.createElementVNode("div",Ge,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",id:"notify-email","onUpdate:modelValue":t[16]||(t[16]=n=>o.form.notifyEmail=n)},null,512),[[e.vModelCheckbox,o.form.notifyEmail]]),t[54]||(t[54]=e.createElementVNode("label",{for:"notify-email"},"Email Notification",-1))]),e.createElementVNode("div",Je,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",id:"notify-sms","onUpdate:modelValue":t[17]||(t[17]=n=>o.form.notifySms=n)},null,512),[[e.vModelCheckbox,o.form.notifySms]]),t[55]||(t[55]=e.createElementVNode("label",{for:"notify-sms"},"SMS Notification",-1))])])]),e.createElementVNode("div",Xe,[e.createElementVNode("div",Ze,[t[58]||(t[58]=e.createElementVNode("label",{for:"reminder-days"},"Reminder (Days Before)",-1)),e.withDirectives(e.createElementVNode("select",{id:"reminder-days","onUpdate:modelValue":t[18]||(t[18]=n=>o.form.reminderDays=n)},t[57]||(t[57]=[e.createStaticVNode('<option value="1">1 day</option><option value="3">3 days</option><option value="7">1 week</option><option value="14">2 weeks</option><option value="30">1 month</option>',5)]),512),[[e.vModelSelect,o.form.reminderDays]])])]),e.createElementVNode("div",ve,[t[59]||(t[59]=e.createElementVNode("label",{for:"schedule-notes"},"Notes",-1)),e.withDirectives(e.createElementVNode("textarea",{id:"schedule-notes","onUpdate:modelValue":t[19]||(t[19]=n=>o.form.notes=n)},null,512),[[e.vModelText,o.form.notes]])]),e.createElementVNode("div",et,[t[61]||(t[61]=e.createElementVNode("label",null,"Attachments",-1)),e.createElementVNode("div",tt,[e.createElementVNode("p",null,e.toDisplayString(o.imgText),1),e.createElementVNode("input",{type:"file",id:"maintenance-files",class:"file-input",onChange:t[20]||(t[20]=(...n)=>i.handleFiles&&i.handleFiles(...n)),multiple:""},null,32),t[60]||(t[60]=e.createElementVNode("label",{for:"maintenance-files",class:"file-label"},"Browse Files",-1))])]),e.createElementVNode("div",nt,[e.createElementVNode("button",{type:"button",class:"btn btn-primary",onClick:t[21]||(t[21]=e.withModifiers((...n)=>i.saveSchedule&&i.saveSchedule(...n),["prevent"])),disabled:o.isSaving},e.toDisplayString(o.isSaving?"Saving...":"Save Schedule"),9,lt)])])],2),[[e.vShow,o.activeSection==="schedule"]]),e.withDirectives(e.createElementVNode("section",{class:e.normalizeClass(["form-section",{active:o.activeSection==="inventory"}])},[t[68]||(t[68]=e.createElementVNode("h2",null,"All Maintenance",-1)),e.createElementVNode("div",ot,[e.createElementVNode("div",st,[e.createElementVNode("div",it,[e.createElementVNode("button",{class:e.normalizeClass({active:o.activeFilter==="due"}),onClick:t[22]||(t[22]=n=>i.setFilter("due"))},"Due",2),e.createElementVNode("button",{class:e.normalizeClass({active:o.activeFilter==="all"}),onClick:t[23]||(t[23]=n=>i.setFilter("all"))},"All",2),e.createElementVNode("button",{class:e.normalizeClass({active:o.activeFilter==="completed"}),onClick:t[24]||(t[24]=n=>i.setFilter("completed"))},"Completed",2),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":t[25]||(t[25]=n=>o.searchQuery=n),placeholder:"Search..."},null,512),[[e.vModelText,o.searchQuery]])])]),e.createElementVNode("table",rt,[t[63]||(t[63]=e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",null,"Equipment"),e.createElementVNode("th",null,"Task Name"),e.createElementVNode("th",null,"Assigned To"),e.createElementVNode("th",null,"Intervals"),e.createElementVNode("th",null,"Remaining"),e.createElementVNode("th",null,"Next Due"),e.createElementVNode("th",null,"Status"),e.createElementVNode("th",null,"Action")])],-1)),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.filteredTasks,n=>(e.openBlock(),e.createElementBlock("tr",{key:n.id},[e.createElementVNode("td",null,e.toDisplayString(n.component),1),e.createElementVNode("td",null,e.toDisplayString(n.taskName),1),e.createElementVNode("td",null,e.toDisplayString(n.assignedTo),1),e.createElementVNode("td",null,e.toDisplayString(n.recurrence),1),e.createElementVNode("td",null,e.toDisplayString(n.remainingDays),1),e.createElementVNode("td",null,e.toDisplayString(n.nextDue),1),e.createElementVNode("td",null,[e.createElementVNode("span",{class:e.normalizeClass(["status-badge",n.status.toLowerCase().replace(" ","-")])},e.toDisplayString(n.status),3)]),e.createElementVNode("td",null,[n.status==="Completed"?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:r=>i.printMaintenance(n.component),class:"status-action"},"Print",8,at)):(e.openBlock(),e.createElementBlock("button",{key:1,onClick:r=>i.showMaintenance(n.component),class:"status-action"},"Start",8,dt))])]))),128))])]),s.tasks.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ct,[e.createElementVNode("div",mt,[t[65]||(t[65]=e.createElementVNode("h4",{class:"alert-heading"},"Such Empty!!!",-1)),t[66]||(t[66]=e.createElementVNode("p",null,"You have no maintenance, because you have not scheduled any for this ship.",-1)),t[67]||(t[67]=e.createElementVNode("hr",null,null,-1)),e.createElementVNode("p",pt,[t[64]||(t[64]=e.createTextVNode("Navigate to the schedule tab, to start scheduling. Or click on this button to ",-1)),e.createElementVNode("button",{type:"button",class:"btn btn-primary",onClick:t[26]||(t[26]=n=>i.switchSchedule())},"Schedule")])])]))])],2),[[e.vShow,o.activeSection==="inventory"]])],512),[[e.vShow,!o.showReport]]),e.withDirectives(e.createElementVNode("div",ht,[t[89]||(t[89]=e.createElementVNode("div",{class:"header"},[e.createElementVNode("div",{class:"report-title"},"MAINTENANCE TASK REPORT")],-1)),e.createElementVNode("div",ft,[e.createElementVNode("div",gt,[t[69]||(t[69]=e.createElementVNode("div",{class:"info-label"},"Report Generated:",-1)),e.createElementVNode("div",null,e.toDisplayString(o.reportDate),1)]),e.createElementVNode("div",Et,[t[70]||(t[70]=e.createElementVNode("div",{class:"info-label"},"Report ID:",-1)),e.createElementVNode("div",null,e.toDisplayString(o.reportId),1)]),e.createElementVNode("div",yt,[t[71]||(t[71]=e.createElementVNode("div",{class:"info-label"},"Total Tasks:",-1)),e.createElementVNode("div",null,e.toDisplayString(o.maintenanceTasks.length),1)]),t[72]||(t[72]=e.createElementVNode("div",{class:"info-box"},[e.createElementVNode("div",{class:"info-label"},"Generated By:"),e.createElementVNode("div",null,"OceanHelm System")],-1))]),e.createElementVNode("div",Vt,[t[75]||(t[75]=e.createElementVNode("div",{class:"section-title"},"📊 Task Summary",-1)),e.createElementVNode("div",Nt,[t[74]||(t[74]=e.createStaticVNode('<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)),e.createElementVNode("div",kt,[e.createElementVNode("div",bt,e.toDisplayString(i.totalEstimatedHours),1),t[73]||(t[73]=e.createElementVNode("div",{class:"summary-label"},"Total Hours",-1))])])]),e.createElementVNode("div",wt,[t[85]||(t[85]=e.createElementVNode("div",{class:"section-title"},"🔧 Maintenance Tasks",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.maintenanceTasks,n=>(e.openBlock(),e.createElementBlock("div",{key:n.taskName,class:e.normalizeClass(["task-item",i.getTaskStatusClass(n)])},[e.createElementVNode("div",Ct,[e.createElementVNode("div",null,[e.createElementVNode("div",ut,[e.createTextVNode(e.toDisplayString(n.taskName)+" ",1),e.createElementVNode("span",{class:e.normalizeClass(["maintenance-type","type-"+n.maintenanceType])},e.toDisplayString(n.maintenanceType),3)]),e.createElementVNode("div",Dt,"Component: "+e.toDisplayString(n.component),1)]),e.createElementVNode("span",{class:e.normalizeClass(["status-badge","status-"+n.status.toLowerCase().replace(" ","-")])},e.toDisplayString(n.status),3)]),e.createElementVNode("div",St,[e.createElementVNode("div",Bt,[t[76]||(t[76]=e.createElementVNode("div",{class:"detail-label"},"Assigned To",-1)),e.createElementVNode("div",_t,e.toDisplayString(n.assignedTo),1)]),e.createElementVNode("div",xt,[t[77]||(t[77]=e.createElementVNode("div",{class:"detail-label"},"Estimated Hours",-1)),e.createElementVNode("div",Tt,e.toDisplayString(n.estimatedHours)+" hours",1)]),e.createElementVNode("div",At,[t[78]||(t[78]=e.createElementVNode("div",{class:"detail-label"},"Last Performed",-1)),e.createElementVNode("div",Mt,e.toDisplayString(i.formatDate(n.lastPerformed)),1)]),e.createElementVNode("div",Pt,[t[79]||(t[79]=e.createElementVNode("div",{class:"detail-label"},"Next Due",-1)),e.createElementVNode("div",Lt,e.toDisplayString(i.formatDate(n.nextDue)),1)]),e.createElementVNode("div",Ft,[t[80]||(t[80]=e.createElementVNode("div",{class:"detail-label"},"Recurrence",-1)),e.createElementVNode("div",Ut,e.toDisplayString(n.recurrence),1)]),e.createElementVNode("div",It,[t[81]||(t[81]=e.createElementVNode("div",{class:"detail-label"},"Remaining Days",-1)),e.createElementVNode("div",Rt,e.toDisplayString(n.remainingDays)+" days",1)])]),n.description?(e.openBlock(),e.createElementBlock("div",Ot,[t[82]||(t[82]=e.createElementVNode("div",{class:"detail-label"},"Description",-1)),e.createElementVNode("div",Ht,e.toDisplayString(n.description),1)])):e.createCommentVNode("",!0),n.notes?(e.openBlock(),e.createElementBlock("div",zt,[t[83]||(t[83]=e.createElementVNode("div",{class:"detail-label"},"Notes",-1)),e.createElementVNode("div",qt,e.toDisplayString(n.notes),1)])):e.createCommentVNode("",!0),n.checklistProgress&&n.checklistProgress.length>0?(e.openBlock(),e.createElementBlock("div",jt,[t[84]||(t[84]=e.createElementVNode("div",{class:"detail-label"},"Checklist Progress",-1)),e.createElementVNode("div",$t,[e.createElementVNode("div",{class:"progress-fill",style:e.normalizeStyle({width:i.getChecklistProgress(n)+"%"})},null,4)]),e.createElementVNode("div",Qt,e.toDisplayString(i.getCompletedChecklistItems(n))+" of "+e.toDisplayString(n.checklistProgress.length)+" items completed ("+e.toDisplayString(i.getChecklistProgress(n))+"%) ",1),e.createElementVNode("div",Yt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.checklistProgress,(r,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"checklist-item"},[e.createElementVNode("span",Kt,e.toDisplayString(r.completed?"✅":"⭕"),1),e.createElementVNode("span",null,e.toDisplayString(r.text||"Checklist Item "+(d+1)),1)]))),128))])])):e.createCommentVNode("",!0)],2))),128))]),e.createElementVNode("div",Wt,[t[86]||(t[86]=e.createElementVNode("div",{class:"section-title"},"📋 Recommendations",-1)),e.createElementVNode("div",Gt,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.generateRecommendations(),n=>(e.openBlock(),e.createElementBlock("li",{key:n},e.toDisplayString(n),1))),128))])])]),e.createElementVNode("div",Jt,[t[88]||(t[88]=e.createElementVNode("div",{class:"signature-box"},[e.createElementVNode("div",null,[e.createElementVNode("strong",null,"Report Generated By")]),e.createElementVNode("div",{style:{"margin-top":"10px",color:"#666"}},"OceanHelm Maintenance System")],-1)),e.createElementVNode("div",Xt,[t[87]||(t[87]=e.createElementVNode("div",null,[e.createElementVNode("strong",null,"Date")],-1)),e.createElementVNode("div",Zt,e.toDisplayString(o.reportDate),1)])])],512),[[e.vShow,o.showReport]])])])):e.createCommentVNode("",!0)}const g=m(de,[["render",vt]]),ul="",en={name:"ActivityLogs",props:{loading:Boolean,searchTerm:String,selectedFilter:String,logs:Array,paginatedLogs:Array,totalActivities:Number,todayActivities:Number,activeUsers:Number,totalPages:Number,currentPage:Number},emits:["update:searchTerm","update:selectedFilter","refresh","download","change-page"],methods:{formatDate(l){return new Date(l).toLocaleString()},getBadgeClass(l){return{login:"badge-login",logout:"badge-logout",create:"badge-create",update:"badge-update",delete:"badge-delete",view:"badge-view"}[l]||"badge-view"}}},tn={class:"activity-logs"},nn={class:"controls"},ln={class:"search-box"},on=["value"],sn=["value"],rn={class:"stats-grid"},an={class:"stat-card"},dn={class:"value"},cn={class:"stat-card"},mn={class:"value"},pn={class:"stat-card"},hn={class:"value"},fn={class:"logs-container"},gn={key:0,class:"loading"},En={key:1,class:"no-logs"},yn={key:2},Vn={class:"logs-table"},Nn={style:{color:"gray"}},kn={style:{color:"gray"}},bn={class:"pagination"},wn=["disabled"],Cn=["onClick"],un=["disabled"];function Dn(l,t,s,a,o,i){return e.openBlock(),e.createElementBlock("div",tn,[t[14]||(t[14]=e.createElementVNode("div",{class:"header"},[e.createElementVNode("h1",null,"Activity Logs"),e.createElementVNode("p",null,"Monitor and track all system activities in real-time")],-1)),e.createElementVNode("div",nn,[e.createElementVNode("div",ln,[e.createElementVNode("input",{type:"text",placeholder:"Search activities, users, or actions...",value:s.searchTerm,onInput:t[0]||(t[0]=n=>l.$emit("update:searchTerm",n.target.value))},null,40,on)]),e.createElementVNode("select",{class:"filter-select",value:s.selectedFilter,onChange:t[1]||(t[1]=n=>l.$emit("update:selectedFilter",n.target.value))},t[6]||(t[6]=[e.createStaticVNode('<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)]),40,sn),e.createElementVNode("button",{class:"btn btn-primary",onClick:t[2]||(t[2]=n=>l.$emit("refresh"))},"🔄 Refresh"),e.createElementVNode("button",{class:"btn btn-secondary",onClick:t[3]||(t[3]=n=>l.$emit("download"))},"📥 Download Report")]),e.createElementVNode("div",rn,[e.createElementVNode("div",an,[t[7]||(t[7]=e.createElementVNode("h3",null,"Total Activities",-1)),e.createElementVNode("div",dn,e.toDisplayString(s.totalActivities),1)]),e.createElementVNode("div",cn,[t[8]||(t[8]=e.createElementVNode("h3",null,"Today's Activities",-1)),e.createElementVNode("div",mn,e.toDisplayString(s.todayActivities),1)]),e.createElementVNode("div",pn,[t[9]||(t[9]=e.createElementVNode("h3",null,"Active Users",-1)),e.createElementVNode("div",hn,e.toDisplayString(s.activeUsers),1)]),t[10]||(t[10]=e.createElementVNode("div",{class:"stat-card"},[e.createElementVNode("h3",null,"Important"),e.createElementVNode("div",{class:"badge-danger"}," Logs are deleted at the end of every month, please download a copy ")],-1))]),e.createElementVNode("div",fn,[s.loading?(e.openBlock(),e.createElementBlock("div",gn,t[11]||(t[11]=[e.createElementVNode("div",{class:"spinner"},null,-1),e.createElementVNode("p",null,"Loading activity logs...",-1)]))):s.logs.length===0?(e.openBlock(),e.createElementBlock("div",En,t[12]||(t[12]=[e.createElementVNode("h3",null,"No activities found",-1),e.createElementVNode("p",null,"Try adjusting your search or filter criteria",-1)]))):(e.openBlock(),e.createElementBlock("div",yn,[e.createElementVNode("table",Vn,[t[13]||(t[13]=e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",null,"Timestamp"),e.createElementVNode("th",null,"User Name"),e.createElementVNode("th",null,"Action"),e.createElementVNode("th",null,"Details"),e.createElementVNode("th",null,"Section")])],-1)),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.paginatedLogs,n=>(e.openBlock(),e.createElementBlock("tr",{key:n.id},[e.createElementVNode("td",null,e.toDisplayString(i.formatDate(n.timestamp)),1),e.createElementVNode("td",null,[e.createElementVNode("div",null,e.toDisplayString(n.user_name),1),e.createElementVNode("small",Nn,e.toDisplayString(n.email),1)]),e.createElementVNode("td",null,[e.createElementVNode("span",{class:e.normalizeClass(["activity-badge",i.getBadgeClass(n.action)])},e.toDisplayString(n.action),3)]),e.createElementVNode("td",null,[e.createTextVNode(e.toDisplayString(n.details.status)+" ",1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.details.information,(r,d)=>(e.openBlock(),e.createElementBlock("div",{key:d},[e.createElementVNode("strong",null,e.toDisplayString(d)+": ",1),e.createElementVNode("small",kn,e.toDisplayString(r.from||"")+" → "+e.toDisplayString(r.to||r),1)]))),128))]),e.createElementVNode("td",null,e.toDisplayString(n.table_name),1)]))),128))])]),e.createElementVNode("div",bn,[e.createElementVNode("button",{onClick:t[4]||(t[4]=n=>l.$emit("change-page",s.currentPage-1)),disabled:s.currentPage===1}," Previous ",8,wn),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.totalPages,n=>(e.openBlock(),e.createElementBlock("button",{key:n,onClick:r=>l.$emit("change-page",n),class:e.normalizeClass({active:s.currentPage===n})},e.toDisplayString(n),11,Cn))),128)),e.createElementVNode("button",{onClick:t[5]||(t[5]=n=>l.$emit("change-page",s.currentPage+1)),disabled:s.currentPage===s.totalPages}," Next ",8,un)])]))])])}const E=m(en,[["render",Dn]]),Dl="",Sn={name:"CrewManagement",props:{crew:{type:Array,required:!0,default:()=>[]},vesselName:{type:String,default:""},userProfile:{type:Object,default:()=>({role:"viewer"})},loading:{type:Boolean,default:!1},availableRoles:{type:Array,default:()=>["Captain","First Officer","Engineer","Deckhand","Mechanic","Cook"]},config:{type:Object,default:()=>({showWaveBackground:!0,enableAdd:!0,enableEdit:!0,enableDelete:!0,enableAssignShift:!0,enableCertificationManagement:!0})}},emits:["crew-add","crew-edit","crew-delete","crew-assign-shift","crew-add-certification","crew-view-certification","search-changed","filter-changed","access-denied"],data(){return{searchQuery:"",filterStatus:"all",showAddForm:!1,formErrors:{},newCrew:{name:"",role:"Deckhand",customRole:"",status:"available",nextShift:"",certifications:[{name:"",expiryDate:""}],notes:"",email:"",onBoard:""}}},computed:{sectionTitle(){return this.vesselName?`Current Crew for ${this.vesselName}`:"All Fleet Crew"},filteredCrew(){return this.crew.filter(l=>{const t=this.searchQuery===""||l.name.toLowerCase().includes(this.searchQuery.toLowerCase())||l.role.toLowerCase().includes(this.searchQuery.toLowerCase())||l.vessel&&l.vessel.toLowerCase().includes(this.searchQuery.toLowerCase()),s=this.filterStatus==="all"||l.status===this.filterStatus;return t&&s})},canAddCrew(){return this.config.enableAdd&&this.hasPermission("add")},canEditCrew(){return this.config.enableEdit&&this.hasPermission("edit")},canDeleteCrew(){return this.config.enableDelete&&this.hasPermission("delete")},canAssignShift(){return this.config.enableAssignShift&&this.hasPermission("assign")}},methods:{hasPermission(l){var a;const{role:t}=this.userProfile;return((a={owner:["add","edit","delete","assign","view"],staff:["add","edit","assign","view"],captain:["assign","view"],viewer:["view"]}[t])==null?void 0:a.includes(l))||!1},handleToggleAddForm(){if(!this.canAddCrew){this.$emit("access-denied",{action:"add crew",userProfile:this.userProfile});return}this.showAddForm=!this.showAddForm,this.showAddForm||this.resetForm()},handleSearch(){this.$emit("search-changed",this.searchQuery)},handleFilter(){this.$emit("filter-changed",this.filterStatus)},handleAddCrewMember(){if(!this.validateForm())return;const l=this.newCrew.certifications.filter(a=>a.name.trim()!==""&&a.expiryDate!==""),t=this.newCrew.role==="Other"?this.newCrew.customRole:this.newCrew.role,s={name:this.newCrew.name,role:t,status:this.newCrew.status,certifications:l,notes:this.newCrew.notes,vessel:this.vesselName,email:this.newCrew.email,onBoard:this.newCrew.onBoard,nextShift:this.newCrew.nextShift};this.$emit("crew-add",s),this.resetForm(),this.showAddForm=!1},handleCancelForm(){this.showAddForm=!1,this.resetForm()},handleDeleteCrew(l){if(!this.canDeleteCrew){this.$emit("access-denied",{action:"delete crew",userProfile:this.userProfile});return}this.$emit("crew-delete",l)},handleAssignShift(l){if(!this.canAssignShift){this.$emit("access-denied",{action:"assign shift",userProfile:this.userProfile});return}this.$emit("crew-assign-shift",l)},handleAddCertification(l){if(!this.canEditCrew){this.$emit("access-denied",{action:"add certification",userProfile:this.userProfile});return}this.$emit("crew-add-certification",l)},handleViewCertification(l,t){this.$emit("crew-view-certification",{certification:l,member:t})},resetForm(){this.newCrew={name:"",role:"Deckhand",customRole:"",status:"available",nextShift:"",certifications:[{name:"",expiryDate:""}],notes:"",email:"",onBoard:""},this.formErrors={}},validateForm(){this.formErrors={};const l={name:"Full Name",email:"Email Address"};return Object.keys(l).forEach(t=>{(!this.newCrew[t]||this.newCrew[t].trim()==="")&&(this.formErrors[t]=`${l[t]} is required`)}),this.newCrew.email&&!this.isValidEmail(this.newCrew.email)&&(this.formErrors.email="Please enter a valid email address"),this.newCrew.role==="Other"&&(!this.newCrew.customRole||this.newCrew.customRole.trim()==="")&&(this.formErrors.customRole='Custom role is required when "Other" is selected'),Object.keys(this.formErrors).length===0},isValidEmail(l){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(l)},addCertificationEntry(){this.newCrew.certifications.push({name:"",expiryDate:""})},removeCertification(l){this.newCrew.certifications.splice(l,1)},formatStatus(l){return l?l.charAt(0).toUpperCase()+l.slice(1):""},getStatusClass(l){return{available:"status-available",onduty:"status-onduty",unavailable:"status-unavailable"}[l]||""},getCertificationClass(l){const t=this.getExpiryStatus(l);return{expired:"text-danger",expiringSoon:"text-warning",valid:"text-success"}[t]||""},getExpiryStatus(l){if(!l)return"none";const t=new Date(l),s=new Date,a=new Date;return a.setMonth(s.getMonth()+1),t<=s?"expired":t<=a?"expiringSoon":"valid"}}},Bn={class:"crew-management"},_n={key:0,class:"wave-bg"},xn={class:"crew-section"},Tn={class:"section-header"},An={class:"search-filter"},Mn={key:0,class:"loading-state"},Pn={key:1,class:"crew-grid"},Ln={class:"crew-name"},Fn={class:"crew-role"},Un={class:"crew-certifications"},In=["onClick"],Rn=["onClick"],On={class:"crew-availability"},Hn={class:"crew-availability"},zn={class:"action-buttons"},qn={key:0,class:"status-available crew-availability vcard"},jn={key:1,class:"status-unavailable crew-availability vcard"},$n=["onClick"],Qn=["onClick"],Yn={key:2,class:"no-results"},Kn={key:3,class:"add-crew-form"},Wn={class:"form-row"},Gn={class:"form-group"},Jn={key:0,class:"error-message"},Xn={class:"form-group"},Zn=["value"],vn={class:"form-row"},el={class:"form-group"},tl={class:"form-group"},nl={key:0,class:"error-message"},ll={class:"certification-section"},ol={class:"form-row"},sl={class:"form-group"},il=["onUpdate:modelValue"],rl={class:"form-group"},al=["onUpdate:modelValue"],dl={class:"form-group"},cl=["onClick"],ml={class:"form-row"},pl={class:"form-group"},hl={class:"form-actions"};function fl(l,t,s,a,o,i){return e.openBlock(),e.createElementBlock("div",Bn,[s.config.showWaveBackground?(e.openBlock(),e.createElementBlock("div",_n)):e.createCommentVNode("",!0),e.createElementVNode("div",xn,[e.createElementVNode("div",Tn,[e.createElementVNode("h2",null,e.toDisplayString(i.sectionTitle),1),i.canAddCrew?(e.openBlock(),e.createElementBlock("button",{key:0,class:"btn btn-primary",onClick:t[0]||(t[0]=(...n)=>i.handleToggleAddForm&&i.handleToggleAddForm(...n))},e.toDisplayString(o.showAddForm?"Cancel":"+ Add Crew Member"),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",An,[e.withDirectives(e.createElementVNode("input",{type:"text",placeholder:"Search crew by name or role...","onUpdate:modelValue":t[1]||(t[1]=n=>o.searchQuery=n),onInput:t[2]||(t[2]=(...n)=>i.handleSearch&&i.handleSearch(...n))},null,544),[[e.vModelText,o.searchQuery]]),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":t[3]||(t[3]=n=>o.filterStatus=n),onChange:t[4]||(t[4]=(...n)=>i.handleFilter&&i.handleFilter(...n))},t[14]||(t[14]=[e.createElementVNode("option",{value:"all"},"All Statuses",-1),e.createElementVNode("option",{value:"available"},"Available",-1),e.createElementVNode("option",{value:"onduty"},"On Duty",-1),e.createElementVNode("option",{value:"unavailable"},"Unavailable",-1)]),544),[[e.vModelSelect,o.filterStatus]])]),s.loading?(e.openBlock(),e.createElementBlock("div",Mn,t[15]||(t[15]=[e.createElementVNode("div",{class:"spinner-border text-primary",role:"status"},[e.createElementVNode("span",{class:"visually-hidden"},"Loading crew...")],-1),e.createElementVNode("p",null,"Loading crew members...",-1)]))):i.filteredCrew.length>0?(e.openBlock(),e.createElementBlock("div",Pn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.filteredCrew,n=>(e.openBlock(),e.createElementBlock("div",{key:n.id,class:e.normalizeClass(["crew-card",{unavailable:n.status==="unavailable"}])},[e.createElementVNode("div",{class:e.normalizeClass(["status-badge",i.getStatusClass(n.status)])},e.toDisplayString(i.formatStatus(n.status)),3),e.createElementVNode("div",Ln,e.toDisplayString(n.name),1),e.createElementVNode("div",Fn,e.toDisplayString(n.role),1),e.createElementVNode("div",Un,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.certifications,r=>(e.openBlock(),e.createElementBlock("div",{key:r.name,class:e.normalizeClass(["certification-tag",i.getCertificationClass(r.expiryDate)]),onClick:d=>i.handleViewCertification(r,n)},e.toDisplayString(r.name),11,In))),128)),i.canEditCrew?(e.openBlock(),e.createElementBlock("i",{key:0,class:"bi bi-patch-plus-fill icon",onClick:r=>i.handleAddCertification(n)},null,8,Rn)):e.createCommentVNode("",!0)]),e.createElementVNode("div",On,[t[16]||(t[16]=e.createElementVNode("strong",null,"Embarkation Date:",-1)),e.createTextVNode(" "+e.toDisplayString(n.nextShift||"Not Scheduled"),1)]),e.createElementVNode("div",Hn,[t[17]||(t[17]=e.createElementVNode("strong",null,"Expected Days Onboard (in days):",-1)),e.createTextVNode(" "+e.toDisplayString(n.onBoard||"Not Scheduled"),1)]),e.createElementVNode("div",zn,[n.vessel?(e.openBlock(),e.createElementBlock("div",qn," Vessel: "+e.toDisplayString(n.vessel),1)):(e.openBlock(),e.createElementBlock("div",jn," Vessel: Unassigned ")),i.canAssignShift?(e.openBlock(),e.createElementBlock("button",{key:2,class:"btn btn-primary",onClick:r=>i.handleAssignShift(n)}," Assign Shift ",8,$n)):e.createCommentVNode("",!0)]),i.canDeleteCrew?(e.openBlock(),e.createElementBlock("i",{key:0,class:"bi bi-trash icon delete-icon",onClick:r=>i.handleDeleteCrew(n)},null,8,Qn)):e.createCommentVNode("",!0)],2))),128))])):s.loading?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Yn,e.toDisplayString(s.crew.length===0?"No crew members found.":"No crew members found matching your search criteria."),1)),o.showAddForm?(e.openBlock(),e.createElementBlock("div",Kn,[t[28]||(t[28]=e.createElementVNode("h2",null,"Add New Crew Member",-1)),e.createElementVNode("div",Wn,[e.createElementVNode("div",Gn,[t[18]||(t[18]=e.createElementVNode("label",{for:"crew-name"},"Full Name *",-1)),e.withDirectives(e.createElementVNode("input",{type:"text",id:"crew-name","onUpdate:modelValue":t[5]||(t[5]=n=>o.newCrew.name=n),class:e.normalizeClass({error:o.formErrors.name})},null,2),[[e.vModelText,o.newCrew.name]]),o.formErrors.name?(e.openBlock(),e.createElementBlock("div",Jn,e.toDisplayString(o.formErrors.name),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Xn,[t[20]||(t[20]=e.createElementVNode("label",{for:"crew-role"},"Role/Position *",-1)),e.withDirectives(e.createElementVNode("select",{id:"crew-role","onUpdate:modelValue":t[6]||(t[6]=n=>o.newCrew.role=n)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.availableRoles,n=>(e.openBlock(),e.createElementBlock("option",{key:n,value:n},e.toDisplayString(n),9,Zn))),128)),t[19]||(t[19]=e.createElementVNode("option",{value:"Other"},"Other",-1))],512),[[e.vModelSelect,o.newCrew.role]]),o.newCrew.role==="Other"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"text",placeholder:"Enter custom role","onUpdate:modelValue":t[7]||(t[7]=n=>o.newCrew.customRole=n),style:{"margin-top":"8px"}},null,512)),[[e.vModelText,o.newCrew.customRole]]):e.createCommentVNode("",!0)])]),e.createElementVNode("div",vn,[e.createElementVNode("div",el,[t[22]||(t[22]=e.createElementVNode("label",{for:"crew-status"},"Status *",-1)),e.withDirectives(e.createElementVNode("select",{id:"crew-status","onUpdate:modelValue":t[8]||(t[8]=n=>o.newCrew.status=n)},t[21]||(t[21]=[e.createElementVNode("option",{value:"available"},"Available",-1),e.createElementVNode("option",{value:"onduty"},"On Duty",-1),e.createElementVNode("option",{value:"unavailable"},"Unavailable",-1)]),512),[[e.vModelSelect,o.newCrew.status]])]),e.createElementVNode("div",tl,[t[23]||(t[23]=e.createElementVNode("label",{for:"crew-email"},"Email Address *",-1)),e.withDirectives(e.createElementVNode("input",{type:"email",id:"crew-email","onUpdate:modelValue":t[9]||(t[9]=n=>o.newCrew.email=n),class:e.normalizeClass({error:o.formErrors.email})},null,2),[[e.vModelText,o.newCrew.email]]),o.formErrors.email?(e.openBlock(),e.createElementBlock("div",nl,e.toDisplayString(o.formErrors.email),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",ll,[t[26]||(t[26]=e.createElementVNode("h3",null,"Certifications",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.newCrew.certifications,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:r,class:"certification-entry"},[e.createElementVNode("div",ol,[e.createElementVNode("div",sl,[t[24]||(t[24]=e.createElementVNode("label",null,"Certification Name",-1)),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":d=>n.name=d,placeholder:"Enter certification name"},null,8,il),[[e.vModelText,n.name]])]),e.createElementVNode("div",rl,[t[25]||(t[25]=e.createElementVNode("label",null,"Expiry Date",-1)),e.withDirectives(e.createElementVNode("input",{type:"date","onUpdate:modelValue":d=>n.expiryDate=d},null,8,al),[[e.vModelText,n.expiryDate]])]),e.createElementVNode("div",dl,[o.newCrew.certifications.length>1?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"btn btn-danger btn-sm",onClick:d=>i.removeCertification(r)}," Remove ",8,cl)):e.createCommentVNode("",!0)])])]))),128)),e.createElementVNode("button",{type:"button",class:"btn btn-secondary btn-sm",onClick:t[10]||(t[10]=(...n)=>i.addCertificationEntry&&i.addCertificationEntry(...n))}," + Add More Certification ")]),e.createElementVNode("div",ml,[e.createElementVNode("div",pl,[t[27]||(t[27]=e.createElementVNode("label",{for:"crew-notes"},"Notes",-1)),e.withDirectives(e.createElementVNode("textarea",{id:"crew-notes",rows:"3","onUpdate:modelValue":t[11]||(t[11]=n=>o.newCrew.notes=n)},null,512),[[e.vModelText,o.newCrew.notes]])])]),e.createElementVNode("div",hl,[e.createElementVNode("button",{class:"btn btn-secondary",onClick:t[12]||(t[12]=(...n)=>i.handleCancelForm&&i.handleCancelForm(...n))},"Cancel"),e.createElementVNode("button",{class:"btn btn-primary",onClick:t[13]||(t[13]=(...n)=>i.handleAddCrewMember&&i.handleAddCrewMember(...n))},"Add Crew Member")])])):e.createCommentVNode("",!0)])])}const y=m(Sn,[["render",fl]]),gl=(l={})=>({brandName:l.brandName||"OceanHelm",logoIcon:l.logoIcon||"bi bi-water",showLogo:l.showLogo!==!1,responsive:l.responsive!==!1,...l}),El=[{type:"link",label:"Dashboard",icon:"bi bi-speedometer2",href:"/app/dashboard",active:!0},{type:"link",label:"Activity Log",icon:"bi bi-activity",href:"/activity-log",roles:["owner"]},{type:"text",label:"Services"},{type:"button",label:"Maintenance",icon:"bi bi-tools",action:"maintenance"},{type:"dropdown",label:"Crew Management",icon:"bi bi-people",children:[{label:"All Crew",action:"crew-all",roles:["owner","staff"]},{type:"separator"},{label:"Get Crew by Vessel",action:"crew-by-vessel"}]},{type:"link",label:"Inventory Management",icon:"bi bi-clipboard-data",href:"/app/inventory"},{type:"link",label:"Requisition Processing",icon:"bi bi-calendar-check",href:"/app/requisition"},{type:"button",label:"Voyage Manager",icon:"fas fa-ship",action:"coming-soon"},{type:"button",label:"Settings",icon:"bi bi-gear",action:"settings",roles:["owner","staff"]},{type:"button",label:"Help & Support",icon:"bi bi-question-circle",action:"help"}],yl=(l,t)=>!l.roles||l.roles.length===0?!0:l.roles.includes(t==null?void 0:t.role),Vl={install(l,t={}){l.component("ConfigurableSidebar",p),l.component("VesselList",h),l.component("DashHead",f),l.component("ActivityLogs",E),l.component("CrewManagement",y),l.component("DashHead",g),l.provide("sidebarConfig",t)}};c.ActivityLogs=E,c.ConfigurableSidebar=p,c.CrewManagement=y,c.DashHead=f,c.OceanHelmMaintenance=g,c.VesselList=h,c.createSidebarConfig=gl,c.default=Vl,c.defaultMenuItems=El,c.defaultPermissionChecker=yl,Object.defineProperties(c,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
2
+ //# sourceMappingURL=oceanhelm.umd.js.map