Bugzilla – Attachment 171631 Details for
Bug 36454
Provide indication if a patron is expired or restricted on patron search autocomplete
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36454: Add 'expired' information on patron auto complete results
Bug-36454-Add-expired-information-on-patron-auto-c.patch (text/plain), 1.86 KB, created by
Owen Leonard
on 2024-09-17 15:47:14 UTC
(
hide
)
Description:
Bug 36454: Add 'expired' information on patron auto complete results
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2024-09-17 15:47:14 UTC
Size:
1.86 KB
patch
obsolete
>From 770ca0736ccfb651510d63122d007924fcae92be Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Mon, 16 Sep 2024 08:53:33 +0000 >Subject: [PATCH] Bug 36454: Add 'expired' information on patron auto complete > results > >Test plan: >1) Alter the 'Expiry date' of any patron. >2) Search for that patron on any search input that provides auto > complete results (e.g. top 'Search patrons' input) >3) Notice the expired patron has a 'expired' indication. Those who > aren't do not. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 11 +++++++++++ > 1 file changed, 11 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >index e357c8b398..baa34c4d7b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >@@ -674,6 +674,12 @@ function patron_autocomplete(node, options) { > } else { > loggedInClass = ""; > } >+ let new_date = new Date(); >+ let today = Date.parse($date_to_rfc3339($date(new_date.toString()))); >+ let expiration = Date.parse( >+ $date_to_rfc3339($date(item.expiry_date.toString())) >+ ); >+ let expired = today > expiration; > return $("<li></li>") > .addClass(loggedInClass) > .data("ui-autocomplete-item", item) >@@ -709,6 +715,11 @@ function patron_autocomplete(node, options) { > "</span>" > : "") + > "</small>" + >+ (expired >+ ? '<small><span class="circ-hlt">' + >+ __("expired") + >+ "</span></small>" >+ : "") + > "</a>" > ) > .appendTo(ul); >-- >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 36454
:
171516
|
171630
|
171631
|
171632
|
171633
|
171839
|
171840
|
174671
|
174682
|
174684
|
174685
|
174686
|
174687