Line 0
Link Here
|
|
|
1 |
<template> |
2 |
<div id="navmenu"> |
3 |
<div id="navmenulist"> |
4 |
<h5>{{ $__("Acquisitions") }}</h5> |
5 |
<ul> |
6 |
<li> |
7 |
<a |
8 |
ref="acquihome" |
9 |
href="/cgi-bin/koha/acqui/acqui-home.pl" |
10 |
>{{ $__("Acquisitions home") }}</a |
11 |
> |
12 |
</li> |
13 |
<li> |
14 |
<a |
15 |
ref="histsearch" |
16 |
href="/cgi-bin/koha/acqui/histsearch.pl" |
17 |
>{{ $__("Advanced search") }}</a |
18 |
> |
19 |
</li> |
20 |
<li |
21 |
v-if=" |
22 |
orderreceive || |
23 |
isUserPermitted('CAN_user_acquisition_order_receive') |
24 |
" |
25 |
> |
26 |
<a |
27 |
ref="lateorders" |
28 |
href="/cgi-bin/koha/acqui/lateorders.pl" |
29 |
>{{ $__("Late orders") }}</a |
30 |
> |
31 |
</li> |
32 |
<li |
33 |
v-if=" |
34 |
suggestionscreate || |
35 |
suggestionsmanage || |
36 |
suggestionsdelete || |
37 |
isUserPermitted( |
38 |
'CAN_user_suggestions_suggestions_create' |
39 |
) || |
40 |
isUserPermitted( |
41 |
'CAN_user_suggestions_suggestions_manage' |
42 |
) || |
43 |
isUserPermitted( |
44 |
'CAN_user_suggestions_suggestions_delete' |
45 |
) |
46 |
" |
47 |
> |
48 |
<a |
49 |
ref="suggestion" |
50 |
href="/cgi-bin/koha/suggestion/suggestion.pl" |
51 |
>{{ $__("Suggestions") }}</a |
52 |
> |
53 |
</li> |
54 |
<li> |
55 |
<a ref="invoices" href="/cgi-bin/koha/acqui/invoices.pl">{{ |
56 |
$__("Invoices") |
57 |
}}</a> |
58 |
</li> |
59 |
<li |
60 |
v-if=" |
61 |
edifactEnabled && |
62 |
(edimanage || |
63 |
isUserPermitted('CAN_user_acquisition_edi_manage')) |
64 |
" |
65 |
> |
66 |
<a |
67 |
ref="edifactmsgs" |
68 |
href="/cgi-bin/koha/acqui/edifactmsgs.pl" |
69 |
>{{ $__("EDIFACT messages") }}</a |
70 |
> |
71 |
</li> |
72 |
</ul> |
73 |
<template |
74 |
v-if=" |
75 |
reports || |
76 |
circulateremainingpermissions || |
77 |
isUserPermitted('CAN_user_reports') || |
78 |
isUserPermitted( |
79 |
'CAN_user_circulate_circulate_remaining_permissions' |
80 |
) |
81 |
" |
82 |
> |
83 |
<h5>{{ $__("Reports") }}</h5> |
84 |
<ul> |
85 |
<template |
86 |
v-if="reports || isUserPermitted('CAN_user_reports')" |
87 |
> |
88 |
<li> |
89 |
<a |
90 |
ref="acquisitions_stats" |
91 |
href="/cgi-bin/koha/reports/acquisitions_stats.pl" |
92 |
>{{ $__("Acquisitions statistics wizard") }}</a |
93 |
> |
94 |
</li> |
95 |
<li> |
96 |
<a |
97 |
ref="orders_by_fund" |
98 |
href="/cgi-bin/koha/reports/orders_by_fund.pl" |
99 |
>{{ $__("Orders by fund") }}</a |
100 |
> |
101 |
</li> |
102 |
</template> |
103 |
<li |
104 |
v-if=" |
105 |
circulateremainingpermissions || |
106 |
isUserPermitted( |
107 |
'CAN_user_circulate_circulate_remaining_permissions' |
108 |
) |
109 |
" |
110 |
> |
111 |
<a |
112 |
ref="reserveratios" |
113 |
href="/cgi-bin/koha/circ/reserveratios.pl" |
114 |
>{{ $__("Hold ratios") }}</a |
115 |
> |
116 |
</li> |
117 |
</ul> |
118 |
</template> |
119 |
<template |
120 |
v-if=" |
121 |
periodmanage || |
122 |
isUserPermitted('CAN_user_acquisition_period_manage') || |
123 |
budgetmanage || |
124 |
isUserPermitted('CAN_user_acquisition_budget_manage') || |
125 |
currenciesmanage || |
126 |
isUserPermitted('CAN_user_acquisition_currencies_manage') || |
127 |
(edifactEnabled && |
128 |
(edimanage || |
129 |
isUserPermitted( |
130 |
'CAN_user_acquisition_edi_manage' |
131 |
))) || |
132 |
(marcOrdersEnabled && |
133 |
(marcordermanage || |
134 |
isUserPermitted( |
135 |
'CAN_user_acquisition_marc_order_manage' |
136 |
))) || |
137 |
manageadditionalfields || |
138 |
isUserPermitted('CAN_user_acquisition_edi_manage') |
139 |
" |
140 |
> |
141 |
<h5>{{ $__("Administration") }}</h5> |
142 |
<ul> |
143 |
<li |
144 |
v-if=" |
145 |
periodmanage || |
146 |
isUserPermitted( |
147 |
'CAN_user_acquisition_period_manage' |
148 |
) |
149 |
" |
150 |
> |
151 |
<a |
152 |
ref="aqbudgetperiods" |
153 |
href="/cgi-bin/koha/admin/aqbudgetperiods.pl" |
154 |
>{{ $__("Budgets") }}</a |
155 |
> |
156 |
</li> |
157 |
<li |
158 |
v-if=" |
159 |
budgetmanage || |
160 |
isUserPermitted( |
161 |
'CAN_user_acquisition_budget_manage' |
162 |
) |
163 |
" |
164 |
> |
165 |
<a |
166 |
ref="aqbudgets" |
167 |
href="/cgi-bin/koha/admin/aqbudgets.pl" |
168 |
>{{ $__("Funds") }}</a |
169 |
> |
170 |
</li> |
171 |
<li |
172 |
v-if=" |
173 |
currenciesmanage || |
174 |
isUserPermitted( |
175 |
'CAN_user_acquisition_currencies_manage' |
176 |
) |
177 |
" |
178 |
> |
179 |
<a |
180 |
ref="currency" |
181 |
href="/cgi-bin/koha/admin/currency.pl" |
182 |
>{{ $__("Currencies") }}</a |
183 |
> |
184 |
</li> |
185 |
<template |
186 |
v-if=" |
187 |
(edifactEnabled && edimanage) || |
188 |
(edifactEnabled && |
189 |
isUserPermitted( |
190 |
'CAN_user_acquisition_edi_manage' |
191 |
)) |
192 |
" |
193 |
> |
194 |
<li> |
195 |
<a |
196 |
ref="edi_accounts" |
197 |
href="/cgi-bin/koha/admin/edi_accounts.pl" |
198 |
>{{ $__("EDI accounts") }}</a |
199 |
> |
200 |
</li> |
201 |
<li> |
202 |
<a |
203 |
ref="edi_ean_accounts" |
204 |
href="/cgi-bin/koha/admin/edi_ean_accounts.pl" |
205 |
>{{ $__("Library EANs") }}</a |
206 |
> |
207 |
</li> |
208 |
</template> |
209 |
<template |
210 |
v-if=" |
211 |
(marcOrdersEnabled && marcordermanage) || |
212 |
(marcOrdersEnabled && |
213 |
isUserPermitted( |
214 |
'CAN_user_acquisition_marc_order_manage' |
215 |
)) |
216 |
" |
217 |
> |
218 |
<li> |
219 |
<a |
220 |
ref="marc_order_accounts" |
221 |
href="/cgi-bin/koha/admin/marc_order_accounts.pl" |
222 |
>{{ $__("MARC order accounts") }}</a |
223 |
> |
224 |
</li> |
225 |
</template> |
226 |
<li |
227 |
v-if=" |
228 |
manageadditionalfields || |
229 |
isUserPermitted( |
230 |
'CAN_user_parameters_manage_additional_fields' |
231 |
) || |
232 |
invoiceedit || |
233 |
isUserPermitted( |
234 |
'CAN_user_acquisition_edit_invoices' |
235 |
) |
236 |
" |
237 |
> |
238 |
<a |
239 |
ref="additionalfieldsinvoices" |
240 |
href="/cgi-bin/koha/admin/additional-fields.pl?tablename=aqinvoices" |
241 |
>{{ $__("Manage invoice fields") }}</a |
242 |
> |
243 |
</li> |
244 |
<template |
245 |
v-if=" |
246 |
(manageadditionalfields || |
247 |
isUserPermitted( |
248 |
'CAN_user_parameters_manage_additional_fields' |
249 |
)) && |
250 |
(ordermanage || |
251 |
isUserPermitted( |
252 |
'CAN_user_acquisition_order_manage' |
253 |
)) |
254 |
" |
255 |
> |
256 |
<li> |
257 |
<a |
258 |
ref="additionalfieldsbaskets" |
259 |
href="/cgi-bin/koha/admin/additional-fields.pl?tablename=aqbasket" |
260 |
>{{ $__("Manage order basket fields") }}</a |
261 |
> |
262 |
</li> |
263 |
<li> |
264 |
<a |
265 |
ref="additionalfieldsorders" |
266 |
href="/cgi-bin/koha/admin/additional-fields.pl?tablename=aqorders" |
267 |
>{{ $__("Manage order line fields") }}</a |
268 |
> |
269 |
</li> |
270 |
</template> |
271 |
</ul> |
272 |
</template> |
273 |
</div> |
274 |
</div> |
275 |
</template> |
276 |
|
277 |
<script> |
278 |
import { inject } from "vue" |
279 |
import { storeToRefs } from "pinia" |
280 |
|
281 |
export default { |
282 |
props: { |
283 |
ordermanage: { |
284 |
type: Number, |
285 |
}, |
286 |
orderreceive: { |
287 |
type: Number, |
288 |
}, |
289 |
edifact: { |
290 |
type: Number, |
291 |
}, |
292 |
edimanage: { |
293 |
type: Number, |
294 |
}, |
295 |
reports: { |
296 |
type: Number, |
297 |
}, |
298 |
circulateremainingpermissions: { |
299 |
type: Number, |
300 |
}, |
301 |
periodmanage: { |
302 |
type: Number, |
303 |
}, |
304 |
budgetmanage: { |
305 |
type: Number, |
306 |
}, |
307 |
currenciesmanage: { |
308 |
type: Number, |
309 |
}, |
310 |
manageadditionalfields: { |
311 |
type: Number, |
312 |
}, |
313 |
invoiceedit: { |
314 |
type: Number, |
315 |
}, |
316 |
suggestionscreate: { |
317 |
type: Number, |
318 |
}, |
319 |
suggestionsmanage: { |
320 |
type: Number, |
321 |
}, |
322 |
suggestionsdelete: { |
323 |
type: Number, |
324 |
}, |
325 |
marcorderautomation: { |
326 |
type: Number, |
327 |
}, |
328 |
marcordermanage: { |
329 |
type: Number, |
330 |
}, |
331 |
}, |
332 |
setup() { |
333 |
const permissionsStore = inject("permissionsStore") |
334 |
const { isUserPermitted } = permissionsStore |
335 |
const navigationStore = inject("navigationStore") |
336 |
const { params } = storeToRefs(navigationStore) |
337 |
const vendorStore = inject("vendorStore") |
338 |
const { config } = storeToRefs(vendorStore) |
339 |
|
340 |
return { |
341 |
isUserPermitted, |
342 |
params, |
343 |
config, |
344 |
} |
345 |
}, |
346 |
data() { |
347 |
const edifactEnabled = this.config?.settings.edifact |
348 |
? this.config.settings.edifact |
349 |
: this.edifact |
350 |
const marcOrdersEnabled = this.config?.settings.marcorderautomation |
351 |
? this.config.settings.marcorderautomation |
352 |
: this.marcorderautomation |
353 |
|
354 |
return { |
355 |
edifactEnabled, |
356 |
marcOrdersEnabled, |
357 |
} |
358 |
}, |
359 |
mounted() { |
360 |
const path = location.pathname.substring(1) |
361 |
|
362 |
Object.keys(this.$refs).forEach(ref => { |
363 |
if (this.$refs[ref].href.includes(path)) { |
364 |
this.$refs[ref].classList.add("current") |
365 |
} |
366 |
}) |
367 |
}, |
368 |
} |
369 |
</script> |
370 |
|
371 |
<style></style> |