Bugzilla – Attachment 160387 Details for
Bug 35477
Adding non-existent items to the waiting list should display a warning
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35477: Show a warning when non-existent items are added to the waiting list
Bug-35477-Show-a-warning-when-non-existent-items-a.patch (text/plain), 3.00 KB, created by
Victor Grousset/tuxayo
on 2024-01-01 21:41:08 UTC
(
hide
)
Description:
Bug 35477: Show a warning when non-existent items are added to the waiting list
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2024-01-01 21:41:08 UTC
Size:
3.00 KB
patch
obsolete
>From 442ebd87bb4c87cd747cf3879cbe46008e9a0605 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 5 Dec 2023 14:19:37 +0100 >Subject: [PATCH] Bug 35477: Show a warning when non-existent items are added > to the waiting list > >Only messages "X new items added" or "No items added" were displayed. >With this patch we will display: >A warning with "No items added" >A warning with "X new items added. Y items not found." when some items >have not been added >A messages "X new items added" when everything went well > >Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > .../js/vue/components/Preservation/WaitingList.vue | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/WaitingList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/WaitingList.vue >index 6a7c43e4b8..a843f2f2e2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/WaitingList.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/WaitingList.vue >@@ -135,13 +135,14 @@ export default { > const PreservationStore = inject("PreservationStore") > const { config } = PreservationStore > >- const { setMessage, setConfirmationDialog, loading, loaded } = >+ const { setMessage, setWarning, setConfirmationDialog, loading, loaded } = > inject("mainStore") > > return { > table, > config, > setMessage, >+ setWarning, > setConfirmationDialog, > loading, > loaded, >@@ -213,12 +214,21 @@ export default { > client.waiting_list_items.createAll(items).then( > result => { > if (result.length) { >+ if (result.length != items.length ){ >+ this.setWarning( >+ this.$__("%s new items added. %s items not found.").format( >+ result.length, items.length - result.length >+ ), >+ true >+ ) >+ } else { > this.setMessage( > this.$__("%s new items added.").format( > result.length > ), > true > ) >+ } > this.last_items = result > if (this.$refs.table) { > this.$refs.table.redraw( >@@ -228,7 +238,7 @@ export default { > this.getCountWaitingListItems() > } > } else { >- this.setMessage(this.$__("No items added")) >+ this.setWarning(this.$__("No items added")) > } > }, > error => {} >-- >2.43.0
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 35477
:
159580
|
159611
|
159927
|
160387
|
160388
|
160533