Bugzilla – Attachment 173069 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: Modify AgreementsList and FormAdd to support new AV concept
Bug-37930-Modify-AgreementsList-and-FormAdd-to-sup.patch (text/plain), 7.72 KB, created by
PTFS Europe Sandboxes
on 2024-10-21 16:14:11 UTC
(
hide
)
Description:
Bug 37930: Modify AgreementsList and FormAdd to support new AV concept
Filename:
MIME Type:
Creator:
PTFS Europe Sandboxes
Created:
2024-10-21 16:14:11 UTC
Size:
7.72 KB
patch
obsolete
>From f96b2e3164c740be55b7a1a92a934fafcd17b993 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Thu, 17 Oct 2024 11:34:23 +0000 >Subject: [PATCH] Bug 37930: Modify AgreementsList and FormAdd to support new > AV concept > >Test plan >1) Navigate to ERM module >2) Click into agreements, page should load as normal >3) Click New agreement, form should load as expected >4) Fill in the required fields - note that the Status field is correctly populated with authorised values >5) Save new agreeement >6) Note that the status column in the table is correctly populated > >Signed-off-by: esther <esther@bywatersolutions.com> >--- > .../vue/components/ERM/AgreementsFormAdd.vue | 46 +++++++++---------- > .../js/vue/components/ERM/AgreementsList.vue | 13 +++--- > .../prog/js/vue/components/ERM/Main.vue | 1 + > .../intranet-tmpl/prog/js/vue/stores/main.js | 1 - > 4 files changed, 29 insertions(+), 32 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue >index 645a13b5be..5bde5e7328 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue >@@ -51,7 +51,9 @@ > v-model="agreement.status" > label="description" > :reduce="av => av.value" >- :options="av_agreement_statuses" >+ :options=" >+ authorisedValues['av_agreement_statuses'] >+ " > @option:selected="onStatusChanged" > :required="!agreement.status" > > >@@ -75,7 +77,11 @@ > v-model="agreement.closure_reason" > label="description" > :reduce="av => av.value" >- :options="av_agreement_closure_reasons" >+ :options=" >+ authorisedValues[ >+ 'av_agreement_closure_reasons' >+ ] >+ " > :disabled=" > agreement.status == 'closed' ? false : true > " >@@ -117,7 +123,11 @@ > v-model="agreement.renewal_priority" > label="description" > :reduce="av => av.value" >- :options="av_agreement_renewal_priorities" >+ :options=" >+ authorisedValues[ >+ 'av_agreement_renewal_priorities' >+ ] >+ " > /> > </li> > <li> >@@ -136,21 +146,23 @@ > <UserRoles > :user_type="$__('Agreement user %s')" > :user_roles="agreement.user_roles" >- :av_user_roles="av_user_roles" >+ :av_user_roles="authorisedValues['av_user_roles']" > /> > <AgreementLicenses > :agreement_licenses="agreement.agreement_licenses" > :av_agreement_license_statuses=" >- av_agreement_license_statuses >+ authorisedValues['av_agreement_license_statuses'] > " > :av_agreement_license_location=" >- av_agreement_license_location >+ authorisedValues['av_agreement_license_location'] > " > /> > <AgreementRelationships > :agreement_id="agreement.agreement_id" > :relationships="agreement.agreement_relationships" >- :av_agreement_relationships="av_agreement_relationships" >+ :av_agreement_relationships=" >+ authorisedValues['av_agreement_relationships'] >+ " > /> > <Documents :documents="agreement.documents" /> > <fieldset class="action"> >@@ -182,25 +194,11 @@ import { storeToRefs } from "pinia" > > export default { > setup() { >- const AVStore = inject("AVStore") >- const { >- av_agreement_statuses, >- av_agreement_closure_reasons, >- av_agreement_renewal_priorities, >- av_user_roles, >- av_agreement_license_statuses, >- av_agreement_license_location, >- av_agreement_relationships, >- } = storeToRefs(AVStore) >+ const mainStore = inject("mainStore") >+ const { authorisedValues } = storeToRefs(mainStore) > > return { >- av_agreement_statuses, >- av_agreement_closure_reasons, >- av_agreement_renewal_priorities, >- av_user_roles, >- av_agreement_license_statuses, >- av_agreement_license_location, >- av_agreement_relationships, >+ authorisedValues, > max_allowed_packet, > } > }, >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 a22e14819a..f83c8414e3 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 >@@ -70,13 +70,12 @@ export default { > const vendorStore = inject("vendorStore") > const { vendors } = storeToRefs(vendorStore) > >- const AVStore = inject("AVStore") >- const { get_lib_from_av, map_av_dt_filter } = AVStore >- >- const { setConfirmationDialog, setMessage } = inject("mainStore") >- >- const { authorisedValues } = inject("ERMStore") >- console.log(authorisedValues) >+ const { >+ setConfirmationDialog, >+ setMessage, >+ get_lib_from_av, >+ map_av_dt_filter, >+ } = inject("mainStore") > > const table = ref() > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue >index b3c61e6c9a..1d2a17eaa2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue >@@ -91,6 +91,7 @@ export default { > .then(config => { > this.config = config > if (this.config.settings.ERMModule != 1) { >+ this.loaded() > return this.setError( > this.$__( > 'The e-resource management module is disabled, turn on <a href="/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=ERMModule">ERMModule</a> to use it' >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js >index bfa548840c..97daf68301 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js >@@ -112,7 +112,6 @@ export const useMainStore = defineStore("main", { > }); > }, > async loadAuthorisedValues(authorisedValues) { >- console.log(authorisedValues); > const AVsToFetch = Object.keys(authorisedValues).reduce( > (acc, avKey) => { > if (Array.isArray(authorisedValues[avKey])) return acc; >-- >2.39.5
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