Update email domain in UsersWithSmartUsersImport and TelescopeServiceProvider; extend date range in DadosTeRepository queries
This commit is contained in:
parent
7ac06b6dd6
commit
c9307eebcc
@ -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();
|
||||
|
||||
@ -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'
|
||||
]);
|
||||
});
|
||||
}
|
||||
|
||||
@ -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();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user