Commit graph

13 commits

Author SHA1 Message Date
Jakob Meier
9ff6d97c90
cache products for item and product list and product view screen
BUG: when deleting a product the product list won't update
2024-02-23 20:06:49 +01:00
Jakob Meier
6cdfcdf85c
add cache to categories list & add autoupdate after editing / creating a
category
2024-02-23 16:13:15 +01:00
Jakob Meier
13c071b8ca
remove item&product confirmation dialog
Because there currently is no way to auto-refresh the lists it will
appear as if nothing changed.
Switching to a different tab and back again will update the list though
2024-02-23 10:16:57 +01:00
Jakob Meier
384fbb0573
separate new item screen
The edit item screen might be overwhelming at first,
and if you only want to add simple items (by name) to the list,
it is way easier to simply type the name and click create to create a
simple item.
After creating the item the user will be redirected (history
replacement) to the edit screen, but clicking back will bring them back
to the list.
This screen also makes linking products easier and allows the user to
create new products if they notice they are using the same item multiple
times or can't be bothered to switch to the products tab
2024-02-22 20:36:59 +01:00
Jakob Meier
b320d51fa1
Formatted files using dart format 2023-12-22 20:14:36 +01:00
Jakob Meier
192c5e3a8c
Added basic edit/create item screen
NOTE: The create screen needs more UX design,
at least some UI improvements to get it closer to the alpha2
screen.
IDEA: use Stepper to template item from product

NOTE: The delete item button is not implemented
2023-04-05 19:22:49 +02:00
Jakob Meier
456ed2836d
Added unit/value display to view-item and view-product.
NOTE: Whilst flutter supports plural-translations,
we are not using them for unitAmountDisplay,
because it is hard to choose the fitting one,
for doubles.
2023-04-05 10:22:43 +02:00
Jakob Meier
86dac312a5
Moved from category list to category map
This was done to make category selection easier

NOTE: this also fixes the bug, where the wrong category was selected,
or the category id returned out-of-bounds
2023-04-05 10:07:42 +02:00
Jakob Meier
eba0790f7c
More bug fixes (see description)
- Fixed bug where opening room would show null-error,
  for a couple of seconds.
  This was caused by the FAB not checking if widget.info!=null

- Added try&catch for item category,
  to prevent index-out-of-bounds when the item uses a category
  that no longer exists

- Renamed add/remove Articles to fit the new name: ShoppingListItem
2023-04-05 09:23:41 +02:00
Jakob Meier
5b398eb2ae
Bug fixes (see description)
- Fixed bug where switching room pages
  (list,products,categories,about),
  would result an unknown error,
  due to setState being called on a widget that isn't mounted.
  This was solved by surrounding the setState function,
  with a condition to check if the widget is mounted

- Fixed bug where room members weren't recognized as admins
  This was caused by a typedifference between the server and the app
  (The server now returns booleans,
  where as before a ==1 comparison was
  needed)
- Fixed bug where successfully closing the admin/kick member dialog,
  would crash the application.
  This was caused by popping the same context twice.
  We are now using two navigator (the outer and the inner one)
2023-04-05 08:54:48 +02:00
Jakob Meier
5cd21c8adf
Added Combined new/edit and view product screen
Similarily to categories and rooms,
the edit product screen is reused as a new-room screen,
which is especially easy, because the user is unable to select
the product id themselves.
NOTE: the dynamic value-unit input is still missing some "subunits"

The view product screen has links to the edit product page,
the view parent page (if available) and a not yet functional
view children screen.
NOTE: The parent product display should be restricted in width,
and the screen is missing value/unit information.
2023-04-04 20:28:26 +02:00
Jakob Meier
47387bb395
Added basic Shopping List and Product list
including the ability to
add item into the shopping cart and remove them.

The click events have been implemented,
however the routes do not exist yet.

NOTE: The shopping list item info sheet is still missing
the unit type and value
and some more advanced options, like deleting the item
2023-04-04 10:29:29 +02:00
Jakob Meier
eabb6b93ae
Moved room pages into seperate folder 2023-03-23 14:04:48 +01:00
Renamed from lib/screens/room/shopping_list.dart (Browse further)