Bugzilla – Attachment 178240 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: (QA follow-up) Convert vendor menu to Vue island
Bug-38010-QA-follow-up-Convert-vendor-menu-to-Vue-.patch (text/plain), 6.20 KB, created by
Matt Blenkinsop
on 2025-02-18 13:50:13 UTC
(
hide
)
Description:
Bug 38010: (QA follow-up) Convert vendor menu to Vue island
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2025-02-18 13:50:13 UTC
Size:
6.20 KB
patch
obsolete
>From 730fad1bce9186e1b3ad33c58fe7307bab84a460 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Thu, 13 Feb 2025 10:33:30 +0000 >Subject: [PATCH] Bug 38010: (QA follow-up) Convert vendor menu to Vue island > >--- > .../prog/en/includes/vendor-menu.inc | 31 +++++++++---------- > .../js/vue/components/Islands/VendorMenu.vue | 16 ++++++++++ > .../prog/js/vue/modules/islands.ts | 15 +++++++++ > 3 files changed, 46 insertions(+), 16 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/vendor-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/vendor-menu.inc >index c83b1271f77..8ee596a062a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/vendor-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/vendor-menu.inc >@@ -1,16 +1,15 @@ >-[% IF ( booksellerid ) %] >- <div id="menu"> >- <ul> >- [% IF ( CAN_user_acquisition_order_manage ) %]<li><a href="/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid | uri %]">Baskets</a></li>[% END %] >- [% IF ( CAN_user_acquisition_group_manage ) %]<li><a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid | uri %]">Basket groups</a></li>[% END %] >- [% IF ( CAN_user_acquisition_contracts_manage ) %]<li><a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a></li>[% END %] >- [% IF ( CAN_user_acquisition_issue_manage ) %]<li><a href="/cgi-bin/koha/acqui/vendor_issues.pl?booksellerid=[% booksellerid | uri %]">Vendor issues</a></li>[% END %] >- <li><a href="/cgi-bin/koha/acqui/invoices.pl?supplierid=[% booksellerid | uri %]&op=do_search">Invoices</a></li> >- [% IF ( CAN_user_acquisition_order_manage ) %][% IF ( basketno ) %] >- <li><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]&owner=1">Uncertain prices</a></li> >- [% ELSE %] >- <li><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid | uri %]&owner=1">Uncertain prices</a></li> >- [% END %][% END %] >- </ul> >- </div> >-[% END %] >+[% USE Koha %] >+[% USE Asset %] >+[% USE raw %] >+[% USE To %] >+ >+<vendor-menu >+ vendorid="[% booksellerid | uri %]" >+ basketno="[% basketno | html %]" >+ ordermanage="[% CAN_user_acquisition_order_manage | html %]" >+ groupmanage="[% CAN_user_acquisition_group_manage | html %]" >+ contractsmanage="[% CAN_user_acquisition_contracts_manage | html %]" >+ issuemanage="[% CAN_user_acquisition_issue_manage | html %]" >+></vendor-menu> >+ >+[% Asset.js("js/vue/dist/islands.js", "init" => "1") | $raw %] >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 >index 956e760e42a..4a4ea82c21c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/VendorMenu.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/VendorMenu.vue >@@ -8,6 +8,7 @@ > " > > > <a >+ ref="booksellers" > :href="`/cgi-bin/koha/acqui/booksellers.pl?booksellerid=${vendorId}`" > >{{ $__("Baskets") }}</a > > >@@ -19,6 +20,7 @@ > " > > > <a >+ ref="basketgroup" > :href="`/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=${vendorId}`" > >{{ $__("Basket groups") }}</a > > >@@ -30,6 +32,7 @@ > " > > > <a >+ ref="aqcontract" > :href="`/cgi-bin/koha/admin/aqcontract.pl?booksellerid=${vendorId}`" > >{{ $__("Contracts") }}</a > > >@@ -41,12 +44,14 @@ > " > > > <a >+ ref="vendor_issues" > :href="`/cgi-bin/koha/acqui/vendor_issues.pl?booksellerid=${vendorId}`" > >{{ $__("Vendor issues") }}</a > > > </li> > <li> > <a >+ ref="invoices" > :href="`/cgi-bin/koha/acqui/invoices.pl?supplierid=${vendorId}&op=do_search`" > >{{ $__("Invoices") }}</a > > >@@ -59,11 +64,13 @@ > > > <a > v-if="basketno" >+ ref="uncertainprice" > :href="`/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=${vendorId}&basketno=${basketno}&owner=1`" > >{{ $__("Uncertain prices") }}</a > > > <a > v-else >+ ref="uncertainprice" > :href="`/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=${vendorId}&owner=1`" > >{{ $__("Uncertain prices") }}</a > > >@@ -114,6 +121,15 @@ export default { > vendorId, > }; > }, >+ mounted() { >+ const path = location.pathname.substring(1); >+ >+ Object.keys(this.$refs).forEach(ref => { >+ if (this.$refs[ref].href.includes(path)) { >+ this.$refs[ref].classList.add("current"); >+ } >+ }); >+ }, > }; > </script> > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/modules/islands.ts b/koha-tmpl/intranet-tmpl/prog/js/vue/modules/islands.ts >index 88b52286017..808b39d8950 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/modules/islands.ts >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/modules/islands.ts >@@ -62,6 +62,21 @@ export const componentRegistry: Map<string, WebComponentDynamicImport> = > }, > }, > ], >+ [ >+ "vendor-menu", >+ { >+ importFn: async () => { >+ const module = await import( >+ /* webpackChunkName: "vendor-menu" */ >+ "../components/Islands/VendorMenu.vue" >+ ); >+ return module.default; >+ }, >+ config: { >+ stores: ["navigationStore", "permissionsStore"], >+ }, >+ }, >+ ], > ]); > > /** >-- >2.48.1
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
|
175098
|
175099
|
175100
|
175101
|
175102
|
175103
|
175104
|
175105
|
175106
|
175107
|
175108
|
175109
|
175110
|
175111
|
175112
|
175113
|
175114
|
175115
|
175116
|
175117
|
175118
|
175119
|
175120
|
175121
|
175122
|
175123
|
175124
|
175125
|
175126
|
175127
|
175128
|
175129
|
175130
|
175131
|
175133
|
175134
|
175135
|
175136
|
175137
|
175167
|
175168
|
175170
|
175240
|
175241
|
175242
|
175243
|
175248
|
175249
|
175266
|
175791
|
175799
|
176547
|
178182
|
178183
|
178184
|
178185
|
178186
|
178187
|
178188
|
178189
|
178190
|
178191
|
178192
|
178193
|
178194
|
178195
|
178196
|
178197
|
178198
|
178199
|
178200
|
178201
|
178202
|
178203
|
178204
|
178205
|
178206
|
178207
|
178208
|
178209
|
178210
|
178211
|
178212
|
178213
|
178214
|
178215
|
178216
|
178217
|
178218
|
178219
|
178220
|
178221
|
178222
|
178223
|
178224
|
178225
|
178226
|
178227
|
178228
|
178229
|
178230
|
178231
|
178232
|
178233
|
178234
|
178235
|
178236
|
178237
|
178238
|
178239
| 178240 |
178241
|
178242