Bug 33430: (follow-up) Fix the data filtering from the left menu
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
b9c5a10a11
commit
a0fec40b02
|
|
@ -1326,7 +1326,7 @@
|
|||
let suggestionData = [% To.json(suggestions) | $raw %];
|
||||
var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %]
|
||||
function loadDatatable(tabName) {
|
||||
let tabSuggestionData = suggestionData.find(s => s.suggestiontype === tabName)
|
||||
let tabSuggestionData = suggestionData.find(s => s.suggestiontype === `${tabName}`)
|
||||
$("#table_" + tabName).kohaTable(
|
||||
{
|
||||
sorting: [[4, "asc"]],
|
||||
|
|
@ -1479,7 +1479,7 @@
|
|||
{
|
||||
data: "status",
|
||||
searchable: false,
|
||||
orderable: false,
|
||||
orderable: true,
|
||||
render: function (data, type, row, meta) {
|
||||
if(row.status === 'ASKED') return '<span>%s</span>'.format(_("Pending"));
|
||||
if(row.status === 'ACCEPTED') return '<span>%s</span>'.format(_("Accepted"));
|
||||
|
|
|
|||
|
|
@ -456,14 +456,21 @@ if ( $op eq 'else' ) {
|
|||
|| $search_params->{$f} eq '';
|
||||
}
|
||||
for my $bi (qw (title author isbn publishercode copyrightdate collectiontitle)) {
|
||||
$search_params->{$bi} = { 'LIKE' => "%" . $search_params->{$bi} . "%" } if $search_params->{$bi};
|
||||
if ( $search_params->{$bi} ) {
|
||||
$search_params->{"me.$bi"} = { 'like' => "%" . $search_params->{$bi} . "%" };
|
||||
delete $search_params->{$bi};
|
||||
}
|
||||
}
|
||||
|
||||
$search_params->{archived} = 0 if !$filter_archived;
|
||||
foreach my $key ( keys %$search_params ) {
|
||||
if ( $key eq 'branchcode' ) {
|
||||
my $branch_param = delete $search_params->{$key};
|
||||
$search_params->{"me.branchcode"} = $branch_param;
|
||||
if ( $displayby ne 'branchcode' ) {
|
||||
my $branch_param = delete $search_params->{$key};
|
||||
$search_params->{"me.branchcode"} = $branch_param;
|
||||
} else {
|
||||
delete $search_params->{$key};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue