From 52a7189605e5383d63fdf6bdb5a07475c7211d9a Mon Sep 17 00:00:00 2001 From: cnouguier Date: Wed, 17 Aug 2022 17:28:51 +0200 Subject: [PATCH] wip: Upgrade to Quasar 2 / Vue 3 #393 --- config/default.js | 2 +- quasar.config.js | 1 + src/boot/kdk.js | 2 +- src/components/AlertForm.vue | 15 ++++--- src/components/EventCard.vue | 2 +- src/components/EventEditor.vue | 42 ++++++++----------- src/components/EventLogEditor.vue | 9 ++-- src/components/EventLogsList.vue | 6 --- src/components/EventTemplateEditor.vue | 12 +++--- .../EventTemplateWorkflowEditor.vue | 12 +++--- src/components/EventTemplateWorkflowForm.vue | 7 +--- src/components/Index.vue | 11 +++-- src/components/OrganisationCard.vue | 2 +- src/components/OrganisationMenu.vue | 4 +- src/components/PlanCard.vue | 2 +- src/components/PlanEditor.vue | 15 +++---- src/mixins/mixin.events.js | 3 +- 17 files changed, 65 insertions(+), 82 deletions(-) diff --git a/config/default.js b/config/default.js index a5e11f4b..c8e562a5 100644 --- a/config/default.js +++ b/config/default.js @@ -49,7 +49,7 @@ const contextHelp = function (tour) { const leftPane = function (tour) { return { content: [ - { component: 'QImg', src: 'statics/aktnmap-banner.png' }, + { component: 'QImg', src: 'aktnmap-banner.png' }, { component: 'account/KIdentityPanel', class: 'full-width' }, { id: 'my-organisations', icon: 'las la-grip-horizontal', label: 'leftPane.ORGANISATIONS', route: { name: 'organisations-activity' }, renderer: 'item' }, { component: 'QSeparator', color: 'lightgrey', style: 'min-height: 1px; max-height: 1px;' }, diff --git a/quasar.config.js b/quasar.config.js index 1f4326c3..6ad8c5f6 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -164,6 +164,7 @@ module.exports = configure(function (ctx) { 'QCard', 'QCardSection', 'QCardActions', + 'QCheckbox', 'QChip', 'QDate', 'QDialog', diff --git a/src/boot/kdk.js b/src/boot/kdk.js index c2ac91f2..a861b107 100644 --- a/src/boot/kdk.js +++ b/src/boot/kdk.js @@ -68,7 +68,7 @@ export default async ({ app }) => { app.component('KUploader', await kdkCoreUtils.loadComponent('input/KUploader')) app.component('KModal', await kdkCoreUtils.loadComponent('frame/KModal')) app.component('KForm', await kdkCoreUtils.loadComponent('form/KForm')) - app.component('KList', await kdkCoreUtils.loadComponent('collection/Klist')) + app.component('KList', await kdkCoreUtils.loadComponent('collection/KList')) app.component('KGrid', await kdkCoreUtils.loadComponent('collection/KGrid')) app.component('KBoard', await kdkCoreUtils.loadComponent('collection/KBoard')) app.component('KHistory', await kdkCoreUtils.loadComponent('collection/KHistory')) diff --git a/src/components/AlertForm.vue b/src/components/AlertForm.vue index 59271188..075c95f0 100644 --- a/src/components/AlertForm.vue +++ b/src/components/AlertForm.vue @@ -50,8 +50,8 @@ - - + + @@ -70,13 +70,16 @@ import _ from 'lodash' import moment from 'moment' import logger from 'loglevel' -import { mixins as kdkCoreMixins } from '@kalisio/kdk/core.client' +import { mixins as kdkCoreMixins, utils as kdkCoreUtils } from '@kalisio/kdk/core.client' import { QSlider, QRange } from 'quasar' export default { name: 'alert-form', components: { - QSlider, QRange + QSlider, + QRange, + KItemField: kdkCoreUtils.loadComponent('form/KItemField'), + KToggleField: kdkCoreUtils.loadComponent('form/KToggleField') }, mixins: [ kdkCoreMixins.schemaProxy @@ -356,10 +359,6 @@ export default { } }, async created () { - // Load the required components - this.$options.components['KItem-field'] = this.$load('form/KItemField') - this.$options.components['k-toggle-field'] = this.$load('form/KToggleField') - await this.build() this.$emit('form-ready', this) } diff --git a/src/components/EventCard.vue b/src/components/EventCard.vue index b8b39f5a..7ca81c39 100644 --- a/src/components/EventCard.vue +++ b/src/components/EventCard.vue @@ -214,7 +214,7 @@ export default { header () { let components = [] if (this.isExpanded) { - components.push({ component: 'QSpace ' }) + components.push({ component: 'QSpace' }) components = components.concat(_.filter(this.itemActions, { scope: 'header' })) } return components diff --git a/src/components/EventEditor.vue b/src/components/EventEditor.vue index db4a67e3..797a66d8 100644 --- a/src/components/EventEditor.vue +++ b/src/components/EventEditor.vue @@ -1,44 +1,39 @@