Bug 33104: Add the ability to create vendor interfaces
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 1 Mar 2023 14:53:22 +0000 (15:53 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 5 May 2023 13:18:46 +0000 (10:18 -0300)
commit06b1ca3bded11129bf6a4ede0d0d0f37a88b38f5
tree30226d5b5d98d8a2e732bb2d16471ce89733c338
parent087f4db2133eef07255bb4d4af8ae8769942d41d
Bug 33104: Add the ability to create vendor interfaces

This patchset is adding the ability to create interfaces for vendors.
An interface is a website, software, or portal that you use to manage orders or
gather statistics from the vendor/organisation.

It will help librarians to keep track of those different information
within Koha.

* new DB table aqbookseller_interfaces(id, vendor_id, type, name, uri,
login, password, account_email, notes)
* new AV category VENDOR_INTERFACE_TYPE with 3 example values ADMIN,
ORDERS, REPORTS
* new pair of Koha classes Koha::Acquisition::Bookseller::Interface[s]
* new method to retrieve the interfaces from the vendor
Koha::Acquisition::Bookseller->interfaces
* Add/Delete interfaces when editing a vendor
* Display the interfaces on the vendor show view

Test plan:
- Add a new vendor
=> Notice the new "Interfaces" block
- Create some interfaces
=> They are display on the vendor show view
=> The password is hashed and can displayed on the demand

QA Note:
The "contacts" code is not very nice and I didn't want to replicate it,
so I went another way and tried to make the code reusable, for further
reutilisation.

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Acquisition/Bookseller.pm
acqui/updatesupplier.pl
koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt