fix: Ajusta app.js e alguns componenetes.

This commit is contained in:
LukiBeg 2025-11-11 18:10:11 -03:00
parent ecebdc34f6
commit 6a09be320c
10 changed files with 197 additions and 161 deletions

View File

@ -0,0 +1,19 @@
<?php
namespace App\Http\Controllers;
use App\Models\Client;
use App\Services\ClientService;
use Illuminate\Http\Request;
use Illuminate\Contracts\View\View;
class ClientController extends Controller
{
public function __construct(ClientService $userService) {}
public function dashboard(Request $request): View
{
$clients = Client::all();
return view('dashboard', ['clients' => $clients]);
}
}

View File

@ -1,18 +0,0 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\User;
use App\Services\UserService;
use Illuminate\Contracts\View\View;
class UserController extends Controller
{
public function __construct(UserService $userService) {}
public function dashboard(Request $request): View
{
$users = User::all();
return view('dashboard', ['users' => $users]);
}
}

View File

@ -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',

View File

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

View File

@ -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 */

View File

@ -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 = '';

View File

@ -1,15 +1,10 @@
<div>
<div class="messages">
@if ($errors->any())
<div class="alert alert-danger">
{{ $errors->first() }}
{{-- 1. O @if garante que este bloco (incluindo o 'div') 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
</div>
@endif
@if (session('error'))
<div class="alert alert-danger">
{{ session('error') }}
</div>
@endif
</div>

View File

@ -1,120 +1,120 @@
@extends('layouts.app')
@section('content')
<livewire:admin.create-user />
<livewire:admin.add-client />
<livewire:admin.show-users />
<livewire:admin.create-user />
<livewire:admin.add-client />
<livewire:admin.show-users />
<div class="container grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
<div class="container grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
<div class="client-card">
<div class="client-card-header">
<div class="client-avatar">
<img src="{{ Vite::asset('resources/images/mr-distribuidora.svg') }}" alt="Avatar do Cliente"
class="w-32 h-32 rounded-full object-cover">
</div>
<div x-data="{ open: false }" @click.outside="open = false" class="client-options-menu">
<button @click="open = !open" class="client-options-button">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-gray-400 hover:text-gray-700"
viewBox="0 0 20 20" fill="currentColor">
<path
d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z" />
</svg>
</button>
<ul x-show="open" class="client-options-list" x-transition>
<li><a href="#" class="client-option-item">Ver Detalhes</a></li>
<li><a href="#" class="client-option-item">Editar Cliente</a></li>
<li><a href="#" class="client-option-item text-red-600">Excluir Cliente</a></li>
</ul>
</div>
<div class="client-card">
<div class="client-card-header">
<div class="client-avatar">
<img src="{{ Vite::asset('resources/images/mr-distribuidora.svg') }}" alt="Avatar do Cliente"
class="w-32 h-32 rounded-full object-cover">
</div>
<div class="client-card-name">
Cliente 1
<div x-data="{ open: false }" @click.outside="open = false" class="client-options-menu">
<button @click="open = !open" class="client-options-button">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-gray-400 hover:text-gray-700"
viewBox="0 0 20 20" fill="currentColor">
<path
d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z" />
</svg>
</button>
<ul x-show="open" class="client-options-list" x-transition>
<li><a href="#" class="client-option-item">Ver Detalhes</a></li>
<li><a href="#" class="client-option-item">Editar Cliente</a></li>
<li><a href="#" class="client-option-item text-red-600">Excluir Cliente</a></li>
</ul>
</div>
</div>
<div class="client-card">
<div class="client-card-header">
<div class="client-avatar">
<img src="{{ Vite::asset('resources/images/maissaude.svg') }}" alt="Avatar do Cliente"
class="w-32 h-32 rounded-full object-cover">
</div>
<div x-data="{ open: false }" @click.outside="open = false" class="client-options-menu">
<button @click="open = !open" class="client-options-button">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-gray-400 hover:text-gray-700"
viewBox="0 0 20 20" fill="currentColor">
<path
d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z" />
</svg>
</button>
<ul x-show="open" class="client-options-list" x-transition>
<li><a href="#" class="client-option-item">Ver Detalhes</a></li>
<li><a href="#" class="client-option-item">Editar Cliente</a></li>
<li><a href="#" class="client-option-item text-red-600">Excluir Cliente</a></li>
</ul>
</div>
</div>
<div class="client-card-name">
Cliente 2
</div>
<div class="client-card-name">
Cliente 1
</div>
<div class="client-card">
<div class="client-card-header">
<div class="client-avatar">
<img src="{{ Vite::asset('resources/images/logo.png') }}" alt="Avatar do Cliente"
class="w-32 h-32 rounded-full object-cover">
</div>
<div x-data="{ open: false }" @click.outside="open = false" class="client-options-menu">
<button @click="open = !open" class="client-options-button">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-gray-400 hover:text-gray-700"
viewBox="0 0 20 20" fill="currentColor">
<path
d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z" />
</svg>
</button>
<ul x-show="open" class="client-options-list" x-transition>
<li><a href="#" class="client-option-item">Ver Detalhes</a></li>
<li><a href="#" class="client-option-item">Editar Cliente</a></li>
<li><a href="#" class="client-option-item text-red-600">Excluir Cliente</a></li>
</ul>
</div>
</div>
<div class="client-card-name">
Cliente 3
</div>
</div>
<div class="client-card">
<div class="client-card-header">
<div class="client-avatar">
<img src="{{ Vite::asset('resources/images/logo.png') }}" alt="Avatar do Cliente"
class="w-32 h-32 rounded-full object-cover">
</div>
<div x-data="{ open: false }" @click.outside="open = false" class="client-options-menu">
<button @click="open = !open" class="client-options-button">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-gray-400 hover:text-gray-700"
viewBox="0 0 20 20" fill="currentColor">
<path
d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z" />
</svg>
</button>
<ul x-show="open" class="client-options-list" x-transition>
<li><a href="#" class="client-option-item">Ver Detalhes</a></li>
<li><a href="#" class="client-option-item">Editar Cliente</a></li>
<li><a href="#" class="client-option-item text-red-600">Excluir Cliente</a></li>
</ul>
</div>
</div>
<div class="client-card-name">
Cliente 4
</div>
</div>
</div>
<div class="client-card">
<div class="client-card-header">
<div class="client-avatar">
<img src="{{ Vite::asset('resources/images/maissaude.svg') }}" alt="Avatar do Cliente"
class="w-32 h-32 rounded-full object-cover">
</div>
<div x-data="{ open: false }" @click.outside="open = false" class="client-options-menu">
<button @click="open = !open" class="client-options-button">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-gray-400 hover:text-gray-700"
viewBox="0 0 20 20" fill="currentColor">
<path
d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z" />
</svg>
</button>
<ul x-show="open" class="client-options-list" x-transition>
<li><a href="#" class="client-option-item">Ver Detalhes</a></li>
<li><a href="#" class="client-option-item">Editar Cliente</a></li>
<li><a href="#" class="client-option-item text-red-600">Excluir Cliente</a></li>
</ul>
</div>
</div>
<div class="client-card-name">
Cliente 2
</div>
</div>
<div class="client-card">
<div class="client-card-header">
<div class="client-avatar">
<img src="{{ Vite::asset('resources/images/logo.png') }}" alt="Avatar do Cliente"
class="w-32 h-32 rounded-full object-cover">
</div>
<div x-data="{ open: false }" @click.outside="open = false" class="client-options-menu">
<button @click="open = !open" class="client-options-button">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-gray-400 hover:text-gray-700"
viewBox="0 0 20 20" fill="currentColor">
<path
d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z" />
</svg>
</button>
<ul x-show="open" class="client-options-list" x-transition>
<li><a href="#" class="client-option-item">Ver Detalhes</a></li>
<li><a href="#" class="client-option-item">Editar Cliente</a></li>
<li><a href="#" class="client-option-item text-red-600">Excluir Cliente</a></li>
</ul>
</div>
</div>
<div class="client-card-name">
Cliente 3
</div>
</div>
<div class="client-card">
<div class="client-card-header">
<div class="client-avatar">
<img src="{{ Vite::asset('resources/images/logo.png') }}" alt="Avatar do Cliente"
class="w-32 h-32 rounded-full object-cover">
</div>
<div x-data="{ open: false }" @click.outside="open = false" class="client-options-menu">
<button @click="open = !open" class="client-options-button">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-gray-400 hover:text-gray-700"
viewBox="0 0 20 20" fill="currentColor">
<path
d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z" />
</svg>
</button>
<ul x-show="open" class="client-options-list" x-transition>
<li><a href="#" class="client-option-item">Ver Detalhes</a></li>
<li><a href="#" class="client-option-item">Editar Cliente</a></li>
<li><a href="#" class="client-option-item text-red-600">Excluir Cliente</a></li>
</ul>
</div>
</div>
<div class="client-card-name">
Cliente 4
</div>
</div>
</div>
@endsection

View File

@ -18,19 +18,21 @@
<!-- 3. A Logo (Usa .container-title) -->
<div class="container-title">
<!-- Coloque sua nova logo aqui! -->
<img src="{{ Vite::asset('resources/images/logo-ingline.svg') }}" alt="Ingline Logo" class="h-10">
<img src="{{ Vite::asset('resources/images/logo.png') }}" alt="Ingline Logo" class="h-10">
<!-- (Ajuste o src e o h-10 se necessário) -->
</div>
<div class="container-message">
</div>
<!-- 4. Título (Usa .form-title) -->
<h1 class="form-title">
Efetue seu login
</h1>
<!-- 5. Mensagens de Sessão -->
<div class="messages">
<x-session-messages />
</div>
<x-session-messages />
<!-- 6. Grupo de Inputs (Usa .input-group, .form-label, .form-input-class) -->
<div class="input-group">

View File

@ -1,13 +1,12 @@
<?php
use App\Http\Controllers\AddClientController;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\UserController;
use App\Http\Controllers\CreateUserController;
use App\Http\Controllers\ClientController;
use App\Http\Controllers\LoginController;
use App\Http\Controllers\LogoutController;
use App\Livewire\Counter;
use App\Http\Controllers\CreateUserController;
use Illuminate\Support\Facades\Auth;
Route::middleware(['auth:sanctum'])->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');
});