Bugzilla – Attachment 174176 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: Implement side menus in vendors app
Bug-38010-Implement-side-menus-in-vendors-app.patch (text/plain), 4.86 KB, created by
Matt Blenkinsop
on 2024-11-07 11:57:08 UTC
(
hide
)
Description:
Bug 38010: Implement side menus in vendors app
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-11-07 11:57:08 UTC
Size:
4.86 KB
patch
obsolete
>From 45e33fdbbe2ebd97bff355d54089fdc2330b5090 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Wed, 16 Oct 2024 15:29:39 +0000 >Subject: [PATCH] Bug 38010: Implement side menus in vendors app > >--- > .../prog/js/vue/components/LeftMenu.vue | 38 +++++++++++-------- > .../prog/js/vue/components/Vendors/Main.vue | 3 +- > .../prog/js/vue/routes/acquisitions.js | 3 ++ > 3 files changed, 27 insertions(+), 17 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/LeftMenu.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/LeftMenu.vue >index 147402b0675..14f21652c06 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/LeftMenu.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/LeftMenu.vue >@@ -2,14 +2,20 @@ > <aside> > <div id="navmenu"> > <div id="navmenulist"> >- <h5>{{ $__(title) }}</h5> >- <ul> >- <NavigationItem >- v-for="(item, key) in navigationTree" >- v-bind:key="key" >- :item="item" >- ></NavigationItem> >- </ul> >+ <VendorMenu v-if="leftNavigation === 'VendorMenu'" /> >+ <AcquisitionsMenu >+ v-else-if="leftNavigation === 'AcquisitionsMenu'" >+ /> >+ <template v-else> >+ <h5>{{ $__(title) }}</h5> >+ <ul> >+ <NavigationItem >+ v-for="(item, key) in leftNavigation" >+ v-bind:key="key" >+ :item="item" >+ ></NavigationItem> >+ </ul> >+ </template> > </div> > </div> > </aside> >@@ -18,23 +24,21 @@ > <script> > import { inject } from "vue" > import NavigationItem from "./NavigationItem.vue" >+import VendorMenu from "./Islands/VendorMenu.vue" >+import { storeToRefs } from "pinia" >+import AcquisitionsMenu from "./Islands/AcquisitionsMenu.vue" >+ > export default { > name: "LeftMenu", >- data() { >- return { >- navigationTree: this.leftNavigation, >- } >- }, > setup: () => { > const navigationStore = inject("navigationStore") >- const { leftNavigation } = navigationStore >+ const { leftNavigation } = storeToRefs(navigationStore) > return { > leftNavigation, > } > }, > async beforeMount() { >- if (this.condition) >- this.navigationTree = await this.condition(this.navigationTree) >+ if (this.condition) this.condition(this.leftNavigation) > }, > props: { > title: String, >@@ -42,6 +46,8 @@ export default { > }, > components: { > NavigationItem, >+ VendorMenu, >+ AcquisitionsMenu, > }, > } > </script> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/Main.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/Main.vue >index abad2f756ab..960ca63ee23 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/Main.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/Main.vue >@@ -14,7 +14,7 @@ > </div> > > <div class="col-md-2 order-sm-2 order-md-1"> >- <LeftMenu :title="$__('Vendor management')"></LeftMenu> >+ <LeftMenu :title="$__('Acquisitions')"></LeftMenu> > </div> > </div> > </div> >@@ -53,6 +53,7 @@ export default { > loaded, > userPermissions, > AVStore, >+ config, > } > }, > beforeCreate() { >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/routes/acquisitions.js b/koha-tmpl/intranet-tmpl/prog/js/vue/routes/acquisitions.js >index bed6eb2c485..d146b247798 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/routes/acquisitions.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/routes/acquisitions.js >@@ -31,12 +31,14 @@ export const routes = [ > path: "", > name: "VendorList", > component: markRaw(VendorList), >+ alternateLeftMenu: "AcquisitionsMenu", > }, > { > path: ":vendor_id", > name: "VendorShow", > component: markRaw(VendorShow), > title: $__("Show vendor"), >+ alternateLeftMenu: "VendorMenu", > }, > { > path: "add", >@@ -55,6 +57,7 @@ export const routes = [ > name: "VendorShowBaskets", > component: markRaw(VendorShow), > title: $__("Baskets"), >+ alternateLeftMenu: "VendorMenu", > }, > ], > }, >-- >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
|
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