View | Details | Raw Unified | Return to bug 38010
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt (+1 lines)
Lines 534-539 Link Here
534
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
534
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
535
    [% Asset.js("js/acq.js") | $raw %]
535
    [% Asset.js("js/acq.js") | $raw %]
536
    [% INCLUDE 'datatables.inc' %]
536
    [% INCLUDE 'datatables.inc' %]
537
    [% Asset.js("js/vue/dist/islands.js", "init" => "1") | $raw %]
537
    <script>
538
    <script>
538
        function add_contact() {
539
        function add_contact() {
539
            var new_contact = $('#contact-template').clone();
540
            var new_contact = $('#contact-template').clone();
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/AcquisitionsMenu.vue (+311 lines)
Line 0 Link Here
1
<template>
2
    <div id="navmenu">
3
        <div id="navmenulist">
4
            <h5>{{ $__("Acquisitions") }}</h5>
5
            <ul>
6
                <li>
7
                    <a href="/cgi-bin/koha/acqui/acqui-home.pl">{{
8
                        $__("Acquisitions home")
9
                    }}</a>
10
                </li>
11
                <li>
12
                    <a href="/cgi-bin/koha/acqui/histsearch.pl">{{
13
                        $__("Advanced search")
14
                    }}</a>
15
                </li>
16
                <li
17
                    v-if="
18
                        orderreceive ||
19
                        isUserPermitted('CAN_user_acquisition_order_receive')
20
                    "
21
                >
22
                    <a href="/cgi-bin/koha/acqui/lateorders.pl">{{
23
                        $__("Late orders")
24
                    }}</a>
25
                </li>
26
                <li
27
                    v-if="
28
                        suggestionscreate ||
29
                        suggestionsmanage ||
30
                        suggestionsdelete ||
31
                        isUserPermitted(
32
                            'CAN_user_suggestions_suggestions_create'
33
                        ) ||
34
                        isUserPermitted(
35
                            'CAN_user_suggestions_suggestions_manage'
36
                        ) ||
37
                        isUserPermitted(
38
                            'CAN_user_suggestions_suggestions_delete'
39
                        )
40
                    "
41
                >
42
                    <a href="/cgi-bin/koha/suggestion/suggestion.pl">{{
43
                        $__("Suggestions")
44
                    }}</a>
45
                </li>
46
                <li>
47
                    <a href="/cgi-bin/koha/acqui/invoices.pl">{{
48
                        $__("Invoices")
49
                    }}</a>
50
                </li>
51
                <li
52
                    v-if="
53
                        edifactEnabled &&
54
                        (edimanage ||
55
                            isUserPermitted('CAN_user_acquisition_edi_manage'))
56
                    "
57
                >
58
                    <a href="/cgi-bin/koha/acqui/edifactmsgs.pl">{{
59
                        $__("EDIFACT messages")
60
                    }}</a>
61
                </li>
62
            </ul>
63
            <template
64
                v-if="
65
                    reports ||
66
                    circulateremainingpositions ||
67
                    isUserPermitted('CAN_user_reports') ||
68
                    isUserPermitted(
69
                        'CAN_user_circulate_circulate_remaining_permissions'
70
                    )
71
                "
72
            >
73
                <h5>{{ $__("Reports") }}</h5>
74
                <ul>
75
                    <template
76
                        v-if="reports || isUserPermitted('CAN_user_reports')"
77
                    >
78
                        <li>
79
                            <a
80
                                href="/cgi-bin/koha/reports/acquisitions_stats.pl"
81
                                >{{ $__("Acquisitions statistics wizard") }}</a
82
                            >
83
                        </li>
84
                        <li>
85
                            <a href="/cgi-bin/koha/reports/orders_by_fund.pl">{{
86
                                $__("Orders by fund")
87
                            }}</a>
88
                        </li>
89
                    </template>
90
                    <li
91
                        v-if="
92
                            circulateremainingpositions ||
93
                            isUserPermitted(
94
                                'CAN_user_circulate_circulate_remaining_permissions'
95
                            )
96
                        "
97
                    >
98
                        <a href="/cgi-bin/koha/circ/reserveratios.pl">{{
99
                            $__("Hold ratios")
100
                        }}</a>
101
                    </li>
102
                </ul>
103
            </template>
104
            <template
105
                v-if="
106
                    periodmanage ||
107
                    isUserPermitted('CAN_user_acquisition_period_manage') ||
108
                    budgetmanage ||
109
                    isUserPermitted('CAN_user_acquisition_budget_manage') ||
110
                    currenciesmanage ||
111
                    isUserPermitted('CAN_user_acquisition_currencies_manage') ||
112
                    (edifactEnabled &&
113
                        (edimanage ||
114
                            isUserPermitted(
115
                                'CAN_user_acquisition_edi_manage'
116
                            ))) ||
117
                    manageadditionalfields ||
118
                    isUserPermitted('CAN_user_acquisition_edi_manage')
119
                "
120
            >
121
                <h5>{{ $__("Administration") }}</h5>
122
                <ul>
123
                    <li
124
                        v-if="
125
                            periodmanage ||
126
                            isUserPermitted(
127
                                'CAN_user_acquisition_period_manage'
128
                            )
129
                        "
130
                    >
131
                        <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">{{
132
                            $__("Budgets")
133
                        }}</a>
134
                    </li>
135
                    <li
136
                        v-if="
137
                            budgetmanage ||
138
                            isUserPermitted(
139
                                'CAN_user_acquisition_budget_manage'
140
                            )
141
                        "
142
                    >
143
                        <a href="/cgi-bin/koha/admin/aqbudgets.pl">{{
144
                            $__("Funds")
145
                        }}</a>
146
                    </li>
147
                    <li
148
                        v-if="
149
                            currenciesmanage ||
150
                            isUserPermitted(
151
                                'CAN_user_acquisition_currencies_manage'
152
                            )
153
                        "
154
                    >
155
                        <a href="/cgi-bin/koha/admin/currency.pl">{{
156
                            $__("Currencies")
157
                        }}</a>
158
                    </li>
159
                    <template
160
                        v-if="
161
                            (edifactEnabled && edimanage) ||
162
                            (edifactEnabled &&
163
                                isUserPermitted(
164
                                    'CAN_user_acquisition_edi_manage'
165
                                ))
166
                        "
167
                    >
168
                        <li>
169
                            <a href="/cgi-bin/koha/admin/edi_accounts.pl">{{
170
                                $__("EDI accounts")
171
                            }}</a>
172
                        </li>
173
                        <li>
174
                            <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl">{{
175
                                $__("Library EANs")
176
                            }}</a>
177
                        </li>
178
                    </template>
179
                    <li
180
                        v-if="
181
                            manageadditionalfields ||
182
                            isUserPermitted(
183
                                'CAN_user_parameters_manage_additional_fields'
184
                            ) ||
185
                            invoiceedit ||
186
                            isUserPermitted(
187
                                'CAN_user_acquisition_edit_invoices'
188
                            )
189
                        "
190
                    >
191
                        <a
192
                            href="/cgi-bin/koha/admin/additional-fields.pl?tablename=aqinvoices"
193
                            >{{ $__("Manage invoice fields") }}</a
194
                        >
195
                    </li>
196
                    <template
197
                        v-if="
198
                            (manageadditionalfields ||
199
                                isUserPermitted(
200
                                    'CAN_user_parameters_manage_additional_fields'
201
                                )) &&
202
                            (ordermanage ||
203
                                isUserPermitted(
204
                                    'CAN_user_acquisition_order_manage'
205
                                ))
206
                        "
207
                    >
208
                        <li>
209
                            <a
210
                                href="/cgi-bin/koha/admin/additional-fields.pl?tablename=aqbasket"
211
                                >{{ $__("Manage order basket fields") }}</a
212
                            >
213
                        </li>
214
                        <li>
215
                            <a
216
                                href="/cgi-bin/koha/admin/additional-fields.pl?tablename=aqorders"
217
                                >{{ $__("Manage order line fields") }}</a
218
                            >
219
                        </li>
220
                    </template>
221
                </ul>
222
            </template>
223
        </div>
224
    </div>
225
</template>
226
227
<script>
228
import { inject } from "vue"
229
import { storeToRefs } from "pinia"
230
231
export default {
232
    props: {
233
        ordermanage: {
234
            type: String,
235
        },
236
        orderreceive: {
237
            type: String,
238
        },
239
        groupmanage: {
240
            type: String,
241
        },
242
        contractsmanage: {
243
            type: String,
244
        },
245
        issuemanage: {
246
            type: String,
247
        },
248
        edifact: {
249
            type: String,
250
        },
251
        edimanage: {
252
            type: String,
253
        },
254
        reports: {
255
            type: String,
256
        },
257
        circulateremainingpositions: {
258
            type: String,
259
        },
260
        periodmanage: {
261
            type: String,
262
        },
263
        budgetmanage: {
264
            type: String,
265
        },
266
        currenciesmanage: {
267
            type: String,
268
        },
269
        manageadditionalfields: {
270
            type: String,
271
        },
272
        invoiceedit: {
273
            type: String,
274
        },
275
        suggestionscreate: {
276
            type: String,
277
        },
278
        suggestionsmanage: {
279
            type: String,
280
        },
281
        suggestionsdelete: {
282
            type: String,
283
        },
284
    },
285
    setup() {
286
        const permissionsStore = inject("permissionsStore")
287
        const { isUserPermitted } = permissionsStore
288
        const navigationStore = inject("navigationStore")
289
        const { params } = storeToRefs(navigationStore)
290
        const vendorStore = inject("vendorStore")
291
        const { config } = storeToRefs(vendorStore)
292
293
        return {
294
            isUserPermitted,
295
            params,
296
            config,
297
        }
298
    },
299
    data() {
300
        const edifactEnabled = this.config.settings.edifact
301
            ? this.config.settings.edifact
302
            : this.edifact
303
304
        return {
305
            edifactEnabled,
306
        }
307
    },
308
}
309
</script>
310
311
<style></style>
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/VendorMenu.vue (-1 / +119 lines)
Line 0 Link Here
0
- 
1
<template>
2
    <div id="menu" v-if="vendorId">
3
        <ul>
4
            <li
5
                v-if="
6
                    ordermanage ||
7
                    isUserPermitted('CAN_user_acquisition_order_manage')
8
                "
9
            >
10
                <a :href="`/cgi-bin/koha/vendors/${vendorId}/baskets`">{{
11
                    $__("Baskets")
12
                }}</a>
13
            </li>
14
            <li
15
                v-if="
16
                    groupmanage ||
17
                    isUserPermitted('CAN_user_acquisition_group_manage')
18
                "
19
            >
20
                <a
21
                    :href="`/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=${vendorId}`"
22
                    >{{ $__("Basket groups") }}</a
23
                >
24
            </li>
25
            <li
26
                v-if="
27
                    contractsmanage ||
28
                    isUserPermitted('CAN_user_acquisition_contracts_manage')
29
                "
30
            >
31
                <a
32
                    :href="`/cgi-bin/koha/admin/aqcontract.pl?booksellerid=${vendorId}`"
33
                    >{{ $__("Contracts") }}</a
34
                >
35
            </li>
36
            <li
37
                v-if="
38
                    issuemanage ||
39
                    isUserPermitted('CAN_user_acquisition_issue_manage')
40
                "
41
            >
42
                <a
43
                    :href="`/cgi-bin/koha/acqui/vendor_issues.pl?booksellerid=${vendorId}`"
44
                    >{{ $__("Vendor issues") }}</a
45
                >
46
            </li>
47
            <li>
48
                <a
49
                    :href="`/cgi-bin/koha/acqui/invoices.pl?supplierid=${vendorId}&amp;op=do_search`"
50
                    >{{ $__("Invoices") }}</a
51
                >
52
            </li>
53
            <li
54
                v-if="
55
                    ordermanage ||
56
                    isUserPermitted('CAN_user_acquisition_order_manage')
57
                "
58
            >
59
                <a
60
                    v-if="basketno"
61
                    :href="`/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=${vendorId}&amp;basketno=${basketno}&amp;owner=1`"
62
                    >{{ $__("Uncertain prices") }}</a
63
                >
64
                <a
65
                    v-else
66
                    :href="`/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=${vendorId}&amp;owner=1`"
67
                    >{{ $__("Uncertain prices") }}</a
68
                >
69
            </li>
70
        </ul>
71
    </div>
72
</template>
73
74
<script>
75
import { inject } from "vue"
76
import { storeToRefs } from "pinia"
77
78
export default {
79
    props: {
80
        vendorid: {
81
            type: String,
82
        },
83
        basketno: {
84
            type: String,
85
        },
86
        ordermanage: {
87
            type: String,
88
        },
89
        groupmanage: {
90
            type: String,
91
        },
92
        contractsmanage: {
93
            type: String,
94
        },
95
        issuemanage: {
96
            type: String,
97
        },
98
    },
99
    setup() {
100
        const permissionsStore = inject("permissionsStore")
101
        const { isUserPermitted } = permissionsStore
102
        const navigationStore = inject("navigationStore")
103
        const { params } = storeToRefs(navigationStore)
104
105
        return {
106
            isUserPermitted,
107
            params,
108
        }
109
    },
110
    data() {
111
        const vendorId = this.vendorid ? this.vendorid : this.params.vendor_id
112
        return {
113
            vendorId,
114
        }
115
    },
116
}
117
</script>
118
119
<style></style>

Return to bug 38010