From 08eb79756f253846681c76b202325f1aca41b6d1 Mon Sep 17 00:00:00 2001 From: lmarthins0 Date: Wed, 19 Aug 2026 09:51:53 -0300 Subject: [PATCH 1/4] =?UTF-8?q?adi=C3=A7=C3=A3o=20service=20de=20mail=20no?= =?UTF-8?q?=20docker=20e=20ajuste=20de=20vari=C3=A1veis=20no=20env.example?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 10 +++++----- docker-compose.yml | 9 +++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.env.example b/.env.example index e54de59..bed7226 100644 --- a/.env.example +++ b/.env.example @@ -31,12 +31,12 @@ REDIS_PASSWORD=null REDIS_PORT=6379 MAIL_MAILER=smtp -MAIL_HOST=smtp.mailtrap.io -MAIL_PORT=2525 -MAIL_USERNAME=null -MAIL_PASSWORD=null +MAIL_HOST=mailpit +MAIL_PORT=1025 +MAIL_USERNAME= +MAIL_PASSWORD= MAIL_ENCRYPTION=null -MAIL_FROM_ADDRESS=null +MAIL_FROM_ADDRESS=test@example.com MAIL_FROM_NAME="${APP_NAME}" AWS_ACCESS_KEY_ID= diff --git a/docker-compose.yml b/docker-compose.yml index 9cdc929..e04d8fb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -51,6 +51,15 @@ services: salas-network: aliases: - auth.local + + mailpit: + image: axllent/mailpit:latest + container_name: salas__mailpit + ports: + - "1025:1025" # SMTP + - "8025:8025" # Interface Web + networks: + - salas-network networks: salas-network: From c16ec6db0c31f539cdd39c8920ce543333562eea Mon Sep 17 00:00:00 2001 From: lmarthins0 Date: Wed, 19 Aug 2026 09:54:04 -0300 Subject: [PATCH 2/4] ajuste docker compose --- docker-compose.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index cb719e3..2927509 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -77,15 +77,6 @@ services: networks: - salas-network - mailpit: - image: axllent/mailpit:latest - container_name: salas_mailpit - ports: - - "1025:1025" # SMTP - - "8025:8025" # Interface Web - networks: - - salas-network - networks: salas-network: From 144f09551d18e1d8073386960fad265ecf89d175 Mon Sep 17 00:00:00 2001 From: lmarthins0 Date: Mon, 24 Aug 2026 10:01:35 -0300 Subject: [PATCH 3/4] adicionado teste de login --- tests/Browser/LoginTest.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/Browser/LoginTest.php diff --git a/tests/Browser/LoginTest.php b/tests/Browser/LoginTest.php new file mode 100644 index 0000000..d4b7c1e --- /dev/null +++ b/tests/Browser/LoginTest.php @@ -0,0 +1,25 @@ +browse(function (Browser $browser) { + $browser->visit('/') + ->clickLink('Entrar') + ->waitFor('#loginUsuario') # Importante: Espera a página de login carregar + ->typeSlowly('loginUsuario', '1111') + ->press('Login') + ->waitFor('.login_logout_link'); + }); + } +} From 70b917cee1d97812e85fd52a56957c911b23e4ea Mon Sep 17 00:00:00 2001 From: lmarthins0 Date: Thu, 3 Sep 2026 10:26:54 -0300 Subject: [PATCH 4/4] =?UTF-8?q?adicionando=20filtro=20finalidade=20na=20ab?= =?UTF-8?q?a=20relat=C3=B3rio=20-=20issue=20236?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/RelatorioController.php | 12 +++- app/Http/Requests/RelatorioRequest.php | 3 +- resources/views/relatorio/index.blade.php | 71 +++++++++++--------- 3 files changed, 53 insertions(+), 33 deletions(-) diff --git a/app/Http/Controllers/RelatorioController.php b/app/Http/Controllers/RelatorioController.php index ecb1d52..07ef16d 100644 --- a/app/Http/Controllers/RelatorioController.php +++ b/app/Http/Controllers/RelatorioController.php @@ -8,13 +8,17 @@ use Maatwebsite\Excel\Excel; use App\Exports\RelatorioExport; use App\Http\Requests\RelatorioRequest; +use App\Models\Finalidade; class RelatorioController extends Controller { public function index(){ + $finalidades = Finalidade::all(); + \UspTheme::activeUrl('/relatorio'); return view('relatorio.index', [ - 'categorias' => Categoria::pluck('nome','id')->prepend('Selecione a Categoria', '') + 'categorias' => Categoria::pluck('nome','id')->prepend('Selecione a Categoria', ''), + 'finalidades' => $finalidades ]); } @@ -23,17 +27,22 @@ public function query(RelatorioRequest $request, Excel $excel){ $fim = Carbon::createFromFormat('d/m/Y', $request->fim)->format('Y-m-d'); $reservas = Reserva::join('salas','reservas.sala_id','salas.id') + ->join('finalidades', 'reservas.finalidade_id', 'finalidades.id') ->leftJoin('restricoes','restricoes.sala_id','salas.id') ->where(function ($query){ $query->whereNull('restricoes.bloqueada') ->orWhere('restricoes.bloqueada','<>',1); }) ->where('salas.categoria_id', $request->categoria_id) + ->when($request->finalidade_id, function ($query, $finalidade_id) { + return $query->where('reservas.finalidade_id', $finalidade_id); + }) ->select( 'salas.nome as nome_sala', 'salas.capacidade', 'reservas.nome', 'reservas.descricao', + 'finalidades.legenda', 'reservas.horario_inicio', 'reservas.horario_fim', 'reservas.data', @@ -58,6 +67,7 @@ public function query(RelatorioRequest $request, Excel $excel){ 'Capacidade', 'Título da reserva', 'Descrição', + 'Finalidade', 'Horário de início', 'Horário de fim', 'Data da reserva', diff --git a/app/Http/Requests/RelatorioRequest.php b/app/Http/Requests/RelatorioRequest.php index cc8bfd0..9096453 100644 --- a/app/Http/Requests/RelatorioRequest.php +++ b/app/Http/Requests/RelatorioRequest.php @@ -30,7 +30,8 @@ public function rules(): array 'inicio' => 'required|date_format:d/m/Y', 'fim' => 'required|date_format:d/m/Y', 'orderBy' => 'nullable', - 'categoria_id' => ['required', Rule::in($categorias)] + 'categoria_id' => ['required', Rule::in($categorias)], + 'finalidade_id' => 'nullable' ]; } diff --git a/resources/views/relatorio/index.blade.php b/resources/views/relatorio/index.blade.php index 5f7d2e6..def6da8 100644 --- a/resources/views/relatorio/index.blade.php +++ b/resources/views/relatorio/index.blade.php @@ -1,38 +1,47 @@ @extends('main') @section('content') - -
-
Gerar Excel de relatório
-
-
-
- -
-
- -
-
- +
+
Gerar Excel de relatório
+
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ +
-
- -
- -
-
-
+
@endsection @section('javascripts_bottom')