From 09723544b6e81a246904bbdf206398934493d9af Mon Sep 17 00:00:00 2001 From: "rune.laenen" Date: Fri, 20 Aug 2021 10:32:00 +0200 Subject: [PATCH] Preview in other languages fix bug --- composer.json | 2 +- .../rl-advanced-banners-detail-preview/index.js | 9 +++++++++ .../rl-advanced-banners-detail-preview.html.twig | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 5ebaa59..ec77d5f 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Advanced Banners (Digital Publishing) plugin", "type": "shopware-platform-plugin", "license": "MIT", - "version": "2.2.0", + "version": "2.2.1", "autoload": { "psr-4": { "RuneLaenen\\AdvancedBanners\\": "src/" diff --git a/src/Resources/app/administration/src/module/rl-advanced-banners/component/rl-advanced-banners-detail-preview/index.js b/src/Resources/app/administration/src/module/rl-advanced-banners/component/rl-advanced-banners-detail-preview/index.js index f113272..10e7cfe 100644 --- a/src/Resources/app/administration/src/module/rl-advanced-banners/component/rl-advanced-banners-detail-preview/index.js +++ b/src/Resources/app/administration/src/module/rl-advanced-banners/component/rl-advanced-banners-detail-preview/index.js @@ -27,5 +27,14 @@ Component.register('rl-advanced-banners-detail-preview', { required: false, default: false } + }, + + computed: { + layers() { + if (this.advancedBanner.data && this.advancedBanner.data.layers) { + return this.advancedBanner.data.layers; + } + return this.advancedBanner.translated.data.layers; + } } }); diff --git a/src/Resources/app/administration/src/module/rl-advanced-banners/component/rl-advanced-banners-detail-preview/rl-advanced-banners-detail-preview.html.twig b/src/Resources/app/administration/src/module/rl-advanced-banners/component/rl-advanced-banners-detail-preview/rl-advanced-banners-detail-preview.html.twig index 6c255d0..98b3bc4 100644 --- a/src/Resources/app/administration/src/module/rl-advanced-banners/component/rl-advanced-banners-detail-preview/rl-advanced-banners-detail-preview.html.twig +++ b/src/Resources/app/administration/src/module/rl-advanced-banners/component/rl-advanced-banners-detail-preview/rl-advanced-banners-detail-preview.html.twig @@ -1,6 +1,6 @@