From c9307eebcc7a1ab24feacc8f8e3682be6a62d8db Mon Sep 17 00:00:00 2001 From: Giuliano Paschoalino Date: Tue, 20 Jan 2026 09:57:35 -0300 Subject: [PATCH] Update email domain in UsersWithSmartUsersImport and TelescopeServiceProvider; extend date range in DadosTeRepository queries --- app/Imports/UsersWithSmartUsersImport.php | 2 +- app/Providers/TelescopeServiceProvider.php | 2 +- app/Repositories/DadosTe/DadosTeRepository.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Imports/UsersWithSmartUsersImport.php b/app/Imports/UsersWithSmartUsersImport.php index 0a34b4d..1f9b0df 100644 --- a/app/Imports/UsersWithSmartUsersImport.php +++ b/app/Imports/UsersWithSmartUsersImport.php @@ -48,7 +48,7 @@ class UsersWithSmartUsersImport implements ToCollection ->lower() ->replace(" ", ""); - $email = "cli_{$client_name_format}@energiasmart.com.br"; + $email = "cli_{$client_name_format}@smartenergia.com.br"; $user_exists = User::where('email', $email_user)->exists(); $user_smart_exists = User::where('email', $email)->exists(); diff --git a/app/Providers/TelescopeServiceProvider.php b/app/Providers/TelescopeServiceProvider.php index c01d80c..c8fa64c 100644 --- a/app/Providers/TelescopeServiceProvider.php +++ b/app/Providers/TelescopeServiceProvider.php @@ -58,7 +58,7 @@ class TelescopeServiceProvider extends TelescopeApplicationServiceProvider { Gate::define('viewTelescope', function () { return in_array(request()->query('email'), [ - 'smart_admin_monitor@energiasmart.com.br' + 'smart_admin_monitor@smartenergia.com.br' ]); }); } diff --git a/app/Repositories/DadosTe/DadosTeRepository.php b/app/Repositories/DadosTe/DadosTeRepository.php index 53d722c..6ee9677 100644 --- a/app/Repositories/DadosTe/DadosTeRepository.php +++ b/app/Repositories/DadosTe/DadosTeRepository.php @@ -49,7 +49,7 @@ class DadosTeRepository extends AbstractRepository implements DadosTeContractInt $params = static::filterRow($params); $result = $this->execute($fields, $params) - ->whereRaw("TO_DATE(dados_te.mes, 'YYMM') >= TO_DATE(TO_CHAR(current_date , 'YYYY-01-01'), 'YYYY-MM-DD') - INTERVAL '1' year") + ->whereRaw("TO_DATE(dados_te.mes, 'YYMM') >= TO_DATE(TO_CHAR(current_date , 'YYYY-01-01'), 'YYYY-MM-DD') - INTERVAL '2' year") ->orderBy('mes', 'DESC') ->get();