oceanhelm 0.0.12 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/oceanhelm.es.js +2640 -1687
- package/dist/oceanhelm.es.js.map +1 -1
- package/dist/oceanhelm.umd.js +9 -1
- package/dist/oceanhelm.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/ConfigurableSidebar.vue +44 -34
- package/src/components/Reports.vue +2204 -484
- package/src/utils/sidebarConfig.js +77 -55
|
@@ -9,12 +9,14 @@ export const createSidebarConfig = (options = {}) => {
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
// Roles that behave like "owner" in terms of broad visibility
|
|
13
|
+
// (super-staff gets everything owner sees, minus Activity Log and approvals)
|
|
12
14
|
export const defaultMenuItems = [
|
|
13
15
|
{
|
|
14
16
|
type: 'link',
|
|
15
17
|
label: 'Home',
|
|
16
18
|
icon: 'bi bi-house',
|
|
17
|
-
roles: ['owner', 'staff', 'captain'],
|
|
19
|
+
roles: ['owner', 'super-staff', 'staff', 'captain'],
|
|
18
20
|
href: '/app/dashboard',
|
|
19
21
|
active: true
|
|
20
22
|
},
|
|
@@ -24,21 +26,21 @@ export const defaultMenuItems = [
|
|
|
24
26
|
icon: 'bi bi-compass',
|
|
25
27
|
action: 'guide',
|
|
26
28
|
roles: ['crew']
|
|
27
|
-
|
|
28
29
|
},
|
|
29
30
|
{
|
|
31
|
+
// Activity Log — intentionally excluded from super-staff
|
|
30
32
|
type: 'link',
|
|
31
33
|
label: 'Activity Log',
|
|
32
34
|
icon: 'bi bi-activity',
|
|
33
35
|
href: '/activity-log',
|
|
34
|
-
roles: ['owner']
|
|
36
|
+
roles: ['owner']
|
|
35
37
|
},
|
|
36
38
|
{
|
|
37
39
|
type: 'link',
|
|
38
40
|
label: 'People Manager',
|
|
39
41
|
icon: 'bi bi-person-plus',
|
|
40
42
|
href: '/app/people-manager',
|
|
41
|
-
roles: ['owner'
|
|
43
|
+
roles: ['owner', 'super-staff']
|
|
42
44
|
},
|
|
43
45
|
{
|
|
44
46
|
type: 'text',
|
|
@@ -47,83 +49,107 @@ export const defaultMenuItems = [
|
|
|
47
49
|
{
|
|
48
50
|
type: 'dropdown',
|
|
49
51
|
label: 'Compliance',
|
|
50
|
-
roles: ['owner', 'staff', 'captain'],
|
|
52
|
+
roles: ['owner', 'super-staff', 'staff', 'captain'],
|
|
51
53
|
icon: 'bi bi-list-ul',
|
|
54
|
+
children: [
|
|
55
|
+
{ label: 'Vessel Certification', action: 'vessel-cert' },
|
|
56
|
+
{ label: 'Reports', action: 'reports' },
|
|
57
|
+
{ label: 'Crew Certification', action: 'crew-cert' },
|
|
58
|
+
{ label: 'QHSE Compliance', action: 'qhse' },
|
|
59
|
+
{ label: 'Track Garbage', action: 'garbage' },
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
// ── HR MODULE ──────────────────────────────────────────────────────────
|
|
64
|
+
// Visible to owner, super-staff, and staff with the 'hr' category.
|
|
65
|
+
// Category-based filtering is handled by the sidebar's permissionChecker.
|
|
66
|
+
type: 'dropdown',
|
|
67
|
+
label: 'HR',
|
|
68
|
+
icon: 'bi bi-people-fill',
|
|
69
|
+
roles: ['owner', 'super-staff', 'staff'],
|
|
70
|
+
categories: ['hr'], // staff must also have this category
|
|
52
71
|
children: [
|
|
53
72
|
{
|
|
54
|
-
label: '
|
|
55
|
-
action: '
|
|
73
|
+
label: 'Attendance',
|
|
74
|
+
action: 'hr-attendance',
|
|
75
|
+
roles: ['owner', 'super-staff', 'staff'],
|
|
76
|
+
categories: ['hr'],
|
|
56
77
|
},
|
|
57
78
|
{
|
|
58
|
-
label: '
|
|
59
|
-
action: '
|
|
79
|
+
label: 'Payroll',
|
|
80
|
+
action: 'hr-payroll',
|
|
81
|
+
roles: ['owner', 'super-staff', 'staff'],
|
|
82
|
+
categories: ['hr'],
|
|
60
83
|
},
|
|
61
84
|
{
|
|
62
|
-
label: '
|
|
63
|
-
action: '
|
|
85
|
+
label: 'Appraisals',
|
|
86
|
+
action: 'hr-appraisals',
|
|
87
|
+
roles: ['owner', 'super-staff', 'staff'],
|
|
88
|
+
categories: ['hr'],
|
|
64
89
|
},
|
|
65
90
|
{
|
|
66
|
-
label: '
|
|
67
|
-
action: '
|
|
91
|
+
label: 'Leave Management',
|
|
92
|
+
action: 'hr-leave',
|
|
93
|
+
roles: ['owner', 'super-staff', 'staff'],
|
|
94
|
+
categories: ['hr'],
|
|
68
95
|
},
|
|
69
96
|
{
|
|
70
|
-
label: '
|
|
71
|
-
action: '
|
|
97
|
+
label: 'Disciplinary Log',
|
|
98
|
+
action: 'hr-disciplinary',
|
|
99
|
+
roles: ['owner'], // owner-only, no category gate needed
|
|
72
100
|
},
|
|
73
101
|
]
|
|
74
102
|
},
|
|
75
|
-
/*
|
|
76
103
|
{
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
104
|
+
// ── RECRUITMENT MODULE ─────────────────────────────────────────────────
|
|
105
|
+
// Accessible to owner, super-staff, and staff with the 'hr' category.
|
|
106
|
+
type: 'dropdown',
|
|
107
|
+
label: 'Recruitment',
|
|
108
|
+
icon: 'bi bi-person-fill-add',
|
|
109
|
+
roles: ['owner', 'super-staff', 'staff'],
|
|
110
|
+
categories: ['hr'], // staff must also have this category
|
|
111
|
+
children: [
|
|
112
|
+
{
|
|
113
|
+
label: 'Recruitment Tracker',
|
|
114
|
+
action: 'recruitment-tracker',
|
|
115
|
+
roles: ['owner', 'super-staff', 'staff'],
|
|
116
|
+
categories: ['hr'],
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
label: 'Recruitment Builder',
|
|
120
|
+
action: 'recruitment-builder',
|
|
121
|
+
roles: ['owner', 'super-staff', 'staff'],
|
|
122
|
+
categories: ['hr'],
|
|
123
|
+
}
|
|
124
|
+
]
|
|
81
125
|
},
|
|
82
|
-
*/
|
|
126
|
+
/* ── end HR / RECRUITMENT MODULES ── */
|
|
83
127
|
{
|
|
84
128
|
type: 'button',
|
|
85
129
|
label: 'Maintenance',
|
|
86
130
|
icon: 'bi bi-tools',
|
|
87
131
|
action: 'maintenance',
|
|
88
|
-
roles: ['owner', 'staff', 'captain']
|
|
132
|
+
roles: ['owner', 'super-staff', 'staff', 'captain']
|
|
89
133
|
},
|
|
90
134
|
{
|
|
91
135
|
type: 'dropdown',
|
|
92
136
|
label: 'Crew Management',
|
|
93
137
|
icon: 'bi bi-people',
|
|
94
|
-
roles: ['owner', 'staff', 'captain'],
|
|
138
|
+
roles: ['owner', 'super-staff', 'staff', 'captain'],
|
|
95
139
|
children: [
|
|
96
|
-
{
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
roles: ['owner', 'staff']
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
label: 'Get Crew by Vessel',
|
|
103
|
-
action: 'crew-by-vessel'
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
label: 'Schedule',
|
|
107
|
-
action: 'schedule'
|
|
108
|
-
},
|
|
140
|
+
{ label: 'All Crew', action: 'crew-all', roles: ['owner', 'super-staff', 'staff'] },
|
|
141
|
+
{ label: 'Get Crew by Vessel', action: 'crew-by-vessel' },
|
|
142
|
+
{ label: 'Schedule', action: 'schedule' },
|
|
109
143
|
]
|
|
110
144
|
},
|
|
111
145
|
{
|
|
112
146
|
type: 'dropdown',
|
|
113
147
|
label: 'Inventory Management',
|
|
114
148
|
icon: 'bi bi-clipboard-data',
|
|
115
|
-
roles: ['owner', 'staff', 'captain'],
|
|
149
|
+
roles: ['owner', 'super-staff', 'staff', 'captain'],
|
|
116
150
|
children: [
|
|
117
|
-
{
|
|
118
|
-
|
|
119
|
-
action: 'inventory',
|
|
120
|
-
roles: ['owner', 'staff', 'captain']
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
label: 'Bunkering',
|
|
124
|
-
action: 'fuel',
|
|
125
|
-
roles: ['owner', 'staff', 'captain']
|
|
126
|
-
}
|
|
151
|
+
{ label: 'Parts Inventory', action: 'inventory', roles: ['owner', 'super-staff', 'staff', 'captain'] },
|
|
152
|
+
{ label: 'Bunkering', action: 'fuel', roles: ['owner', 'super-staff', 'staff', 'captain'] },
|
|
127
153
|
]
|
|
128
154
|
},
|
|
129
155
|
{
|
|
@@ -131,23 +157,21 @@ export const defaultMenuItems = [
|
|
|
131
157
|
label: 'Requisition Processing',
|
|
132
158
|
icon: 'bi bi-calendar-check',
|
|
133
159
|
href: '/app/requisition',
|
|
134
|
-
roles: ['owner', 'staff', 'captain']
|
|
160
|
+
roles: ['owner', 'super-staff', 'staff', 'captain']
|
|
135
161
|
},
|
|
136
162
|
{
|
|
137
163
|
type: 'button',
|
|
138
164
|
label: 'Voyage Manager',
|
|
139
165
|
icon: 'fas fa-ship',
|
|
140
166
|
action: 'coming-soon',
|
|
141
|
-
roles: ['owner', 'staff', 'captain']
|
|
142
|
-
|
|
167
|
+
roles: ['owner', 'super-staff', 'staff', 'captain']
|
|
143
168
|
},
|
|
144
169
|
{
|
|
145
170
|
type: 'button',
|
|
146
171
|
label: 'Vessel Log',
|
|
147
172
|
icon: 'bi bi-file-ruled',
|
|
148
|
-
// action: 'vessel-log',
|
|
149
173
|
action: 'coming-soon',
|
|
150
|
-
roles: ['owner', 'staff', 'captain']
|
|
174
|
+
roles: ['owner', 'super-staff', 'staff', 'captain']
|
|
151
175
|
},
|
|
152
176
|
{
|
|
153
177
|
type: 'button',
|
|
@@ -155,7 +179,6 @@ export const defaultMenuItems = [
|
|
|
155
179
|
icon: 'bi bi-people',
|
|
156
180
|
action: 'crew-profile',
|
|
157
181
|
roles: ['crew']
|
|
158
|
-
|
|
159
182
|
},
|
|
160
183
|
{
|
|
161
184
|
type: 'button',
|
|
@@ -163,14 +186,13 @@ export const defaultMenuItems = [
|
|
|
163
186
|
icon: 'bi bi-book',
|
|
164
187
|
action: 'crew-training',
|
|
165
188
|
roles: ['crew']
|
|
166
|
-
|
|
167
189
|
},
|
|
168
190
|
{
|
|
169
191
|
type: 'button',
|
|
170
192
|
label: 'Settings',
|
|
171
193
|
icon: 'bi bi-gear',
|
|
172
194
|
action: 'settings',
|
|
173
|
-
roles: ['owner', 'staff']
|
|
195
|
+
roles: ['owner', 'super-staff', 'staff']
|
|
174
196
|
},
|
|
175
197
|
{
|
|
176
198
|
type: 'button',
|