oceanhelm 0.0.14 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/oceanhelm.es.js +1015 -1006
- package/dist/oceanhelm.es.js.map +1 -1
- package/dist/oceanhelm.umd.js +4 -4
- package/dist/oceanhelm.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Reports.vue +198 -567
- package/src/components/VesselList.vue +15 -16
- package/src/utils/sidebarConfig.js +32 -29
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
<!-- Fleet Summary -->
|
|
3
3
|
<div class="row mb-3">
|
|
4
4
|
<div class="col-md-4">
|
|
5
|
-
<div class="card border-0 shadow-sm"
|
|
6
|
-
|
|
7
|
-
:class="{ 'border-primary border-2': activeFilter === 'Active' }"
|
|
8
|
-
style="cursor: pointer;">
|
|
5
|
+
<div class="card border-0 shadow-sm" @click="filterVessels('Active')"
|
|
6
|
+
:class="{ 'border-primary border-2': activeFilter === 'Active' }" style="cursor: pointer;">
|
|
9
7
|
<div class="card-body d-flex align-items-center">
|
|
10
8
|
<div class="rounded-circle bg-primary bg-opacity-10 p-3 me-3">
|
|
11
9
|
<i class="bi bi-check-circle-fill text-primary fs-4"></i>
|
|
@@ -18,10 +16,8 @@
|
|
|
18
16
|
</div>
|
|
19
17
|
</div>
|
|
20
18
|
<div class="col-md-4">
|
|
21
|
-
<div class="card border-0 shadow-sm"
|
|
22
|
-
|
|
23
|
-
:class="{ 'border-secondary border-2': activeFilter === 'Inactive' }"
|
|
24
|
-
style="cursor: pointer;">
|
|
19
|
+
<div class="card border-0 shadow-sm" @click="filterVessels('Inactive')"
|
|
20
|
+
:class="{ 'border-secondary border-2': activeFilter === 'Inactive' }" style="cursor: pointer;">
|
|
25
21
|
<div class="card-body d-flex align-items-center">
|
|
26
22
|
<div class="rounded-circle bg-secondary bg-opacity-10 p-3 me-3">
|
|
27
23
|
<i class="bi bi-pause-circle-fill text-secondary fs-4"></i>
|
|
@@ -50,10 +46,7 @@
|
|
|
50
46
|
|
|
51
47
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
52
48
|
<h4 class="mb-0"><i class="bi bi-ship me-2"></i>Registered Vessels</h4>
|
|
53
|
-
<button
|
|
54
|
-
v-if="activeFilter !== 'All'"
|
|
55
|
-
class="btn btn-sm btn-outline-secondary"
|
|
56
|
-
@click="clearFilter">
|
|
49
|
+
<button v-if="activeFilter !== 'All'" class="btn btn-sm btn-outline-secondary" @click="clearFilter">
|
|
57
50
|
<i class="bi bi-x-circle me-1"></i>Clear Filter
|
|
58
51
|
</button>
|
|
59
52
|
</div>
|
|
@@ -334,11 +327,17 @@ export default {
|
|
|
334
327
|
},
|
|
335
328
|
|
|
336
329
|
grantAccess(vessel) {
|
|
337
|
-
const { role, vessel: userVessel } = this.userProfile;
|
|
330
|
+
const { role, vessel: userVessel, categories = [] } = this.userProfile;
|
|
331
|
+
|
|
332
|
+
// Assign marine-staff only
|
|
333
|
+
this.userRole = categories.includes('marine-staff') ? 'marine-staff' : 'staff';
|
|
334
|
+
|
|
335
|
+
return (
|
|
336
|
+
role === 'owner' ||
|
|
337
|
+
role === 'marine-staff' ||
|
|
338
|
+
(role === 'captain' && userVessel === vessel.name)
|
|
339
|
+
);
|
|
338
340
|
|
|
339
|
-
return role === 'owner' ||
|
|
340
|
-
role === 'staff' ||
|
|
341
|
-
(role === 'captain' && userVessel === vessel.name);
|
|
342
341
|
},
|
|
343
342
|
|
|
344
343
|
getDaysToExpiry(expiry_date) {
|
|
@@ -49,14 +49,17 @@ export const defaultMenuItems = [
|
|
|
49
49
|
{
|
|
50
50
|
type: 'dropdown',
|
|
51
51
|
label: 'Compliance',
|
|
52
|
-
roles: ['owner', '
|
|
52
|
+
roles: ['owner', 'staff', 'captain'],
|
|
53
53
|
icon: 'bi bi-list-ul',
|
|
54
54
|
children: [
|
|
55
55
|
{ label: 'Vessel Certification', action: 'vessel-cert' },
|
|
56
|
-
{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
{
|
|
57
|
+
label: 'Reports', action: 'reports', roles: ['owner', 'staff', 'captain'],
|
|
58
|
+
categories: ['marine-staff']
|
|
59
|
+
}, // only visible to staff who also have the 'marine-staff' category
|
|
60
|
+
{ label: 'Crew Certification', action: 'crew-cert', roles: ['owner', 'staff', 'captain'], categories: ['marine-staff'] },
|
|
61
|
+
{ label: 'QHSE Compliance', action: 'qhse', roles: ['owner', 'staff', 'captain'], categories: ['marine-staff'] },
|
|
62
|
+
{ label: 'Track Garbage', action: 'garbage', roles: ['owner', 'staff', 'captain'], categories: ['marine-staff'] },
|
|
60
63
|
]
|
|
61
64
|
},
|
|
62
65
|
{
|
|
@@ -66,37 +69,38 @@ export const defaultMenuItems = [
|
|
|
66
69
|
type: 'dropdown',
|
|
67
70
|
label: 'HR',
|
|
68
71
|
icon: 'bi bi-people-fill',
|
|
69
|
-
roles: ['owner', '
|
|
72
|
+
roles: ['owner', 'captain', 'staff'],
|
|
70
73
|
categories: ['hr'], // staff must also have this category
|
|
71
74
|
children: [
|
|
72
75
|
{
|
|
73
76
|
label: 'Attendance',
|
|
74
77
|
action: 'hr-attendance',
|
|
75
|
-
roles: ['owner', '
|
|
76
|
-
categories: ['hr'],
|
|
78
|
+
roles: ['owner', 'captain', 'staff'],
|
|
79
|
+
categories: ['hr', 'marine-staff'],
|
|
77
80
|
},
|
|
78
81
|
{
|
|
79
82
|
label: 'Payroll',
|
|
80
83
|
action: 'hr-payroll',
|
|
81
|
-
roles: ['owner', '
|
|
84
|
+
roles: ['owner', 'staff'],
|
|
82
85
|
categories: ['hr'],
|
|
83
86
|
},
|
|
84
87
|
{
|
|
85
88
|
label: 'Appraisals',
|
|
86
89
|
action: 'hr-appraisals',
|
|
87
|
-
roles: ['owner', '
|
|
90
|
+
roles: ['owner', 'captain', 'staff'],
|
|
88
91
|
categories: ['hr'],
|
|
89
92
|
},
|
|
90
93
|
{
|
|
91
94
|
label: 'Leave Management',
|
|
92
95
|
action: 'hr-leave',
|
|
93
|
-
roles: ['owner', '
|
|
96
|
+
roles: ['owner', 'staff'],
|
|
94
97
|
categories: ['hr'],
|
|
95
98
|
},
|
|
96
99
|
{
|
|
97
100
|
label: 'Disciplinary Log',
|
|
98
101
|
action: 'hr-disciplinary',
|
|
99
|
-
roles: ['owner'], // owner-only, no category gate needed
|
|
102
|
+
roles: ['owner', 'staff'], // owner-only, no category gate needed
|
|
103
|
+
categories: ['hr'],
|
|
100
104
|
},
|
|
101
105
|
]
|
|
102
106
|
},
|
|
@@ -110,13 +114,7 @@ export const defaultMenuItems = [
|
|
|
110
114
|
categories: ['hr'], // staff must also have this category
|
|
111
115
|
children: [
|
|
112
116
|
{
|
|
113
|
-
label: 'Recruitment
|
|
114
|
-
action: 'recruitment-tracker',
|
|
115
|
-
roles: ['owner', 'super-staff', 'staff'],
|
|
116
|
-
categories: ['hr'],
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
label: 'Recruitment Builder',
|
|
117
|
+
label: 'Manage Recruitment',
|
|
120
118
|
action: 'recruitment-builder',
|
|
121
119
|
roles: ['owner', 'super-staff', 'staff'],
|
|
122
120
|
categories: ['hr'],
|
|
@@ -129,17 +127,18 @@ export const defaultMenuItems = [
|
|
|
129
127
|
label: 'Maintenance',
|
|
130
128
|
icon: 'bi bi-tools',
|
|
131
129
|
action: 'maintenance',
|
|
132
|
-
roles: ['owner', '
|
|
130
|
+
roles: ['owner', 'staff', 'captain'],
|
|
131
|
+
categories: ['marine-staff']
|
|
133
132
|
},
|
|
134
133
|
{
|
|
135
134
|
type: 'dropdown',
|
|
136
135
|
label: 'Crew Management',
|
|
137
136
|
icon: 'bi bi-people',
|
|
138
|
-
roles: ['owner',
|
|
137
|
+
roles: ['owner','staff', 'captain'],
|
|
139
138
|
children: [
|
|
140
|
-
{ label: 'All Crew',
|
|
141
|
-
{ label: 'Get Crew by Vessel', action: 'crew-by-vessel' },
|
|
142
|
-
{ label: 'Schedule',
|
|
139
|
+
{ label: 'All Crew', action: 'crew-all', roles: ['owner', 'staff'], categories: ['marine-staff'] },
|
|
140
|
+
{ label: 'Get Crew by Vessel', action: 'crew-by-vessel', roles: ['owner', 'captain', 'staff'], categories: ['marine-staff'] },
|
|
141
|
+
{ label: 'Schedule', action: 'schedule', roles: ['owner', 'captain'] },
|
|
143
142
|
]
|
|
144
143
|
},
|
|
145
144
|
{
|
|
@@ -148,8 +147,8 @@ export const defaultMenuItems = [
|
|
|
148
147
|
icon: 'bi bi-clipboard-data',
|
|
149
148
|
roles: ['owner', 'super-staff', 'staff', 'captain'],
|
|
150
149
|
children: [
|
|
151
|
-
{ label: 'Parts Inventory', action: 'inventory', roles: ['owner', '
|
|
152
|
-
{ label: 'Bunkering',
|
|
150
|
+
{ label: 'Parts Inventory', action: 'inventory', roles: ['owner', 'staff', 'captain'], categories: ['controller', 'marine-staff'] },
|
|
151
|
+
{ label: 'Bunkering', action: 'fuel', roles: ['owner', 'staff', 'captain'], categories: ['controller', 'marine-staff'] },
|
|
153
152
|
]
|
|
154
153
|
},
|
|
155
154
|
{
|
|
@@ -157,21 +156,25 @@ export const defaultMenuItems = [
|
|
|
157
156
|
label: 'Requisition Processing',
|
|
158
157
|
icon: 'bi bi-calendar-check',
|
|
159
158
|
href: '/app/requisition',
|
|
160
|
-
roles: ['owner', '
|
|
159
|
+
roles: ['owner', 'staff', 'captain'],
|
|
160
|
+
categories: ['controller', 'marine-staff', 'requisitor', 'purchaser']
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
type: 'button',
|
|
164
164
|
label: 'Voyage Manager',
|
|
165
165
|
icon: 'fas fa-ship',
|
|
166
166
|
action: 'coming-soon',
|
|
167
|
-
roles: ['owner', '
|
|
167
|
+
roles: ['owner', 'staff', 'captain'],
|
|
168
|
+
categories: ['marine-staff']
|
|
168
169
|
},
|
|
169
170
|
{
|
|
170
171
|
type: 'button',
|
|
171
172
|
label: 'Vessel Log',
|
|
172
173
|
icon: 'bi bi-file-ruled',
|
|
173
174
|
action: 'coming-soon',
|
|
174
|
-
roles: ['owner', '
|
|
175
|
+
roles: ['owner', 'staff', 'captain'],
|
|
176
|
+
categories: ['marine-staff']
|
|
177
|
+
|
|
175
178
|
},
|
|
176
179
|
{
|
|
177
180
|
type: 'button',
|