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