* add route for getting group-only users
* add new api route to frontend
* update shopping list user getAll call
* tests
* fixed bad import
* replace UserOut with UserSummary
* fix params
* feat: sort by labels in shopping list copy if labels toggled
* fix: call parent validator in shopping list item out (#3227)
* fix: add a unit test for (#3227)
* fixed messy post_validate logic
* feat: label headings in shopping list copy
* feat: blank line for each group in shopping list copy
---------
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
* Enables shopping list items being saved upon enter key press in notes field
Related to: https://github.com/mealie-recipes/mealie/discussions/3114
* Enter key press is caught in note field in ShoppingListItemEditor
* The create editor now stays open after saving a food item to a shopping list,
to allow keyboard-only interaction with the shopping list
* Prevent empty shopping list items from being added
Related to: https://github.com/mealie-recipes/mealie/discussions/3114
An item is considered empty when the foodId is not set, and no note is set.
This is only handled frontend, the backend still accepts empty items.
---------
Signed-off-by: Jurriaan Den Toonder <1493561+Fastjur@users.noreply.github.com>
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
* modify new item factory to default to zero qty and use last isFood value
* automatically set the label of an item when choosing a food
* fix when switching to a food with no label
* removed trivial type annotation
* more lint
* removed debug log
* add groupSlug to most routes
* fixed more routing issues
* fixed jank and incorrect routes
* remove public explore links
* remove unused groupSlug and explore routes
* nuked explore pages
* fixed public toolstore bug
* fixed various routes missing group slug
* restored public app header menu
* fix janky login redirect
* 404 recipe API call returns to login
* removed unused explore layout
* force redirect when using the wrong group slug
* fixed dead admin links
* removed unused middleware from earlier attempt
* 🧹
* improve cookbooks sidebar
fixed sidebar link not working
fixed sidebar link target
hide cookbooks header when there are none
* added group slug to user
* fix $auth typehints
* vastly simplified groupSlug logic
* allow logged-in users to view other groups
* fixed some edgecases that bypassed isOwnGroup
* fixed static home ref
* 🧹
* fixed redirect logic
* lint warning
* removed group slug from group and user pages
refactored all components to use route groupSlug or user group slug
moved some group pages to recipe pages
* fixed some bad types
* 🧹
* moved groupSlug routes under /g/groupSlug
* move /recipe/ to /r/
* fix backend url generation and metadata injection
* moved shopping lists to root/other route fixes
* changed shared from /recipes/ to /r/
* fixed 404 redirect not awaiting
* removed unused import
* fix doc links
* fix public recipe setting not affecting public API
* fixed backend tests
* fix nuxt-generate command
---------
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
* fix new position calculataion
* ensure consistent list item ordering
* fix recipe ref overflow on small screens
* added recipe ref elevation
* tweaked line height (for long notes)
* removed unused user dependency
* remove old shopping list items when there's >100
* 🤷
* cleaned up function generator
* fixed test
* fix potential type error
* made max position calc more efficient
* added color back to labels
* improved mobile view
refactored layout to use grid
allowed text wrapping on item labels
removed label overflow
added completion date on checked items
* sort checked items by last updated
* made checking an item off more responsive
* optimized moving checked items
removed unnecessary updateAll call
removed jitter when shopping list refreshes
* added backend for shopping list label config
* updated codegen
* refactored shopping list ops to service
removed unique contraint
removed label settings from main route/schema
added new route for label settings
* codegen
* made sure label settings output in position order
* implemented submenu for label order drag and drop
* removed redundant label and tweaked formatting
* added view by label to user preferences
* made items draggable within each label section
* moved reorder labels to its own button
* made dialog scrollable
* fixed broken model
* refactored labels to use a service
moved shopping list label logic to service
modified label seeder to use service
* added tests
* fix for first label missing the tag icon
* fixed wrong mapped type
* added statement to create existing relationships
* fix restore test, maybe
* feat(lang): localize some views
* feat(lang): an attempt at localizing vuetify (WIP)
* feat(lang): localized some more screens
* feat(lang): localized some more screens again
* feat(lang): hack to localize vuetify
* feat(lang): localize data management pages
* fix linting errors
---------
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
* tidied up shopping list item models
redefined recipe refs and updated models
added calculated display attribute to unify shopping list item rendering
added validation to use a food's label if an item's label is null
* fixed schema reference
* refactored shopping list item service
route all operations through one central method to account for edgecases
return item collections for all operations to account for merging
consolidate recipe items before sending them to the shopping list
* made fractions prettier
* replaced redundant display text util
* fixed edgecase for zero quantity items on a recipe
* fix for pre-merging recipe ingredients
* fixed edgecase for merging create_items together
* fixed bug with merged updated items creating dupes
* added test for self-removing recipe ref
* update items are now merged w/ existing items
* refactored service to make it easier to read
* added a lot of tests
* made it so checked items are never merged
* fixed bug with dragging + re-ordering
* fix for postgres cascade issue
* added prevalidator to recipe ref to avoid db error
* prevent list refresh while re-ordering items
* update position of new items to stay at the bottom
* prevent refresh while loading
* copy item while editing so it isn't refreshed
* added loading count to handle overlapping actions
* fixed recipe reference throttling
* prevent merging checked and unchecked items
* added polling for changes every 5 seconds
* fixed demi import
* stop polling if the refresh fails too many times
* only poll for changes when the user is active
* add vitest
* initialize lib w/ tests
* move to dev dep
* run tests in CI
* update file names
* move api folder to lib
* move api and api types to same folder
* update generator outpath
* rm husky
* i guess i _did_ need those types
* reorg types
* extract validators into testable components
* (WIP) start composable testing
* fix import type
* fix linter complaint
* simplify icon type def
* fix linter errors (maybe?)
* rename client file for sorting
rewrite get_all routes to use a pagination pattern to allow for better implementations of search, filter, and sorting on the frontend or by any client without fetching all the data. Additionally we added a CI check for running the Nuxt built to confirm that no TS errors were present. Finally, I had to remove the header support for the Shopping lists as the browser caching based off last_updated header was not allowing it to read recent updates due to how we're handling the updated_at property in the database with nested fields. This will have to be looked at in the future to reimplement. I'm unsure how many other routes have a similar issue.
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
* update naming
* refactor tests to use shared structure
* shorten names
* add tools test case
* refactor to support multi-tenant
* set group_id on creation
* initial refactor for multitenant tags/cats
* spelling
* additional test case for same valued resources
* fix recipe update tests
* apply indexes to foreign keys
* fix performance regressions
* handle unknown exception
* utility decorator for function debugging
* migrate recipe_id to UUID
* GUID for recipes
* remove unused import
* move image functions into package
* move utilities to packages dir
* update import
* linter
* image image and asset routes
* update assets and images to use UUIDs
* fix migration base
* image asset test coverage
* use ids for categories and tag crud functions
* refactor recipe organizer test suite to reduce duplication
* add uuid serlization utility
* organizer base router
* slug routes testing and fixes
* fix postgres error
* adopt UUIDs
* move tags, categories, and tools under "organizers" umbrella
* update composite label
* generate ts types
* fix import error
* update frontend types
* fix type errors
* fix postgres errors
* fix#978
* add null check for title validation
* add note in docs on multi-tenancy
* generate types
* use generated types
* ui updates
* init button link for common styles
* add links
* setup label views
* add delete confirmation
* reset when not saved
* link label to foods and auto set when adding to shopping list
* generate types
* use inheritence to manage exception handling
* fix schema generation and add test for open_api generation
* add header to api docs
* move list consilidation to service
* split list and list items controller
* shopping list/list item tests - PARTIAL
* enable recipe add/remove in shopping lists
* generate types
* linting
* init global utility components
* update types and add list item api
* fix import cycle and database error
* add container and border classes
* new recipe list component
* fix tests
* breakout item editor
* refactor item editor
* update bulk actions
* update input / color contrast
* type generation
* refactor controller dependencies
* include food/unit editor
* remove console.logs
* fix and update type generation
* fix incorrect type for column
* fix postgres error
* fix delete by variable
* auto remove refs
* fix typo
* Fix or comment several ts-ignores
* Fix typing related to BaseOverflowButton
* Remove unused functionality of useCookbooks, fix usage bug
* Fix more typing, add some comments
* Only allow ts-ignore if it has a comment
* fix group page
* setup group notification for backend
* update type generators
* script to auto-generate schema exports
* setup frontend CRUD interface
* remove old notifications UI
* drop old events api
* add test functionality
* update naming for fields
* add event dispatcher functionality
* bump to python 3.10
* bump python version
* purge old event code
* use-async apprise
* set mealie logo as image
* unify styles for buttons rows
* add links to banners