Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
We certainly want to improve this test and run it in parallel.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
List of words to ignore
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This lists the new syntax for allowing all IPs in the preference
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch forces a check of authorized IPs against the Koha system preference, if nothing is present, no access is allowed
To test:
1 - Enable ILS-DI, leave ILS-DI:AuthorizedIPs blank
2 - In another window:
http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=1+2+99999&id_type=item
3 - You get a response
4 - Apply patch and restart all
5 - Reload ilsdi page, 'Not authorized'
6 - Copy the IP listed as refused and paste into ILS-DI:AuthorizedIPs
7 - Reload the page, you get a response again
8 - Change ILS-DI:AuthorizedIPs to:
0:0:0:0/0
9 - You still have access
10 - Paste your specific IP again, and add a second made up IP (comma separated)
11 - Reload and confirm you still have access
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Uncaught SyntaxError: missing ) after argument list
There are way more to fix in this controller...
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch ignores limits when updating a wrong transfer to ensure we can return a book
home when checked in at the wrong branch
To test:
1 - Enable UseBranchTransferLimits based on 'Collection code'
2 - Disable transfers for FIC from:
CPL -> FFL
CPL -> IPT
FFL -> CPL
FFL -> IPT
IPT -> CPL
IPT -> FFL
3 - Set library to IPT
4 - Checkin an FFL item
5 - It generates a transfer home
6 - Set library to CPL
7 - Check the item in
8 - 500 error, and in logs:
==> /var/log/koha/kohadev/plack-error.log <==
Exception 'Koha::Exceptions::Item::Transfer::Limit' thrown 'Transfer not allowed'
9 - Apply patch, restart all
10 - Check item in again
11 - Success! Transfer updated
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Use html filters for most of the parameter variables, when possible.
The following parameters do need to be used raw, as they are expected to
contain HTML code or complete url strings:
modal_action
modal_custom_confirm
modal_print_url
modal_custom_utility_button
modal_custom_deny
modal_footer_append
If the caller includes any inputs from elsewhere in the above
parameters, the caller must filter those inputs using the appropriate
TT filter.
This patch also adjusts the handling of header data so that only plain
text should be passed.
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Add t() calls to make text translatable
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Refactor the code for hold-found2 to use the new modal_wrapper and
passthrough_data block as a proof of concept.
The modal is also renamed hold-found-modal.
To test:
Setup:
0. Set system preferences:
- HoldsAutoFill = Don't
- ShowAllCheckins = Show
1. Find a biblio record with multiple items
2. Set the homebranch on all of those items to the logged-in branch
3. Place two holds on that record:
- One for pickup at the logged-in branch (Hold A)
- One for pickup at a different branch (Hold B)
4. Keep the tab for the biblio record open, and open a new tab for
checkins
5. Check in an item from that bib
6. Take a screenshot of the modal on main for easy comparison
7. Ignore the hold
8. Apply patches
Test a hold for pickup at the logged-in branch:
9. Check in the item again
--> Confirm that the new modal contains all the correct information for
Hold A. The only change in the modal should be that the title is now
in the modal body instead of the modal header.
10. Open all of the links in the modal body in new tabs.
--> Confirm the links all work as expected, then close those tabs
11. Click to ignore the hold
--> Confirm that the checkins table displays correctly
12. Reload the Holds tab of the biblio record
--> Confirm the holds are unchanged
13. Switch to the Normal tab of the biblio record
--> Confirm the item still shows as Available
14. Check in the item again and click the button to confirm the hold
--> Confirm that the checkins table displays correctly
15. Reload the Holds tab of the biblio record
--> Confirm Hold A is now set to Waiting
16. Revert the waiting status on Hold A
17. Check in the item again
18. Click the button to confirm and print slip
--> Confirm the print dialog appears and slip information is correct
19. Cancel the print dialog
--> Confirm that the checkins table displays correctly
20. Reload the Holds tab of the biblio record
--> Confirm Hold A is now set to Waiting
Test a hold for pickup at a different branch:
21. Check in a different item from that bib
--> Confirm that the new modal contains all the correct information for
Hold B, and correctly states that the item needs to be transferred
22. Click to ignore the hold
--> Confirm that the checkins table displays correctly
23. Reload the Holds tab of the biblio record
--> Confirm the hold is unchanged
24. Switch to the Normal tab of the biblio record
--> Confirm the item still shows as Available
25. Check in the item again and click the button to confirm and transfer
--> Confirm that the checkins table displays correctly
26. Reload the Holds tab of the biblio record
--> Confirm Hold B is now set to in-transit
27. Revert the transit status on Hold B
28. Check in the item again
29. Click the button to print slip, transfer, and confirm
--> Confirm the print dialog appears and slip information is correct
30. Cancel the print dialog
--> Confirm that the checkins table displays correctly
31. Reload the Holds tab of the biblio record
--> Confirm Hold B is now set to in-transit
32. Change your logged-in branch to match Hold B's pickup location
33. Check in the item again
--> Confirm the modal still contains all the correct information for
Hold B and does not say it needs to be transferred
34. Click to print slip and confirm
--> Confirm that the print dialog appears and looks correct
35. Cancel the print dialog
36. Reload the Holds tab of the biblio record
--> Confirm that both holds are now Waiting
37. Sign off :D
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
There are a number of variable values that need to get passed back to
the controller after submitting a modal to maintain the checkin page's
state. Currently, all of these inputs are manually coded for each modal.
Add a Template Toolkit block that can be used instead to add all of
these mandatory "pass-through" values.
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch adds the block modal_wrapper to html_helpers.inc.
NOTE: The caller is responsible for sanitizing all data inputs.
Minimal usage:
[% WRAPPER modal_wrapper modal_id=<id> modal_header_contents=<contents> %]
<modal body goes here>
[ % END %]
The above will produce an informational modal with an "OK" button to
dismiss, and no actions taken.
Optional parameters to add functionality to the modal:
noblock=1 - if the modal should not block
modal_action - if the modal should submit a form, the action url for
the form
To add a "confirm" button that will submit the modal form:
modal_confirm_text - text to show on the button (must be specified)
modal_confirm_name - (optional) specify a name attribute
modal_confirm_val - (optional) specify a value attribute
modal_confirm_accesskey - (optional) specify an accesskey attribute
To add a "print" button that will open a print window to the specified url:
modal_print_text - text to show on the button (must be specified)
modal_print_url - url of the page to print (must be specified)
modal_print_name - (optional) specify a name attribute
modal_print_accesskey - (optional) specify an accesskey attribute
To add a "cancel/deny/dismiss" button:
modal_deny_text - text to show on the button (must be specified)
modal_deny_action - "submit" if the deny button should submit the modal
(to take some denial/cancellation action)
- "dismiss" if the deny button should dismiss the
modal without submitting the form
- This parameter can be omitted if the button should
neither submit nor dismiss the modal (for example,
if the button click will be handled with JS)
modal_deny_name - (optional) specify a name attribute
modal_deny_val - (optional) specify a value attribute
modal_deny_accesskey - (optional) specify an accesskey attribute
If the above generic buttons do not suffice, the below parameters can be
used in addition or instead of the above options to specify custom
button code and/or other customized footer content:
modal_custom_confirm
modal_custom_utility_button
modal_custom_deny
modal_footer_append
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch introduces a new set of CSS styles for forms in the staff
interface using CSS grids for layout. It's intended to make forms more
responsive.
The basic structure looks like this:
<fieldset class="fg"> /* fg = form grid */
<div class="fg-row">
<div class="fg-label">
<label for="label">Label: </label>
</div>
<div class="fg-input">
<input type="text" name="field" value="field" />
</div>
</div>
</fieldset>
Please feel free to disagree with the class names or the markup itself.
I was trying to strike a balance between brevity and flexibility.
Why not use build-in Bootstrap CSS for forms? Bootstrap does have a lot
of forms CSS available, but the form layout they offer are built with
flexbox, not grids. I think the grid layout gives us better control over
the appearance we want.
The patch also includes some adjustments to Flatpickr CSS in order to
make it work with this new style of form as well as the "old" ones.
The patch includes the CSS changes and an update to the library
administration page as a proof of concept.
To test, apply the patch and rebuild the staff interface CSS.
- Go to Administration -> Libraries
- Edit a library
- Confirm that the form looks good and functions correctly.
- Test the page at various browser widths to confirm that responsiveness
is improved.
- Test another form--patron edit for example--to confirm that everything
looks good there, especially Flackpickr inputs.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
If a request has a status_alias and that status_alias does not have a lib_opac defined, it'll show as an empty status on the OPAC.
Staff UI always shows the request's status and adds the status_alias only if that is defined. The same should happen on the OPAC.
To test:
1) Enabled ILLModule
2) Create a new ILL request, visit:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) Add '42' on the cardnumber. Pick any library. Click 'Create'.
4) Add a new 'status_alias' entry, visit the authorized values page:
http://localhost:8081/cgi-bin/koha/admin/authorised_values.pl
5) Search for 'ill_'. Pick 'ILL_STATUS_ALIAS'. Click 'Add a new authorized value'.
6) Enter the 'Authorized value' of 'test', and 'Description' of 'test'. Click 'Save'.
7) Visit the previously created ILL request:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=1
8) Click 'Edit request' from the top toolbar.
9) On the 'Status' dropdown, pick 'test'. Click 'Submit'.
10) Visit the ILL on the OPAC:
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl
11) Notice the 'status' column does not display the status_alias. Click the 'View', notice the 'status' entry does not display the status_alias.
12) Apply patch. Repeat. Notice it defaults to displaying the authorised value code if lib_opac is empty.
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patchset moves the `Standard` backend templates into the right
places so they are picked up for translation.
To test:
1. Apply this patches
2. Notice the `Standard` ILL backend works as expected
3. Run:
$ ktd --shell
k$ cd misc/translator/po
k$ git fetch ; git reset --hard origin/main
k$ cd ..
k$ perl translate update es-ES
k$ cd po
k$ git diff
4. Inside the diff pager, make a search for 'backends/Standard'
=> SUCCESS: There are strings that come from the Standard backend!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch makes changes to the table introduced in the original patch:
* It gets rendered using `kohaTable` instead of manually crafting the datatable
* Embeds are parameters for `kohaTable` thus no need to build the
headers manually
* A default render method is introduced, which HTML-escapes the data for
safety, and also deals with `null` values which could cause problems.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch splits the controller in two:
* A controller for staff users use
* An unprivileged access controller
A new endpoint is added for publi access:
* `/public/patrons/:patron_id/ill/requests`
The public one makes use of the state-of-the-art in Koha for public
endpoints, using the `$c->auth->public` validation helper and leaving
the (newly added) public path spec with no special permissions
requirements.
The staff-oriented endpoint gets the right permissions added (at least
those used in the main `/ill/requests` endpoint.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ yarn api:bundle
k$ prove t/db_dependent/api/v1/ill_requests.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Sponsored-by: Wiko <https://www.wiko-berlin.de/>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Sponsored-by: Wiko <https://www.wiko-berlin.de/>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Sponsored-by: Wiko <https://www.wiko-berlin.de/>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This brings it technologically closer to intranet's ILL table and also enables pagination.
Test plan:
1. In KTD, go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=master+switch and enable the ILL module
2. Run the following in koha-shell to populate the request list for user `koha`:
perl -Mt::lib::TestBuilder -e '
my $builder = t::lib::TestBuilder->new;
do {
$builder->build_sample_ill_request({borrowernumber => 51});
} for (1..50);
'
3. Navigate to http://localhost:8080/cgi-bin/koha/opac-illrequests.pl, log in as `koha` as needed
4. Observe the new request list being paginated and server-side-sortable
Sponsored-by: Wiko <https://www.wiko-berlin.de/>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
To test:
1. On a bib with one item place a hold for pickup at library A and Library B
2. Check the item into library A
3. Set the first hold's expiration date to the past
4. On Holds awaiting pickup > Holds waiting past their expiration date
In the actions column click the 'Cancel hold' button
5. Notice the alert says 'This item is on hold for pick-up at'
with no library name
6. Apply patch and redo steps 1-4
7. Confirm the alert include's Library B's name
This item is on hold for pick-up at Library B
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch updates the bibliographic export page so that item type and
library export use Select2 form fields. This change has the added
benefit of enabling the removal of a single-use include,
branch-selector.inc.
The patch also adds some JavaScript to make sure the "CSV profile" field
appears on page load if CSV is selected as the file format. This is
helpful if the user has reloaded the page or arrived at the page by
using the browser back button.
To test, apply the patch and go to Cataloging -> Export catalog data.
- Under the "Export bibliographic records" tab you should see two
Select2-style form field under the "Select records to export" heading,
"Item type" and "Home library."
- Confirm that the fields work correctly when adding one or more
selections to each.
- Confirm that the selections work correctly to filter the export. I
recommend using CSV as the file format for the export. A MARC export
CSV profile (Tools -> CSV profiles -> New CSV profile) containing
these fields will show the relevant information:
Title=245$a\|Library=952$a\|Itemtype=952$y
- When you select CSV as the file format the "CSV profile" dropdown menu
should appear. If you choose a different format, that dropdown should
disappear.
- With CSV selected as the file format, reload the page. The "CSV
profile" field should still be visible.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Janne <janne.seppanen@lahti.fi>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Having branch transfers in the action logs would help to more fully show the cycle of holds that require transfers.
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the new syspref LogTransfers
5) Create and finish some transfers, note the new logs in the log
viewer!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This change modifies Makefile.PL so that we no longer have to
manually add to the Makefile.PL all the files that end up in the
"vue/dist" folder.
Instead, we dynamically generate the files, and then copy them over
to the build target.
Test plan:
0. Apply all patches
1. Setup intall target
sudo mkdir /opt/koha
sudo chown kohadev-koha /opt/koha
2. Clean build env
rm -rf koha-tmpl/intranet-tmpl/prog/js/vue/dist/* blib Makefile /opt/koha/*
3. perl Makefile.PL
Installation mode (dev, single, standard) [standard] single
Please specify the directory in which to install Koha [/var/lib/koha/kohadev/koha] /opt/koha
NOTE: Otherwise accept all defaults
4. make install
5. "vue/dist" successfully installed
Note all our expected files are installed including islands.esm.js
Amended-by: Jonathan Druart
Tidy
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
- For now let's not rely on rspack's native css loader to parse and
bundle styles as we need to preserve compatibility.
- Reintroduce configuration block for style-, css-loader for islands.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
- Remove 'experiments: css' for the first config block since it seems to do 2 passes when building the css.
- Remove style-, css-loader configuration for islands as I assume it is unneeded in this case.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
- Split the rspack config into a umd and an esm section.
- Don't hydrate by default.
- Instead check the "init" attribute for the currentScript when using the umd.
- Allow for manual import and call when using the esm.
- Add examples for both in intranet-main.tt (to be removed).
- Add a DialogIsland wrapper for the shared Dialog component (to map props to stored refs).
- Move DialogIsland as well as Demo components into an Islands directory under components.
- Add i18n initialisation to hydrate's idle callback.
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
- Additionally:
- Use a type instead of an interface.
- Add JSDoc to it.
- Use optional chaining when checking for existence and length of config.
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This should ensure that we only load what's requested.
Maybe we can also find a way to call the exported hydrate function on demand.
To test:
1) Apply the patch
2) Run yarn js:watch and wait for the first build if necessary
3) Load mainpage.pl and note that only hello-islands.ts is imported.
4) Uncomment <hello-world></hello-world> in intranet-main.tt
5) Reload the page
6) Note that now both component chunks are imported on demand
7) Discuss
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>