oceanhelm 0.0.10 → 0.0.12
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.
- package/dist/oceanhelm.es.js +2268 -1081
- package/dist/oceanhelm.es.js.map +1 -1
- package/dist/oceanhelm.umd.js +1 -1
- package/dist/oceanhelm.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/ActivityLogs.vue +319 -330
- package/src/components/ConfigurableSidebar.vue +55 -8
- package/src/components/CrewManagement.vue +748 -47
- package/src/components/DashHead.vue +10 -0
- package/src/components/Reports.vue +1449 -0
- package/src/components/RequisitionSystem.vue +97 -67
- package/src/index.js +3 -1
- package/src/utils/sidebarConfig.js +65 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oceanhelm.umd.js","sources":["../src/components/ConfigurableSidebar.vue","../src/components/VesselList.vue","../src/components/DashHead.vue","../src/components/OceanHelmMaintenance.vue","../src/components/ActivityLogs.vue","../src/components/CrewManagement.vue","../src/components/RequisitionSystem.vue","../src/utils/sidebarConfig.js","../src/utils/permissions.js","../src/index.js"],"sourcesContent":["<template>\n <nav id=\"sidebar\" :class=\"sidebarClasses\">\n <!-- Logo Section -->\n <div class=\"logo d-flex align-items-center left\" v-if=\"showLogo\">\n <span style=\"margin-left: 45px;\">{{ brandName }}</span>\n </div>\n\n <!-- Navigation Items -->\n <ul class=\"list-unstyled components mt-4\">\n <li v-for=\"(item, index) in filteredMenuItems\" :key=\"index\"\n :class=\"{ 'active': item.active, 'dropdown': item.type === 'dropdown' }\" @click=\"handleItemClick(item)\">\n <!-- Regular Link -->\n <a v-if=\"item.type === 'link'\" :href=\"item.href || '#'\" @click.prevent=\"handleNavigation(item)\">\n <i :class=\"item.icon\" v-if=\"item.icon\"></i>\n {{ item.label }}\n </a>\n\n <!-- Button/Action -->\n <a v-else-if=\"item.type === 'button'\" @click.prevent=\"handleAction(item)\" style=\"cursor: pointer;\">\n <i :class=\"item.icon\" v-if=\"item.icon\"></i>\n {{ item.label }}\n </a>\n\n <!-- Dropdown -->\n <template v-else-if=\"item.type === 'dropdown'\">\n <a class=\"dropdown-toggle\" type=\"button\" data-bs-toggle=\"dropdown\" aria-expanded=\"false\">\n <i :class=\"item.icon\" v-if=\"item.icon\"></i>\n {{ item.label }}\n </a>\n <div class=\"dropdown-menu\" aria-labelledby=\"dropdownMenuLink\">\n <a v-for=\"(subItem, subIndex) in getFilteredChildren(item)\" :key=\"subIndex\" class=\"dropdown-item black\"\n @click.prevent=\"handleAction(subItem)\" style=\"cursor: pointer;\">\n {{ subItem.label }}\n </a>\n </div>\n </template>\n\n <!-- Separator -->\n <div v-else-if=\"item.type === 'separator'\" class=\"dropdown-divider\"></div>\n\n <!-- Static Text -->\n <a v-else-if=\"item.type === 'text'\">\n {{ item.label }}\n </a>\n </li>\n </ul>\n\n <!-- Custom Slot for Additional Content -->\n <slot name=\"footer\"></slot>\n </nav>\n</template>\n\n<script>\nexport default {\n name: 'ConfigurableSidebar',\n\n props: {\n // Brand configuration\n brandName: {\n type: String,\n default: 'OceanHelm'\n },\n logoIcon: {\n type: String,\n default: 'bi bi-water'\n },\n showLogo: {\n type: Boolean,\n default: true\n },\n\n // Menu items configuration\n menuItems: {\n type: Array,\n required: true,\n default: () => []\n },\n\n // User profile for role-based filtering\n userProfile: {\n type: Object,\n default: () => ({})\n },\n\n // Sidebar behavior\n responsive: {\n type: Boolean,\n default: true\n },\n\n // Custom classes\n customClasses: {\n type: String,\n default: ''\n },\n\n // Permission checker function\n permissionChecker: {\n type: Function,\n default: null\n }\n },\n\n computed: {\n sidebarClasses() {\n return this.customClasses;\n },\n\n filteredMenuItems() {\n return this.menuItems.filter(item => {\n // Check if the item itself has permission\n if (!this.hasPermission(item)) {\n return false;\n }\n\n // For dropdown items, check if any children have permission\n if (item.type === 'dropdown' && item.children) {\n return item.children.some(child => this.hasPermission(child));\n }\n\n return true;\n });\n }\n },\n\n mounted() {\n if (this.responsive) {\n this.initializeResponsiveBehavior();\n }\n },\n\n methods: {\n // Get filtered children for dropdown items\n getFilteredChildren(item) {\n if (!item.children) return [];\n return item.children.filter(child => this.hasPermission(child));\n },\n\n // Permission checking\n hasPermission(item) {\n // Use custom permission checker if provided\n if (this.permissionChecker) {\n return this.permissionChecker(item, this.userProfile);\n }\n\n // Default role-based checking\n if (!item.roles || item.roles.length === 0) {\n return true; // No role restriction\n }\n\n return item.roles.includes(this.userProfile.role);\n },\n\n // Navigation handling\n handleNavigation(item) {\n this.$emit('navigate', item);\n\n // Default behavior if no custom handler\n if (item.href && !item.preventDefault) {\n if (item.external) {\n window.open(item.href, '_blank');\n } else {\n this.$router?.push(item.href);\n }\n }\n },\n\n // Action handling\n handleAction(item) {\n this.$emit('action', item);\n },\n\n // Item click handling\n handleItemClick(item) {\n this.$emit('item-click', item);\n\n if (item.type === 'dropdown') {\n // Handle dropdown specific logic if needed\n }\n },\n\n // Responsive behavior\n initializeResponsiveBehavior() {\n const sidebarToggle = document.getElementById('sidebarToggle');\n const sidebar = document.getElementById('sidebar');\n const content = document.getElementById('content');\n\n if (!sidebarToggle || !sidebar || !content) return;\n\n // Initial state for desktop\n if (window.innerWidth >= 768) {\n sidebar.classList.toggle('active');\n content.classList.toggle('active');\n }\n\n // Toggle functionality\n sidebarToggle.addEventListener('click', () => {\n sidebar.classList.toggle('active');\n content.classList.toggle('active');\n });\n\n // Close sidebar on outside click (mobile)\n document.addEventListener('click', (event) => {\n const isClickInsideSidebar = sidebar.contains(event.target);\n const isClickOnToggleBtn = sidebarToggle.contains(event.target);\n\n if (!isClickInsideSidebar && !isClickOnToggleBtn &&\n window.innerWidth < 768 &&\n sidebar.classList.contains('active')) {\n sidebar.classList.remove('active');\n content.classList.remove('active');\n }\n });\n }\n },\n\n emits: ['navigate', 'action', 'item-click']\n}\n</script>","<template>\n <!-- Fleet Summary -->\n <div class=\"row mb-3\">\n <div class=\"col-md-4\">\n <div class=\"card border-0 shadow-sm\" \n @click=\"filterVessels('Active')\"\n :class=\"{ 'border-primary border-2': activeFilter === 'Active' }\"\n style=\"cursor: pointer;\">\n <div class=\"card-body d-flex align-items-center\">\n <div class=\"rounded-circle bg-primary bg-opacity-10 p-3 me-3\">\n <i class=\"bi bi-check-circle-fill text-primary fs-4\"></i>\n </div>\n <div>\n <h6 class=\"mb-0\">Active Vessels</h6>\n <h3 class=\"mt-2 mb-0\">{{ activeVesselsCount }}</h3>\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-md-4\">\n <div class=\"card border-0 shadow-sm\"\n @click=\"filterVessels('Inactive')\"\n :class=\"{ 'border-secondary border-2': activeFilter === 'Inactive' }\"\n style=\"cursor: pointer;\">\n <div class=\"card-body d-flex align-items-center\">\n <div class=\"rounded-circle bg-secondary bg-opacity-10 p-3 me-3\">\n <i class=\"bi bi-pause-circle-fill text-secondary fs-4\"></i>\n </div>\n <div>\n <h6 class=\"mb-0\">Inactive</h6>\n <h3 class=\"mt-2 mb-0\">{{ inactiveVesselsCount }}</h3>\n </div>\n </div>\n </div>\n </div>\n <!-- Register New Fleet -->\n <div class=\"col-md-4\" v-if=\"canAddVessel\">\n <div class=\"card border-0 shadow-sm\" @click=\"handleAddVessel\" style=\"cursor: pointer;\">\n <div class=\"card-body d-flex align-items-center\">\n <div class=\"rounded-circle bg-success bg-opacity-10 p-3 me-3\">\n <i class=\"bi bi-patch-plus-fill text-success fs-4\"></i>\n </div>\n <div>\n <h6 class=\"mb-0\">Add New Vessel</h6>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"d-flex justify-content-between align-items-center mb-4\">\n <h4 class=\"mb-0\"><i class=\"bi bi-ship me-2\"></i>Registered Vessels</h4>\n <button \n v-if=\"activeFilter !== 'All'\" \n class=\"btn btn-sm btn-outline-secondary\"\n @click=\"clearFilter\">\n <i class=\"bi bi-x-circle me-1\"></i>Clear Filter\n </button>\n </div>\n\n <!-- Filter indicator -->\n <div v-if=\"activeFilter !== 'All'\" class=\"alert alert-info mb-3\" role=\"alert\">\n Showing <strong>{{ activeFilter }}</strong> vessels ({{ filteredVessels.length }})\n </div>\n\n <!-- Loading State -->\n <div v-if=\"loading\" class=\"text-center py-4\">\n <div class=\"spinner-border text-primary\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n <p class=\"mt-2\">Loading vessels...</p>\n </div>\n\n <!-- Empty State -->\n <div v-else-if=\"!filteredVessels.length && activeFilter === 'All'\" class=\"alert alert-primary\" role=\"alert\">\n <h4 class=\"alert-heading\">Empty Fleet!</h4>\n <p>You have an empty fleet, you have not added any vessel yet.</p>\n <hr>\n <p class=\"mb-0\">Click on the add vessel button above, to start adding vessels to your fleet</p>\n </div>\n\n <!-- No results for filter -->\n <div v-else-if=\"!filteredVessels.length && activeFilter !== 'All'\" class=\"alert alert-warning\" role=\"alert\">\n <h4 class=\"alert-heading\">No {{ activeFilter }} Vessels</h4>\n <p class=\"mb-0\">There are no {{ activeFilter.toLowerCase() }} vessels in your fleet.</p>\n </div>\n\n <!-- Vessel Cards -->\n <div v-else class=\"row\">\n <div class=\"col-lg-6\" v-for=\"vessel in filteredVessels\" :key=\"vessel.registrationNumber || vessel.id\">\n <div class=\"vessel-card\" @click=\"handleVesselClick(vessel)\">\n <div class=\"card-body d-flex align-items-center\">\n <div class=\"vessel-icon v-left\">\n <i class=\"fas fa-ship\"></i>\n </div>\n <div class=\"flex-grow-1\">\n <div class=\"d-flex justify-content-between align-items-center mb-2\">\n <h5 class=\"card-title mb-0\">{{ vessel.name }}</h5>\n <span :class=\"['vessel-status', statusClass(vessel.status)]\">{{ vessel.status }}</span>\n </div>\n <div class=\"row\">\n <div class=\"col-6\">\n <small class=\"text-muted\">Registration #:</small>\n <p class=\"mb-0\">{{ vessel.registrationNumber }}</p>\n </div>\n\n <div class=\"col-6\" v-if=\"vessel.date\">\n <template v-if=\"vessel.status === 'Active'\">\n <small class=\"text-muted\">Active Duration:</small>\n <p class=\"mb-0\">{{ getDuration(vessel.date, vessel.registrationNumber) }}</p>\n </template>\n <template v-else>\n <small class=\"text-muted\">Inactive Duration:</small>\n <p class=\"mb-0\">{{ getDuration(vessel.date, vessel.registrationNumber) }}</p>\n </template>\n </div>\n\n <div class=\"col-6\" v-else>\n <small class=\"text-muted\">{{ vessel.status }} Duration:</small>\n <button type=\"button\" class=\"btn btn-outline-primary btn-sm mt-1\"\n @click.stop=\"setVesselDate(vessel.registrationNumber)\">\n Set Date\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"action-icon v-left delete\">\n <i class=\"bi bi-trash\" @click.stop=\"handleDeleteVessel(vessel)\"></i>\n </div>\n <button class=\"btn btn-primary\" @click.stop=\"handleToggleStatus(vessel)\">\n {{ vessel.status === 'Active' ? 'Mark Inactive' : 'Mark Active' }}\n </button>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'VesselList',\n\n props: {\n // Required props\n vessels: {\n type: Array,\n required: true,\n default: () => []\n },\n userProfile: {\n type: Object,\n required: true,\n default: () => ({ role: 'viewer', vessel: null })\n },\n\n // Optional props\n loading: {\n type: Boolean,\n default: false\n },\n currentRoute: {\n type: String,\n default: 'dashboard' // 'dashboard', 'maintenanceroute', 'crewroute'\n },\n\n // Configuration props\n config: {\n type: Object,\n default: () => ({\n enableAdd: true,\n enableEdit: true,\n enableDelete: true,\n enableStatusToggle: true,\n showCertifications: true\n })\n }\n },\n\n data() {\n return {\n activeFilter: 'All' // 'All', 'Active', or 'Inactive'\n };\n },\n\n emits: [\n 'vessel-add',\n 'vessel-click',\n 'vessel-edit',\n 'vessel-delete',\n 'vessel-toggle-status',\n 'vessel-navigate',\n 'access-denied',\n 'date-change'\n ],\n\n computed: {\n activeVesselsCount() {\n return this.vessels.filter(vessel => vessel.status === \"Active\").length;\n },\n\n inactiveVesselsCount() {\n return this.vessels.filter(vessel => vessel.status === \"Inactive\").length;\n },\n\n filteredVessels() {\n if (this.activeFilter === 'All') {\n return this.vessels;\n }\n return this.vessels.filter(vessel => vessel.status === this.activeFilter);\n },\n\n canAddVessel() {\n return this.config.enableAdd &&\n (this.userProfile.role === 'owner' || this.userProfile.role === 'staff');\n }\n },\n\n methods: {\n // Filter methods\n filterVessels(status) {\n this.activeFilter = status;\n },\n\n clearFilter() {\n this.activeFilter = 'All';\n },\n\n // Event handlers that emit to parent\n handleAddVessel() {\n if (!this.canAddVessel) {\n this.handleAccessDenied('add vessel');\n return;\n }\n this.$emit('vessel-add');\n },\n\n handleVesselClick(vessel) {\n const navigationData = {\n vessel,\n route: this.currentRoute,\n id: vessel.registrationNumber,\n name: vessel.name\n };\n\n if (this.grantAccess(vessel)) {\n if (this.currentRoute === 'dashboard') {\n this.$emit('vessel-click', vessel);\n } else {\n this.$emit('vessel-navigate', navigationData);\n }\n } else {\n this.handleAccessDenied('this protected route');\n }\n },\n\n handleDeleteVessel(vessel) {\n if (!this.grantAccess(vessel)) {\n this.handleAccessDenied('delete vessel');\n return;\n }\n\n if (!this.config.enableDelete) {\n return;\n }\n\n this.$emit('vessel-delete', vessel);\n },\n\n handleToggleStatus(vessel) {\n if (!this.grantAccess(vessel)) {\n this.handleAccessDenied('change vessel status');\n return;\n }\n\n if (!this.config.enableStatusToggle) {\n return;\n }\n\n this.$emit('vessel-toggle-status', vessel);\n },\n\n handleEditVessel(vessel) {\n if (!this.grantAccess(vessel)) {\n this.handleAccessDenied('edit vessel');\n return;\n }\n\n if (!this.config.enableEdit) {\n return;\n }\n\n this.$emit('vessel-edit', vessel);\n },\n\n handleAccessDenied(action) {\n this.$emit('access-denied', { action, userProfile: this.userProfile });\n },\n\n // Utility methods (keep these in component as they're UI-related)\n statusClass(status) {\n const normalized = status?.toLowerCase() || '';\n return `status-${normalized}`;\n },\n\n getDuration(date, registrationNumber) {\n const now = new Date();\n const inputDate = new Date(date);\n\n // difference in milliseconds\n const diffMs = now - inputDate;\n\n if (diffMs < 0) return \"Invalid (future date)\";\n\n // convert to hours\n const diffHours = Math.floor(diffMs / (1000 * 60 * 60));\n\n const days = Math.floor(diffHours / 24);\n const hours = diffHours % 24;\n\n let result = \"\";\n\n if (days > 0) {\n result += `${days} day${days > 1 ? \"s\" : \"\"}`;\n }\n if (hours > 0) {\n result += (result ? \" \" : \"\") + `${hours} hr${hours > 1 ? \"s\" : \"\"}`;\n }\n\n return result || '0 hr'\n },\n\n setVesselDate(registrationNumber) {\n this.$emit('date-change', registrationNumber);\n },\n\n grantAccess(vessel) {\n const { role, vessel: userVessel } = this.userProfile;\n\n return role === 'owner' ||\n role === 'staff' ||\n (role === 'captain' && userVessel === vessel.name);\n },\n\n getDaysToExpiry(expiry_date) {\n if (!expiry_date) return null;\n\n const today = new Date();\n const expiry = new Date(expiry_date);\n const diffTime = expiry - today;\n const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));\n return diffDays;\n },\n\n getExpiryClass(expiry_date) {\n const days = this.getDaysToExpiry(expiry_date);\n if (days === null) return '';\n if (days < 30) return 'cert-critical';\n if (days < 90) return 'cert-warning';\n return '';\n }\n }\n}\n</script>\n\n<style>\n.v-left {\n margin-left: 20px;\n}\n\n.vessel-card {\n background: white;\n border-radius: 10px;\n box-shadow: 0 8px 16px rgba(0, 105, 192, 0.15);\n transition: all 0.3s ease;\n margin-bottom: 20px;\n overflow: hidden;\n border-left: 4px solid var(--accent-color);\n}\n\n.vessel-card:hover {\n transform: translateY(-5px);\n box-shadow: 0 12px 20px rgba(0, 105, 192, 0.2);\n}\n\n.vessel-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n height: 50px;\n background-color: #e3f2fd;\n border-radius: 10px;\n color: var(--accent-color);\n font-size: 24px;\n margin-right: 15px;\n}\n\n.black {\n color: black !important;\n}\n\n.action-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n border-radius: 20px;\n color: var(--accent-color);\n font-size: 16px;\n margin-right: 15px;\n margin-top: 20px;\n margin-bottom: 10px;\n}\n\n.delete {\n background-color: var(--danger);\n}\n\n.edit {\n background-color: var(--success);\n}\n\n.vessel-status {\n display: inline-block;\n padding: 5px 12px;\n border-radius: 20px;\n font-size: 12px;\n font-weight: 600;\n}\n\n.status-active {\n background-color: #e8f5e9;\n color: #2e7d32;\n}\n\n.status-maintenance {\n background-color: #fff8e1;\n color: #f57f17;\n}\n\n.status-inactive {\n background-color: #f5f5f5;\n color: #757575;\n}\n</style>","<template>\n <div class=\"page-header d-flex justify-content-between align-items-center\">\n <h4 style=\"margin-left: 20px;\">{{ name }}</h4>\n <div class=\"d-flex\">\n <button class=\"btn btn-outline-primary me-2\" @click=\"addUser()\" v-if=\"this.userProfile.role == 'owner'\">\n <i class=\"bi bi-bell\"></i>\n <span class=\"badge bg-danger\">1</span>\n </button>\n <button class=\"btn btn-outline-primary\" @click=\"loggedIn()\">\n <i class=\"bi bi-person-circle\"></i>\n </button>\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'DashHead',\n \n props: {\n name: {\n type: String,\n required: true\n },\n userProfile: {\n type: Object,\n required: true,\n default: () => ({ role: 'viewer', vessel: null })\n }\n },\n\n emits: [\n 'add-user',\n 'logged-in'\n ],\n\n methods: {\n addUser() {\n this.$emit('add-user');\n },\n loggedIn() {\n this.$emit('logged-in');\n }\n }\n}\n</script>\n\n<style>\n.page-header {\n margin-bottom: 30px;\n border-bottom: 1px solid #e0e0e0;\n padding-bottom: 15px;\n}\n</style>","<template>\n <div v-if=\"ready\">\n <div>\n <nav v-show=\"!showReport\">\n <button v-for=\"section in sections\" :key=\"section.id\" class=\"nav-btn\"\n :class=\"{ active: activeSection === section.id }\" @click=\"handleSectionClick(section)\">\n {{ section.icon }} {{ section.name }}\n </button>\n </nav>\n \n <div class=\"content\" v-show=\"!showReport\">\n <!-- Maintenance Tasks Form -->\n <section :class=\"['form-section', { active: activeSection === 'maintenance' }]\"\n v-show=\"activeSection === 'maintenance'\">\n <h2>🛠️ Maintenance Tasks</h2>\n <!-- Loading indicator -->\n <div class=\"loading-container\" v-if=\"isLoading\">\n <div class=\"loading-spinner\"></div>\n <p>Loading checklist...</p>\n </div>\n <form v-if=\"!isLoading\">\n <div class=\"container\">\n <div class=\"d-flex justify-content-between align-items-center\">\n <h1>Maintenance Checklist</h1>\n <button v-if=\"showAddTaskButton\" class=\"btn btn-outline-custom\" @click.prevent=\"addTask()\">\n Manually Add Task\n <i class=\"fas fa-plus\"></i>\n </button>\n </div>\n\n <div class=\"progress-container\">\n <div class=\"progress-info\">\n Progress: {{ progress }}% ({{ completedCount.length }}/{{ checklists.length }})\n </div>\n <div class=\"progress-bar\">\n <div class=\"progress-fill\" :style=\"{ width: progress + '%' }\"></div>\n </div>\n </div>\n\n <ul class=\"checklist\">\n <li v-for=\"checklist in checklists\" :key=\"checklist.id\" class=\"checklist-item\">\n <div class=\"checkbox\" :class=\"{ 'checked': checklist.completed }\"\n @click=\"toggleTask(checklist)\">\n <span v-if=\"checklist.completed\">✓</span>\n </div>\n <span class=\"task-text\" :class=\"{ 'completed': checklist.completed }\"\n @click=\"toggleTask(checklist)\">\n {{ checklist.text }}\n </span>\n <button v-if=\"showAddTaskButton\" class=\"delete-btn\" @click=\"deleteTask(checklist.id)\"\n title=\"Delete task\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <polyline points=\"3,6 5,6 21,6\"></polyline>\n <path\n 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\">\n </path>\n <line x1=\"10\" y1=\"11\" x2=\"10\" y2=\"17\"></line>\n <line x1=\"14\" y1=\"11\" x2=\"14\" y2=\"17\"></line>\n </svg>\n </button>\n </li>\n </ul>\n\n <div v-if=\"after\">\n <label>Upload Image Evidence</label>\n <ul class=\"checklist\">\n <li class=\"checklist-item\">\n <span class=\"task-text\">\n Image Evidence Already Uploaded\n </span>\n <button type=\"button\" class=\"delete-btn\" @click=\"deleteEvidence()\"\n title=\"Delete Image\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <polyline points=\"3,6 5,6 21,6\"></polyline>\n <path\n 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\">\n </path>\n <line x1=\"10\" y1=\"11\" x2=\"10\" y2=\"17\"></line>\n <line x1=\"14\" y1=\"11\" x2=\"14\" y2=\"17\"></line>\n </svg>\n </button>\n </li>\n </ul>\n </div>\n\n <div class=\"form-group\" v-else :key=\"refreshKey || 'default'\">\n <label>Upload Image Evidence</label>\n <p>You can only upload one image evidence here.</p>\n <div class=\"attachment-area\">\n <p>{{ fileText }}</p>\n <input type=\"file\" id=\"evidence-files\" class=\"file-input\" @change=\"handleImg\">\n <label for=\"evidence-files\" class=\"file-label\">Browse Files</label>\n </div>\n </div>\n\n <div class=\"status\" v-if=\"completedCount === checklists.length\">\n All tasks completed! ✅\n </div>\n\n <button class=\"reset-button\" @click.prevent=\"resetTasks\">{{ checklistButtonLabel }}</button>\n </div>\n </form>\n </section>\n\n <!-- Maintenance Schedule Form -->\n <section :class=\"['form-section', { active: activeSection === 'schedule' }]\"\n v-show=\"activeSection === 'schedule'\">\n <h2>📅 Maintenance Schedule</h2>\n <form>\n <div class=\"form-group\">\n <label for=\"task-name\">Task Name</label>\n <input type=\"text\" id=\"task-name\" v-model=\"form.taskName\" required>\n </div>\n\n <div class=\"form-group\">\n <label for=\"task-description\">Description</label>\n <textarea id=\"task-description\" v-model=\"form.description\" required></textarea>\n </div>\n\n <div class=\"input-group\">\n <div class=\"form-group\">\n <label for=\"maintenance-type\">Maintenance Type</label>\n <select id=\"maintenance-type\" v-model=\"form.maintenanceType\" required>\n <option value=\"\">-- Select Type --</option>\n <option value=\"preventive\">Preventive</option>\n <option value=\"corrective\">Corrective</option>\n <option value=\"predictive\">Predictive</option>\n <option value=\"condition\">Condition-Based</option>\n </select>\n </div>\n\n <div class=\"form-group\">\n <label for=\"component\">Component/System</label>\n <select id=\"component\" v-model=\"form.component\" required>\n <option value=\"\">-- Select Component --</option>\n <option value=\"engine\">Engine</option>\n <option value=\"hull\">Hull</option>\n <option value=\"electronics\">Electronics</option>\n <option value=\"deck\">Deck Machinery</option>\n <option value=\"plumbing\">Plumbing</option>\n <option value=\"electrical\">Electrical</option>\n <option value=\"hvac\">HVAC</option>\n <option value=\"safety\">Safety Systems</option>\n <option value=\"Other\">Other</option>\n </select>\n <input v-if=\"form.component === 'Other'\" type=\"text\"\n placeholder=\"Enter custom component/system\" v-model=\"form.customComponent\"\n style=\"margin-top: 8px;\">\n </div>\n </div>\n\n <div class=\"input-group\">\n <div class=\"form-group\">\n <label for=\"priority\">Priority</label>\n <select id=\"priority\" v-model=\"form.priority\" required>\n <option value=\"low\">Low</option>\n <option value=\"medium\">Medium</option>\n <option value=\"high\">High</option>\n <option value=\"critical\">Critical</option>\n </select>\n </div>\n <div class=\"form-group\">\n <label for=\"status\">Status</label>\n <input type=\"text\" id=\"status\" v-model=\"form.status\" readonly>\n </div>\n </div>\n\n <div class=\"input-group\">\n <div class=\"form-group\">\n <label for=\"estimated-hours\">Estimated Hours</label>\n <input type=\"number\" id=\"estimated-hours\" v-model=\"form.estimatedHours\" min=\"0\" step=\"0.5\">\n </div>\n </div>\n\n <div class=\"form-group\">\n <label for=\"assigned-to\">Assigned To</label>\n <select id=\"assigned-to\" v-model=\"form.assignedTo\">\n <option value=\"\">-- Select Personnel --</option>\n <option v-for=\"member in vesselCrew\" :key=\"member.id\"\n :value=\"`${member.name} - ${member.role}`\">\n {{ member.name }} - {{ member.role }}\n </option>\n </select>\n </div>\n\n <div class=\"input-group\">\n <div class=\"form-group\">\n <label for=\"recurrence-type\">Recurrence</label>\n <select id=\"recurrence-type\" v-model=\"form.recurrence\" required>\n <option value=\"once\">One-time</option>\n <option value=\"daily\">Daily</option>\n <option value=\"weekly\">Weekly</option>\n <option value=\"monthly\">Monthly</option>\n <option value=\"quarterly\">Quarterly</option>\n <option value=\"semi-annual\">Semi-annually</option>\n <option value=\"annual\">Annually</option>\n <option value=\"custom\">Custom Interval</option>\n </select>\n </div>\n </div>\n\n <div class=\"input-group\">\n <div class=\"form-group\">\n <label for=\"last-performed\">Last Performed Date</label>\n <input type=\"date\" id=\"last-performed\" v-model=\"form.lastPerformed\">\n </div>\n\n <div class=\"form-group\">\n <label for=\"next-due\">Due Date</label>\n <input type=\"date\" id=\"next-due\" v-model=\"form.nextDue\" required>\n </div>\n </div>\n\n <div class=\"form-group\">\n <label>Notifications</label>\n <div class=\"checkbox-group\">\n <div class=\"checkbox-item\">\n <input type=\"checkbox\" id=\"notify-email\" v-model=\"form.notifyEmail\">\n <label for=\"notify-email\">Email Notification</label>\n </div>\n <div class=\"checkbox-item\">\n <input type=\"checkbox\" id=\"notify-sms\" v-model=\"form.notifySms\">\n <label for=\"notify-sms\">SMS Notification</label>\n </div>\n </div>\n </div>\n\n <div class=\"input-group\">\n <div class=\"form-group\">\n <label for=\"reminder-days\">Reminder (Days Before)</label>\n <select id=\"reminder-days\" v-model=\"form.reminderDays\">\n <option value=\"1\">1 day</option>\n <option value=\"3\">3 days</option>\n <option value=\"7\">1 week</option>\n <option value=\"14\">2 weeks</option>\n <option value=\"30\">1 month</option>\n </select>\n </div>\n </div>\n\n <div class=\"form-group\">\n <label for=\"schedule-notes\">Notes</label>\n <textarea id=\"schedule-notes\" v-model=\"form.notes\"></textarea>\n </div>\n\n <div class=\"form-group\">\n <label>Attachments</label>\n <div class=\"attachment-area\">\n <p>{{ imgText }}</p>\n <input type=\"file\" id=\"maintenance-files\" class=\"file-input\" @change=\"handleFiles\" multiple>\n <label for=\"maintenance-files\" class=\"file-label\">Browse Files</label>\n </div>\n </div>\n\n <div class=\"action-buttons\">\n <button type=\"button\" class=\"btn btn-primary\" @click.prevent=\"saveSchedule\"\n :disabled=\"isSaving\">\n {{ isSaving ? 'Saving...' : 'Save Schedule' }}\n </button>\n </div>\n </form>\n </section>\n\n <!-- Inventory Form -->\n <section :class=\"['form-section', { active: activeSection === 'inventory' }]\"\n v-show=\"activeSection === 'inventory'\">\n <h2>All Maintenance</h2>\n <div class=\"task-table-wrapper\">\n <!-- Filters and Controls -->\n <div class=\"table-controls\">\n <div class=\"filters\">\n <button :class=\"{ active: activeFilter === 'due' }\" @click=\"setFilter('due')\">Due</button>\n <button :class=\"{ active: activeFilter === 'all' }\" @click=\"setFilter('all')\">All</button>\n <button :class=\"{ active: activeFilter === 'completed' }\"\n @click=\"setFilter('completed')\">Completed</button>\n <input type=\"text\" v-model=\"searchQuery\" placeholder=\"Search...\" />\n </div>\n </div>\n\n <!-- Task Table -->\n <table class=\"task-table\">\n <thead>\n <tr>\n <th>Equipment</th>\n <th>Task Name</th>\n <th>Assigned To</th>\n <th>Intervals</th>\n <th>Remaining</th>\n <th>Next Due</th>\n <th>Status</th>\n <th>Action</th>\n </tr>\n </thead>\n <tbody>\n <tr v-for=\"task in filteredTasks\" :key=\"task.id\">\n <td>{{ task.component }}</td>\n <td>{{ task.taskName }}</td>\n <td>{{ task.assignedTo }}</td>\n <td>{{ task.recurrence }}</td>\n <td>{{ task.remainingDays }}</td>\n <td>{{ task.nextDue }}</td>\n <td>\n <span :class=\"['status-badge', task.status.toLowerCase().replace(' ', '-')]\">\n {{ task.status }}\n </span>\n </td>\n <td>\n <button @click=\"printMaintenance(task.component)\" v-if=\"task.status === 'Completed'\"\n class=\"status-action\">Print</button>\n <button @click=\"showMaintenance(task.component)\" v-else\n class=\"status-action\">Start</button>\n </td>\n </tr>\n </tbody>\n </table>\n\n <!-- Empty schedule -->\n <div v-if=\"!tasks.length\">\n <div class=\"alert alert-primary\" role=\"alert\">\n <h4 class=\"alert-heading\">Such Empty!!!</h4>\n <p>You have no maintenance, because you have not scheduled any for this ship.</p>\n <hr>\n <p class=\"mb-0\">Navigate to the schedule tab, to start scheduling. Or click on this button\n to\n <button type=\"button\" class=\"btn btn-primary\"\n @click=\"switchSchedule()\">Schedule</button>\n </p>\n </div>\n </div>\n </div>\n </section>\n </div>\n\n <div class=\"report-container\" ref=\"reportContainer\" v-show=\"showReport\">\n <div class=\"header\">\n <div class=\"report-title\">MAINTENANCE TASK REPORT</div>\n </div>\n\n <div class=\"report-info\">\n <div class=\"info-box\">\n <div class=\"info-label\">Report Generated:</div>\n <div>{{ reportDate }}</div>\n </div>\n <div class=\"info-box\">\n <div class=\"info-label\">Report ID:</div>\n <div>{{ reportId }}</div>\n </div>\n <div class=\"info-box\">\n <div class=\"info-label\">Total Tasks:</div>\n <div>{{ maintenanceTasks.length }}</div>\n </div>\n <div class=\"info-box\">\n <div class=\"info-label\">Generated By:</div>\n <div>OceanHelm System</div>\n </div>\n </div>\n\n <div class=\"section\">\n <div class=\"section-title\">📊 Task Summary</div>\n <div class=\"summary-grid\">\n <div class=\"summary-card\">\n <div class=\"summary-number\">1</div>\n <div class=\"summary-label\">Completed</div>\n </div>\n <div class=\"summary-card\">\n <div class=\"summary-number\">0</div>\n <div class=\"summary-label\">Pending</div>\n </div>\n <div class=\"summary-card\">\n <div class=\"summary-number\">0</div>\n <div class=\"summary-label\">Overdue</div>\n </div>\n <div class=\"summary-card\">\n <div class=\"summary-number\">{{ totalEstimatedHours }}</div>\n <div class=\"summary-label\">Total Hours</div>\n </div>\n </div>\n </div>\n\n <div class=\"section\">\n <div class=\"section-title\">🔧 Maintenance Tasks</div>\n <div v-for=\"task in maintenanceTasks\" :key=\"task.taskName\"\n :class=\"['task-item', getTaskStatusClass(task)]\">\n\n <div class=\"task-header\">\n <div>\n <div class=\"task-title\">\n {{ task.taskName }}\n <span :class=\"['maintenance-type', 'type-' + task.maintenanceType]\">\n {{ task.maintenanceType }}\n </span>\n </div>\n <div class=\"task-component\">Component: {{ task.component }}</div>\n </div>\n <span :class=\"['status-badge', 'status-' + task.status.toLowerCase().replace(' ', '-')]\">\n {{ task.status }}\n </span>\n </div>\n\n <div class=\"task-details\">\n <div class=\"detail-item\">\n <div class=\"detail-label\">Assigned To</div>\n <div class=\"detail-value\">{{ task.assignedTo }}</div>\n </div>\n <div class=\"detail-item\">\n <div class=\"detail-label\">Estimated Hours</div>\n <div class=\"detail-value\">{{ task.estimatedHours }} hours</div>\n </div>\n <div class=\"detail-item\">\n <div class=\"detail-label\">Last Performed</div>\n <div class=\"detail-value\">{{ formatDate(task.lastPerformed) }}</div>\n </div>\n <div class=\"detail-item\">\n <div class=\"detail-label\">Next Due</div>\n <div class=\"detail-value\">{{ formatDate(task.nextDue) }}</div>\n </div>\n <div class=\"detail-item\">\n <div class=\"detail-label\">Recurrence</div>\n <div class=\"detail-value\">{{ task.recurrence }}</div>\n </div>\n <div class=\"detail-item\">\n <div class=\"detail-label\">Remaining Days</div>\n <div class=\"detail-value\">{{ task.remainingDays }} days</div>\n </div>\n </div>\n\n <div v-if=\"task.description\"\n style=\"margin: 15px 0; padding: 10px; background: white; border-radius: 5px;\">\n <div class=\"detail-label\">Description</div>\n <div class=\"detail-value\">{{ task.description }}</div>\n </div>\n\n <div v-if=\"task.notes\"\n style=\"margin: 15px 0; padding: 10px; background: white; border-radius: 5px;\">\n <div class=\"detail-label\">Notes</div>\n <div class=\"detail-value\">{{ task.notes }}</div>\n </div>\n\n <div v-if=\"task.checklistProgress && task.checklistProgress.length > 0\" class=\"checklist-progress\">\n <div class=\"detail-label\">Checklist Progress</div>\n <div class=\"progress-bar\">\n <div class=\"progress-fill\" :style=\"{ width: getChecklistProgress(task) + '%' }\"></div>\n </div>\n <div style=\"font-size: 0.9em; color: #666; margin-top: 5px;\">\n {{ getCompletedChecklistItems(task) }} of {{ task.checklistProgress.length }} items\n completed\n ({{ getChecklistProgress(task) }}%)\n </div>\n <div class=\"checklist-items\">\n <div v-for=\"(item, index) in task.checklistProgress\" :key=\"index\" class=\"checklist-item\">\n <span class=\"checklist-icon\">{{ item.completed ? '✅' : '⭕' }}</span>\n <span>{{ item.text || 'Checklist Item ' + (index + 1) }}</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"section\">\n <div class=\"section-title\">📋 Recommendations</div>\n <div class=\"info-box\">\n <ul>\n <li v-for=\"recommendation in generateRecommendations()\" :key=\"recommendation\">\n {{ recommendation }}\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"signature-section\">\n <div class=\"signature-box\">\n <div><strong>Report Generated By</strong></div>\n <div style=\"margin-top: 10px; color: #666;\">OceanHelm Maintenance System</div>\n </div>\n <div class=\"signature-box\">\n <div><strong>Date</strong></div>\n <div style=\"margin-top: 10px; color: #666;\">{{ reportDate }}</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'OceanHelmMaintenance',\n props: {\n vesselInfo: {\n type: Object,\n required: true\n },\n tasks: {\n type: Array,\n default: () => []\n },\n vesselCrew: {\n type: Array,\n default: () => []\n },\n companyInfo: {\n type: Object,\n default: () => ({})\n },\n userProfile: {\n type: Object,\n required: true\n }\n },\n emits: [\n 'dashboard-navigate',\n 'load-checklist',\n 'save-schedule',\n 'update-task',\n 'upload-file',\n 'delete-evidence',\n 'access-denied',\n 'show-message',\n 'generate-checklist'\n ],\n data() {\n return {\n ready: true,\n isSaving: false,\n after: null,\n lastSection: '',\n currentTask: '',\n imgText: 'Choose file to upload',\n fileText: 'Drag and drop files here or',\n fileattachments: {},\n refreshKey: 0,\n activeSection: 'inventory',\n sections: [\n { id: 'schedule', name: 'Schedule', icon: '📅' },\n { id: 'inventory', name: 'All Maintenance', icon: '♻️' },\n {\n id: 'dashboard', \n name: 'Dashboard', \n icon: '☰', \n onClick: () => this.$emit('dashboard-navigate')\n }\n ],\n activeFilter: 'all',\n searchQuery: '',\n checklists: [],\n isLoading: false,\n form: {\n taskName: '',\n description: '',\n maintenanceType: '',\n component: '',\n priority: '',\n dueDate: '',\n estimatedHours: null,\n assignedTo: '',\n recurrence: '',\n lastPerformed: '',\n nextDue: '',\n notifyEmail: true,\n notifySms: true,\n reminderDays: '1',\n estimatedDuration: null,\n notes: '',\n status: 'Soon',\n email: '',\n remainingDays: null,\n attachments: {}\n },\n maintenanceTasks: [],\n showReport: false,\n reportDate: new Date().toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'long',\n day: 'numeric'\n }),\n reportId: 'MT-' + Math.random().toString(36).substr(2, 9).toUpperCase(),\n };\n },\n watch: {\n 'form.lastPerformed': 'calculateNextDue',\n 'form.recurrence': 'calculateNextDue',\n 'form.nextDue': function (newDate) {\n this.calculateRemainingDays();\n }\n },\n computed: {\n filteredTasks() {\n let result = [...this.tasks];\n if (this.activeFilter === 'all') {\n result = result.filter(task => task.status === 'Overdue' || task.status === 'Soon' || task.status === 'Completed');\n }\n else if (this.activeFilter === 'due') {\n result = result.filter(task => task.status === 'Overdue' || task.status === 'Soon');\n } else if (this.activeFilter === 'completed') {\n result = result.filter(task => task.status === 'Completed');\n }\n\n if (this.searchQuery) {\n const query = this.searchQuery.toLowerCase();\n result = result.filter(task =>\n task.component.toLowerCase().includes(query) ||\n task.taskName.toLowerCase().includes(query) ||\n task.assignedTo.toLowerCase().includes(query)\n );\n }\n\n return result;\n },\n completedCount() {\n return this.checklists.filter(item => item.completed);\n },\n progress() {\n return Math.round((this.completedCount.length / this.checklists.length) * 100);\n },\n checklistButtonLabel() {\n return this.lastSection === 'schedule' ? 'Approve Maintenance' : 'Save Checklist';\n },\n showAddTaskButton() {\n return this.checklistButtonLabel !== 'Save Checklist';\n },\n totalEstimatedHours() {\n return this.maintenanceTasks.reduce((total, task) => total + (task.estimatedHours || 0), 0);\n },\n },\n methods: {\n grantAccess(vessel) {\n const profile = this.userProfile;\n return profile.role === 'owner' || \n profile.role === 'staff' || \n (profile.role === 'captain' && profile.vessel === vessel);\n },\n deepAccess() {\n const profile = this.userProfile;\n if (profile.role === 'owner' || profile.role === 'captain') {\n return true;\n } else {\n this.$emit('access-denied', 'You do not have access to do this');\n return false;\n }\n },\n deleteTask(taskId) {\n this.checklists = this.checklists.filter(checklist => checklist.id !== taskId);\n },\n addTask(event) {\n if (event) event.preventDefault();\n \n this.$emit('show-message', {\n type: 'prompt',\n title: 'Add New Task',\n message: 'Enter the task details',\n callback: (result) => {\n if (result) {\n const newTask = {\n id: Date.now(),\n text: result,\n completed: false\n };\n this.checklists.push(newTask);\n }\n }\n });\n },\n setFilter(filter) {\n this.activeFilter = filter;\n },\n loadChecklist(taskComponent) {\n this.isLoading = true;\n this.$emit('generate-checklist', {\n component: taskComponent,\n callback: (checklist) => {\n this.checklists = checklist.map(item => ({\n ...item,\n completed: false\n }));\n this.isLoading = false;\n }\n });\n },\n showMaintenance(taskComponent) {\n if (this.deepAccess()) {\n const task = this.tasks.find(t => t.component === taskComponent);\n\n if (task && task.checklistProgress) {\n this.checklists = [...task.checklistProgress];\n } else {\n this.loadChecklist(taskComponent);\n }\n\n this.after = task?.after;\n this.currentTask = taskComponent;\n this.lastSection = 'inventory';\n this.activeSection = 'maintenance';\n }\n },\n printMaintenance(taskComponent) {\n const task = this.tasks.find(t => t.component === taskComponent);\n this.maintenanceTasks = [task];\n this.loadMaintenanceData();\n\n this.showReport = true;\n\n this.$nextTick(() => {\n setTimeout(() => {\n window.print();\n this.showReport = false;\n }, 100);\n });\n },\n switchSchedule() {\n if (this.deepAccess()) {\n this.activeSection = 'schedule';\n }\n },\n handleFiles(event) {\n this.imgText = event.target.files[0].name;\n this.form.attachments = {\n file: event.target.files[0]\n };\n },\n handleImg(event) {\n this.fileText = event.target.files[0].name;\n this.fileattachments = {\n file: event.target.files[0]\n };\n },\n validateForm() {\n const requiredFields = [\n 'taskName',\n 'description',\n 'maintenanceType',\n 'component',\n 'priority',\n 'estimatedHours',\n 'recurrence',\n 'lastPerformed',\n 'assignedTo'\n ];\n\n for (const field of requiredFields) {\n if (!this.form[field]) {\n this.$emit('show-message', {\n type: 'error',\n title: 'Missing info',\n message: `Please fill in the required field: ${field}`\n });\n return false;\n }\n }\n\n return true;\n },\n handleSectionClick(section) {\n this.activeSection = section.id;\n if (typeof section.onClick === 'function') {\n section.onClick();\n }\n },\n calculateNextDue() {\n const date = this.form.lastPerformed ? new Date(this.form.lastPerformed) : null;\n const recurrence = this.form.recurrence;\n\n if (!date || !recurrence) return;\n\n let nextDate = new Date(date);\n\n switch (recurrence) {\n case 'daily':\n nextDate.setDate(nextDate.getDate() + 1);\n break;\n case 'weekly':\n nextDate.setDate(nextDate.getDate() + 7);\n break;\n case 'monthly':\n nextDate.setMonth(nextDate.getMonth() + 1);\n break;\n case 'quarterly':\n nextDate.setMonth(nextDate.getMonth() + 3);\n break;\n case 'semi-annual':\n nextDate.setMonth(nextDate.getMonth() + 6);\n break;\n case 'annual':\n nextDate.setFullYear(nextDate.getFullYear() + 1);\n break;\n case 'once':\n case 'custom':\n return;\n }\n\n this.form.nextDue = nextDate.toISOString().split('T')[0];\n },\n calculateRemainingDays() {\n if (!this.form.nextDue) {\n this.form.remainingDays = null;\n return;\n }\n\n const today = new Date();\n const nextDueDate = new Date(this.form.nextDue);\n\n today.setHours(0, 0, 0, 0);\n nextDueDate.setHours(0, 0, 0, 0);\n\n const diffTime = nextDueDate - today;\n const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));\n\n this.form.remainingDays = `${diffDays} Days`;\n },\n async saveSchedule() {\n this.isSaving = true;\n \n if (!this.validateForm()) {\n this.isSaving = false;\n return;\n }\n\n const taskData = { ...this.form };\n\n if (this.form.component === 'Other' && this.form.customComponent) {\n taskData.component = this.form.customComponent;\n }\n\n taskData.email = this.companyInfo.email;\n\n // Check for duplicate component\n const hasDuplicateComponent = this.tasks.some(task => task.component === taskData.component);\n\n if (hasDuplicateComponent) {\n this.$emit('show-message', {\n type: 'error',\n title: 'Duplicate Component',\n message: `A task with the component \"${taskData.component}\" already exists in maintenance`\n });\n this.isSaving = false;\n return;\n }\n\n delete taskData.customComponent;\n\n this.$emit('save-schedule', {\n taskData,\n file: taskData.attachments.file,\n callback: (success) => {\n this.isSaving = false;\n if (success) {\n this.loadChecklist(taskData.component);\n this.lastSection = 'schedule';\n this.currentTask = taskData.component;\n this.resetForm();\n this.activeSection = 'maintenance';\n }\n }\n });\n },\n resetForm() {\n this.form = {\n taskName: '',\n description: '',\n maintenanceType: '',\n component: '',\n priority: '',\n dueDate: '',\n estimatedHours: null,\n assignedTo: '',\n recurrence: '',\n lastPerformed: '',\n nextDue: '',\n notifyEmail: true,\n notifySms: true,\n reminderDays: '1',\n estimatedDuration: null,\n notes: '',\n status: 'Soon',\n remainingDays: null,\n attachments: {}\n };\n },\n toggleTask(task) {\n task.completed = !task.completed;\n },\n async resetTasks() {\n const allCompleted = this.checklists.every(item => item.completed);\n const status = allCompleted ? 'Completed' : 'Soon';\n const updateData = {\n checklistProgress: [...this.checklists],\n status,\n component: this.currentTask,\n after: this.after\n };\n\n this.$emit('update-task', {\n updateData,\n file: this.fileattachments.file,\n tasks: this.tasks,\n callback: (success, updatedAfter) => {\n if (success) {\n if (updatedAfter) {\n this.after = updatedAfter;\n }\n this.fileattachments = {};\n this.fileText = 'Drag and drop files here or';\n this.refreshKey += 1;\n this.activeSection = 'inventory';\n }\n }\n });\n },\n loadMaintenanceData() {\n this.reportId = 'MT-' + Math.random().toString(36).substr(2, 9).toUpperCase();\n this.reportDate = new Date().toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'long',\n day: 'numeric'\n });\n },\n formatDate(dateString) {\n if (!dateString) return 'N/A';\n return new Date(dateString).toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric'\n });\n },\n getTaskStatusClass(task) {\n if (task.status === 'Completed') return 'completed';\n if (task.status === 'Overdue') return 'overdue';\n if (task.status === 'In Progress') return 'in-progress';\n return 'pending';\n },\n getChecklistProgress(task) {\n if (!task.checklistProgress || task.checklistProgress.length === 0) return 0;\n const completed = task.checklistProgress.filter(item => item.completed).length;\n return Math.round((completed / task.checklistProgress.length) * 100);\n },\n getCompletedChecklistItems(task) {\n if (!task.checklistProgress) return 0;\n return task.checklistProgress.filter(item => item.completed).length;\n },\n generateRecommendations() {\n return [\n 'Maintain regular communication with assigned technicians',\n 'Ensure all safety protocols are followed during maintenance activities',\n 'Update task progress and notes in real-time for accurate reporting'\n ];\n },\n deleteEvidence() {\n this.$emit('delete-evidence', {\n currentTask: this.currentTask,\n callback: (success) => {\n if (success) {\n this.after = null;\n this.fileText = 'Drag and drop files here or';\n this.fileattachments = {};\n this.refreshKey += 1;\n }\n }\n });\n }\n }\n};\n</script>\n<!--\n<style>\n.progress-container {\n margin-bottom: 20px;\n}\n\n.progress-bar {\n background-color: #e9ecef;\n border-radius: 4px;\n height: 10px;\n margin-top: 8px;\n}\n\n.progress-fill {\n background-color: #00a8e8;\n height: 100%;\n border-radius: 4px;\n transition: width 0.3s ease;\n}\n\n.checklist {\n list-style-type: none;\n padding: 0;\n}\n\n.checklist-item {\n display: flex;\n align-items: center;\n padding: 10px 0;\n border-bottom: 1px solid #eee;\n cursor: pointer;\n}\n\n.checkbox {\n margin-right: 15px;\n width: 20px;\n height: 20px;\n border: 2px solid #00a8e8;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.checkbox.checked {\n background-color: #00a8e8;\n color: white;\n}\n\n.task-text {\n flex-grow: 1;\n}\n\n.task-text.completed {\n text-decoration: line-through;\n color: #6c757d;\n}\n\n.status {\n margin-top: 20px;\n font-weight: bold;\n text-align: center;\n}\n\n.reset-button {\n background-color: #005792;\n color: white;\n border: none;\n padding: 8px 16px;\n border-radius: 4px;\n cursor: pointer;\n margin-top: 20px;\n font-weight: bold;\n}\n\n.btn-outline-custom {\n color: #005792;\n /* your custom text color */\n border: 2px solid #005792;\n /* your custom border color */\n background-color: transparent;\n padding: 8px 16px;\n border-radius: 4px;\n font-weight: 500;\n cursor: pointer;\n transition: background-color 0.3s, color 0.3s;\n}\n\n.btn-outline-custom:hover {\n background-color: #005792;\n /* custom hover background */\n color: white;\n /* text color on hover */\n}\n\n.reset-button:hover {\n background-color: #003d5b;\n}\n\nheader {\n background-color: var(--maitprimary);\n color: white;\n padding: 1rem;\n text-align: center;\n border-radius: 5px 5px 0 0;\n}\n\n/* \n*/\n\n.content {\n background-color: white;\n padding: 20px;\n border-radius: 0 0 5px 5px;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);\n}\n\n.form-section {\n display: none;\n animation: fadeIn 0.5s;\n}\n\n.form-section.active {\n display: block;\n}\n\n.form-row {\n margin-bottom: 15px;\n}\n\n.form-group {\n margin-bottom: 20px;\n}\n\nlabel {\n display: block;\n margin-bottom: 5px;\n font-weight: bold;\n color: var(--dark);\n}\n\ninput,\nselect,\ntextarea {\n width: 100%;\n padding: 10px;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-size: 16px;\n}\n\n.input-group {\n display: flex;\n gap: 10px;\n}\n\n.input-group>div {\n flex: 1;\n}\n\ntextarea {\n height: 120px;\n resize: vertical;\n}\n\n/* \n.btn {\n padding: 10px 20px;\n border-radius: 4px;\n cursor: pointer;\n font-size: 16px;\n font-weight: bold;\n transition: background-color 0.3s;\n}*/\n\n.btn-primary {\n background-color: var(--maitprimary);\n color: white;\n}\n\n.btn-primary:hover {\n background-color: var(--dark);\n}\n\n.btn-success {\n background-color: var(--success);\n color: white;\n}\n\n.btn-success:hover {\n background-color: #219653;\n}\n\n.action-buttons {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n margin-top: 20px;\n}\n\n.status-badge {\n display: inline-block;\n padding: 5px 10px;\n border-radius: 15px;\n font-size: 14px;\n font-weight: bold;\n color: white;\n}\n\n.status-pending {\n background-color: var(--warning);\n}\n\n.status-progress {\n background-color: var(--accent);\n}\n\n.status-completed {\n background-color: var(--success);\n}\n\n.attachment-area {\n border: 2px dashed #ddd;\n padding: 20px;\n text-align: center;\n border-radius: 5px;\n margin-bottom: 20px;\n}\n\n.file-input {\n display: none;\n}\n\n.file-label {\n display: inline-block;\n padding: 10px 20px;\n background-color: var(--accent);\n color: white;\n border-radius: 4px;\n cursor: pointer;\n transition: background-color 0.3s;\n}\n\n.file-label:hover {\n background-color: var(--maitsecondary);\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n\n.form-section h3 {\n margin-top: 30px;\n margin-bottom: 15px;\n color: var(--maitsecondary);\n}\n\n.checkbox-group {\n display: flex;\n flex-wrap: wrap;\n gap: 15px;\n margin-top: 10px;\n}\n\n.checkbox-item {\n display: flex;\n align-items: center;\n gap: 5px;\n}\n\n.checkbox-item input {\n width: auto;\n}\n\n.status-badge {\n padding: 0.3em 0.6em;\n border-radius: 4px;\n color: white;\n font-weight: bold;\n font-size: 0.85rem;\n}\n\n.status-action {\n padding: 0.3em 0.6em;\n border-radius: 4px;\n color: white;\n font-weight: bold;\n font-size: 0.85rem;\n background-color: var(--maitprimary);\n}\n\n.status-badge.overdue {\n background-color: red;\n}\n\n.status-badge.soon {\n background-color: orange;\n}\n\n/* Wrapper layout */\n.task-table-wrapper {\n font-family: 'Inter', sans-serif;\n padding: 1rem;\n}\n\n/* Controls section */\n.table-controls {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 1rem;\n flex-wrap: wrap;\n gap: 1rem;\n}\n\n.filters {\n display: flex;\n gap: 0.5rem;\n flex-wrap: wrap;\n}\n\n.filters button,\n.filters input {\n padding: 0.5rem 1rem;\n border-radius: 6px;\n border: 1px solid #ccc;\n background-color: #f5f5f5;\n font-weight: 500;\n cursor: pointer;\n}\n\n.filters button.active {\n background-color: #002f6c;\n color: white;\n}\n\n.filters input {\n border: 1px solid #bbb;\n}\n\n.filter-badge {\n background-color: #eee;\n color: #333;\n}\n\n/* Print and Add buttons */\n.table-controls>div:last-child button {\n padding: 0.5rem 1rem;\n border: 1px solid var(--maitprimary);\n border-radius: 6px;\n background-color: white;\n color: var(--maitprimary);\n ;\n font-weight: 600;\n cursor: pointer;\n transition: background 0.2s;\n}\n\n.table-controls>div:last-child button:last-child {\n background-color: var(--maitprimary);\n ;\n color: white;\n}\n\n/* Table */\n.task-table {\n width: 100%;\n border-collapse: collapse;\n box-shadow: 0 0 0 1px #ccc;\n}\n\n.task-table thead {\n background-color: var(--maitprimary);\n ;\n color: white;\n}\n\n.task-table th,\n.task-table td {\n padding: 0.75rem;\n text-align: left;\n border-bottom: 1px solid #eee;\n white-space: pre-line;\n /* so \\n works */\n}\n\n.task-table tbody tr:hover {\n background-color: #f9f9f9;\n}\n\n/* Status badges */\n.status-badge {\n padding: 0.3em 0.6em;\n border-radius: 6px;\n font-weight: bold;\n font-size: 0.85rem;\n color: white;\n display: inline-block;\n text-align: center;\n min-width: 90px;\n}\n\n.status-badge.complete {\n background-color: #4dffd0;\n}\n\n.status-badge.soon {\n background-color: #ffa500;\n}\n\n.status-badge.completed {\n background-color: #4caf50;\n}\n\n.delete-btn {\n background: none;\n border: none;\n color: #dc3545;\n cursor: pointer;\n padding: 6px;\n border-radius: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease;\n opacity: 1;\n margin-left: 8px;\n flex-shrink: 0;\n transform: scale(1.1);\n}\n\n.checklist-item:hover .delete-btn {\n opacity: 1;\n}\n\n.delete-btn:hover {\n background-color: #dc3545;\n color: white;\n transform: scale(1.1);\n}\n\n.delete-btn:active {\n transform: scale(0.95);\n}\n\n.print-only-container {\n text-align: center;\n}\n\n.initial-print-btn {\n background: linear-gradient(135deg, #0066cc, #004499);\n color: white;\n border: none;\n padding: 20px 40px;\n font-size: 1.3em;\n border-radius: 12px;\n cursor: pointer;\n transition: all 0.3s ease;\n box-shadow: 0 6px 20px rgba(0, 102, 204, 0.3);\n display: flex;\n align-items: center;\n gap: 15px;\n margin: 0 auto;\n}\n\n.initial-print-btn:hover {\n background: linear-gradient(135deg, #004499, #003366);\n transform: translateY(-3px);\n box-shadow: 0 8px 25px rgba(0, 102, 204, 0.4);\n}\n\n.initial-print-btn:active {\n transform: translateY(0);\n}\n\n.company-branding {\n margin-bottom: 30px;\n}\n\n.company-logo {\n font-size: 3em;\n font-weight: bold;\n color: #0066cc;\n margin-bottom: 10px;\n}\n\n.company-tagline {\n font-size: 1.1em;\n color: #666;\n}\n\n/* Report Styles - Hidden Initially */\n.report-container {\n display: none;\n max-width: 900px;\n margin: 0 auto;\n background: white;\n padding: 30px;\n border-radius: 10px;\n box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);\n}\n\n.header {\n text-align: center;\n border-bottom: 3px solid #0066cc;\n padding-bottom: 20px;\n margin-bottom: 30px;\n}\n\n.report-logo {\n font-size: 2.5em;\n font-weight: bold;\n color: #0066cc;\n margin-bottom: 10px;\n}\n\n.report-title {\n font-size: 1.8em;\n color: #333;\n margin: 10px 0;\n}\n\n.report-info {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n gap: 20px;\n margin-bottom: 30px;\n}\n\n.info-box {\n background: #f8f9fa;\n padding: 15px;\n border-radius: 8px;\n border-left: 4px solid #0066cc;\n}\n\n.info-box ul li {\n margin-left: 15px;\n}\n\n.info-label {\n font-weight: bold;\n color: #0066cc;\n margin-bottom: 5px;\n}\n\n.section {\n margin-bottom: 30px;\n}\n\n.section-title {\n font-size: 1.3em;\n font-weight: bold;\n color: #0066cc;\n border-bottom: 2px solid #e9ecef;\n padding-bottom: 10px;\n margin-bottom: 15px;\n}\n\n.task-item {\n background: #f8f9fa;\n margin: 15px 0;\n padding: 20px;\n border-radius: 8px;\n border-left: 4px solid #28a745;\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);\n}\n\n.task-item.pending {\n border-left-color: #ffc107;\n}\n\n.task-item.overdue {\n border-left-color: #dc3545;\n}\n\n.task-item.in-progress {\n border-left-color: #17a2b8;\n}\n\n.task-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: 15px;\n flex-wrap: wrap;\n gap: 10px;\n}\n\n.task-title {\n font-size: 1.2em;\n font-weight: bold;\n color: #333;\n}\n\n.task-component {\n font-size: 0.9em;\n color: #666;\n margin-top: 5px;\n}\n\n.status-badge {\n display: inline-block;\n padding: 6px 12px;\n border-radius: 20px;\n font-size: 0.8em;\n font-weight: bold;\n text-transform: uppercase;\n}\n\n.status-completed {\n background: #d4edda;\n color: #155724;\n}\n\n.status-pending {\n background: #fff3cd;\n color: #856404;\n}\n\n.status-overdue {\n background: #f8d7da;\n color: #721c24;\n}\n\n.status-in-progress {\n background: #d1ecf1;\n color: #0c5460;\n}\n\n.task-details {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 15px;\n margin: 15px 0;\n}\n\n.detail-item {\n display: flex;\n flex-direction: column;\n}\n\n.detail-label {\n font-weight: bold;\n font-size: 0.85em;\n color: #0066cc;\n margin-bottom: 3px;\n}\n\n.detail-value {\n font-size: 0.95em;\n color: #333;\n}\n\n.checklist-progress {\n margin-top: 15px;\n}\n\n.progress-bar {\n width: 100%;\n height: 20px;\n background: #e9ecef;\n border-radius: 10px;\n overflow: hidden;\n margin: 10px 0;\n}\n\n.progress-fill {\n height: 100%;\n background: linear-gradient(90deg, #28a745, #20c997);\n transition: width 0.3s ease;\n}\n\n.checklist-items {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 10px;\n margin-top: 10px;\n}\n\n.checklist-item {\n display: flex;\n align-items: center;\n padding: 8px;\n background: white;\n border-radius: 5px;\n font-size: 0.9em;\n}\n\n.checklist-icon {\n margin-right: 8px;\n font-size: 1.1em;\n}\n\n.summary-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));\n gap: 15px;\n margin: 20px 0;\n}\n\n.summary-card {\n background: white;\n padding: 20px;\n border-radius: 8px;\n text-align: center;\n border: 2px solid #e9ecef;\n}\n\n.summary-number {\n font-size: 2em;\n font-weight: bold;\n color: #0066cc;\n}\n\n.summary-label {\n font-size: 0.9em;\n color: #666;\n margin-top: 5px;\n}\n\n.signature-section {\n margin-top: 40px;\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 40px;\n}\n\n.signature-box {\n padding-top: 10px;\n text-align: center;\n}\n\n.maintenance-type {\n display: inline-block;\n padding: 4px 8px;\n border-radius: 12px;\n font-size: 0.75em;\n font-weight: bold;\n text-transform: uppercase;\n margin-left: 10px;\n}\n\n.type-corrective {\n background: #fff3cd;\n color: #856404;\n}\n\n.type-preventive {\n background: #d4edda;\n color: #155724;\n}\n\n.type-predictive {\n background: #d1ecf1;\n color: #0c5460;\n}\n\n/* Print Styles */\n@media print {\n body {\n background: white;\n padding: 0;\n display: block;\n }\n\n .print-only-container {\n display: none !important;\n }\n\n .report-container {\n display: block !important;\n box-shadow: none;\n padding: 0;\n margin: 0;\n max-width: none;\n }\n}\n\nnav button {\n background-color: var(--maitsecondary);\n color: white;\n border: none;\n padding: 10px 20px;\n margin: 5px;\n cursor: pointer;\n font-weight: bold;\n border-radius: 3px;\n transition: background-color 0.3s;\n}\n\nnav button:hover,\nnav button.active {\n background-color: var(--maitprimary);\n}\n</style>\n-->","<template>\n <div class=\"activity-logs\">\n <!-- Controls -->\n <div class=\"a-controls\">\n <div class=\"a-search-box\">\n <input\n type=\"text\"\n placeholder=\"Search activities, users, or actions...\"\n :value=\"searchTerm\"\n @input=\"$emit('update:searchTerm', $event.target.value)\"\n />\n </div>\n <select\n class=\"filter-select\"\n :value=\"selectedFilter\"\n @change=\"$emit('update:selectedFilter', $event.target.value)\"\n >\n <option value=\"all\">All Activities</option>\n <option value=\"login\">Login</option>\n <option value=\"logout\">Logout</option>\n <option value=\"create\">Create</option>\n <option value=\"update\">Update</option>\n <option value=\"delete\">Delete</option>\n <option value=\"view\">View</option>\n </select>\n <button class=\"btn btn-primary\" @click=\"$emit('refresh')\">🔄 Refresh</button>\n <button class=\"btn btn-secondary\" @click=\"$emit('download')\">📥 Download Report</button>\n </div>\n \n <!-- Stats -->\n <div class=\"stats-grid\">\n <div class=\"stat-card\">\n <h3>Total Activities</h3>\n <div class=\"value\">{{ totalActivities }}</div>\n </div>\n <div class=\"stat-card\">\n <h3>Today's Activities</h3>\n <div class=\"value\">{{ todayActivities }}</div>\n </div>\n <div class=\"stat-card\">\n <h3>Active Users</h3>\n <div class=\"value\">{{ activeUsers }}</div>\n </div>\n <div class=\"stat-card\">\n <h3>Important</h3>\n <div class=\"badge-danger\">\n Logs are deleted at the end of every month, please download a copy\n </div>\n </div>\n </div>\n \n <!-- Logs Table -->\n <div class=\"logs-container\">\n <div v-if=\"loading\" class=\"loading\">\n <div class=\"spinner\"></div>\n <p>Loading activity logs...</p>\n </div>\n \n <div v-else-if=\"logs.length === 0\" class=\"no-logs\">\n <h3>No activities found</h3>\n <p>Try adjusting your search or filter criteria</p>\n </div>\n \n <div v-else>\n <table class=\"logs-table\">\n <thead>\n <tr>\n <th>Timestamp</th>\n <th>User Name</th>\n <th>Action</th>\n <th>Details</th>\n <th>Section</th>\n </tr>\n </thead>\n <tbody>\n <tr v-for=\"log in paginatedLogs\" :key=\"log.id\">\n <td>{{ formatDate(log.timestamp) }}</td>\n <td>\n <div>{{ log.user_name }}</div>\n <small style=\"color: gray\">{{ log.email }}</small>\n </td>\n <td>\n <span class=\"activity-badge\" :class=\"getBadgeClass(log.action)\">\n {{ log.action }}\n </span>\n </td>\n <td>\n {{ log.details.status }}\n <div v-for=\"(change, key) in log.details.information\" :key=\"key\">\n <strong>{{ key }}: </strong>\n <small style=\"color: gray\">\n {{ change.from || \"\" }} → {{ change.to || change }}\n </small>\n </div>\n </td>\n <td>{{ log.table_name }}</td>\n </tr>\n </tbody>\n </table>\n \n <!-- Pagination -->\n <div class=\"pagination\">\n <button @click=\"$emit('change-page', currentPage - 1)\" :disabled=\"currentPage === 1\">\n Previous\n </button>\n <button\n v-for=\"page in totalPages\"\n :key=\"page\"\n @click=\"$emit('change-page', page)\"\n :class=\"{ active: currentPage === page }\"\n >\n {{ page }}\n </button>\n <button @click=\"$emit('change-page', currentPage + 1)\" :disabled=\"currentPage === totalPages\">\n Next\n </button>\n </div>\n </div>\n </div>\n </div>\n </template>\n \n <script>\n export default {\n name: \"ActivityLogs\",\n props: {\n loading: Boolean,\n searchTerm: String,\n selectedFilter: String,\n logs: Array,\n paginatedLogs: Array,\n totalActivities: Number,\n todayActivities: Number,\n activeUsers: Number,\n totalPages: Number,\n currentPage: Number,\n },\n emits: [\"update:searchTerm\", \"update:selectedFilter\", \"refresh\", \"download\", \"change-page\"],\n methods: {\n formatDate(timestamp) {\n return new Date(timestamp).toLocaleString();\n },\n getBadgeClass(action) {\n const classes = {\n login: \"badge-login\",\n logout: \"badge-logout\",\n create: \"badge-create\",\n update: \"badge-update\",\n delete: \"badge-delete\",\n view: \"badge-view\",\n };\n return classes[action] || \"badge-view\";\n },\n },\n };\n </script>\n \n<style>\n.a-header {\n background: linear-gradient(135deg, var(--dashprimary-color), var(--dashsecondary-color));\n color: white;\n padding: 2rem 0;\n margin-bottom: 2rem;\n border-radius: 12px;\n box-shadow: 0 10px 30px rgba(52, 153, 64, 0.3);\n}\n\n.a-header h1 {\n font-size: 2.5rem;\n font-weight: 700;\n margin-bottom: 0.5rem;\n text-align: center;\n}\n\n.a-header p {\n text-align: center;\n opacity: 0.9;\n font-size: 1.1rem;\n}\n\n.a-controls {\n display: flex;\n gap: 1rem;\n margin-bottom: 2rem;\n flex-wrap: wrap;\n align-items: center;\n}\n\n.a-search-box {\n flex: 1;\n min-width: 250px;\n position: relative;\n}\n\n.a-search-box input {\n width: 100%;\n padding: 12px 16px;\n border: 2px solid #e0e0e0;\n border-radius: 8px;\n font-size: 1rem;\n transition: all 0.3s ease;\n}\n\n.a-search-box input:focus {\n outline: none;\n border-color: var(--dashsecondary-color);\n box-shadow: 0 0 0 3px rgba(52, 153, 64, 0.1);\n}\n\n.filter-select {\n padding: 12px 16px;\n border: 2px solid #e0e0e0;\n border-radius: 8px;\n font-size: 1rem;\n background: white;\n cursor: pointer;\n transition: all 0.3s ease;\n}\n\n.filter-select:focus {\n outline: none;\n border-color: var(--dashsecondary-color);\n box-shadow: 0 0 0 3px rgba(52, 153, 64, 0.1);\n}\n\n.btn {\n padding: 12px 24px;\n border-radius: 8px;\n font-size: 1rem;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.3s ease;\n display: flex;\n align-items: center;\n gap: 8px;\n} \n\n.btn-primary {\n background: var(--primary);\n color: white;\n}\n\n.btn-primary:hover {\n background: var(--primary-dark);\n transform: translateY(-1px);\n box-shadow: 0 4px 12px rgba(52, 153, 64, 0.3);\n}\n\n.btn-secondary {\n background: var(--secondary);\n color: var(--dark);\n}\n\n.btn-secondary:hover {\n background: #e6a200;\n transform: translateY(-1px);\n box-shadow: 0 4px 12px rgba(244, 180, 0, 0.3);\n}\n\n.stats-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n gap: 1.5rem;\n margin-bottom: 2rem;\n}\n\n.stat-card {\n background: white;\n padding: 1.5rem;\n border-radius: 12px;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);\n transition: transform 0.3s ease;\n}\n\n.stat-card:hover {\n transform: translateY(-2px);\n}\n\n.stat-card h3 {\n color: var(--gray);\n font-size: 0.9rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin-bottom: 0.5rem;\n}\n\n.stat-card .value {\n font-size: 2rem;\n font-weight: 700;\n color: var(--dashsecondary-color);\n}\n\n.logs-container {\n background: white;\n border-radius: 12px;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);\n overflow: hidden;\n}\n\n.logs-header {\n background: var(--light);\n padding: 1.5rem;\n border-bottom: 1px solid #e0e0e0;\n}\n\n.logs-header h2 {\n color: var(--dark);\n font-size: 1.3rem;\n font-weight: 600;\n}\n\n.logs-table {\n width: 100%;\n border-collapse: collapse;\n}\n\n.logs-table th,\n.logs-table td {\n padding: 1rem;\n text-align: left;\n border-bottom: 1px solid #f0f0f0;\n}\n\n.logs-table th {\n background: var(--light);\n font-weight: 600;\n color: var(--dark);\n font-size: 0.9rem;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.logs-table tr:hover {\n background: #f8f9fa;\n}\n\n.activity-badge {\n padding: 4px 12px;\n border-radius: 20px;\n font-size: 0.8rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.badge-login {\n background: var(--success);\n color: white;\n}\n\n.badge-logout {\n background: var(--gray);\n color: white;\n}\n\n.badge-create {\n background: var(--dashprimary-color);\n color: white;\n}\n\n.badge-update {\n background: var(--warning);\n color: white;\n}\n\n.badge-delete {\n background: var(--danger);\n color: white;\n}\n\n.badge-danger {\n color: var(--danger);\n}\n\n.badge-view {\n background: var(--maitsecondary);\n color: white;\n}\n\n.pagination {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 0.5rem;\n padding: 1.5rem;\n background: var(--light);\n}\n\n.pagination button {\n padding: 8px 12px;\n border: 1px solid #e0e0e0;\n background: white;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.3s ease;\n}\n\n.pagination button:hover {\n background: var(--primary);\n color: white;\n border-color: var(--primary);\n}\n\n.pagination button.active {\n background: var(--primary);\n color: white;\n border-color: var(--primary);\n}\n\n.pagination button:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.no-logs {\n text-align: center;\n padding: 3rem;\n color: var(--gray);\n}\n\n.no-logs h3 {\n font-size: 1.5rem;\n margin-bottom: 1rem;\n}\n\n.loading {\n text-align: center;\n padding: 3rem;\n color: var(--gray);\n}\n\n.spinner {\n border: 3px solid #f3f3f3;\n border-top: 3px solid var(--primary);\n border-radius: 50%;\n width: 40px;\n height: 40px;\n animation: spin 1s linear infinite;\n margin: 0 auto 1rem;\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}\n\n@media (max-width: 768px) {\n .a-controls {\n flex-direction: column;\n align-items: stretch;\n }\n\n .a-search-box {\n min-width: 100%;\n }\n\n .stats-grid {\n grid-template-columns: 1fr;\n }\n\n .logs-table {\n font-size: 0.9rem;\n }\n\n .logs-table th,\n .logs-table td {\n padding: 0.5rem;\n }\n}\n</style>","<template>\n <div class=\"crew-management\">\n <!-- Wave background -->\n <div class=\"wave-bg\" v-if=\"config.showWaveBackground\"></div>\n\n <div class=\"crew-section\">\n <div class=\"crew-section-header\">\n <h4 class=\"crew-subhead\">{{ sectionTitle }}</h4>\n <button class=\"btn btn-primary\" @click=\"handleToggleAddForm\" v-if=\"canAddCrew\">\n {{ showAddForm ? 'Cancel' : '+ Add Crew Member' }}\n </button>\n </div>\n\n <!-- Search and Filter - Hide when form is shown -->\n <div class=\"search-filter\" v-if=\"!showAddForm\">\n <input type=\"text\" placeholder=\"Search crew by name or role...\" v-model=\"searchQuery\" @input=\"handleSearch\">\n <select v-model=\"filterStatus\" @change=\"handleFilter\">\n <option value=\"all\">All Statuses</option>\n <option value=\"available\">Available</option>\n <option value=\"onduty\">On Duty</option>\n <option value=\"unavailable\">Unavailable</option>\n </select>\n <button class=\"btn btn-secondary\" @click=\"showTimesheet = !showTimesheet\">\n <i :class=\"showTimesheet ? 'bi bi-grid-3x3-gap' : 'bi bi-table'\"></i>\n {{ showTimesheet ? 'Show Crew Cards' : 'Show Timesheet' }}\n </button>\n </div>\n\n <!-- Loading State - Hide when form is shown -->\n <div v-if=\"loading && !showAddForm\" class=\"loading-state\">\n <div class=\"spinner-border text-primary\" role=\"status\">\n <span class=\"visually-hidden\">Loading crew...</span>\n </div>\n <p>Loading crew members...</p>\n </div>\n\n <!-- Consolidated Timesheet View - Hide when form is shown -->\n <div v-else-if=\"showTimesheet && !showAddForm\" class=\"timesheet-view\">\n <div class=\"timesheet-header\">\n <h3><i class=\"bi bi-table\"></i> Crew Activity Timesheet</h3>\n <div class=\"timesheet-controls\">\n <select v-model=\"timesheetFilter\" @change=\"filterTimesheet\">\n <option value=\"all\">All Activities</option>\n <option value=\"Embarked\">Embarked Only</option>\n <option value=\"Deboarded\">Deboarded Only</option>\n <option value=\"Assigned\">Assigned Only</option>\n <option value=\"Status Changed\">Status Changes Only</option>\n </select>\n <input type=\"text\" v-model=\"timesheetSearch\" placeholder=\"Search timesheet...\"\n class=\"timesheet-search\">\n </div>\n </div>\n\n <div class=\"timesheet-summary\">\n <div class=\"summary-card\">\n <span class=\"summary-label\">Total Entries:</span>\n <span class=\"summary-value\">{{ filteredTimesheetEntries.length }}</span>\n </div>\n <div class=\"summary-card\">\n <span class=\"summary-label\">Crew Members:</span>\n <span class=\"summary-value\">{{ uniqueCrewCount }}</span>\n </div>\n <div class=\"summary-card\">\n <span class=\"summary-label\">Date Range:</span>\n <span class=\"summary-value\">{{ timesheetDateRange }}</span>\n </div>\n </div>\n\n <div v-if=\"filteredTimesheetEntries.length === 0\" class=\"no-results\">\n No timesheet entries found.\n </div>\n\n <div v-else class=\"timesheet-table-container\">\n <table class=\"timesheet-table\">\n <thead>\n <tr>\n <th @click=\"sortTimesheet('timestamp')\">\n Date/Time\n <i class=\"bi bi-arrow-down-up\"></i>\n </th>\n <th @click=\"sortTimesheet('crewName')\">\n Crew Member\n <i class=\"bi bi-arrow-down-up\"></i>\n </th>\n <th @click=\"sortTimesheet('role')\">\n Role\n <i class=\"bi bi-arrow-down-up\"></i>\n </th>\n <th @click=\"sortTimesheet('action')\">\n Action\n <i class=\"bi bi-arrow-down-up\"></i>\n </th>\n <th>Vessel</th>\n <th>Duration</th>\n <th>Notes</th>\n </tr>\n </thead>\n <tbody>\n <tr v-for=\"entry in filteredTimesheetEntries\" :key=\"entry.uniqueId\"\n :class=\"getTimesheetRowClass(entry.action)\">\n <td class=\"timestamp-cell\">{{ formatLogDate(entry.timestamp) }}</td>\n <td class=\"crew-name-cell\">\n <strong>{{ entry.crewName }}</strong>\n </td>\n <td class=\"role-cell\">{{ entry.role }}</td>\n <td class=\"action-cell\">\n <span :class=\"['action-badge', getLogActionClass(entry.action)]\">\n <i :class=\"getLogIcon(entry.action)\"></i>\n {{ entry.action }}\n </span>\n </td>\n <td class=\"vessel-cell\">{{ entry.vessel || 'N/A' }}</td>\n <td class=\"duration-cell\">{{ entry.duration ? entry.duration + ' days' : 'N/A' }}</td>\n <td class=\"notes-cell\">{{ entry.notes || '-' }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n\n <!-- Crew Grid - Hide when form is shown -->\n <div class=\"crew-grid\" v-else-if=\"filteredCrew.length > 0 && !showAddForm\">\n <div v-for=\"member in filteredCrew\" :key=\"member.id\" class=\"crew-card\"\n :class=\"{ 'unavailable': member.status === 'unavailable' }\">\n <div :class=\"['crew-status-badge', getStatusClass(member.status)]\">\n {{ formatStatus(member.status) }}\n </div>\n\n <div class=\"crew-name\">{{ member.name }}</div>\n <div class=\"crew-role\">{{ member.role }}</div>\n\n <!-- Certifications -->\n <div class=\"crew-certifications\">\n <div v-for=\"cert in member.certifications\" :key=\"cert.name\" class=\"certification-tag\"\n :class=\"getCertificationClass(cert.expiryDate)\" @click=\"handleViewCertification(cert, member)\">\n {{ cert.name }}\n </div>\n <i class=\"bi bi-patch-plus-fill icon\" @click=\"handleAddCertification(member)\"\n v-if=\"canEditCrew\"></i>\n </div>\n\n <!-- Crew Details -->\n <div class=\"crew-availability\">\n <strong>Embarkation Date:</strong> {{ member.nextShift || 'Not Scheduled' }}\n </div>\n <div class=\"crew-availability\">\n <strong>Expected Days Onboard (in days):</strong> {{ member.onBoard || 'Not Scheduled' }}\n </div>\n\n <!-- Action Buttons -->\n <div class=\"action-buttons\">\n <div v-if=\"member.vessel\" class=\"status-available crew-availability vcard\">\n Vessel: {{ member.vessel }}\n </div>\n <div v-else class=\"status-unavailable crew-availability vcard\">\n Vessel: Unassigned\n </div>\n <button class=\"btn btn-primary\" @click=\"handleAssignShift(member)\"\n v-if=\"canAssignShift && member.status !== 'onduty'\">\n Assign Shift\n </button>\n <button class=\"btn btn-warning\" @click=\"handleDeboardCrew(member)\"\n v-if=\"canDeboardCrew && member.status === 'onduty'\">\n Deboard\n </button>\n </div>\n\n <!-- Crew Log Button and Delete Icon -->\n <div class=\"crew-footer\">\n <div class=\"crew-log-toggle\" v-if=\"member.log && member.log.length > 0\">\n <button class=\"btn btn-link btn-sm log-toggle-btn\" @click=\"toggleCrewLog(member.id)\">\n <i class=\"bi bi-clock-history\"></i> View Log ({{ member.log.length }})\n </button>\n </div>\n <i class=\"bi bi-trash icon delete-icon\" @click=\"handleDeleteCrew(member)\" v-if=\"canDeleteCrew\"></i>\n </div>\n\n <!-- Crew Log Display -->\n <div v-if=\"expandedLogs.includes(member.id)\" class=\"crew-log\">\n <h4>Crew Activity Log</h4>\n <div v-for=\"(entry, index) in member.log\" :key=\"index\" class=\"log-entry\">\n <div class=\"log-date\">{{ formatLogDate(entry.timestamp) }}</div>\n <div class=\"log-action\" :class=\"getLogActionClass(entry.action)\">\n <i :class=\"getLogIcon(entry.action)\"></i>\n {{ entry.action }}\n </div>\n <div class=\"log-details\">\n <span v-if=\"entry.vessel\">Vessel: {{ entry.vessel }}</span>\n <span v-if=\"entry.duration\"> | Duration: {{ entry.duration }} days</span>\n </div>\n <div v-if=\"entry.notes\" class=\"log-notes\">{{ entry.notes }}</div>\n </div>\n </div>\n\n </div>\n </div>\n\n <!-- No Results - Hide when form is shown -->\n <div v-else-if=\"!loading && !showTimesheet && !showAddForm\" class=\"no-results\">\n {{ crew.length === 0 ? 'No crew members found.' : 'No crew members found matching your search criteria.' }}\n </div>\n\n <!-- Add Crew Form -->\n <div class=\"add-crew-form\" v-if=\"showAddForm\">\n <h2>Add New Crew Member</h2>\n\n <!-- Basic Information -->\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"crew-name\">Full Name *</label>\n <input type=\"text\" id=\"crew-name\" v-model=\"newCrew.name\" :class=\"{ 'error': formErrors.name }\">\n <div v-if=\"formErrors.name\" class=\"error-message\">{{ formErrors.name }}</div>\n </div>\n <div class=\"form-group\">\n <label for=\"crew-role\">Role/Position *</label>\n <select id=\"crew-role\" v-model=\"newCrew.role\">\n <option v-for=\"role in availableRoles\" :key=\"role\" :value=\"role\">\n {{ role }}\n </option>\n <option value=\"Other\">Other</option>\n </select>\n <input v-if=\"newCrew.role === 'Other'\" type=\"text\" placeholder=\"Enter custom role\"\n v-model=\"newCrew.customRole\" style=\"margin-top: 8px;\">\n </div>\n </div>\n\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"crew-status\">Status *</label>\n <select id=\"crew-status\" v-model=\"newCrew.status\">\n <option value=\"available\">Available</option>\n <option value=\"onduty\">On Duty</option>\n <option value=\"unavailable\">Unavailable</option>\n </select>\n </div>\n <div class=\"form-group\">\n <label for=\"crew-email\">Email Address *</label>\n <input type=\"email\" id=\"crew-email\" v-model=\"newCrew.email\" :class=\"{ 'error': formErrors.email }\">\n <div v-if=\"formErrors.email\" class=\"error-message\">{{ formErrors.email }}</div>\n </div>\n </div>\n\n <!-- Certifications Section -->\n <div class=\"certification-section\">\n <h3>Certifications</h3>\n <div v-for=\"(cert, index) in newCrew.certifications\" :key=\"index\" class=\"certification-entry\">\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label>Certification Name *</label>\n <input type=\"text\" v-model=\"cert.name\" placeholder=\"Enter certification name\">\n </div>\n <div class=\"form-group\">\n <label>Expiry Date *</label>\n <input type=\"date\" v-model=\"cert.expiryDate\">\n </div>\n <div class=\"form-group\">\n <label>Certificate Image *</label>\n <div class=\"image-upload-wrapper\">\n <input type=\"file\" :id=\"'cert-image-' + index\"\n @change=\"handleCertImageUpload($event, index)\" accept=\"image/*,.pdf\"\n class=\"file-input\">\n <label :for=\"'cert-image-' + index\" class=\"file-input-label\">\n <i class=\"bi bi-cloud-upload\"></i>\n {{ cert.imagePreview ? 'Change File' : 'Upload File' }}\n </label>\n <div v-if=\"cert.imagePreview\" class=\"image-preview\">\n <img v-if=\"cert.imageType !== 'pdf'\" :src=\"cert.imagePreview\"\n alt=\"Certificate preview\">\n <div v-else class=\"pdf-preview\">\n <i class=\"bi bi-file-pdf\"></i>\n <span>{{ cert.imageName }}</span>\n </div>\n <button type=\"button\" class=\"btn-remove-image\" @click=\"removeCertImage(index)\">\n <i class=\"bi bi-x-circle\"></i>\n </button>\n </div>\n <small v-if=\"cert.imageName\" class=\"file-name\">{{ cert.imageName }}</small>\n </div>\n </div>\n <div class=\"form-group\" style=\"display: flex; align-items: flex-end;\">\n <button type=\"button\" class=\"btn btn-danger btn-sm\" @click=\"removeCertification(index)\"\n v-if=\"newCrew.certifications.length > 1\">\n Remove\n </button>\n </div>\n </div>\n </div>\n\n <button type=\"button\" class=\"btn btn-secondary btn-sm\" @click=\"addCertificationEntry\">\n + Add More Certification\n </button>\n </div>\n\n <!-- Notes -->\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"crew-notes\">Notes</label>\n <textarea id=\"crew-notes\" rows=\"3\" v-model=\"newCrew.notes\"></textarea>\n </div>\n </div>\n\n <!-- Form Actions -->\n <div class=\"form-actions\">\n <button class=\"btn btn-secondary\" @click=\"handleCancelForm\">Cancel</button>\n <button class=\"btn btn-primary\" @click=\"handleAddCrewMember\">Add Crew Member</button>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'CrewManagement',\n\n props: {\n crew: {\n type: Array,\n required: true,\n default: () => []\n },\n vesselName: {\n type: String,\n default: ''\n },\n userProfile: {\n type: Object,\n default: () => ({ role: 'viewer' })\n },\n loading: {\n type: Boolean,\n default: false\n },\n availableRoles: {\n type: Array,\n default: () => ['Captain', 'First Officer', 'Engineer', 'Deckhand', 'Mechanic', 'Cook']\n },\n config: {\n type: Object,\n default: () => ({\n showWaveBackground: true,\n enableAdd: true,\n enableEdit: true,\n enableDelete: true,\n enableAssignShift: true,\n enableCertificationManagement: true\n })\n }\n },\n\n emits: [\n 'crew-add',\n 'crew-edit',\n 'crew-delete',\n 'crew-assign-shift',\n 'crew-deboard',\n 'crew-add-certification',\n 'crew-view-certification',\n 'search-changed',\n 'filter-changed',\n 'access-denied',\n 'upload-cert-image'\n ],\n\n data() {\n return {\n searchQuery: '',\n filterStatus: 'all',\n showAddForm: false,\n formErrors: {},\n expandedLogs: [],\n showTimesheet: false,\n timesheetFilter: 'all',\n timesheetSearch: '',\n timesheetSortKey: 'timestamp',\n timesheetSortOrder: 'desc',\n newCrew: {\n name: '',\n role: 'Deckhand',\n customRole: '',\n status: 'available',\n nextShift: '',\n certifications: [{\n name: '',\n expiryDate: '',\n imageFile: null,\n imagePreview: null,\n imageName: '',\n imageType: ''\n }],\n notes: '',\n email: '',\n onBoard: ''\n }\n }\n },\n\n computed: {\n sectionTitle() {\n return this.vesselName ? `Current Crew for ${this.vesselName}` : 'All Fleet Crew'\n },\n\n filteredCrew() {\n return this.crew.filter(member => {\n const matchesSearch = this.searchQuery === '' ||\n member.name.toLowerCase().includes(this.searchQuery.toLowerCase()) ||\n member.role.toLowerCase().includes(this.searchQuery.toLowerCase()) ||\n (member.vessel && member.vessel.toLowerCase().includes(this.searchQuery.toLowerCase()))\n\n const matchesStatus = this.filterStatus === 'all' || member.status === this.filterStatus\n\n return matchesSearch && matchesStatus\n })\n },\n\n allTimesheetEntries() {\n const entries = []\n\n this.crew.forEach(member => {\n if (member.log && member.log.length > 0) {\n member.log.forEach((logEntry, index) => {\n entries.push({\n ...logEntry,\n crewName: member.name,\n role: member.role,\n crewId: member.id,\n uniqueId: `${member.id}-${index}`\n })\n })\n }\n })\n\n return entries.sort((a, b) => {\n const dateA = new Date(a.timestamp)\n const dateB = new Date(b.timestamp)\n return this.timesheetSortOrder === 'desc' ? dateB - dateA : dateA - dateB\n })\n },\n\n filteredTimesheetEntries() {\n let filtered = this.allTimesheetEntries\n\n if (this.timesheetFilter !== 'all') {\n filtered = filtered.filter(entry => entry.action === this.timesheetFilter)\n }\n\n if (this.timesheetSearch) {\n const search = this.timesheetSearch.toLowerCase()\n filtered = filtered.filter(entry =>\n entry.crewName.toLowerCase().includes(search) ||\n entry.role.toLowerCase().includes(search) ||\n entry.action.toLowerCase().includes(search) ||\n (entry.vessel && entry.vessel.toLowerCase().includes(search)) ||\n (entry.notes && entry.notes.toLowerCase().includes(search))\n )\n }\n\n return this.sortTimesheetEntries(filtered)\n },\n\n uniqueCrewCount() {\n const uniqueCrewIds = new Set(this.filteredTimesheetEntries.map(e => e.crewId))\n return uniqueCrewIds.size\n },\n\n timesheetDateRange() {\n if (this.filteredTimesheetEntries.length === 0) return 'N/A'\n\n const dates = this.filteredTimesheetEntries.map(e => new Date(e.timestamp))\n const minDate = new Date(Math.min(...dates))\n const maxDate = new Date(Math.max(...dates))\n\n const formatDate = (date) => date.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' })\n\n return `${formatDate(minDate)} - ${formatDate(maxDate)}`\n },\n\n canAddCrew() {\n return this.config.enableAdd && this.hasPermission('add')\n },\n\n canEditCrew() {\n return this.config.enableEdit && this.hasPermission('edit')\n },\n\n canDeleteCrew() {\n return this.config.enableDelete && this.hasPermission('delete')\n },\n\n canAssignShift() {\n return this.config.enableAssignShift && this.hasPermission('assign')\n },\n\n canDeboardCrew() {\n return this.config.enableAssignShift && this.hasPermission('assign')\n }\n },\n\n methods: {\n hasPermission(action) {\n const { role, vessel } = this.userProfile\n const isVessel = vessel === this.vesselName\n\n const permissions = {\n 'owner': ['add', 'edit', 'delete', 'assign', 'view'],\n 'staff': ['add', 'edit', 'assign', 'view'],\n 'captain': ['assign', 'view'],\n 'viewer': ['view']\n }\n\n let rolePermissions = permissions[role] || []\n\n if (role === 'captain' && isVessel) {\n rolePermissions = [...rolePermissions, 'add']\n }\n\n return rolePermissions.includes(action)\n },\n\n handleToggleAddForm() {\n if (!this.canAddCrew) {\n this.$emit('access-denied', { action: 'add crew', userProfile: this.userProfile })\n return\n }\n this.showAddForm = !this.showAddForm\n if (!this.showAddForm) {\n this.resetForm()\n }\n },\n\n handleSearch() {\n this.$emit('search-changed', this.searchQuery)\n },\n\n handleFilter() {\n this.$emit('filter-changed', this.filterStatus)\n },\n\n filterTimesheet() {\n // Trigger re-computation of filtered entries\n },\n\n sortTimesheet(key) {\n if (this.timesheetSortKey === key) {\n this.timesheetSortOrder = this.timesheetSortOrder === 'asc' ? 'desc' : 'asc'\n } else {\n this.timesheetSortKey = key\n this.timesheetSortOrder = 'asc'\n }\n },\n\n sortTimesheetEntries(entries) {\n const sorted = [...entries]\n\n sorted.sort((a, b) => {\n let valA, valB\n\n switch (this.timesheetSortKey) {\n case 'timestamp':\n valA = new Date(a.timestamp)\n valB = new Date(b.timestamp)\n break\n case 'crewName':\n valA = a.crewName.toLowerCase()\n valB = b.crewName.toLowerCase()\n break\n case 'role':\n valA = a.role.toLowerCase()\n valB = b.role.toLowerCase()\n break\n case 'action':\n valA = a.action.toLowerCase()\n valB = b.action.toLowerCase()\n break\n default:\n return 0\n }\n\n if (valA < valB) return this.timesheetSortOrder === 'asc' ? -1 : 1\n if (valA > valB) return this.timesheetSortOrder === 'asc' ? 1 : -1\n return 0\n })\n\n return sorted\n },\n\n getTimesheetRowClass(action) {\n return `timesheet-row-${action.toLowerCase().replace(/\\s+/g, '-')}`\n },\n\n async handleAddCrewMember() {\n if (!this.validateForm()) {\n return\n }\n\n const validCertifications = this.newCrew.certifications.filter(cert =>\n cert.name.trim() !== '' && cert.expiryDate !== '' && cert.imageFile !== null\n )\n\n if (validCertifications.length === 0) {\n alert('Please add at least one complete certification with name, expiry date, and image.')\n return\n }\n\n const finalRole = this.newCrew.role === 'Other' ? this.newCrew.customRole : this.newCrew.role\n\n // Upload all certification images first and get their URLs\n const certificationsWithUrls = await Promise.all(\n validCertifications.map(async (cert, index) => {\n // Emit and wait for the upload to complete\n const uploadResult = await this.uploadCertificationImage(cert.imageFile, this.newCrew.email)\n\n return {\n name: cert.name,\n expiryDate: cert.expiryDate,\n imageName: cert.imageName,\n imageType: cert.imageType,\n imageUrl: uploadResult.publicUrl // Add the public URL here\n }\n })\n )\n\n const newMember = {\n name: this.newCrew.name,\n role: finalRole,\n status: this.newCrew.status,\n certifications: certificationsWithUrls,\n notes: this.newCrew.notes,\n vessel: this.vesselName,\n email: this.newCrew.email,\n onBoard: this.newCrew.onBoard,\n nextShift: this.newCrew.nextShift\n }\n\n this.$emit('crew-add', newMember)\n this.resetForm()\n this.showAddForm = false\n },\n\n // Add this helper method to handle the upload:\n async uploadCertificationImage(file, email) {\n // Return a promise that resolves when upload completes\n return new Promise((resolve, reject) => {\n this.$emit('upload-cert-image', {\n file,\n email,\n callback: (result) => {\n if (result.error) {\n reject(result.error)\n } else {\n resolve(result)\n }\n }\n })\n })\n },\n\n handleCancelForm() {\n this.showAddForm = false\n this.resetForm()\n },\n\n handleDeleteCrew(member) {\n if (!this.canDeleteCrew) {\n this.$emit('access-denied', { action: 'delete crew', userProfile: this.userProfile })\n return\n }\n\n this.$emit('crew-delete', member)\n },\n\n handleAssignShift(member) {\n if (!this.canAssignShift) {\n this.$emit('access-denied', { action: 'assign shift', userProfile: this.userProfile })\n return\n }\n\n this.$emit('crew-assign-shift', member)\n },\n\n handleDeboardCrew(member) {\n if (!this.canDeboardCrew) {\n this.$emit('access-denied', { action: 'deboard crew', userProfile: this.userProfile })\n return\n }\n\n let duration = null\n if (member.nextShift) {\n const embarkDate = new Date(member.nextShift)\n const today = new Date()\n const diffTime = Math.abs(today - embarkDate)\n duration = Math.ceil(diffTime / (1000 * 60 * 60 * 24))\n }\n\n this.$emit('crew-deboard', { member, duration })\n },\n\n toggleCrewLog(memberId) {\n const index = this.expandedLogs.indexOf(memberId)\n if (index > -1) {\n this.expandedLogs.splice(index, 1)\n } else {\n this.expandedLogs.push(memberId)\n }\n },\n\n handleAddCertification(member) {\n if (!this.canEditCrew) {\n this.$emit('access-denied', { action: 'add certification', userProfile: this.userProfile })\n return\n }\n\n this.$emit('crew-add-certification', member)\n },\n\n handleViewCertification(certification, member) {\n this.$emit('crew-view-certification', { certification, member })\n },\n\n resetForm() {\n this.newCrew = {\n name: '',\n role: 'Deckhand',\n customRole: '',\n status: 'available',\n nextShift: '',\n certifications: [{\n name: '',\n expiryDate: '',\n imageFile: null,\n imagePreview: null,\n imageName: '',\n imageType: ''\n }],\n notes: '',\n email: '',\n onBoard: ''\n }\n this.formErrors = {}\n },\n\n validateForm() {\n this.formErrors = {}\n\n const requiredFields = {\n name: 'Full Name',\n email: 'Email Address'\n }\n\n Object.keys(requiredFields).forEach(field => {\n if (!this.newCrew[field] || this.newCrew[field].trim() === '') {\n this.formErrors[field] = `${requiredFields[field]} is required`\n }\n })\n\n if (this.newCrew.email && !this.isValidEmail(this.newCrew.email)) {\n this.formErrors.email = 'Please enter a valid email address'\n }\n\n if (this.newCrew.role === 'Other' && (!this.newCrew.customRole || this.newCrew.customRole.trim() === '')) {\n this.formErrors.customRole = 'Custom role is required when \"Other\" is selected'\n }\n\n return Object.keys(this.formErrors).length === 0\n },\n\n isValidEmail(email) {\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/\n return emailRegex.test(email)\n },\n\n addCertificationEntry() {\n this.newCrew.certifications.push({\n name: '',\n expiryDate: '',\n imageFile: null,\n imagePreview: null,\n imageName: '',\n imageType: ''\n })\n },\n\n removeCertification(index) {\n this.newCrew.certifications.splice(index, 1)\n },\n\n handleCertImageUpload(event, index) {\n const file = event.target.files[0]\n if (!file) return\n\n const cert = this.newCrew.certifications[index]\n cert.imageFile = file\n cert.imageName = file.name\n cert.imageType = file.type.includes('pdf') ? 'pdf' : 'image'\n\n // Create preview for images\n if (cert.imageType === 'image') {\n const reader = new FileReader()\n reader.onload = (e) => {\n cert.imagePreview = e.target.result\n }\n reader.readAsDataURL(file)\n } else {\n cert.imagePreview = 'pdf'\n }\n },\n\n removeCertImage(index) {\n const cert = this.newCrew.certifications[index]\n cert.imageFile = null\n cert.imagePreview = null\n cert.imageName = ''\n cert.imageType = ''\n\n // Clear the file input\n const fileInput = document.getElementById('cert-image-' + index)\n if (fileInput) {\n fileInput.value = ''\n }\n },\n\n formatStatus(status) {\n return status ? status.charAt(0).toUpperCase() + status.slice(1) : ''\n },\n\n getStatusClass(status) {\n const statusMap = {\n 'available': 'status-available',\n 'onduty': 'status-onduty',\n 'unavailable': 'status-unavailable'\n }\n return statusMap[status] || ''\n },\n\n getCertificationClass(expiryDate) {\n const status = this.getExpiryStatus(expiryDate)\n const classMap = {\n 'expired': 'text-danger',\n 'expiringSoon': 'text-warning',\n 'valid': 'text-success'\n }\n return classMap[status] || ''\n },\n\n getExpiryStatus(dateStr) {\n if (!dateStr) return 'none'\n\n const expiry = new Date(dateStr)\n const today = new Date()\n const oneMonthFromNow = new Date()\n oneMonthFromNow.setMonth(today.getMonth() + 1)\n\n if (expiry <= today) return 'expired'\n if (expiry <= oneMonthFromNow) return 'expiringSoon'\n return 'valid'\n },\n\n formatLogDate(timestamp) {\n if (!timestamp) return ''\n const date = new Date(timestamp)\n return date.toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit'\n })\n },\n\n getLogActionClass(action) {\n const actionMap = {\n 'Embarked': 'log-action-embark',\n 'Deboarded': 'log-action-deboard',\n 'Assigned': 'log-action-assign',\n 'Status Changed': 'log-action-status'\n }\n return actionMap[action] || ''\n },\n\n getLogIcon(action) {\n const iconMap = {\n 'Embarked': 'bi bi-box-arrow-in-right',\n 'Deboarded': 'bi bi-box-arrow-left',\n 'Assigned': 'bi bi-calendar-check',\n 'Status Changed': 'bi bi-arrow-repeat'\n }\n return iconMap[action] || 'bi bi-circle-fill'\n }\n }\n}\n</script>\n\n<style>\n.add-crew-form h2 {\n color: #005792;\n}\n\n.crew-section {\n margin-bottom: 30px;\n}\n\n.crew-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n gap: 20px;\n margin-bottom: 30px;\n align-items: start;\n}\n\n.crew-card {\n background-color: #f8f9fa;\n border-radius: 6px;\n padding: 15px;\n box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);\n border-left: 4px solid #00a8e8;\n position: relative;\n}\n\n.crew-card.unavailable {\n border-left-color: #dc3545;\n opacity: 0.8;\n}\n\n.crew-name {\n font-weight: bold;\n font-size: 1.1em;\n margin-bottom: 5px;\n color: #005792;\n}\n\n.crew-role {\n color: #6c757d;\n font-size: 0.9em;\n margin-bottom: 10px;\n}\n\n.crew-certifications,\n.crew-availability {\n font-size: 0.85em;\n margin: 5px 0;\n}\n\n.certification-tag {\n display: inline-block;\n background-color: #e6f7ff;\n color: #005792;\n border-radius: 4px;\n padding: 2px 8px;\n margin-right: 5px;\n margin-bottom: 5px;\n font-size: 0.85em;\n cursor: pointer;\n}\n\n.certification-tag:hover {\n background-color: #d1f0ff;\n}\n\n.crew-status-badge {\n position: absolute;\n top: 15px;\n right: 15px;\n font-size: 0.75em;\n padding: 3px 8px;\n border-radius: 12px;\n font-weight: bold;\n}\n\n.status-available {\n background-color: #d4edda;\n color: #155724;\n}\n\n.status-unavailable {\n background-color: #f8d7da;\n color: #721c24;\n}\n\n.status-onduty {\n background-color: #cce5ff;\n color: #004085;\n}\n\n.action-buttons {\n display: flex;\n justify-content: space-between;\n margin-top: 15px;\n gap: 5px;\n flex-wrap: wrap;\n}\n\n.btn {\n padding: 6px 12px;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.9em;\n transition: background-color 0.2s;\n border: none;\n}\n\n.btn-primary {\n background-color: #005792;\n color: white;\n}\n\n.btn-primary:hover {\n background-color: #004675;\n}\n\n.btn-secondary {\n background-color: #e9ecef;\n color: #495057;\n}\n\n.btn-secondary:hover {\n background-color: #dde2e6;\n}\n\n.btn-warning {\n background-color: #ffc107;\n color: #212529;\n}\n\n.btn-warning:hover {\n background-color: #e0a800;\n}\n\n.btn-danger {\n background-color: #dc3545;\n color: white;\n}\n\n.btn-danger:hover {\n background-color: #c82333;\n}\n\n.btn-link {\n background: none;\n border: none;\n color: #005792;\n text-decoration: none;\n padding: 4px 8px;\n}\n\n.btn-link:hover {\n text-decoration: underline;\n}\n\n.btn-sm {\n font-size: 0.8em;\n padding: 4px 8px;\n}\n\n.crew-footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 10px;\n padding-top: 10px;\n border-top: 1px solid #e9ecef;\n}\n\n.crew-log-toggle {\n flex: 1;\n}\n\n.log-toggle-btn {\n text-align: left;\n padding: 0;\n display: flex;\n align-items: center;\n gap: 5px;\n}\n\n.crew-log {\n margin-top: 15px;\n padding: 10px;\n background-color: #ffffff;\n border-radius: 4px;\n border: 1px solid #dee2e6;\n max-height: 300px;\n overflow-y: auto;\n}\n\n.crew-log h4 {\n margin: 0 0 10px 0;\n font-size: 0.9em;\n color: #005792;\n border-bottom: 1px solid #dee2e6;\n padding-bottom: 5px;\n}\n\n.log-entry {\n padding: 8px;\n margin-bottom: 8px;\n border-left: 3px solid #005792;\n background-color: #f8f9fa;\n border-radius: 3px;\n}\n\n.log-entry:last-child {\n margin-bottom: 0;\n}\n\n.log-date {\n font-size: 0.75em;\n color: #6c757d;\n margin-bottom: 3px;\n}\n\n.log-action {\n font-weight: bold;\n font-size: 0.85em;\n margin-bottom: 3px;\n display: flex;\n align-items: center;\n gap: 5px;\n}\n\n.log-action-embark {\n color: #28a745;\n}\n\n.log-action-deboard {\n color: #dc3545;\n}\n\n.log-action-assign {\n color: #007bff;\n}\n\n.log-action-status {\n color: #ffc107;\n}\n\n.log-details {\n font-size: 0.8em;\n color: #495057;\n}\n\n.log-notes {\n font-size: 0.8em;\n color: #6c757d;\n font-style: italic;\n margin-top: 3px;\n}\n\n.search-filter {\n display: flex;\n margin-bottom: 20px;\n gap: 10px;\n align-items: center;\n}\n\n.search-filter input,\n.search-filter select {\n padding: 8px 12px;\n border: 1px solid #ced4da;\n border-radius: 4px;\n}\n\n.search-filter input {\n flex-grow: 1;\n}\n\n.search-filter select {\n min-width: 150px;\n}\n\n.add-crew-form {\n background-color: #f8f9fa;\n padding: 20px;\n border-radius: 6px;\n margin-top: 30px;\n}\n\n.form-row {\n display: flex;\n flex-wrap: wrap;\n gap: 15px;\n margin-bottom: 15px;\n}\n\n.form-group {\n flex: 1;\n min-width: 200px;\n}\n\n.form-group label {\n display: block;\n margin-bottom: 5px;\n font-weight: bold;\n color: #495057;\n}\n\n.text-danger {\n color: red;\n font-weight: bolder;\n}\n\n.text-warning {\n color: orange;\n font-weight: bolder;\n}\n\n.text-success {\n color: green;\n font-weight: bolder;\n}\n\n.icon {\n font-size: 20px;\n cursor: pointer;\n color: #005792;\n}\n\n.icon:hover {\n color: #003d5c;\n}\n\n.delete-icon {\n font-size: 20px;\n cursor: pointer;\n color: #dc3545;\n position: static;\n margin: 0;\n}\n\n.delete-icon:hover {\n color: #c82333;\n}\n\n.form-group input,\n.form-group select,\n.form-group textarea {\n width: 100%;\n padding: 8px;\n border: 1px solid #ced4da;\n border-radius: 4px;\n}\n\n.form-group input.error {\n border-color: #dc3545;\n}\n\n.error-message {\n color: #dc3545;\n font-size: 0.85em;\n margin-top: 5px;\n}\n\n.form-actions {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n margin-top: 20px;\n}\n\n.no-results {\n text-align: center;\n padding: 40px 20px;\n color: #6c757d;\n font-size: 1.1em;\n}\n\n.crew-section-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 15px;\n}\n\n.crew-section-header h2 {\n color: #005792;\n margin: 0;\n}\n\n.vcard {\n border-radius: 6px;\n padding: 5px;\n}\n\n.loading-state {\n text-align: center;\n padding: 40px 20px;\n}\n\n.spinner-border {\n width: 3rem;\n height: 3rem;\n border: 0.25em solid currentColor;\n border-right-color: transparent;\n border-radius: 50%;\n display: inline-block;\n animation: spinner-border 0.75s linear infinite;\n}\n\n@keyframes spinner-border {\n to {\n transform: rotate(360deg);\n }\n}\n\n.text-primary {\n color: #005792;\n}\n\n.visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n.certification-section {\n margin: 20px 0;\n padding: 15px;\n background-color: #ffffff;\n border-radius: 4px;\n border: 1px solid #dee2e6;\n}\n\n.certification-section h3 {\n color: #005792;\n margin-top: 0;\n margin-bottom: 15px;\n font-size: 1.1em;\n}\n\n.certification-entry {\n margin-bottom: 10px;\n}\n\n/* Image Upload Styles */\n.image-upload-wrapper {\n position: relative;\n}\n\n.file-input {\n display: none;\n}\n\n.file-input-label {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 8px 16px;\n background-color: #005792;\n color: white !important;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.9em;\n transition: background-color 0.2s;\n}\n\n.file-input-label:hover {\n background-color: #004675;\n}\n\n.file-input-label i {\n font-size: 1.1em;\n}\n\n.file-name {\n display: block;\n margin-top: 5px;\n color: #6c757d;\n font-size: 0.85em;\n}\n\n.image-preview {\n margin-top: 10px;\n position: relative;\n display: inline-block;\n}\n\n.image-preview img {\n max-width: 200px;\n max-height: 150px;\n border-radius: 4px;\n border: 2px solid #dee2e6;\n}\n\n.pdf-preview {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 15px;\n background-color: #f8f9fa;\n border: 2px solid #dee2e6;\n border-radius: 4px;\n max-width: 200px;\n}\n\n.pdf-preview i {\n font-size: 2em;\n color: #dc3545;\n}\n\n.pdf-preview span {\n font-size: 0.85em;\n color: #495057;\n word-break: break-word;\n}\n\n.btn-remove-image {\n position: absolute;\n top: -8px;\n right: -8px;\n background-color: #dc3545;\n color: white;\n border: none;\n border-radius: 50%;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n padding: 0;\n transition: background-color 0.2s;\n}\n\n.btn-remove-image:hover {\n background-color: #c82333;\n}\n\n.btn-remove-image i {\n font-size: 1em;\n}\n\n/* Timesheet Styles */\n.timesheet-view {\n background-color: #ffffff;\n border-radius: 6px;\n padding: 20px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n.timesheet-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n padding-bottom: 15px;\n border-bottom: 2px solid #005792;\n}\n\n.timesheet-header h3 {\n color: #005792;\n margin: 0;\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.timesheet-controls {\n display: flex;\n gap: 10px;\n}\n\n.timesheet-controls select,\n.timesheet-search {\n padding: 8px 12px;\n border: 1px solid #ced4da;\n border-radius: 4px;\n font-size: 0.9em;\n}\n\n.timesheet-search {\n min-width: 250px;\n}\n\n.timesheet-summary {\n display: flex;\n gap: 20px;\n margin-bottom: 20px;\n flex-wrap: wrap;\n}\n\n.summary-card {\n flex: 1;\n min-width: 150px;\n background-color: #f8f9fa;\n padding: 15px;\n border-radius: 6px;\n border-left: 4px solid #005792;\n}\n\n.summary-label {\n display: block;\n font-size: 0.85em;\n color: #6c757d;\n margin-bottom: 5px;\n}\n\n.summary-value {\n display: block;\n font-size: 1.5em;\n font-weight: bold;\n color: #005792;\n}\n\n.timesheet-table-container {\n overflow-x: auto;\n margin-top: 20px;\n}\n\n.timesheet-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 0.9em;\n}\n\n.timesheet-table thead {\n background-color: #005792;\n color: white;\n}\n\n.timesheet-table th {\n padding: 12px 8px;\n text-align: left;\n font-weight: bold;\n cursor: pointer;\n user-select: none;\n}\n\n.timesheet-table th:hover {\n background-color: #004675;\n}\n\n.timesheet-table th i {\n font-size: 0.8em;\n margin-left: 5px;\n}\n\n.timesheet-table tbody tr {\n border-bottom: 1px solid #dee2e6;\n}\n\n.timesheet-table tbody tr:hover {\n background-color: #f8f9fa;\n}\n\n.timesheet-table td {\n padding: 10px 8px;\n}\n\n.timestamp-cell {\n white-space: nowrap;\n color: #495057;\n font-size: 0.85em;\n}\n\n.crew-name-cell strong {\n color: #005792;\n}\n\n.role-cell {\n color: #6c757d;\n}\n\n.action-cell {\n white-space: nowrap;\n}\n\n.action-badge {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 4px 10px;\n border-radius: 12px;\n font-size: 0.85em;\n font-weight: bold;\n}\n\n.vessel-cell {\n color: #495057;\n}\n\n.duration-cell {\n color: #495057;\n font-weight: 500;\n}\n\n.notes-cell {\n color: #6c757d;\n font-style: italic;\n max-width: 200px;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.timesheet-row-embarked {\n background-color: #d4edda;\n}\n\n.timesheet-row-deboarded {\n background-color: #f8d7da;\n}\n\n.timesheet-row-assigned {\n background-color: #d1ecf1;\n}\n\n.timesheet-row-status-changed {\n background-color: #fff3cd;\n}\n\n@media (max-width: 768px) {\n .crew-grid {\n grid-template-columns: 1fr;\n }\n\n .search-filter {\n flex-direction: column;\n }\n\n .search-filter input,\n .search-filter select {\n width: 100%;\n }\n\n .timesheet-header {\n flex-direction: column;\n align-items: flex-start;\n gap: 15px;\n }\n\n .timesheet-controls {\n flex-direction: column;\n width: 100%;\n }\n\n .timesheet-controls select,\n .timesheet-search {\n width: 100%;\n }\n\n .timesheet-summary {\n flex-direction: column;\n }\n\n .timesheet-table {\n font-size: 0.8em;\n }\n\n .timesheet-table th,\n .timesheet-table td {\n padding: 8px 4px;\n }\n}\n.crew-subhead{\n color: #000;\n}\n</style>","<template>\n <div class=\"s-container container\">\n <div class=\"header\">\n <h1>OceanHelm Requisition System</h1>\n <p>Streamlined Material Request & Ordering Process</p>\n </div>\n\n <!-- Navigation Tabs -->\n <div class=\"nav-tabs\">\n <button v-for=\"tab in visibleTabs\" :key=\"tab.name\" :class=\"['nav-tab', { active: activeTab === tab.name }]\"\n @click=\"setActiveTab(tab.name)\">\n {{ tab.label }}\n </button>\n </div>\n\n <!-- New Requisition Tab -->\n <div v-if=\"activeTab === 'new-requisition'\" class=\"tab-content active\">\n <form @submit.prevent=\"handleSubmitRequisition\">\n <div class=\"form-grid\">\n <div class=\"form-group\">\n <label>Requestor Name *</label>\n <input type=\"text\" :value=\"userProfile.full_name\" readonly required class=\"form-control\" />\n </div>\n <div class=\"form-group\">\n <label>Department *</label>\n <select v-model=\"form.department\" required>\n <option value=\"\">Select Department</option>\n <option v-for=\"dept in departments\" :key=\"dept\" :value=\"dept\">{{ dept }}</option>\n </select>\n </div>\n <div class=\"form-group\">\n <label>Vessel *</label>\n <select v-model=\"form.project\" class=\"form-control\" required>\n <option disabled value=\"\">Select a vessel</option>\n <option v-for=\"v in vessels\" :key=\"v.id\" :value=\"v.name\">\n {{ v.name }}\n </option>\n </select>\n </div>\n <div class=\"form-group\">\n <label>Date Needed *</label>\n <input type=\"date\" v-model=\"form.neededDate\" required />\n </div>\n </div>\n\n <div class=\"form-group\">\n <label>Business Justification *</label>\n <textarea v-model=\"form.justification\" placeholder=\"Explain why these materials are needed...\"\n required></textarea>\n </div>\n\n <div class=\"items-section\">\n <div class=\"items-header\">\n <h3>Requested Items</h3>\n <button type=\"button\" class=\"add-item-btn\" @click=\"addItem\">+ Add Item</button>\n </div>\n <div>\n <div v-for=\"(item, index) in form.items\" :key=\"index\" class=\"item-row\">\n <div class=\"form-group\">\n <label>Item Code *</label>\n <input type=\"text\" v-model=\"item.id\" required />\n </div>\n <div class=\"form-group\">\n <label>Item Description *</label>\n <input type=\"text\" v-model=\"item.desc\" required />\n </div>\n <div class=\"form-group\">\n <label>Quantity *</label>\n <input type=\"number\" v-model.number=\"item.qty\" min=\"1\" required />\n </div>\n <div class=\"form-group\">\n <label>Unit *</label>\n <select v-model=\"item.unit\" required>\n <option v-for=\"unit in units\" :key=\"unit\" :value=\"unit\">{{ unit }}</option>\n </select>\n </div>\n <div class=\"form-group\">\n <label>Est. Unit Cost *</label>\n <input type=\"number\" v-model.number=\"item.cost\" step=\"0.01\" placeholder=\"0.00\" required />\n </div>\n <button type=\"button\" class=\"remove-item-btn\" @click=\"removeItem(index)\">Remove</button>\n </div>\n </div>\n </div>\n\n <div class=\"action-buttons\">\n <button type=\"submit\" class=\"btn btn-primary-req\">Submit Requisition</button>\n </div>\n </form>\n </div>\n\n <!-- All Requisitions Tab -->\n <div v-if=\"activeTab === 'all-requisitions'\" class=\"tab-content active\">\n <div class=\"requisition-list\">\n <div v-for=\"req in requisitions\" :key=\"req.id\" class=\"requisition-card\">\n <div class=\"requisition-header\">\n <div class=\"requisition-id\">{{ req.id }}</div>\n <div :class=\"['status-badge', `status-${req.status}`]\">{{ req.status }}</div>\n </div>\n <div class=\"requisition-details\">\n <div class=\"detail-item\" v-for=\"field in getRequisitionFields(req)\" :key=\"field.label\">\n <div class=\"detail-label\">{{ field.label }}</div>\n <div class=\"detail-value\">{{ field.value(req) }}</div>\n </div>\n </div>\n <div v-if=\"req.status === 'po-created' || req.status === 'delivered'\"\n class=\"form-group comments-section\">\n <button @click=\"handleOpenPO(req.id)\" class=\"add-item-btn comments-section\">\n Print PO\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <!-- My Requisitions Tab -->\n <div v-if=\"activeTab === 'my-requisitions'\" class=\"tab-content active\">\n <div class=\"requisition-list\">\n <div v-for=\"req in myRequisitions\" :key=\"req.id\" class=\"requisition-card\">\n <div class=\"requisition-header\">\n <div class=\"requisition-id\">{{ req.id }}</div>\n <div :class=\"['status-badge', `status-${req.status}`]\">{{ req.status }}</div>\n </div>\n <div class=\"requisition-details\">\n <div class=\"detail-item\" v-for=\"field in getRequisitionFields(req)\" :key=\"field.label\">\n <div class=\"detail-label\">{{ field.label }}</div>\n <div class=\"detail-value\">{{ field.value(req) }}</div>\n </div>\n </div>\n <div v-if=\"req.status === 'info-requested'\" class=\"form-group comments-section\">\n <label class=\"detail-label\">Your Response</label>\n <textarea v-model=\"infoResponse\" class=\"response-textarea\"\n placeholder=\"Submit more info...\"></textarea>\n <button @click=\"handleSubmitInfoResponse(req)\" class=\"add-item-btn comments-section\">\n Submit Info\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Pending Approval Tab -->\n <div v-if=\"activeTab === 'approvals'\" class=\"tab-content active\">\n <div style=\"margin-bottom: 20px;\">\n <h3 style=\"color: #1e40af; margin-bottom: 15px;\">Department Supervisor Dashboard</h3>\n <div style=\"background: #fef3c7; padding: 15px; border-radius: 10px; border-left: 4px solid #f59e0b;\">\n <strong>Role:</strong> Department Supervisor - Review requests for accuracy, necessity, and budget\n compliance\n </div>\n </div>\n <div class=\"requisition-list\" id=\"approvalsQueue\">\n <div v-for=\"req in reviewRequisitions\" :key=\"req.id\" class=\"requisition-card\">\n <div class=\"requisition-header\">\n <div class=\"requisition-id\">{{ req.id }}</div>\n </div>\n <div class=\"requisition-details\">\n <div class=\"detail-item\" v-for=\"field in requisitionFields\" :key=\"field.label\">\n <div class=\"detail-label\">{{ field.label }}</div>\n <div class=\"detail-value\">{{ field.value(req) }}</div>\n </div>\n </div>\n <!-- Justification -->\n <div class=\"detail-item\">\n <div class=\"detail-label\">Justification</div>\n <div class=\"detail-value\">{{ req.justification || 'N/A' }}</div>\n </div>\n\n <!-- Item list -->\n <div class=\"detail-item\">\n <div class=\"detail-label\">Items</div>\n <ul class=\"item-list\">\n <li v-for=\"(item, index) in req.items\" :key=\"index\">\n {{ item.desc }} - {{ item.qty }} {{ item.unit }} @ ₦{{ item.cost.toFixed(2) }} each\n </li>\n </ul>\n </div>\n <button type=\"button\" class=\"add-item-btn\" @click=\"handleApproveRequisition(req.id)\">Approve</button>\n <button type=\"button\" class=\"marginbox btn-reject\"\n @click=\"handleDeclineRequisition(req.id)\">Decline</button>\n <button type=\"button\" class=\"marginbox btn-request\" @click=\"handleInfoRequisition(req.id)\">Request\n Info</button>\n </div>\n </div>\n </div>\n\n <!-- Purchasing Queue Tab -->\n <div v-if=\"activeTab === 'purchasing'\" class=\"tab-content active\">\n <div style=\"margin-bottom: 20px;\">\n <h3 style=\"color: #1e40af; margin-bottom: 15px;\">Purchasing Department Dashboard</h3>\n <div style=\"background: #dbeafe; padding: 15px; border-radius: 10px; border-left: 4px solid #3b82f6;\">\n <strong>Role:</strong> Purchasing Team - Convert approved requisitions to Purchase Orders\n </div>\n </div>\n <div class=\"requisition-list\" id=\"purchasingQueue\">\n <div v-for=\"req in poRequisitions\" :key=\"req.id\" class=\"requisition-card\">\n <div class=\"requisition-header\">\n <div class=\"requisition-id\">{{ req.id }}</div>\n </div>\n <div class=\"requisition-details\">\n <div class=\"detail-item\" v-for=\"field in requisitionFields\" :key=\"field.label\">\n <div class=\"detail-label\">{{ field.label }}</div>\n <div class=\"detail-value\">{{ field.value(req) }}</div>\n </div>\n </div>\n <!-- Justification -->\n <div class=\"detail-item\">\n <div class=\"detail-label\">Justification</div>\n <div class=\"detail-value\">{{ req.justification || 'N/A' }}</div>\n </div>\n\n <!-- Item list -->\n <div class=\"detail-item\">\n <div class=\"detail-label\">Items</div>\n <ul class=\"item-list\">\n <li v-for=\"(item, index) in req.items\" :key=\"index\">\n {{ item.desc }} - {{ item.qty }} {{ item.unit }} @ ₦{{ item.cost.toFixed(2) }} each\n </li>\n </ul>\n </div>\n <button type=\"button\" class=\"add-item-btn\" @click=\"handleCreatePO(req.id)\">Create PO</button>\n </div>\n </div>\n </div>\n\n <!-- Receiving Tab -->\n <div v-if=\"activeTab === 'receiving'\" class=\"tab-content active\">\n <div style=\"margin-bottom: 20px;\">\n <h3 style=\"color: #1e40af; margin-bottom: 15px;\">Receiving & Inventory Dashboard</h3>\n <div style=\"background: #dcfce7; padding: 15px; border-radius: 10px; border-left: 4px solid #10b981;\">\n <strong>Role:</strong> Warehouse Team - Process incoming deliveries and update inventory\n </div>\n </div>\n <div class=\"requisition-list\" id=\"receivingQueue\">\n <div v-for=\"req in awaitingDelivery\" :key=\"req.id\" class=\"requisition-card\">\n <div class=\"requisition-header\">\n <div class=\"requisition-id\">{{ req.id }}</div>\n </div>\n <div class=\"requisition-details\">\n <div class=\"detail-item\" v-for=\"field in requisitionFields\" :key=\"field.label\">\n <div class=\"detail-label\">{{ field.label }}</div>\n <div class=\"detail-value\">{{ field.value(req) }}</div>\n </div>\n </div>\n <!-- Justification -->\n <div class=\"detail-item\">\n <div class=\"detail-label\">Justification</div>\n <div class=\"detail-value\">{{ req.justification || 'N/A' }}</div>\n </div>\n\n <!-- Item list -->\n <div class=\"detail-item\">\n <div class=\"detail-label\">Items</div>\n <ul class=\"item-list\">\n <li v-for=\"(item, index) in req.items\" :key=\"index\">\n {{ item.desc }} - {{ item.qty }} {{ item.unit }} @ ₦{{ item.cost.toFixed(2) }} each\n </li>\n </ul>\n </div>\n <button type=\"button\" class=\"add-item-btn\" @click=\"handleAcceptDelivery(req.id)\">Accept\n Delivery</button>\n </div>\n </div>\n </div>\n\n <!-- PO Tab -->\n <div v-if=\"activeTab === 'po'\" class=\"tab-content active\">\n <div class=\"po-content\" id=\"po-content\">\n <div class=\"po-header\">\n <div class=\"company-info\">\n <h3>Vendor Information</h3>\n <div class=\"info-row\">\n <span class=\"info-label\">Company:</span>\n <span class=\"info-value\">{{ vendorInfo.company || poDetails.vendorInfo?.company }} </span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Contact:</span>\n <span class=\"info-value\">{{ vendorInfo.contact || poDetails.vendorInfo?.contact }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Email:</span>\n <span class=\"info-value\">{{ vendorInfo.email || poDetails.vendorInfo?.email }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Phone:</span>\n <span class=\"info-value\">{{ vendorInfo.phone || poDetails.vendorInfo?.phone }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Address:</span>\n <span class=\"info-value\">{{ vendorInfo.address || poDetails.vendorInfo?.address }}</span>\n </div>\n </div>\n\n <div class=\"company-info\">\n <h3>Purchase Order Details</h3>\n <div class=\"info-row\">\n <span class=\"info-label\">PO Number:</span>\n <span class=\"info-value\">{{ poDetails.id }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Date:</span>\n <span class=\"info-value\">{{ vendorInfo.poDate || poDetails.vendorInfo?.poDate }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Requested By:</span>\n <span class=\"info-value\">{{ vendorInfo.poApproved || poDetails.vendorInfo?.poApproved }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Department:</span>\n <span class=\"info-value\">PO-{{ poDetails.department }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Delivery Date:</span>\n <span class=\"info-value\">{{ poDetails.neededDate }}</span>\n </div>\n </div>\n </div>\n\n <div class=\"items-section\">\n <h2 class=\"section-title\">Order Items</h2>\n <table class=\"items-table\">\n <thead>\n <tr>\n <th>Item #</th>\n <th>Description</th>\n <th>Quantity</th>\n <th>Unit Price</th>\n <th>Total</th>\n <th v-if=\"!isPrinting\">Actions</th>\n </tr>\n </thead>\n <tbody>\n <tr v-for=\"(item, index) in poDetails.items || []\" :key=\"index\">\n <td>{{ item.itemNumber }}</td>\n <td>{{ item.desc }}</td>\n <td>{{ item.qty }}</td>\n <td>\n <span v-if=\"!item.editing\">\n ${{ item.cost.toFixed(2) }}\n <span v-if=\"item.cost !== item.unitPrice\" class=\"price-change-indicator\">!</span>\n </span>\n <input v-else v-model.number=\"item.tempPrice\" type=\"number\" step=\"0.01\"\n class=\"price-input\" :class=\"{ 'price-changed': item.cost !== item.tempPrice }\">\n </td>\n <td>${{ (item.unitPrice * item.qty).toFixed(2) }}</td>\n <td v-if=\"!isPrinting\">\n <button v-if=\"!item.editing\" @click=\"startEdit(index)\" class=\"edit-btn\">\n Edit Price\n </button>\n <div v-else>\n <button @click=\"savePrice(index)\" class=\"save-btn\">Save</button>\n <button @click=\"cancelEdit(index)\" class=\"cancel-btn\">Cancel</button>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n\n <div v-for=\"(item, index) in poDetails.items || []\" :key=\"'note-' + index\">\n <div v-if=\"item.justification\" class=\"justification-note\">\n <strong>Price Change Justification (Item {{ item.itemNumber }}):</strong> {{ item.justification\n }}\n </div>\n </div>\n\n <div class=\"totals\">\n <div class=\"total-row\">\n <span>Subtotal:</span>\n <span>${{ subTotal.toFixed(2) }}</span>\n </div>\n <div class=\"total-row\">\n <span>Tax (%):</span>\n <span>${{ getOptional(vendorInfo.tax) }}</span>\n </div>\n <div class=\"total-row\">\n <span>Shipping:</span>\n <span>${{ getOptional(vendorInfo.shipping) }}</span>\n </div>\n <div class=\"total-row grand-total\">\n <span>Grand Total:</span>\n <span>${{ (subTotal + getOptional(vendorInfo.tax) + getOptional(vendorInfo.shipping)).toFixed(2)\n }}</span>\n </div>\n </div>\n </div>\n </div>\n <!-- Justification Modal -->\n <div v-if=\"showJustificationModal\" class=\"justification-modal\" @click.self=\"closeJustificationModal\">\n <div class=\"modal-content\">\n <h3>Price Change Justification Required</h3>\n <p style=\"margin-bottom: 15px; color: #666;\">\n Please provide a justification for changing the price from\n <strong>${{ currentItem?.cost?.toFixed(2) }}</strong> to\n <strong>${{ currentItem?.tempPrice?.toFixed(2) }}</strong>\n </p>\n <textarea v-model=\"justificationText\" class=\"justification-textarea\"\n placeholder=\"Enter justification for price change...\" required></textarea>\n <div class=\"modal-buttons\">\n <button @click=\"closeJustificationModal\" class=\"cancel-btn\">Cancel</button>\n <button @click=\"confirmPriceChange\" class=\"save-btn\" :disabled=\"!justificationText.trim()\">\n Confirm Change\n </button>\n </div>\n </div>\n </div>\n <button v-if=\"!isPrinting\" type=\"button\" class=\"add-item-btn\" @click=\"handleFinishPO(poDetails.id)\">Approve\n PO</button>\n </div>\n\n <!-- Workflow Guide Tab -->\n <div v-if=\"activeTab === 'workflow'\" class=\"tab-content active\">\n <div class=\"workflow-steps\">\n <div class=\"workflow-step\">\n <div class=\"step-icon completed\">1</div>\n <div class=\"step-title\">Request Submitted</div>\n </div>\n <div class=\"workflow-step\">\n <div class=\"step-icon active\">2</div>\n <div class=\"step-title\">Department Review</div>\n </div>\n <div class=\"workflow-step\">\n <div class=\"step-icon\">3</div>\n <div class=\"step-title\">Management Approval</div>\n </div>\n <div class=\"workflow-step\">\n <div class=\"step-icon\">4</div>\n <div class=\"step-title\">Purchase Order Created</div>\n </div>\n <div class=\"workflow-step\">\n <div class=\"step-icon\">5</div>\n <div class=\"step-title\">Order Fulfilled</div>\n </div>\n </div>\n\n <div style=\"background: white; padding: 30px; border-radius: 15px; margin-top: 20px;\">\n <h3 style=\"color: #1e40af; margin-bottom: 20px;\">Requisition Workflow Process</h3>\n <div style=\"line-height: 1.8; color: #374151;\">\n <p><strong>Step 1: Request Identification</strong><br>\n Department or individual identifies need for materials, equipment, or services.</p>\n\n <p><strong>Step 2: Requisition Creation</strong><br>\n Complete requisition form with detailed specifications, quantities, and business justification.</p>\n\n <p><strong>Step 3: Department Review</strong><br>\n Department supervisor reviews request for accuracy, necessity, and budget compliance.</p>\n\n <p><strong>Step 4: Management Approval</strong><br>\n Based on cost thresholds, appropriate management level provides approval.</p>\n\n <p><strong>Step 5: Purchase Order Generation</strong><br>\n Purchasing team converts approved requisition into formal Purchase Order (PO).</p>\n\n <p><strong>Step 6: Vendor Processing</strong><br>\n PO sent to vendor, order processed, and delivery scheduled.</p>\n\n <p><strong>Step 7: Receipt & Inventory</strong><br>\n Goods received, inspected, and entered into inventory system.</p>\n </div>\n </div>\n </div>\n </div>\n</template>\n \n<script>\nexport default {\n name: 'RequisitionSystem',\n props: {\n userProfile: {\n type: Object,\n required: true\n },\n userRole: {\n type: String,\n required: true\n },\n requisitions: {\n type: Array,\n default: () => []\n },\n vessels: {\n type: Array,\n default: () => []\n }\n },\n\n emits: [\n 'submit-requisition',\n 'submit-info-response',\n 'approve-requisition',\n 'decline-requisition',\n 'info-requisition',\n 'create-po',\n 'open-po',\n 'finish-po',\n 'accept-delivery'\n ],\n\n data() {\n return {\n activeTab: 'workflow',\n isPrinting: false,\n infoResponse: '',\n\n // Tabs with visibility rules\n tabs: [\n { name: 'new-requisition', label: 'New Requisition', roles: ['requisitor'] },\n { name: 'my-requisitions', label: 'My Requisitions', roles: ['requisitor'] },\n { name: 'all-requisitions', label: 'All Requisitions', roles: ['requisitor', 'supervisor', 'captain', 'owner', 'purchaser'] },\n { name: 'approvals', label: 'Pending Approvals', roles: ['owner', 'supervisor'] },\n { name: 'purchasing', label: 'Purchasing Queue', roles: ['purchaser'] },\n { name: 'receiving', label: 'Receiving', roles: ['requisitor'] },\n { name: 'workflow', label: 'Workflow Guide', roles: ['requisitor', 'supervisor', 'owner', 'purchaser', 'captain'] }\n ],\n\n // Form State\n form: {\n requestor: '',\n department: '',\n project: '',\n neededDate: '',\n justification: '',\n items: []\n },\n\n poDetails: {\n editing: false,\n items: []\n },\n vendorInfo: {},\n justificationText: '',\n currentItemIndex: null,\n showJustificationModal: false,\n\n // common fields\n requisitionFields: [\n { label: 'Requestor', value: req => req.requestor },\n { label: 'Department', value: req => req.department },\n { label: 'Project', value: req => req.project || 'N/A' },\n { label: 'Submitted', value: req => req.submittedDate },\n { label: 'Items', value: req => `${req.items.length} item(s)` }\n ],\n\n // Fields for My Requisitions display\n requisitionFieldsMap: {\n approved: [\n { label: 'Approved By', value: req => req.approvedBy },\n ],\n declined: [\n { label: 'Declined By', value: req => req.declinedBy },\n { label: 'Rejection Reason', value: req => req.rejectionReason },\n ],\n 'info-requested': [\n { label: 'Info Requester', value: req => req.infoRequestedBy },\n { label: 'Requested Info', value: req => req.requestedInfo }\n ]\n },\n\n // Options\n departments: [\n 'Marine Operations', 'Engineering', 'Maintenance',\n 'Safety & Compliance', 'Logistics', 'Administration',\n 'Engine Room'\n ],\n\n priorities: [\n 'Urgent - Same Day',\n 'High - Within 3 Days',\n 'Normal - Within 1 Week',\n 'Low - Within 2 Weeks'\n ],\n\n units: ['Pieces', 'Kilograms', 'Liters', 'Meters', 'Sets', 'Boxes']\n }\n },\n\n computed: {\n visibleTabs() {\n return this.tabs.filter(tab => tab.roles.includes(this.userRole))\n },\n\n subTotal() {\n return (this.poDetails.items || []).reduce((sum, item) => {\n return sum + (item.unitPrice * item.qty);\n }, 0);\n },\n\n reviewRequisitions() {\n return this.requisitions.filter(r => r.status === 'under-review');\n },\n\n poRequisitions() {\n return this.requisitions.filter(r => r.status === 'approved');\n },\n\n awaitingDelivery() {\n return this.requisitions.filter(r => r.status === 'po-created');\n },\n\n currentItem() {\n return this.currentItemIndex !== null ? this.poDetails.items[this.currentItemIndex] : null;\n },\n\n myRequisitions() {\n const userId = this.userProfile.id || this.userProfile.profile_id;\n return this.requisitions.filter(req => req.profile_id == userId);\n }\n },\n\n methods: {\n setActiveTab(tabName) {\n this.activeTab = tabName;\n },\n\n getOptional(value) {\n return typeof value === 'number' ? value.toFixed(2) : '0.00';\n },\n\n getRequisitionFields(req) {\n const statusFields = this.requisitionFieldsMap[req.status] || [];\n return [...(this.requisitionFields || []), ...statusFields];\n },\n\n addItem() {\n this.form.items.push({\n id: '',\n desc: '',\n qty: 1,\n unit: 'Pieces',\n cost: 0\n })\n },\n\n removeItem(index) {\n this.form.items.splice(index, 1)\n },\n\n startEdit(index) {\n this.poDetails.items[index].editing = true;\n this.poDetails.items[index].tempPrice = this.poDetails.items[index].unitPrice;\n },\n\n cancelEdit(index) {\n this.poDetails.items[index].editing = false;\n this.poDetails.items[index].tempPrice = this.poDetails.items[index].unitPrice;\n },\n\n savePrice(index) {\n const item = this.poDetails.items[index];\n if (item.tempPrice !== item.cost) {\n // Price changed, require justification\n this.currentItemIndex = index;\n this.showJustificationModal = true;\n } else {\n // No change, just save\n item.unitPrice = item.tempPrice;\n item.editing = false;\n }\n },\n\n confirmPriceChange() {\n if (!this.justificationText.trim()) {\n alert('Please provide a justification for the price change.');\n return;\n }\n\n const item = this.poDetails.items[this.currentItemIndex];\n item.unitPrice = item.tempPrice;\n item.cost = item.tempPrice;\n item.justification = this.justificationText.trim();\n item.editing = false;\n\n this.closeJustificationModal();\n },\n\n closeJustificationModal() {\n this.showJustificationModal = false;\n this.currentItemIndex = null;\n this.justificationText = '';\n },\n\n // Event handlers that emit to parent\n handleSubmitRequisition() {\n const requisition = this.collectFormData('under-review');\n this.$emit('submit-requisition', requisition);\n this.resetForm();\n },\n\n handleSubmitInfoResponse(req) {\n if (!this.infoResponse || this.infoResponse.trim() === '') {\n alert('Please enter a response before submitting.');\n return;\n }\n this.$emit('submit-info-response', { req, response: this.infoResponse });\n this.infoResponse = '';\n },\n\n handleApproveRequisition(id) {\n this.$emit('approve-requisition', id);\n },\n\n handleDeclineRequisition(id) {\n this.$emit('decline-requisition', id);\n },\n\n handleInfoRequisition(id) {\n this.$emit('info-requisition', id);\n },\n\n handleCreatePO(id) {\n this.$emit('create-po', id);\n },\n\n handleOpenPO(id) {\n this.$emit('open-po', id);\n },\n\n handleFinishPO(id) {\n this.$emit('finish-po', id);\n },\n\n handleAcceptDelivery(id) {\n this.$emit('accept-delivery', id);\n },\n\n collectFormData(status) {\n return {\n id: 'REQ-' + Date.now(),\n requestor: this.userProfile.full_name,\n department: this.form.department,\n project: this.form.project,\n neededDate: this.form.neededDate,\n justification: this.form.justification,\n items: this.form.items.map(item => ({ ...item })),\n status,\n submittedDate: new Date().toLocaleDateString(),\n profile_id: this.userProfile.id || this.userProfile.profile_id\n }\n },\n\n resetForm() {\n this.form = {\n requestor: '',\n department: '',\n project: '',\n neededDate: '',\n justification: '',\n items: []\n }\n // Add initial item row again\n this.addItem()\n },\n\n // Methods for updating PO details from parent\n updatePODetails(details) {\n this.poDetails = details;\n this.getNumber();\n for (let item of this.poDetails.items) {\n item.tempPrice = item.cost;\n item.unitPrice = item.cost;\n item.subTotal = item.unitPrice * item.qty;\n }\n },\n\n updateVendorInfo(info) {\n this.vendorInfo = info;\n },\n\n setPrintingMode(isPrinting) {\n this.isPrinting = isPrinting;\n },\n\n getNumber() {\n return (this.poDetails.items || []).map((item, index) => {\n return item.itemNumber = index + 1;\n })\n }\n },\n\n created() {\n // Initialize form with one item row\n this.addItem()\n }\n}\n</script>\n\n<style>\n.s-container {\n max-width: 1200px;\n margin: 0 auto;\n background: rgba(255, 255, 255, 0.95);\n border-radius: 20px;\n box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);\n overflow: hidden;\n backdrop-filter: blur(10px);\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n padding: 20px;\n}\n\n.header h1 {\n font-size: 2.5rem;\n margin-bottom: 10px;\n position: relative;\n z-index: 1;\n}\n\n.header p {\n font-size: 1.1rem;\n opacity: 0.9;\n position: relative;\n z-index: 1;\n}\n\n.nav-tabs {\n display: flex;\n background: #f8fafc;\n border-bottom: 2px solid #e2e8f0;\n overflow-x: auto;\n /* enable horizontal scroll */\n white-space: nowrap;\n /* prevent wrapping */\n -webkit-overflow-scrolling: touch;\n /* smooth scrolling on mobile */\n scrollbar-width: thin;\n /* optional: thinner scrollbar in Firefox */\n}\n\n/* Optional: style the scrollbar (Webkit browsers only) */\n.nav-tabs::-webkit-scrollbar {\n height: 6px;\n}\n\n.nav-tabs::-webkit-scrollbar-thumb {\n background: #cbd5e1;\n border-radius: 3px;\n}\n\n.nav-tabs::-webkit-scrollbar-track {\n background: transparent;\n}\n\n\n.nav-tab {\n flex: 1;\n padding: 15px 20px;\n background: none;\n border: none;\n cursor: pointer;\n font-size: 1rem;\n font-weight: 600;\n color: #64748b;\n transition: all 0.3s ease;\n position: relative;\n}\n\n.nav-tab:hover {\n background: #e2e8f0;\n color: #1e40af;\n}\n\n.nav-tab.active {\n color: #1e40af;\n background: white;\n}\n\n.nav-tab.active::after {\n content: '';\n position: absolute;\n bottom: -2px;\n left: 0;\n right: 0;\n height: 3px;\n background: #1e40af;\n}\n\n.tab-content {\n display: none;\n padding: 30px;\n animation: fadeIn 0.5s ease-in;\n}\n\n.tab-content.active {\n display: block;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n transform: translateY(20px);\n }\n\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n.form-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 25px;\n margin-bottom: 30px;\n}\n\n.form-group {\n display: flex;\n flex-direction: column;\n}\n\n.form-group label {\n font-weight: 600;\n margin-bottom: 8px;\n color: #374151;\n font-size: 0.95rem;\n}\n\n.form-group input,\n.form-group select,\n.form-group textarea {\n padding: 12px 15px;\n border: 2px solid #e5e7eb;\n border-radius: 10px;\n font-size: 1rem;\n transition: all 0.3s ease;\n background: white;\n}\n\n.form-group input:focus,\n.form-group select:focus,\n.form-group textarea:focus {\n outline: none;\n border-color: #3b82f6;\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);\n}\n\n.form-group textarea {\n min-height: 100px;\n resize: vertical;\n}\n\n.items-section {\n background: #f8fafc;\n border-radius: 15px;\n padding: 25px;\n margin: 25px 0;\n border: 2px solid #e2e8f0;\n}\n\n.items-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n}\n\n.items-header h3 {\n color: #1e40af;\n font-size: 1.3rem;\n}\n\n.add-item-btn {\n background: linear-gradient(135deg, #10b981 0%, #059669 100%);\n color: white;\n border: none;\n padding: 10px 20px;\n border-radius: 8px;\n cursor: pointer;\n font-weight: 600;\n transition: all 0.3s ease;\n box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);\n}\n\n.add-item-btn:hover {\n transform: translateY(-2px);\n box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);\n}\n\n.item-row {\n display: grid;\n grid-template-columns: 2fr 1fr 1fr 1fr auto;\n gap: 15px;\n align-items: end;\n margin-bottom: 15px;\n padding: 15px;\n background: white;\n border-radius: 10px;\n border: 1px solid #e5e7eb;\n transition: all 0.3s ease;\n}\n\n.item-row:hover {\n box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);\n}\n\n.marginbox {\n margin: 10px\n}\n\n.item-list {\n list-style: none;\n padding: 0;\n margin: 0.5rem 0;\n}\n\n.item-list li {\n background: #f1f5f9;\n /* Light blue-gray background */\n margin-bottom: 0.5rem;\n padding: 0.5rem 0.75rem;\n border-radius: 0.375rem;\n /* Rounded corners */\n font-size: 0.95rem;\n color: #1e293b;\n /* Dark text */\n display: flex;\n justify-content: space-between;\n align-items: center;\n content: '•';\n color: #3b82f6;\n}\n\n\n.remove-item-btn {\n background: #ef4444;\n color: white;\n border: none;\n padding: 8px 12px;\n border-radius: 6px;\n cursor: pointer;\n font-size: 0.9rem;\n transition: all 0.3s ease;\n}\n\n.remove-item-btn:hover {\n background: #dc2626;\n transform: scale(1.05);\n}\n\n.approval-actions {\n display: flex;\n gap: 10px;\n margin-top: 15px;\n}\n\n.btn-approve {\n background: linear-gradient(135deg, #10b981 0%, #059669 100%);\n color: white;\n border: none;\n padding: 8px 16px;\n border-radius: 6px;\n cursor: pointer;\n font-size: 0.9rem;\n font-weight: 600;\n transition: all 0.3s ease;\n}\n\n.btn-approve:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);\n}\n\n.btn-reject {\n background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);\n color: white;\n border: none;\n padding: 8px 16px;\n border-radius: 6px;\n cursor: pointer;\n font-size: 0.9rem;\n font-weight: 600;\n transition: all 0.3s ease;\n}\n\n.btn-reject:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);\n}\n\n.btn-request {\n background: linear-gradient(135deg, #ef9a44 0%, #fa920a 100%);\n color: white;\n border: none;\n padding: 8px 16px;\n border-radius: 6px;\n cursor: pointer;\n font-size: 0.9rem;\n font-weight: 600;\n transition: all 0.3s ease;\n}\n\n.btn-request:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 12px rgba(240, 162, 52, 0.3);\n}\n\n\n.btn-create-po {\n background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);\n color: white;\n border: none;\n padding: 8px 16px;\n border-radius: 6px;\n cursor: pointer;\n font-size: 0.9rem;\n font-weight: 600;\n transition: all 0.3s ease;\n}\n\n.btn-create-po:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);\n}\n\n.btn-mark-delivered {\n background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);\n color: white;\n border: none;\n padding: 8px 16px;\n border-radius: 6px;\n cursor: pointer;\n font-size: 0.9rem;\n font-weight: 600;\n transition: all 0.3s ease;\n}\n\n.btn-mark-delivered:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);\n}\n\n.po-info {\n background: #f8fafc;\n padding: 15px;\n border-radius: 8px;\n margin: 10px 0;\n border: 1px solid #e2e8f0;\n}\n\n.po-info h4 {\n color: #1e40af;\n margin-bottom: 10px;\n font-size: 1rem;\n}\n\n.po-details {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));\n gap: 10px;\n font-size: 0.9rem;\n}\n\n.items-list {\n background: #f8fafc;\n padding: 15px;\n border-radius: 8px;\n margin: 15px 0;\n border: 1px solid #e2e8f0;\n}\n\n.items-list h4 {\n color: #374151;\n margin-bottom: 10px;\n font-size: 1rem;\n}\n\n.item-detail {\n display: flex;\n justify-content: space-between;\n padding: 8px 0;\n border-bottom: 1px solid #e5e7eb;\n}\n\n.item-detail:last-child {\n border-bottom: none;\n}\n\n.comments-section {\n margin-top: 15px;\n}\n\n.comments-section textarea {\n width: 100%;\n min-height: 80px;\n padding: 10px;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n font-size: 0.9rem;\n resize: vertical;\n}\n\n.role-badge {\n display: inline-block;\n padding: 4px 8px;\n border-radius: 12px;\n font-size: 0.75rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin-left: 10px;\n}\n\n.role-supervisor {\n background: #fef3c7;\n color: #92400e;\n}\n\n.role-purchasing {\n background: #dbeafe;\n color: #1e40af;\n}\n\n.role-receiving {\n background: #dcfce7;\n color: #166534;\n}\n\n.status-badge {\n display: inline-block;\n padding: 6px 12px;\n border-radius: 20px;\n font-size: 0.85rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.status-draft {\n background: #fef3c7;\n color: #92400e;\n}\n\n.status-under-review {\n background: #dbeafe;\n color: #1e40af;\n}\n\n.status-approved {\n background: #dcfce7;\n color: #166534;\n}\n\n.status-declined {\n background: #fee2e2;\n color: #dc2626;\n}\n\n.status-info-requested {\n background: #e8cf12;\n color: #da7212;\n}\n\n.status-po-created {\n background: #e0e7ff;\n color: #4bca38;\n}\n\n.status-pending-supply {\n background: #113fd8;\n color: #4bca38;\n}\n\n.status-delivered {\n background: #f3e8ff;\n color: #7c3aed;\n}\n\n.status-received {\n background: #ecfdf5;\n color: #065f46;\n}\n\n.action-buttons {\n display: flex;\n gap: 15px;\n justify-content: flex-end;\n margin-top: 30px;\n padding-top: 25px;\n border-top: 2px solid #e5e7eb;\n}\n\n/*.btn {\n padding: 12px 25px;\n border: none;\n border-radius: 10px;\n font-size: 1rem;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.3s ease;\n min-width: 120px;\n}*/\n\n.btn-primary-req {\n background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);\n color: white;\n box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);\n}\n\n.btn-primary-req:hover {\n transform: translateY(-2px);\n box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);\n}\n\n.btn-secondary {\n background: #6b7280;\n color: white;\n}\n\n.btn-secondary:hover {\n background: #4b5563;\n transform: translateY(-2px);\n}\n\n.requisition-list {\n display: grid;\n gap: 20px;\n}\n\n.requisition-card {\n background: white;\n border-radius: 15px;\n padding: 25px;\n box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);\n border: 1px solid #e5e7eb;\n transition: all 0.3s ease;\n}\n\n.requisition-card:hover {\n transform: translateY(-5px);\n box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);\n}\n\n.requisition-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 15px;\n}\n\n.requisition-id {\n font-size: 1.2rem;\n font-weight: 700;\n color: #1e40af;\n}\n\n.requisition-details {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 15px;\n margin-top: 15px;\n}\n\n.detail-item {\n display: flex;\n flex-direction: column;\n}\n\n.detail-label {\n font-size: 0.85rem;\n font-weight: 600;\n color: #6b7280;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin-bottom: 4px;\n}\n\n.detail-value {\n font-size: 1rem;\n color: #374151;\n font-weight: 500;\n}\n\n.workflow-steps {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 30px 0;\n padding: 20px;\n background: #f8fafc;\n border-radius: 15px;\n border: 2px solid #e2e8f0;\n}\n\n.workflow-step {\n display: flex;\n flex-direction: column;\n align-items: center;\n flex: 1;\n position: relative;\n}\n\n.workflow-step:not(:last-child)::after {\n content: '';\n position: absolute;\n top: 20px;\n right: -50%;\n width: 100%;\n height: 2px;\n background: #e5e7eb;\n z-index: 1;\n}\n\n.step-icon {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background: #e5e7eb;\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: bold;\n color: #6b7280;\n margin-bottom: 10px;\n position: relative;\n z-index: 2;\n}\n\n.step-icon.active {\n background: #3b82f6;\n color: white;\n}\n\n.step-icon.completed {\n background: #10b981;\n color: white;\n}\n\n.step-title {\n font-size: 0.9rem;\n font-weight: 600;\n color: #374151;\n text-align: center;\n}\n\n@media (max-width: 768px) {\n .form-grid {\n grid-template-columns: 1fr;\n }\n\n .item-row {\n grid-template-columns: 1fr;\n gap: 10px;\n }\n\n .action-buttons {\n flex-direction: column;\n }\n\n .workflow-steps {\n flex-direction: column;\n gap: 20px;\n }\n\n .workflow-step::after {\n display: none;\n }\n}\n\n#content {\n width: 100%;\n min-height: 100vh;\n transition: all 0.3s;\n position: absolute;\n padding: 20px;\n padding-left: 40px;\n}\n\n#content.active {\n margin-left: var(--sidebar-width);\n width: calc(100% - var(--sidebar-width));\n}\n\n.po-content {\n padding: 40px;\n}\n\n.po-header {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 40px;\n margin-bottom: 40px;\n}\n\n.company-info,\n.po-details {\n background: #f8f9fa;\n padding: 25px;\n border-radius: 15px;\n border-left: 5px solid #3498db;\n}\n\n.company-info h3,\n.po-details h3 {\n color: #2c3e50;\n margin-bottom: 15px;\n font-size: 1.3rem;\n}\n\n.info-row {\n margin-bottom: 8px;\n display: flex;\n justify-content: space-between;\n}\n\n.info-label {\n font-weight: 600;\n color: #555;\n}\n\n.info-value {\n color: #2c3e50;\n}\n\n.items-section {\n margin-top: 30px;\n}\n\n.section-title {\n color: #2c3e50;\n font-size: 1.5rem;\n margin-bottom: 20px;\n border-bottom: 2px solid #3498db;\n padding-bottom: 10px;\n}\n\n.items-table {\n width: 100%;\n border-collapse: collapse;\n margin-bottom: 30px;\n background: white;\n border-radius: 10px;\n overflow: hidden;\n box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);\n}\n\n.items-table th {\n background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);\n color: white;\n padding: 15px;\n text-align: left;\n font-weight: 600;\n}\n\n.items-table td {\n padding: 15px;\n border-bottom: 1px solid #eee;\n vertical-align: middle;\n}\n\n.items-table tr:hover {\n background: #f8f9fa;\n transform: translateY(-1px);\n transition: all 0.3s ease;\n}\n\n.price-input {\n padding: 8px 12px;\n border: 2px solid #ddd;\n border-radius: 8px;\n font-size: 14px;\n width: 100px;\n transition: all 0.3s ease;\n}\n\n.price-input:focus {\n outline: none;\n border-color: #3498db;\n box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);\n}\n\n.price-changed {\n background: #fff3cd;\n border-color: #ffc107;\n}\n\n.edit-btn {\n background: #3498db;\n color: white;\n border: none;\n padding: 8px 16px;\n border-radius: 6px;\n cursor: pointer;\n font-size: 12px;\n transition: all 0.3s ease;\n}\n\n.edit-btn:hover {\n background: #2980b9;\n transform: translateY(-2px);\n}\n\n.save-btn {\n background: #27ae60;\n color: white;\n border: none;\n padding: 8px 16px;\n border-radius: 6px;\n cursor: pointer;\n font-size: 12px;\n margin-right: 5px;\n}\n\n.cancel-btn {\n background: #e74c3c;\n color: white;\n border: none;\n padding: 8px 16px;\n border-radius: 6px;\n cursor: pointer;\n font-size: 12px;\n}\n\n.justification-modal {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.7);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n}\n\n.modal-content {\n background: white;\n padding: 30px;\n border-radius: 15px;\n max-width: 500px;\n width: 90%;\n box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);\n}\n\n.modal-content h3 {\n color: #2c3e50;\n margin-bottom: 20px;\n font-size: 1.3rem;\n}\n\n.justification-textarea {\n width: 100%;\n padding: 15px;\n border: 2px solid #ddd;\n border-radius: 8px;\n font-family: inherit;\n font-size: 14px;\n resize: vertical;\n min-height: 100px;\n}\n\n.justification-textarea:focus {\n outline: none;\n border-color: #3498db;\n box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);\n}\n\n.modal-buttons {\n margin-top: 20px;\n display: flex;\n gap: 10px;\n justify-content: flex-end;\n}\n\n.totals {\n background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);\n padding: 25px;\n border-radius: 15px;\n margin-top: 20px;\n}\n\n.total-row {\n display: flex;\n justify-content: space-between;\n margin-bottom: 10px;\n font-size: 1.1rem;\n}\n\n.total-row.grand-total {\n border-top: 2px solid #3498db;\n padding-top: 15px;\n margin-top: 15px;\n font-weight: bold;\n font-size: 1.3rem;\n color: #2c3e50;\n}\n\n.justification-note {\n background: #fff3cd;\n border: 1px solid #ffc107;\n border-radius: 8px;\n padding: 10px;\n margin-top: 10px;\n font-size: 12px;\n color: #856404;\n}\n\n.price-change-indicator {\n background: #dc3545;\n color: white;\n border-radius: 50%;\n width: 20px;\n height: 20px;\n font-size: 12px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: 5px;\n}\n\n@media (max-width: 768px) {\n .po-header {\n grid-template-columns: 1fr;\n gap: 20px;\n }\n\n .items-table {\n font-size: 14px;\n }\n\n .items-table th,\n .items-table td {\n padding: 10px 8px;\n }\n\n .price-input {\n width: 80px;\n }\n}\n</style>","// ===== src/utils/sidebarConfig.js =====\nexport const createSidebarConfig = (options = {}) => {\n return {\n brandName: options.brandName || 'OceanHelm',\n logoIcon: options.logoIcon || 'bi bi-water',\n showLogo: options.showLogo !== false,\n responsive: options.responsive !== false,\n ...options\n }\n}\n\nexport const defaultMenuItems = [\n {\n type: 'link',\n label: 'Home',\n icon: 'bi bi-speedometer2',\n href: '/app/dashboard',\n active: true\n },\n {\n type: 'link',\n label: 'Activity Log',\n icon: 'bi bi-activity',\n href: '/activity-log',\n roles: ['owner'] // Role-based visibility\n },\n {\n type: 'link',\n label: 'People Manager',\n icon: 'bi bi-person-plus',\n href: '/app/people-manager',\n roles: ['owner'] // Role-based visibility\n },\n {\n type: 'text',\n label: 'Modules'\n },\n {\n type: 'dropdown',\n label: 'Compliance',\n icon: 'bi bi-list-ul',\n children: [\n {\n label: 'Vessel Certification',\n action: 'vessel-cert',\n },\n {\n type: 'separator'\n },\n {\n label: 'Crew Certification',\n action: 'crew-cert'\n },\n {\n type: 'separator'\n },\n {\n label: 'Reports',\n action: 'reports'\n },\n ]\n },\n /* \n {\n type: 'link',\n label: 'Business Intelligence',\n icon: 'bi bi-graph-up-arrow',\n href: '/app/analytics'\n },\n */\n {\n type: 'button',\n label: 'Maintenance',\n icon: 'bi bi-tools',\n action: 'maintenance'\n },\n {\n type: 'dropdown',\n label: 'Crew Management',\n icon: 'bi bi-people',\n children: [\n {\n label: 'All Crew',\n action: 'crew-all',\n roles: ['owner', 'staff']\n },\n {\n type: 'separator'\n },\n {\n label: 'Get Crew by Vessel',\n action: 'crew-by-vessel'\n }\n ]\n },\n {\n type: 'link',\n label: 'Inventory Management',\n icon: 'bi bi-clipboard-data',\n href: '/app/inventory'\n },\n {\n type: 'link',\n label: 'Requisition Processing',\n icon: 'bi bi-calendar-check',\n href: '/app/requisition'\n },\n {\n type: 'button',\n label: 'Voyage Manager',\n icon: 'fas fa-ship',\n action: 'coming-soon'\n },\n {\n type: 'button',\n label: 'Vessel Log',\n icon: 'bi bi-file-ruled',\n action: 'vessel-log'\n },\n {\n type: 'button',\n label: 'Settings',\n icon: 'bi bi-gear',\n action: 'settings',\n roles: ['owner', 'staff']\n },\n {\n type: 'button',\n label: 'Help & Support',\n icon: 'bi bi-question-circle',\n action: 'help'\n }\n]","// ===== src/utils/permissions.js =====\nexport const defaultPermissionChecker = (item, userProfile) => {\n // No role restrictions\n if (!item.roles || item.roles.length === 0) {\n return true\n }\n\n // Check if user role is in allowed roles\n return item.roles.includes(userProfile?.role)\n}","// src/index.js - Library entry point\nimport ConfigurableSidebar from './components/ConfigurableSidebar.vue'\nimport VesselList from './components/VesselList.vue'\nimport DashHead from './components/DashHead.vue' \nimport OceanHelmMaintenance from './components/OceanHelmMaintenance.vue'\nimport ActivityLogs from './components/ActivityLogs.vue'\nimport CrewManagement from './components/CrewManagement.vue'\nimport RequisitionSystem from './components/RequisitionSystem.vue'\n\nimport { createSidebarConfig, defaultMenuItems } from './utils/sidebarConfig'\nimport { defaultPermissionChecker } from './utils/permissions'\n\n// Export main components\nexport { ConfigurableSidebar, VesselList, DashHead, CrewManagement, ActivityLogs, OceanHelmMaintenance, RequisitionSystem }\n\n// Export utilities\nexport { createSidebarConfig, defaultMenuItems, defaultPermissionChecker }\n\n// Export types for TypeScript users\nexport * from './types'\n\n// Default export for plugin-style usage\nexport default {\n install(app, options = {}) {\n app.component('ConfigurableSidebar', ConfigurableSidebar)\n app.component('VesselLists', VesselList)\n app.component('DashHead', DashHead)\n app.component('ActivityLogs', ActivityLogs)\n app.component('CrewManagement', CrewManagement)\n app.component('RequisitionSystem', RequisitionSystem)\n app.component('OceanHelmMaintenance', OceanHelmMaintenance)\n\n // Provide global configuration\n app.provide('sidebarConfig', options)\n }\n}"],"names":["_sfc_main","item","child","_a","sidebarToggle","sidebar","content","event","isClickInsideSidebar","isClickOnToggleBtn","_hoisted_2","_hoisted_3","_createElementBlock","$options","$props","_openBlock","_hoisted_1","_createElementVNode","_toDisplayString","_Fragment","_renderList","index","$event","_withModifiers","_normalizeClass","_hoisted_7","_hoisted_8","subItem","subIndex","_hoisted_9","_hoisted_10","_hoisted_11","_renderSlot","_ctx","vessel","status","navigationData","action","date","registrationNumber","now","inputDate","diffMs","diffHours","days","hours","result","role","userVessel","expiry_date","today","diffTime","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_14","_hoisted_15","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_26","_hoisted_27","_hoisted_29","_hoisted_31","$data","_cache","args","_createTextVNode","_hoisted_12","_hoisted_13","_hoisted_16","_hoisted_25","_hoisted_28","_hoisted_30","_hoisted_33","newDate","task","query","total","profile","taskId","checklist","newTask","filter","taskComponent","t","requiredFields","field","section","recurrence","nextDate","nextDueDate","diffDays","taskData","success","updateData","updatedAfter","dateString","completed","_hoisted_17","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","_hoisted_40","_hoisted_41","_hoisted_42","_hoisted_43","_hoisted_44","_hoisted_45","_hoisted_46","_hoisted_47","_hoisted_49","_hoisted_50","_hoisted_51","_hoisted_52","_hoisted_57","_hoisted_59","_hoisted_60","_hoisted_61","_hoisted_62","_hoisted_63","_hoisted_64","_hoisted_65","_hoisted_66","_hoisted_67","_hoisted_68","_hoisted_69","_hoisted_70","_hoisted_71","_hoisted_72","_hoisted_73","_hoisted_74","_hoisted_75","_hoisted_76","_hoisted_77","_hoisted_78","_hoisted_79","_hoisted_80","_hoisted_81","_hoisted_82","_hoisted_83","_hoisted_85","_hoisted_87","_hoisted_89","_hoisted_90","_hoisted_91","_hoisted_92","_hoisted_93","_hoisted_94","_hoisted_95","_hoisted_96","_hoisted_97","_withDirectives","_vModelText","_vModelSelect","member","_hoisted_32","_vModelCheckbox","_hoisted_48","_hoisted_53","_hoisted_54","_hoisted_55","_hoisted_56","_hoisted_58","_hoisted_84","_hoisted_86","_hoisted_88","_normalizeStyle","recommendation","timestamp","log","change","key","page","matchesSearch","matchesStatus","entries","logEntry","a","b","dateA","dateB","filtered","entry","search","e","dates","minDate","maxDate","formatDate","isVessel","rolePermissions","sorted","valA","valB","validCertifications","cert","finalRole","certificationsWithUrls","uploadResult","newMember","file","email","resolve","reject","duration","embarkDate","memberId","certification","reader","fileInput","expiryDate","dateStr","expiry","oneMonthFromNow","req","tab","sum","r","userId","tabName","value","statusFields","requisition","id","details","info","isPrinting","_hoisted_98","_hoisted_99","_hoisted_100","_hoisted_101","_hoisted_102","_hoisted_103","_hoisted_104","_hoisted_105","_hoisted_106","_hoisted_107","_hoisted_108","_hoisted_109","_hoisted_110","_hoisted_121","_hoisted_122","_hoisted_123","_hoisted_124","_hoisted_125","_hoisted_126","_hoisted_127","_hoisted_128","dept","v","unit","_b","_c","_d","_e","_f","_g","_hoisted_112","_hoisted_113","_hoisted_115","_hoisted_117","_hoisted_118","_hoisted_119","_hoisted_116","_hoisted_120","_i","_h","_k","_j","_hoisted_129","_hoisted_130","createSidebarConfig","options","defaultMenuItems","defaultPermissionChecker","userProfile","app","ConfigurableSidebar","VesselList","DashHead","ActivityLogs","CrewManagement","RequisitionSystem","OceanHelmMaintenance"],"mappings":"yUAqDKA,EAAU,CACb,KAAM,sBAEN,MAAO,CAEL,UAAW,CACT,KAAM,OACN,QAAS,WACV,EACD,SAAU,CACR,KAAM,OACN,QAAS,aACV,EACD,SAAU,CACR,KAAM,QACN,QAAS,EACV,EAGD,UAAW,CACT,KAAM,MACN,SAAU,GACV,QAAS,IAAM,CAAC,CACjB,EAGD,YAAa,CACX,KAAM,OACN,QAAS,KAAO,CAAA,EACjB,EAGD,WAAY,CACV,KAAM,QACN,QAAS,EACV,EAGD,cAAe,CACb,KAAM,OACN,QAAS,EACV,EAGD,kBAAmB,CACjB,KAAM,SACN,QAAS,IACX,CACD,EAED,SAAU,CACR,gBAAiB,CACf,OAAO,KAAK,aACb,EAED,mBAAoB,CAClB,OAAO,KAAK,UAAU,OAAOC,GAEtB,KAAK,cAAcA,CAAI,EAKxBA,EAAK,OAAS,YAAcA,EAAK,SAC5BA,EAAK,SAAS,KAAKC,GAAS,KAAK,cAAcA,CAAK,CAAC,EAGvD,GARE,EASV,CACH,CACD,EAED,SAAU,CACJ,KAAK,Y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ACT,EACD,CACI,KAAM,OACN,MAAO,yBACP,KAAM,uBACN,KAAM,kBACT,EACD,CACI,KAAM,SACN,MAAO,iBACP,KAAM,cACN,OAAQ,aACX,EACD,CACI,KAAM,SACN,MAAO,aACP,KAAM,mBACN,OAAQ,YACX,EACD,CACI,KAAM,SACN,MAAO,WACP,KAAM,aACN,OAAQ,WACR,MAAO,CAAC,QAAS,OAAO,CAC3B,EACD,CACI,KAAM,SACN,MAAO,iBACP,KAAM,wBACN,OAAQ,MACX,CACL,ECnIaC,GAA2B,CAACzR,EAAM0R,IAEvC,CAAC1R,EAAK,OAASA,EAAK,MAAM,SAAW,EAC9B,GAIJA,EAAK,MAAM,SAAS0R,GAAA,YAAAA,EAAa,IAAI,ECcjCtQ,GAAA,CACb,QAAQuQ,EAAKJ,EAAU,GAAI,CACzBI,EAAI,UAAU,sBAAuBC,CAAmB,EACxDD,EAAI,UAAU,cAAeE,CAAU,EACvCF,EAAI,UAAU,WAAYG,CAAQ,EAClCH,EAAI,UAAU,eAAgBI,CAAY,EAC1CJ,EAAI,UAAU,iBAAkBK,CAAc,EAC9CL,EAAI,UAAU,oBAAqBM,CAAiB,EACpDN,EAAI,UAAU,uBAAwBO,CAAoB,EAG1DP,EAAI,QAAQ,gBAAiBJ,CAAO,CACrC,CACH"}
|
|
1
|
+
{"version":3,"file":"oceanhelm.umd.js","sources":["../src/components/ConfigurableSidebar.vue","../src/components/VesselList.vue","../src/components/DashHead.vue","../src/components/Reports.vue","../src/components/OceanHelmMaintenance.vue","../src/components/ActivityLogs.vue","../src/components/CrewManagement.vue","../src/components/RequisitionSystem.vue","../src/utils/sidebarConfig.js","../src/utils/permissions.js","../src/index.js"],"sourcesContent":["<template>\n <nav id=\"sidebar\" :class=\"sidebarClasses\">\n <!-- Logo Section -->\n <div class=\"logo d-flex align-items-center left\" v-if=\"showLogo\">\n <span style=\"margin-left: 45px;\">{{ brandName }}</span>\n </div>\n\n <!-- Navigation Items -->\n <ul class=\"list-unstyled components mt-4\">\n <li v-for=\"(item, index) in filteredMenuItems\" :key=\"index\"\n :class=\"{ 'active': item.active, 'dropdown': item.type === 'dropdown' }\" @click=\"handleItemClick(item)\">\n <!-- Regular Link -->\n <a v-if=\"item.type === 'link'\" :href=\"item.href || '#'\" @click.prevent=\"handleNavigation(item)\">\n <i :class=\"item.icon\" v-if=\"item.icon\"></i>\n {{ item.label }}\n </a>\n\n <!-- Button/Action -->\n <a v-else-if=\"item.type === 'button'\" @click.prevent=\"handleAction(item)\" style=\"cursor: pointer;\">\n <i :class=\"item.icon\" v-if=\"item.icon\"></i>\n {{ item.label }}\n </a>\n\n <!-- Dropdown -->\n <template v-else-if=\"item.type === 'dropdown'\">\n <a class=\"dropdown-toggle\" @click.prevent=\"toggleDropdown(item)\" style=\"cursor: pointer;\">\n <i :class=\"item.icon\" v-if=\"item.icon\"></i>\n {{ item.label }}\n <i class=\"\" :class=\"{ open: item.open }\"></i>\n </a>\n\n <ul v-show=\"item.open\" class=\"sidebar-dropdown\">\n <li v-for=\"(subItem, subIndex) in getFilteredChildren(item)\" :key=\"subIndex\">\n <a class=\"dropdown-item\" @click.prevent=\"handleAction(subItem)\">\n {{ subItem.label }}\n </a>\n </li>\n </ul>\n </template>\n\n <!-- Separator -->\n <div v-else-if=\"item.type === 'separator'\" class=\"dropdown-divider\"></div>\n\n <!-- Static Text -->\n <a v-else-if=\"item.type === 'text'\">\n {{ item.label }}\n </a>\n </li>\n </ul>\n\n <!-- Custom Slot for Additional Content -->\n <slot name=\"footer\"></slot>\n </nav>\n</template>\n\n<script>\nexport default {\n name: 'ConfigurableSidebar',\n\n props: {\n // Brand configuration\n brandName: {\n type: String,\n default: 'OceanHelm'\n },\n logoIcon: {\n type: String,\n default: 'bi bi-water'\n },\n showLogo: {\n type: Boolean,\n default: true\n },\n\n // Menu items configuration\n menuItems: {\n type: Array,\n required: true,\n default: () => []\n },\n\n // User profile for role-based filtering\n userProfile: {\n type: Object,\n default: () => ({})\n },\n\n // Sidebar behavior\n responsive: {\n type: Boolean,\n default: true\n },\n\n // Custom classes\n customClasses: {\n type: String,\n default: ''\n },\n\n // Permission checker function\n permissionChecker: {\n type: Function,\n default: null\n }\n },\n\n computed: {\n sidebarClasses() {\n return this.customClasses;\n },\n\n filteredMenuItems() {\n return this.menuItems.filter(item => {\n // Check if the item itself has permission\n if (!this.hasPermission(item)) {\n return false;\n }\n\n // For dropdown items, check if any children have permission\n if (item.type === 'dropdown' && item.children) {\n return item.children.some(child => this.hasPermission(child));\n }\n\n return true;\n });\n }\n },\n\n mounted() {\n if (this.responsive) {\n this.initializeResponsiveBehavior();\n }\n },\n\n methods: {\n toggleDropdown(item) {\n // Close others if you want accordion behavior\n this.filteredMenuItems.forEach(i => {\n if (i !== item && i.type === 'dropdown') {\n i.open = false;\n }\n });\n\n item.open = !item.open;\n },\n // Get filtered children for dropdown items\n getFilteredChildren(item) {\n if (!item.children) return [];\n return item.children.filter(child => this.hasPermission(child));\n },\n\n // Permission checking\n hasPermission(item) {\n // Use custom permission checker if provided\n if (this.permissionChecker) {\n return this.permissionChecker(item, this.userProfile);\n }\n\n // Default role-based checking\n if (!item.roles || item.roles.length === 0) {\n return true; // No role restriction\n }\n\n return item.roles.includes(this.userProfile.role);\n },\n\n // Navigation handling\n handleNavigation(item) {\n this.$emit('navigate', item);\n\n // Default behavior if no custom handler\n if (item.href && !item.preventDefault) {\n if (item.external) {\n window.open(item.href, '_blank');\n } else {\n this.$router?.push(item.href);\n }\n }\n },\n\n // Action handling\n handleAction(item) {\n this.$emit('action', item);\n },\n\n // Item click handling\n handleItemClick(item) {\n this.$emit('item-click', item);\n\n if (item.type === 'dropdown') {\n // Handle dropdown specific logic if needed\n }\n },\n\n // Responsive behavior\n initializeResponsiveBehavior() {\n const sidebarToggle = document.getElementById('sidebarToggle');\n const sidebar = document.getElementById('sidebar');\n const content = document.getElementById('content');\n\n if (!sidebarToggle || !sidebar || !content) return;\n\n // Initial state for desktop\n if (window.innerWidth >= 768) {\n sidebar.classList.toggle('active');\n content.classList.toggle('active');\n }\n\n // Toggle functionality\n sidebarToggle.addEventListener('click', () => {\n sidebar.classList.toggle('active');\n content.classList.toggle('active');\n });\n\n // Close sidebar on outside click (mobile)\n document.addEventListener('click', (event) => {\n const isClickInsideSidebar = sidebar.contains(event.target);\n const isClickOnToggleBtn = sidebarToggle.contains(event.target);\n\n if (!isClickInsideSidebar && !isClickOnToggleBtn &&\n window.innerWidth < 768 &&\n sidebar.classList.contains('active')) {\n sidebar.classList.remove('active');\n content.classList.remove('active');\n }\n });\n }\n },\n\n emits: ['navigate', 'action', 'item-click']\n}\n</script>\n\n<style>\n/* Dropdown container */\n.sidebar-dropdown {\n list-style: none;\n padding-left: 20px;\n margin: 5px 0 10px 0;\n}\n\n/* Dropdown items */\n.sidebar-dropdown li a {\n display: block;\n padding: 8px 15px;\n font-size: 14px;\n color: #ddd;\n border-radius: 4px;\n transition: background 0.2s ease;\n}\n\n.sidebar-dropdown li a:hover {\n background: rgba(255, 255, 255, 0.1);\n}\n\n/* Dropdown arrow */\n.dropdown-arrow {\n float: right;\n transition: transform 0.2s ease;\n}\n\n.dropdown-arrow.open {\n transform: rotate(180deg);\n}\n\n</style>","<template>\n <!-- Fleet Summary -->\n <div class=\"row mb-3\">\n <div class=\"col-md-4\">\n <div class=\"card border-0 shadow-sm\" \n @click=\"filterVessels('Active')\"\n :class=\"{ 'border-primary border-2': activeFilter === 'Active' }\"\n style=\"cursor: pointer;\">\n <div class=\"card-body d-flex align-items-center\">\n <div class=\"rounded-circle bg-primary bg-opacity-10 p-3 me-3\">\n <i class=\"bi bi-check-circle-fill text-primary fs-4\"></i>\n </div>\n <div>\n <h6 class=\"mb-0\">Active Vessels</h6>\n <h3 class=\"mt-2 mb-0\">{{ activeVesselsCount }}</h3>\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-md-4\">\n <div class=\"card border-0 shadow-sm\"\n @click=\"filterVessels('Inactive')\"\n :class=\"{ 'border-secondary border-2': activeFilter === 'Inactive' }\"\n style=\"cursor: pointer;\">\n <div class=\"card-body d-flex align-items-center\">\n <div class=\"rounded-circle bg-secondary bg-opacity-10 p-3 me-3\">\n <i class=\"bi bi-pause-circle-fill text-secondary fs-4\"></i>\n </div>\n <div>\n <h6 class=\"mb-0\">Inactive</h6>\n <h3 class=\"mt-2 mb-0\">{{ inactiveVesselsCount }}</h3>\n </div>\n </div>\n </div>\n </div>\n <!-- Register New Fleet -->\n <div class=\"col-md-4\" v-if=\"canAddVessel\">\n <div class=\"card border-0 shadow-sm\" @click=\"handleAddVessel\" style=\"cursor: pointer;\">\n <div class=\"card-body d-flex align-items-center\">\n <div class=\"rounded-circle bg-success bg-opacity-10 p-3 me-3\">\n <i class=\"bi bi-patch-plus-fill text-success fs-4\"></i>\n </div>\n <div>\n <h6 class=\"mb-0\">Add New Vessel</h6>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"d-flex justify-content-between align-items-center mb-4\">\n <h4 class=\"mb-0\"><i class=\"bi bi-ship me-2\"></i>Registered Vessels</h4>\n <button \n v-if=\"activeFilter !== 'All'\" \n class=\"btn btn-sm btn-outline-secondary\"\n @click=\"clearFilter\">\n <i class=\"bi bi-x-circle me-1\"></i>Clear Filter\n </button>\n </div>\n\n <!-- Filter indicator -->\n <div v-if=\"activeFilter !== 'All'\" class=\"alert alert-info mb-3\" role=\"alert\">\n Showing <strong>{{ activeFilter }}</strong> vessels ({{ filteredVessels.length }})\n </div>\n\n <!-- Loading State -->\n <div v-if=\"loading\" class=\"text-center py-4\">\n <div class=\"spinner-border text-primary\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n <p class=\"mt-2\">Loading vessels...</p>\n </div>\n\n <!-- Empty State -->\n <div v-else-if=\"!filteredVessels.length && activeFilter === 'All'\" class=\"alert alert-primary\" role=\"alert\">\n <h4 class=\"alert-heading\">Empty Fleet!</h4>\n <p>You have an empty fleet, you have not added any vessel yet.</p>\n <hr>\n <p class=\"mb-0\">Click on the add vessel button above, to start adding vessels to your fleet</p>\n </div>\n\n <!-- No results for filter -->\n <div v-else-if=\"!filteredVessels.length && activeFilter !== 'All'\" class=\"alert alert-warning\" role=\"alert\">\n <h4 class=\"alert-heading\">No {{ activeFilter }} Vessels</h4>\n <p class=\"mb-0\">There are no {{ activeFilter.toLowerCase() }} vessels in your fleet.</p>\n </div>\n\n <!-- Vessel Cards -->\n <div v-else class=\"row\">\n <div class=\"col-lg-6\" v-for=\"vessel in filteredVessels\" :key=\"vessel.registrationNumber || vessel.id\">\n <div class=\"vessel-card\" @click=\"handleVesselClick(vessel)\">\n <div class=\"card-body d-flex align-items-center\">\n <div class=\"vessel-icon v-left\">\n <i class=\"fas fa-ship\"></i>\n </div>\n <div class=\"flex-grow-1\">\n <div class=\"d-flex justify-content-between align-items-center mb-2\">\n <h5 class=\"card-title mb-0\">{{ vessel.name }}</h5>\n <span :class=\"['vessel-status', statusClass(vessel.status)]\">{{ vessel.status }}</span>\n </div>\n <div class=\"row\">\n <div class=\"col-6\">\n <small class=\"text-muted\">Registration #:</small>\n <p class=\"mb-0\">{{ vessel.registrationNumber }}</p>\n </div>\n\n <div class=\"col-6\" v-if=\"vessel.date\">\n <template v-if=\"vessel.status === 'Active'\">\n <small class=\"text-muted\">Active Duration:</small>\n <p class=\"mb-0\">{{ getDuration(vessel.date, vessel.registrationNumber) }}</p>\n </template>\n <template v-else>\n <small class=\"text-muted\">Inactive Duration:</small>\n <p class=\"mb-0\">{{ getDuration(vessel.date, vessel.registrationNumber) }}</p>\n </template>\n </div>\n\n <div class=\"col-6\" v-else>\n <small class=\"text-muted\">{{ vessel.status }} Duration:</small>\n <button type=\"button\" class=\"btn btn-outline-primary btn-sm mt-1\"\n @click.stop=\"setVesselDate(vessel.registrationNumber)\">\n Set Date\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"action-icon v-left delete\">\n <i class=\"bi bi-trash\" @click.stop=\"handleDeleteVessel(vessel)\"></i>\n </div>\n <button class=\"btn btn-primary\" @click.stop=\"handleToggleStatus(vessel)\">\n {{ vessel.status === 'Active' ? 'Mark Inactive' : 'Mark Active' }}\n </button>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'VesselList',\n\n props: {\n // Required props\n vessels: {\n type: Array,\n required: true,\n default: () => []\n },\n userProfile: {\n type: Object,\n required: true,\n default: () => ({ role: 'viewer', vessel: null })\n },\n\n // Optional props\n loading: {\n type: Boolean,\n default: false\n },\n currentRoute: {\n type: String,\n default: 'dashboard' // 'dashboard', 'maintenanceroute', 'crewroute'\n },\n\n // Configuration props\n config: {\n type: Object,\n default: () => ({\n enableAdd: true,\n enableEdit: true,\n enableDelete: true,\n enableStatusToggle: true,\n showCertifications: true\n })\n }\n },\n\n data() {\n return {\n activeFilter: 'All' // 'All', 'Active', or 'Inactive'\n };\n },\n\n emits: [\n 'vessel-add',\n 'vessel-click',\n 'vessel-edit',\n 'vessel-delete',\n 'vessel-toggle-status',\n 'vessel-navigate',\n 'access-denied',\n 'date-change'\n ],\n\n computed: {\n activeVesselsCount() {\n return this.vessels.filter(vessel => vessel.status === \"Active\").length;\n },\n\n inactiveVesselsCount() {\n return this.vessels.filter(vessel => vessel.status === \"Inactive\").length;\n },\n\n filteredVessels() {\n if (this.activeFilter === 'All') {\n return this.vessels;\n }\n return this.vessels.filter(vessel => vessel.status === this.activeFilter);\n },\n\n canAddVessel() {\n return this.config.enableAdd &&\n (this.userProfile.role === 'owner' || this.userProfile.role === 'staff');\n }\n },\n\n methods: {\n // Filter methods\n filterVessels(status) {\n this.activeFilter = status;\n },\n\n clearFilter() {\n this.activeFilter = 'All';\n },\n\n // Event handlers that emit to parent\n handleAddVessel() {\n if (!this.canAddVessel) {\n this.handleAccessDenied('add vessel');\n return;\n }\n this.$emit('vessel-add');\n },\n\n handleVesselClick(vessel) {\n const navigationData = {\n vessel,\n route: this.currentRoute,\n id: vessel.registrationNumber,\n name: vessel.name\n };\n\n if (this.grantAccess(vessel)) {\n if (this.currentRoute === 'dashboard') {\n this.$emit('vessel-click', vessel);\n } else {\n this.$emit('vessel-navigate', navigationData);\n }\n } else {\n this.handleAccessDenied('this protected route');\n }\n },\n\n handleDeleteVessel(vessel) {\n if (!this.grantAccess(vessel)) {\n this.handleAccessDenied('delete vessel');\n return;\n }\n\n if (!this.config.enableDelete) {\n return;\n }\n\n this.$emit('vessel-delete', vessel);\n },\n\n handleToggleStatus(vessel) {\n if (!this.grantAccess(vessel)) {\n this.handleAccessDenied('change vessel status');\n return;\n }\n\n if (!this.config.enableStatusToggle) {\n return;\n }\n\n this.$emit('vessel-toggle-status', vessel);\n },\n\n handleEditVessel(vessel) {\n if (!this.grantAccess(vessel)) {\n this.handleAccessDenied('edit vessel');\n return;\n }\n\n if (!this.config.enableEdit) {\n return;\n }\n\n this.$emit('vessel-edit', vessel);\n },\n\n handleAccessDenied(action) {\n this.$emit('access-denied', { action, userProfile: this.userProfile });\n },\n\n // Utility methods (keep these in component as they're UI-related)\n statusClass(status) {\n const normalized = status?.toLowerCase() || '';\n return `status-${normalized}`;\n },\n\n getDuration(date, registrationNumber) {\n const now = new Date();\n const inputDate = new Date(date);\n\n // difference in milliseconds\n const diffMs = now - inputDate;\n\n if (diffMs < 0) return \"Invalid (future date)\";\n\n // convert to hours\n const diffHours = Math.floor(diffMs / (1000 * 60 * 60));\n\n const days = Math.floor(diffHours / 24);\n const hours = diffHours % 24;\n\n let result = \"\";\n\n if (days > 0) {\n result += `${days} day${days > 1 ? \"s\" : \"\"}`;\n }\n if (hours > 0) {\n result += (result ? \" \" : \"\") + `${hours} hr${hours > 1 ? \"s\" : \"\"}`;\n }\n\n return result || '0 hr'\n },\n\n setVesselDate(registrationNumber) {\n this.$emit('date-change', registrationNumber);\n },\n\n grantAccess(vessel) {\n const { role, vessel: userVessel } = this.userProfile;\n\n return role === 'owner' ||\n role === 'staff' ||\n (role === 'captain' && userVessel === vessel.name);\n },\n\n getDaysToExpiry(expiry_date) {\n if (!expiry_date) return null;\n\n const today = new Date();\n const expiry = new Date(expiry_date);\n const diffTime = expiry - today;\n const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));\n return diffDays;\n },\n\n getExpiryClass(expiry_date) {\n const days = this.getDaysToExpiry(expiry_date);\n if (days === null) return '';\n if (days < 30) return 'cert-critical';\n if (days < 90) return 'cert-warning';\n return '';\n }\n }\n}\n</script>\n\n<style>\n.v-left {\n margin-left: 20px;\n}\n\n.vessel-card {\n background: white;\n border-radius: 10px;\n box-shadow: 0 8px 16px rgba(0, 105, 192, 0.15);\n transition: all 0.3s ease;\n margin-bottom: 20px;\n overflow: hidden;\n border-left: 4px solid var(--accent-color);\n}\n\n.vessel-card:hover {\n transform: translateY(-5px);\n box-shadow: 0 12px 20px rgba(0, 105, 192, 0.2);\n}\n\n.vessel-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n height: 50px;\n background-color: #e3f2fd;\n border-radius: 10px;\n color: var(--accent-color);\n font-size: 24px;\n margin-right: 15px;\n}\n\n.black {\n color: black !important;\n}\n\n.action-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n border-radius: 20px;\n color: var(--accent-color);\n font-size: 16px;\n margin-right: 15px;\n margin-top: 20px;\n margin-bottom: 10px;\n}\n\n.delete {\n background-color: var(--danger);\n}\n\n.edit {\n background-color: var(--success);\n}\n\n.vessel-status {\n display: inline-block;\n padding: 5px 12px;\n border-radius: 20px;\n font-size: 12px;\n font-weight: 600;\n}\n\n.status-active {\n background-color: #e8f5e9;\n color: #2e7d32;\n}\n\n.status-maintenance {\n background-color: #fff8e1;\n color: #f57f17;\n}\n\n.status-inactive {\n background-color: #f5f5f5;\n color: #757575;\n}\n</style>","<template>\n <div class=\"page-header d-flex justify-content-between align-items-center\">\n <h4 style=\"margin-left: 20px;\">{{ name }}</h4>\n <div class=\"d-flex\">\n <button class=\"btn btn-outline-primary me-2\" @click=\"addUser()\" v-if=\"this.userProfile.role == 'owner'\">\n <i class=\"bi bi-bell\"></i>\n <span class=\"badge bg-danger\">1</span>\n </button>\n <button class=\"btn btn-outline-primary\" @click=\"loggedIn()\">\n <i class=\"bi bi-person-circle\"></i>\n </button>\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'DashHead',\n \n props: {\n name: {\n type: String,\n required: true\n },\n userProfile: {\n type: Object,\n required: true,\n default: () => ({ role: 'viewer', vessel: null })\n }\n },\n\n emits: [\n 'add-user',\n 'logged-in'\n ],\n\n methods: {\n addUser() {\n this.$emit('add-user');\n },\n loggedIn() {\n this.$emit('logged-in');\n }\n }\n}\n</script>\n\n<style>\n.page-header {\n margin-bottom: 30px;\n border-bottom: 1px solid #e0e0e0;\n padding-bottom: 15px;\n}\n\n.btn-outline-primary {\n border: 1px solid #0d6efd !important;\n}\n\n.btn-outline-primary:hover {\n background-color: #0d6efd !important;\n border-color: #0d6efd !important;\n color: white !important;\n}\n</style>","<template>\n <div class=\"reports-container\">\n\n <!-- ── Missing Reports Alert Banner ── -->\n <transition name=\"slide-down\">\n <div class=\"missing-banner\" v-if=\"pendingContext || missingReports.length > 0\">\n <div class=\"missing-banner-inner\">\n <div class=\"missing-icon\">\n <i class=\"bi bi-exclamation-triangle-fill\"></i>\n </div>\n <div class=\"missing-content\">\n <strong v-if=\"pendingContext\">\n Action Required — Report for\n <span class=\"ref-chip\">{{ pendingContext.entity_ref }}</span>\n must be submitted\n </strong>\n <strong v-else>\n {{ missingReports.length }} report{{ missingReports.length > 1 ? 's' : '' }} awaiting\n submission\n </strong>\n <p v-if=\"pendingContext\">{{ pendingContext.title }}</p>\n </div>\n <button class=\"btn btn-warning btn-sm fw-bold\" @click=\"openReportForm\">\n <i class=\"bi bi-pencil-square me-1\"></i> Submit Report\n </button>\n <button class=\"btn-dismiss\" @click=\"dismissBanner\" title=\"Dismiss\">\n <i class=\"bi bi-x-lg\"></i>\n </button>\n </div>\n </div>\n </transition>\n\n <!-- ── Page Header ── -->\n <div class=\"page-header d-flex justify-content-between align-items-center\">\n <div>\n <h4 class=\"page-title\">Reports</h4>\n <p class=\"page-subtitle\">Document Management & QHSE Reports</p>\n </div>\n <div class=\"header-actions\">\n <button class=\"btn btn-outline-primary me-2\" @click=\"openReportForm\">\n <i class=\"bi bi-file-earmark-plus\"></i> New Report\n </button>\n <button class=\"btn btn-primary\" @click=\"showNewFolderModal = true\">\n <i class=\"bi bi-folder-plus\"></i> New Folder\n </button>\n </div>\n </div>\n\n <!-- ── Submitted Reports Section ── -->\n <div class=\"submitted-section\" v-if=\"linkedReports.length > 0\">\n <div class=\"section-label\">\n <i class=\"bi bi-file-earmark-check-fill text-success\"></i>\n Submitted QHSE Reports\n </div>\n <div class=\"report-cards\">\n <div v-for=\"report in linkedReports\" :key=\"report.id\" :ref=\"'report-' + report.entity_ref\"\n :class=\"['report-card', { 'report-card--highlighted': highlightedRef === report.entity_ref }]\"\n @click=\"viewReport(report)\">\n <div class=\"rc-badge\" :class=\"report.entity_type\">\n {{ report.entity_type === 'drill' ? 'DRILL' : 'INC' }}\n </div>\n <div class=\"rc-body\">\n <strong class=\"rc-ref\">{{ report.entity_ref }}</strong>\n <span class=\"rc-title\">{{ report.title }}</span>\n <span class=\"rc-meta\">\n <i class=\"bi bi-person-fill me-1\"></i>{{ report.submittedBy }}\n · \n <i class=\"bi bi-calendar3 me-1\"></i>{{ formatDate(report.submittedAt) }}\n </span>\n </div>\n <div class=\"rc-folder\" v-if=\"report.folderName\">\n <i class=\"bi bi-folder-fill me-1\"></i>{{ report.folderName }}\n </div>\n <i class=\"bi bi-chevron-right rc-arrow\"></i>\n </div>\n </div>\n </div>\n\n <!-- ── Folders Section ── -->\n <div class=\"section-label mt-4\" v-if=\"folders.length > 0 || linkedReports.length === 0\">\n <i class=\"bi bi-folder-fill text-warning\"></i> Document Folders\n </div>\n <div class=\"folders-section\" v-if=\"folders.length > 0\">\n <div class=\"folder-card\" v-for=\"folder in folders\" :key=\"folder.id\" @mouseenter=\"showPreview(folder.id)\"\n @mouseleave=\"hidePreview\">\n <div class=\"folder-content\" @click=\"toggleFolder(folder.id)\">\n <i class=\"bi bi-folder-fill text-warning\" style=\"font-size: 2.5rem;\"></i>\n <div class=\"folder-name\">{{ folder.name }}</div>\n <small class=\"text-muted\">{{ folder.files.length }} file(s)</small>\n </div>\n <div class=\"folder-actions-overlay\">\n <button class=\"btn btn-sm btn-icon\" @click.stop=\"selectFolder(folder)\" title=\"Add Files\">\n <i class=\"bi bi-file-earmark-plus\"></i>\n </button>\n <button class=\"btn btn-sm btn-icon btn-icon-danger\" @click.stop=\"deleteFolder(folder.id)\"\n title=\"Delete Folder\">\n <i class=\"bi bi-trash\"></i>\n </button>\n </div>\n </div>\n </div>\n\n <!-- Empty State -->\n <div class=\"empty-state text-center\" v-if=\"folders.length === 0 && linkedReports.length === 0\">\n <i class=\"bi bi-folder2-open\" style=\"font-size: 4rem; color: #ccc;\"></i>\n <h5 class=\"mt-3 text-muted\">No reports or folders yet</h5>\n <p class=\"text-muted\">Submit a report or create a folder to get started</p>\n </div>\n\n <!-- ── Expanded Folder Modal ── -->\n <div class=\"folder-modal-overlay\" v-if=\"expandedFolders.length > 0\" @click=\"closeAllFolders\">\n <div class=\"folder-expanded\" @click.stop>\n <div class=\"expanded-header\">\n <strong>{{ getExpandedFolder().name }}</strong>\n <button class=\"btn-close-expanded\" @click=\"closeAllFolders\">\n <i class=\"bi bi-x-lg\"></i>\n </button>\n </div>\n <div class=\"files-list\" v-if=\"getExpandedFolder().files.length > 0\">\n <div class=\"file-item d-flex justify-content-between align-items-center\"\n v-for=\"file in getExpandedFolder().files\" :key=\"file.id\">\n <div class=\"file-info d-flex align-items-center\">\n <i class=\"bi bi-file-earmark-text me-2\"></i>\n <span>{{ file.name }}</span>\n <small class=\"text-muted ms-2\">({{ formatFileSize(file.size) }})</small>\n </div>\n <button class=\"btn btn-sm btn-outline-danger\"\n @click=\"removeFile(getExpandedFolder().id, file.id)\">\n <i class=\"bi bi-x-circle\"></i>\n </button>\n </div>\n </div>\n <div v-else class=\"empty-folder-message\">\n <i class=\"bi bi-inbox\"></i>\n <p>No files in this folder</p>\n <button class=\"btn btn-sm btn-primary\" @click=\"selectFolder(getExpandedFolder())\">\n <i class=\"bi bi-file-earmark-plus\"></i> Add Files\n </button>\n </div>\n </div>\n </div>\n\n <!-- ── New Folder Modal ── -->\n <div class=\"modal\" :class=\"{ 'show': showNewFolderModal }\" @click.self=\"showNewFolderModal = false\">\n <div class=\"modal-dialog modal-dialog-centered\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\"><i class=\"bi bi-folder-plus me-2\"></i>Create New Folder</h5>\n <button type=\"button\" class=\"btn-close\" @click=\"showNewFolderModal = false\"></button>\n </div>\n <div class=\"modal-body\">\n <label class=\"form-label\">Folder Name</label>\n <input type=\"text\" class=\"form-control\" v-model=\"newFolderName\" @keyup.enter=\"createFolder\"\n placeholder=\"e.g., Q1 2025 Drills\" />\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\"\n @click=\"showNewFolderModal = false\">Cancel</button>\n <button type=\"button\" class=\"btn btn-primary\" @click=\"createFolder\"\n :disabled=\"!newFolderName.trim()\">\n Create Folder\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <!-- ── Submit Report Modal ── -->\n <div class=\"modal\" :class=\"{ 'show': showReportModal }\" @click.self=\"closeReportForm\">\n <div class=\"modal-dialog modal-dialog-centered modal-lg\">\n <div class=\"modal-content\">\n <div class=\"modal-header rpt-modal-header\">\n <h5 class=\"modal-title\">\n <i class=\"bi bi-file-earmark-text me-2\"></i>Submit QHSE Report\n </h5>\n <button type=\"button\" class=\"btn-close btn-close-white\" @click=\"closeReportForm\"></button>\n </div>\n <div class=\"modal-body\">\n\n <!-- Link to entity -->\n <div class=\"rpt-entity-box\" v-if=\"reportForm.entity_ref || missingReports.length > 0\">\n <label class=\"form-label fw-semibold\">\n <i class=\"bi bi-link-45deg me-1\"></i> Link to Drill / Incident\n </label>\n\n <!-- Pre-filled from navigation -->\n <div class=\"prefilled-entity\" v-if=\"reportForm.entity_ref && reportForm.entity_type\">\n <span class=\"entity-chip\" :class=\"reportForm.entity_type\">\n {{ reportForm.entity_type === 'drill' ? 'DRILL' : 'INCIDENT' }}\n </span>\n <strong>{{ reportForm.entity_ref }}</strong>\n <span class=\"text-muted ms-2\">{{ reportForm.entity_label }}</span>\n <button class=\"btn btn-link btn-sm text-danger ms-auto\" @click=\"clearEntityLink\">\n <i class=\"bi bi-x-circle\"></i> Clear\n </button>\n </div>\n\n <!-- Dropdown when no pre-fill -->\n <div v-else>\n <select class=\"form-control\" v-model=\"reportForm.selectedMissing\"\n @change=\"applyMissingSelection\">\n <option value=\"\">— Select a missing report (optional) —</option>\n <optgroup label=\"Missing Drill Reports\">\n <option v-for=\"r in missingReports.filter(x => x.entity_type === 'drill')\"\n :key=\"r.entity_id\" :value=\"JSON.stringify(r)\">\n {{ r.entity_ref }} — {{ r.label }}\n </option>\n </optgroup>\n <optgroup label=\"Missing Incident Reports\">\n <option v-for=\"r in missingReports.filter(x => x.entity_type === 'incident')\"\n :key=\"r.entity_id\" :value=\"JSON.stringify(r)\">\n {{ r.entity_ref }} — {{ r.label }}\n </option>\n </optgroup>\n </select>\n <small class=\"text-muted\">Linking a report here will mark the drill/incident as\n reported.</small>\n </div>\n </div>\n\n <!-- Report Fields -->\n <div class=\"input-row mt-3\">\n <div class=\"form-group\">\n <label class=\"form-label fw-semibold\">Report Title *</label>\n <input type=\"text\" class=\"form-control\" v-model=\"reportForm.title\"\n :placeholder=\"reportForm.entity_ref ? `Report — ${reportForm.entity_ref}` : 'Enter report title'\" />\n </div>\n <div class=\"form-group\">\n <label class=\"form-label fw-semibold\">Submitted By *</label>\n <input type=\"text\" class=\"form-control\" v-model=\"reportForm.submittedBy\"\n placeholder=\"Your name\" />\n </div>\n </div>\n\n <div class=\"input-row\">\n <div class=\"form-group\">\n <label class=\"form-label fw-semibold\">Save to Folder</label>\n <select class=\"form-control\" v-model=\"reportForm.folderId\">\n <option value=\"\">— No folder —</option>\n <option v-for=\"f in folders\" :key=\"f.id\" :value=\"f.id\">{{ f.name }}</option>\n </select>\n </div>\n <div class=\"form-group\">\n <label class=\"form-label fw-semibold\">Date</label>\n <input type=\"date\" class=\"form-control\" v-model=\"reportForm.date\" />\n </div>\n </div>\n\n <div class=\"form-group\">\n <label class=\"form-label fw-semibold\">Findings / Summary *</label>\n <textarea class=\"form-control\" rows=\"4\" v-model=\"reportForm.findings\"\n placeholder=\"Describe findings, observations, and outcomes...\"></textarea>\n </div>\n\n <div class=\"form-group\">\n <label class=\"form-label fw-semibold\">Corrective Actions</label>\n <textarea class=\"form-control\" rows=\"3\" v-model=\"reportForm.correctiveActions\"\n placeholder=\"List any corrective actions required or taken...\"></textarea>\n </div>\n\n <div class=\"form-group\">\n <label class=\"form-label fw-semibold\">Attach Files</label>\n <div class=\"file-drop-zone\" @click=\"$refs.reportFileInput.click()\" @dragover.prevent\n @drop.prevent=\"handleReportFileDrop\">\n <i class=\"bi bi-cloud-upload\" style=\"font-size:2rem;color:#6c757d;\"></i>\n <p class=\"mb-0 mt-2 text-muted\">Click or drag files here</p>\n <div class=\"attached-files\" v-if=\"reportForm.files.length > 0\">\n <span class=\"attached-chip\" v-for=\"(f, i) in reportForm.files\" :key=\"i\">\n <i class=\"bi bi-paperclip\"></i> {{ f.name }}\n <button @click.stop=\"removeReportFile(i)\"><i class=\"bi bi-x\"></i></button>\n </span>\n </div>\n </div>\n <input ref=\"reportFileInput\" type=\"file\" multiple style=\"display:none\"\n @change=\"handleReportFileAttach\" />\n </div>\n\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" @click=\"closeReportForm\">Cancel</button>\n <button type=\"button\" class=\"btn btn-success\" @click=\"submitReport\"\n :disabled=\"!reportForm.title || !reportForm.submittedBy || !reportForm.findings\">\n <i class=\"bi bi-check-circle me-1\"></i> Submit Report\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <!-- ── Report Viewer Modal ── -->\n <div class=\"modal\" :class=\"{ 'show': showViewModal }\" @click.self=\"showViewModal = false\">\n <div class=\"modal-dialog modal-dialog-centered modal-lg\">\n <div class=\"modal-content\" v-if=\"viewingReport\">\n <div class=\"modal-header rpt-modal-header\">\n <div>\n <span class=\"entity-chip me-2\" :class=\"viewingReport.entity_type\">\n {{ viewingReport.entity_type === 'drill' ? 'DRILL' : 'INCIDENT' }}\n </span>\n <strong style=\"color:#fff\">{{ viewingReport.title }}</strong>\n </div>\n <button type=\"button\" class=\"btn-close btn-close-white\" @click=\"showViewModal = false\"></button>\n </div>\n <div class=\"modal-body\">\n <div class=\"view-grid\">\n <div class=\"view-item\"><label>Reference</label><span class=\"ref-mono\">{{\n viewingReport.entity_ref }}</span></div>\n <div class=\"view-item\"><label>Type</label><span>{{ viewingReport.entity_type }}</span></div>\n <div class=\"view-item\"><label>Submitted By</label><span>{{ viewingReport.submittedBy\n }}</span></div>\n <div class=\"view-item\"><label>Date</label><span>{{ viewingReport.date }}</span></div>\n <div class=\"view-item\"><label>Folder</label><span>{{ viewingReport.folderName || '—'\n }}</span></div>\n <div class=\"view-item\"><label>Submitted At</label><span>{{\n formatDate(viewingReport.submittedAt) }}</span></div>\n </div>\n <div class=\"view-section\">\n <label>Findings / Summary</label>\n <div class=\"view-text\">{{ viewingReport.findings }}</div>\n </div>\n <div class=\"view-section\" v-if=\"viewingReport.correctiveActions\">\n <label>Corrective Actions</label>\n <div class=\"view-text\">{{ viewingReport.correctiveActions }}</div>\n </div>\n <div class=\"view-section\" v-if=\"viewingReport.files && viewingReport.files.length > 0\">\n <label>Attachments</label>\n <div class=\"attached-files mt-1\">\n <span class=\"attached-chip\" v-for=\"(f, i) in viewingReport.files\" :key=\"i\">\n <i class=\"bi bi-paperclip\"></i> {{ f.name }}\n </span>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button class=\"btn btn-secondary\" @click=\"showViewModal = false\">Close</button>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Hidden file input for folders -->\n <input ref=\"fileInput\" type=\"file\" multiple style=\"display: none;\" @change=\"handleFileSelection\" />\n </div>\n</template>\n\n<script>\nexport default {\n name: 'Reports',\n\n props: {\n // Passed from ReportsView when navigating from HSE\n pendingContext: {\n type: Object,\n default: null\n // { entity_type, entity_id, entity_ref, title }\n },\n // All missing reports (drills + incidents without reports)\n missingReports: {\n type: Array,\n default: () => []\n // [{ entity_type, entity_id, entity_ref, label }]\n },\n // Ref to scroll to / highlight (from ?ref= query param)\n highlightRef: {\n type: String,\n default: null\n }\n },\n\n emits: [\n 'folder-created', 'files-added', 'file-removed', 'folder-deleted',\n 'data-updated', 'report-submitted', 'report-viewed'\n ],\n\n data() {\n return {\n folders: [],\n linkedReports: [], // submitted QHSE reports\n showNewFolderModal: false,\n newFolderName: '',\n selectedFolder: null,\n expandedFolders: [],\n previewFolder: null,\n showReportModal: false,\n showViewModal: false,\n viewingReport: null,\n highlightedRef: null,\n bannerDismissed: false,\n reportForm: {\n title: '',\n submittedBy: '',\n folderId: '',\n date: new Date().toISOString().split('T')[0],\n findings: '',\n correctiveActions: '',\n files: [],\n entity_type: '',\n entity_id: '',\n entity_ref: '',\n entity_label: '',\n selectedMissing: '',\n }\n };\n },\n\n watch: {\n pendingContext: {\n immediate: true,\n handler(ctx) {\n if (ctx) {\n this.reportForm.entity_type = ctx.entity_type;\n this.reportForm.entity_id = ctx.entity_id;\n this.reportForm.entity_ref = ctx.entity_ref;\n this.reportForm.entity_label = ctx.title;\n this.reportForm.title = ctx.title || `Report — ${ctx.entity_ref}`;\n }\n }\n },\n highlightRef: {\n immediate: true,\n handler(ref) {\n if (ref) {\n this.highlightedRef = ref;\n this.$nextTick(() => this.scrollToReport(ref));\n }\n }\n }\n },\n\n methods: {\n // ── Banner ──────────────────────────────────────────────\n dismissBanner() { this.bannerDismissed = true; },\n\n openReportForm() {\n if (this.pendingContext && !this.reportForm.entity_ref) {\n this.reportForm.entity_type = this.pendingContext.entity_type;\n this.reportForm.entity_id = this.pendingContext.entity_id;\n this.reportForm.entity_ref = this.pendingContext.entity_ref;\n this.reportForm.entity_label = this.pendingContext.title;\n this.reportForm.title = this.pendingContext.title || `Report — ${this.pendingContext.entity_ref}`;\n }\n this.showReportModal = true;\n },\n\n closeReportForm() {\n this.showReportModal = false;\n },\n\n clearEntityLink() {\n this.reportForm.entity_type = '';\n this.reportForm.entity_id = '';\n this.reportForm.entity_ref = '';\n this.reportForm.entity_label = '';\n this.reportForm.selectedMissing = '';\n },\n\n applyMissingSelection() {\n if (!this.reportForm.selectedMissing) return;\n const r = JSON.parse(this.reportForm.selectedMissing);\n this.reportForm.entity_type = r.entity_type;\n this.reportForm.entity_id = r.entity_id;\n this.reportForm.entity_ref = r.entity_ref;\n this.reportForm.entity_label = r.label;\n this.reportForm.title = this.reportForm.title || `Report — ${r.entity_ref}`;\n },\n\n // ── Submit Report ────────────────────────────────────────\n submitReport() {\n const folder = this.folders.find(f => f.id === this.reportForm.folderId);\n const report = {\n id: Date.now(),\n title: this.reportForm.title,\n submittedBy: this.reportForm.submittedBy,\n date: this.reportForm.date,\n findings: this.reportForm.findings,\n correctiveActions: this.reportForm.correctiveActions,\n files: [...this.reportForm.files],\n entity_type: this.reportForm.entity_type,\n entity_id: this.reportForm.entity_id,\n entity_ref: this.reportForm.entity_ref,\n folderId: this.reportForm.folderId || null,\n folderName: folder?.name || null,\n submittedAt: new Date(),\n };\n\n this.linkedReports.push(report);\n this.$emit('report-submitted', report);\n this.$emit('data-updated', {\n folders: this.folders,\n allFiles: this.getAllFilesData(),\n linkedReports: this.linkedReports,\n });\n\n // Reset form\n this.reportForm = {\n title: '', submittedBy: '', folderId: '',\n date: new Date().toISOString().split('T')[0],\n findings: '', correctiveActions: '', files: [],\n entity_type: '', entity_id: '', entity_ref: '',\n entity_label: '', selectedMissing: '',\n };\n this.showReportModal = false;\n\n // Highlight the new report\n this.$nextTick(() => {\n this.highlightedRef = report.entity_ref;\n this.scrollToReport(report.entity_ref);\n setTimeout(() => { this.highlightedRef = null; }, 3000);\n });\n },\n\n // ── View Report ──────────────────────────────────────────\n viewReport(report) {\n this.viewingReport = report;\n this.showViewModal = true;\n this.$emit('report-viewed', report);\n },\n\n scrollToReport(ref) {\n this.$nextTick(() => {\n const el = this.$refs['report-' + ref];\n if (el) {\n const target = Array.isArray(el) ? el[0] : el;\n target?.scrollIntoView({ behavior: 'smooth', block: 'center' });\n }\n });\n },\n\n // ── File Helpers ─────────────────────────────────────────\n handleReportFileAttach(e) {\n this.reportForm.files.push(...Array.from(e.target.files));\n e.target.value = '';\n },\n handleReportFileDrop(e) {\n this.reportForm.files.push(...Array.from(e.dataTransfer.files));\n },\n removeReportFile(i) { this.reportForm.files.splice(i, 1); },\n\n // ── Folder Methods ───────────────────────────────────────\n createFolder() {\n if (!this.newFolderName.trim()) return;\n const newFolder = { id: Date.now(), name: this.newFolderName.trim(), files: [], createdAt: new Date() };\n this.folders.push(newFolder);\n this.$emit('folder-created', newFolder);\n this.$emit('data-updated', { folders: this.folders, allFiles: this.getAllFilesData(), linkedReports: this.linkedReports });\n this.newFolderName = '';\n this.showNewFolderModal = false;\n },\n\n selectFolder(folder) { this.selectedFolder = folder; this.$refs.fileInput.click(); },\n\n handleFileSelection(event) {\n const files = Array.from(event.target.files);\n if (!this.selectedFolder || files.length === 0) return;\n const newFiles = files.map(file => ({ id: Date.now() + Math.random(), name: file.name, size: file.size, type: file.type, file, addedAt: new Date() }));\n this.selectedFolder.files.push(...newFiles);\n this.$emit('files-added', { folderId: this.selectedFolder.id, files: newFiles });\n this.$emit('data-updated', { folders: this.folders, allFiles: this.getAllFilesData(), linkedReports: this.linkedReports });\n event.target.value = '';\n this.selectedFolder = null;\n },\n\n removeFile(folderId, fileId) {\n const folder = this.folders.find(f => f.id === folderId);\n if (folder) {\n const i = folder.files.findIndex(f => f.id === fileId);\n if (i > -1) {\n const removedFile = folder.files.splice(i, 1)[0];\n this.$emit('file-removed', { folderId, file: removedFile });\n this.$emit('data-updated', { folders: this.folders, allFiles: this.getAllFilesData(), linkedReports: this.linkedReports });\n }\n }\n },\n\n deleteFolder(folderId) {\n if (confirm('Delete this folder and all its files?')) {\n const i = this.folders.findIndex(f => f.id === folderId);\n if (i > -1) {\n const deleted = this.folders.splice(i, 1)[0];\n this.$emit('folder-deleted', deleted);\n this.$emit('data-updated', { folders: this.folders, allFiles: this.getAllFilesData(), linkedReports: this.linkedReports });\n }\n }\n },\n\n toggleFolder(folderId) {\n const i = this.expandedFolders.indexOf(folderId);\n this.expandedFolders = i > -1 ? [] : [folderId];\n },\n closeAllFolders() { this.expandedFolders = []; },\n getExpandedFolder() {\n return this.expandedFolders.length > 0\n ? this.folders.find(f => f.id === this.expandedFolders[0]) || { files: [], name: '' }\n : { files: [], name: '' };\n },\n showPreview(id) { this.previewFolder = id; },\n hidePreview() { this.previewFolder = null; },\n\n formatFileSize(bytes) {\n if (!bytes) return '0 Bytes';\n const k = 1024, sizes = ['Bytes', 'KB', 'MB', 'GB'];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return Math.round(bytes / Math.pow(k, i) * 100) / 100 + ' ' + sizes[i];\n },\n formatDate(d) { return d ? new Date(d).toLocaleDateString('en-GB', { day: '2-digit', month: 'short', year: 'numeric' }) : '—'; },\n getAllFilesData() {\n return this.folders.flatMap(folder =>\n folder.files.map(file => ({ ...file, folderName: folder.name, folderId: folder.id }))\n );\n },\n }\n};\n</script>\n\n<style scoped>\n.reports-container {\n padding: 24px;\n}\n\n/* ── Banner ── */\n.missing-banner {\n background: linear-gradient(135deg, #fff3cd, #ffe8a1);\n border: 1.5px solid #f0ad4e;\n border-radius: 10px;\n margin-bottom: 22px;\n overflow: hidden;\n}\n\n.missing-banner-inner {\n display: flex;\n align-items: center;\n gap: 14px;\n padding: 14px 18px;\n flex-wrap: wrap;\n}\n\n.missing-icon {\n font-size: 22px;\n color: #856404;\n flex-shrink: 0;\n}\n\n.missing-content {\n flex: 1;\n min-width: 0;\n}\n\n.missing-content strong {\n font-size: 14px;\n color: #664d03;\n display: block;\n}\n\n.missing-content p {\n margin: 2px 0 0;\n font-size: 12px;\n color: #856404;\n}\n\n.ref-chip {\n background: #856404;\n color: #fff;\n border-radius: 4px;\n padding: 1px 8px;\n font-family: monospace;\n font-size: 12px;\n font-weight: 700;\n}\n\n.btn-dismiss {\n background: none;\n border: none;\n color: #856404;\n cursor: pointer;\n font-size: 15px;\n padding: 4px 6px;\n border-radius: 4px;\n transition: background .15s;\n}\n\n.btn-dismiss:hover {\n background: rgba(0, 0, 0, .08);\n}\n\n.slide-down-enter-active,\n.slide-down-leave-active {\n transition: all .25s;\n}\n\n.slide-down-enter-from,\n.slide-down-leave-to {\n opacity: 0;\n transform: translateY(-12px);\n}\n\n/* ── Page Header ── */\n.page-header {\n margin-bottom: 24px;\n border-bottom: 1px solid #e0e0e0;\n padding-bottom: 16px;\n}\n\n.page-title {\n font-size: 22px;\n font-weight: 700;\n color: #1e3c72;\n margin: 0;\n}\n\n.page-subtitle {\n font-size: 13px;\n color: #6c757d;\n margin: 2px 0 0;\n}\n\n.header-actions {\n display: flex;\n gap: 8px;\n}\n\n/* ── Section Label ── */\n.section-label {\n font-size: 12px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: .06em;\n color: #495057;\n margin-bottom: 14px;\n display: flex;\n align-items: center;\n gap: 7px;\n}\n\n/* ── Report Cards ── */\n.report-cards {\n display: flex;\n flex-direction: column;\n gap: 10px;\n margin-bottom: 24px;\n}\n\n.report-card {\n display: flex;\n align-items: center;\n gap: 14px;\n background: #fff;\n border: 1.5px solid #e9ecef;\n border-radius: 10px;\n padding: 14px 18px;\n cursor: pointer;\n transition: all .2s;\n}\n\n.report-card:hover {\n border-color: #2a5298;\n box-shadow: 0 2px 10px rgba(42, 82, 152, .1);\n}\n\n.report-card--highlighted {\n border-color: #f0ad4e !important;\n background: #fffbf0 !important;\n box-shadow: 0 0 0 3px rgba(240, 173, 78, .25) !important;\n animation: flash-highlight 1.5s ease;\n}\n\n@keyframes flash-highlight {\n\n 0%,\n 100% {\n background: #fffbf0;\n }\n\n 50% {\n background: #fff3cd;\n }\n}\n\n.rc-badge {\n font-size: 10px;\n font-weight: 700;\n padding: 3px 8px;\n border-radius: 4px;\n text-transform: uppercase;\n white-space: nowrap;\n flex-shrink: 0;\n}\n\n.rc-badge.drill {\n background: #d1ecf1;\n color: #0c5460;\n}\n\n.rc-badge.incident {\n background: #f8d7da;\n color: #721c24;\n}\n\n.rc-body {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0;\n}\n\n.rc-ref {\n font-family: monospace;\n font-size: 13px;\n color: #2a5298;\n font-weight: 700;\n}\n\n.rc-title {\n font-size: 14px;\n color: #212529;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.rc-meta {\n font-size: 11px;\n color: #6c757d;\n margin-top: 2px;\n}\n\n.rc-folder {\n font-size: 11px;\n color: #6c757d;\n background: #f8f9fa;\n border-radius: 4px;\n padding: 2px 8px;\n flex-shrink: 0;\n}\n\n.rc-arrow {\n color: #ced4da;\n font-size: 14px;\n}\n\n/* ── Folders ── */\n.folders-section {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));\n gap: 18px;\n padding: 4px 0;\n}\n\n.folder-card {\n position: relative;\n border: 2px solid #e0e0e0;\n border-radius: 10px;\n padding: 15px;\n background: #fff;\n cursor: pointer;\n aspect-ratio: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n transition: all .2s;\n}\n\n.folder-card:hover {\n border-color: #2a5298;\n box-shadow: 0 4px 12px rgba(0, 0, 0, .1);\n transform: translateY(-2px);\n}\n\n.folder-content {\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n width: 100%;\n height: 100%;\n justify-content: center;\n}\n\n.folder-name {\n margin-top: 8px;\n font-weight: 600;\n font-size: .85rem;\n word-break: break-word;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n.folder-actions-overlay {\n position: absolute;\n top: 5px;\n right: 5px;\n display: flex;\n gap: 4px;\n opacity: 0;\n transition: opacity .2s;\n}\n\n.folder-card:hover .folder-actions-overlay {\n opacity: 1;\n}\n\n.btn-icon {\n width: 28px;\n height: 28px;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: #fff;\n border: 1px solid #dee2e6;\n border-radius: 4px;\n cursor: pointer;\n}\n\n.btn-icon:hover {\n background: #f8f9fa;\n border-color: #2a5298;\n}\n\n.btn-icon-danger:hover {\n border-color: #dc3545;\n color: #dc3545;\n}\n\n.btn-icon i {\n font-size: .82rem;\n}\n\n/* ── Expanded Folder ── */\n.folder-modal-overlay {\n position: fixed;\n inset: 0;\n background: rgba(0, 0, 0, .5);\n z-index: 1000;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.folder-expanded {\n background: #fff;\n border-radius: 12px;\n width: 90%;\n max-width: 700px;\n max-height: 80vh;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n box-shadow: 0 10px 40px rgba(0, 0, 0, .3);\n}\n\n.expanded-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 18px 24px;\n border-bottom: 2px solid #f0f0f0;\n background: #f8f9fa;\n}\n\n.expanded-header strong {\n font-size: 1.1rem;\n}\n\n.btn-close-expanded {\n background: transparent;\n border: none;\n font-size: 1.1rem;\n cursor: pointer;\n padding: 5px 8px;\n color: #666;\n border-radius: 4px;\n transition: color .2s;\n}\n\n.btn-close-expanded:hover {\n color: #dc3545;\n}\n\n.files-list {\n padding: 18px;\n max-height: 55vh;\n overflow-y: auto;\n}\n\n.file-item {\n padding: 10px 14px;\n background: #f8f9fa;\n border-radius: 6px;\n margin-bottom: 8px;\n}\n\n.empty-folder-message {\n padding: 40px 20px;\n text-align: center;\n color: #6c757d;\n}\n\n.empty-folder-message i {\n font-size: 2.5rem;\n color: #dee2e6;\n}\n\n.empty-folder-message p {\n margin: 12px 0;\n}\n\n/* ── Modals ── */\n.modal {\n display: none;\n position: fixed;\n z-index: 1050;\n inset: 0;\n background: rgba(0, 0, 0, .5);\n align-items: center;\n justify-content: center;\n}\n\n.modal.show {\n display: flex;\n}\n\n.modal-dialog {\n max-width: 500px;\n width: 95%;\n margin: 1.5rem auto;\n}\n\n.modal-dialog.modal-lg {\n max-width: 780px;\n}\n\n.modal-content {\n background: #fff;\n border-radius: 12px;\n box-shadow: 0 10px 40px rgba(0, 0, 0, .25);\n overflow: hidden;\n}\n\n.modal-header {\n padding: 18px 22px;\n border-bottom: 1px solid #dee2e6;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.modal-body {\n padding: 22px;\n max-height: 70vh;\n overflow-y: auto;\n}\n\n.modal-footer {\n padding: 14px 22px;\n border-top: 1px solid #dee2e6;\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n}\n\n.rpt-modal-header {\n background: linear-gradient(135deg, #1e3c72, #2a5298);\n color: #fff;\n}\n\n.btn-close {\n background: transparent;\n border: none;\n font-size: 1.4rem;\n cursor: pointer;\n opacity: .6;\n}\n\n.btn-close:hover {\n opacity: 1;\n}\n\n/* ── Report Form ── */\n.rpt-entity-box {\n background: #f8f9fa;\n border: 1px solid #e0e0e0;\n border-radius: 8px;\n padding: 14px 16px;\n margin-bottom: 4px;\n}\n\n.prefilled-entity {\n display: flex;\n align-items: center;\n gap: 10px;\n flex-wrap: wrap;\n}\n\n.entity-chip {\n font-size: 10px;\n font-weight: 700;\n padding: 2px 8px;\n border-radius: 4px;\n text-transform: uppercase;\n}\n\n.entity-chip.drill {\n background: #d1ecf1;\n color: #0c5460;\n}\n\n.entity-chip.incident {\n background: #f8d7da;\n color: #721c24;\n}\n\n.input-row {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 14px;\n margin-bottom: 14px;\n}\n\n.form-group {\n display: flex;\n flex-direction: column;\n margin-bottom: 14px;\n}\n\n.form-label {\n font-size: 13px;\n margin-bottom: 5px;\n color: #495057;\n}\n\n.form-control {\n padding: 9px 12px;\n border: 1px solid #ced4da;\n border-radius: 6px;\n font-size: 14px;\n transition: border-color .2s;\n width: 100%;\n}\n\n.form-control:focus {\n outline: none;\n border-color: #2a5298;\n box-shadow: 0 0 0 3px rgba(42, 82, 152, .1);\n}\n\ntextarea.form-control {\n resize: vertical;\n min-height: 80px;\n}\n\nselect.form-control {\n cursor: pointer;\n}\n\n/* File drop zone */\n.file-drop-zone {\n border: 2px dashed #ced4da;\n border-radius: 8px;\n padding: 20px;\n text-align: center;\n cursor: pointer;\n transition: border-color .2s;\n min-height: 80px;\n}\n\n.file-drop-zone:hover {\n border-color: #2a5298;\n}\n\n.attached-files {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-top: 10px;\n justify-content: center;\n}\n\n.attached-chip {\n background: #e9ecef;\n border-radius: 5px;\n padding: 3px 10px;\n font-size: 12px;\n display: flex;\n align-items: center;\n gap: 5px;\n}\n\n.attached-chip button {\n background: none;\n border: none;\n cursor: pointer;\n color: #dc3545;\n padding: 0;\n font-size: 11px;\n}\n\n/* ── Report Viewer ── */\n.view-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));\n gap: 14px;\n margin-bottom: 20px;\n}\n\n.view-item {\n display: flex;\n flex-direction: column;\n gap: 3px;\n}\n\n.view-item label {\n font-size: 11px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: .05em;\n color: #6c757d;\n}\n\n.view-item span {\n font-size: 14px;\n color: #212529;\n}\n\n.ref-mono {\n font-family: monospace;\n font-size: 13px;\n color: #2a5298;\n font-weight: 700;\n}\n\n.view-section {\n margin-bottom: 18px;\n}\n\n.view-section label {\n font-size: 12px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: .05em;\n color: #6c757d;\n display: block;\n margin-bottom: 6px;\n}\n\n.view-text {\n background: #f8f9fa;\n border-radius: 6px;\n padding: 12px 14px;\n font-size: 14px;\n line-height: 1.6;\n color: #212529;\n white-space: pre-wrap;\n}\n\n/* ── Buttons ── */\n.btn {\n padding: 9px 18px;\n border: none;\n border-radius: 8px;\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n transition: all .2s;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n}\n\n.btn:disabled {\n opacity: .6;\n cursor: not-allowed;\n}\n\n.btn-primary {\n background: #2a5298;\n color: #fff;\n}\n\n.btn-primary:hover:not(:disabled) {\n background: #1e3c72;\n}\n\n.btn-success {\n background: #28a745;\n color: #fff;\n}\n\n.btn-success:hover:not(:disabled) {\n background: #218838;\n}\n\n.btn-secondary {\n background: #6c757d;\n color: #fff;\n}\n\n.btn-secondary:hover:not(:disabled) {\n background: #5a6268;\n}\n\n.btn-outline-primary {\n background: transparent;\n border: 1.5px solid #2a5298;\n color: #2a5298;\n}\n\n.btn-outline-primary:hover {\n background: #2a5298;\n color: #fff;\n}\n\n.btn-outline-danger {\n background: transparent;\n border: 1.5px solid #dc3545;\n color: #dc3545;\n padding: 4px 10px;\n font-size: 12px;\n}\n\n.btn-outline-danger:hover {\n background: #dc3545;\n color: #fff;\n}\n\n.btn-warning {\n background: #f0ad4e;\n color: #664d03;\n}\n\n.btn-warning:hover {\n background: #e0972e;\n}\n\n.btn-link {\n background: none;\n border: none;\n padding: 0;\n font-size: 13px;\n text-decoration: none;\n cursor: pointer;\n}\n\n.btn-sm {\n padding: 5px 12px;\n font-size: 12px;\n}\n\n.fw-bold {\n font-weight: 700;\n}\n\n.fw-semibold {\n font-weight: 600;\n}\n\n.me-1 {\n margin-right: 4px;\n}\n\n.me-2 {\n margin-right: 8px;\n}\n\n.ms-2 {\n margin-left: 8px;\n}\n\n.ms-auto {\n margin-left: auto;\n}\n\n.mt-3 {\n margin-top: 16px;\n}\n\n.mt-4 {\n margin-top: 24px;\n}\n\n.mt-1 {\n margin-top: 4px;\n}\n\n.mb-0 {\n margin-bottom: 0;\n}\n\n.mb-3 {\n margin-bottom: 16px;\n}\n\n.text-muted {\n color: #6c757d !important;\n}\n\n.text-danger {\n color: #dc3545 !important;\n}\n\n.text-success {\n color: #28a745 !important;\n}\n\n.text-warning {\n color: #f0ad4e !important;\n}\n\n.d-flex {\n display: flex;\n}\n\n.align-items-center {\n align-items: center;\n}\n\n.justify-content-between {\n justify-content: space-between;\n}\n\n.text-center {\n text-align: center;\n}\n\n.empty-state {\n padding: 60px 20px;\n}\n\n.empty-state h5 {\n margin-top: 14px;\n}\n\n@media (max-width: 640px) {\n .input-row {\n grid-template-columns: 1fr;\n }\n\n .header-actions {\n gap: 6px;\n }\n\n .btn {\n padding: 8px 12px;\n font-size: 12px;\n }\n}\n</style>","<template>\n <div v-if=\"ready\">\n <div>\n <nav v-show=\"!showReport\">\n <button v-for=\"section in sections\" :key=\"section.id\" class=\"nav-btn\"\n :class=\"{ active: activeSection === section.id }\" @click=\"handleSectionClick(section)\">\n {{ section.icon }} {{ section.name }}\n </button>\n </nav>\n \n <div class=\"content\" v-show=\"!showReport\">\n <!-- Maintenance Tasks Form -->\n <section :class=\"['form-section', { active: activeSection === 'maintenance' }]\"\n v-show=\"activeSection === 'maintenance'\">\n <h2>🛠️ Maintenance Tasks</h2>\n <!-- Loading indicator -->\n <div class=\"loading-container\" v-if=\"isLoading\">\n <div class=\"loading-spinner\"></div>\n <p>Loading checklist...</p>\n </div>\n <form v-if=\"!isLoading\">\n <div class=\"container\">\n <div class=\"d-flex justify-content-between align-items-center\">\n <h1>Maintenance Checklist</h1>\n <button v-if=\"showAddTaskButton\" class=\"btn btn-outline-custom\" @click.prevent=\"addTask()\">\n Manually Add Task\n <i class=\"fas fa-plus\"></i>\n </button>\n </div>\n\n <div class=\"progress-container\">\n <div class=\"progress-info\">\n Progress: {{ progress }}% ({{ completedCount.length }}/{{ checklists.length }})\n </div>\n <div class=\"progress-bar\">\n <div class=\"progress-fill\" :style=\"{ width: progress + '%' }\"></div>\n </div>\n </div>\n\n <ul class=\"checklist\">\n <li v-for=\"checklist in checklists\" :key=\"checklist.id\" class=\"checklist-item\">\n <div class=\"checkbox\" :class=\"{ 'checked': checklist.completed }\"\n @click=\"toggleTask(checklist)\">\n <span v-if=\"checklist.completed\">✓</span>\n </div>\n <span class=\"task-text\" :class=\"{ 'completed': checklist.completed }\"\n @click=\"toggleTask(checklist)\">\n {{ checklist.text }}\n </span>\n <button v-if=\"showAddTaskButton\" class=\"delete-btn\" @click=\"deleteTask(checklist.id)\"\n title=\"Delete task\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <polyline points=\"3,6 5,6 21,6\"></polyline>\n <path\n 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\">\n </path>\n <line x1=\"10\" y1=\"11\" x2=\"10\" y2=\"17\"></line>\n <line x1=\"14\" y1=\"11\" x2=\"14\" y2=\"17\"></line>\n </svg>\n </button>\n </li>\n </ul>\n\n <div v-if=\"after\">\n <label>Upload Image Evidence</label>\n <ul class=\"checklist\">\n <li class=\"checklist-item\">\n <span class=\"task-text\">\n Image Evidence Already Uploaded\n </span>\n <button type=\"button\" class=\"delete-btn\" @click=\"deleteEvidence()\"\n title=\"Delete Image\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <polyline points=\"3,6 5,6 21,6\"></polyline>\n <path\n 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\">\n </path>\n <line x1=\"10\" y1=\"11\" x2=\"10\" y2=\"17\"></line>\n <line x1=\"14\" y1=\"11\" x2=\"14\" y2=\"17\"></line>\n </svg>\n </button>\n </li>\n </ul>\n </div>\n\n <div class=\"form-group\" v-else :key=\"refreshKey || 'default'\">\n <label>Upload Image Evidence</label>\n <p>You can only upload one image evidence here.</p>\n <div class=\"attachment-area\">\n <p>{{ fileText }}</p>\n <input type=\"file\" id=\"evidence-files\" class=\"file-input\" @change=\"handleImg\">\n <label for=\"evidence-files\" class=\"file-label\">Browse Files</label>\n </div>\n </div>\n\n <div class=\"status\" v-if=\"completedCount === checklists.length\">\n All tasks completed! ✅\n </div>\n\n <button class=\"reset-button\" @click.prevent=\"resetTasks\">{{ checklistButtonLabel }}</button>\n </div>\n </form>\n </section>\n\n <!-- Maintenance Schedule Form -->\n <section :class=\"['form-section', { active: activeSection === 'schedule' }]\"\n v-show=\"activeSection === 'schedule'\">\n <h2>📅 Maintenance Schedule</h2>\n <form>\n <div class=\"form-group\">\n <label for=\"task-name\">Task Name</label>\n <input type=\"text\" id=\"task-name\" v-model=\"form.taskName\" required>\n </div>\n\n <div class=\"form-group\">\n <label for=\"task-description\">Description</label>\n <textarea id=\"task-description\" v-model=\"form.description\" required></textarea>\n </div>\n\n <div class=\"input-group\">\n <div class=\"form-group\">\n <label for=\"maintenance-type\">Maintenance Type</label>\n <select id=\"maintenance-type\" v-model=\"form.maintenanceType\" required>\n <option value=\"\">-- Select Type --</option>\n <option value=\"preventive\">Preventive</option>\n <option value=\"corrective\">Corrective</option>\n <option value=\"predictive\">Predictive</option>\n <option value=\"condition\">Condition-Based</option>\n </select>\n </div>\n\n <div class=\"form-group\">\n <label for=\"component\">Component/System</label>\n <select id=\"component\" v-model=\"form.component\" required>\n <option value=\"\">-- Select Component --</option>\n <option value=\"engine\">Engine</option>\n <option value=\"hull\">Hull</option>\n <option value=\"electronics\">Electronics</option>\n <option value=\"deck\">Deck Machinery</option>\n <option value=\"plumbing\">Plumbing</option>\n <option value=\"electrical\">Electrical</option>\n <option value=\"hvac\">HVAC</option>\n <option value=\"safety\">Safety Systems</option>\n <option value=\"Other\">Other</option>\n </select>\n <input v-if=\"form.component === 'Other'\" type=\"text\"\n placeholder=\"Enter custom component/system\" v-model=\"form.customComponent\"\n style=\"margin-top: 8px;\">\n </div>\n </div>\n\n <div class=\"input-group\">\n <div class=\"form-group\">\n <label for=\"priority\">Priority</label>\n <select id=\"priority\" v-model=\"form.priority\" required>\n <option value=\"low\">Low</option>\n <option value=\"medium\">Medium</option>\n <option value=\"high\">High</option>\n <option value=\"critical\">Critical</option>\n </select>\n </div>\n <div class=\"form-group\">\n <label for=\"status\">Status</label>\n <input type=\"text\" id=\"status\" v-model=\"form.status\" readonly>\n </div>\n </div>\n\n <div class=\"input-group\">\n <div class=\"form-group\">\n <label for=\"estimated-hours\">Estimated Hours</label>\n <input type=\"number\" id=\"estimated-hours\" v-model=\"form.estimatedHours\" min=\"0\" step=\"0.5\">\n </div>\n </div>\n\n <div class=\"form-group\">\n <label for=\"assigned-to\">Assigned To</label>\n <select id=\"assigned-to\" v-model=\"form.assignedTo\">\n <option value=\"\">-- Select Personnel --</option>\n <option v-for=\"member in vesselCrew\" :key=\"member.id\"\n :value=\"`${member.name} - ${member.role}`\">\n {{ member.name }} - {{ member.role }}\n </option>\n </select>\n </div>\n\n <div class=\"input-group\">\n <div class=\"form-group\">\n <label for=\"recurrence-type\">Recurrence</label>\n <select id=\"recurrence-type\" v-model=\"form.recurrence\" required>\n <option value=\"once\">One-time</option>\n <option value=\"daily\">Daily</option>\n <option value=\"weekly\">Weekly</option>\n <option value=\"monthly\">Monthly</option>\n <option value=\"quarterly\">Quarterly</option>\n <option value=\"semi-annual\">Semi-annually</option>\n <option value=\"annual\">Annually</option>\n <option value=\"custom\">Custom Interval</option>\n </select>\n </div>\n </div>\n\n <div class=\"input-group\">\n <div class=\"form-group\">\n <label for=\"last-performed\">Last Performed Date</label>\n <input type=\"date\" id=\"last-performed\" v-model=\"form.lastPerformed\">\n </div>\n\n <div class=\"form-group\">\n <label for=\"next-due\">Due Date</label>\n <input type=\"date\" id=\"next-due\" v-model=\"form.nextDue\" required>\n </div>\n </div>\n\n <div class=\"form-group\">\n <label>Notifications</label>\n <div class=\"checkbox-group\">\n <div class=\"checkbox-item\">\n <input type=\"checkbox\" id=\"notify-email\" v-model=\"form.notifyEmail\">\n <label for=\"notify-email\">Email Notification</label>\n </div>\n <div class=\"checkbox-item\">\n <input type=\"checkbox\" id=\"notify-sms\" v-model=\"form.notifySms\">\n <label for=\"notify-sms\">SMS Notification</label>\n </div>\n </div>\n </div>\n\n <div class=\"input-group\">\n <div class=\"form-group\">\n <label for=\"reminder-days\">Reminder (Days Before)</label>\n <select id=\"reminder-days\" v-model=\"form.reminderDays\">\n <option value=\"1\">1 day</option>\n <option value=\"3\">3 days</option>\n <option value=\"7\">1 week</option>\n <option value=\"14\">2 weeks</option>\n <option value=\"30\">1 month</option>\n </select>\n </div>\n </div>\n\n <div class=\"form-group\">\n <label for=\"schedule-notes\">Notes</label>\n <textarea id=\"schedule-notes\" v-model=\"form.notes\"></textarea>\n </div>\n\n <div class=\"form-group\">\n <label>Attachments</label>\n <div class=\"attachment-area\">\n <p>{{ imgText }}</p>\n <input type=\"file\" id=\"maintenance-files\" class=\"file-input\" @change=\"handleFiles\" multiple>\n <label for=\"maintenance-files\" class=\"file-label\">Browse Files</label>\n </div>\n </div>\n\n <div class=\"action-buttons\">\n <button type=\"button\" class=\"btn btn-primary\" @click.prevent=\"saveSchedule\"\n :disabled=\"isSaving\">\n {{ isSaving ? 'Saving...' : 'Save Schedule' }}\n </button>\n </div>\n </form>\n </section>\n\n <!-- Inventory Form -->\n <section :class=\"['form-section', { active: activeSection === 'inventory' }]\"\n v-show=\"activeSection === 'inventory'\">\n <h2>All Maintenance</h2>\n <div class=\"task-table-wrapper\">\n <!-- Filters and Controls -->\n <div class=\"table-controls\">\n <div class=\"filters\">\n <button :class=\"{ active: activeFilter === 'due' }\" @click=\"setFilter('due')\">Due</button>\n <button :class=\"{ active: activeFilter === 'all' }\" @click=\"setFilter('all')\">All</button>\n <button :class=\"{ active: activeFilter === 'completed' }\"\n @click=\"setFilter('completed')\">Completed</button>\n <input type=\"text\" v-model=\"searchQuery\" placeholder=\"Search...\" />\n </div>\n </div>\n\n <!-- Task Table -->\n <table class=\"task-table\">\n <thead>\n <tr>\n <th>Equipment</th>\n <th>Task Name</th>\n <th>Assigned To</th>\n <th>Intervals</th>\n <th>Remaining</th>\n <th>Next Due</th>\n <th>Status</th>\n <th>Action</th>\n </tr>\n </thead>\n <tbody>\n <tr v-for=\"task in filteredTasks\" :key=\"task.id\">\n <td>{{ task.component }}</td>\n <td>{{ task.taskName }}</td>\n <td>{{ task.assignedTo }}</td>\n <td>{{ task.recurrence }}</td>\n <td>{{ task.remainingDays }}</td>\n <td>{{ task.nextDue }}</td>\n <td>\n <span :class=\"['status-badge', task.status.toLowerCase().replace(' ', '-')]\">\n {{ task.status }}\n </span>\n </td>\n <td>\n <button @click=\"printMaintenance(task.component)\" v-if=\"task.status === 'Completed'\"\n class=\"status-action\">Print</button>\n <button @click=\"showMaintenance(task.component)\" v-else\n class=\"status-action\">Start</button>\n </td>\n </tr>\n </tbody>\n </table>\n\n <!-- Empty schedule -->\n <div v-if=\"!tasks.length\">\n <div class=\"alert alert-primary\" role=\"alert\">\n <h4 class=\"alert-heading\">Such Empty!!!</h4>\n <p>You have no maintenance, because you have not scheduled any for this ship.</p>\n <hr>\n <p class=\"mb-0\">Navigate to the schedule tab, to start scheduling. Or click on this button\n to\n <button type=\"button\" class=\"btn btn-primary\"\n @click=\"switchSchedule()\">Schedule</button>\n </p>\n </div>\n </div>\n </div>\n </section>\n </div>\n\n <div class=\"report-container\" ref=\"reportContainer\" v-show=\"showReport\">\n <div class=\"header\">\n <div class=\"report-title\">MAINTENANCE TASK REPORT</div>\n </div>\n\n <div class=\"report-info\">\n <div class=\"info-box\">\n <div class=\"info-label\">Report Generated:</div>\n <div>{{ reportDate }}</div>\n </div>\n <div class=\"info-box\">\n <div class=\"info-label\">Report ID:</div>\n <div>{{ reportId }}</div>\n </div>\n <div class=\"info-box\">\n <div class=\"info-label\">Total Tasks:</div>\n <div>{{ maintenanceTasks.length }}</div>\n </div>\n <div class=\"info-box\">\n <div class=\"info-label\">Generated By:</div>\n <div>OceanHelm System</div>\n </div>\n </div>\n\n <div class=\"section\">\n <div class=\"section-title\">📊 Task Summary</div>\n <div class=\"summary-grid\">\n <div class=\"summary-card\">\n <div class=\"summary-number\">1</div>\n <div class=\"summary-label\">Completed</div>\n </div>\n <div class=\"summary-card\">\n <div class=\"summary-number\">0</div>\n <div class=\"summary-label\">Pending</div>\n </div>\n <div class=\"summary-card\">\n <div class=\"summary-number\">0</div>\n <div class=\"summary-label\">Overdue</div>\n </div>\n <div class=\"summary-card\">\n <div class=\"summary-number\">{{ totalEstimatedHours }}</div>\n <div class=\"summary-label\">Total Hours</div>\n </div>\n </div>\n </div>\n\n <div class=\"section\">\n <div class=\"section-title\">🔧 Maintenance Tasks</div>\n <div v-for=\"task in maintenanceTasks\" :key=\"task.taskName\"\n :class=\"['task-item', getTaskStatusClass(task)]\">\n\n <div class=\"task-header\">\n <div>\n <div class=\"task-title\">\n {{ task.taskName }}\n <span :class=\"['maintenance-type', 'type-' + task.maintenanceType]\">\n {{ task.maintenanceType }}\n </span>\n </div>\n <div class=\"task-component\">Component: {{ task.component }}</div>\n </div>\n <span :class=\"['status-badge', 'status-' + task.status.toLowerCase().replace(' ', '-')]\">\n {{ task.status }}\n </span>\n </div>\n\n <div class=\"task-details\">\n <div class=\"detail-item\">\n <div class=\"detail-label\">Assigned To</div>\n <div class=\"detail-value\">{{ task.assignedTo }}</div>\n </div>\n <div class=\"detail-item\">\n <div class=\"detail-label\">Estimated Hours</div>\n <div class=\"detail-value\">{{ task.estimatedHours }} hours</div>\n </div>\n <div class=\"detail-item\">\n <div class=\"detail-label\">Last Performed</div>\n <div class=\"detail-value\">{{ formatDate(task.lastPerformed) }}</div>\n </div>\n <div class=\"detail-item\">\n <div class=\"detail-label\">Next Due</div>\n <div class=\"detail-value\">{{ formatDate(task.nextDue) }}</div>\n </div>\n <div class=\"detail-item\">\n <div class=\"detail-label\">Recurrence</div>\n <div class=\"detail-value\">{{ task.recurrence }}</div>\n </div>\n <div class=\"detail-item\">\n <div class=\"detail-label\">Remaining Days</div>\n <div class=\"detail-value\">{{ task.remainingDays }} days</div>\n </div>\n </div>\n\n <div v-if=\"task.description\"\n style=\"margin: 15px 0; padding: 10px; background: white; border-radius: 5px;\">\n <div class=\"detail-label\">Description</div>\n <div class=\"detail-value\">{{ task.description }}</div>\n </div>\n\n <div v-if=\"task.notes\"\n style=\"margin: 15px 0; padding: 10px; background: white; border-radius: 5px;\">\n <div class=\"detail-label\">Notes</div>\n <div class=\"detail-value\">{{ task.notes }}</div>\n </div>\n\n <div v-if=\"task.checklistProgress && task.checklistProgress.length > 0\" class=\"checklist-progress\">\n <div class=\"detail-label\">Checklist Progress</div>\n <div class=\"progress-bar\">\n <div class=\"progress-fill\" :style=\"{ width: getChecklistProgress(task) + '%' }\"></div>\n </div>\n <div style=\"font-size: 0.9em; color: #666; margin-top: 5px;\">\n {{ getCompletedChecklistItems(task) }} of {{ task.checklistProgress.length }} items\n completed\n ({{ getChecklistProgress(task) }}%)\n </div>\n <div class=\"checklist-items\">\n <div v-for=\"(item, index) in task.checklistProgress\" :key=\"index\" class=\"checklist-item\">\n <span class=\"checklist-icon\">{{ item.completed ? '✅' : '⭕' }}</span>\n <span>{{ item.text || 'Checklist Item ' + (index + 1) }}</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"section\">\n <div class=\"section-title\">📋 Recommendations</div>\n <div class=\"info-box\">\n <ul>\n <li v-for=\"recommendation in generateRecommendations()\" :key=\"recommendation\">\n {{ recommendation }}\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"signature-section\">\n <div class=\"signature-box\">\n <div><strong>Report Generated By</strong></div>\n <div style=\"margin-top: 10px; color: #666;\">OceanHelm Maintenance System</div>\n </div>\n <div class=\"signature-box\">\n <div><strong>Date</strong></div>\n <div style=\"margin-top: 10px; color: #666;\">{{ reportDate }}</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'OceanHelmMaintenance',\n props: {\n vesselInfo: {\n type: Object,\n required: true\n },\n tasks: {\n type: Array,\n default: () => []\n },\n vesselCrew: {\n type: Array,\n default: () => []\n },\n companyInfo: {\n type: Object,\n default: () => ({})\n },\n userProfile: {\n type: Object,\n required: true\n }\n },\n emits: [\n 'dashboard-navigate',\n 'load-checklist',\n 'save-schedule',\n 'update-task',\n 'upload-file',\n 'delete-evidence',\n 'access-denied',\n 'show-message',\n 'generate-checklist'\n ],\n data() {\n return {\n ready: true,\n isSaving: false,\n after: null,\n lastSection: '',\n currentTask: '',\n imgText: 'Choose file to upload',\n fileText: 'Drag and drop files here or',\n fileattachments: {},\n refreshKey: 0,\n activeSection: 'inventory',\n sections: [\n { id: 'schedule', name: 'Schedule', icon: '📅' },\n { id: 'inventory', name: 'All Maintenance', icon: '♻️' },\n {\n id: 'dashboard', \n name: 'Dashboard', \n icon: '☰', \n onClick: () => this.$emit('dashboard-navigate')\n }\n ],\n activeFilter: 'all',\n searchQuery: '',\n checklists: [],\n isLoading: false,\n form: {\n taskName: '',\n description: '',\n maintenanceType: '',\n component: '',\n priority: '',\n dueDate: '',\n estimatedHours: null,\n assignedTo: '',\n recurrence: '',\n lastPerformed: '',\n nextDue: '',\n notifyEmail: true,\n notifySms: true,\n reminderDays: '1',\n estimatedDuration: null,\n notes: '',\n status: 'Soon',\n email: '',\n remainingDays: null,\n attachments: {}\n },\n maintenanceTasks: [],\n showReport: false,\n reportDate: new Date().toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'long',\n day: 'numeric'\n }),\n reportId: 'MT-' + Math.random().toString(36).substr(2, 9).toUpperCase(),\n };\n },\n watch: {\n 'form.lastPerformed': 'calculateNextDue',\n 'form.recurrence': 'calculateNextDue',\n 'form.nextDue': function (newDate) {\n this.calculateRemainingDays();\n }\n },\n computed: {\n filteredTasks() {\n let result = [...this.tasks];\n if (this.activeFilter === 'all') {\n result = result.filter(task => task.status === 'Overdue' || task.status === 'Soon' || task.status === 'Completed');\n }\n else if (this.activeFilter === 'due') {\n result = result.filter(task => task.status === 'Overdue' || task.status === 'Soon');\n } else if (this.activeFilter === 'completed') {\n result = result.filter(task => task.status === 'Completed');\n }\n\n if (this.searchQuery) {\n const query = this.searchQuery.toLowerCase();\n result = result.filter(task =>\n task.component.toLowerCase().includes(query) ||\n task.taskName.toLowerCase().includes(query) ||\n task.assignedTo.toLowerCase().includes(query)\n );\n }\n\n return result;\n },\n completedCount() {\n return this.checklists.filter(item => item.completed);\n },\n progress() {\n return Math.round((this.completedCount.length / this.checklists.length) * 100);\n },\n checklistButtonLabel() {\n return this.lastSection === 'schedule' ? 'Approve Maintenance' : 'Save Checklist';\n },\n showAddTaskButton() {\n return this.checklistButtonLabel !== 'Save Checklist';\n },\n totalEstimatedHours() {\n return this.maintenanceTasks.reduce((total, task) => total + (task.estimatedHours || 0), 0);\n },\n },\n methods: {\n grantAccess(vessel) {\n const profile = this.userProfile;\n return profile.role === 'owner' || \n profile.role === 'staff' || \n (profile.role === 'captain' && profile.vessel === vessel);\n },\n deepAccess() {\n const profile = this.userProfile;\n if (profile.role === 'owner' || profile.role === 'captain') {\n return true;\n } else {\n this.$emit('access-denied', 'You do not have access to do this');\n return false;\n }\n },\n deleteTask(taskId) {\n this.checklists = this.checklists.filter(checklist => checklist.id !== taskId);\n },\n addTask(event) {\n if (event) event.preventDefault();\n \n this.$emit('show-message', {\n type: 'prompt',\n title: 'Add New Task',\n message: 'Enter the task details',\n callback: (result) => {\n if (result) {\n const newTask = {\n id: Date.now(),\n text: result,\n completed: false\n };\n this.checklists.push(newTask);\n }\n }\n });\n },\n setFilter(filter) {\n this.activeFilter = filter;\n },\n loadChecklist(taskComponent) {\n this.isLoading = true;\n this.$emit('generate-checklist', {\n component: taskComponent,\n callback: (checklist) => {\n this.checklists = checklist.map(item => ({\n ...item,\n completed: false\n }));\n this.isLoading = false;\n }\n });\n },\n showMaintenance(taskComponent) {\n if (this.deepAccess()) {\n const task = this.tasks.find(t => t.component === taskComponent);\n\n if (task && task.checklistProgress) {\n this.checklists = [...task.checklistProgress];\n } else {\n this.loadChecklist(taskComponent);\n }\n\n this.after = task?.after;\n this.currentTask = taskComponent;\n this.lastSection = 'inventory';\n this.activeSection = 'maintenance';\n }\n },\n printMaintenance(taskComponent) {\n const task = this.tasks.find(t => t.component === taskComponent);\n this.maintenanceTasks = [task];\n this.loadMaintenanceData();\n\n this.showReport = true;\n\n this.$nextTick(() => {\n setTimeout(() => {\n window.print();\n this.showReport = false;\n }, 100);\n });\n },\n switchSchedule() {\n if (this.deepAccess()) {\n this.activeSection = 'schedule';\n }\n },\n handleFiles(event) {\n this.imgText = event.target.files[0].name;\n this.form.attachments = {\n file: event.target.files[0]\n };\n },\n handleImg(event) {\n this.fileText = event.target.files[0].name;\n this.fileattachments = {\n file: event.target.files[0]\n };\n },\n validateForm() {\n const requiredFields = [\n 'taskName',\n 'description',\n 'maintenanceType',\n 'component',\n 'priority',\n 'estimatedHours',\n 'recurrence',\n 'lastPerformed',\n 'assignedTo'\n ];\n\n for (const field of requiredFields) {\n if (!this.form[field]) {\n this.$emit('show-message', {\n type: 'error',\n title: 'Missing info',\n message: `Please fill in the required field: ${field}`\n });\n return false;\n }\n }\n\n return true;\n },\n handleSectionClick(section) {\n this.activeSection = section.id;\n if (typeof section.onClick === 'function') {\n section.onClick();\n }\n },\n calculateNextDue() {\n const date = this.form.lastPerformed ? new Date(this.form.lastPerformed) : null;\n const recurrence = this.form.recurrence;\n\n if (!date || !recurrence) return;\n\n let nextDate = new Date(date);\n\n switch (recurrence) {\n case 'daily':\n nextDate.setDate(nextDate.getDate() + 1);\n break;\n case 'weekly':\n nextDate.setDate(nextDate.getDate() + 7);\n break;\n case 'monthly':\n nextDate.setMonth(nextDate.getMonth() + 1);\n break;\n case 'quarterly':\n nextDate.setMonth(nextDate.getMonth() + 3);\n break;\n case 'semi-annual':\n nextDate.setMonth(nextDate.getMonth() + 6);\n break;\n case 'annual':\n nextDate.setFullYear(nextDate.getFullYear() + 1);\n break;\n case 'once':\n case 'custom':\n return;\n }\n\n this.form.nextDue = nextDate.toISOString().split('T')[0];\n },\n calculateRemainingDays() {\n if (!this.form.nextDue) {\n this.form.remainingDays = null;\n return;\n }\n\n const today = new Date();\n const nextDueDate = new Date(this.form.nextDue);\n\n today.setHours(0, 0, 0, 0);\n nextDueDate.setHours(0, 0, 0, 0);\n\n const diffTime = nextDueDate - today;\n const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));\n\n this.form.remainingDays = `${diffDays} Days`;\n },\n async saveSchedule() {\n this.isSaving = true;\n \n if (!this.validateForm()) {\n this.isSaving = false;\n return;\n }\n\n const taskData = { ...this.form };\n\n if (this.form.component === 'Other' && this.form.customComponent) {\n taskData.component = this.form.customComponent;\n }\n\n taskData.email = this.companyInfo.email;\n\n // Check for duplicate component\n const hasDuplicateComponent = this.tasks.some(task => task.component === taskData.component);\n\n if (hasDuplicateComponent) {\n this.$emit('show-message', {\n type: 'error',\n title: 'Duplicate Component',\n message: `A task with the component \"${taskData.component}\" already exists in maintenance`\n });\n this.isSaving = false;\n return;\n }\n\n delete taskData.customComponent;\n\n this.$emit('save-schedule', {\n taskData,\n file: taskData.attachments.file,\n callback: (success) => {\n this.isSaving = false;\n if (success) {\n this.loadChecklist(taskData.component);\n this.lastSection = 'schedule';\n this.currentTask = taskData.component;\n this.resetForm();\n this.activeSection = 'maintenance';\n }\n }\n });\n },\n resetForm() {\n this.form = {\n taskName: '',\n description: '',\n maintenanceType: '',\n component: '',\n priority: '',\n dueDate: '',\n estimatedHours: null,\n assignedTo: '',\n recurrence: '',\n lastPerformed: '',\n nextDue: '',\n notifyEmail: true,\n notifySms: true,\n reminderDays: '1',\n estimatedDuration: null,\n notes: '',\n status: 'Soon',\n remainingDays: null,\n attachments: {}\n };\n },\n toggleTask(task) {\n task.completed = !task.completed;\n },\n async resetTasks() {\n const allCompleted = this.checklists.every(item => item.completed);\n const status = allCompleted ? 'Completed' : 'Soon';\n const updateData = {\n checklistProgress: [...this.checklists],\n status,\n component: this.currentTask,\n after: this.after\n };\n\n this.$emit('update-task', {\n updateData,\n file: this.fileattachments.file,\n tasks: this.tasks,\n callback: (success, updatedAfter) => {\n if (success) {\n if (updatedAfter) {\n this.after = updatedAfter;\n }\n this.fileattachments = {};\n this.fileText = 'Drag and drop files here or';\n this.refreshKey += 1;\n this.activeSection = 'inventory';\n }\n }\n });\n },\n loadMaintenanceData() {\n this.reportId = 'MT-' + Math.random().toString(36).substr(2, 9).toUpperCase();\n this.reportDate = new Date().toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'long',\n day: 'numeric'\n });\n },\n formatDate(dateString) {\n if (!dateString) return 'N/A';\n return new Date(dateString).toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric'\n });\n },\n getTaskStatusClass(task) {\n if (task.status === 'Completed') return 'completed';\n if (task.status === 'Overdue') return 'overdue';\n if (task.status === 'In Progress') return 'in-progress';\n return 'pending';\n },\n getChecklistProgress(task) {\n if (!task.checklistProgress || task.checklistProgress.length === 0) return 0;\n const completed = task.checklistProgress.filter(item => item.completed).length;\n return Math.round((completed / task.checklistProgress.length) * 100);\n },\n getCompletedChecklistItems(task) {\n if (!task.checklistProgress) return 0;\n return task.checklistProgress.filter(item => item.completed).length;\n },\n generateRecommendations() {\n return [\n 'Maintain regular communication with assigned technicians',\n 'Ensure all safety protocols are followed during maintenance activities',\n 'Update task progress and notes in real-time for accurate reporting'\n ];\n },\n deleteEvidence() {\n this.$emit('delete-evidence', {\n currentTask: this.currentTask,\n callback: (success) => {\n if (success) {\n this.after = null;\n this.fileText = 'Drag and drop files here or';\n this.fileattachments = {};\n this.refreshKey += 1;\n }\n }\n });\n }\n }\n};\n</script>\n<!--\n<style>\n.progress-container {\n margin-bottom: 20px;\n}\n\n.progress-bar {\n background-color: #e9ecef;\n border-radius: 4px;\n height: 10px;\n margin-top: 8px;\n}\n\n.progress-fill {\n background-color: #00a8e8;\n height: 100%;\n border-radius: 4px;\n transition: width 0.3s ease;\n}\n\n.checklist {\n list-style-type: none;\n padding: 0;\n}\n\n.checklist-item {\n display: flex;\n align-items: center;\n padding: 10px 0;\n border-bottom: 1px solid #eee;\n cursor: pointer;\n}\n\n.checkbox {\n margin-right: 15px;\n width: 20px;\n height: 20px;\n border: 2px solid #00a8e8;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.checkbox.checked {\n background-color: #00a8e8;\n color: white;\n}\n\n.task-text {\n flex-grow: 1;\n}\n\n.task-text.completed {\n text-decoration: line-through;\n color: #6c757d;\n}\n\n.status {\n margin-top: 20px;\n font-weight: bold;\n text-align: center;\n}\n\n.reset-button {\n background-color: #005792;\n color: white;\n border: none;\n padding: 8px 16px;\n border-radius: 4px;\n cursor: pointer;\n margin-top: 20px;\n font-weight: bold;\n}\n\n.btn-outline-custom {\n color: #005792;\n /* your custom text color */\n border: 2px solid #005792;\n /* your custom border color */\n background-color: transparent;\n padding: 8px 16px;\n border-radius: 4px;\n font-weight: 500;\n cursor: pointer;\n transition: background-color 0.3s, color 0.3s;\n}\n\n.btn-outline-custom:hover {\n background-color: #005792;\n /* custom hover background */\n color: white;\n /* text color on hover */\n}\n\n.reset-button:hover {\n background-color: #003d5b;\n}\n\nheader {\n background-color: var(--maitprimary);\n color: white;\n padding: 1rem;\n text-align: center;\n border-radius: 5px 5px 0 0;\n}\n\n/* \n*/\n\n.content {\n background-color: white;\n padding: 20px;\n border-radius: 0 0 5px 5px;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);\n}\n\n.form-section {\n display: none;\n animation: fadeIn 0.5s;\n}\n\n.form-section.active {\n display: block;\n}\n\n.form-row {\n margin-bottom: 15px;\n}\n\n.form-group {\n margin-bottom: 20px;\n}\n\nlabel {\n display: block;\n margin-bottom: 5px;\n font-weight: bold;\n color: var(--dark);\n}\n\ninput,\nselect,\ntextarea {\n width: 100%;\n padding: 10px;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-size: 16px;\n}\n\n.input-group {\n display: flex;\n gap: 10px;\n}\n\n.input-group>div {\n flex: 1;\n}\n\ntextarea {\n height: 120px;\n resize: vertical;\n}\n\n/* \n.btn {\n padding: 10px 20px;\n border-radius: 4px;\n cursor: pointer;\n font-size: 16px;\n font-weight: bold;\n transition: background-color 0.3s;\n}*/\n\n.btn-primary {\n background-color: var(--maitprimary);\n color: white;\n}\n\n.btn-primary:hover {\n background-color: var(--dark);\n}\n\n.btn-success {\n background-color: var(--success);\n color: white;\n}\n\n.btn-success:hover {\n background-color: #219653;\n}\n\n.action-buttons {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n margin-top: 20px;\n}\n\n.status-badge {\n display: inline-block;\n padding: 5px 10px;\n border-radius: 15px;\n font-size: 14px;\n font-weight: bold;\n color: white;\n}\n\n.status-pending {\n background-color: var(--warning);\n}\n\n.status-progress {\n background-color: var(--accent);\n}\n\n.status-completed {\n background-color: var(--success);\n}\n\n.attachment-area {\n border: 2px dashed #ddd;\n padding: 20px;\n text-align: center;\n border-radius: 5px;\n margin-bottom: 20px;\n}\n\n.file-input {\n display: none;\n}\n\n.file-label {\n display: inline-block;\n padding: 10px 20px;\n background-color: var(--accent);\n color: white;\n border-radius: 4px;\n cursor: pointer;\n transition: background-color 0.3s;\n}\n\n.file-label:hover {\n background-color: var(--maitsecondary);\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n\n.form-section h3 {\n margin-top: 30px;\n margin-bottom: 15px;\n color: var(--maitsecondary);\n}\n\n.checkbox-group {\n display: flex;\n flex-wrap: wrap;\n gap: 15px;\n margin-top: 10px;\n}\n\n.checkbox-item {\n display: flex;\n align-items: center;\n gap: 5px;\n}\n\n.checkbox-item input {\n width: auto;\n}\n\n.status-badge {\n padding: 0.3em 0.6em;\n border-radius: 4px;\n color: white;\n font-weight: bold;\n font-size: 0.85rem;\n}\n\n.status-action {\n padding: 0.3em 0.6em;\n border-radius: 4px;\n color: white;\n font-weight: bold;\n font-size: 0.85rem;\n background-color: var(--maitprimary);\n}\n\n.status-badge.overdue {\n background-color: red;\n}\n\n.status-badge.soon {\n background-color: orange;\n}\n\n/* Wrapper layout */\n.task-table-wrapper {\n font-family: 'Inter', sans-serif;\n padding: 1rem;\n}\n\n/* Controls section */\n.table-controls {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 1rem;\n flex-wrap: wrap;\n gap: 1rem;\n}\n\n.filters {\n display: flex;\n gap: 0.5rem;\n flex-wrap: wrap;\n}\n\n.filters button,\n.filters input {\n padding: 0.5rem 1rem;\n border-radius: 6px;\n border: 1px solid #ccc;\n background-color: #f5f5f5;\n font-weight: 500;\n cursor: pointer;\n}\n\n.filters button.active {\n background-color: #002f6c;\n color: white;\n}\n\n.filters input {\n border: 1px solid #bbb;\n}\n\n.filter-badge {\n background-color: #eee;\n color: #333;\n}\n\n/* Print and Add buttons */\n.table-controls>div:last-child button {\n padding: 0.5rem 1rem;\n border: 1px solid var(--maitprimary);\n border-radius: 6px;\n background-color: white;\n color: var(--maitprimary);\n ;\n font-weight: 600;\n cursor: pointer;\n transition: background 0.2s;\n}\n\n.table-controls>div:last-child button:last-child {\n background-color: var(--maitprimary);\n ;\n color: white;\n}\n\n/* Table */\n.task-table {\n width: 100%;\n border-collapse: collapse;\n box-shadow: 0 0 0 1px #ccc;\n}\n\n.task-table thead {\n background-color: var(--maitprimary);\n ;\n color: white;\n}\n\n.task-table th,\n.task-table td {\n padding: 0.75rem;\n text-align: left;\n border-bottom: 1px solid #eee;\n white-space: pre-line;\n /* so \\n works */\n}\n\n.task-table tbody tr:hover {\n background-color: #f9f9f9;\n}\n\n/* Status badges */\n.status-badge {\n padding: 0.3em 0.6em;\n border-radius: 6px;\n font-weight: bold;\n font-size: 0.85rem;\n color: white;\n display: inline-block;\n text-align: center;\n min-width: 90px;\n}\n\n.status-badge.complete {\n background-color: #4dffd0;\n}\n\n.status-badge.soon {\n background-color: #ffa500;\n}\n\n.status-badge.completed {\n background-color: #4caf50;\n}\n\n.delete-btn {\n background: none;\n border: none;\n color: #dc3545;\n cursor: pointer;\n padding: 6px;\n border-radius: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease;\n opacity: 1;\n margin-left: 8px;\n flex-shrink: 0;\n transform: scale(1.1);\n}\n\n.checklist-item:hover .delete-btn {\n opacity: 1;\n}\n\n.delete-btn:hover {\n background-color: #dc3545;\n color: white;\n transform: scale(1.1);\n}\n\n.delete-btn:active {\n transform: scale(0.95);\n}\n\n.print-only-container {\n text-align: center;\n}\n\n.initial-print-btn {\n background: linear-gradient(135deg, #0066cc, #004499);\n color: white;\n border: none;\n padding: 20px 40px;\n font-size: 1.3em;\n border-radius: 12px;\n cursor: pointer;\n transition: all 0.3s ease;\n box-shadow: 0 6px 20px rgba(0, 102, 204, 0.3);\n display: flex;\n align-items: center;\n gap: 15px;\n margin: 0 auto;\n}\n\n.initial-print-btn:hover {\n background: linear-gradient(135deg, #004499, #003366);\n transform: translateY(-3px);\n box-shadow: 0 8px 25px rgba(0, 102, 204, 0.4);\n}\n\n.initial-print-btn:active {\n transform: translateY(0);\n}\n\n.company-branding {\n margin-bottom: 30px;\n}\n\n.company-logo {\n font-size: 3em;\n font-weight: bold;\n color: #0066cc;\n margin-bottom: 10px;\n}\n\n.company-tagline {\n font-size: 1.1em;\n color: #666;\n}\n\n/* Report Styles - Hidden Initially */\n.report-container {\n display: none;\n max-width: 900px;\n margin: 0 auto;\n background: white;\n padding: 30px;\n border-radius: 10px;\n box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);\n}\n\n.header {\n text-align: center;\n border-bottom: 3px solid #0066cc;\n padding-bottom: 20px;\n margin-bottom: 30px;\n}\n\n.report-logo {\n font-size: 2.5em;\n font-weight: bold;\n color: #0066cc;\n margin-bottom: 10px;\n}\n\n.report-title {\n font-size: 1.8em;\n color: #333;\n margin: 10px 0;\n}\n\n.report-info {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n gap: 20px;\n margin-bottom: 30px;\n}\n\n.info-box {\n background: #f8f9fa;\n padding: 15px;\n border-radius: 8px;\n border-left: 4px solid #0066cc;\n}\n\n.info-box ul li {\n margin-left: 15px;\n}\n\n.info-label {\n font-weight: bold;\n color: #0066cc;\n margin-bottom: 5px;\n}\n\n.section {\n margin-bottom: 30px;\n}\n\n.section-title {\n font-size: 1.3em;\n font-weight: bold;\n color: #0066cc;\n border-bottom: 2px solid #e9ecef;\n padding-bottom: 10px;\n margin-bottom: 15px;\n}\n\n.task-item {\n background: #f8f9fa;\n margin: 15px 0;\n padding: 20px;\n border-radius: 8px;\n border-left: 4px solid #28a745;\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);\n}\n\n.task-item.pending {\n border-left-color: #ffc107;\n}\n\n.task-item.overdue {\n border-left-color: #dc3545;\n}\n\n.task-item.in-progress {\n border-left-color: #17a2b8;\n}\n\n.task-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: 15px;\n flex-wrap: wrap;\n gap: 10px;\n}\n\n.task-title {\n font-size: 1.2em;\n font-weight: bold;\n color: #333;\n}\n\n.task-component {\n font-size: 0.9em;\n color: #666;\n margin-top: 5px;\n}\n\n.status-badge {\n display: inline-block;\n padding: 6px 12px;\n border-radius: 20px;\n font-size: 0.8em;\n font-weight: bold;\n text-transform: uppercase;\n}\n\n.status-completed {\n background: #d4edda;\n color: #155724;\n}\n\n.status-pending {\n background: #fff3cd;\n color: #856404;\n}\n\n.status-overdue {\n background: #f8d7da;\n color: #721c24;\n}\n\n.status-in-progress {\n background: #d1ecf1;\n color: #0c5460;\n}\n\n.task-details {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 15px;\n margin: 15px 0;\n}\n\n.detail-item {\n display: flex;\n flex-direction: column;\n}\n\n.detail-label {\n font-weight: bold;\n font-size: 0.85em;\n color: #0066cc;\n margin-bottom: 3px;\n}\n\n.detail-value {\n font-size: 0.95em;\n color: #333;\n}\n\n.checklist-progress {\n margin-top: 15px;\n}\n\n.progress-bar {\n width: 100%;\n height: 20px;\n background: #e9ecef;\n border-radius: 10px;\n overflow: hidden;\n margin: 10px 0;\n}\n\n.progress-fill {\n height: 100%;\n background: linear-gradient(90deg, #28a745, #20c997);\n transition: width 0.3s ease;\n}\n\n.checklist-items {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 10px;\n margin-top: 10px;\n}\n\n.checklist-item {\n display: flex;\n align-items: center;\n padding: 8px;\n background: white;\n border-radius: 5px;\n font-size: 0.9em;\n}\n\n.checklist-icon {\n margin-right: 8px;\n font-size: 1.1em;\n}\n\n.summary-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));\n gap: 15px;\n margin: 20px 0;\n}\n\n.summary-card {\n background: white;\n padding: 20px;\n border-radius: 8px;\n text-align: center;\n border: 2px solid #e9ecef;\n}\n\n.summary-number {\n font-size: 2em;\n font-weight: bold;\n color: #0066cc;\n}\n\n.summary-label {\n font-size: 0.9em;\n color: #666;\n margin-top: 5px;\n}\n\n.signature-section {\n margin-top: 40px;\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 40px;\n}\n\n.signature-box {\n padding-top: 10px;\n text-align: center;\n}\n\n.maintenance-type {\n display: inline-block;\n padding: 4px 8px;\n border-radius: 12px;\n font-size: 0.75em;\n font-weight: bold;\n text-transform: uppercase;\n margin-left: 10px;\n}\n\n.type-corrective {\n background: #fff3cd;\n color: #856404;\n}\n\n.type-preventive {\n background: #d4edda;\n color: #155724;\n}\n\n.type-predictive {\n background: #d1ecf1;\n color: #0c5460;\n}\n\n/* Print Styles */\n@media print {\n body {\n background: white;\n padding: 0;\n display: block;\n }\n\n .print-only-container {\n display: none !important;\n }\n\n .report-container {\n display: block !important;\n box-shadow: none;\n padding: 0;\n margin: 0;\n max-width: none;\n }\n}\n\nnav button {\n background-color: var(--maitsecondary);\n color: white;\n border: none;\n padding: 10px 20px;\n margin: 5px;\n cursor: pointer;\n font-weight: bold;\n border-radius: 3px;\n transition: background-color 0.3s;\n}\n\nnav button:hover,\nnav button.active {\n background-color: var(--maitprimary);\n}\n</style>\n-->","<template>\n <div class=\"activity-logs\">\n <!-- Controls -->\n <div class=\"a-controls\">\n <div class=\"a-search-box\">\n <input type=\"text\" placeholder=\"Search activities, users, or actions...\" :value=\"searchTerm\"\n @input=\"$emit('update:searchTerm', $event.target.value)\" />\n </div>\n <select class=\"filter-select\" :value=\"selectedFilter\"\n @change=\"$emit('update:selectedFilter', $event.target.value)\">\n <option value=\"all\">All Activities</option>\n <option value=\"login\">Login</option>\n <option value=\"logout\">Logout</option>\n <option value=\"create\">Create</option>\n <option value=\"update\">Update</option>\n <option value=\"delete\">Delete</option>\n <option value=\"view\">View</option>\n </select>\n <button class=\"btn btn-primary\" @click=\"$emit('refresh')\">🔄 Refresh</button>\n <button class=\"btn btn-secondary\" @click=\"$emit('download')\">📥 Download Report</button>\n </div>\n\n <!-- Stats -->\n <div class=\"stats-grid\">\n <div class=\"stat-card\">\n <h3>Total Activities</h3>\n <div class=\"value\">{{ totalActivities }}</div>\n </div>\n <div class=\"stat-card\">\n <h3>Today's Activities</h3>\n <div class=\"value\">{{ todayActivities }}</div>\n </div>\n <div class=\"stat-card\">\n <h3>Active Users</h3>\n <div class=\"value\">{{ activeUsers }}</div>\n </div>\n <div class=\"stat-card\">\n <h3>Important</h3>\n <div class=\"badge-danger\">\n Logs are deleted at the end of every month, please download a copy\n </div>\n </div>\n </div>\n\n <!-- Logs Table -->\n <div class=\"logs-container\">\n <div v-if=\"loading\" class=\"loading\">\n <div class=\"spinner\"></div>\n <p>Loading activity logs...</p>\n </div>\n\n <div v-else-if=\"logs.length === 0\" class=\"no-logs\">\n <h3>No activities found</h3>\n <p>Try adjusting your search or filter criteria</p>\n </div>\n\n <div v-else>\n <table class=\"logs-table\">\n <thead>\n <tr>\n <th>Timestamp</th>\n <th>User Name</th>\n <th>Action</th>\n <th>Details</th>\n <th>Section</th>\n </tr>\n </thead>\n <tbody>\n <tr v-for=\"log in paginatedLogs\" :key=\"log.id\">\n <td>{{ formatDate(log.timestamp) }}</td>\n <td>\n <div>{{ log.user_name }}</div>\n <small style=\"color: gray\">{{ log.email }}</small>\n </td>\n <td>\n <span class=\"activity-badge\" :class=\"getBadgeClass(log.action)\">\n {{ log.action }}\n </span>\n </td>\n <td>\n {{ log.details.status }}\n <div v-for=\"(change, key) in log.details.information\" :key=\"key\">\n <strong>{{ key }}: </strong>\n <small style=\"color: gray\">\n {{ change?.from ?? \"\" }} → {{ change?.to ?? change ?? \"\" }}\n </small>\n </div>\n </td>\n <td>{{ log.table_name }}</td>\n </tr>\n </tbody>\n </table>\n\n <!-- Pagination -->\n <div class=\"pagination\">\n <button @click=\"$emit('change-page', currentPage - 1)\" :disabled=\"currentPage === 1\">\n Previous\n </button>\n <button v-for=\"page in totalPages\" :key=\"page\" @click=\"$emit('change-page', page)\"\n :class=\"{ active: currentPage === page }\">\n {{ page }}\n </button>\n <button @click=\"$emit('change-page', currentPage + 1)\" :disabled=\"currentPage === totalPages\">\n Next\n </button>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n name: \"ActivityLogs\",\n props: {\n loading: Boolean,\n searchTerm: String,\n selectedFilter: String,\n logs: Array,\n paginatedLogs: Array,\n totalActivities: Number,\n todayActivities: Number,\n activeUsers: Number,\n totalPages: Number,\n currentPage: Number,\n },\n emits: [\"update:searchTerm\", \"update:selectedFilter\", \"refresh\", \"download\", \"change-page\"],\n methods: {\n formatDate(timestamp) {\n return new Date(timestamp).toLocaleString();\n },\n getBadgeClass(action) {\n const classes = {\n login: \"badge-login\",\n logout: \"badge-logout\",\n create: \"badge-create\",\n update: \"badge-update\",\n delete: \"badge-delete\",\n view: \"badge-view\",\n };\n return classes[action] || \"badge-view\";\n },\n },\n};\n</script>\n\n<style>\n.a-header {\n background: linear-gradient(135deg, var(--dashprimary-color), var(--dashsecondary-color));\n color: white;\n padding: 2rem 0;\n margin-bottom: 2rem;\n border-radius: 12px;\n box-shadow: 0 10px 30px rgba(52, 153, 64, 0.3);\n}\n\n.a-header h1 {\n font-size: 2.5rem;\n font-weight: 700;\n margin-bottom: 0.5rem;\n text-align: center;\n}\n\n.a-header p {\n text-align: center;\n opacity: 0.9;\n font-size: 1.1rem;\n}\n\n.a-controls {\n display: flex;\n gap: 1rem;\n margin-bottom: 2rem;\n flex-wrap: wrap;\n align-items: center;\n}\n\n.a-search-box {\n flex: 1;\n min-width: 250px;\n position: relative;\n}\n\n.a-search-box input {\n width: 100%;\n padding: 12px 16px;\n border: 2px solid #e0e0e0;\n border-radius: 8px;\n font-size: 1rem;\n transition: all 0.3s ease;\n}\n\n.a-search-box input:focus {\n outline: none;\n border-color: var(--dashsecondary-color);\n box-shadow: 0 0 0 3px rgba(52, 153, 64, 0.1);\n}\n\n.filter-select {\n padding: 12px 16px;\n border: 2px solid #e0e0e0;\n border-radius: 8px;\n font-size: 1rem;\n background: white;\n cursor: pointer;\n transition: all 0.3s ease;\n}\n\n.filter-select:focus {\n outline: none;\n border-color: var(--dashsecondary-color);\n box-shadow: 0 0 0 3px rgba(52, 153, 64, 0.1);\n}\n\n.btn {\n padding: 12px 24px;\n border-radius: 8px;\n font-size: 1rem;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.3s ease;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.btn-primary {\n background: var(--primary);\n color: white;\n}\n\n.btn-primary:hover {\n background: var(--primary-dark);\n transform: translateY(-1px);\n box-shadow: 0 4px 12px rgba(52, 153, 64, 0.3);\n}\n\n.btn-secondary {\n background: var(--secondary);\n color: var(--dark);\n}\n\n.btn-secondary:hover {\n background: #e6a200;\n transform: translateY(-1px);\n box-shadow: 0 4px 12px rgba(244, 180, 0, 0.3);\n}\n\n.stats-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n gap: 1.5rem;\n margin-bottom: 2rem;\n}\n\n.stat-card {\n background: white;\n padding: 1.5rem;\n border-radius: 12px;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);\n transition: transform 0.3s ease;\n}\n\n.stat-card:hover {\n transform: translateY(-2px);\n}\n\n.stat-card h3 {\n color: var(--gray);\n font-size: 0.9rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin-bottom: 0.5rem;\n}\n\n.stat-card .value {\n font-size: 2rem;\n font-weight: 700;\n color: var(--dashsecondary-color);\n}\n\n.logs-container {\n background: white;\n border-radius: 12px;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);\n overflow: hidden;\n}\n\n.logs-header {\n background: var(--light);\n padding: 1.5rem;\n border-bottom: 1px solid #e0e0e0;\n}\n\n.logs-header h2 {\n color: var(--dark);\n font-size: 1.3rem;\n font-weight: 600;\n}\n\n.logs-table {\n width: 100%;\n border-collapse: collapse;\n}\n\n.logs-table th,\n.logs-table td {\n padding: 1rem;\n text-align: left;\n border-bottom: 1px solid #f0f0f0;\n}\n\n.logs-table th {\n background: var(--light);\n font-weight: 600;\n color: var(--dark);\n font-size: 0.9rem;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.logs-table tr:hover {\n background: #f8f9fa;\n}\n\n.activity-badge {\n padding: 4px 12px;\n border-radius: 20px;\n font-size: 0.8rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.badge-login {\n background: var(--success);\n color: white;\n}\n\n.badge-logout {\n background: var(--gray);\n color: white;\n}\n\n.badge-create {\n background: var(--dashprimary-color);\n color: white;\n}\n\n.badge-update {\n background: var(--warning);\n color: white;\n}\n\n.badge-delete {\n background: var(--danger);\n color: white;\n}\n\n.badge-danger {\n color: var(--danger);\n}\n\n.badge-view {\n background: var(--maitsecondary);\n color: white;\n}\n\n.pagination {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 0.5rem;\n padding: 1.5rem;\n background: var(--light);\n}\n\n.pagination button {\n padding: 8px 12px;\n border: 1px solid #e0e0e0;\n background: white;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.3s ease;\n}\n\n.pagination button:hover {\n background: var(--primary);\n color: white;\n border-color: var(--primary);\n}\n\n.pagination button.active {\n background: var(--primary);\n color: white;\n border-color: var(--primary);\n}\n\n.pagination button:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.no-logs {\n text-align: center;\n padding: 3rem;\n color: var(--gray);\n}\n\n.no-logs h3 {\n font-size: 1.5rem;\n margin-bottom: 1rem;\n}\n\n.loading {\n text-align: center;\n padding: 3rem;\n color: var(--gray);\n}\n\n.spinner {\n border: 3px solid #f3f3f3;\n border-top: 3px solid var(--primary);\n border-radius: 50%;\n width: 40px;\n height: 40px;\n animation: spin 1s linear infinite;\n margin: 0 auto 1rem;\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}\n\n@media (max-width: 768px) {\n .a-controls {\n flex-direction: column;\n align-items: stretch;\n }\n\n .a-search-box {\n min-width: 100%;\n }\n\n .stats-grid {\n grid-template-columns: 1fr;\n }\n\n .logs-table {\n font-size: 0.9rem;\n }\n\n .logs-table th,\n .logs-table td {\n padding: 0.5rem;\n }\n}\n</style>","<template>\n <div class=\"crew-management\">\n <!-- Wave background -->\n <div class=\"wave-bg\" v-if=\"config.showWaveBackground\"></div>\n\n <div class=\"crew-section\">\n <div class=\"crew-section-header\">\n <h4 class=\"crew-subhead\">{{ sectionTitle }}</h4>\n <div class=\"header-actions\">\n <button class=\"btn btn-secondary\" @click=\"handleToggleGuestForm\" v-if=\"canAddCrew\">\n {{ showGuestForm ? 'Cancel' : '+ Check-in Guest' }}\n </button>\n <button class=\"btn btn-primary\" @click=\"handleToggleAddForm\" v-if=\"canAddCrew\">\n {{ showAddForm ? 'Cancel' : '+ Add Crew Member' }}\n </button>\n </div>\n </div>\n\n <!-- Personnel Onboard Summary -->\n <div class=\"personnel-summary\" v-if=\"!showAddForm && !showGuestForm && !showTimesheet\">\n <div class=\"summary-header\">\n <h3><i class=\"bi bi-people-fill\"></i> Personnel Onboard Summary</h3>\n <div class=\"summary-date\">{{ currentDate }}</div>\n </div>\n\n <div class=\"summary-cards\">\n <!-- Total Onboard -->\n <div class=\"summary-card total-card\">\n <div class=\"card-icon\">\n <i class=\"bi bi-people\"></i>\n </div>\n <div class=\"card-content\">\n <div class=\"card-value\">{{ totalOnboard }}</div>\n <div class=\"card-label\">Total Onboard</div>\n </div>\n </div>\n\n <!-- Crew Onboard -->\n <div class=\"summary-card crew-card\">\n <div class=\"card-icon\">\n <i class=\"bi bi-person-badge\"></i>\n </div>\n <div class=\"card-content\">\n <div class=\"card-value\">{{ crewOnboard }}</div>\n <div class=\"card-label\">Crew Onboard</div>\n </div>\n </div>\n\n <!-- Guests Onboard -->\n <div class=\"summary-card guest-card-summary\">\n <div class=\"card-icon\">\n <i class=\"bi bi-person-check\"></i>\n </div>\n <div class=\"card-content\">\n <div class=\"card-value\">{{ guestsOnboard }}</div>\n <div class=\"card-label\">Guests Onboard</div>\n </div>\n </div>\n </div>\n\n <!-- Breakdown by Vessel -->\n <div class=\"vessel-breakdown\" v-if=\"Object.keys(personnelByVessel).length > 0\">\n <h4>Breakdown by Vessel</h4>\n <div class=\"vessel-cards\">\n <div v-for=\"(data, vessel) in personnelByVessel\" :key=\"vessel\" class=\"vessel-card\">\n <div class=\"vessel-name\">{{ vessel }}</div>\n <div class=\"vessel-stats\">\n <div class=\"stat-item\">\n <span class=\"stat-label\">Crew:</span>\n <span class=\"stat-value\">{{ data.crew }}</span>\n </div>\n <div class=\"stat-item\">\n <span class=\"stat-label\">Guests:</span>\n <span class=\"stat-value\">{{ data.guests }}</span>\n </div>\n <div class=\"stat-item total-stat\">\n <span class=\"stat-label\">Total:</span>\n <span class=\"stat-value\">{{ data.total }}</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Search and Filter - Hide when form is shown -->\n <div class=\"search-filter\" v-if=\"!showAddForm && !showGuestForm\">\n <input type=\"text\" placeholder=\"Search crew by name or role...\" v-model=\"searchQuery\" @input=\"handleSearch\">\n <select v-model=\"filterStatus\" @change=\"handleFilter\">\n <option value=\"all\">All Statuses</option>\n <option value=\"available\">Available</option>\n <option value=\"onduty\">On Duty</option>\n <option value=\"onboard\">On Board</option>\n <option value=\"assigned\">Assigned</option>\n <option value=\"unavailable\">Unavailable</option>\n </select>\n <button class=\"btn btn-secondary\" @click=\"showTimesheet = !showTimesheet\">\n <i :class=\"showTimesheet ? 'bi bi-grid-3x3-gap' : 'bi bi-table'\"></i>\n {{ showTimesheet ? 'Show Crew Cards' : 'Show Timesheet' }}\n </button>\n </div>\n\n <!-- Loading State - Hide when form is shown -->\n <div v-if=\"loading && !showAddForm && !showGuestForm\" class=\"loading-state\">\n <div class=\"spinner-border text-primary\" role=\"status\">\n <span class=\"visually-hidden\">Loading crew...</span>\n </div>\n <p>Loading crew members...</p>\n </div>\n\n <!-- Consolidated Timesheet View - Hide when form is shown -->\n <div v-else-if=\"showTimesheet && !showAddForm && !showGuestForm\" class=\"timesheet-view\">\n <div class=\"timesheet-header\">\n <h3><i class=\"bi bi-table\"></i> Crew Activity Timesheet</h3>\n <div class=\"timesheet-controls\">\n <select v-model=\"timesheetFilter\" @change=\"filterTimesheet\">\n <option value=\"all\">All Activities</option>\n <option value=\"Embarked\">Embarked Only</option>\n <option value=\"Deboarded\">Deboarded Only</option>\n <option value=\"Assigned\">Assigned Only</option>\n <option value=\"Status Changed\">Status Changes Only</option>\n </select>\n <input type=\"text\" v-model=\"timesheetSearch\" placeholder=\"Search timesheet...\"\n class=\"timesheet-search\">\n </div>\n </div>\n\n <div class=\"timesheet-summary\">\n <div class=\"summary-card\">\n <span class=\"summary-label\">Total Entries:</span>\n <span class=\"summary-value\">{{ filteredTimesheetEntries.length }}</span>\n </div>\n <div class=\"summary-card\">\n <span class=\"summary-label\">Crew Members:</span>\n <span class=\"summary-value\">{{ uniqueCrewCount }}</span>\n </div>\n <div class=\"summary-card\">\n <span class=\"summary-label\">Date Range:</span>\n <span class=\"summary-value\">{{ timesheetDateRange }}</span>\n </div>\n </div>\n\n <div v-if=\"filteredTimesheetEntries.length === 0\" class=\"no-results\">\n No timesheet entries found.\n </div>\n\n <div v-else class=\"timesheet-table-container\">\n <table class=\"timesheet-table\">\n <thead>\n <tr>\n <th @click=\"sortTimesheet('timestamp')\">\n Date/Time\n <i class=\"bi bi-arrow-down-up\"></i>\n </th>\n <th @click=\"sortTimesheet('crewName')\">\n Crew Member\n <i class=\"bi bi-arrow-down-up\"></i>\n </th>\n <th @click=\"sortTimesheet('role')\">\n Role\n <i class=\"bi bi-arrow-down-up\"></i>\n </th>\n <th @click=\"sortTimesheet('action')\">\n Action\n <i class=\"bi bi-arrow-down-up\"></i>\n </th>\n <th>Vessel</th>\n <th>Duration</th>\n <th>Notes</th>\n </tr>\n </thead>\n <tbody>\n <tr v-for=\"entry in filteredTimesheetEntries\" :key=\"entry.uniqueId\"\n :class=\"getTimesheetRowClass(entry.action)\">\n <td class=\"timestamp-cell\">{{ formatLogDate(entry.timestamp) }}</td>\n <td class=\"crew-name-cell\">\n <strong>{{ entry.crewName }}</strong>\n </td>\n <td class=\"role-cell\">{{ entry.role }}</td>\n <td class=\"action-cell\">\n <span :class=\"['action-badge', getLogActionClass(entry.action)]\">\n <i :class=\"getLogIcon(entry.action)\"></i>\n {{ entry.action }}\n </span>\n </td>\n <td class=\"vessel-cell\">{{ entry.vessel || 'N/A' }}</td>\n <td class=\"duration-cell\">{{ entry.duration ? entry.duration + ' days' : 'N/A' }}</td>\n <td class=\"notes-cell\">{{ entry.notes || '-' }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n\n <!-- Crew Grid - Hide when form is shown -->\n <div class=\"crew-grid\" v-else-if=\"filteredCrew.length > 0 && !showAddForm && !showGuestForm\">\n <div v-for=\"member in filteredCrew\" :key=\"member.id\" class=\"crew-card\"\n :class=\"{ 'unavailable': member.status === 'unavailable', 'guest-card': member.role === 'guest' }\">\n <div :class=\"['crew-status-badge', getStatusClass(member.status)]\">\n {{ formatStatus(member.status) }}\n </div>\n\n <div class=\"crew-name\">{{ member.name }}</div>\n <div class=\"crew-role\">{{ member.role === 'guest' ? 'Guest' : member.role }}</div>\n\n <!-- Certifications - Only show for non-guests -->\n <div class=\"crew-certifications\" v-if=\"member.role !== 'guest'\">\n <div v-for=\"cert in getApprovedCertifications(member)\" :key=\"cert.name\" class=\"certification-tag\"\n :class=\"getCertificationClass(cert.expiryDate)\" @click=\"handleViewCertification(cert, member)\">\n {{ cert.name }}\n </div>\n <!-- Optional: Show pending certifications count -->\n <div v-if=\"getPendingCertificationsCount(member) > 0\" class=\"certification-tag text-muted\">\n <i class=\"bi bi-clock-history\"></i> {{ getPendingCertificationsCount(member) }} pending\n </div>\n <i class=\"bi bi-patch-plus-fill icon\" @click=\"handleAddCertification(member)\"\n v-if=\"canEditCrew\"></i>\n </div>\n\n <!-- Crew Details - Different for guests -->\n <div v-if=\"member.role === 'guest'\">\n <div class=\"crew-availability\">\n <strong>Arrival Date:</strong> {{ member.nextShift || 'Not Recorded' }}\n </div>\n <div class=\"crew-availability\">\n <strong>Expected Days Onboard:</strong> {{ member.onBoard || 'Not Specified' }}\n </div>\n <div class=\"crew-availability\">\n <strong>Days Onboard:</strong> {{ getGuestDaysOnboard(member) }}\n </div>\n </div>\n <div v-else>\n <div class=\"crew-availability\">\n <strong>Embarkation Date:</strong> {{ getEmbarkationDate(member) }}\n </div>\n <div class=\"crew-availability\">\n <strong>Expected Days Onboard:</strong> {{ member.onBoard || 'Not Scheduled' }}\n </div>\n <div class=\"crew-availability\">\n <strong>Days Onboard:</strong> {{ getDaysOnboard(member) }}\n </div>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"action-buttons\">\n <div v-if=\"member.vessel\" class=\"status-available crew-availability vcard\">\n Vessel: {{ member.vessel }}\n </div>\n <div v-else class=\"status-unavailable crew-availability vcard\">\n Vessel: Unassigned\n </div>\n\n <!-- Guest-specific actions -->\n <button class=\"btn btn-warning\" @click=\"handleCheckoutGuest(member)\"\n v-if=\"member.role === 'guest' && member.status === 'onboard'\">\n Check Out\n </button>\n\n <!-- Crew-specific actions -->\n <template v-if=\"member.role !== 'guest'\">\n <!-- Available: Show Assign Shift button -->\n <button class=\"btn btn-primary\" @click=\"handleAssignShift(member)\"\n v-if=\"canAssignShift && member.status === 'available'\">\n Assign Shift\n </button>\n <!-- On Duty: Show Check In button -->\n <button class=\"btn btn-success\" @click=\"handleCheckinCrew(member)\"\n v-if=\"canDeboardCrew && member.status === 'onduty'\">\n Check In\n </button>\n <!-- Onboard: Show Deboard button -->\n <button class=\"btn btn-warning\" @click=\"handleDeboardCrew(member)\"\n v-if=\"canDeboardCrew && member.status === 'onboard'\">\n Deboard\n </button>\n </template>\n <!-- Unavailable & Assigned: No buttons -->\n </div>\n\n <!-- Crew Log Button and Delete Icon -->\n <div class=\"crew-footer\">\n <div class=\"crew-log-toggle\" v-if=\"member.log && member.log.length > 0\">\n <button class=\"btn btn-link btn-sm log-toggle-btn\" @click=\"toggleCrewLog(member.id)\">\n <i class=\"bi bi-clock-history\"></i> View Log ({{ member.log.length }})\n </button>\n </div>\n <i class=\"bi bi-trash icon delete-icon\" @click=\"handleDeleteCrew(member)\" v-if=\"canDeleteCrew\"></i>\n </div>\n\n <!-- Crew Log Display -->\n <div v-if=\"expandedLogs.includes(member.id)\" class=\"crew-log\">\n <h4>Crew Activity Log</h4>\n <div v-for=\"(entry, index) in member.log\" :key=\"index\" class=\"log-entry\">\n <div class=\"log-date\">{{ formatLogDate(entry.timestamp) }}</div>\n <div class=\"log-action\" :class=\"getLogActionClass(entry.action)\">\n <i :class=\"getLogIcon(entry.action)\"></i>\n {{ entry.action }}\n </div>\n <div class=\"log-details\">\n <span v-if=\"entry.vessel\">Vessel: {{ entry.vessel }}</span>\n <span v-if=\"entry.duration\"> | Duration: {{ entry.duration }} days</span>\n </div>\n <div v-if=\"entry.notes\" class=\"log-notes\">{{ entry.notes }}</div>\n </div>\n </div>\n\n </div>\n </div>\n\n <!-- No Results - Hide when form is shown -->\n <div v-else-if=\"!loading && !showTimesheet && !showAddForm && !showGuestForm\" class=\"no-results\">\n {{ crew.length === 0 ? 'No crew members found.' : 'No crew members found matching your search criteria.' }}\n </div>\n\n <!-- Add Crew Form -->\n <div class=\"add-crew-form\" v-if=\"showAddForm\">\n <h2>Add New Crew Member</h2>\n\n <!-- Basic Information -->\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"crew-name\">Full Name *</label>\n <input type=\"text\" id=\"crew-name\" v-model=\"newCrew.name\" :class=\"{ 'error': formErrors.name }\">\n <div v-if=\"formErrors.name\" class=\"error-message\">{{ formErrors.name }}</div>\n </div>\n <div class=\"form-group\">\n <label for=\"crew-role\">Role/Position *</label>\n <select id=\"crew-role\" v-model=\"newCrew.role\">\n <option v-for=\"role in availableRoles\" :key=\"role\" :value=\"role\">\n {{ role }}\n </option>\n <option value=\"Other\">Other</option>\n </select>\n <input v-if=\"newCrew.role === 'Other'\" type=\"text\" placeholder=\"Enter custom role\"\n v-model=\"newCrew.customRole\" style=\"margin-top: 8px;\">\n </div>\n </div>\n\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"crew-email\">Email Address *</label>\n <input type=\"email\" id=\"crew-email\" v-model=\"newCrew.email\" :class=\"{ 'error': formErrors.email }\">\n <div v-if=\"formErrors.email\" class=\"error-message\">{{ formErrors.email }}</div>\n </div>\n </div>\n\n <!-- Certifications Section \n <div class=\"certification-section\">\n <h3>Certifications</h3>\n <div v-for=\"(cert, index) in newCrew.certifications\" :key=\"index\" class=\"certification-entry\">\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label>Certification Name *</label>\n <input type=\"text\" v-model=\"cert.name\" placeholder=\"Enter certification name\">\n </div>\n <div class=\"form-group\">\n <label>Expiry Date *</label>\n <input type=\"date\" v-model=\"cert.expiryDate\">\n </div>\n <div class=\"form-group\">\n <label>Certificate Image *</label>\n <div class=\"image-upload-wrapper\">\n <input type=\"file\" :id=\"'cert-image-' + index\"\n @change=\"handleCertImageUpload($event, index)\" accept=\"image/*,.pdf\"\n class=\"file-input\">\n <label :for=\"'cert-image-' + index\" class=\"file-input-label\">\n <i class=\"bi bi-cloud-upload\"></i>\n {{ cert.imagePreview ? 'Change File' : 'Upload File' }}\n </label>\n <div v-if=\"cert.imagePreview\" class=\"image-preview\">\n <img v-if=\"cert.imageType !== 'pdf'\" :src=\"cert.imagePreview\"\n alt=\"Certificate preview\">\n <div v-else class=\"pdf-preview\">\n <i class=\"bi bi-file-pdf\"></i>\n <span>{{ cert.imageName }}</span>\n </div>\n <button type=\"button\" class=\"btn-remove-image\" @click=\"removeCertImage(index)\">\n <i class=\"bi bi-x-circle\"></i>\n </button>\n </div>\n <small v-if=\"cert.imageName\" class=\"file-name\">{{ cert.imageName }}</small>\n </div>\n </div>\n <div class=\"form-group\" style=\"display: flex; align-items: flex-end;\">\n <button type=\"button\" class=\"btn btn-danger btn-sm\" @click=\"removeCertification(index)\"\n v-if=\"newCrew.certifications.length > 1\">\n Remove\n </button>\n </div>\n </div>\n </div>\n\n <button type=\"button\" class=\"btn btn-secondary btn-sm\" @click=\"addCertificationEntry\">\n + Add More Certification\n </button>\n </div>\n -->\n\n <!-- Notes -->\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"crew-notes\">Notes</label>\n <textarea id=\"crew-notes\" rows=\"3\" v-model=\"newCrew.notes\"></textarea>\n </div>\n </div>\n\n <!-- Form Actions -->\n <div class=\"form-actions\">\n <button class=\"btn btn-secondary\" @click=\"handleCancelForm\">Cancel</button>\n <button class=\"btn btn-primary\" @click=\"handleAddCrewMember\">Add Crew Member</button>\n </div>\n </div>\n\n <!-- Guest Check-in Form -->\n <div class=\"add-crew-form\" v-if=\"showGuestForm\">\n <h2>Check-in Guest</h2>\n\n <!-- Basic Information -->\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"guest-name\">Full Name *</label>\n <input type=\"text\" id=\"guest-name\" v-model=\"newGuest.name\"\n :class=\"{ 'error': guestFormErrors.name }\">\n <div v-if=\"guestFormErrors.name\" class=\"error-message\">{{ guestFormErrors.name }}</div>\n </div>\n <div class=\"form-group\">\n <label for=\"guest-email\">Email Address</label>\n <input type=\"email\" id=\"guest-email\" v-model=\"newGuest.email\">\n </div>\n </div>\n\n <!-- Vessel Selection - Only show when not on a specific vessel page -->\n <div class=\"form-row\" v-if=\"!vesselName\">\n <div class=\"form-group\">\n <label for=\"guest-vessel\">Vessel *</label>\n <select id=\"guest-vessel\" v-model=\"newGuest.vessel\" :class=\"{ 'error': guestFormErrors.vessel }\">\n <option value=\"\">Select a vessel</option>\n <option v-for=\"vessel in availableVessels\" :key=\"vessel\" :value=\"vessel\">\n {{ vessel }}\n </option>\n </select>\n <div v-if=\"guestFormErrors.vessel\" class=\"error-message\">{{ guestFormErrors.vessel }}</div>\n </div>\n </div>\n\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"guest-arrival\">Arrival Date *</label>\n <input type=\"date\" id=\"guest-arrival\" v-model=\"newGuest.arrivalDate\"\n :class=\"{ 'error': guestFormErrors.arrivalDate }\">\n <div v-if=\"guestFormErrors.arrivalDate\" class=\"error-message\">{{ guestFormErrors.arrivalDate }}\n </div>\n </div>\n <div class=\"form-group\">\n <label for=\"guest-expected-days\">Expected Days Onboard *</label>\n <input type=\"number\" id=\"guest-expected-days\" v-model=\"newGuest.expectedDays\" min=\"1\"\n :class=\"{ 'error': guestFormErrors.expectedDays }\">\n <div v-if=\"guestFormErrors.expectedDays\" class=\"error-message\">{{ guestFormErrors.expectedDays }}\n </div>\n </div>\n </div>\n\n <!-- Notes -->\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"guest-notes\">Notes</label>\n <textarea id=\"guest-notes\" rows=\"3\" v-model=\"newGuest.notes\"\n placeholder=\"Purpose of visit, company affiliation, etc.\"></textarea>\n </div>\n </div>\n\n <!-- Form Actions -->\n <div class=\"form-actions\">\n <button class=\"btn btn-secondary\" @click=\"handleCancelGuestForm\">Cancel</button>\n <button class=\"btn btn-primary\" @click=\"handleCheckinGuest\">Check-in Guest</button>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'CrewManagement',\n\n props: {\n crew: {\n type: Array,\n required: true,\n default: () => []\n },\n vesselName: {\n type: String,\n default: ''\n },\n currentCompanyId: {\n type: String,\n required: true,\n default: ''\n },\n userProfile: {\n type: Object,\n default: () => ({ role: 'viewer' })\n },\n loading: {\n type: Boolean,\n default: false\n },\n availableRoles: {\n type: Array,\n default: () => ['Captain', 'First Officer', 'Engineer', 'Deckhand', 'Mechanic', 'Cook']\n },\n config: {\n type: Object,\n default: () => ({\n showWaveBackground: true,\n enableAdd: true,\n enableEdit: true,\n enableDelete: true,\n enableAssignShift: true,\n enableCertificationManagement: true\n })\n }\n },\n\n emits: [\n 'crew-add',\n 'crew-edit',\n 'crew-delete',\n 'view-pending-certifications',\n 'crew-assign-shift',\n 'crew-deboard',\n 'crew-checkin',\n 'crew-add-certification',\n 'crew-view-certification',\n 'search-changed',\n 'filter-changed',\n 'access-denied',\n 'upload-cert-image',\n 'guest-checkin',\n 'guest-checkout'\n ],\n\n data() {\n return {\n searchQuery: '',\n filterStatus: 'all',\n showAddForm: false,\n showGuestForm: false,\n formErrors: {},\n guestFormErrors: {},\n expandedLogs: [],\n showTimesheet: false,\n timesheetFilter: 'all',\n timesheetSearch: '',\n timesheetSortKey: 'timestamp',\n timesheetSortOrder: 'desc',\n newCrew: {\n name: '',\n role: 'Deckhand',\n customRole: '',\n status: 'available',\n nextShift: '',\n certifications: [{\n name: '',\n expiryDate: '',\n imageFile: null,\n imagePreview: null,\n imageName: '',\n imageType: ''\n }],\n notes: '',\n email: '',\n onBoard: ''\n },\n newGuest: {\n name: '',\n email: '',\n vessel: '',\n arrivalDate: '',\n expectedDays: '',\n notes: ''\n }\n }\n },\n\n computed: {\n sectionTitle() {\n return this.vesselName ? `Current Crew for ${this.vesselName}` : 'All Fleet Crew'\n },\n\n getApprovedCertifications() {\n return (member) => {\n if (!member.certifications || member.certifications.length === 0) {\n return []\n }\n\n return member.certifications.filter(cert => {\n // If no verifications exist, certificate is not approved by anyone\n if (!cert.verifications || cert.verifications.length === 0) {\n return false\n }\n\n // Find verification for current company\n const companyVerification = cert.verifications.find(\n v => v.companyId === this.currentCompanyId\n )\n\n // Only show if approved by this company\n return companyVerification && companyVerification.status === 'approved'\n })\n }\n },\n\n filteredCrew() {\n return this.crew.filter(member => {\n const matchesSearch = this.searchQuery === '' ||\n member.name.toLowerCase().includes(this.searchQuery.toLowerCase()) ||\n member.role.toLowerCase().includes(this.searchQuery.toLowerCase()) ||\n (member.vessel && member.vessel.toLowerCase().includes(this.searchQuery.toLowerCase()))\n\n const matchesStatus = this.filterStatus === 'all' || member.status === this.filterStatus\n\n return matchesSearch && matchesStatus\n })\n },\n\n allTimesheetEntries() {\n const entries = []\n\n this.crew.forEach(member => {\n if (member.log && member.log.length > 0) {\n member.log.forEach((logEntry, index) => {\n entries.push({\n ...logEntry,\n crewName: member.name,\n role: member.role,\n crewId: member.id,\n uniqueId: `${member.id}-${index}`\n })\n })\n }\n })\n\n return entries.sort((a, b) => {\n const dateA = new Date(a.timestamp)\n const dateB = new Date(b.timestamp)\n return this.timesheetSortOrder === 'desc' ? dateB - dateA : dateA - dateB\n })\n },\n\n filteredTimesheetEntries() {\n let filtered = this.allTimesheetEntries\n\n if (this.timesheetFilter !== 'all') {\n filtered = filtered.filter(entry => entry.action === this.timesheetFilter)\n }\n\n if (this.timesheetSearch) {\n const search = this.timesheetSearch.toLowerCase()\n filtered = filtered.filter(entry =>\n entry.crewName.toLowerCase().includes(search) ||\n entry.role.toLowerCase().includes(search) ||\n entry.action.toLowerCase().includes(search) ||\n (entry.vessel && entry.vessel.toLowerCase().includes(search)) ||\n (entry.notes && entry.notes.toLowerCase().includes(search))\n )\n }\n\n return this.sortTimesheetEntries(filtered)\n },\n\n uniqueCrewCount() {\n const uniqueCrewIds = new Set(this.filteredTimesheetEntries.map(e => e.crewId))\n return uniqueCrewIds.size\n },\n\n timesheetDateRange() {\n if (this.filteredTimesheetEntries.length === 0) return 'N/A'\n\n const dates = this.filteredTimesheetEntries.map(e => new Date(e.timestamp))\n const minDate = new Date(Math.min(...dates))\n const maxDate = new Date(Math.max(...dates))\n\n const formatDate = (date) => date.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' })\n\n return `${formatDate(minDate)} - ${formatDate(maxDate)}`\n },\n\n canAddCrew() {\n return this.config.enableAdd && this.hasPermission('add')\n },\n\n canEditCrew() {\n return this.config.enableEdit && this.hasPermission('edit')\n },\n\n canDeleteCrew() {\n return this.config.enableDelete && this.hasPermission('delete')\n },\n\n canAssignShift() {\n return this.config.enableAssignShift && this.hasPermission('assign')\n },\n\n canDeboardCrew() {\n return this.config.enableAssignShift && this.hasPermission('assign')\n },\n\n // Current date for display\n currentDate() {\n return new Date().toLocaleDateString('en-US', {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric'\n })\n },\n\n // Total personnel onboard\n totalOnboard() {\n return this.crew.filter(member => member.status === 'onboard').length\n },\n\n // Crew members onboard (excluding guests)\n crewOnboard() {\n return this.crew.filter(member =>\n member.status === 'onboard' && member.role !== 'guest'\n ).length\n },\n\n // Guests onboard\n guestsOnboard() {\n return this.crew.filter(member =>\n member.status === 'onboard' && member.role === 'guest'\n ).length\n },\n\n // Personnel breakdown by vessel\n personnelByVessel() {\n const breakdown = {}\n\n this.crew.forEach(member => {\n if (member.status === 'onboard' && member.vessel) {\n if (!breakdown[member.vessel]) {\n breakdown[member.vessel] = {\n crew: 0,\n guests: 0,\n total: 0\n }\n }\n\n if (member.role === 'guest') {\n breakdown[member.vessel].guests++\n } else {\n breakdown[member.vessel].crew++\n }\n breakdown[member.vessel].total++\n }\n })\n\n return breakdown\n },\n\n // Get unique vessels from crew data for vessel selector\n availableVessels() {\n const vessels = new Set()\n this.crew.forEach(member => {\n if (member.vessel && member.vessel.trim() !== '') {\n vessels.add(member.vessel)\n }\n })\n return Array.from(vessels).sort()\n }\n },\n\n methods: {\n hasPermission(action) {\n const { role, vessel } = this.userProfile\n const isVessel = vessel === this.vesselName\n\n const permissions = {\n 'owner': ['add', 'edit', 'delete', 'assign', 'view'],\n 'staff': ['add', 'edit', 'assign', 'view'],\n 'captain': ['assign', 'view'],\n 'viewer': ['view']\n }\n\n let rolePermissions = permissions[role] || []\n\n if (role === 'captain' && isVessel) {\n rolePermissions = [...rolePermissions, 'add']\n }\n\n return rolePermissions.includes(action)\n },\n\n /**\n * Get embarkation date based on crew member status\n * Returns N/A if status is not onboard, onduty, or assigned\n * @param {Object} member - The crew member\n * @returns {String} - Embarkation date or 'N/A'\n */\n getEmbarkationDate(member) {\n const validStatuses = ['onboard', 'onduty', 'assigned']\n if (!validStatuses.includes(member.status)) {\n return 'N/A'\n }\n return member.nextShift || 'Not Scheduled'\n },\n\n /**\n * Calculate days onboard from logs\n * Finds the most recent \"Onboard\" action and counts days from that timestamp\n * @param {Object} member - The crew member\n * @returns {String|Number} - Days onboard or 'N/A'\n */\n getDaysOnboard(member) {\n // Only calculate if member is currently onboard\n if (member.status !== 'onboard') {\n return 'N/A'\n }\n\n // Check if logs exist\n if (!member.log || member.log.length === 0) {\n return 'N/A'\n }\n\n // Find the most recent \"Onboard\" action\n // Logs are typically sorted by timestamp, but we'll search from the end to be safe\n let mostRecentOnboard = null\n\n for (let i = member.log.length - 1; i >= 0; i--) {\n if (member.log[i].action === 'Onboard') {\n mostRecentOnboard = member.log[i]\n break\n }\n }\n\n // If no \"Onboard\" action found, return N/A\n if (!mostRecentOnboard || !mostRecentOnboard.timestamp) {\n return 'N/A'\n }\n\n // Calculate days between onboard timestamp and now\n const onboardDate = new Date(mostRecentOnboard.timestamp)\n const today = new Date()\n const diffTime = Math.abs(today - onboardDate)\n const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24))\n\n return diffDays\n },\n\n /**\n * Calculate days onboard for guests from arrival date\n * @param {Object} member - The guest member\n * @returns {String|Number} - Days onboard or 'N/A'\n */\n getGuestDaysOnboard(member) {\n // Check if arrival date (nextShift) exists\n if (!member.nextShift) {\n return 'N/A'\n }\n\n // Only calculate if guest is currently onboard\n if (member.status !== 'onboard') {\n return 'N/A'\n }\n\n // Calculate days between arrival date and now\n const arrivalDate = new Date(member.nextShift)\n const today = new Date()\n const diffTime = Math.abs(today - arrivalDate)\n const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24))\n\n return diffDays\n },\n\n /**\n * Get count of pending certifications for a member\n * @param {Object} member - The crew member\n * @returns {Number} - Count of pending certifications\n */\n getPendingCertificationsCount(member) {\n if (!member.certifications || member.certifications.length === 0) {\n return 0\n }\n\n return member.certifications.filter(cert => {\n if (!cert.verifications || cert.verifications.length === 0) {\n return true // No verifications = pending\n }\n\n const companyVerification = cert.verifications.find(\n v => v.companyId === this.currentCompanyId\n )\n\n // Pending if: no verification OR verification is pending/rejected\n return !companyVerification ||\n companyVerification.status === 'pending'\n }).length\n },\n\n /**\n * Emit event when user clicks on pending certifications\n * This allows parent component to navigate to verification page\n */\n handleViewPendingCertifications(member) {\n this.$emit('view-pending-certifications', {\n memberId: member.id,\n memberName: member.name,\n companyId: this.currentCompanyId\n })\n },\n\n handleToggleAddForm() {\n if (!this.canAddCrew) {\n this.$emit('access-denied', { action: 'add crew', userProfile: this.userProfile })\n return\n }\n this.showAddForm = !this.showAddForm\n if (!this.showAddForm) {\n this.resetForm()\n }\n },\n\n handleToggleGuestForm() {\n if (!this.canAddCrew) {\n this.$emit('access-denied', { action: 'check-in guest', userProfile: this.userProfile })\n return\n }\n this.showGuestForm = !this.showGuestForm\n if (!this.showGuestForm) {\n this.resetGuestForm()\n }\n },\n\n handleCheckinGuest() {\n if (!this.validateGuestForm()) {\n return\n }\n\n const newGuest = {\n name: this.newGuest.name,\n role: 'guest',\n status: 'onboard',\n nextShift: this.newGuest.arrivalDate, // Store arrival date in nextShift\n onBoard: this.newGuest.expectedDays,\n email: this.newGuest.email || '',\n notes: this.newGuest.notes,\n vessel: this.vesselName || this.newGuest.vessel,\n certifications: []\n }\n\n this.$emit('guest-checkin', newGuest)\n this.resetGuestForm()\n this.showGuestForm = false\n },\n\n handleCheckoutGuest(member) {\n if (!this.canDeboardCrew) {\n this.$emit('access-denied', { action: 'check out guest', userProfile: this.userProfile })\n return\n }\n\n let duration = null\n if (member.nextShift) {\n const arrivalDate = new Date(member.nextShift)\n const today = new Date()\n const diffTime = Math.abs(today - arrivalDate)\n duration = Math.ceil(diffTime / (1000 * 60 * 60 * 24))\n }\n\n this.$emit('guest-checkout', { member, duration })\n },\n\n handleCancelGuestForm() {\n this.showGuestForm = false\n this.resetGuestForm()\n },\n\n resetGuestForm() {\n this.newGuest = {\n name: '',\n email: '',\n vessel: '',\n arrivalDate: '',\n expectedDays: '',\n notes: ''\n }\n this.guestFormErrors = {}\n },\n\n validateGuestForm() {\n this.guestFormErrors = {}\n\n if (!this.newGuest.name || this.newGuest.name.trim() === '') {\n this.guestFormErrors.name = 'Guest name is required'\n }\n\n // Require vessel selection if not on a specific vessel page\n if (!this.vesselName && (!this.newGuest.vessel || this.newGuest.vessel.trim() === '')) {\n this.guestFormErrors.vessel = 'Please select a vessel'\n }\n\n if (!this.newGuest.arrivalDate) {\n this.guestFormErrors.arrivalDate = 'Arrival date is required'\n }\n\n if (!this.newGuest.expectedDays || this.newGuest.expectedDays <= 0) {\n this.guestFormErrors.expectedDays = 'Expected days onboard must be at least 1'\n }\n\n if (Object.keys(this.guestFormErrors).length > 0) {\n this.$emit('validation-error', this.guestFormErrors)\n return false\n }\n\n return true\n },\n\n handleSearch() {\n this.$emit('search-changed', this.searchQuery)\n },\n\n handleFilter() {\n this.$emit('filter-changed', this.filterStatus)\n },\n\n filterTimesheet() {\n // Trigger re-computation of filtered entries\n },\n\n sortTimesheet(key) {\n if (this.timesheetSortKey === key) {\n this.timesheetSortOrder = this.timesheetSortOrder === 'asc' ? 'desc' : 'asc'\n } else {\n this.timesheetSortKey = key\n this.timesheetSortOrder = 'asc'\n }\n },\n\n sortTimesheetEntries(entries) {\n const sorted = [...entries]\n\n sorted.sort((a, b) => {\n let valA, valB\n\n switch (this.timesheetSortKey) {\n case 'timestamp':\n valA = new Date(a.timestamp)\n valB = new Date(b.timestamp)\n break\n case 'crewName':\n valA = a.crewName.toLowerCase()\n valB = b.crewName.toLowerCase()\n break\n case 'role':\n valA = a.role.toLowerCase()\n valB = b.role.toLowerCase()\n break\n case 'action':\n valA = a.action.toLowerCase()\n valB = b.action.toLowerCase()\n break\n default:\n return 0\n }\n\n if (valA < valB) return this.timesheetSortOrder === 'asc' ? -1 : 1\n if (valA > valB) return this.timesheetSortOrder === 'asc' ? 1 : -1\n return 0\n })\n\n return sorted\n },\n\n getTimesheetRowClass(action) {\n return `timesheet-row-${action.toLowerCase().replace(/\\s+/g, '-')}`\n },\n\n async handleAddCrewMember() {\n if (!this.validateForm()) {\n return\n }\n\n // Check for incomplete certifications\n const hasIncompleteCert = this.newCrew.certifications.some(cert => {\n const hasName = cert.name.trim() !== ''\n const hasDate = cert.expiryDate !== ''\n const hasImage = cert.imageFile !== null\n\n // If any field is filled but not all, it's incomplete\n return (hasName || hasDate || hasImage) && !(hasName && hasDate && hasImage)\n })\n\n if (hasIncompleteCert) {\n this.$emit('incomplete-certification')\n return\n }\n\n // Filter only complete certifications (all three fields filled)\n const validCertifications = this.newCrew.certifications.filter(cert => {\n return cert.name.trim() !== '' && cert.expiryDate !== '' && cert.imageFile !== null\n })\n\n const finalRole = this.newCrew.role === 'Other' ? this.newCrew.customRole : this.newCrew.role\n\n // Upload all certification images first and get their URLs\n const certificationsWithUrls = await Promise.all(\n validCertifications.map(async (cert, index) => {\n // Emit and wait for the upload to complete\n const uploadResult = await this.uploadCertificationImage(cert.imageFile, this.newCrew.email)\n\n return {\n name: cert.name,\n expiryDate: cert.expiryDate,\n imageName: cert.imageName,\n imageType: cert.imageType,\n imageUrl: uploadResult.publicUrl // Add the public URL here\n }\n })\n )\n\n const newMember = {\n name: this.newCrew.name,\n role: finalRole,\n status: 'unavailable',\n certifications: certificationsWithUrls,\n notes: this.newCrew.notes,\n vessel: this.vesselName,\n email: this.newCrew.email,\n onBoard: this.newCrew.onBoard,\n nextShift: this.newCrew.nextShift\n }\n\n this.$emit('crew-add', newMember)\n this.resetForm()\n this.showAddForm = false\n },\n\n // Add this helper method to handle the upload:\n async uploadCertificationImage(file, email) {\n // Return a promise that resolves when upload completes\n return new Promise((resolve, reject) => {\n this.$emit('upload-cert-image', {\n file,\n email,\n callback: (result) => {\n if (result.error) {\n reject(result.error)\n } else {\n resolve(result)\n }\n }\n })\n })\n },\n\n handleCancelForm() {\n this.showAddForm = false\n this.resetForm()\n },\n\n handleDeleteCrew(member) {\n if (!this.canDeleteCrew) {\n this.$emit('access-denied', { action: 'delete crew', userProfile: this.userProfile })\n return\n }\n\n this.$emit('crew-delete', member)\n },\n\n handleAssignShift(member) {\n if (!this.canAssignShift) {\n this.$emit('access-denied', { action: 'assign shift', userProfile: this.userProfile })\n return\n }\n\n this.$emit('crew-assign-shift', member)\n },\n\n handleDeboardCrew(member) {\n if (!this.canDeboardCrew) {\n this.$emit('access-denied', { action: 'deboard crew', userProfile: this.userProfile })\n return\n }\n\n let duration = null\n if (member.nextShift) {\n const embarkDate = new Date(member.nextShift)\n const today = new Date()\n const diffTime = Math.abs(today - embarkDate)\n duration = Math.ceil(diffTime / (1000 * 60 * 60 * 24))\n }\n\n this.$emit('crew-deboard', { member, duration })\n },\n\n handleCheckinCrew(member) {\n if (!this.canDeboardCrew) {\n this.$emit('access-denied', { action: 'check in crew', userProfile: this.userProfile })\n return\n }\n\n this.$emit('crew-checkin', member)\n },\n\n toggleCrewLog(memberId) {\n const index = this.expandedLogs.indexOf(memberId)\n if (index > -1) {\n this.expandedLogs.splice(index, 1)\n } else {\n this.expandedLogs.push(memberId)\n }\n },\n\n handleAddCertification(member) {\n if (!this.canEditCrew) {\n this.$emit('access-denied', { action: 'add certification', userProfile: this.userProfile })\n return\n }\n\n this.$emit('crew-add-certification', member)\n },\n\n handleViewCertification(certification, member) {\n this.$emit('crew-view-certification', { certification, member })\n },\n\n resetForm() {\n this.newCrew = {\n name: '',\n role: 'Deckhand',\n customRole: '',\n status: 'Unavailable',\n nextShift: '',\n certifications: [{\n name: '',\n expiryDate: '',\n imageFile: null,\n imagePreview: null,\n imageName: '',\n imageType: ''\n }],\n notes: '',\n email: '',\n onBoard: ''\n }\n this.formErrors = {}\n },\n\n validateForm() {\n this.formErrors = {}\n\n const requiredFields = {\n name: 'Full Name',\n email: 'Email Address'\n }\n\n Object.keys(requiredFields).forEach(field => {\n if (!this.newCrew[field] || this.newCrew[field].trim() === '') {\n this.formErrors[field] = `${requiredFields[field]} is required`\n }\n })\n\n if (this.newCrew.email && !this.isValidEmail(this.newCrew.email)) {\n this.formErrors.email = 'Please enter a valid email address'\n }\n\n if (this.newCrew.role === 'Other' && (!this.newCrew.customRole || this.newCrew.customRole.trim() === '')) {\n this.formErrors.customRole = 'Custom role is required when \"Other\" is selected'\n }\n\n // Emit validation errors if any exist\n if (Object.keys(this.formErrors).length > 0) {\n this.$emit('validation-error', this.formErrors)\n return false\n }\n\n return true\n },\n\n isValidEmail(email) {\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/\n return emailRegex.test(email)\n },\n\n addCertificationEntry() {\n this.newCrew.certifications.push({\n name: '',\n expiryDate: '',\n imageFile: null,\n imagePreview: null,\n imageName: '',\n imageType: ''\n })\n },\n\n removeCertification(index) {\n this.newCrew.certifications.splice(index, 1)\n },\n\n handleCertImageUpload(event, index) {\n const file = event.target.files[0]\n if (!file) return\n\n const cert = this.newCrew.certifications[index]\n cert.imageFile = file\n cert.imageName = file.name\n cert.imageType = file.type.includes('pdf') ? 'pdf' : 'image'\n\n // Create preview for images\n if (cert.imageType === 'image') {\n const reader = new FileReader()\n reader.onload = (e) => {\n cert.imagePreview = e.target.result\n }\n reader.readAsDataURL(file)\n } else {\n cert.imagePreview = 'pdf'\n }\n },\n\n removeCertImage(index) {\n const cert = this.newCrew.certifications[index]\n cert.imageFile = null\n cert.imagePreview = null\n cert.imageName = ''\n cert.imageType = ''\n\n // Clear the file input\n const fileInput = document.getElementById('cert-image-' + index)\n if (fileInput) {\n fileInput.value = ''\n }\n },\n\n formatStatus(status) {\n return status ? status.charAt(0).toUpperCase() + status.slice(1) : ''\n },\n\n getStatusClass(status) {\n const statusMap = {\n 'available': 'status-available',\n 'onduty': 'status-onduty',\n 'onboard': 'status-onboard',\n 'unavailable': 'status-unavailable',\n 'assigned': 'status-assigned'\n }\n return statusMap[status] || ''\n },\n\n getCertificationClass(expiryDate) {\n const status = this.getExpiryStatus(expiryDate)\n const classMap = {\n 'expired': 'text-danger',\n 'expiringSoon': 'text-warning',\n 'valid': 'text-success'\n }\n return classMap[status] || ''\n },\n\n getExpiryStatus(dateStr) {\n if (!dateStr) return 'none'\n\n const expiry = new Date(dateStr)\n const today = new Date()\n const oneMonthFromNow = new Date()\n oneMonthFromNow.setMonth(today.getMonth() + 1)\n\n if (expiry <= today) return 'expired'\n if (expiry <= oneMonthFromNow) return 'expiringSoon'\n return 'valid'\n },\n\n formatLogDate(timestamp) {\n if (!timestamp) return ''\n const date = new Date(timestamp)\n return date.toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit'\n })\n },\n\n getLogActionClass(action) {\n const actionMap = {\n 'Embarked': 'log-action-embark',\n 'Deboarded': 'log-action-deboard',\n 'Assigned': 'log-action-assign',\n 'Status Changed': 'log-action-status'\n }\n return actionMap[action] || ''\n },\n\n getLogIcon(action) {\n const iconMap = {\n 'Embarked': 'bi bi-box-arrow-in-right',\n 'Deboarded': 'bi bi-box-arrow-left',\n 'Assigned': 'bi bi-calendar-check',\n 'Status Changed': 'bi bi-arrow-repeat'\n }\n return iconMap[action] || 'bi bi-circle-fill'\n }\n }\n}\n</script>\n\n<style>\n.add-crew-form h2 {\n color: #005792;\n}\n\n.crew-section {\n margin-bottom: 30px;\n}\n\n/* Personnel Summary Styles */\n.personnel-summary {\n background: linear-gradient(135deg, #005792 0%, #00a8e8 100%);\n border-radius: 8px;\n padding: 20px;\n margin-bottom: 25px;\n color: white;\n box-shadow: 0 4px 12px rgba(0, 87, 146, 0.2);\n}\n\n.summary-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n padding-bottom: 15px;\n border-bottom: 2px solid rgba(255, 255, 255, 0.3);\n}\n\n.summary-header h3 {\n margin: 0;\n font-size: 1.4em;\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.summary-date {\n font-size: 0.9em;\n opacity: 0.9;\n}\n\n.summary-cards {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 15px;\n margin-bottom: 25px;\n}\n\n.summary-card {\n background: linear-gradient(135deg, #005792 0%, #00a8e8 100%);\n backdrop-filter: blur(10px);\n border-radius: 8px;\n padding: 20px;\n display: flex;\n align-items: center;\n gap: 15px;\n transition: transform 0.2s, background 0.2s;\n}\n\n.summary-card:hover {\n transform: translateY(-3px);\n background: rgba(255, 255, 255, 0.2);\n}\n\n.card-icon {\n font-size: 2.5em;\n opacity: 0.9;\n}\n\n.card-content {\n flex: 1;\n}\n\n.card-value {\n font-size: 2.5em;\n font-weight: bold;\n line-height: 1;\n margin-bottom: 5px;\n}\n\n.card-label {\n font-size: 0.9em;\n opacity: 0.9;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.total-card {\n background: linear-gradient(135deg, #005792 0%, #00a8e8 100%);\n}\n\n.vessel-breakdown {\n margin-top: 20px;\n}\n\n.vessel-breakdown h4 {\n margin: 0 0 15px 0;\n font-size: 1.1em;\n opacity: 0.95;\n}\n\n.vessel-cards {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n gap: 12px;\n}\n\n.vessel-card {\n background: rgba(255, 255, 255, 0.15);\n backdrop-filter: blur(10px);\n border-radius: 6px;\n padding: 15px;\n border-left: 4px solid rgba(255, 255, 255, 0.5);\n}\n\n.vessel-name {\n font-weight: bold;\n font-size: 1.1em;\n margin-bottom: 10px;\n padding-bottom: 8px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.2);\n}\n\n.vessel-stats {\n display: flex;\n justify-content: space-between;\n gap: 10px;\n}\n\n.stat-item {\n display: flex;\n flex-direction: column;\n gap: 3px;\n}\n\n.stat-label {\n font-size: 0.8em;\n opacity: 0.8;\n}\n\n.stat-value {\n font-size: 1.5em;\n font-weight: bold;\n}\n\n.total-stat {\n border-left: 1px solid rgba(255, 255, 255, 0.3);\n padding-left: 10px;\n}\n\n.total-stat .stat-value {\n color: #ffd700;\n}\n\n\n.crew-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n gap: 20px;\n margin-bottom: 30px;\n align-items: start;\n}\n\n.crew-card {\n background-color: #f8f9fa;\n border-radius: 6px;\n padding: 15px;\n box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);\n border-left: 4px solid #00a8e8;\n position: relative;\n}\n\n.crew-card.unavailable {\n border-left-color: #dc3545;\n opacity: 0.8;\n}\n\n.crew-name {\n font-weight: bold;\n font-size: 1.1em;\n margin-bottom: 5px;\n color: #005792;\n}\n\n.crew-role {\n color: #6c757d;\n font-size: 0.9em;\n margin-bottom: 10px;\n}\n\n.crew-certifications,\n.crew-availability {\n font-size: 0.85em;\n margin: 5px 0;\n}\n\n.certification-tag {\n display: inline-block;\n background-color: #e6f7ff;\n color: #005792;\n border-radius: 4px;\n padding: 2px 8px;\n margin-right: 5px;\n margin-bottom: 5px;\n font-size: 0.85em;\n cursor: pointer;\n}\n\n.certification-tag:hover {\n background-color: #d1f0ff;\n}\n\n.crew-status-badge {\n position: absolute;\n top: 15px;\n right: 15px;\n font-size: 0.75em;\n padding: 3px 8px;\n border-radius: 12px;\n font-weight: bold;\n}\n\n.status-available {\n background-color: #d4edda;\n color: #155724;\n}\n\n.status-unavailable {\n background-color: #f8d7da;\n color: #721c24;\n}\n\n.status-assigned {\n background-color: #ffc107;\n color: #212529;\n}\n\n.status-onduty {\n background-color: #cce5ff;\n color: #004085;\n}\n\n.status-onboard {\n background-color: #d1ecf1;\n color: #0c5460;\n}\n\n.action-buttons {\n display: flex;\n justify-content: space-between;\n margin-top: 15px;\n gap: 5px;\n flex-wrap: wrap;\n}\n\n.btn {\n padding: 6px 12px;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.9em;\n transition: background-color 0.2s;\n border: none;\n}\n\n.btn-primary {\n background-color: #005792;\n color: white;\n}\n\n.btn-primary:hover {\n background-color: #004675;\n}\n\n.btn-secondary {\n background-color: #e9ecef;\n color: #495057;\n}\n\n.btn-secondary:hover {\n background-color: #dde2e6;\n}\n\n.btn-warning {\n background-color: #ffc107;\n color: #212529;\n}\n\n.btn-warning:hover {\n background-color: #e0a800;\n}\n\n.btn-success {\n background-color: #28a745;\n color: white;\n}\n\n.btn-success:hover {\n background-color: #218838;\n}\n\n.btn-danger {\n background-color: #dc3545;\n color: white;\n}\n\n.btn-danger:hover {\n background-color: #c82333;\n}\n\n.btn-link {\n background: none;\n border: none;\n color: #005792;\n text-decoration: none;\n padding: 4px 8px;\n}\n\n.btn-link:hover {\n text-decoration: underline;\n}\n\n.btn-sm {\n font-size: 0.8em;\n padding: 4px 8px;\n}\n\n.crew-footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 10px;\n padding-top: 10px;\n border-top: 1px solid #e9ecef;\n}\n\n.crew-log-toggle {\n flex: 1;\n}\n\n.log-toggle-btn {\n text-align: left;\n padding: 0;\n display: flex;\n align-items: center;\n gap: 5px;\n}\n\n.crew-log {\n margin-top: 15px;\n padding: 10px;\n background-color: #ffffff;\n border-radius: 4px;\n border: 1px solid #dee2e6;\n max-height: 300px;\n overflow-y: auto;\n}\n\n.crew-log h4 {\n margin: 0 0 10px 0;\n font-size: 0.9em;\n color: #005792;\n border-bottom: 1px solid #dee2e6;\n padding-bottom: 5px;\n}\n\n.log-entry {\n padding: 8px;\n margin-bottom: 8px;\n border-left: 3px solid #005792;\n background-color: #f8f9fa;\n border-radius: 3px;\n}\n\n.log-entry:last-child {\n margin-bottom: 0;\n}\n\n.log-date {\n font-size: 0.75em;\n color: #6c757d;\n margin-bottom: 3px;\n}\n\n.log-action {\n font-weight: bold;\n font-size: 0.85em;\n margin-bottom: 3px;\n display: flex;\n align-items: center;\n gap: 5px;\n}\n\n.log-action-embark {\n color: #28a745;\n}\n\n.log-action-deboard {\n color: #dc3545;\n}\n\n.log-action-assign {\n color: #007bff;\n}\n\n.log-action-status {\n color: #ffc107;\n}\n\n.log-details {\n font-size: 0.8em;\n color: #495057;\n}\n\n.log-notes {\n font-size: 0.8em;\n color: #6c757d;\n font-style: italic;\n margin-top: 3px;\n}\n\n.search-filter {\n display: flex;\n margin-bottom: 20px;\n gap: 10px;\n align-items: center;\n}\n\n.search-filter input,\n.search-filter select {\n padding: 8px 12px;\n border: 1px solid #ced4da;\n border-radius: 4px;\n}\n\n.search-filter input {\n flex-grow: 1;\n}\n\n.search-filter select {\n min-width: 150px;\n}\n\n.add-crew-form {\n background-color: #f8f9fa;\n padding: 20px;\n border-radius: 6px;\n margin-top: 30px;\n}\n\n.form-row {\n display: flex;\n flex-wrap: wrap;\n gap: 15px;\n margin-bottom: 15px;\n}\n\n.form-group {\n flex: 1;\n min-width: 200px;\n}\n\n.form-group label {\n display: block;\n margin-bottom: 5px;\n font-weight: bold;\n color: #495057;\n}\n\n.text-danger {\n color: red;\n font-weight: bolder;\n}\n\n.text-warning {\n color: orange;\n font-weight: bolder;\n}\n\n.text-success {\n color: green;\n font-weight: bolder;\n}\n\n.icon {\n font-size: 20px;\n cursor: pointer;\n color: #005792;\n}\n\n.icon:hover {\n color: #003d5c;\n}\n\n.delete-icon {\n font-size: 20px;\n cursor: pointer;\n color: #dc3545;\n position: static;\n margin: 0;\n}\n\n.delete-icon:hover {\n color: #c82333;\n}\n\n.form-group input,\n.form-group select,\n.form-group textarea {\n width: 100%;\n padding: 8px;\n border: 1px solid #ced4da;\n border-radius: 4px;\n}\n\n.form-group input.error {\n border-color: #dc3545;\n}\n\n.error-message {\n color: #dc3545;\n font-size: 0.85em;\n margin-top: 5px;\n}\n\n.form-actions {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n margin-top: 20px;\n}\n\n.no-results {\n text-align: center;\n padding: 40px 20px;\n color: #6c757d;\n font-size: 1.1em;\n}\n\n.crew-section-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 15px;\n}\n\n.crew-section-header h2 {\n color: #005792;\n margin: 0;\n}\n\n.header-actions {\n display: flex;\n gap: 10px;\n}\n\n.guest-card {\n border-left-color: #ffc107 !important;\n background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%);\n}\n\n.guest-card .crew-role {\n color: #17a2b8;\n font-weight: 600;\n text-transform: uppercase;\n font-size: 0.85em;\n}\n\n.vcard {\n border-radius: 6px;\n padding: 5px;\n}\n\n.loading-state {\n text-align: center;\n padding: 40px 20px;\n}\n\n.spinner-border {\n width: 3rem;\n height: 3rem;\n border: 0.25em solid currentColor;\n border-right-color: transparent;\n border-radius: 50%;\n display: inline-block;\n animation: spinner-border 0.75s linear infinite;\n}\n\n@keyframes spinner-border {\n to {\n transform: rotate(360deg);\n }\n}\n\n.text-primary {\n color: #005792;\n}\n\n.visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n.certification-section {\n margin: 20px 0;\n padding: 15px;\n background-color: #ffffff;\n border-radius: 4px;\n border: 1px solid #dee2e6;\n}\n\n.certification-section h3 {\n color: #005792;\n margin-top: 0;\n margin-bottom: 15px;\n font-size: 1.1em;\n}\n\n.certification-entry {\n margin-bottom: 10px;\n}\n\n/* Image Upload Styles */\n.image-upload-wrapper {\n position: relative;\n}\n\n.file-input {\n display: none;\n}\n\n.file-input-label {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 8px 16px;\n background-color: #005792;\n color: white !important;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.9em;\n transition: background-color 0.2s;\n}\n\n.file-input-label:hover {\n background-color: #004675;\n}\n\n.file-input-label i {\n font-size: 1.1em;\n}\n\n.file-name {\n display: block;\n margin-top: 5px;\n color: #6c757d;\n font-size: 0.85em;\n}\n\n.image-preview {\n margin-top: 10px;\n position: relative;\n display: inline-block;\n}\n\n.image-preview img {\n max-width: 200px;\n max-height: 150px;\n border-radius: 4px;\n border: 2px solid #dee2e6;\n}\n\n.pdf-preview {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 15px;\n background-color: #f8f9fa;\n border: 2px solid #dee2e6;\n border-radius: 4px;\n max-width: 200px;\n}\n\n.pdf-preview i {\n font-size: 2em;\n color: #dc3545;\n}\n\n.pdf-preview span {\n font-size: 0.85em;\n color: #495057;\n word-break: break-word;\n}\n\n.btn-remove-image {\n position: absolute;\n top: -8px;\n right: -8px;\n background-color: #dc3545;\n color: white;\n border: none;\n border-radius: 50%;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n padding: 0;\n transition: background-color 0.2s;\n}\n\n.btn-remove-image:hover {\n background-color: #c82333;\n}\n\n.btn-remove-image i {\n font-size: 1em;\n}\n\n/* Timesheet Styles */\n.timesheet-view {\n background-color: #ffffff;\n border-radius: 6px;\n padding: 20px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n.timesheet-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n padding-bottom: 15px;\n border-bottom: 2px solid #005792;\n}\n\n.timesheet-header h3 {\n color: #005792;\n margin: 0;\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.timesheet-controls {\n display: flex;\n gap: 10px;\n}\n\n.timesheet-controls select,\n.timesheet-search {\n padding: 8px 12px;\n border: 1px solid #ced4da;\n border-radius: 4px;\n font-size: 0.9em;\n}\n\n.timesheet-search {\n min-width: 250px;\n}\n\n.timesheet-summary {\n display: flex;\n gap: 20px;\n margin-bottom: 20px;\n flex-wrap: wrap;\n}\n\n.summary-card {\n flex: 1;\n min-width: 150px;\n background-color: #f8f9fa;\n padding: 15px;\n border-radius: 6px;\n border-left: 4px solid #005792;\n}\n\n.summary-label {\n display: block;\n font-size: 0.85em;\n color: #6c757d;\n margin-bottom: 5px;\n}\n\n.summary-value {\n display: block;\n font-size: 1.5em;\n font-weight: bold;\n color: #005792;\n}\n\n.timesheet-table-container {\n overflow-x: auto;\n margin-top: 20px;\n}\n\n.timesheet-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 0.9em;\n}\n\n.timesheet-table thead {\n background-color: #005792;\n color: white;\n}\n\n.timesheet-table th {\n padding: 12px 8px;\n text-align: left;\n font-weight: bold;\n cursor: pointer;\n user-select: none;\n}\n\n.timesheet-table th:hover {\n background-color: #004675;\n}\n\n.timesheet-table th i {\n font-size: 0.8em;\n margin-left: 5px;\n}\n\n.timesheet-table tbody tr {\n border-bottom: 1px solid #dee2e6;\n}\n\n.timesheet-table tbody tr:hover {\n background-color: #f8f9fa;\n}\n\n.timesheet-table td {\n padding: 10px 8px;\n}\n\n.timestamp-cell {\n white-space: nowrap;\n color: #495057;\n font-size: 0.85em;\n}\n\n.crew-name-cell strong {\n color: #005792;\n}\n\n.role-cell {\n color: #6c757d;\n}\n\n.action-cell {\n white-space: nowrap;\n}\n\n.action-badge {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 4px 10px;\n border-radius: 12px;\n font-size: 0.85em;\n font-weight: bold;\n}\n\n.vessel-cell {\n color: #495057;\n}\n\n.duration-cell {\n color: #495057;\n font-weight: 500;\n}\n\n.notes-cell {\n color: #6c757d;\n font-style: italic;\n max-width: 200px;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.timesheet-row-embarked {\n background-color: #d4edda;\n}\n\n.timesheet-row-deboarded {\n background-color: #f8d7da;\n}\n\n.timesheet-row-assigned {\n background-color: #d1ecf1;\n}\n\n.timesheet-row-status-changed {\n background-color: #fff3cd;\n}\n\n@media (max-width: 768px) {\n .crew-grid {\n grid-template-columns: 1fr;\n }\n\n .search-filter {\n flex-direction: column;\n }\n\n .search-filter input,\n .search-filter select {\n width: 100%;\n }\n\n .timesheet-header {\n flex-direction: column;\n align-items: flex-start;\n gap: 15px;\n }\n\n .timesheet-controls {\n flex-direction: column;\n width: 100%;\n }\n\n .timesheet-controls select,\n .timesheet-search {\n width: 100%;\n }\n\n .timesheet-summary {\n flex-direction: column;\n }\n\n .timesheet-table {\n font-size: 0.8em;\n }\n\n .timesheet-table th,\n .timesheet-table td {\n padding: 8px 4px;\n }\n}\n\n.crew-subhead {\n color: #000;\n}</style>","<template>\n <div class=\"s-container container\">\n <div class=\"header\">\n <h1>OceanHelm Requisition System</h1>\n <p>Streamlined Material Request & Ordering Process</p>\n </div>\n\n <!-- Navigation Tabs -->\n <div class=\"nav-tabs\">\n <button v-for=\"tab in visibleTabs\" :key=\"tab.name\" :class=\"['nav-tab', { active: activeTab === tab.name }]\"\n @click=\"setActiveTab(tab.name)\">\n {{ tab.label }}\n </button>\n </div>\n\n <!-- New Requisition Tab -->\n <div v-if=\"activeTab === 'new-requisition'\" class=\"tab-content active\">\n <form @submit.prevent=\"handleSubmitRequisition\">\n <div class=\"form-grid\">\n <div class=\"form-group\">\n <label>Requestor Name *</label>\n <input type=\"text\" :value=\"userProfile?.full_name\" readonly required class=\"form-control\" />\n </div>\n <div class=\"form-group\">\n <label>Department *</label>\n <select v-model=\"form.department\" required>\n <option value=\"\">Select Department</option>\n <option v-for=\"dept in departments\" :key=\"dept\" :value=\"dept\">{{ dept }}</option>\n </select>\n </div>\n <div class=\"form-group\">\n <label>Vessel *</label>\n <select v-model=\"form.project\" class=\"form-control\" required>\n <option disabled value=\"\">Select a vessel</option>\n <option v-for=\"v in vessels\" :key=\"v.id\" :value=\"v.name\">\n {{ v.name }}\n </option>\n </select>\n </div>\n <div class=\"form-group\">\n <label>Date Needed *</label>\n <input type=\"date\" v-model=\"form.neededDate\" :min=\"today\" required />\n </div>\n </div>\n\n <div class=\"form-group\">\n <label>Business Justification *</label>\n <textarea v-model=\"form.justification\" placeholder=\"Explain why these materials are needed...\"\n required></textarea>\n </div>\n\n <div class=\"items-section\">\n <div class=\"items-header\">\n <h3>Requested Items</h3>\n <button type=\"button\" class=\"add-item-btn\" @click=\"addItem\">+ Add Item</button>\n </div>\n <div>\n <div v-for=\"(item, index) in form.items\" :key=\"index\" class=\"item-row\">\n <div class=\"form-group\">\n <label>Item Code *</label>\n <input type=\"text\" v-model=\"item.id\" required />\n </div>\n <div class=\"form-group\">\n <label>Item Description *</label>\n <input type=\"text\" v-model=\"item.desc\" required />\n </div>\n <div class=\"form-group\">\n <label>Quantity *</label>\n <input type=\"number\" v-model.number=\"item.qty\" min=\"1\" required />\n </div>\n <div class=\"form-group\">\n <label>Unit *</label>\n <select v-model=\"item.unit\" required>\n <option v-for=\"unit in units\" :key=\"unit\" :value=\"unit\">{{ unit }}</option>\n </select>\n </div>\n <div class=\"form-group\">\n <label>Est. Unit Cost *</label>\n <input type=\"number\" v-model.number=\"item.cost\" step=\"0.01\" min=\"0\" placeholder=\"0.00\" required />\n </div>\n <button type=\"button\" class=\"remove-item-btn\" @click=\"removeItem(index)\">Remove</button>\n </div>\n </div>\n </div>\n\n <div class=\"action-buttons\">\n <button type=\"submit\" class=\"btn btn-primary-req\" :disabled=\"isSubmitting\">\n {{ isSubmitting ? 'Submitting...' : 'Submit Requisition' }}\n </button>\n </div>\n </form>\n </div>\n\n <!-- All Requisitions Tab -->\n <div v-if=\"activeTab === 'all-requisitions'\" class=\"tab-content active\">\n <div class=\"requisition-list\">\n <div v-for=\"req in requisitions\" :key=\"req.id\" class=\"requisition-card\">\n <div class=\"requisition-header\">\n <div class=\"requisition-id\">{{ req.id }}</div>\n <div :class=\"['status-badge', `status-${req.status}`]\">{{ req.status }}</div>\n </div>\n <div class=\"requisition-details\">\n <div class=\"detail-item\" v-for=\"field in getRequisitionFields(req)\" :key=\"field.label\">\n <div class=\"detail-label\">{{ field.label }}</div>\n <div class=\"detail-value\">{{ field.value(req) }}</div>\n </div>\n </div>\n <div v-if=\"req.status === 'po-created' || req.status === 'delivered'\"\n class=\"form-group comments-section\">\n <button @click=\"handleOpenPO(req.id)\" class=\"add-item-btn comments-section\">\n Print PO\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <!-- My Requisitions Tab -->\n <div v-if=\"activeTab === 'my-requisitions'\" class=\"tab-content active\">\n <div class=\"requisition-list\">\n <div v-for=\"req in myRequisitions\" :key=\"req.id\" class=\"requisition-card\">\n <div class=\"requisition-header\">\n <div class=\"requisition-id\">{{ req.id }}</div>\n <div :class=\"['status-badge', `status-${req.status}`]\">{{ req.status }}</div>\n </div>\n <div class=\"requisition-details\">\n <div class=\"detail-item\" v-for=\"field in getRequisitionFields(req)\" :key=\"field.label\">\n <div class=\"detail-label\">{{ field.label }}</div>\n <div class=\"detail-value\">{{ field.value(req) }}</div>\n </div>\n </div>\n <div v-if=\"req.status === 'info-requested'\" class=\"form-group comments-section\">\n <label class=\"detail-label\">Your Response</label>\n <textarea v-model=\"infoResponse\" class=\"response-textarea\"\n placeholder=\"Submit more info...\"></textarea>\n <button @click=\"handleSubmitInfoResponse(req)\" class=\"add-item-btn comments-section\">\n Submit Info\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Pending Approval Tab -->\n <div v-if=\"activeTab === 'approvals'\" class=\"tab-content active\">\n <div style=\"margin-bottom: 20px;\">\n <h3 style=\"color: #1e40af; margin-bottom: 15px;\">Department Supervisor Dashboard</h3>\n <div style=\"background: #fef3c7; padding: 15px; border-radius: 10px; border-left: 4px solid #f59e0b;\">\n <strong>Role:</strong> Department Supervisor - Review requests for accuracy, necessity, and budget\n compliance\n </div>\n </div>\n <div class=\"requisition-list\" id=\"approvalsQueue\">\n <div v-for=\"req in reviewRequisitions\" :key=\"req.id\" class=\"requisition-card\">\n <div class=\"requisition-header\">\n <div class=\"requisition-id\">{{ req.id }}</div>\n </div>\n <div class=\"requisition-details\">\n <div class=\"detail-item\" v-for=\"field in requisitionFields\" :key=\"field.label\">\n <div class=\"detail-label\">{{ field.label }}</div>\n <div class=\"detail-value\">{{ field.value(req) }}</div>\n </div>\n </div>\n <!-- Justification -->\n <div class=\"detail-item\">\n <div class=\"detail-label\">Justification</div>\n <div class=\"detail-value\">{{ req.justification || 'N/A' }}</div>\n </div>\n\n <!-- Item list -->\n <div class=\"detail-item\">\n <div class=\"detail-label\">Items</div>\n <ul class=\"item-list\">\n <li v-for=\"(item, index) in req.items\" :key=\"index\">\n {{ item.desc }} - {{ item.qty }} {{ item.unit }} @ ₦{{ item.cost.toFixed(2) }} each\n </li>\n </ul>\n </div>\n <button type=\"button\" class=\"add-item-btn\" @click=\"handleApproveRequisition(req.id)\">Approve</button>\n <button type=\"button\" class=\"marginbox btn-reject\"\n @click=\"handleDeclineRequisition(req.id)\">Decline</button>\n <button type=\"button\" class=\"marginbox btn-request\" @click=\"handleInfoRequisition(req.id)\">Request\n Info</button>\n </div>\n </div>\n </div>\n\n <!-- Purchasing Queue Tab -->\n <div v-if=\"activeTab === 'purchasing'\" class=\"tab-content active\">\n <div style=\"margin-bottom: 20px;\">\n <h3 style=\"color: #1e40af; margin-bottom: 15px;\">Purchasing Department Dashboard</h3>\n <div style=\"background: #dbeafe; padding: 15px; border-radius: 10px; border-left: 4px solid #3b82f6;\">\n <strong>Role:</strong> Purchasing Team - Convert approved requisitions to Purchase Orders\n </div>\n </div>\n <div class=\"requisition-list\" id=\"purchasingQueue\">\n <div v-for=\"req in poRequisitions\" :key=\"req.id\" class=\"requisition-card\">\n <div class=\"requisition-header\">\n <div class=\"requisition-id\">{{ req.id }}</div>\n </div>\n <div class=\"requisition-details\">\n <div class=\"detail-item\" v-for=\"field in requisitionFields\" :key=\"field.label\">\n <div class=\"detail-label\">{{ field.label }}</div>\n <div class=\"detail-value\">{{ field.value(req) }}</div>\n </div>\n </div>\n <!-- Justification -->\n <div class=\"detail-item\">\n <div class=\"detail-label\">Justification</div>\n <div class=\"detail-value\">{{ req.justification || 'N/A' }}</div>\n </div>\n\n <!-- Item list -->\n <div class=\"detail-item\">\n <div class=\"detail-label\">Items</div>\n <ul class=\"item-list\">\n <li v-for=\"(item, index) in req.items\" :key=\"index\">\n {{ item.desc }} - {{ item.qty }} {{ item.unit }} @ ₦{{ item.cost.toFixed(2) }} each\n </li>\n </ul>\n </div>\n <button type=\"button\" class=\"add-item-btn\" @click=\"handleCreatePO(req.id)\">Create PO</button>\n </div>\n </div>\n </div>\n\n <!-- Receiving Tab -->\n <div v-if=\"activeTab === 'receiving'\" class=\"tab-content active\">\n <div style=\"margin-bottom: 20px;\">\n <h3 style=\"color: #1e40af; margin-bottom: 15px;\">Receiving & Inventory Dashboard</h3>\n <div style=\"background: #dcfce7; padding: 15px; border-radius: 10px; border-left: 4px solid #10b981;\">\n <strong>Role:</strong> Warehouse Team - Process incoming deliveries and update inventory\n </div>\n </div>\n <div class=\"requisition-list\" id=\"receivingQueue\">\n <div v-for=\"req in awaitingDelivery\" :key=\"req.id\" class=\"requisition-card\">\n <div class=\"requisition-header\">\n <div class=\"requisition-id\">{{ req.id }}</div>\n </div>\n <div class=\"requisition-details\">\n <div class=\"detail-item\" v-for=\"field in requisitionFields\" :key=\"field.label\">\n <div class=\"detail-label\">{{ field.label }}</div>\n <div class=\"detail-value\">{{ field.value(req) }}</div>\n </div>\n </div>\n <!-- Justification -->\n <div class=\"detail-item\">\n <div class=\"detail-label\">Justification</div>\n <div class=\"detail-value\">{{ req.justification || 'N/A' }}</div>\n </div>\n\n <!-- Item list -->\n <div class=\"detail-item\">\n <div class=\"detail-label\">Items</div>\n <ul class=\"item-list\">\n <li v-for=\"(item, index) in req.items\" :key=\"index\">\n {{ item.desc }} - {{ item.qty }} {{ item.unit }} @ ₦{{ item.cost.toFixed(2) }} each\n </li>\n </ul>\n </div>\n <button type=\"button\" class=\"add-item-btn\" @click=\"handleAcceptDelivery(req.id)\">Accept\n Delivery</button>\n </div>\n </div>\n </div>\n\n <!-- PO Tab -->\n <div v-if=\"activeTab === 'po'\" class=\"tab-content active\">\n <div class=\"po-content\" id=\"po-content\">\n <div class=\"po-header\">\n <div class=\"company-info\">\n <h3>Vendor Information</h3>\n <div class=\"info-row\">\n <span class=\"info-label\">Company:</span>\n <span class=\"info-value\">{{ vendorInfo.company || poDetails.vendorInfo?.company || 'N/A' }} </span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Contact:</span>\n <span class=\"info-value\">{{ vendorInfo.contact || poDetails.vendorInfo?.contact || 'N/A' }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Email:</span>\n <span class=\"info-value\">{{ vendorInfo.email || poDetails.vendorInfo?.email || 'N/A' }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Phone:</span>\n <span class=\"info-label\">{{ vendorInfo.phone || poDetails.vendorInfo?.phone || 'N/A' }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Address:</span>\n <span class=\"info-value\">{{ vendorInfo.address || poDetails.vendorInfo?.address || 'N/A' }}</span>\n </div>\n </div>\n\n <div class=\"company-info\">\n <h3>Purchase Order Details</h3>\n <div class=\"info-row\">\n <span class=\"info-label\">PO Number:</span>\n <span class=\"info-value\">{{ poDetails.id }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Date:</span>\n <span class=\"info-value\">{{ vendorInfo.poDate || poDetails.vendorInfo?.poDate || formatDate(new Date()) }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Requested By:</span>\n <span class=\"info-value\">{{ vendorInfo.poApproved || poDetails.vendorInfo?.poApproved || 'N/A' }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Department:</span>\n <span class=\"info-value\">PO-{{ poDetails.department || 'N/A' }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Delivery Date:</span>\n <span class=\"info-value\">{{ poDetails.neededDate || 'N/A' }}</span>\n </div>\n </div>\n </div>\n\n <div class=\"items-section\">\n <h2 class=\"section-title\">Order Items</h2>\n <table class=\"items-table\">\n <thead>\n <tr>\n <th>Item #</th>\n <th>Description</th>\n <th>Quantity</th>\n <th>Unit Price</th>\n <th>Total</th>\n <th v-if=\"!isPrinting\">Actions</th>\n </tr>\n </thead>\n <tbody>\n <tr v-for=\"(item, index) in poDetails.items || []\" :key=\"index\">\n <td>{{ item.itemNumber || (index + 1) }}</td>\n <td>{{ item.desc }}</td>\n <td>{{ item.qty }}</td>\n <td>\n <span v-if=\"!item.editing\">\n ${{ (item.unitPrice || item.cost || 0).toFixed(2) }}\n <span v-if=\"item.cost !== item.unitPrice && item.unitPrice\" class=\"price-change-indicator\">!</span>\n </span>\n <input v-else v-model.number=\"item.tempPrice\" type=\"number\" step=\"0.01\" min=\"0\"\n class=\"price-input\" :class=\"{ 'price-changed': item.cost !== item.tempPrice }\">\n </td>\n <td>${{ ((item.unitPrice || item.cost || 0) * (item.qty || 0)).toFixed(2) }}</td>\n <td v-if=\"!isPrinting\">\n <button v-if=\"!item.editing\" @click=\"startEdit(index)\" class=\"edit-btn\">\n Edit Price\n </button>\n <div v-else>\n <button @click=\"savePrice(index)\" class=\"save-btn\">Save</button>\n <button @click=\"cancelEdit(index)\" class=\"cancel-btn\">Cancel</button>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n\n <div v-for=\"(item, index) in poDetails.items || []\" :key=\"'note-' + index\">\n <div v-if=\"item.justification\" class=\"justification-note\">\n <strong>Price Change Justification (Item {{ item.itemNumber || (index + 1) }}):</strong> {{ item.justification\n }}\n </div>\n </div>\n\n <div class=\"totals\">\n <div class=\"total-row\">\n <span>Subtotal:</span>\n <span>${{ subTotal.toFixed(2) }}</span>\n </div>\n <div class=\"total-row\">\n <span>Tax ({{ vendorInfo.tax || poDetails.vendorInfo?.tax || 0 }}%):</span>\n <span>${{ calculateTax().toFixed(2) }}</span>\n </div>\n <div class=\"total-row\">\n <span>Shipping:</span>\n <span>${{ getOptional(vendorInfo.shipping) }}</span>\n </div>\n <div class=\"total-row grand-total\">\n <span>Grand Total:</span>\n <span>${{ grandTotal.toFixed(2) }}</span>\n </div>\n </div>\n </div>\n </div>\n <!-- Justification Modal -->\n <div v-if=\"showJustificationModal\" class=\"justification-modal\" @click.self=\"closeJustificationModal\">\n <div class=\"modal-content\">\n <h3>Price Change Justification Required</h3>\n <p style=\"margin-bottom: 15px; color: #666;\">\n Please provide a justification for changing the price from\n <strong>${{ currentItem?.cost?.toFixed(2) }}</strong> to\n <strong>${{ currentItem?.tempPrice?.toFixed(2) }}</strong>\n </p>\n <textarea v-model=\"justificationText\" class=\"justification-textarea\"\n placeholder=\"Enter justification for price change...\" required></textarea>\n <div class=\"modal-buttons\">\n <button @click=\"closeJustificationModal\" class=\"cancel-btn\">Cancel</button>\n <button @click=\"confirmPriceChange\" class=\"save-btn\" :disabled=\"!justificationText.trim()\">\n Confirm Change\n </button>\n </div>\n </div>\n </div>\n <button v-if=\"!isPrinting\" type=\"button\" class=\"add-item-btn\" @click=\"handleFinishPO(poDetails.id)\">Approve\n PO</button>\n </div>\n\n <!-- Workflow Guide Tab -->\n <div v-if=\"activeTab === 'workflow'\" class=\"tab-content active\">\n <div class=\"workflow-steps\">\n <div class=\"workflow-step\">\n <div class=\"step-icon completed\">1</div>\n <div class=\"step-title\">Request Submitted</div>\n </div>\n <div class=\"workflow-step\">\n <div class=\"step-icon active\">2</div>\n <div class=\"step-title\">Department Review</div>\n </div>\n <div class=\"workflow-step\">\n <div class=\"step-icon\">3</div>\n <div class=\"step-title\">Management Approval</div>\n </div>\n <div class=\"workflow-step\">\n <div class=\"step-icon\">4</div>\n <div class=\"step-title\">Purchase Order Created</div>\n </div>\n <div class=\"workflow-step\">\n <div class=\"step-icon\">5</div>\n <div class=\"step-title\">Order Fulfilled</div>\n </div>\n </div>\n\n <div style=\"background: white; padding: 30px; border-radius: 15px; margin-top: 20px;\">\n <h3 style=\"color: #1e40af; margin-bottom: 20px;\">Requisition Workflow Process</h3>\n <div style=\"line-height: 1.8; color: #374151;\">\n <p><strong>Step 1: Request Identification</strong><br>\n Department or individual identifies need for materials, equipment, or services.</p>\n\n <p><strong>Step 2: Requisition Creation</strong><br>\n Complete requisition form with detailed specifications, quantities, and business justification.</p>\n\n <p><strong>Step 3: Department Review</strong><br>\n Department supervisor reviews request for accuracy, necessity, and budget compliance.</p>\n\n <p><strong>Step 4: Management Approval</strong><br>\n Based on cost thresholds, appropriate management level provides approval.</p>\n\n <p><strong>Step 5: Purchase Order Generation</strong><br>\n Purchasing team converts approved requisition into formal Purchase Order (PO).</p>\n\n <p><strong>Step 6: Vendor Processing</strong><br>\n PO sent to vendor, order processed, and delivery scheduled.</p>\n\n <p><strong>Step 7: Receipt & Inventory</strong><br>\n Goods received, inspected, and entered into inventory system.</p>\n </div>\n </div>\n </div>\n </div>\n</template>\n \n<script>\nexport default {\n name: 'RequisitionSystem',\n props: {\n userProfile: {\n type: Object,\n required: true\n },\n userRole: {\n type: String,\n required: true\n },\n requisitions: {\n type: Array,\n default: () => []\n },\n vessels: {\n type: Array,\n default: () => []\n }\n },\n\n emits: [\n 'submit-requisition',\n 'submit-info-response',\n 'approve-requisition',\n 'decline-requisition',\n 'info-requisition',\n 'create-po',\n 'open-po',\n 'finish-po',\n 'accept-delivery'\n ],\n\n data() {\n return {\n activeTab: 'workflow',\n isPrinting: false,\n infoResponse: '',\n isSubmitting: false,\n\n // Tabs with visibility rules\n tabs: [\n { name: 'new-requisition', label: 'New Requisition', roles: ['requisitor'] },\n { name: 'my-requisitions', label: 'My Requisitions', roles: ['requisitor'] },\n { name: 'all-requisitions', label: 'All Requisitions', roles: ['requisitor', 'supervisor', 'captain', 'owner', 'purchaser'] },\n { name: 'approvals', label: 'Pending Approvals', roles: ['owner', 'supervisor'] },\n { name: 'purchasing', label: 'Purchasing Queue', roles: ['purchaser'] },\n { name: 'receiving', label: 'Receiving', roles: ['requisitor'] },\n { name: 'workflow', label: 'Workflow Guide', roles: ['requisitor', 'supervisor', 'owner', 'purchaser', 'captain'] }\n ],\n\n // Form State\n form: {\n requestor: '',\n department: '',\n project: '',\n neededDate: '',\n justification: '',\n items: []\n },\n\n poDetails: {\n editing: false,\n items: []\n },\n vendorInfo: {},\n justificationText: '',\n currentItemIndex: null,\n showJustificationModal: false,\n\n // common fields\n requisitionFields: [\n { label: 'Requestor', value: req => req.requestor },\n { label: 'Department', value: req => req.department },\n { label: 'Project', value: req => req.project || 'N/A' },\n { label: 'Submitted', value: req => req.submittedDate },\n { label: 'Items', value: req => `${req.items?.length || 0} item(s)` }\n ],\n\n // Fields for My Requisitions display\n requisitionFieldsMap: {\n approved: [\n { label: 'Approved By', value: req => req.approvedBy },\n ],\n declined: [\n { label: 'Declined By', value: req => req.declinedBy },\n { label: 'Rejection Reason', value: req => req.rejectionReason },\n ],\n 'info-requested': [\n { label: 'Info Requester', value: req => req.infoRequestedBy },\n { label: 'Requested Info', value: req => req.requestedInfo }\n ]\n },\n\n // Options\n departments: [\n 'Marine Operations', 'Engineering', 'Maintenance',\n 'Safety & Compliance', 'Logistics', 'Administration',\n 'Engine Room'\n ],\n\n priorities: [\n 'Urgent - Same Day',\n 'High - Within 3 Days',\n 'Normal - Within 1 Week',\n 'Low - Within 2 Weeks'\n ],\n\n units: ['Pieces', 'Kilograms', 'Liters', 'Meters', 'Sets', 'Boxes']\n }\n },\n\n computed: {\n today() {\n return new Date().toISOString().split('T')[0];\n },\n\n visibleTabs() {\n return this.tabs.filter(tab => tab.roles.includes(this.userRole));\n },\n\n subTotal() {\n return (this.poDetails.items || []).reduce((sum, item) => {\n const unitPrice = item.unitPrice || item.cost || 0;\n return sum + (unitPrice * (item.qty || 0));\n }, 0);\n },\n\n grandTotal() {\n return this.subTotal + this.calculateTax() + parseFloat(this.getOptional(this.vendorInfo.shipping));\n },\n\n reviewRequisitions() {\n return (this.requisitions || []).filter(r => r.status === 'under-review');\n },\n\n poRequisitions() {\n return (this.requisitions || []).filter(r => r.status === 'approved');\n },\n\n awaitingDelivery() {\n return (this.requisitions || []).filter(r => r.status === 'po-created');\n },\n\n currentItem() {\n return this.currentItemIndex !== null ? this.poDetails.items[this.currentItemIndex] : null;\n },\n\n myRequisitions() {\n const userId = this.userProfile?.id || this.userProfile?.profile_id;\n return (this.requisitions || []).filter(req => req.profile_id == userId);\n }\n },\n\n methods: {\n setActiveTab(tabName) {\n this.activeTab = tabName;\n },\n\n formatDate(dateString) {\n if (!dateString) return 'N/A';\n const date = new Date(dateString);\n return date.toLocaleDateString();\n },\n\n calculateTax() {\n const taxRate = parseFloat(this.vendorInfo.tax || this.poDetails.vendorInfo?.tax || 0);\n return (this.subTotal * taxRate) / 100;\n },\n\n getOptional(value) {\n return typeof value === 'number' ? value.toFixed(2) : (parseFloat(value) || 0).toFixed(2);\n },\n\n getRequisitionFields(req) {\n const statusFields = this.requisitionFieldsMap[req.status] || [];\n return [...(this.requisitionFields || []), ...statusFields];\n },\n\n addItem() {\n this.form.items.push({\n id: '',\n desc: '',\n qty: 1,\n unit: 'Pieces',\n cost: 0\n });\n },\n\n removeItem(index) {\n this.form.items.splice(index, 1);\n },\n\n startEdit(index) {\n this.poDetails.items[index].editing = true;\n this.poDetails.items[index].tempPrice = this.poDetails.items[index].unitPrice || this.poDetails.items[index].cost;\n },\n\n cancelEdit(index) {\n this.poDetails.items[index].editing = false;\n this.poDetails.items[index].tempPrice = this.poDetails.items[index].unitPrice || this.poDetails.items[index].cost;\n },\n\n savePrice(index) {\n const item = this.poDetails.items[index];\n if (item.tempPrice !== item.cost) {\n // Price changed, require justification\n this.currentItemIndex = index;\n this.showJustificationModal = true;\n } else {\n // No change, just save\n item.unitPrice = item.tempPrice;\n item.editing = false;\n }\n },\n\n confirmPriceChange() {\n if (!this.justificationText.trim()) {\n alert('Please provide a justification for the price change.');\n return;\n }\n\n const item = this.poDetails.items[this.currentItemIndex];\n item.unitPrice = item.tempPrice;\n item.cost = item.tempPrice;\n item.justification = this.justificationText.trim();\n item.editing = false;\n\n this.closeJustificationModal();\n },\n\n closeJustificationModal() {\n this.showJustificationModal = false;\n this.currentItemIndex = null;\n this.justificationText = '';\n },\n\n // Event handlers that emit to parent\n handleSubmitRequisition() {\n if (this.form.items.length === 0) {\n alert('Please add at least one item to the requisition.');\n return;\n }\n\n this.isSubmitting = true;\n const requisition = this.collectFormData('under-review');\n this.$emit('submit-requisition', requisition);\n \n setTimeout(() => {\n this.resetForm();\n this.isSubmitting = false;\n }, 1000);\n },\n\n handleSubmitInfoResponse(req) {\n if (!this.infoResponse || this.infoResponse.trim() === '') {\n alert('Please enter a response before submitting.');\n return;\n }\n this.$emit('submit-info-response', { req, response: this.infoResponse });\n this.infoResponse = '';\n },\n\n handleApproveRequisition(id) {\n this.$emit('approve-requisition', id);\n },\n\n handleDeclineRequisition(id) {\n this.$emit('decline-requisition', id);\n },\n\n handleInfoRequisition(id) {\n this.$emit('info-requisition', id);\n },\n\n handleCreatePO(id) {\n this.$emit('create-po', id);\n },\n\n handleOpenPO(id) {\n this.$emit('open-po', id);\n },\n\n handleFinishPO(id) {\n this.$emit('finish-po', id);\n },\n\n handleAcceptDelivery(id) {\n this.$emit('accept-delivery', id);\n },\n\n collectFormData(status) {\n return {\n id: 'REQ-' + Date.now(),\n requestor: this.userProfile?.full_name || 'Unknown',\n department: this.form.department,\n project: this.form.project,\n neededDate: this.form.neededDate,\n justification: this.form.justification,\n items: this.form.items.map(item => ({ ...item })),\n status,\n submittedDate: new Date().toLocaleDateString(),\n profile_id: this.userProfile?.id || this.userProfile?.profile_id\n };\n },\n\n resetForm() {\n this.form = {\n requestor: '',\n department: '',\n project: '',\n neededDate: '',\n justification: '',\n items: []\n };\n // Add initial item row again\n this.addItem();\n },\n\n // Methods for updating PO details from parent\n updatePODetails(details) {\n this.poDetails = { ...details };\n this.getNumber();\n for (let item of this.poDetails.items || []) {\n item.tempPrice = item.cost || 0;\n item.unitPrice = item.unitPrice || item.cost || 0;\n item.subTotal = item.unitPrice * (item.qty || 0);\n }\n },\n\n updateVendorInfo(info) {\n this.vendorInfo = { ...info };\n },\n\n setPrintingMode(isPrinting) {\n this.isPrinting = isPrinting;\n },\n\n getNumber() {\n return (this.poDetails.items || []).map((item, index) => {\n return item.itemNumber = index + 1;\n });\n }\n },\n\n created() {\n // Initialize form with one item row\n this.addItem();\n }\n}\n</script>\n\n<style>\n.s-container {\n max-width: 1200px;\n margin: 0 auto;\n background: rgba(255, 255, 255, 0.95);\n border-radius: 20px;\n box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);\n overflow: hidden;\n backdrop-filter: blur(10px);\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n padding: 20px;\n}\n\n.header h1 {\n font-size: 2.5rem;\n margin-bottom: 10px;\n position: relative;\n z-index: 1;\n}\n\n.header p {\n font-size: 1.1rem;\n opacity: 0.9;\n position: relative;\n z-index: 1;\n}\n\n.nav-tabs {\n display: flex;\n background: #f8fafc;\n border-bottom: 2px solid #e2e8f0;\n overflow-x: auto;\n white-space: nowrap;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: thin;\n}\n\n.nav-tabs::-webkit-scrollbar {\n height: 6px;\n}\n\n.nav-tabs::-webkit-scrollbar-thumb {\n background: #cbd5e1;\n border-radius: 3px;\n}\n\n.nav-tabs::-webkit-scrollbar-track {\n background: transparent;\n}\n\n\n.nav-tab {\n flex: 1;\n padding: 15px 20px;\n background: none;\n border: none;\n cursor: pointer;\n font-size: 1rem;\n font-weight: 600;\n color: #64748b;\n transition: all 0.3s ease;\n position: relative;\n}\n\n.nav-tab:hover {\n background: #e2e8f0;\n color: #1e40af;\n}\n\n.nav-tab.active {\n color: #1e40af;\n background: white;\n}\n\n.nav-tab.active::after {\n content: '';\n position: absolute;\n bottom: -2px;\n left: 0;\n right: 0;\n height: 3px;\n background: #1e40af;\n}\n\n.tab-content {\n display: none;\n padding: 30px;\n animation: fadeIn 0.5s ease-in;\n}\n\n.tab-content.active {\n display: block;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n transform: translateY(20px);\n }\n\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n.form-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 25px;\n margin-bottom: 30px;\n}\n\n.form-group {\n display: flex;\n flex-direction: column;\n}\n\n.form-group label {\n font-weight: 600;\n margin-bottom: 8px;\n color: #374151;\n font-size: 0.95rem;\n}\n\n.form-group input,\n.form-group select,\n.form-group textarea {\n padding: 12px 15px;\n border: 2px solid #e5e7eb;\n border-radius: 10px;\n font-size: 1rem;\n transition: all 0.3s ease;\n background: white;\n}\n\n.form-group input:focus,\n.form-group select:focus,\n.form-group textarea:focus {\n outline: none;\n border-color: #3b82f6;\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);\n}\n\n.form-group textarea {\n min-height: 100px;\n resize: vertical;\n}\n\n.items-section {\n background: #f8fafc;\n border-radius: 15px;\n padding: 25px;\n margin: 25px 0;\n border: 2px solid #e2e8f0;\n}\n\n.items-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n}\n\n.items-header h3 {\n color: #1e40af;\n font-size: 1.3rem;\n}\n\n.add-item-btn {\n background: linear-gradient(135deg, #10b981 0%, #059669 100%);\n color: white;\n border: none;\n padding: 10px 20px;\n border-radius: 8px;\n cursor: pointer;\n font-weight: 600;\n transition: all 0.3s ease;\n box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);\n}\n\n.add-item-btn:hover {\n transform: translateY(-2px);\n box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);\n}\n\n.item-row {\n display: grid;\n grid-template-columns: 2fr 1fr 1fr 1fr auto;\n gap: 15px;\n align-items: end;\n margin-bottom: 15px;\n padding: 15px;\n background: white;\n border-radius: 10px;\n border: 1px solid #e5e7eb;\n transition: all 0.3s ease;\n}\n\n.item-row:hover {\n box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);\n}\n\n.marginbox {\n margin: 10px\n}\n\n.item-list {\n list-style: none;\n padding: 0;\n margin: 0.5rem 0;\n}\n\n.item-list li {\n background: #f1f5f9;\n margin-bottom: 0.5rem;\n padding: 0.5rem 0.75rem;\n border-radius: 0.375rem;\n font-size: 0.95rem;\n color: #1e293b;\n display: flex;\n justify-content: space-between;\n align-items: center;\n content: '•';\n color: #3b82f6;\n}\n\n\n.remove-item-btn {\n background: #ef4444;\n color: white;\n border: none;\n padding: 8px 12px;\n border-radius: 6px;\n cursor: pointer;\n font-size: 0.9rem;\n transition: all 0.3s ease;\n}\n\n.remove-item-btn:hover {\n background: #dc2626;\n transform: scale(1.05);\n}\n\n.approval-actions {\n display: flex;\n gap: 10px;\n margin-top: 15px;\n}\n\n.btn-approve {\n background: linear-gradient(135deg, #10b981 0%, #059669 100%);\n color: white;\n border: none;\n padding: 8px 16px;\n border-radius: 6px;\n cursor: pointer;\n font-size: 0.9rem;\n font-weight: 600;\n transition: all 0.3s ease;\n}\n\n.btn-approve:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);\n}\n\n.btn-reject {\n background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);\n color: white;\n border: none;\n padding: 8px 16px;\n border-radius: 6px;\n cursor: pointer;\n font-size: 0.9rem;\n font-weight: 600;\n transition: all 0.3s ease;\n}\n\n.btn-reject:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);\n}\n\n.btn-request {\n background: linear-gradient(135deg, #ef9a44 0%, #fa920a 100%);\n color: white;\n border: none;\n padding: 8px 16px;\n border-radius: 6px;\n cursor: pointer;\n font-size: 0.9rem;\n font-weight: 600;\n transition: all 0.3s ease;\n}\n\n.btn-request:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 12px rgba(240, 162, 52, 0.3);\n}\n\n\n.btn-create-po {\n background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);\n color: white;\n border: none;\n padding: 8px 16px;\n border-radius: 6px;\n cursor: pointer;\n font-size: 0.9rem;\n font-weight: 600;\n transition: all 0.3s ease;\n}\n\n.btn-create-po:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);\n}\n\n.btn-mark-delivered {\n background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);\n color: white;\n border: none;\n padding: 8px 16px;\n border-radius: 6px;\n cursor: pointer;\n font-size: 0.9rem;\n font-weight: 600;\n transition: all 0.3s ease;\n}\n\n.btn-mark-delivered:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);\n}\n\n.po-info {\n background: #f8fafc;\n padding: 15px;\n border-radius: 8px;\n margin: 10px 0;\n border: 1px solid #e2e8f0;\n}\n\n.po-info h4 {\n color: #1e40af;\n margin-bottom: 10px;\n font-size: 1rem;\n}\n\n.po-details {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));\n gap: 10px;\n font-size: 0.9rem;\n}\n\n.items-list {\n background: #f8fafc;\n padding: 15px;\n border-radius: 8px;\n margin: 15px 0;\n border: 1px solid #e2e8f0;\n}\n\n.items-list h4 {\n color: #374151;\n margin-bottom: 10px;\n font-size: 1rem;\n}\n\n.item-detail {\n display: flex;\n justify-content: space-between;\n padding: 8px 0;\n border-bottom: 1px solid #e5e7eb;\n}\n\n.item-detail:last-child {\n border-bottom: none;\n}\n\n.comments-section {\n margin-top: 15px;\n}\n\n.comments-section textarea {\n width: 100%;\n min-height: 80px;\n padding: 10px;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n font-size: 0.9rem;\n resize: vertical;\n}\n\n.role-badge {\n display: inline-block;\n padding: 4px 8px;\n border-radius: 12px;\n font-size: 0.75rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin-left: 10px;\n}\n\n.role-supervisor {\n background: #fef3c7;\n color: #92400e;\n}\n\n.role-purchasing {\n background: #dbeafe;\n color: #1e40af;\n}\n\n.role-receiving {\n background: #dcfce7;\n color: #166534;\n}\n\n.status-badge {\n display: inline-block;\n padding: 6px 12px;\n border-radius: 20px;\n font-size: 0.85rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.status-draft {\n background: #fef3c7;\n color: #92400e;\n}\n\n.status-under-review {\n background: #dbeafe;\n color: #1e40af;\n}\n\n.status-approved {\n background: #dcfce7;\n color: #166534;\n}\n\n.status-declined {\n background: #fee2e2;\n color: #dc2626;\n}\n\n.status-info-requested {\n background: #e8cf12;\n color: #da7212;\n}\n\n.status-po-created {\n background: #e0e7ff;\n color: #4bca38;\n}\n\n.status-pending-supply {\n background: #113fd8;\n color: #4bca38;\n}\n\n.status-delivered {\n background: #f3e8ff;\n color: #7c3aed;\n}\n\n.status-received {\n background: #ecfdf5;\n color: #065f46;\n}\n\n.action-buttons {\n display: flex;\n gap: 15px;\n justify-content: flex-end;\n margin-top: 30px;\n padding-top: 25px;\n border-top: 2px solid #e5e7eb;\n}\n\n.btn-primary-req {\n background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);\n color: white;\n box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);\n padding: 12px 25px;\n border: none;\n border-radius: 10px;\n font-size: 1rem;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.3s ease;\n}\n\n.btn-primary-req:hover:not(:disabled) {\n transform: translateY(-2px);\n box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);\n}\n\n.btn-primary-req:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.btn-secondary {\n background: #6b7280;\n color: white;\n}\n\n.btn-secondary:hover {\n background: #4b5563;\n transform: translateY(-2px);\n}\n\n.requisition-list {\n display: grid;\n gap: 20px;\n}\n\n.requisition-card {\n background: white;\n border-radius: 15px;\n padding: 25px;\n box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);\n border: 1px solid #e5e7eb;\n transition: all 0.3s ease;\n}\n\n.requisition-card:hover {\n transform: translateY(-5px);\n box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);\n}\n\n.requisition-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 15px;\n}\n\n.requisition-id {\n font-size: 1.2rem;\n font-weight: 700;\n color: #1e40af;\n}\n\n.requisition-details {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 15px;\n margin-top: 15px;\n}\n\n.detail-item {\n display: flex;\n flex-direction: column;\n}\n\n.detail-label {\n font-size: 0.85rem;\n font-weight: 600;\n color: #6b7280;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin-bottom: 4px;\n}\n\n.detail-value {\n font-size: 1rem;\n color: #374151;\n font-weight: 500;\n}\n\n.workflow-steps {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 30px 0;\n padding: 20px;\n background: #f8fafc;\n border-radius: 15px;\n border: 2px solid #e2e8f0;\n}\n\n.workflow-step {\n display: flex;\n flex-direction: column;\n align-items: center;\n flex: 1;\n position: relative;\n}\n\n.workflow-step:not(:last-child)::after {\n content: '';\n position: absolute;\n top: 20px;\n right: -50%;\n width: 100%;\n height: 2px;\n background: #e5e7eb;\n z-index: 1;\n}\n\n.step-icon {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background: #e5e7eb;\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: bold;\n color: #6b7280;\n margin-bottom: 10px;\n position: relative;\n z-index: 2;\n}\n\n.step-icon.active {\n background: #3b82f6;\n color: white;\n}\n\n.step-icon.completed {\n background: #10b981;\n color: white;\n}\n\n.step-title {\n font-size: 0.9rem;\n font-weight: 600;\n color: #374151;\n text-align: center;\n}\n\n@media (max-width: 768px) {\n .form-grid {\n grid-template-columns: 1fr;\n }\n\n .item-row {\n grid-template-columns: 1fr;\n gap: 10px;\n }\n\n .action-buttons {\n flex-direction: column;\n }\n\n .workflow-steps {\n flex-direction: column;\n gap: 20px;\n }\n\n .workflow-step::after {\n display: none;\n }\n}\n\n#content {\n width: 100%;\n min-height: 100vh;\n transition: all 0.3s;\n position: absolute;\n padding: 20px;\n padding-left: 40px;\n}\n\n#content.active {\n margin-left: var(--sidebar-width);\n width: calc(100% - var(--sidebar-width));\n}\n\n.po-content {\n padding: 40px;\n}\n\n.po-header {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 40px;\n margin-bottom: 40px;\n}\n\n.company-info,\n.po-details {\n background: #f8f9fa;\n padding: 25px;\n border-radius: 15px;\n border-left: 5px solid #3498db;\n}\n\n.company-info h3,\n.po-details h3 {\n color: #2c3e50;\n margin-bottom: 15px;\n font-size: 1.3rem;\n}\n\n.info-row {\n margin-bottom: 8px;\n display: flex;\n justify-content: space-between;\n}\n\n.info-label {\n font-weight: 600;\n color: #555;\n}\n\n.info-value {\n color: #2c3e50;\n}\n\n.items-section {\n margin-top: 30px;\n}\n\n.section-title {\n color: #2c3e50;\n font-size: 1.5rem;\n margin-bottom: 20px;\n border-bottom: 2px solid #3498db;\n padding-bottom: 10px;\n}\n\n.items-table {\n width: 100%;\n border-collapse: collapse;\n margin-bottom: 30px;\n background: white;\n border-radius: 10px;\n overflow: hidden;\n box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);\n}\n\n.items-table th {\n background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);\n color: white;\n padding: 15px;\n text-align: left;\n font-weight: 600;\n}\n\n.items-table td {\n padding: 15px;\n border-bottom: 1px solid #eee;\n vertical-align: middle;\n}\n\n.items-table tr:hover {\n background: #f8f9fa;\n transform: translateY(-1px);\n transition: all 0.3s ease;\n}\n\n.price-input {\n padding: 8px 12px;\n border: 2px solid #ddd;\n border-radius: 8px;\n font-size: 14px;\n width: 100px;\n transition: all 0.3s ease;\n}\n\n.price-input:focus {\n outline: none;\n border-color: #3498db;\n box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);\n}\n\n.price-changed {\n background: #fff3cd;\n border-color: #ffc107;\n}\n\n.edit-btn {\n background: #3498db;\n color: white;\n border: none;\n padding: 8px 16px;\n border-radius: 6px;\n cursor: pointer;\n font-size: 12px;\n transition: all 0.3s ease;\n}\n\n.edit-btn:hover {\n background: #2980b9;\n transform: translateY(-2px);\n}\n\n.save-btn {\n background: #27ae60;\n color: white;\n border: none;\n padding: 8px 16px;\n border-radius: 6px;\n cursor: pointer;\n font-size: 12px;\n margin-right: 5px;\n}\n\n.save-btn:disabled {\n background: #95a5a6;\n cursor: not-allowed;\n}\n\n.cancel-btn {\n background: #e74c3c;\n color: white;\n border: none;\n padding: 8px 16px;\n border-radius: 6px;\n cursor: pointer;\n font-size: 12px;\n}\n\n.justification-modal {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.7);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n}\n\n.modal-content {\n background: white;\n padding: 30px;\n border-radius: 15px;\n max-width: 500px;\n width: 90%;\n box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);\n}\n\n.modal-content h3 {\n color: #2c3e50;\n margin-bottom: 20px;\n font-size: 1.3rem;\n}\n\n.justification-textarea {\n width: 100%;\n padding: 15px;\n border: 2px solid #ddd;\n border-radius: 8px;\n font-family: inherit;\n font-size: 14px;\n resize: vertical;\n min-height: 100px;\n}\n\n.justification-textarea:focus {\n outline: none;\n border-color: #3498db;\n box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);\n}\n\n.modal-buttons {\n margin-top: 20px;\n display: flex;\n gap: 10px;\n justify-content: flex-end;\n}\n\n.totals {\n background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);\n padding: 25px;\n border-radius: 15px;\n margin-top: 20px;\n}\n\n.total-row {\n display: flex;\n justify-content: space-between;\n margin-bottom: 10px;\n font-size: 1.1rem;\n}\n\n.total-row.grand-total {\n border-top: 2px solid #3498db;\n padding-top: 15px;\n margin-top: 15px;\n font-weight: bold;\n font-size: 1.3rem;\n color: #2c3e50;\n}\n\n.justification-note {\n background: #fff3cd;\n border: 1px solid #ffc107;\n border-radius: 8px;\n padding: 10px;\n margin-top: 10px;\n font-size: 12px;\n color: #856404;\n}\n\n.price-change-indicator {\n background: #dc3545;\n color: white;\n border-radius: 50%;\n width: 20px;\n height: 20px;\n font-size: 12px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: 5px;\n}\n\n@media (max-width: 768px) {\n .po-header {\n grid-template-columns: 1fr;\n gap: 20px;\n }\n\n .items-table {\n font-size: 14px;\n }\n\n .items-table th,\n .items-table td {\n padding: 10px 8px;\n }\n\n .price-input {\n width: 80px;\n }\n}\n</style>","// ===== src/utils/sidebarConfig.js =====\nexport const createSidebarConfig = (options = {}) => {\n return {\n brandName: options.brandName || 'OceanHelm',\n logoIcon: options.logoIcon || 'bi bi-water',\n showLogo: options.showLogo !== false,\n responsive: options.responsive !== false,\n ...options\n }\n}\n\nexport const defaultMenuItems = [\n {\n type: 'link',\n label: 'Home',\n icon: 'bi bi-house',\n roles: ['owner', 'staff', 'captain'],\n href: '/app/dashboard',\n active: true\n },\n {\n type: 'button',\n label: 'Guide',\n icon: 'bi bi-compass',\n action: 'guide',\n roles: ['crew']\n\n },\n {\n type: 'link',\n label: 'Activity Log',\n icon: 'bi bi-activity',\n href: '/activity-log',\n roles: ['owner'] // Role-based visibility\n },\n {\n type: 'link',\n label: 'People Manager',\n icon: 'bi bi-person-plus',\n href: '/app/people-manager',\n roles: ['owner'] // Role-based visibility\n },\n {\n type: 'text',\n label: 'Modules'\n },\n {\n type: 'dropdown',\n label: 'Compliance',\n roles: ['owner', 'staff', 'captain'],\n icon: 'bi bi-list-ul',\n children: [\n {\n label: 'Vessel Certification',\n action: 'vessel-cert',\n },\n {\n label: 'Reports',\n action: 'reports'\n },\n {\n label: 'Crew Certification',\n action: 'crew-cert',\n },\n {\n label: 'QHSE Compliance',\n action: 'qhse',\n },\n {\n label: 'Track Garbage',\n action: 'garbage',\n },\n ]\n },\n /* \n {\n type: 'link',\n label: 'Business Intelligence',\n icon: 'bi bi-graph-up-arrow',\n href: '/app/analytics'\n },\n */\n {\n type: 'button',\n label: 'Maintenance',\n icon: 'bi bi-tools',\n action: 'maintenance',\n roles: ['owner', 'staff', 'captain']\n },\n {\n type: 'dropdown',\n label: 'Crew Management',\n icon: 'bi bi-people',\n roles: ['owner', 'staff', 'captain'],\n children: [\n {\n label: 'All Crew',\n action: 'crew-all',\n roles: ['owner', 'staff']\n },\n {\n label: 'Get Crew by Vessel',\n action: 'crew-by-vessel'\n },\n {\n label: 'Schedule',\n action: 'schedule'\n },\n ]\n },\n {\n type: 'dropdown',\n label: 'Inventory Management',\n icon: 'bi bi-clipboard-data',\n roles: ['owner', 'staff', 'captain'],\n children: [\n {\n label: 'Parts Inventory',\n action: 'inventory',\n roles: ['owner', 'staff', 'captain']\n },\n {\n label: 'Bunkering',\n action: 'fuel',\n roles: ['owner', 'staff', 'captain']\n }\n ]\n },\n {\n type: 'link',\n label: 'Requisition Processing',\n icon: 'bi bi-calendar-check',\n href: '/app/requisition',\n roles: ['owner', 'staff', 'captain']\n },\n {\n type: 'button',\n label: 'Voyage Manager',\n icon: 'fas fa-ship',\n action: 'coming-soon',\n roles: ['owner', 'staff', 'captain']\n\n },\n {\n type: 'button',\n label: 'Vessel Log',\n icon: 'bi bi-file-ruled',\n // action: 'vessel-log',\n action: 'coming-soon',\n roles: ['owner', 'staff', 'captain']\n },\n {\n type: 'button',\n label: 'Profile',\n icon: 'bi bi-people',\n action: 'crew-profile',\n roles: ['crew']\n\n },\n {\n type: 'button',\n label: 'Training',\n icon: 'bi bi-book',\n action: 'crew-training',\n roles: ['crew']\n\n },\n {\n type: 'button',\n label: 'Settings',\n icon: 'bi bi-gear',\n action: 'settings',\n roles: ['owner', 'staff']\n },\n {\n type: 'button',\n label: 'Help & Support',\n icon: 'bi bi-question-circle',\n action: 'help',\n }\n]","// ===== src/utils/permissions.js =====\nexport const defaultPermissionChecker = (item, userProfile) => {\n // No role restrictions\n if (!item.roles || item.roles.length === 0) {\n return true\n }\n\n // Check if user role is in allowed roles\n return item.roles.includes(userProfile?.role)\n}","// src/index.js - Library entry point\nimport ConfigurableSidebar from './components/ConfigurableSidebar.vue'\nimport VesselList from './components/VesselList.vue'\nimport DashHead from './components/DashHead.vue' \nimport Reports from './components/Reports.vue' \nimport OceanHelmMaintenance from './components/OceanHelmMaintenance.vue'\nimport ActivityLogs from './components/ActivityLogs.vue'\nimport CrewManagement from './components/CrewManagement.vue'\nimport RequisitionSystem from './components/RequisitionSystem.vue'\n\nimport { createSidebarConfig, defaultMenuItems } from './utils/sidebarConfig'\nimport { defaultPermissionChecker } from './utils/permissions'\n\n// Export main components\nexport { ConfigurableSidebar, VesselList, DashHead, Reports, CrewManagement, ActivityLogs, OceanHelmMaintenance, RequisitionSystem }\n\n// Export utilities\nexport { createSidebarConfig, defaultMenuItems, defaultPermissionChecker }\n\n// Export types for TypeScript users\nexport * from './types'\n\n// Default export for plugin-style usage\nexport default {\n install(app, options = {}) {\n app.component('ConfigurableSidebar', ConfigurableSidebar)\n app.component('VesselLists', VesselList)\n app.component('DashHead', DashHead)\n app.component('Reports', Reports)\n app.component('ActivityLogs', ActivityLogs)\n app.component('CrewManagement', CrewManagement)\n app.component('RequisitionSystem', RequisitionSystem)\n app.component('OceanHelmMaintenance', OceanHelmMaintenance)\n\n // Provide global configuration\n app.provide('sidebarConfig', options)\n }\n}"],"names":["_sfc_main","item","child","i","_a","sidebarToggle","sidebar","content","event","isClickInsideSidebar","isClickOnToggleBtn","_hoisted_2","_hoisted_3","_hoisted_8","_createElementBlock","$options","$props","_openBlock","_hoisted_1","_createElementVNode","_toDisplayString","_Fragment","_renderList","index","$event","_withModifiers","_normalizeClass","_createTextVNode","_withDirectives","subItem","subIndex","_hoisted_9","_vShow","_hoisted_10","_hoisted_11","_renderSlot","_ctx","vessel","status","navigationData","action","date","registrationNumber","now","inputDate","diffMs","diffHours","days","hours","result","role","userVessel","expiry_date","today","diffTime","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_14","_hoisted_15","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_26","_hoisted_27","_hoisted_29","_hoisted_31","$data","_cache","args","_hoisted_12","_hoisted_13","_hoisted_16","_hoisted_25","_hoisted_28","_hoisted_30","_hoisted_33","ctx","ref","r","folder","f","report","el","target","e","newFolder","files","newFiles","file","folderId","fileId","removedFile","deleted","id","bytes","k","sizes","d","_hoisted_17","_hoisted_32","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","_hoisted_41","_hoisted_42","_hoisted_43","_hoisted_44","_hoisted_47","_hoisted_49","_hoisted_51","_hoisted_53","_hoisted_54","_hoisted_56","_hoisted_57","_hoisted_58","_hoisted_60","_hoisted_61","_hoisted_62","_hoisted_63","_hoisted_66","_hoisted_68","_hoisted_70","_hoisted_71","_hoisted_72","_hoisted_73","_hoisted_74","_hoisted_75","_hoisted_76","_hoisted_77","_hoisted_78","_hoisted_79","_hoisted_80","_hoisted_81","_hoisted_82","_hoisted_84","_hoisted_86","_hoisted_87","_createVNode","_Transition","_hoisted_34","_hoisted_40","_hoisted_45","_hoisted_46","_hoisted_48","x","_hoisted_50","_hoisted_52","_vModelSelect","_vModelText","_hoisted_59","_hoisted_64","_hoisted_69","_hoisted_83","_hoisted_85","newDate","task","query","total","profile","taskId","checklist","newTask","filter","taskComponent","t","requiredFields","field","section","recurrence","nextDate","nextDueDate","diffDays","taskData","success","updateData","updatedAfter","dateString","completed","_hoisted_65","_hoisted_67","_hoisted_89","_hoisted_90","_hoisted_91","_hoisted_92","_hoisted_93","_hoisted_94","_hoisted_95","_hoisted_96","_hoisted_97","member","_vModelCheckbox","_hoisted_55","_hoisted_88","_normalizeStyle","recommendation","timestamp","log","change","key","page","cert","companyVerification","v","matchesSearch","matchesStatus","entries","logEntry","a","b","dateA","dateB","filtered","entry","search","dates","minDate","maxDate","formatDate","breakdown","vessels","isVessel","rolePermissions","mostRecentOnboard","onboardDate","arrivalDate","newGuest","duration","sorted","valA","valB","hasName","hasDate","hasImage","validCertifications","finalRole","certificationsWithUrls","uploadResult","newMember","email","resolve","reject","embarkDate","memberId","certification","reader","fileInput","expiryDate","dateStr","expiry","oneMonthFromNow","_hoisted_98","_hoisted_99","_hoisted_101","_hoisted_103","_hoisted_106","_hoisted_107","_hoisted_109","_hoisted_111","_hoisted_112","_hoisted_113","data","_hoisted_100","_hoisted_102","_hoisted_104","_hoisted_105","_hoisted_108","_hoisted_110","req","tab","sum","unitPrice","userId","_b","tabName","taxRate","value","statusFields","requisition","_c","details","info","isPrinting","_hoisted_124","_hoisted_125","_hoisted_126","_hoisted_127","_hoisted_128","_hoisted_129","_hoisted_130","_hoisted_131","dept","unit","_d","_e","_f","_g","_h","_hoisted_115","_hoisted_116","_hoisted_118","_hoisted_120","_hoisted_121","_hoisted_122","_hoisted_119","_hoisted_123","_i","_k","_j","_m","_l","_hoisted_132","_hoisted_133","createSidebarConfig","options","defaultMenuItems","defaultPermissionChecker","userProfile","app","ConfigurableSidebar","VesselList","DashHead","Reports","ActivityLogs","CrewManagement","RequisitionSystem","OceanHelmMaintenance"],"mappings":"+UAwDKA,EAAU,CACb,KAAM,sBAEN,MAAO,CAEL,UAAW,CACT,KAAM,OACN,QAAS,WACV,EACD,SAAU,CACR,KAAM,OACN,QAAS,aACV,EACD,SAAU,CACR,KAAM,QACN,QAAS,EACV,EAGD,UAAW,CACT,KAAM,MACN,SAAU,GACV,QAAS,IAAM,CAAC,CACjB,EAGD,YAAa,CACX,KAAM,OACN,QAAS,KAAO,CAAA,EACjB,EAGD,WAAY,CACV,KAAM,QACN,QAAS,EACV,EAGD,cAAe,CACb,KAAM,OACN,QAAS,EACV,EAGD,kBAAmB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