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

@@ -125,6 +125,12 @@ export interface MealPlan {
* @memberof MealPlan
*/
readonly shopping: boolean;
/**
*
* @type {boolean}
* @memberof MealPlan
*/
addshopping: boolean;
}
/**
@@ -139,6 +145,7 @@ export function instanceOfMealPlan(value: object): value is MealPlan {
if (!('recipeName' in value) || value['recipeName'] === undefined) return false;
if (!('mealTypeName' in value) || value['mealTypeName'] === undefined) return false;
if (!('shopping' in value) || value['shopping'] === undefined) return false;
if (!('addshopping' in value) || value['addshopping'] === undefined) return false;
return true;
}
@@ -166,6 +173,7 @@ export function MealPlanFromJSONTyped(json: any, ignoreDiscriminator: boolean):
'recipeName': json['recipe_name'],
'mealTypeName': json['meal_type_name'],
'shopping': json['shopping'],
'addshopping': json['addshopping'],
};
}
@@ -189,6 +197,7 @@ export function MealPlanToJSONTyped(value?: Omit<MealPlan, 'note_markdown'|'crea
'to_date': value['toDate'] == null ? undefined : ((value['toDate']).toISOString()),
'meal_type': MealTypeToJSON(value['mealType']),
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserToJSON)),
'addshopping': value['addshopping'],
};
}

View File

@@ -125,6 +125,12 @@ export interface PatchedMealPlan {
* @memberof PatchedMealPlan
*/
readonly shopping?: boolean;
/**
*
* @type {boolean}
* @memberof PatchedMealPlan
*/
addshopping?: boolean;
}
/**
@@ -158,6 +164,7 @@ export function PatchedMealPlanFromJSONTyped(json: any, ignoreDiscriminator: boo
'recipeName': json['recipe_name'] == null ? undefined : json['recipe_name'],
'mealTypeName': json['meal_type_name'] == null ? undefined : json['meal_type_name'],
'shopping': json['shopping'] == null ? undefined : json['shopping'],
'addshopping': json['addshopping'] == null ? undefined : json['addshopping'],
};
}
@@ -181,6 +188,7 @@ export function PatchedMealPlanToJSONTyped(value?: Omit<PatchedMealPlan, 'note_m
'to_date': value['toDate'] == null ? undefined : ((value['toDate']).toISOString()),
'meal_type': MealTypeToJSON(value['mealType']),
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserToJSON)),
'addshopping': value['addshopping'],
};
}

View File

@@ -44,7 +44,7 @@ export interface UserFile {
* @type {string}
* @memberof UserFile
*/
file: string;
file?: string;
/**
*
* @type {string}
@@ -82,7 +82,6 @@ export interface UserFile {
*/
export function instanceOfUserFile(value: object): value is UserFile {
if (!('name' in value) || value['name'] === undefined) return false;
if (!('file' in value) || value['file'] === undefined) return false;
if (!('fileDownload' in value) || value['fileDownload'] === undefined) return false;
if (!('preview' in value) || value['preview'] === undefined) return false;
if (!('fileSizeKb' in value) || value['fileSizeKb'] === undefined) return false;
@@ -103,7 +102,7 @@ export function UserFileFromJSONTyped(json: any, ignoreDiscriminator: boolean):
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'],
'file': json['file'],
'file': json['file'] == null ? undefined : json['file'],
'fileDownload': json['file_download'],
'preview': json['preview'],
'fileSizeKb': json['file_size_kb'],