Brewtarget / brewtarget

Main brewtarget source code repository.
GNU General Public License v3.0
313 stars 134 forks source link

FEATURE: Quick Inventory Snapshot #761

Open marker5a opened 1 year ago

marker5a commented 1 year ago

Just thinking out loud about a nice to have. I feel there might be a more convenient way to show what is in inventory w/ hops, fermentables, etc... all in one view.

For isntance, you could go to the View menu bar at the top and there'd be a new entry called "In stock Invent." and that window would just show what's in stock. It could still allow you to edit inventory, but would only show what's currently in stock.

Thoughts?

marker5a commented 1 year ago

Also, FWIW, if there is interest and/or support to merge it, I'd love to work on it

matty0ung commented 1 year ago

Yes, improving how we handle inventory has been on my wish list for a long while. If you want to extend the UI in the way you suggest, then, yes, go for it.

The only thing I'd say is not to count on making a lot of changes to the database or to the NamedEntity classes (ie the ones in the src/model directory as those are not far off having a lot of incoming change from the BeerJSON work.

matty0ung commented 1 year ago

One day, it would also be neat, to show "Have we got the ingredients to brew this?" or have a button that says "What ingredients would we need to buy to brew this?"

And, ultimately, it would be rather neat to have a view that shows "What recipes can I brew with the ingredients I've got". But maybe that's phase 3. :smiley:

marker5a commented 1 year ago

Oh yeah, I like that! That's sort of what started this... going through old grain and hops and trying to figure out what to brew next :)

On Mon, Jul 3, 2023 at 2:42 PM Matt Young @.***> wrote:

One day, it would also be neat, to show "Have we got the ingredients to brew this?" or have a button that says "What ingredients would we need to buy to brew this?"

And, ultimately, it would be rather neat to have a view that shows "What recipes can I brew with the ingredients I've got". But maybe that's phase

  1. 😃

— Reply to this email directly, view it on GitHub https://github.com/Brewtarget/brewtarget/issues/761#issuecomment-1618995874, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSNTYMY6UFHH4G3JC6LVFTXOMHCVANCNFSM6AAAAAAZ4YWCWM . You are receiving this because you authored the thread.Message ID: @.***>

matty0ung commented 1 year ago

It should be easier to do once we've done the BeerJSON changes.

At the moment, for historical reasons, each Recipe holds a copy of an ingredient to signify the addition of that ingredient to the recipe. I'm probably going to fix this as part of the BeerJSON work (literally what I'm currently working on) so that we have a proper "use of" record. That probably involves extending fermentable_in_recipe and similar tables to hold more info so that we can do away with the duplication of records in the fermentable table (and probably drop the fermentable_children table altogether).

Once that's done, there would then be a strong case (I think) for doing something similar with inventory, so that we can track purchase dates, use-by dates and so forth for stock. It would likely be similar work, but extending the fermentable_in_inventory table. Hopefully we'd be able to get a leg-up from the BeerJSON work, if you see what I mean.

marker5a commented 7 months ago

I'm wondering, just because I'm looking at my hop inventory in the freezer, if it makes sense to add a toggle-able checkbox on each of the view pages that allows you to check it to only show inventory? This would be either in lieu of, or in parallel to, having a seperate inventory page that has yeast, hops, fermentables and misc all in one window.

image

If that seems cool with you guys, I'll add that in and do a PR

matty0ung commented 7 months ago

Yes, that would be a neat feature, so you only see what you've actually got in stock.

marker5a commented 7 months ago

Perfect, I'll get cracking!