Commit Graph

59113 Commits

Author SHA1 Message Date
Matt Blenkinsop edfa43fee2
Bug 38201: Extend additional toolbar buttons
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:13 -06:00
Jonathan Druart 6dbd7e1e75
Bug 38201: Use getToolbarButtons for "show"
Currently it's only used for the "list" view, and so its name was
confusing.

Now it can also be used for the "show" view, and allow addition of
custom buttons.

TODO:
1. I had to pass the resource from BaseResource as ResourceList could
   not access the resource[idAttr] value easily.
   Ideally we shouldn't need to pass functions
     getToolbarButtons().list()
     getToolbarButtons().show(resource)
   But only the array of buttons defs:
     getToolbarButtons().list
     getToolbarButtons().show

2. There is duplication of code when the default is overwritten. We
   could fallback to the default when none passed, or pass a string
   instead of the full button's def:
    return {
        list: () => {
            return [
                "add",
                {
                    to: { name: "EHoldingsLocalTitlesFormImport" },
                    icon: "plus",
                    title: __("Import from list"),
                },
                {
                    to: { name: "EHoldingsLocalTitlesKBARTImport" },
                    icon: "plus",
                    title: __("Import from KBART file"),
                },
            ],
        },
        show: resource => {
            return ["edit", "delete"]
        }
    }
    But that is much more work and not a blocker for now IMO

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:12 -06:00
Pedro Amorim e4e1bdc313
Bug 38201: Fix i18n
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:12 -06:00
Matt Blenkinsop 9888e7c60a
Bug 38201: Fix UI regression caused by RelationshipSelect
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:11 -06:00
Pedro Amorim 4d4149bde0
Bug 38201: Restore 'href' to table links
Bring back middle mouse button click opens in new tab interaction

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:11 -06:00
Pedro Amorim 586e24ad6d
Bug 38201: Update Cypress tests
perl /kohadevbox/misc4dev/run_tests.pl --run-cypress-tests-only

All passing

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:10 -06:00
Pedro Amorim 0f4c3fd1b0
Bug 38201: Ensure all HTML ids use plural form of resource name
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:10 -06:00
Pedro Amorim e05e0f1f1d
Bug 38201: Fix setWarning call in titles+packages
'this' is scoped inside forEarch, an error was thrown when submiting the form with errors

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:09 -06:00
Matt Blenkinsop 4cd93c87cf
Bug 38201: Delete LicensesList
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:09 -06:00
Matt Blenkinsop 270798ce49
Bug 38201: Remove accordion display from agreements
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:08 -06:00
Matt Blenkinsop 77b0f8de08
Bug 38201: Move tableColumns logic to the List component
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:08 -06:00
Pedro Amorim ebbc393d7e
Bug 38201: Add table_settings to missing resources
This enables the 'columns', 'copy shareable link' and 'configure' table settings.
Prior to this patch, only showing on agreements table

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:07 -06:00
Pedro Amorim 4e67d789b9
Bug 38201: Revert UsageStatistics WIP
This commit is important to serve as a base for when full migrating of this resource happens

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:07 -06:00
Pedro Amorim 7a2b7048ba
Bug 38201: 37273 compatibility rebase
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:06 -06:00
Pedro Amorim 404a99f151
Bug 38201: 38993 compatibility rebase
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:06 -06:00
Matt Blenkinsop 5a1a608449
Bug 38201: Add appendToShow functionality
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:05 -06:00
Matt Blenkinsop 52398c0122
Bug 38201: Update cypress tests
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:05 -06:00
Matt Blenkinsop a3b77a7c0d
Bug 38201: Fix for inverse boolean checks
We currently check for if a boolean is true but have no way of checking for a falsy value, this patch adds a fix for that

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:04 -06:00
Pedro Amorim 89cb2adf0c
Bug 38201: Fix custom toolbar buttons for eholdings titles
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:04 -06:00
Pedro Amorim 44767f5535
Bug 38201: Add 'id' property to FormRelationshipSelect
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:03 -06:00
Matt Blenkinsop 6e6d94d3aa
Bug 38201: Add a loading tag to the patron search
Fixes a longstanding FIXME

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:03 -06:00
Pedro Amorim f517d6032e
Bug 38201: Fix PatronSearch
The event listener was being added infinitely. Meaning that when new realtionships were added, the previously added ones were still firing their previously registered events.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:02 -06:00
Pedro Amorim c434e3041f
Bug 38201: Ensure related user roles have index
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:02 -06:00
Pedro Amorim 5a5129e68e
Bug 38201: Clean-up FormElement where it's not needed
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:01 -06:00
Pedro Amorim 0ba4958ffc
Bug 38201: Fix index concat on FormElement
This moves the _ concat to the concat logic rather than having it be defined at the resourceAttrs level.
This also makes it so that 'date' type attributes can also have indexRequired
The index is now only concated when the indexRequired is true

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:01 -06:00
Pedro Amorim 482e59e1bb
Bug 38201: DRY label in FormElement
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:00 -06:00
Pedro Amorim f85e082a92
Bug 38201: Add inheritAttrs: false
This prevents the props from being rendered as HTML element attributes

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:39:00 -06:00
Pedro Amorim 07cfe20a52
Bug 38201: Restore resourceName in ResourceList
We need this to render dynamic id attributes based on the resourceName

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:59 -06:00
Pedro Amorim 798a299785
Bug 38201: Only consider length of the field.type is relationshipWidget
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:59 -06:00
Pedro Amorim 6b6832e13f
Bug 38201: Check for resourceAttrs before using it
This enables certain resources (e.g. UsageDataProviderResource) to make
partial use of BaseResource (like gotoResourceShow, doResourceDelete).

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:58 -06:00
Pedro Amorim dc3184ae28
Bug 38201: Add formGroupsDisplayMode to common resource props
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:58 -06:00
Pedro Amorim bd55e12fe2
Bug 38201: Fix and add relationshipRequiredKey
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:57 -06:00
Pedro Amorim e3bb34c96a
Bug 38201: Add allowMultipleChoices prop to FormRelationshipSelect to consider multiple relationship choices
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:57 -06:00
Pedro Amorim fd129b5d57
Bug 38201: Consider a 'formatForForm' resource attribute option
This will format the attribute value using that callback function after the resource has been fetched from the API

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:56 -06:00
Pedro Amorim 02329d47b3
Bug 38201: Add optional :multiple attribute to 'select' form elements
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:56 -06:00
Matt Blenkinsop c00992e0fe
Bug 38201: DRY out getTableColumns
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:55 -06:00
Matt Blenkinsop bbd8f1c490
Bug 38201: Create a vendor type field
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:55 -06:00
Matt Blenkinsop 7f62577453
Bug 38201: Create a date type field for FlatPickr
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:54 -06:00
Matt Blenkinsop 7e2a54cba6
Bug 38201: Add JSDoc comments to BaseResource
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:54 -06:00
Matt Blenkinsop 1e78d8a831
Bug 38201: Move filters to a slot and dynamically assign resource component props"
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:53 -06:00
Pedro Amorim 431a905a04
Bug 38201: Remove unused component imports
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:53 -06:00
Pedro Amorim a8510a907f
Bug 38201: Add group accordion mode
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:52 -06:00
Pedro Amorim 2d15968c3a
Bug 38201: Add type 'number' to FormElement
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:52 -06:00
Matt Blenkinsop 89d78824a8
Bug 38201: Use resourceAttrs to generate new objects
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:51 -06:00
Matt Blenkinsop d3ee4527a6
Bug 38201: Move component routing to BaseResource
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:51 -06:00
Matt Blenkinsop a507ea2d00
Bug 38201: Move additional fields logic to the element component tree
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:50 -06:00
Matt Blenkinsop 2955a17c10
Bug 38201: Prevent ResourceShow from showing groups with no data
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:50 -06:00
Matt Blenkinsop 7a8e0cbe0e
Bug 38201: Fix casing in formadd
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:49 -06:00
Matt Blenkinsop 951f759ba2
Bug 38201: Improve terminology and variable naming
This patch changes some key terminology to improve clarity and fix some more obscure variable names

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:49 -06:00
Pedro Amorim cae0aef587
Bug 38201: Allow for form display groups as tabs
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-02 09:38:48 -06:00