From 3d20292898e712e03e65b6e78765cadd28245397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Sun, 28 Mar 2021 11:34:36 +0200 Subject: [PATCH] [pricelist][picture] update picture if changed, add no-image.svg --- public/no-image.svg | 168 ++++++++++++++++++ src/flaschengeist.d.ts | 1 + .../pricelist/components/CalculationTable.vue | 27 ++- .../components/CalculationTable/NewDrink.vue | 1 + src/plugins/pricelist/store.ts | 9 +- 5 files changed, 188 insertions(+), 18 deletions(-) create mode 100644 public/no-image.svg diff --git a/public/no-image.svg b/public/no-image.svg new file mode 100644 index 0000000..097233d --- /dev/null +++ b/public/no-image.svg @@ -0,0 +1,168 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + Kein Bild vorhanden + + diff --git a/src/flaschengeist.d.ts b/src/flaschengeist.d.ts index a081c23..8956465 100644 --- a/src/flaschengeist.d.ts +++ b/src/flaschengeist.d.ts @@ -82,6 +82,7 @@ declare namespace FG { tags?: Array; type?: DrinkType; volumes: Array; + uuid: string; } interface DrinkIngredient { id: number; diff --git a/src/plugins/pricelist/components/CalculationTable.vue b/src/plugins/pricelist/components/CalculationTable.vue index 5e26945..7c59483 100644 --- a/src/plugins/pricelist/components/CalculationTable.vue +++ b/src/plugins/pricelist/components/CalculationTable.vue @@ -60,10 +60,17 @@ /> + + :src="drinks_props.row.uuid ? `/api/pricelist/picture/${drinks_props.row.uuid}?size=256`: 'no-image.svg'" + placeholder-src='no-image.svg' + > + +