Bug 37762: (QA follow-up): Add filters to supply ILL table
Also fix table_settings Signed-off-by: Jason Robb <jrobb@sekls.org> Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
926a03b77c
commit
bbc4e8050d
|
|
@ -1179,6 +1179,23 @@ modules:
|
|||
columnname: action
|
||||
cannot_be_toggled: 1
|
||||
cannot_be_modified: 1
|
||||
ill-supply:
|
||||
ill-supply:
|
||||
columns:
|
||||
-
|
||||
columnname: iso18626_request_id
|
||||
-
|
||||
columnname: iso18626_requesting_agency_id
|
||||
-
|
||||
columnname: status
|
||||
-
|
||||
columnname: service_type
|
||||
-
|
||||
columnname: pending_requesting_agency_action
|
||||
-
|
||||
columnname: created_on
|
||||
-
|
||||
columnname: updated_on
|
||||
|
||||
members:
|
||||
fines:
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
[% INCLUDE 'datatables.inc' %]
|
||||
[% INCLUDE 'js-date-format.inc' %]
|
||||
<script nonce="[% Koha.CSPNonce | $raw %]">
|
||||
const supplying_ill_table_settings = [% TablesSettings.GetTableSettings( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) | $raw %];
|
||||
const supplying_ill_table_settings = [% TablesSettings.GetTableSettings( 'illrequests', 'ill-supply', 'ill-supply', 'json' ) | $raw %];
|
||||
const userenv = [% To.json(userenv) | $raw %];
|
||||
</script>
|
||||
[% Asset.js("js/vue/dist/ill.js") | $raw %]
|
||||
|
|
|
|||
|
|
@ -1070,63 +1070,29 @@ export default {
|
|||
const tableOptions = {
|
||||
url: () => tableUrl(),
|
||||
options: { embed: "requesting_agency,messages" },
|
||||
//table_settings: supplying_ill_table_settings, #FIXME: This causes error from datatables.js -> out of this scope
|
||||
table_settings: {
|
||||
columns: [
|
||||
table_settings: supplying_ill_table_settings,
|
||||
add_filters: true,
|
||||
filters_options: {
|
||||
status: statuses.value
|
||||
.map(status => ({
|
||||
_id: status.id,
|
||||
_str: $__(status.id),
|
||||
}))
|
||||
.sort((a, b) => a._str.localeCompare(b._str)),
|
||||
service_type: [
|
||||
{
|
||||
columnname: "iso18626_request_id",
|
||||
cannot_be_modified: 0,
|
||||
is_hidden: 0,
|
||||
cannot_be_toggled: 0,
|
||||
_id: "Copy",
|
||||
_str: $__("Copy"),
|
||||
},
|
||||
{
|
||||
columnname: "supplyingAgencyId",
|
||||
is_hidden: 0,
|
||||
cannot_be_modified: 0,
|
||||
cannot_be_toggled: 0,
|
||||
_id: "CopyOrLoan",
|
||||
_str: $__("CopyOrLoan"),
|
||||
},
|
||||
{
|
||||
is_hidden: 0,
|
||||
cannot_be_toggled: 0,
|
||||
cannot_be_modified: 0,
|
||||
columnname: "requesting_agency",
|
||||
render: function (data, type, row, meta) {
|
||||
return (
|
||||
'<a target="_blank" href="/cgi-bin/koha/ill/ill-requests.pl?' +
|
||||
"op=illview&illrequest_id=" +
|
||||
encodeURIComponent(data) +
|
||||
'">' +
|
||||
escape_str(row.id_prefix) +
|
||||
escape_str(data) +
|
||||
"</a>"
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
is_hidden: 0,
|
||||
cannot_be_toggled: 0,
|
||||
cannot_be_modified: 0,
|
||||
columnname: "status",
|
||||
},
|
||||
{
|
||||
is_hidden: 0,
|
||||
cannot_be_modified: 0,
|
||||
cannot_be_toggled: 0,
|
||||
columnname: "updated_on", //TODO: Check if these table_settings is being used at all?
|
||||
},
|
||||
{
|
||||
is_hidden: 0,
|
||||
cannot_be_toggled: 0,
|
||||
cannot_be_modified: 0,
|
||||
columnname: "requestingAgencyRequestId",
|
||||
_id: "Loan",
|
||||
_str: $__("Loan"),
|
||||
},
|
||||
],
|
||||
default_display_length: null,
|
||||
table: "iso18626_requests",
|
||||
module: "ill",
|
||||
default_save_state: 1,
|
||||
page: "ill",
|
||||
default_save_state_search: 0,
|
||||
},
|
||||
actions: {
|
||||
0: ["show"],
|
||||
|
|
|
|||
Loading…
Reference in New Issue