From 7527fa9b511e0a5284bf2afe53f0b8b1b19b2e04 Mon Sep 17 00:00:00 2001 From: Hemanth Rachapalli Date: Thu, 25 Dec 2025 22:56:14 +0530 Subject: [PATCH 1/4] select all button --- src/pages/EditMaintenance.vue | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/pages/EditMaintenance.vue b/src/pages/EditMaintenance.vue index 70742a9c6..9bd5a57d2 100644 --- a/src/pages/EditMaintenance.vue +++ b/src/pages/EditMaintenance.vue @@ -28,9 +28,16 @@

{{ $t("Affected Monitors") }}

- {{ $t("affectedMonitorsDescription") }}
+
+
{{ $t("affectedMonitorsDescription") }}
+ +
+ 0 && this.affectedMonitors.length === this.affectedMonitorsOptions.length; + }, + pageName() { let name = "Schedule Maintenance"; @@ -494,6 +505,14 @@ export default { } }, + toggleSelectAllAffectedMonitors() { + if (this.affectedMonitorsAllSelected) { + this.affectedMonitors = []; + } else { + this.affectedMonitors = this.affectedMonitorsOptions.slice(); + } + }, + /** * Create new maintenance * @returns {Promise} From 603032981ab488d1f4b77e7521276ee6983d37b0 Mon Sep 17 00:00:00 2001 From: Hemanth Rachapalli Date: Thu, 25 Dec 2025 22:56:37 +0530 Subject: [PATCH 2/4] translation --- src/lang/en.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lang/en.json b/src/lang/en.json index 960647c1d..93162c5bf 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -1144,6 +1144,7 @@ "Money": "Money", "Scifi": "Scifi", "Clear": "Clear", + "Select All": "Select All", "Elevator": "Elevator", "Guitar": "Guitar", "Pop": "Pop", From f9831392fc6f51c3b10d1fd4e6962c634c11c624 Mon Sep 17 00:00:00 2001 From: Hemanth Rachapalli Date: Fri, 26 Dec 2025 10:57:52 +0530 Subject: [PATCH 3/4] changed logic to selector --- src/pages/EditMaintenance.vue | 50 ++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/src/pages/EditMaintenance.vue b/src/pages/EditMaintenance.vue index 9bd5a57d2..c8d15dba6 100644 --- a/src/pages/EditMaintenance.vue +++ b/src/pages/EditMaintenance.vue @@ -32,16 +32,12 @@
{{ $t("affectedMonitorsDescription") }}
-
+ @select="onMonitorSelect" + @remove="onMonitorRemove" + > + +
@@ -360,8 +365,19 @@ export default { }); }, + affectedMonitorsOptionsWithSelectAll() { + return [ + { + id: "select-all", + pathName: this.affectedMonitorsAllSelected ? this.$t("Deselect All") : this.$t("Select All") + }, + ...this.affectedMonitorsOptions + ]; + }, + affectedMonitorsAllSelected() { - return this.affectedMonitors.length > 0 && this.affectedMonitors.length === this.affectedMonitorsOptions.length; + return this.affectedMonitors.length > 0 && + this.affectedMonitors.length === this.affectedMonitorsOptions.length; }, pageName() { @@ -505,11 +521,21 @@ export default { } }, - toggleSelectAllAffectedMonitors() { - if (this.affectedMonitorsAllSelected) { - this.affectedMonitors = []; - } else { - this.affectedMonitors = this.affectedMonitorsOptions.slice(); + onMonitorSelect(selectedOption) { + if (selectedOption.id === "select-all") { + this.affectedMonitors = this.affectedMonitors.filter(m => m.id !== "select-all"); + + if (this.affectedMonitorsAllSelected) { + this.affectedMonitors = []; + } else { + this.affectedMonitors = this.affectedMonitorsOptions.slice(); + } + } + }, + + onMonitorRemove(removedOption) { + if (removedOption.id === "select-all") { + this.affectedMonitors = this.affectedMonitors.filter(m => m.id !== "select-all"); } }, From 8a82f6682003ace18d1129c97a8d3d1d2b37e84f Mon Sep 17 00:00:00 2001 From: Hemanth Rachapalli Date: Fri, 26 Dec 2025 10:58:15 +0530 Subject: [PATCH 4/4] translation --- src/lang/en.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lang/en.json b/src/lang/en.json index 93162c5bf..493b33afd 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -1145,6 +1145,7 @@ "Scifi": "Scifi", "Clear": "Clear", "Select All": "Select All", + "Deselect All": "Deselect All", "Elevator": "Elevator", "Guitar": "Guitar", "Pop": "Pop",