From 78dc8416fbb238c7fbbf2d6c0204e4a8054ef2b3 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 30 Oct 2022 11:01:46 +0100 Subject: [PATCH] Snake case -> camel case for backend -> frontend entity types conversion --- .../webapp/src/components/panels/Entities/Entity.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/Entity.vue b/platypush/backend/http/webapp/src/components/panels/Entities/Entity.vue index 1e6eea805..24480977d 100644 --- a/platypush/backend/http/webapp/src/components/panels/Entities/Entity.vue +++ b/platypush/backend/http/webapp/src/components/panels/Entities/Entity.vue @@ -26,10 +26,15 @@ export default { }, mounted() { - if (this.type !== 'Entity') + if (this.type !== 'Entity') { + const type = this.type.split('_').map((t) => + t[0].toUpperCase() + t.slice(1) + ).join('') + this.component = defineAsyncComponent( - () => import(`@/components/panels/Entities/${this.type}`) + () => import(`@/components/panels/Entities/${type}`) ) + } }, }