Bugzilla – Attachment 165451 Details for
Bug 35287
Add additional fields support to ERM licenses
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35287: Rebase after follow-up to 35197
Bug-35287-Rebase-after-follow-up-to-35197.patch (text/plain), 11.79 KB, created by
Pedro Amorim
on 2024-04-24 10:23:45 UTC
(
hide
)
Description:
Bug 35287: Rebase after follow-up to 35197
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-04-24 10:23:45 UTC
Size:
11.79 KB
patch
obsolete
>From 6006b464d554a53516f24639ef8e1c6da588b1d1 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Wed, 24 Apr 2024 10:16:08 +0000 >Subject: [PATCH] Bug 35287: Rebase after follow-up to 35197 > >--- > .../vue/components/AdditionalFieldsEntry.vue | 67 +++++++++++++------ > .../js/vue/components/ERM/LicensesList.vue | 4 +- > .../prog/js/vue/components/KohaTable.vue | 11 +-- > 3 files changed, 54 insertions(+), 28 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/AdditionalFieldsEntry.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/AdditionalFieldsEntry.vue >index 246656f3aea..ff0cf640e44 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/AdditionalFieldsEntry.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/AdditionalFieldsEntry.vue >@@ -9,25 +9,33 @@ > <template v-for="available_field in available_fields"> > <template > v-if=" >- available_field.authorised_value_category && >+ available_field.authorised_value_category_name && > !available_field.repeatable > " > > > <li> >- <label :for="`additional_field_` + available_field.id" >+ <label >+ :for=" >+ `additional_field_` + >+ available_field.additional_field_id >+ " > >{{ available_field.name }}: > </label> > <v-select >- :id="`additional_field_` + available_field.id" >+ :id=" >+ `additional_field_` + >+ available_field.additional_field_id >+ " > :name="available_field.name" > v-model=" > current_additional_fields_values[ >- available_field.id >+ available_field.additional_field_id > ] > " > :options=" > av_options[ >- available_field.authorised_value_category >+ available_field >+ .authorised_value_category_name > ] > " > /> >@@ -35,39 +43,53 @@ > </template> > <template > v-if=" >- available_field.authorised_value_category && >+ available_field.authorised_value_category_name && > available_field.repeatable > " > > > <li> >- <label :for="`additional_field_` + available_field.id" >+ <label >+ :for=" >+ `additional_field_` + >+ available_field.additional_field_id >+ " > >{{ available_field.name }}: > </label> > <v-select >- :id="`additional_field_` + available_field.id" >+ :id=" >+ `additional_field_` + >+ available_field.additional_field_id >+ " > :name="available_field.name" > :multiple="available_field.repeatable" > v-model=" > current_additional_fields_values[ >- available_field.id >+ available_field.additional_field_id > ] > " > :options=" > av_options[ >- available_field.authorised_value_category >+ available_field >+ .authorised_value_category_name > ] > " > /> > </li> > </template> > >- <template v-if="!available_field.authorised_value_category"> >+ <template >+ v-if="!available_field.authorised_value_category_name" >+ > > <li > v-for="current in current_additional_fields_values[ >- available_field.id >+ available_field.additional_field_id > ]" > > >- <label :for="`additional_field_` + available_field.id" >+ <label >+ :for=" >+ `additional_field_` + >+ available_field.additional_field_id >+ " > >{{ available_field.name }}: > </label> > <input type="text" v-model="current.value" /> >@@ -133,7 +155,7 @@ export default { > if (available_fields) { > const client_av = APIClient.authorised_values > let av_cat_array = available_fields >- .map(field => field.authorised_value_category) >+ .map(field => field.authorised_value_category_name) > .filter(field => field) > > client_av.values >@@ -158,14 +180,15 @@ export default { > available_fields.forEach(available_field => { > // Initialize current field as empty array > this.current_additional_fields_values[ >- available_field.id >+ available_field.additional_field_id > ] = [] > > // Grab all existing field values of this field > let existing_field_values = > this.additional_field_values.filter( > afv => >- afv.field_id == available_field.id && >+ afv.field_id == >+ available_field.additional_field_id && > afv.value > ) > >@@ -175,11 +198,11 @@ export default { > existing_field_value => { > let label = "" > if ( >- available_field.authorised_value_category >+ available_field.authorised_value_category_name > ) { > let av_value = this.av_options[ > available_field >- .authorised_value_category >+ .authorised_value_category_name > ].filter( > av_option => > av_option.value == >@@ -201,10 +224,10 @@ export default { > // Otherwise add them as empty if not AV field > } else { > if ( >- !available_field.authorised_value_category >+ !available_field.authorised_value_category_name > ) { > this.current_additional_fields_values[ >- available_field.id >+ available_field.additional_field_id > ] = [ > { > label: "", >@@ -225,7 +248,9 @@ export default { > }, > cloneField: function (available_field, current, event) { > event.preventDefault() >- this.current_additional_fields_values[available_field.id].push({ >+ this.current_additional_fields_values[ >+ available_field.additional_field_id >+ ].push({ > value: current.value, > label: available_field.name, > }) >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue >index 7243dd17888..0c96545ce88 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue >@@ -129,8 +129,8 @@ export default { > async getSearchableAVOptions() { > const client_av = APIClient.authorised_values > let av_cat_array = this.searchable_additional_fields >- .filter(field => field.authorised_value_category) >- .map(field => field.authorised_value_category) >+ .filter(field => field.authorised_value_category_name) >+ .map(field => field.authorised_value_category_name) > > await client_av.values > .getCategoriesWithValues([ >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue >index 427a9cbb06a..b415928cc83 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue >@@ -89,7 +89,8 @@ export default { > return row._strings.additional_field_values > .filter( > field => >- field.field_id == searchable_field.id >+ field.field_id == >+ searchable_field.additional_field_id > ) > .map(el => el.value_str) > } >@@ -102,21 +103,21 @@ export default { > datatype: "related-object", > related: "extended_attributes", > relatedKey: "field_id", >- relatedValue: searchable_field.id, >+ relatedValue: searchable_field.additional_field_id, > relatedSearchOn: "value", > className: > "searchable-additional-column-" + >- searchable_field.id, >+ searchable_field.additional_field_id, > title: searchable_field.name, > searchable: true, > sortable: false, > render: _customRender, > }) > >- if (searchable_field.authorised_value_category) { >+ if (searchable_field.authorised_value_category_name) { > let options = > this.searchable_av_options[ >- searchable_field.authorised_value_category >+ searchable_field.authorised_value_category_name > ] > > options.map(e => { >-- >2.39.2
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 35287
:
158725
|
158726
|
158727
|
158728
|
158729
|
158730
|
158731
|
158732
|
158733
|
158734
|
159634
|
159635
|
159636
|
159637
|
159638
|
159639
|
159640
|
159641
|
159642
|
159643
|
165451
|
165637
|
165638
|
165639
|
165640
|
165641
|
165642
|
165643
|
165644
|
165645
|
165646
|
165647
|
167681
|
169728
|
169729
|
169730
|
169731
|
169732
|
169733
|
169734
|
169735
|
169736
|
169737
|
170448
|
170753
|
172850
|
172851
|
172852
|
172853
|
172854
|
172855
|
172856
|
172857
|
172858
|
172860
|
172861
|
173022
|
173102
|
173103
|
173104
|
173105
|
173106
|
173107
|
173108
|
173109
|
173110
|
173111
|
173112
|
173113
|
173290