From 6a09be320cede273f532aef416f261a5a360777a Mon Sep 17 00:00:00 2001 From: LukiBeg Date: Tue, 11 Nov 2025 18:10:11 -0300 Subject: [PATCH] fix: Ajusta app.js e alguns componenetes. --- app/Http/Controllers/ClientController.php | 19 ++ app/Http/Controllers/UserController.php | 18 -- app/Livewire/Forms/ClientForm.php | 3 +- database/seeders/DatabaseSeeder.php | 3 - resources/css/app.css | 61 ++++- resources/js/app.js | 2 +- .../components/session-messages.blade.php | 17 +- resources/views/dashboard.blade.php | 216 +++++++++--------- resources/views/login.blade.php | 12 +- routes/web.php | 7 +- 10 files changed, 197 insertions(+), 161 deletions(-) create mode 100644 app/Http/Controllers/ClientController.php delete mode 100644 app/Http/Controllers/UserController.php diff --git a/app/Http/Controllers/ClientController.php b/app/Http/Controllers/ClientController.php new file mode 100644 index 0000000..b0b7571 --- /dev/null +++ b/app/Http/Controllers/ClientController.php @@ -0,0 +1,19 @@ + $clients]); + } +} diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php deleted file mode 100644 index 35b238c..0000000 --- a/app/Http/Controllers/UserController.php +++ /dev/null @@ -1,18 +0,0 @@ - $users]); - } -} diff --git a/app/Livewire/Forms/ClientForm.php b/app/Livewire/Forms/ClientForm.php index 2a8c0d0..e6f4801 100644 --- a/app/Livewire/Forms/ClientForm.php +++ b/app/Livewire/Forms/ClientForm.php @@ -2,6 +2,7 @@ namespace App\Livewire\Forms; +use Livewire\Attributes\Validate; use Livewire\Form; use App\Models\Client; @@ -46,7 +47,7 @@ public function rules() 'client_name' => 'required|string|max:255', 'legal_name' => 'required|string|max:255', 'cnpj' => 'required|string|max:20|unique:clients,cnpj', - 'profile_image_path' => 'nullable|file|mimes:jpeg,png,bmp,gif,svg,webp|max:2048', // 2MB Max 'pbx_hosting' => 'nullable|string|max:255', + 'profile_image_path' => 'nullable|file|mimes:jpeg,png,bmp,gif,svg,webp|max:2048', 'activation_date' => 'nullable|date', 'carrier' => 'nullable|string|max:255', 'access_type' => 'nullable|string|max:255', diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index a337b71..dc6f9fe 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -3,7 +3,6 @@ namespace Database\Seeders; use App\Models\User; -use App\Models\Client; use Illuminate\Support\Facades\Hash; // use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; @@ -21,7 +20,5 @@ public function run(): void 'email' => 'inglinesystemsadmin@inglinesystems.com.br', 'password' => Hash::make('*Ingline.Sys#9420%SECURITY#') ]); - - Client::factory()->create([]); } } diff --git a/resources/css/app.css b/resources/css/app.css index b19f1fe..8413264 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -54,27 +54,37 @@ @layer components { /* 1. Container de Centralização */ .container-form { - @apply w-full min-h-screen mx-auto; /* Garante altura total */ + @apply w-full min-h-screen mx-auto; + /* Garante altura total */ @apply flex justify-center items-center p-4; } /* 2. O Card de Login "Vidro Fosco" */ .form-class { - @apply w-full max-w-md; /* Tamanho responsivo */ + @apply w-full max-w-md; + /* Tamanho responsivo */ @apply p-8; /* O EFEITO "VIDRO FOSCO" */ - @apply bg-white/20 backdrop-blur-lg; /* Fundo 20% opaco + Borrão */ + @apply bg-white/20 backdrop-blur-lg; + /* Fundo 20% opaco + Borrão */ @apply rounded-xl shadow-2xl; - @apply border border-white/10; /* Borda sutil */ + @apply border border-white/10; + /* Borda sutil */ } /* 3. A Logo */ .container-title { @apply flex justify-center mb-6 text-nowrap; } + + .container-message { + @apply flex justify-center mb-6 text-nowrap; + } + .container-title img { - @apply h-10; /* Ajuste o tamanho da sua logo */ + @apply h-10; + /* Ajuste o tamanho da sua logo */ } /* 4. Título ("Efetue seu login") */ @@ -94,13 +104,17 @@ @layer components { /* 6. Inputs com Estilo "Vidro" */ .form-input-class { @apply w-full p-3; - @apply bg-transparent; /* Fundo transparente */ - @apply border-b-2 border-gray-200; /* Apenas borda inferior */ + @apply bg-transparent; + /* Fundo transparente */ + @apply border-b-2 border-gray-200; + /* Apenas borda inferior */ @apply text-gray-500 placeholder-white/70; @apply focus:outline-none focus:ring-0; - @apply focus:border-white; /* Borda fica branca sólida no foco */ + @apply focus:border-white; + /* Borda fica branca sólida no foco */ @apply transition-all duration-300; } + /* Remove o fundo de preenchimento automático do navegador */ .form-input-class:-webkit-autofill { -webkit-text-fill-color: #0f0e0e !important; @@ -111,7 +125,8 @@ @layer components { /* 7. Botão Principal */ .form-button-class { - @apply w-full; /* Botão com largura total */ + @apply w-full; + /* Botão com largura total */ @apply bg-blue-600 text-white rounded-md p-3; @apply font-semibold text-base; @apply cursor-pointer; @@ -123,6 +138,7 @@ @layer components { .forget-password { @apply text-center mt-4; } + .forget-password a { @apply text-sm text-white/80 hover:text-white hover:underline; @apply transition-colors; @@ -132,12 +148,37 @@ @layer components { .messages { @apply flex justify-center mb-4; } - .messages div[role="alert"] { /* Assumindo que seu componente renderiza um div */ + + .messages div[role="alert"] { + /* Assumindo que seu componente renderiza um div */ @apply bg-red-500/50 text-white p-3 rounded-md border border-red-700 text-sm; } /* --- FIM DOS ESTILOS DE LOGIN --- */ + /* 9. Estilizando as mensagens de erro (x-session-messages) */ + .messages { + @apply flex justify-center mb-4; + + /* 1. MUDANÇA: Usando "vidro branco" (como o card) + em vez de "vidro vermelho". + */ + @apply bg-white/10 backdrop-blur-md; + /* 'md' para um borrão mais forte */ + + /* 2. MUDANÇA: Borda sutil de "vidro" */ + @apply border border-white/10; + + /* 3. NOVO: Sombra para "flutuar" */ + @apply shadow-lg rounded-lg; + + /* 4. MUDANÇA: A cor do erro agora está no texto. + 'text-red-200' (ou 300) tem ótimo contraste + no fundo de ondas. + */ + @apply text-red-300 font-semibold p-4 text-sm; + } + /* Classes antigas genéricas (podem ser usadas em outros lugares) */ .container { /* Deixe APENAS as classes de largura, margem e padding */ diff --git a/resources/js/app.js b/resources/js/app.js index 75aab97..98acbd7 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -1,7 +1,7 @@ import './bootstrap'; function showContainerTitle() { - const containerTitle = document.querySelector('.container-title'); + const containerTitle = document.querySelector('.container-message'); const containerTitleText = 'Bem vindo ao painel administrativo da Ingline Systems!'; const containerTitleLength = containerTitleText.length; let text = ''; diff --git a/resources/views/components/session-messages.blade.php b/resources/views/components/session-messages.blade.php index d6d29e4..588992d 100644 --- a/resources/views/components/session-messages.blade.php +++ b/resources/views/components/session-messages.blade.php @@ -1,15 +1,10 @@
+
- @if ($errors->any()) -
- {{ $errors->first() }} + {{-- 1. O @if garante que este bloco (incluindo o 'div') só será renderizado se houver um erro. --}} + @if ($errors->any() || session('error')) + {{-- 2. Adicionamos o 'role="alert"'. O seu CSS (em .messages div[role="alert"]) agora vai aplicar o estilo "vidro vermelho" aqui. --}} + @if ($errors->any()) {{ $errors->first() }} @endif @if (session('error')) {{ session('error') }} @endif + @endif
- @endif - - @if (session('error')) -
- {{ session('error') }} -
- - @endif
\ No newline at end of file diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index fd9e7e7..0919ae8 100644 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -1,120 +1,120 @@ @extends('layouts.app') @section('content') - - - + + + -
+
-
-
-
- Avatar do Cliente -
-
- - - -
+
+
+
+ Avatar do Cliente
-
- Cliente 1 +
- -
-
-
- Avatar do Cliente -
-
- - - -
-
-
- Cliente 2 -
+
+ Cliente 1
- -
-
-
- Avatar do Cliente -
-
- - - -
-
-
- Cliente 3 -
-
- -
-
-
- Avatar do Cliente -
-
- - - -
-
-
- Cliente 4 -
-
-
+
+
+
+ Avatar do Cliente +
+
+ + + +
+
+
+ Cliente 2 +
+
+ +
+
+
+ Avatar do Cliente +
+
+ + + +
+
+
+ Cliente 3 +
+
+ +
+
+
+ Avatar do Cliente +
+
+ + + +
+
+
+ Cliente 4 +
+
+ +
+ @endsection \ No newline at end of file diff --git a/resources/views/login.blade.php b/resources/views/login.blade.php index 008b9cd..7e23755 100644 --- a/resources/views/login.blade.php +++ b/resources/views/login.blade.php @@ -18,26 +18,28 @@
- Ingline Logo + Ingline Logo
+
+ +
+

Efetue seu login

-
- -
+
- +
diff --git a/routes/web.php b/routes/web.php index 9c174ee..f09d329 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,13 +1,12 @@ group(function () { @@ -16,7 +15,7 @@ Route::middleware(['auth'])->group(function () { - Route::controller(UserController::class)->group(function () { + Route::controller(ClientController::class)->group(function () { Route::get('/dashboard', 'dashboard')->name('dashboard'); Route::post('/create-users', 'createUsers')->name('users.create')->middleware('authorization'); });