From 78427aa5d20a4fed529b4953fd70798e7a3f427c Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Fri, 5 Feb 2021 00:07:51 +0100 Subject: [PATCH] [quasar2] Updated depencies to fix TS Error. * Fixed some merge issues * Fixed minor issues * Fixed some warnings --- package.json | 7 +- src/boot/login.ts | 2 +- src/boot/plugins.ts | 5 - src/plugins/balance/components/Widget.vue | 10 +- src/plugins/balance/pages/Overview.vue | 3 +- src/plugins/balance/store/balance.ts | 36 +-- .../components/overview/AgendaView.vue | 217 +++++++++--------- .../components/overview/slots/EventSlot.vue | 54 ++--- src/plugins/schedule/pages/Overview.vue | 26 +-- src/store/index.ts | 4 +- src/utils/datetime.ts | 4 + yarn.lock | 26 +-- 12 files changed, 194 insertions(+), 200 deletions(-) diff --git a/package.json b/package.json index cfdcc44..2f2c795 100644 --- a/package.json +++ b/package.json @@ -10,12 +10,11 @@ "lint": "eslint --ext .js,.ts,.vue ./" }, "dependencies": { - "@quasar/extras": "^1.9.15", + "@quasar/extras": "^1.9.16", "axios": "^0.21.1", "cordova": "^10.0.0", "core-js": "^3.7.0", - "quasar": "^2.0.0-beta.1", - "vue-router": "4.0.3" + "quasar": "^2.0.0-beta.2" }, "prettier": { "singleQuote": true, @@ -24,7 +23,7 @@ "arrowParens": "always" }, "devDependencies": { - "@quasar/app": "^3.0.0-beta.1", + "@quasar/app": "^3.0.0-beta.2", "@quasar/quasar-app-extension-qcalendar": "^3.3.4", "@types/node": "^12.19.6", "@types/webpack": "^4.41.26", diff --git a/src/boot/login.ts b/src/boot/login.ts index e6a9ab0..d4b0bc3 100644 --- a/src/boot/login.ts +++ b/src/boot/login.ts @@ -14,7 +14,7 @@ export default boot(({ router, store }) => { // Secured area (LOGIN REQUIRED) // Check login is ok if (!session || session.expires <= new Date()) { - store.dispatch('session/logout').catch((error) => { + store.dispatch('sessions/logout').catch((error) => { console.warn(error); }); return; diff --git a/src/boot/plugins.ts b/src/boot/plugins.ts index 3943b49..4ecc362 100644 --- a/src/boot/plugins.ts +++ b/src/boot/plugins.ts @@ -298,10 +298,5 @@ export default boot(({ router, store, app }) => { loadedPlugins.routes.forEach((route) => router.addRoute(route)); // save plugins in VM-variable -<<<<<<< HEAD - console.log(store); - app.provide('flaschengeistPlugins', loadedPlugins); -======= app.provide('flaschengeist', loadedPlugins); ->>>>>>> 3a1cb84... [Vue3] Fixed usage of plugins }); diff --git a/src/plugins/balance/components/Widget.vue b/src/plugins/balance/components/Widget.vue index 504890b..c23e5b5 100644 --- a/src/plugins/balance/components/Widget.vue +++ b/src/plugins/balance/components/Widget.vue @@ -9,22 +9,22 @@ diff --git a/src/plugins/schedule/components/overview/slots/EventSlot.vue b/src/plugins/schedule/components/overview/slots/EventSlot.vue index b6e343e..b21671a 100644 --- a/src/plugins/schedule/components/overview/slots/EventSlot.vue +++ b/src/plugins/schedule/components/overview/slots/EventSlot.vue @@ -14,11 +14,9 @@ -
+
-
- {{ job.start | formatToHour }} - {{ job.end | formatToHour }} -
+
{{ asHour(job.start) }} - {{ asHour(job.end) }}
{{ job.type.name }}
@@ -27,8 +25,9 @@
@@ -68,22 +66,16 @@ diff --git a/src/store/index.ts b/src/store/index.ts index 66f86e2..bed563d 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -4,8 +4,8 @@ import { UserStateInterface } from 'src/plugins/user/store/user'; import { SessionStateInterface } from 'src/plugins/user/store/session'; export interface StateInterface { - user: UserStateInterface; - session: SessionStateInterface; + users: UserStateInterface; + sessions: SessionStateInterface; [key: string]: unknown; } diff --git a/src/utils/datetime.ts b/src/utils/datetime.ts index f4d9017..4af05cd 100644 --- a/src/utils/datetime.ts +++ b/src/utils/datetime.ts @@ -16,3 +16,7 @@ export function formatDateTime( }); return dateTimeFormat.format(date); } + +export function asHour(date: Date) { + return formatDateTime(date, false, true); +} diff --git a/yarn.lock b/yarn.lock index 29bb35b..d14810d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1005,10 +1005,10 @@ resolved "https://registry.yarnpkg.com/@positron/stack-trace/-/stack-trace-1.0.0.tgz#14fcc712a530038ef9be1ce6952315a839f466a8" integrity sha1-FPzHEqUwA475vhzmlSMVqDn0Zqg= -"@quasar/app@^3.0.0-beta.1": - version "3.0.0-beta.1" - resolved "https://registry.yarnpkg.com/@quasar/app/-/app-3.0.0-beta.1.tgz#006a8c8880d9d8e70b4a2de0d26eac29c95a1388" - integrity sha512-awQnaMcCGQ4BL838oBnBwCwh7n+olqZzhp32m/J3TEzz2VQlqJzzfKAHAIkcy17ICA+HoymTL+U7ZYOs36QwAg== +"@quasar/app@^3.0.0-beta.2": + version "3.0.0-beta.2" + resolved "https://registry.yarnpkg.com/@quasar/app/-/app-3.0.0-beta.2.tgz#650d94be2fad351544b54e2c5e85b06ca7e7e9f9" + integrity sha512-pX30q3yg3Qjp9MkQJmdtdA10GURg5eL/ENzJf70FcseN38kbfDQTG15CwraE+uS2ORDfs0g5qIuEl1DwFH+3pw== dependencies: "@quasar/babel-preset-app" "2.0.1" "@quasar/fastclick" "1.1.4" @@ -1111,10 +1111,10 @@ core-js "^3.6.5" core-js-compat "^3.6.5" -"@quasar/extras@^1.9.15": - version "1.9.15" - resolved "https://registry.yarnpkg.com/@quasar/extras/-/extras-1.9.15.tgz#bfc22bf4edcb079820dea248c06fe21f73221262" - integrity sha512-dm2oztROc3PgjieMEMAaqEcJ6ZC6PUGIZQet/eP2p/2vJTPwcyzhCGTBWoRJzEjOKoQeIJzM+F5diMhCaFFksA== +"@quasar/extras@^1.9.16": + version "1.9.16" + resolved "https://registry.yarnpkg.com/@quasar/extras/-/extras-1.9.16.tgz#015c6bea60e42c2e4fb6cd6892567190f78c4c91" + integrity sha512-qr2Odjc3y3s71yAfhcHYc+LnHVEQR/4ibdpB7TRSL9+Sn7tHxx7p5kkogzrs4/GzpZGlBNvbj4KaFRNyMFv0aQ== "@quasar/fastclick@1.1.4": version "1.1.4" @@ -8198,10 +8198,10 @@ qs@~6.5.2: resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== -quasar@^2.0.0-beta.1: - version "2.0.0-beta.1" - resolved "https://registry.yarnpkg.com/quasar/-/quasar-2.0.0-beta.1.tgz#297ee1f4760f11ea10fc5be53389e80d90225323" - integrity sha512-jUH76ha2Rc4InHTiU12V1v5TBKwUSdecX4ZSFAB+tX0CaFQudpNOxdQSSmllhxRe9np3tjGQ4CemKrlZNb4QPw== +quasar@^2.0.0-beta.2: + version "2.0.0-beta.2" + resolved "https://registry.yarnpkg.com/quasar/-/quasar-2.0.0-beta.2.tgz#eeedad6190eea60799a7710f33f8ad0b481b47fe" + integrity sha512-Xy7Av0bHSASHRG4IZ0tz1lu6/6844SmeQQ6KJrHb0C5EC1MS+kLkgU8+1rx0I5daHgDo2RnQt+K/e16DpB1Hqg== query-string@^4.1.0: version "4.3.4" @@ -10079,7 +10079,7 @@ vue-loader@^16.1.2: hash-sum "^2.0.0" loader-utils "^2.0.0" -vue-router@4.0.3, vue-router@^4.0.1: +vue-router@^4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.0.3.tgz#8b26050c88b2dec7e27a88835f71046b365823ec" integrity sha512-AD1OjtVPyQHTSpoRsEGfPpxRQwhAhxcacOYO3zJ3KNkYP/r09mileSp6kdMQKhZWP2cFsPR3E2M3PZguSN5/ww==