From f2744fba43668698607d849a722fc0b91c8b47bd Mon Sep 17 00:00:00 2001 From: nobohan Date: Tue, 5 Apr 2022 22:28:35 +0200 Subject: [PATCH 1/3] 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: { From d6deaeb324ffd7f5e198a5502703c2f79614ecbf Mon Sep 17 00:00:00 2001 From: nobohan Date: Wed, 6 Apr 2022 09:26:14 +0200 Subject: [PATCH 2/3] notification unread: correct class --- .../vuejs/_components/Notification/NotificationReadToggle.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 f9c60fa29..892e905b6 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: { From 88f377778cf0d551dee2cdbe6ade9e6538cc7aae Mon Sep 17 00:00:00 2001 From: nobohan Date: Wed, 6 Apr 2022 09:28:57 +0200 Subject: [PATCH 3/3] upd CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94489398e..6f67e3247 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ and this project adheres to ## Unreleased +* [main] notification toggle read: correct js syntax for compilation in production (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/548) + + * [person] Accompanying course evaluation documents: disable the WOPI edit link if mimetype not supported and if no keyInfos (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/585)