Bug 33466: Link to the vendor from the ERM module

There are 3 tables in the ERM module where we display the vendor name
but without a link to the acquisition module.

This patch adds the links.

Test plan:
Create an agreement, a license and a local package.
Pick a vendor and notice that now there is a link on the list view.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2023-04-11 11:27:08 +02:00 committed by Tomas Cohen Arazi
parent ca80bf67ce
commit f92f967626
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
3 changed files with 17 additions and 3 deletions

View file

@ -252,7 +252,11 @@ export default {
orderable: true,
render: function (data, type, row, meta) {
return row.vendor_id != undefined
? escape_str(row.vendor.name)
? '<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=' +
row.vendor_id +
'">' +
escape_str(row.vendor.name) +
"</a>"
: ""
},
},

View file

@ -180,7 +180,13 @@ export default {
searchable: true,
orderable: true,
render: function (data, type, row, meta) {
return row.vendor ? escape_str(row.vendor.name) : ""
return row.vendor_id != undefined
? '<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=' +
row.vendor_id +
'">' +
escape_str(row.vendor.name) +
"</a>"
: ""
},
},
{

View file

@ -152,7 +152,11 @@ export default {
orderable: true,
render: function (data, type, row, meta) {
return row.vendor_id != undefined
? escape_str(row.vendor.name)
? '<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=' +
row.vendor_id +
'">' +
escape_str(row.vendor.name) +
"</a>"
: ""
},
},