Commit graph

83 commits

Author SHA1 Message Date
Simon Bruder 06f9d3f3ad
Generalize parents_breadcrumb 2024-08-06 17:11:47 +02:00
Simon Bruder bb309f5cd9
Show item classes as tree 2024-08-06 17:11:45 +02:00
Simon Bruder ae4e583c2d
Allow unlimited nesting of item classes 2024-08-06 17:11:44 +02:00
Simon Bruder b22588cd0d
Move app creation to lib.rs
All checks were successful
/ build (push) Successful in 1m55s
This makes integration testing much easier as it can reuse the app
instance.
2024-07-27 22:15:58 +02:00
Simon Bruder 79c4ab6c2b
Add unit tests for database::items
All checks were successful
/ build (push) Successful in 5s
2024-07-27 20:45:30 +02:00
Simon Bruder 6e4e8d3d93
Fix formatting of short ID on label
PostgreSQL adds a space in front of the number if not specified
otherwise, to account for a minus sign with negative numbers. As all
short IDs are positive, it can be suppressed here.
2024-07-27 16:15:14 +02:00
Simon Bruder 61a49afaf7
Make item (class) delete fail on invalid ID 2024-07-25 23:22:59 +02:00
Simon Bruder f33f3c8b9c
Move database operations to separate module
This can be seen as partially reverting
e83bc8316e, which moved everything to the
place where it was used.
2024-07-25 23:22:56 +02:00
Simon Bruder a320f3834a
Improve page title layout with long titles
All checks were successful
/ build (push) Successful in 26s
2024-07-24 16:44:30 +02:00
Simon Bruder 1e5f7930ab
Use clap for configuration 2024-07-24 16:44:29 +02:00
Simon Bruder bcbb7dfc67
Add item state 2024-07-24 16:29:22 +02:00
Simon Bruder 27ebe5770a
Remove home link from navbar
There is nothing there and it can also be reached by clicking on the
branding.
2024-07-24 12:19:58 +02:00
Simon Bruder e83bc8316e
Move away from models and manage subpackage
This architecture was started when the project still used Diesel.
Now that it uses SQLx, less things are done in Rust and more are done in
SQL. This commit now moves more of the query logic into SQL, which
should lead to more efficient queries and less moving data around.
2024-07-24 12:19:55 +02:00
Simon Bruder b7adf03dcc
Decrease visibility of NewItem(Class)Form* 2024-07-21 18:28:19 +02:00
Simon Bruder f4202a1ed5
Split frontend files 2024-07-21 15:57:51 +02:00
Simon Bruder d6a0f0a9ff
Do not use Item in generate_labels 2024-07-21 15:29:30 +02:00
Simon Bruder bb011cf84a
Use ItemPreview for parent breadcrumbs 2024-07-21 15:26:39 +02:00
Simon Bruder 5563cc1c9a
Add helper for item preview
Its API currently seems not that optimised, but in the future I want to
decrease the depdendencies on Item and ItemClass, so this is a step in
that direction.
2024-07-21 15:18:09 +02:00
Simon Bruder 82c7533b4c
Refactor ItemName::new to take strings directly
This loosens the dependency on always querying full Items and
ItemClasses.
2024-07-21 15:09:57 +02:00
Simon Bruder f21f8dfa5e
Make InputGroup value a reference
It is somewhat cumbersome to manually cast the value to &dyn Display
when mapping on an Option, but I guess it is more efficient.
2024-07-21 15:03:29 +02:00
Simon Bruder c8bc885919
Remove API
I didn’t really use it apart from very early testing and I don’t
anticipate it getting much use. It might be reintroduced in the future.
2024-07-20 23:09:22 +02:00
Simon Bruder 1195287bc8
label: Add Square28 preset
All checks were successful
/ build (push) Successful in 7s
2024-07-20 13:31:03 +02:00
Simon Bruder cf5157c3cf
label: Add text wrapping 2024-07-20 13:31:02 +02:00
Simon Bruder 8e61f34b3f
Allow displaying datalist hint as link 2024-07-19 00:07:15 +02:00
Simon Bruder 8aff438f98
Show counts for lists 2024-07-19 00:06:33 +02:00
Simon Bruder 4f169bc8fd
Add generating labels for direct children of item 2024-07-19 00:06:32 +02:00
Simon Bruder cfaaa01fbf
Actually show full parents when requested 2024-07-19 00:06:31 +02:00
Simon Bruder b55c8373d3
Fix item order in get_parents_details 2024-07-19 00:06:31 +02:00
Simon Bruder 125627d7d2
Allow batch adding items 2024-07-19 00:06:30 +02:00
Simon Bruder 693fe68797
Extract label generation page action dropdown 2024-07-19 00:06:29 +02:00
Simon Bruder 7defae7931
Decouple item (class) form from model
This makes it possible to introduce form-only fields without affecting
the model.
2024-07-19 00:06:27 +02:00
Simon Bruder e3cb717087
Autofocus jump input 2024-07-19 00:06:26 +02:00
Simon Bruder 07a9a6f9f2
Use rust-embed for serving static files 2024-07-19 00:06:24 +02:00
Simon Bruder c33733c614
Allow generating label from item (class) page 2024-07-19 00:06:23 +02:00
Simon Bruder b15a2e2885
Generalize PageAction to allow dropdown 2024-07-19 00:06:22 +02:00
Simon Bruder a528b9fe44
Add description to item and item class 2024-07-19 00:06:21 +02:00
Simon Bruder 512cca854b
Allow InputGroup to be non-required 2024-07-19 00:06:20 +02:00
Simon Bruder bd9a531dad
Configure API using proper function 2024-07-19 00:06:20 +02:00
Simon Bruder 092a01cdb2
Redirect to requested resource after login 2024-07-19 00:06:19 +02:00
Simon Bruder 35c287e082
Fix urlencoding when jumping to unknown ID 2024-07-19 00:06:18 +02:00
Simon Bruder d4b0290bd4
Expose label generation to frontend
The javascript code is quite horrible, but it works ¯\_(ツ)_/¯
2024-07-19 00:06:18 +02:00
Simon Bruder c67e31fdc5
Add original packaging attribute to items 2024-07-19 00:06:17 +02:00
Simon Bruder 5d8884c11d
Show associated items on item class page 2024-07-19 00:06:16 +02:00
Simon Bruder 21cd61ea1d
Remove duplication in function names 2024-07-19 00:06:15 +02:00
Simon Bruder 7100c29dd3
Expose deletion in frontend 2024-07-19 00:06:14 +02:00
Simon Bruder a07af2f2a9
Make page actions more configurable 2024-07-19 00:06:12 +02:00
Simon Bruder 3a222986c1
Add authentication 2024-07-19 00:06:11 +02:00
Simon Bruder d4b2ecfcea
Set default log level to info 2024-07-19 00:06:10 +02:00
Simon Bruder 2618b00779
Display short ID on SII 650 Data Matrix label 2024-07-19 00:06:09 +02:00
Simon Bruder d5fea320dd
Add branding to labels 2024-07-19 00:06:09 +02:00