add to shopping from meal plan editor

This commit is contained in:
vabene1111
2024-12-22 15:36:58 +01:00
parent 5ce859f267
commit 0c547353cd
43 changed files with 96 additions and 62 deletions

View File

@@ -278,7 +278,7 @@ export const useShoppingStore = defineStore(_STORE_ID, () => {
/**
* returns a distinct list of recipes associated with unchecked shopping list entries
*/
function getAssociatedRecipes() {
function getAssociatedRecipes(): ShoppingListRecipe[] {
let recipes = [] as ShoppingListRecipe[]
entries.value.forEach(e => {

View File

@@ -69,7 +69,7 @@ export const useUserPreferenceStore = defineStore('user_preference_store', () =>
function updateUserSettings() {
let api = new ApiApi()
api.apiUserPreferencePartialUpdate({user: userSettings.value.user, patchedUserPreference: userSettings.value}).then(r => {
api.apiUserPreferencePartialUpdate({user: userSettings.value.user.id!, patchedUserPreference: userSettings.value}).then(r => {
userSettings.value = r
useMessageStore().addPreparedMessage(PreparedMessage.UPDATE_SUCCESS)
}).catch(err => {