some small tweaks

This commit is contained in:
vabene1111
2025-08-20 17:00:11 +02:00
parent 4438bfcb89
commit 8d736c0f88
22 changed files with 2420 additions and 82 deletions

1
.gitignore vendored
View File

@@ -91,3 +91,4 @@ cookbook/static/vue3
vue3/node_modules
cookbook/tests/other/docs/reports/tests/tests.html
cookbook/tests/other/docs/reports/tests/pytest.xml
vue3/src/plugins

View File

@@ -3,7 +3,7 @@
<slot name="prepend"></slot>
<v-chip class="me-1 mb-1" :label="props.label" :color="props.color" :size="props.size" :variant="props.variant" v-for="k in keywords"
:to="{name: 'SearchPage', query: {keywords: k.id}}"> {{ k.label }}
:to="useUserPreferenceStore().isAuthenticated ? {name: 'SearchPage', query: {keywords: k.id}} : undefined"> {{ k.label }}
</v-chip>
<slot name="append"></slot>
@@ -15,6 +15,7 @@
import {Keyword, KeywordLabel} from "@/openapi";
import {computed, PropType} from "vue";
import {useUserPreferenceStore} from "@/stores/UserPreferenceStore.ts";
const props = defineProps({
keywords: Array as PropType<Array<Keyword> | Array<KeywordLabel> | undefined>,

View File

@@ -29,7 +29,7 @@
</v-card-text>
</v-card>
<v-card class="mt-1 d-print-none">
<v-card class="mt-1 d-print-none" v-if="useUserPreferenceStore().isAuthenticated">
<v-card-text>
<v-textarea :label="$t('Comment')" rows="2" v-model="newCookLog.comment"></v-textarea>
<v-row de>
@@ -62,6 +62,7 @@ import {ApiApi, CookLog, Recipe} from "@/openapi";
import {DateTime} from "luxon";
import {ErrorMessageType, useMessageStore} from "@/stores/MessageStore";
import {VDateInput} from 'vuetify/labs/VDateInput'
import {useUserPreferenceStore} from "@/stores/UserPreferenceStore.ts";
const props = defineProps({
recipe: {

View File

@@ -13,14 +13,14 @@
</div>
<div class="mt-1">
<!-- <v-btn icon="fas fa-ellipsis-v" size="small" variant="plain"></v-btn>-->
<recipe-context-menu :recipe="props.recipe" size="small"></recipe-context-menu>
<recipe-context-menu :recipe="props.recipe" size="small" v-if="props.showMenu"></recipe-context-menu>
</div>
</div>
<!-- <p class="text-disabled">{{ props.recipe.createdBy.displayName}}</p>-->
<keywords-component variant="outlined" :keywords="props.recipe.keywords" :max-keywords="3">
<keywords-component variant="outlined" :keywords="props.recipe.keywords" :max-keywords="3" v-if="props.showKeywords">
<template #prepend>
<v-chip class="mb-1 me-1" size="x-small" label variant="outlined" color="info"
v-if="!props.recipe.internal">
v-if="props.recipe.internal == false">
{{ $t('External') }}
</v-chip>
<v-chip class="mb-1 me-1" size="x-small" prepend-icon="far fa-clock" label variant="outlined"
@@ -32,7 +32,7 @@
</div>
<v-card :to="`/recipe/${props.recipe.id}`" :style="{'height': props.height}" v-if="false">
<v-card :to="{name: 'RecipeViewPage', params: {id: props.recipe.id}}" :style="{'height': props.height}" v-if="false">
<v-tooltip
class="align-center justify-center"
location="top center" origin="overlap"
@@ -104,10 +104,11 @@ import {useRouter} from "vue-router";
const props = defineProps({
recipe: {type: {} as PropType<Recipe | RecipeOverview>, required: true,},
loading: {type: Boolean, required: false},
show_keywords: {type: Boolean, required: false},
showKeywords: {type: Boolean, default: true, required: false},
show_description: {type: Boolean, required: false},
height: {type: String, required: false, default: '15vh'},
linkTarget: {type: String, required: false, default: ''}
linkTarget: {type: String, required: false, default: ''},
showMenu: {type: Boolean, default: true, required: false}
})
const router = useRouter()

View File

@@ -25,7 +25,9 @@ export function useNavigation() {
TANDOOR_PLUGINS.forEach(plugin => {
plugin.navigationDrawer.forEach(navEntry => {
let navEntryCopy = Object.assign({}, navEntry)
navEntryCopy.title = t(navEntryCopy.title)
if ('title' in navEntryCopy) {
navEntryCopy.title = t(navEntryCopy.title)
}
navigation.push(navEntryCopy)
})
})
@@ -44,7 +46,9 @@ export function useNavigation() {
TANDOOR_PLUGINS.forEach(plugin => {
plugin.bottomNavigation.forEach(navEntry => {
let navEntryCopy = Object.assign({}, navEntry)
navEntryCopy.title = t(navEntryCopy.title)
if ('title' in navEntryCopy) {
navEntryCopy.title = t(navEntryCopy.title)
}
navigation.push(navEntryCopy)
})
})
@@ -80,7 +84,9 @@ export function useNavigation() {
TANDOOR_PLUGINS.forEach(plugin => {
plugin.userNavigation.forEach(navEntry => {
let navEntryCopy = Object.assign({}, navEntry)
navEntryCopy.title = t(navEntryCopy.title)
if ('title' in navEntryCopy) {
navEntryCopy.title = t(navEntryCopy.title)
}
navigation.push(navEntryCopy)
})
})

View File

@@ -3,6 +3,7 @@ apis/ApiTokenAuthApi.ts
apis/index.ts
index.ts
models/AccessToken.ts
models/AlignmentEnum.ts
models/AuthToken.ts
models/AutoMealPlan.ts
models/Automation.ts
@@ -16,6 +17,10 @@ models/CookLog.ts
models/CustomFilter.ts
models/DefaultPageEnum.ts
models/DeleteEnum.ts
models/EnterpriseKeyword.ts
models/EnterpriseSocialEmbed.ts
models/EnterpriseSocialEmbedTypeEnum.ts
models/EnterpriseSocialRecipeSearch.ts
models/ExportLog.ts
models/ExportRequest.ts
models/FdcQuery.ts
@@ -56,6 +61,8 @@ models/PaginatedBookmarkletImportListList.ts
models/PaginatedConnectorConfigList.ts
models/PaginatedCookLogList.ts
models/PaginatedCustomFilterList.ts
models/PaginatedEnterpriseSocialEmbedList.ts
models/PaginatedEnterpriseSocialRecipeSearchList.ts
models/PaginatedExportLogList.ts
models/PaginatedFoodList.ts
models/PaginatedImportLogList.ts
@@ -64,6 +71,13 @@ models/PaginatedInviteLinkList.ts
models/PaginatedKeywordList.ts
models/PaginatedMealPlanList.ts
models/PaginatedMealTypeList.ts
models/PaginatedOpenDataCategoryList.ts
models/PaginatedOpenDataConversionList.ts
models/PaginatedOpenDataFoodList.ts
models/PaginatedOpenDataPropertyList.ts
models/PaginatedOpenDataStoreList.ts
models/PaginatedOpenDataUnitList.ts
models/PaginatedOpenDataVersionList.ts
models/PaginatedPropertyList.ts
models/PaginatedPropertyTypeList.ts
models/PaginatedRecipeBookEntryList.ts
@@ -92,6 +106,7 @@ models/PatchedBookmarkletImport.ts
models/PatchedConnectorConfig.ts
models/PatchedCookLog.ts
models/PatchedCustomFilter.ts
models/PatchedEnterpriseSocialEmbed.ts
models/PatchedExportLog.ts
models/PatchedFood.ts
models/PatchedImportLog.ts

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,52 @@
/* tslint:disable */
/* eslint-disable */
/**
* Tandoor
* Tandoor API Docs
*
* The version of the OpenAPI document: 0.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* * `start` - start
* * `center` - center
* * `end` - end
* @export
*/
export const AlignmentEnum = {
Start: 'start',
Center: 'center',
End: 'end'
} as const;
export type AlignmentEnum = typeof AlignmentEnum[keyof typeof AlignmentEnum];
export function instanceOfAlignmentEnum(value: any): boolean {
for (const key in AlignmentEnum) {
if (Object.prototype.hasOwnProperty.call(AlignmentEnum, key)) {
if (AlignmentEnum[key] === value) {
return true;
}
}
}
return false;
}
export function AlignmentEnumFromJSON(json: any): AlignmentEnum {
return AlignmentEnumFromJSONTyped(json, false);
}
export function AlignmentEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlignmentEnum {
return json as AlignmentEnum;
}
export function AlignmentEnumToJSON(value?: AlignmentEnum | null): any {
return value as any;
}

View File

@@ -14,43 +14,47 @@
/**
* * `G` - g
* * `KG` - kg
* * `ML` - ml
* * `L` - l
* * `OUNCE` - ounce
* * `POUND` - pound
* * `FLUID_OUNCE` - fluid_ounce
* * `TSP` - tsp
* * `TBSP` - tbsp
* * `CUP` - cup
* * `PINT` - pint
* * `QUART` - quart
* * `GALLON` - gallon
* * `IMPERIAL_FLUID_OUNCE` - imperial fluid ounce
* * `IMPERIAL_PINT` - imperial pint
* * `IMPERIAL_QUART` - imperial quart
* * `IMPERIAL_GALLON` - imperial gallon
* * `g` - g
* * `kg` - kg
* * `ounce` - ounce
* * `pound` - pound
* * `ml` - ml
* * `l` - l
* * `fluid_ounce` - fluid_ounce
* * `pint` - pint
* * `quart` - quart
* * `gallon` - gallon
* * `tbsp` - tbsp
* * `tsp` - tsp
* * `us_cup` - US Cup
* * `imperial_fluid_ounce` - imperial fluid ounce
* * `imperial_pint` - imperial pint
* * `imperial_quart` - imperial quart
* * `imperial_gallon` - imperial gallon
* * `imperial_tbsp` - imperial tbsp
* * `imperial_tsp` - imperial tsp
* @export
*/
export const BaseUnitEnum = {
G: 'G',
Kg: 'KG',
Ml: 'ML',
L: 'L',
Ounce: 'OUNCE',
Pound: 'POUND',
FluidOunce: 'FLUID_OUNCE',
Tsp: 'TSP',
Tbsp: 'TBSP',
Cup: 'CUP',
Pint: 'PINT',
Quart: 'QUART',
Gallon: 'GALLON',
ImperialFluidOunce: 'IMPERIAL_FLUID_OUNCE',
ImperialPint: 'IMPERIAL_PINT',
ImperialQuart: 'IMPERIAL_QUART',
ImperialGallon: 'IMPERIAL_GALLON'
G: 'g',
Kg: 'kg',
Ounce: 'ounce',
Pound: 'pound',
Ml: 'ml',
L: 'l',
FluidOunce: 'fluid_ounce',
Pint: 'pint',
Quart: 'quart',
Gallon: 'gallon',
Tbsp: 'tbsp',
Tsp: 'tsp',
UsCup: 'us_cup',
ImperialFluidOunce: 'imperial_fluid_ounce',
ImperialPint: 'imperial_pint',
ImperialQuart: 'imperial_quart',
ImperialGallon: 'imperial_gallon',
ImperialTbsp: 'imperial_tbsp',
ImperialTsp: 'imperial_tsp'
} as const;
export type BaseUnitEnum = typeof BaseUnitEnum[keyof typeof BaseUnitEnum];

View File

@@ -0,0 +1,85 @@
/* tslint:disable */
/* eslint-disable */
/**
* Tandoor
* Tandoor API Docs
*
* The version of the OpenAPI document: 0.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
/**
*
* @export
* @interface EnterpriseKeyword
*/
export interface EnterpriseKeyword {
/**
*
* @type {number}
* @memberof EnterpriseKeyword
*/
id?: number;
/**
*
* @type {string}
* @memberof EnterpriseKeyword
*/
name: string;
/**
*
* @type {string}
* @memberof EnterpriseKeyword
*/
readonly label: string;
/**
*
* @type {string}
* @memberof EnterpriseKeyword
*/
description?: string;
}
/**
* Check if a given object implements the EnterpriseKeyword interface.
*/
export function instanceOfEnterpriseKeyword(value: object): value is EnterpriseKeyword {
if (!('name' in value) || value['name'] === undefined) return false;
if (!('label' in value) || value['label'] === undefined) return false;
return true;
}
export function EnterpriseKeywordFromJSON(json: any): EnterpriseKeyword {
return EnterpriseKeywordFromJSONTyped(json, false);
}
export function EnterpriseKeywordFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnterpriseKeyword {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'],
'label': json['label'],
'description': json['description'] == null ? undefined : json['description'],
};
}
export function EnterpriseKeywordToJSON(value?: Omit<EnterpriseKeyword, 'label'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'name': value['name'],
'description': value['description'],
};
}

View File

@@ -0,0 +1,138 @@
/* tslint:disable */
/* eslint-disable */
/**
* Tandoor
* Tandoor API Docs
*
* The version of the OpenAPI document: 0.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
import type { AlignmentEnum } from './AlignmentEnum';
import {
AlignmentEnumFromJSON,
AlignmentEnumFromJSONTyped,
AlignmentEnumToJSON,
} from './AlignmentEnum';
import type { EnterpriseSocialEmbedTypeEnum } from './EnterpriseSocialEmbedTypeEnum';
import {
EnterpriseSocialEmbedTypeEnumFromJSON,
EnterpriseSocialEmbedTypeEnumFromJSONTyped,
EnterpriseSocialEmbedTypeEnumToJSON,
} from './EnterpriseSocialEmbedTypeEnum';
import type { Keyword } from './Keyword';
import {
KeywordFromJSON,
KeywordFromJSONTyped,
KeywordToJSON,
} from './Keyword';
/**
* Adds nested create feature
* @export
* @interface EnterpriseSocialEmbed
*/
export interface EnterpriseSocialEmbed {
/**
*
* @type {number}
* @memberof EnterpriseSocialEmbed
*/
id?: number;
/**
*
* @type {string}
* @memberof EnterpriseSocialEmbed
*/
name: string;
/**
*
* @type {EnterpriseSocialEmbedTypeEnum}
* @memberof EnterpriseSocialEmbed
*/
type: EnterpriseSocialEmbedTypeEnum;
/**
*
* @type {Array<Keyword>}
* @memberof EnterpriseSocialEmbed
*/
keywords: Array<Keyword>;
/**
*
* @type {AlignmentEnum}
* @memberof EnterpriseSocialEmbed
*/
alignment?: AlignmentEnum;
/**
*
* @type {string}
* @memberof EnterpriseSocialEmbed
*/
backgroundColor?: string;
/**
*
* @type {string}
* @memberof EnterpriseSocialEmbed
*/
accentColor?: string;
/**
*
* @type {string}
* @memberof EnterpriseSocialEmbed
*/
uuid?: string;
}
/**
* Check if a given object implements the EnterpriseSocialEmbed interface.
*/
export function instanceOfEnterpriseSocialEmbed(value: object): value is EnterpriseSocialEmbed {
if (!('name' in value) || value['name'] === undefined) return false;
if (!('type' in value) || value['type'] === undefined) return false;
if (!('keywords' in value) || value['keywords'] === undefined) return false;
return true;
}
export function EnterpriseSocialEmbedFromJSON(json: any): EnterpriseSocialEmbed {
return EnterpriseSocialEmbedFromJSONTyped(json, false);
}
export function EnterpriseSocialEmbedFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnterpriseSocialEmbed {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'],
'type': EnterpriseSocialEmbedTypeEnumFromJSON(json['type']),
'keywords': ((json['keywords'] as Array<any>).map(KeywordFromJSON)),
'alignment': json['alignment'] == null ? undefined : AlignmentEnumFromJSON(json['alignment']),
'backgroundColor': json['background_color'] == null ? undefined : json['background_color'],
'accentColor': json['accent_color'] == null ? undefined : json['accent_color'],
'uuid': json['uuid'] == null ? undefined : json['uuid'],
};
}
export function EnterpriseSocialEmbedToJSON(value?: EnterpriseSocialEmbed | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'name': value['name'],
'type': EnterpriseSocialEmbedTypeEnumToJSON(value['type']),
'keywords': ((value['keywords'] as Array<any>).map(KeywordToJSON)),
'alignment': AlignmentEnumToJSON(value['alignment']),
'background_color': value['backgroundColor'],
'accent_color': value['accentColor'],
'uuid': value['uuid'],
};
}

View File

@@ -0,0 +1,56 @@
/* tslint:disable */
/* eslint-disable */
/**
* Tandoor
* Tandoor API Docs
*
* The version of the OpenAPI document: 0.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* * `RECIPE` - Recipe
* * `RECIPE_KEYWORD` - Recipe Keyword
* * `MEAL_PLAN` - Meal Plan
* * `SHOPPING` - Shopping
* * `BOOK` - Book
* @export
*/
export const EnterpriseSocialEmbedTypeEnum = {
Recipe: 'RECIPE',
RecipeKeyword: 'RECIPE_KEYWORD',
MealPlan: 'MEAL_PLAN',
Shopping: 'SHOPPING',
Book: 'BOOK'
} as const;
export type EnterpriseSocialEmbedTypeEnum = typeof EnterpriseSocialEmbedTypeEnum[keyof typeof EnterpriseSocialEmbedTypeEnum];
export function instanceOfEnterpriseSocialEmbedTypeEnum(value: any): boolean {
for (const key in EnterpriseSocialEmbedTypeEnum) {
if (Object.prototype.hasOwnProperty.call(EnterpriseSocialEmbedTypeEnum, key)) {
if (EnterpriseSocialEmbedTypeEnum[key] === value) {
return true;
}
}
}
return false;
}
export function EnterpriseSocialEmbedTypeEnumFromJSON(json: any): EnterpriseSocialEmbedTypeEnum {
return EnterpriseSocialEmbedTypeEnumFromJSONTyped(json, false);
}
export function EnterpriseSocialEmbedTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnterpriseSocialEmbedTypeEnum {
return json as EnterpriseSocialEmbedTypeEnum;
}
export function EnterpriseSocialEmbedTypeEnumToJSON(value?: EnterpriseSocialEmbedTypeEnum | null): any {
return value as any;
}

View File

@@ -0,0 +1,91 @@
/* tslint:disable */
/* eslint-disable */
/**
* Tandoor
* Tandoor API Docs
*
* The version of the OpenAPI document: 0.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
import type { EnterpriseKeyword } from './EnterpriseKeyword';
import {
EnterpriseKeywordFromJSON,
EnterpriseKeywordFromJSONTyped,
EnterpriseKeywordToJSON,
} from './EnterpriseKeyword';
/**
*
* @export
* @interface EnterpriseSocialRecipeSearch
*/
export interface EnterpriseSocialRecipeSearch {
/**
*
* @type {number}
* @memberof EnterpriseSocialRecipeSearch
*/
id?: number;
/**
*
* @type {string}
* @memberof EnterpriseSocialRecipeSearch
*/
readonly name: string;
/**
*
* @type {string}
* @memberof EnterpriseSocialRecipeSearch
*/
readonly image: string | null;
/**
*
* @type {Array<EnterpriseKeyword>}
* @memberof EnterpriseSocialRecipeSearch
*/
readonly keywords: Array<EnterpriseKeyword>;
}
/**
* Check if a given object implements the EnterpriseSocialRecipeSearch interface.
*/
export function instanceOfEnterpriseSocialRecipeSearch(value: object): value is EnterpriseSocialRecipeSearch {
if (!('name' in value) || value['name'] === undefined) return false;
if (!('image' in value) || value['image'] === undefined) return false;
if (!('keywords' in value) || value['keywords'] === undefined) return false;
return true;
}
export function EnterpriseSocialRecipeSearchFromJSON(json: any): EnterpriseSocialRecipeSearch {
return EnterpriseSocialRecipeSearchFromJSONTyped(json, false);
}
export function EnterpriseSocialRecipeSearchFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnterpriseSocialRecipeSearch {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'],
'image': json['image'],
'keywords': ((json['keywords'] as Array<any>).map(EnterpriseKeywordFromJSON)),
};
}
export function EnterpriseSocialRecipeSearchToJSON(value?: Omit<EnterpriseSocialRecipeSearch, 'name'|'image'|'keywords'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
};
}

View File

@@ -164,10 +164,10 @@ export interface OpenDataFood {
propertiesSource?: string;
/**
*
* @type {string}
* @type {number}
* @memberof OpenDataFood
*/
fdcId: string;
fdcId?: number;
/**
*
* @type {string}
@@ -193,7 +193,6 @@ export function instanceOfOpenDataFood(value: object): value is OpenDataFood {
if (!('storeCategory' in value) || value['storeCategory'] === undefined) return false;
if (!('properties' in value) || value['properties'] === undefined) return false;
if (!('propertiesFoodUnit' in value) || value['propertiesFoodUnit'] === undefined) return false;
if (!('fdcId' in value) || value['fdcId'] === undefined) return false;
if (!('createdBy' in value) || value['createdBy'] === undefined) return false;
return true;
}
@@ -222,7 +221,7 @@ export function OpenDataFoodFromJSONTyped(json: any, ignoreDiscriminator: boolea
'propertiesFoodAmount': json['properties_food_amount'] == null ? undefined : json['properties_food_amount'],
'propertiesFoodUnit': OpenDataUnitFromJSON(json['properties_food_unit']),
'propertiesSource': json['properties_source'] == null ? undefined : json['properties_source'],
'fdcId': json['fdc_id'],
'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'],
'comment': json['comment'] == null ? undefined : json['comment'],
'createdBy': json['created_by'],
};

View File

@@ -0,0 +1,101 @@
/* tslint:disable */
/* eslint-disable */
/**
* Tandoor
* Tandoor API Docs
*
* The version of the OpenAPI document: 0.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
import type { EnterpriseSocialEmbed } from './EnterpriseSocialEmbed';
import {
EnterpriseSocialEmbedFromJSON,
EnterpriseSocialEmbedFromJSONTyped,
EnterpriseSocialEmbedToJSON,
} from './EnterpriseSocialEmbed';
/**
*
* @export
* @interface PaginatedEnterpriseSocialEmbedList
*/
export interface PaginatedEnterpriseSocialEmbedList {
/**
*
* @type {number}
* @memberof PaginatedEnterpriseSocialEmbedList
*/
count: number;
/**
*
* @type {string}
* @memberof PaginatedEnterpriseSocialEmbedList
*/
next?: string;
/**
*
* @type {string}
* @memberof PaginatedEnterpriseSocialEmbedList
*/
previous?: string;
/**
*
* @type {Array<EnterpriseSocialEmbed>}
* @memberof PaginatedEnterpriseSocialEmbedList
*/
results: Array<EnterpriseSocialEmbed>;
/**
*
* @type {Date}
* @memberof PaginatedEnterpriseSocialEmbedList
*/
timestamp?: Date;
}
/**
* Check if a given object implements the PaginatedEnterpriseSocialEmbedList interface.
*/
export function instanceOfPaginatedEnterpriseSocialEmbedList(value: object): value is PaginatedEnterpriseSocialEmbedList {
if (!('count' in value) || value['count'] === undefined) return false;
if (!('results' in value) || value['results'] === undefined) return false;
return true;
}
export function PaginatedEnterpriseSocialEmbedListFromJSON(json: any): PaginatedEnterpriseSocialEmbedList {
return PaginatedEnterpriseSocialEmbedListFromJSONTyped(json, false);
}
export function PaginatedEnterpriseSocialEmbedListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedEnterpriseSocialEmbedList {
if (json == null) {
return json;
}
return {
'count': json['count'],
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(EnterpriseSocialEmbedFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
export function PaginatedEnterpriseSocialEmbedListToJSON(value?: PaginatedEnterpriseSocialEmbedList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(EnterpriseSocialEmbedToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}

View File

@@ -0,0 +1,101 @@
/* tslint:disable */
/* eslint-disable */
/**
* Tandoor
* Tandoor API Docs
*
* The version of the OpenAPI document: 0.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
import type { EnterpriseSocialRecipeSearch } from './EnterpriseSocialRecipeSearch';
import {
EnterpriseSocialRecipeSearchFromJSON,
EnterpriseSocialRecipeSearchFromJSONTyped,
EnterpriseSocialRecipeSearchToJSON,
} from './EnterpriseSocialRecipeSearch';
/**
*
* @export
* @interface PaginatedEnterpriseSocialRecipeSearchList
*/
export interface PaginatedEnterpriseSocialRecipeSearchList {
/**
*
* @type {number}
* @memberof PaginatedEnterpriseSocialRecipeSearchList
*/
count: number;
/**
*
* @type {string}
* @memberof PaginatedEnterpriseSocialRecipeSearchList
*/
next?: string;
/**
*
* @type {string}
* @memberof PaginatedEnterpriseSocialRecipeSearchList
*/
previous?: string;
/**
*
* @type {Array<EnterpriseSocialRecipeSearch>}
* @memberof PaginatedEnterpriseSocialRecipeSearchList
*/
results: Array<EnterpriseSocialRecipeSearch>;
/**
*
* @type {Date}
* @memberof PaginatedEnterpriseSocialRecipeSearchList
*/
timestamp?: Date;
}
/**
* Check if a given object implements the PaginatedEnterpriseSocialRecipeSearchList interface.
*/
export function instanceOfPaginatedEnterpriseSocialRecipeSearchList(value: object): value is PaginatedEnterpriseSocialRecipeSearchList {
if (!('count' in value) || value['count'] === undefined) return false;
if (!('results' in value) || value['results'] === undefined) return false;
return true;
}
export function PaginatedEnterpriseSocialRecipeSearchListFromJSON(json: any): PaginatedEnterpriseSocialRecipeSearchList {
return PaginatedEnterpriseSocialRecipeSearchListFromJSONTyped(json, false);
}
export function PaginatedEnterpriseSocialRecipeSearchListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedEnterpriseSocialRecipeSearchList {
if (json == null) {
return json;
}
return {
'count': json['count'],
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(EnterpriseSocialRecipeSearchFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
export function PaginatedEnterpriseSocialRecipeSearchListToJSON(value?: PaginatedEnterpriseSocialRecipeSearchList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(EnterpriseSocialRecipeSearchToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}

View File

@@ -0,0 +1,135 @@
/* tslint:disable */
/* eslint-disable */
/**
* Tandoor
* Tandoor API Docs
*
* The version of the OpenAPI document: 0.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
import type { AlignmentEnum } from './AlignmentEnum';
import {
AlignmentEnumFromJSON,
AlignmentEnumFromJSONTyped,
AlignmentEnumToJSON,
} from './AlignmentEnum';
import type { EnterpriseSocialEmbedTypeEnum } from './EnterpriseSocialEmbedTypeEnum';
import {
EnterpriseSocialEmbedTypeEnumFromJSON,
EnterpriseSocialEmbedTypeEnumFromJSONTyped,
EnterpriseSocialEmbedTypeEnumToJSON,
} from './EnterpriseSocialEmbedTypeEnum';
import type { Keyword } from './Keyword';
import {
KeywordFromJSON,
KeywordFromJSONTyped,
KeywordToJSON,
} from './Keyword';
/**
* Adds nested create feature
* @export
* @interface PatchedEnterpriseSocialEmbed
*/
export interface PatchedEnterpriseSocialEmbed {
/**
*
* @type {number}
* @memberof PatchedEnterpriseSocialEmbed
*/
id?: number;
/**
*
* @type {string}
* @memberof PatchedEnterpriseSocialEmbed
*/
name?: string;
/**
*
* @type {EnterpriseSocialEmbedTypeEnum}
* @memberof PatchedEnterpriseSocialEmbed
*/
type?: EnterpriseSocialEmbedTypeEnum;
/**
*
* @type {Array<Keyword>}
* @memberof PatchedEnterpriseSocialEmbed
*/
keywords?: Array<Keyword>;
/**
*
* @type {AlignmentEnum}
* @memberof PatchedEnterpriseSocialEmbed
*/
alignment?: AlignmentEnum;
/**
*
* @type {string}
* @memberof PatchedEnterpriseSocialEmbed
*/
backgroundColor?: string;
/**
*
* @type {string}
* @memberof PatchedEnterpriseSocialEmbed
*/
accentColor?: string;
/**
*
* @type {string}
* @memberof PatchedEnterpriseSocialEmbed
*/
uuid?: string;
}
/**
* Check if a given object implements the PatchedEnterpriseSocialEmbed interface.
*/
export function instanceOfPatchedEnterpriseSocialEmbed(value: object): value is PatchedEnterpriseSocialEmbed {
return true;
}
export function PatchedEnterpriseSocialEmbedFromJSON(json: any): PatchedEnterpriseSocialEmbed {
return PatchedEnterpriseSocialEmbedFromJSONTyped(json, false);
}
export function PatchedEnterpriseSocialEmbedFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedEnterpriseSocialEmbed {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'] == null ? undefined : json['name'],
'type': json['type'] == null ? undefined : EnterpriseSocialEmbedTypeEnumFromJSON(json['type']),
'keywords': json['keywords'] == null ? undefined : ((json['keywords'] as Array<any>).map(KeywordFromJSON)),
'alignment': json['alignment'] == null ? undefined : AlignmentEnumFromJSON(json['alignment']),
'backgroundColor': json['background_color'] == null ? undefined : json['background_color'],
'accentColor': json['accent_color'] == null ? undefined : json['accent_color'],
'uuid': json['uuid'] == null ? undefined : json['uuid'],
};
}
export function PatchedEnterpriseSocialEmbedToJSON(value?: PatchedEnterpriseSocialEmbed | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'name': value['name'],
'type': EnterpriseSocialEmbedTypeEnumToJSON(value['type']),
'keywords': value['keywords'] == null ? undefined : ((value['keywords'] as Array<any>).map(KeywordToJSON)),
'alignment': AlignmentEnumToJSON(value['alignment']),
'background_color': value['backgroundColor'],
'accent_color': value['accentColor'],
'uuid': value['uuid'],
};
}

View File

@@ -164,10 +164,10 @@ export interface PatchedOpenDataFood {
propertiesSource?: string;
/**
*
* @type {string}
* @type {number}
* @memberof PatchedOpenDataFood
*/
fdcId?: string;
fdcId?: number;
/**
*
* @type {string}

View File

@@ -1,6 +1,7 @@
/* tslint:disable */
/* eslint-disable */
export * from './AccessToken';
export * from './AlignmentEnum';
export * from './AuthToken';
export * from './AutoMealPlan';
export * from './Automation';
@@ -14,6 +15,10 @@ export * from './CookLog';
export * from './CustomFilter';
export * from './DefaultPageEnum';
export * from './DeleteEnum';
export * from './EnterpriseKeyword';
export * from './EnterpriseSocialEmbed';
export * from './EnterpriseSocialEmbedTypeEnum';
export * from './EnterpriseSocialRecipeSearch';
export * from './ExportLog';
export * from './ExportRequest';
export * from './FdcQuery';
@@ -54,6 +59,8 @@ export * from './PaginatedBookmarkletImportListList';
export * from './PaginatedConnectorConfigList';
export * from './PaginatedCookLogList';
export * from './PaginatedCustomFilterList';
export * from './PaginatedEnterpriseSocialEmbedList';
export * from './PaginatedEnterpriseSocialRecipeSearchList';
export * from './PaginatedExportLogList';
export * from './PaginatedFoodList';
export * from './PaginatedImportLogList';
@@ -62,6 +69,13 @@ export * from './PaginatedInviteLinkList';
export * from './PaginatedKeywordList';
export * from './PaginatedMealPlanList';
export * from './PaginatedMealTypeList';
export * from './PaginatedOpenDataCategoryList';
export * from './PaginatedOpenDataConversionList';
export * from './PaginatedOpenDataFoodList';
export * from './PaginatedOpenDataPropertyList';
export * from './PaginatedOpenDataStoreList';
export * from './PaginatedOpenDataUnitList';
export * from './PaginatedOpenDataVersionList';
export * from './PaginatedPropertyList';
export * from './PaginatedPropertyTypeList';
export * from './PaginatedRecipeBookEntryList';
@@ -90,6 +104,7 @@ export * from './PatchedBookmarkletImport';
export * from './PatchedConnectorConfig';
export * from './PatchedCookLog';
export * from './PatchedCustomFilter';
export * from './PatchedEnterpriseSocialEmbed';
export * from './PatchedExportLog';
export * from './PatchedFood';
export * from './PatchedImportLog';

View File

@@ -35,6 +35,10 @@
<database-model-col model="MealType"></database-model-col>
</v-row>
<template v-for="p in TANDOOR_PLUGINS" :key="p.name">
<component :is="p.databasePageComponent" v-if="p.databasePageComponent"></component>
</template>
<v-row>
<v-col>
<h2>{{ $t('Miscellaneous') }}</h2>
@@ -47,8 +51,8 @@
<database-model-col model="CustomFilter"></database-model-col>
<database-model-col model="CookLog"></database-model-col>
<database-model-col model="ViewLog"></database-model-col>
<database-link-col :to="{name: 'IngredientEditorPage'}"
<database-link-col :to="{name: 'IngredientEditorPage'}"
prepend-icon="fa-solid fa-table-list"
:title="$t('Ingredient Editor')"
:subtitle="$t('IngredientEditorHelp')">
@@ -77,6 +81,7 @@
import DatabaseModelCol from "@/components/display/DatabaseModelCol.vue";
import DatabaseLinkCol from "@/components/display/DatabaseLinkCol.vue";
import {TANDOOR_PLUGINS} from "@/types/Plugins.ts";
</script>

View File

@@ -1,4 +1,5 @@
import {RouteRecordRaw} from "vue-router";
import {Component} from "vue";
export type TandoorPlugin = {
name: string,
@@ -11,6 +12,8 @@ export type TandoorPlugin = {
bottomNavigation: any[],
userNavigation: any[],
databasePageComponent?: Component,
disabled?: boolean
}

View File

@@ -7,7 +7,6 @@ import {VitePWA} from "vite-plugin-pwa";
// https://vitejs.dev/config/
export default defineConfig(({command, mode, isSsrBuild, isPreview}) => {
console.log('MODE: ', mode)
return {
base: mode == 'development' ? '/static/vue3/' : './',
plugins: [
@@ -30,6 +29,7 @@ export default defineConfig(({command, mode, isSsrBuild, isPreview}) => {
vue: fileURLToPath(new URL("./node_modules/vue/dist/vue.esm-bundler.js", import.meta.url)),
},
extensions: ['.js', '.json', '.jsx', '.mjs', '.ts', '.tsx', '.vue',],
preserveSymlinks: true
},
clearScreen: false,
build: {