Commit graph

54 commits

Author SHA1 Message Date
Simon Bruder de8c206b9d
Configure API using proper function 2024-07-14 14:05:04 +02:00
Simon Bruder c8de447334
Redirect to requested resource after login 2024-07-14 13:38:36 +02:00
Simon Bruder 6ad8426e7f
Fix urlencoding when jumping to unknown ID 2024-07-14 13:11:42 +02:00
Simon Bruder 13ce4d0611
Expose label generation to frontend
The javascript code is quite horrible, but it works ¯\_(ツ)_/¯
2024-07-14 01:28:56 +02:00
Simon Bruder 5a80201850
Add original packaging attribute to items 2024-07-13 16:16:30 +02:00
Simon Bruder bbb57efdd2
Show associated items on item class page 2024-07-13 15:22:34 +02:00
Simon Bruder a373647c2d
Remove duplication in function names 2024-07-13 15:12:49 +02:00
Simon Bruder 253cd9f832
Expose deletion in frontend 2024-07-13 15:05:00 +02:00
Simon Bruder 629e7ae825
Make page actions more configurable 2024-07-13 15:04:27 +02:00
Simon Bruder 7563905e66
Add authentication 2024-07-13 13:43:55 +02:00
Simon Bruder 56ebf2e376
Set default log level to info 2024-07-13 13:43:54 +02:00
Simon Bruder 2438e1e801
Display short ID on SII 650 Data Matrix label 2024-07-13 13:43:54 +02:00
Simon Bruder e053d491d1
Add branding to labels 2024-07-13 13:43:53 +02:00
Simon Bruder 1a9f0f2e7d
label: Rename IdTextConfig to TextConfig
It is not specific to IDs.
2024-07-13 13:43:52 +02:00
Simon Bruder ebbc5c0c19
Include custom build of Iosevka 2024-07-13 13:43:51 +02:00
Simon Bruder 4cf16f8944
Implement actix Responder for Label 2024-07-13 13:43:50 +02:00
Simon Bruder ce171225be
Move inner label logic from api to label module 2024-07-13 13:43:49 +02:00
Simon Bruder 37c7def8d1
Add quick jump feature 2024-07-13 13:43:48 +02:00
Simon Bruder 98af21d4aa
Add simple search for UUID references 2024-07-12 15:44:11 +02:00
Simon Bruder c8d547998c
Add short id to item for usage with labels 2024-07-12 00:53:46 +02:00
Simon Bruder a6461723c5
Add useful page actions 2024-07-11 23:20:22 +02:00
Simon Bruder 49c77bfef9
Use owned strings for PageAction 2024-07-11 23:17:22 +02:00
Simon Bruder bca21a8fe7
fixup! Allow prefilling add forms 2024-07-11 23:16:28 +02:00
Simon Bruder a1a88591f9
Improve page action display 2024-07-11 23:07:56 +02:00
Simon Bruder 0dc09cef4f
fixup! Switch to maud for templating 2024-07-11 23:02:50 +02:00
Simon Bruder d24a363a63
Improve checking of form with optional fields 2024-07-11 23:01:45 +02:00
Simon Bruder fdfd90a704
Allow prefilling add forms 2024-07-11 23:01:27 +02:00
Simon Bruder 44123b52c9
Make item group value owned string 2024-07-11 23:00:55 +02:00
Simon Bruder a698f96bbc
Fix handling of input toggle on cached form 2024-07-11 22:56:22 +02:00
Simon Bruder 375fa7740e
Add creation date to allow consistent ordering 2024-07-11 21:50:03 +02:00
Simon Bruder f030d16d09
Switch to sqlx
While diesel has a native rust interface, writing more complex queries
is easier when you can just pass a SQL query string.
2024-07-11 17:25:01 +02:00
Simon Bruder 52fcda5cfe
Show children in item class details 2024-07-11 13:50:59 +02:00
Simon Bruder de65452a01
Simplify item class model
Whether an item class is generic or specific can be deduced from whether
a parent exists or not.

While the SQL migration (especially the down direction) is quite
complex, it simplifies the handling quite a bit.
2024-07-11 13:25:09 +02:00
Simon Bruder 4a2dc721d4
Switch to maud for templating 2024-07-11 01:17:04 +02:00
Simon Bruder 11be165f6d
Use nightly rust for development 2024-07-11 01:17:01 +02:00
Simon Bruder 38e36482d0
Fix editing item class
This diesel attribute was set in an earlier (unrelated) commit for
NewItem, but not NewItemClass.
2024-07-11 01:16:45 +02:00
Simon Bruder c4a73204aa
Make item name optional
This vastly changes how item names are displayed. To make this more
ergonomic, it adds some helper macros. This also aids in adhering to
DRY.
2024-07-11 01:16:45 +02:00
Simon Bruder 5147257e72
Show direct children for item 2024-07-11 01:16:44 +02:00
Simon Bruder b736eba0a0
Show parent hierarchy in item list and details 2024-07-11 01:16:43 +02:00
Simon Bruder 9138865b48
Do not show ID of item class parent on detail page 2024-07-11 01:16:43 +02:00
Simon Bruder 089657d5da
Show item class parent in listing 2024-07-11 01:16:42 +02:00
Simon Bruder 02c1ac1e9d
Make UUID from details page copyable 2024-07-11 01:16:41 +02:00
Simon Bruder 88685bf54b
Do not show UUID in listing 2024-07-11 01:16:40 +02:00
Simon Bruder af2ce1e9b1
Add label printing 2024-07-11 01:16:39 +02:00
Simon Bruder 21c99a1677
Use diesel-async
This simplifies running queries, as it avoids having to use web::block
for everything.
2024-07-11 01:16:39 +02:00
Simon Bruder 7b47d89666
Add deletion to API
It is not yet exposed to the frontend.
2024-07-11 01:16:38 +02:00
Simon Bruder 775bc6ba9e
Add item classes 2024-07-11 01:16:37 +02:00
Simon Bruder ae50056252
Add postgresql CLI 2024-07-11 01:16:36 +02:00
Simon Bruder acd5ab3c4c
diesel: Do not automatically generate schema
It currently can’t handle views, so it has to be updated manually based
on diesel print-schema.
2024-07-11 01:16:36 +02:00
Simon Bruder ffddf2ba00
Add parent to item 2024-07-11 01:16:35 +02:00