Bugzilla – Attachment 180698 Details for
Bug 37930
Change how we handle authorised values in Vue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37930: Migrate to setup-style store using reactive state and toRefs
Bug-37930-Migrate-to-setup-style-store-using-react.patch (text/plain), 1.44 KB, created by
Jonathan Druart
on 2025-04-07 13:59:04 UTC
(
hide
)
Description:
Bug 37930: Migrate to setup-style store using reactive state and toRefs
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-04-07 13:59:04 UTC
Size:
1.44 KB
patch
obsolete
>From 6c3506eb6d2f18c73ce116b58f0fa72e02c6347b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 7 Apr 2025 15:51:38 +0200 >Subject: [PATCH] Bug 37930: Migrate to setup-style store using reactive state > and toRefs > >--- > .../intranet-tmpl/prog/js/vue/stores/erm.js | 17 ++++++++++------- > 1 file changed, 10 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/erm.js b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/erm.js >index 3a32409c99f..6552b118d31 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/erm.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/erm.js >@@ -1,9 +1,9 @@ > import { defineStore } from "pinia"; >- >+import { reactive, toRefs } from "vue"; > import { withAuthorisedValueActions } from "../composables/authorisedValues"; > >-export const useERMStore = defineStore("erm", { >- state: () => ({ >+export const useERMStore = defineStore("erm", () => { >+ const store = reactive({ > config: { > settings: { > ERMModule: false, >@@ -60,8 +60,11 @@ export const useERMStore = defineStore("erm", { > { value: "related_to", description: __("related to") }, > ], > }, >- }), >- actions: { >- ...withAuthorisedValueActions(this), >- }, >+ }); >+ const sharedActions = withAuthorisedValueActions(store); >+ >+ return { >+ ...toRefs(store), >+ ...sharedActions, >+ }; > }); >-- >2.34.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 37930
:
171556
|
171557
|
171558
|
171628
|
172863
|
172864
|
172865
|
172886
|
172887
|
172888
|
172979
|
173069
|
176677
|
176678
|
176679
|
176719
|
176720
|
176721
|
176722
|
176830
|
178248
|
178249
|
178250
|
178251
|
180243
|
180244
|
180245
|
180246
|
180689
|
180698
|
180699
|
180700
|
180701
|
180767
|
180768
|
180769
|
180770
|
180771
|
180772
|
180773
|
180774
|
180775