Bugzilla – Attachment 147918 Details for
Bug 33066
We need a KohaTable Vue component
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33066: Restore filter by mine
Bug-33066-Restore-filter-by-mine.patch (text/plain), 3.05 KB, created by
Jonathan Druart
on 2023-03-08 12:26:54 UTC
(
hide
)
Description:
Bug 33066: Restore filter by mine
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-03-08 12:26:54 UTC
Size:
3.05 KB
patch
obsolete
>From 3b1976bd73d35954b7ba688e19d8fdd15904d72e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 8 Mar 2023 13:24:23 +0100 >Subject: [PATCH] Bug 33066: Restore filter by mine > >--- > .../js/vue/components/ERM/AgreementsList.vue | 32 ++++++++++++++----- > 1 file changed, 24 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue >index e66c9eb0807..e3f53a9ed7d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue >@@ -50,7 +50,7 @@ > <script> > import flatPickr from "vue-flatpickr-component" > import Toolbar from "./AgreementsToolbar.vue" >-import { inject, ref } from "vue" >+import { inject, ref, reactive } from "vue" > import { APIClient } from "../../fetch/api-client.js" > import { storeToRefs } from "pinia" > import { build_url } from "../../composables/datatables" >@@ -68,6 +68,12 @@ export default { > > const table = ref() > >+ const filters = reactive({ >+ by_expired: false, >+ max_expiration_date: "", >+ by_mine: "", >+ }) >+ > return { > vendors, > get_lib_from_av, >@@ -78,24 +84,27 @@ export default { > setMessage, > escape_str, > agreement_table_settings, >+ filters, > } > }, > data: function () { >+ this.filters = { >+ by_expired: this.$route.query.by_expired || false, >+ max_expiration_date: this.$route.query.max_expiration_date || "", >+ by_mine: this.$route.query.by_mine || false, >+ } >+ let filters = this.filters >+ >+ let logged_in_user = this.logged_in_user > return { > fp_config: flatpickr_defaults, > agreements: [], > initialized: false, >- filters: { >- by_expired: this.$route.query.by_expired || false, >- max_expiration_date: >- this.$route.query.max_expiration_date || "", >- by_mine: this.$route.query.by_mine || false, >- }, > before_route_entered: false, > building_table: false, > tableOptions: { > columns: this.getTableColumns(), >- options: { embed: "vendor" }, >+ options: { embed: "user_roles,vendor" }, > url: () => this.table_url(), > table_settings: this.agreement_table_settings, > add_filters: true, >@@ -122,6 +131,13 @@ export default { > 0: ["show"], > "-1": ["edit", "delete"], > }, >+ default_filters: { >+ "user_roles.user_id": function () { >+ return filters.by_mine >+ ? logged_in_user.borrowernumber >+ : "" >+ }, >+ }, > }, > } > }, >-- >2.25.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 33066
:
147352
|
147353
|
147354
|
147692
|
147693
|
147694
|
147713
|
147846
|
147847
|
147848
|
147849
|
147850
|
147851
|
147852
|
147853
|
147855
|
147856
|
147857
|
147858
|
147862
|
147865
|
147902
|
147903
|
147904
|
147905
|
147906
|
147907
|
147908
|
147909
|
147910
|
147911
|
147912
|
147913
|
147914
|
147915
|
147916
|
147917
|
147918
|
147921
|
147922
|
147923
|
147925
|
147926
|
147928
|
147957
|
147960
|
147971
|
147972
|
148718
|
149158
|
149159
|
149160
|
149161
|
149162
|
149163
|
149164
|
149165
|
149166
|
149167
|
149168
|
149169
|
149170
|
149171
|
149172
|
149173
|
149174
|
149175
|
149176
|
149177
|
149178
|
149179
|
149180
|
149181
|
149182
|
149183