From 0be4abc3742cda76f23a6841a6d8ef7d332e2b18 Mon Sep 17 00:00:00 2001 From: shioheii Date: Sat, 29 Nov 2025 10:14:28 -0300 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20[Issue=20146]=20Registrando=20acess?= =?UTF-8?q?os=20ao=20carregar=20p=C3=A1gina=20inicial?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pages/index.vue b/pages/index.vue index a831a53..7d5c6b9 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -265,6 +265,7 @@ import { LMap, LTileLayer, LControl } from 'vue2-leaflet' import 'leaflet/dist/leaflet.css' import { mapState, mapActions } from 'vuex' import { Icon } from 'leaflet' +import axiosClient from '~/assets/services/emtu-api' delete Icon.Default.prototype._getIconUrl Icon.Default.mergeOptions({ @@ -417,6 +418,7 @@ export default { // this.searchBody = { ...this.searches } // } this.loadRecentSearches() + this.registerAccess() }, destroyed () { this.hideAlert() @@ -473,6 +475,14 @@ export default { maximumAge: 10000 }) }, + async registerAccess () { + try { + await axiosClient.post('/access/trackAccess') + } catch (error) { + // eslint-disable-next-line no-console + console.error('Erro ao registrar acesso:', error) + } + }, centerMapOnCurrentLocation () { this.getCurrentLocation() }, From 25872cef90d5b3f71fd9a7e6a3aa840a03ba3339 Mon Sep 17 00:00:00 2001 From: shioheii Date: Sat, 29 Nov 2025 12:42:56 -0300 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20[Issue=20146]=20Exibindo=20acessos?= =?UTF-8?q?=20di=C3=A1rio=20no=20gr=C3=A1fico?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/admin/acessos-diarios.vue | 145 +++++++++++++++++++++++++++++--- 1 file changed, 134 insertions(+), 11 deletions(-) diff --git a/pages/admin/acessos-diarios.vue b/pages/admin/acessos-diarios.vue index e837ef4..6e8df9e 100644 --- a/pages/admin/acessos-diarios.vue +++ b/pages/admin/acessos-diarios.vue @@ -60,25 +60,52 @@ - + BUSCAR + +
+ +

+ Carregando dados... +

+
+
+ +
+

Nenhum dado encontrado para o período selecionado.

+
+ From 77802c73b433313b1d17369e49ca2ccf27b54f14 Mon Sep 17 00:00:00 2001 From: shioheii Date: Tue, 2 Dec 2025 19:08:29 -0300 Subject: [PATCH 3/3] refactor: [Issue 146] Ajustando testes --- .../__tests__/__snapshots__/acessos-diarios.test.js.snap | 7 ++++++- pages/admin/__tests__/acessos-diarios.test.js | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pages/admin/__tests__/__snapshots__/acessos-diarios.test.js.snap b/pages/admin/__tests__/__snapshots__/acessos-diarios.test.js.snap index d25a570..b94bdd2 100644 --- a/pages/admin/__tests__/__snapshots__/acessos-diarios.test.js.snap +++ b/pages/admin/__tests__/__snapshots__/acessos-diarios.test.js.snap @@ -118,7 +118,8 @@ exports[`Pages / Admin / AdminDailyAccess should render the page 1`] = `