Commit graph

18 commits

Author SHA1 Message Date
Erik Hohlfeld 5aefd4e05f Filter and distinguish products in orderCatalog 2024-01-19 19:00:51 +01:00
Simon Bruder 016d2f5715
Reorder setters/getters in InventoryMutateForm
Some methods were not ordered before.
2024-01-19 13:04:01 +01:00
Simon Bruder d0ac59de87
Fix typo in InventoryInitializer 2024-01-14 17:06:15 +01:00
Simon Bruder 8ab01fd65f
Simplify signature of InventoryMutateForm::of
This complicates the subclasses’ implementation, but it avoids having
to pass an unnecessary parameter.
2024-01-09 10:53:12 +01:00
Simon Bruder 7365b384e3
Make metric variable
This was somehow overlooked, but it should work.

This needs to change how the InventoryMutateForm handles quantities, as
the amount has to be split from the metric for addition to work.
2024-01-09 10:53:12 +01:00
Simon Bruder bac025fd0a
Make project REUSE compliant
This finally makes the licensing under AGPL-3.0-or-later explicit after
I got the okay from the kickstart source owners.

This also checks the REUSE compliance in a pre commit hook, and
therefore also in CI.
2023-12-11 17:59:14 +01:00
Paul Heimer 4300ee0408
Add comments to InventoryController 2023-12-09 12:02:38 +01:00
Simon Bruder e24ea8704f
Fix argument type for InventoryController::addRentable 2023-12-09 12:02:38 +01:00
Simon Bruder 4d89fdc10a
Restrict product types for inventory edit
The error message gets slightly less meaningful, but either are
currently just a mess.
2023-12-09 12:02:38 +01:00
Simon Bruder 0eb3276dde
Use class-wide PreAuthorize for InventoryController
This should protect against accidentally forgetting it for one method.
2023-12-09 12:02:37 +01:00
Simon Bruder 3e2cc3d0b2
Allow specifying order types in inventory
Fixes #95
2023-12-09 12:02:37 +01:00
Simon Bruder 2dff2842fc
Adapt inventory to new catalog interface
This also does a major restructuring of the inventory mutate form.

Some things still are not as they should be, but it mostly works like
before. They can be fixed later.

Co-authored-by: Theo Reichert <theo.reichert@mailbox.tu-dresden.de>
2023-11-29 18:42:37 +01:00
Simon Bruder c398c12592
Remove unused parameter in InventoryController
This was introduced in 6bd1c23e2d.
2023-11-27 18:45:38 +01:00
Paul Heimer f1f9539aae
Add error handling for inventory 2023-11-24 17:25:33 +01:00
Simon Bruder 6bd1c23e2d
Bind inventory mutate form to template
Co-authored-by: Paul Heimer <heimerp54@gmail.com>
2023-11-24 17:25:33 +01:00
Simon Bruder 695bc1d821
Do not use MonetaryAmount in inventory mutate form
While this creates duplicate code in the controller, it will vastly
simplify handling the form values.
2023-11-24 17:25:33 +01:00
Simon Bruder 58dae6532e
Make inventory only accessible for administrator
Fixes #33
2023-11-24 17:25:32 +01:00
Simon Bruder a156d9b2f7
Implement inventory prototype 2023-11-21 18:00:17 +01:00