Bugzilla – Attachment 174144 Details for
Bug 38010
Migrate vendors to Vue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38010: Add menu components for vendor and acquisitions menus
Bug-38010-Add-menu-components-for-vendor-and-acqui.patch (text/plain), 16.29 KB, created by
Matt Blenkinsop
on 2024-11-07 11:49:28 UTC
(
hide
)
Description:
Bug 38010: Add menu components for vendor and acquisitions menus
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-11-07 11:49:28 UTC
Size:
16.29 KB
patch
obsolete
>From 8ab6bd796e5cd030abc66a52660c031dab100ad7 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Wed, 16 Oct 2024 15:28:56 +0000 >Subject: [PATCH] Bug 38010: Add menu components for vendor and acquisitions > menus > >--- > .../prog/en/modules/acqui/supplier.tt | 1 + > .../components/Islands/AcquisitionsMenu.vue | 311 ++++++++++++++++++ > .../js/vue/components/Islands/VendorMenu.vue | 119 +++++++ > 3 files changed, 431 insertions(+) > create mode 100644 koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/AcquisitionsMenu.vue > create mode 100644 koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/VendorMenu.vue > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt >index 599e8a1b7b6..0cc1e66b4ad 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt >@@ -535,6 +535,7 @@ > [% Asset.js("lib/hc-sticky/hc-sticky.js") | $raw %] > [% Asset.js("js/acq.js") | $raw %] > [% INCLUDE 'datatables.inc' %] >+ [% Asset.js("js/vue/dist/islands.js", "init" => "1") | $raw %] > <script> > function confirm_deletion() { > if (confirm(_("Confirm deletion of this vendor ?"))) { >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/AcquisitionsMenu.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/AcquisitionsMenu.vue >new file mode 100644 >index 00000000000..b2c634ed4d1 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/AcquisitionsMenu.vue >@@ -0,0 +1,311 @@ >+<template> >+ <div id="navmenu"> >+ <div id="navmenulist"> >+ <h5>{{ $__("Acquisitions") }}</h5> >+ <ul> >+ <li> >+ <a href="/cgi-bin/koha/acqui/acqui-home.pl">{{ >+ $__("Acquisitions home") >+ }}</a> >+ </li> >+ <li> >+ <a href="/cgi-bin/koha/acqui/histsearch.pl">{{ >+ $__("Advanced search") >+ }}</a> >+ </li> >+ <li >+ v-if=" >+ orderreceive || >+ isUserPermitted('CAN_user_acquisition_order_receive') >+ " >+ > >+ <a href="/cgi-bin/koha/acqui/lateorders.pl">{{ >+ $__("Late orders") >+ }}</a> >+ </li> >+ <li >+ v-if=" >+ suggestionscreate || >+ suggestionsmanage || >+ suggestionsdelete || >+ isUserPermitted( >+ 'CAN_user_suggestions_suggestions_create' >+ ) || >+ isUserPermitted( >+ 'CAN_user_suggestions_suggestions_manage' >+ ) || >+ isUserPermitted( >+ 'CAN_user_suggestions_suggestions_delete' >+ ) >+ " >+ > >+ <a href="/cgi-bin/koha/suggestion/suggestion.pl">{{ >+ $__("Suggestions") >+ }}</a> >+ </li> >+ <li> >+ <a href="/cgi-bin/koha/acqui/invoices.pl">{{ >+ $__("Invoices") >+ }}</a> >+ </li> >+ <li >+ v-if=" >+ edifactEnabled && >+ (edimanage || >+ isUserPermitted('CAN_user_acquisition_edi_manage')) >+ " >+ > >+ <a href="/cgi-bin/koha/acqui/edifactmsgs.pl">{{ >+ $__("EDIFACT messages") >+ }}</a> >+ </li> >+ </ul> >+ <template >+ v-if=" >+ reports || >+ circulateremainingpositions || >+ isUserPermitted('CAN_user_reports') || >+ isUserPermitted( >+ 'CAN_user_circulate_circulate_remaining_permissions' >+ ) >+ " >+ > >+ <h5>{{ $__("Reports") }}</h5> >+ <ul> >+ <template >+ v-if="reports || isUserPermitted('CAN_user_reports')" >+ > >+ <li> >+ <a >+ href="/cgi-bin/koha/reports/acquisitions_stats.pl" >+ >{{ $__("Acquisitions statistics wizard") }}</a >+ > >+ </li> >+ <li> >+ <a href="/cgi-bin/koha/reports/orders_by_fund.pl">{{ >+ $__("Orders by fund") >+ }}</a> >+ </li> >+ </template> >+ <li >+ v-if=" >+ circulateremainingpositions || >+ isUserPermitted( >+ 'CAN_user_circulate_circulate_remaining_permissions' >+ ) >+ " >+ > >+ <a href="/cgi-bin/koha/circ/reserveratios.pl">{{ >+ $__("Hold ratios") >+ }}</a> >+ </li> >+ </ul> >+ </template> >+ <template >+ v-if=" >+ periodmanage || >+ isUserPermitted('CAN_user_acquisition_period_manage') || >+ budgetmanage || >+ isUserPermitted('CAN_user_acquisition_budget_manage') || >+ currenciesmanage || >+ isUserPermitted('CAN_user_acquisition_currencies_manage') || >+ (edifactEnabled && >+ (edimanage || >+ isUserPermitted( >+ 'CAN_user_acquisition_edi_manage' >+ ))) || >+ manageadditionalfields || >+ isUserPermitted('CAN_user_acquisition_edi_manage') >+ " >+ > >+ <h5>{{ $__("Administration") }}</h5> >+ <ul> >+ <li >+ v-if=" >+ periodmanage || >+ isUserPermitted( >+ 'CAN_user_acquisition_period_manage' >+ ) >+ " >+ > >+ <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">{{ >+ $__("Budgets") >+ }}</a> >+ </li> >+ <li >+ v-if=" >+ budgetmanage || >+ isUserPermitted( >+ 'CAN_user_acquisition_budget_manage' >+ ) >+ " >+ > >+ <a href="/cgi-bin/koha/admin/aqbudgets.pl">{{ >+ $__("Funds") >+ }}</a> >+ </li> >+ <li >+ v-if=" >+ currenciesmanage || >+ isUserPermitted( >+ 'CAN_user_acquisition_currencies_manage' >+ ) >+ " >+ > >+ <a href="/cgi-bin/koha/admin/currency.pl">{{ >+ $__("Currencies") >+ }}</a> >+ </li> >+ <template >+ v-if=" >+ (edifactEnabled && edimanage) || >+ (edifactEnabled && >+ isUserPermitted( >+ 'CAN_user_acquisition_edi_manage' >+ )) >+ " >+ > >+ <li> >+ <a href="/cgi-bin/koha/admin/edi_accounts.pl">{{ >+ $__("EDI accounts") >+ }}</a> >+ </li> >+ <li> >+ <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl">{{ >+ $__("Library EANs") >+ }}</a> >+ </li> >+ </template> >+ <li >+ v-if=" >+ manageadditionalfields || >+ isUserPermitted( >+ 'CAN_user_parameters_manage_additional_fields' >+ ) || >+ invoiceedit || >+ isUserPermitted( >+ 'CAN_user_acquisition_edit_invoices' >+ ) >+ " >+ > >+ <a >+ href="/cgi-bin/koha/admin/additional-fields.pl?tablename=aqinvoices" >+ >{{ $__("Manage invoice fields") }}</a >+ > >+ </li> >+ <template >+ v-if=" >+ (manageadditionalfields || >+ isUserPermitted( >+ 'CAN_user_parameters_manage_additional_fields' >+ )) && >+ (ordermanage || >+ isUserPermitted( >+ 'CAN_user_acquisition_order_manage' >+ )) >+ " >+ > >+ <li> >+ <a >+ href="/cgi-bin/koha/admin/additional-fields.pl?tablename=aqbasket" >+ >{{ $__("Manage order basket fields") }}</a >+ > >+ </li> >+ <li> >+ <a >+ href="/cgi-bin/koha/admin/additional-fields.pl?tablename=aqorders" >+ >{{ $__("Manage order line fields") }}</a >+ > >+ </li> >+ </template> >+ </ul> >+ </template> >+ </div> >+ </div> >+</template> >+ >+<script> >+import { inject } from "vue" >+import { storeToRefs } from "pinia" >+ >+export default { >+ props: { >+ ordermanage: { >+ type: String, >+ }, >+ orderreceive: { >+ type: String, >+ }, >+ groupmanage: { >+ type: String, >+ }, >+ contractsmanage: { >+ type: String, >+ }, >+ issuemanage: { >+ type: String, >+ }, >+ edifact: { >+ type: String, >+ }, >+ edimanage: { >+ type: String, >+ }, >+ reports: { >+ type: String, >+ }, >+ circulateremainingpositions: { >+ type: String, >+ }, >+ periodmanage: { >+ type: String, >+ }, >+ budgetmanage: { >+ type: String, >+ }, >+ currenciesmanage: { >+ type: String, >+ }, >+ manageadditionalfields: { >+ type: String, >+ }, >+ invoiceedit: { >+ type: String, >+ }, >+ suggestionscreate: { >+ type: String, >+ }, >+ suggestionsmanage: { >+ type: String, >+ }, >+ suggestionsdelete: { >+ type: String, >+ }, >+ }, >+ setup() { >+ const permissionsStore = inject("permissionsStore") >+ const { isUserPermitted } = permissionsStore >+ const navigationStore = inject("navigationStore") >+ const { params } = storeToRefs(navigationStore) >+ const vendorStore = inject("vendorStore") >+ const { config } = storeToRefs(vendorStore) >+ >+ return { >+ isUserPermitted, >+ params, >+ config, >+ } >+ }, >+ data() { >+ const edifactEnabled = this.config.settings.edifact >+ ? this.config.settings.edifact >+ : this.edifact >+ >+ return { >+ edifactEnabled, >+ } >+ }, >+} >+</script> >+ >+<style></style> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/VendorMenu.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/VendorMenu.vue >new file mode 100644 >index 00000000000..2c76093e2c8 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/VendorMenu.vue >@@ -0,0 +1,119 @@ >+<template> >+ <div id="menu" v-if="vendorId"> >+ <ul> >+ <li >+ v-if=" >+ ordermanage || >+ isUserPermitted('CAN_user_acquisition_order_manage') >+ " >+ > >+ <a :href="`/cgi-bin/koha/vendors/${vendorId}/baskets`">{{ >+ $__("Baskets") >+ }}</a> >+ </li> >+ <li >+ v-if=" >+ groupmanage || >+ isUserPermitted('CAN_user_acquisition_group_manage') >+ " >+ > >+ <a >+ :href="`/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=${vendorId}`" >+ >{{ $__("Basket groups") }}</a >+ > >+ </li> >+ <li >+ v-if=" >+ contractsmanage || >+ isUserPermitted('CAN_user_acquisition_contracts_manage') >+ " >+ > >+ <a >+ :href="`/cgi-bin/koha/admin/aqcontract.pl?booksellerid=${vendorId}`" >+ >{{ $__("Contracts") }}</a >+ > >+ </li> >+ <li >+ v-if=" >+ issuemanage || >+ isUserPermitted('CAN_user_acquisition_issue_manage') >+ " >+ > >+ <a >+ :href="`/cgi-bin/koha/acqui/vendor_issues.pl?booksellerid=${vendorId}`" >+ >{{ $__("Vendor issues") }}</a >+ > >+ </li> >+ <li> >+ <a >+ :href="`/cgi-bin/koha/acqui/invoices.pl?supplierid=${vendorId}&op=do_search`" >+ >{{ $__("Invoices") }}</a >+ > >+ </li> >+ <li >+ v-if=" >+ ordermanage || >+ isUserPermitted('CAN_user_acquisition_order_manage') >+ " >+ > >+ <a >+ v-if="basketno" >+ :href="`/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=${vendorId}&basketno=${basketno}&owner=1`" >+ >{{ $__("Uncertain prices") }}</a >+ > >+ <a >+ v-else >+ :href="`/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=${vendorId}&owner=1`" >+ >{{ $__("Uncertain prices") }}</a >+ > >+ </li> >+ </ul> >+ </div> >+</template> >+ >+<script> >+import { inject } from "vue" >+import { storeToRefs } from "pinia" >+ >+export default { >+ props: { >+ vendorid: { >+ type: String, >+ }, >+ basketno: { >+ type: String, >+ }, >+ ordermanage: { >+ type: String, >+ }, >+ groupmanage: { >+ type: String, >+ }, >+ contractsmanage: { >+ type: String, >+ }, >+ issuemanage: { >+ type: String, >+ }, >+ }, >+ setup() { >+ const permissionsStore = inject("permissionsStore") >+ const { isUserPermitted } = permissionsStore >+ const navigationStore = inject("navigationStore") >+ const { params } = storeToRefs(navigationStore) >+ >+ return { >+ isUserPermitted, >+ params, >+ } >+ }, >+ data() { >+ const vendorId = this.vendorid ? this.vendorid : this.params.vendor_id >+ return { >+ vendorId, >+ } >+ }, >+} >+</script> >+ >+<style></style> >-- >2.39.3 (Apple Git-146)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38010
:
174119
|
174120
|
174121
|
174122
|
174123
|
174124
|
174125
|
174126
|
174128
|
174129
|
174130
|
174131
|
174132
|
174133
|
174134
|
174135
|
174136
|
174137
|
174138
|
174139
|
174140
|
174141
|
174142
|
174143
|
174144
|
174145
|
174146
|
174147
|
174148
|
174151
|
174152
|
174153
|
174154
|
174155
|
174156
|
174157
|
174158
|
174159
|
174160
|
174161
|
174162
|
174163
|
174164
|
174165
|
174166
|
174167
|
174168
|
174169
|
174170
|
174171
|
174172
|
174173
|
174174
|
174175
|
174176
|
174177
|
174178
|
174179
|
174194
|
174196
|
174197
|
174198
|
174199
|
174200
|
174201
|
174202
|
174203
|
174204
|
174205
|
174206
|
174207
|
174208
|
174209
|
174210
|
174211
|
174212
|
174213
|
174214
|
174215
|
174216
|
174217
|
174218
|
174220
|
174221
|
174222
|
174223
|
174224
|
174225
|
174226
|
174248
|
174266
|
174267
|
174269
|
174270
|
174273
|
174327
|
174328
|
174329
|
174330
|
174331
|
174332
|
174333
|
174334
|
174335
|
174336
|
174337
|
174338
|
174339
|
174340
|
174341
|
174342
|
174343
|
174344
|
174345
|
174346
|
174347
|
174348
|
174349
|
174350
|
174351
|
174352
|
174353
|
174354
|
174355
|
174356
|
174357
|
174358
|
174359
|
174360
|
174603