From f2744fba43668698607d849a722fc0b91c8b47bd Mon Sep 17 00:00:00 2001 From: nobohan Date: Tue, 5 Apr 2022 22:28:35 +0200 Subject: [PATCH] notification toggle read: correct js syntax --- .../public/module/notification/toggle_read.js | 23 ++++++++++--------- .../Notification/NotificationReadToggle.vue | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/notification/toggle_read.js b/src/Bundle/ChillMainBundle/Resources/public/module/notification/toggle_read.js index 68b06b76a..6308f2f11 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/notification/toggle_read.js +++ b/src/Bundle/ChillMainBundle/Resources/public/module/notification/toggle_read.js @@ -8,30 +8,31 @@ window.addEventListener('DOMContentLoaded', function (e) { document.querySelectorAll('.notification_toggle_read_status') .forEach(function (el, i) { createApp({ - template: '', + template: ` + `, components: { NotificationReadToggle, }, data() { return { - notificationId: +el.dataset.notificationId, + notificationId: el.dataset.notificationId, buttonClass: el.dataset.buttonClass, buttonNoText: 'false' === el.dataset.buttonText, showUrl: el.dataset.showButtonUrl, - isRead: 1 === +el.dataset.notificationCurrentIsRead, + isRead: 1 === el.dataset.notificationCurrentIsRead, container: el.dataset.container } }, computed: { getContainer() { - return document.querySelectorAll('div.' + this.container); + return document.querySelectorAll(`div.${this.container}`); } }, methods: { diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Notification/NotificationReadToggle.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Notification/NotificationReadToggle.vue index c60124592..f9c60fa29 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Notification/NotificationReadToggle.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Notification/NotificationReadToggle.vue @@ -81,7 +81,7 @@ export default { /// [Option] showUrl is href for show page second button. // When passed, the component return a button-group with 2 buttons. isButtonGroup() { - return !!this.showUrl + return !this.showUrl; } }, methods: {