Bug 38010: Allow searching by alias in the vendors table

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Matt Blenkinsop 2024-10-17 17:47:59 +01:00 committed by Katrin Fischer
parent 12338bbfee
commit 80bac7e221
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
3 changed files with 23 additions and 5 deletions

View File

@ -550,6 +550,21 @@ __PACKAGE__->add_columns(
'+invoiceincgst' => { is_boolean => 1 },
);
=head2 aliases
Type: has_many
Related object: L<Koha::Schema::Result::AqbooksellerAlias>
=cut
__PACKAGE__->has_many(
"aliases",
"Koha::Schema::Result::AqbooksellerAlias",
{ "foreign.vendor_id" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 koha_object_class
Missing POD for koha_object_class.

View File

@ -60,11 +60,14 @@
{{ vendor.accountnumber }}
</span>
</li>
<li v-if="vendor.aliases.count">
<li v-if="vendor.aliases.length">
<label>{{ $__("Aliases") }}:</label>
<ul>
<li v-for="alias in vendor.aliases" :key="alias">
{{ alias }}
<ul style="margin-left: 8rem">
<li
v-for="(alias, i) in vendor.aliases"
:key="alias.alias_id"
>
{{ $__("Alias") + " " + (i + 1) }}: {{ alias.alias }}
</li>
</ul>
</li>

View File

@ -172,7 +172,7 @@ export default {
return [
{
title: __("Name"),
data: "me.name:me.id",
data: "me.name:aliases.alias:me.id",
searchable: true,
orderable: true,
render(data, type, row, meta) {