Update email domain in UsersWithSmartUsersImport and TelescopeServiceProvider; extend date range in DadosTeRepository queries

This commit is contained in:
Giuliano Paschoalino 2026-01-20 09:57:35 -03:00
parent 7ac06b6dd6
commit c9307eebcc
3 changed files with 3 additions and 3 deletions

View File

@ -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();

View File

@ -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'
]);
});
}

View File

@ -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();