Description
Jonathan Druart
2023-03-01 10:00:02 UTC
Created attachment 147632 [details] [review] Bug 33104: DB changes Created attachment 147633 [details] [review] Bug 33104: DBIC changes Created attachment 147634 [details] [review] Bug 33104: Koha classes Created attachment 147635 [details] [review] 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. Created attachment 147636 [details] [review] Bug 33104: Make the code reusable We could then reuse it for the contacts code in this same template, on another bug report. Created attachment 147637 [details] [review] Bug 33104: Encrypt password Created attachment 147638 [details] [review] Bug 33104: Display the VENDOR_INTERFACE_TYPE AVs in the dropdown list Created attachment 147639 [details] [review] Bug 33104: Add tests Created attachment 148459 [details] [review] Bug 33104: DB changes Created attachment 148460 [details] [review] Bug 33104: DBIC changes Created attachment 148461 [details] [review] Bug 33104: Koha classes Created attachment 148462 [details] [review] 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. Created attachment 148463 [details] [review] Bug 33104: Make the code reusable We could then reuse it for the contacts code in this same template, on another bug report. Created attachment 148464 [details] [review] Bug 33104: Encrypt password Created attachment 148465 [details] [review] Bug 33104: Display the VENDOR_INTERFACE_TYPE AVs in the dropdown list Created attachment 148466 [details] [review] Bug 33104: Add tests Created attachment 148473 [details] [review] Bug 33104: DB changes Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Created attachment 148474 [details] [review] Bug 33104: DBIC changes Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Created attachment 148475 [details] [review] Bug 33104: Koha classes Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Created attachment 148476 [details] [review] 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> Created attachment 148477 [details] [review] Bug 33104: Make the code reusable We could then reuse it for the contacts code in this same template, on another bug report. Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Created attachment 148478 [details] [review] Bug 33104: Encrypt password Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Created attachment 148479 [details] [review] Bug 33104: Display the VENDOR_INTERFACE_TYPE AVs in the dropdown list Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Created attachment 148480 [details] [review] Bug 33104: Add tests Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> It looks like this has now been signed off by Jonathan. Jonathan, if you could update the status that would be great! (This credits you on the dashboard for the sign-off). Sorry, forgot to do that at the end! Thanks! (In reply to Jonathan Field from comment #26) > Sorry, forgot to do that at the end! Thanks! 8-) No problem! I've certainly forgotten to do this on occasion. 1) I18N ol.append(`<li><button class="btn btn-default" onclick="remove_interface(${i});"><i class="fa fa-trash"></i> Delete interface</li>`); 2) Vendor search * I am seeing a strange effect there: the "My Vendor" vendor with booksellerid=1 is showing up twice after applying the patch. Switching back to master makes the doubled up vendor go away. 3) Vendor edit form * Adding the email validation to the email field would be good. * If you add multiple interfaces, the type pull down empties/resets to "" for all interfaces when clicking on "Add another interface". This also happens to the already saved interfaces. 4) Vendor details page * The new information is not displaying correctly (see screenshot). I did a yarn build and reset_all, nothing would fix. Background is wrong and also the line height doesn't match with the other sections on the page. 5) Database update and sample data * This appears complete and correct :) Created attachment 149375 [details]
Screenshot of vendor detail page
(In reply to Katrin Fischer from comment #28) > 1) I18N > > ol.append(`<li><button class="btn btn-default" > onclick="remove_interface(${i});"><i class="fa fa-trash"></i> Delete > interface</li>`); Fixed. > 2) Vendor search > > * I am seeing a strange effect there: the "My Vendor" vendor with > booksellerid=1 is showing up twice after applying the patch. > Switching back to master makes the doubled up vendor go away. Fixed on bug 33103. > 3) Vendor edit form > > * Adding the email validation to the email field would be good. Done in "Add email validation" > * If you add multiple interfaces, the type pull down empties/resets to "" > for all interfaces when clicking on "Add another interface". This also > happens to the already saved interfaces. Done in "Prevent 'Type' to be cleared > 4) Vendor details page > > * The new information is not displaying correctly (see screenshot). I did a > yarn build and reset_all, nothing would fix. Background is wrong and also > the line height doesn't match with the other sections on the page. What are you suggesting? I think this is nicer than the others :D https://snipboard.io/Iwetbx.jpg Contacts are missing padding, contracts are in a table (what we don't want here, it won't be easy to read). Created attachment 149420 [details] [review] Bug 33104: Fix translatability Created attachment 149421 [details] [review] Bug 33104: Add email validation Created attachment 149422 [details] [review] Bug 33104: Prevent 'Type' to be cleared Created attachment 149431 [details] [review] Bug 33104: Remove fieldset For consistency with "Contacts" (In reply to Jonathan Druart from comment #30) > What are you suggesting? I think this is nicer than the others :D > > https://snipboard.io/Iwetbx.jpg > > Contacts are missing padding, contracts are in a table (what we don't want > here, it won't be easy to read). See last patch. Better for consistency, but IMO it was nicer prior to this patch (except the background weirdness) https://snipboard.io/jv7yIe.jpg (In reply to Jonathan Druart from comment #35) > (In reply to Jonathan Druart from comment #30) > > What are you suggesting? I think this is nicer than the others :D > > > > https://snipboard.io/Iwetbx.jpg > > > > Contacts are missing padding, contracts are in a table (what we don't want > > here, it won't be easy to read). > > See last patch. Better for consistency, but IMO it was nicer prior to this > patch (except the background weirdness) > > https://snipboard.io/jv7yIe.jpg I've filed bug 33499 for improving the vendor detail page. Otherwise... PQA now :) Created attachment 149492 [details] [review] Bug 33104: DB changes Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Created attachment 149493 [details] [review] Bug 33104: DBIC changes Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Created attachment 149494 [details] [review] Bug 33104: Koha classes Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Created attachment 149495 [details] [review] 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> Created attachment 149496 [details] [review] Bug 33104: Make the code reusable We could then reuse it for the contacts code in this same template, on another bug report. Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Created attachment 149497 [details] [review] Bug 33104: Encrypt password Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Created attachment 149498 [details] [review] Bug 33104: Display the VENDOR_INTERFACE_TYPE AVs in the dropdown list Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Created attachment 149499 [details] [review] Bug 33104: Add tests Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Created attachment 149500 [details] [review] Bug 33104: Fix translatability Created attachment 149501 [details] [review] Bug 33104: Add email validation Created attachment 149502 [details] [review] Bug 33104: Prevent 'Type' to be cleared Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 149503 [details] [review] Bug 33104: Remove fieldset For consistency with "Contacts" Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 149631 [details] [review] Bug 33104: Rename interfaces.id with interface_id Created attachment 149632 [details] [review] Bug 33104: DBIC changes Rename asked by Tomas. (In reply to Jonathan Druart from comment #51) > Rename asked by Tomas. Thanks Pushed to master for 23.05. Nice work everyone, thanks! Enhancement and dependencies are not present.. won't backport to 22.11.x |