From cad43c82a07b911a06f56d9ca44fc25881bff532 Mon Sep 17 00:00:00 2001 From: Mason Coloretti Date: Sun, 14 Jul 2024 18:51:18 -0600 Subject: [PATCH] fixed lint format --- src/pages/ListIncidents.vue | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/pages/ListIncidents.vue b/src/pages/ListIncidents.vue index 87294a901..0763871c4 100644 --- a/src/pages/ListIncidents.vue +++ b/src/pages/ListIncidents.vue @@ -29,6 +29,18 @@ export default { error: null, }; }, + computed: { + filteredReports() { + return this.incidentReports + .slice() // Create a copy to avoid mutating the original array + .sort( + (a, b) => + new Date(b._createdDate) - new Date(a._createdDate), + ) + .slice(-25); // Get the last 25 sorted reports + }, + }, + mounted() { this.fetchIncidentReports(); }, @@ -55,17 +67,6 @@ export default { }); }, }, - computed: { - filteredReports() { - return this.incidentReports - .slice() // Create a copy to avoid mutating the original array - .sort( - (a, b) => - new Date(b._createdDate) - new Date(a._createdDate), - ) - .slice(-25); // Get the last 25 sorted reports - }, - }, };