@@ -, +, @@ - Status - Date placed - Date modified - Pickup branch - Borrower card number --- Koha/REST/V1/Illrequests.pm | 20 ++ .../intranet-tmpl/prog/css/src/staff-global.scss | 5 + .../prog/en/modules/ill/ill-requests.tt | 328 +++++++++++++++++++-- 3 files changed, 323 insertions(+), 30 deletions(-) --- a/Koha/REST/V1/Illrequests.pm +++ a/Koha/REST/V1/Illrequests.pm @@ -24,6 +24,7 @@ use Koha::Illrequestattributes; use Koha::Libraries; use Koha::Patrons; use Koha::Libraries; +use Koha::DateUtils qw( format_sqldatetime ); =head1 NAME @@ -41,6 +42,9 @@ sub list { my $c = shift->openapi->valid_input or return; my $args = $c->req->params->to_hash // {}; + my $filter; + my $output = []; + my @format_dates = ( 'placed', 'updated' ); # Create a hash where all keys are embedded values # Enables easy checking @@ -54,6 +58,22 @@ sub list { # Get all requests my @requests = Koha::Illrequests->as_list; + # Create new "formatted" columns for each date column + # that needs formatting + foreach(@requests) { + foreach my $field(@format_dates) { + if (defined $_->{$field}) { + $_->{$field . "_formatted"} = format_sqldatetime( + $_->{$field}, + undef, + undef, + 1 + ); + } + } + + } + # Identify patrons & branches that # we're going to need and get them my $to_fetch = { --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -4002,6 +4002,11 @@ span { } } +#illfilter_dateplaced, +#illfilter_datemodified { + width: 80%; +} + #requestattributes { font-family: monospace; line-height: 1.3em; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt @@ -10,12 +10,30 @@ [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] [% Asset.css("css/datatables.css") | $raw %] [% INCLUDE 'datatables.inc' %] - @@ -326,6 +552,45 @@
+ [% IF query_type == 'illlist' %] +
+
+
+

Filters

+
    +
  1. + + +
  2. +
  3. + + +
  4. +
  5. + + +
  6. +
  7. + + +
  8. +
  9. + + +
  10. +
+
+ + +
+
+
+
+ [% END %]
[% IF !backends_available || !has_branch %] @@ -706,7 +971,10 @@ Bibliographic record ID Library Status - Updated on +   + Date placed +   + Updated on Request number Comments --