Compare commits
8 Commits
0518c06ebe
...
9fdfe71909
| Author | SHA1 | Date |
|---|---|---|
|
|
9fdfe71909 | |
|
|
6a09be320c | |
|
|
ecebdc34f6 | |
|
|
df9dec2f4a | |
|
|
07bcb0a444 | |
|
|
b98e20329d | |
|
|
910a2603f1 | |
|
|
d4ad6c3346 |
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
namespace App\View\Components;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class SessionMessages extends Component
|
||||
{
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*/
|
||||
public function render(): View|Closure|string
|
||||
{
|
||||
return view('components.session-messages');
|
||||
}
|
||||
}
|
||||
|
|
@ -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([]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,17 @@ @layer utilities {
|
|||
|
||||
@layer components {
|
||||
|
||||
/* Estilos globais */
|
||||
/* body (Seu código, está correto) */
|
||||
body {
|
||||
@apply bg-white h-screen w-screen;
|
||||
background-image: url('../images/bg-primary.png');
|
||||
@apply bg-cover bg-center bg-fixed;
|
||||
@apply overflow-y-auto overflow-x-hidden;
|
||||
}
|
||||
|
||||
/*End body */
|
||||
|
||||
/* Estilos globais (Seu código) */
|
||||
h1 {
|
||||
@apply text-black font-semibold;
|
||||
@apply border-b border-blue-500 rounded-md shadow-md shadow-blue-400;
|
||||
|
|
@ -39,58 +49,142 @@ @layer components {
|
|||
|
||||
/* Fim estilos globais */
|
||||
|
||||
/* body */
|
||||
body {
|
||||
@apply bg-white h-screen w-screen;
|
||||
background-image: url('../images/bg-primary.png');
|
||||
@apply bg-cover bg-center bg-fixed;
|
||||
@apply overflow-y-auto overflow-x-hidden;
|
||||
|
||||
/* --- ESTILOS DO LOGIN REFORMULADOS --- */
|
||||
|
||||
/* 1. Container de Centralização */
|
||||
.container-form {
|
||||
@apply w-full min-h-screen mx-auto;
|
||||
/* Garante altura total */
|
||||
@apply flex justify-center items-center p-4;
|
||||
}
|
||||
|
||||
/*End body */
|
||||
/* 2. O Card de Login "Vidro Fosco" */
|
||||
.form-class {
|
||||
@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 rounded-xl shadow-2xl;
|
||||
@apply border border-white/10;
|
||||
/* Borda sutil */
|
||||
}
|
||||
|
||||
/* Container */
|
||||
/* 3. A Logo */
|
||||
.container-title {
|
||||
@apply text-2xl absolute top-20;
|
||||
@apply text-black font-semibold;
|
||||
@apply border-b border-blue-500 rounded-md shadow-md shadow-blue-400;
|
||||
@apply p-4 transition-all duration-300 transform hover:scale-105;
|
||||
@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 */
|
||||
}
|
||||
|
||||
/* 4. Título ("Efetue seu login") */
|
||||
.form-title {
|
||||
@apply text-2xl font-semibold text-black text-center mb-6;
|
||||
}
|
||||
|
||||
/* 5. Grupo de Input (Label + Campo) */
|
||||
.input-group {
|
||||
@apply mb-4;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
@apply block text-sm font-medium text-gray-800 mb-1;
|
||||
}
|
||||
|
||||
/* 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 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 transition-all duration-300;
|
||||
}
|
||||
|
||||
/* Remove o fundo de preenchimento automático do navegador */
|
||||
.form-input-class:-webkit-autofill {
|
||||
-webkit-text-fill-color: #0f0e0e !important;
|
||||
-webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.1) inset !important;
|
||||
transition: background-color 5000s ease-in-out 0s;
|
||||
}
|
||||
|
||||
|
||||
/* 7. Botão Principal */
|
||||
.form-button-class {
|
||||
@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;
|
||||
@apply hover:bg-blue-700;
|
||||
@apply transition-all duration-300 transform hover:scale-105;
|
||||
}
|
||||
|
||||
/* 8. Link "Esqueceu a senha" */
|
||||
.forget-password {
|
||||
@apply text-center mt-4;
|
||||
}
|
||||
|
||||
.forget-password a {
|
||||
@apply text-sm text-white/80 hover:text-white hover:underline;
|
||||
@apply transition-colors;
|
||||
}
|
||||
|
||||
/* 9. Estilizando as mensagens de erro (x-session-messages) */
|
||||
.messages {
|
||||
@apply flex justify-center mb-4;
|
||||
}
|
||||
|
||||
.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 */
|
||||
@apply w-full mx-auto px-4 sm:px-6 lg:px-8 mt-15 mb-10;
|
||||
}
|
||||
|
||||
.container-form {
|
||||
@apply w-full h-full mx-auto;
|
||||
@apply flex justify-center items-center;
|
||||
}
|
||||
|
||||
.messages {
|
||||
@apply flex justify-center;
|
||||
}
|
||||
|
||||
.form-class {
|
||||
@apply flex flex-col gap-4 p-3;
|
||||
@apply mb-10 w-1/5;
|
||||
}
|
||||
|
||||
.form-input-class {
|
||||
@apply border border-gray-300 rounded-md p-2 outline-none;
|
||||
}
|
||||
|
||||
.form-button-class {
|
||||
@apply bg-blue-500 text-white rounded-md p-2 cursor-pointer hover:bg-blue-800 w-1/2;
|
||||
}
|
||||
|
||||
.forget-password {
|
||||
@apply flex justify-center w-1/2;
|
||||
@apply shadow-lg rounded-md;
|
||||
@apply transition scale-80 hover:scale-95;
|
||||
}
|
||||
|
||||
.container h1 {
|
||||
@apply text-2xl font-bold transition-all duration-300 transform hover:scale-105 mb-4;
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
|
|
@ -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 = '';
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
<div>
|
||||
<div class="messages">
|
||||
|
||||
{{-- 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
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.bunny.net">
|
||||
<link rel="shortcut icon" href="{{ Vite::asset('resources/images/favicon.png') }}" type="image/x-icon">
|
||||
<link href="https://fonts.bunny.net/css?family=instrument-sans:400,500,600" rel="stylesheet" />
|
||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||
@livewireStyles
|
||||
|
|
@ -34,11 +35,11 @@
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<div x-data="{open: false}" x-on:click.outside="open = false" class="profile-menu">
|
||||
<div x-data="{open: false}" x-on:click.outside="open = false" class="profile-menu transition delay-150 duration-300 ease-in-out hover:-translate-y-1 hover:scale-100">
|
||||
|
||||
<a x-on:click="open = !open" class="cursor-pointer rounded-full overflow-hidden">
|
||||
|
||||
<img class="object-cover w-full h-full rounded-full"
|
||||
<img class="object-cover w-full h-full "
|
||||
src="{{ Vite::asset('resources/images/avatar-nexus.svg') }}" alt="Avatar">
|
||||
</a>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,45 +2,58 @@
|
|||
@section('title', 'Login')
|
||||
@section('content')
|
||||
|
||||
<!--
|
||||
1. Container principal que centraliza o card
|
||||
(Usa a classe .container-form do seu novo CSS)
|
||||
-->
|
||||
<div class="container-form">
|
||||
<div class="container-title">
|
||||
|
||||
</div>
|
||||
|
||||
<!--
|
||||
2. O Card de Login "Vidro Fosco"
|
||||
(Usa a classe .form-class do seu novo CSS)
|
||||
-->
|
||||
<form action="{{ route('login-post') }}" class="form-class" method="POST">
|
||||
|
||||
<div class="flex justify-center">
|
||||
<h1>Efetue seu login</h1>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="messages">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
{{ $errors->first() }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (session('error'))
|
||||
<div class="alert alert-danger">
|
||||
{{ session('error') }}
|
||||
</div>
|
||||
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@csrf
|
||||
<input class="form-input-class" type="email" name="email" placeholder="E-mail">
|
||||
<input class="form-input-class" type="password" name="password" placeholder="Senha">
|
||||
<div class="flex justify-center">
|
||||
|
||||
<!-- 3. A Logo (Usa .container-title) -->
|
||||
<div class="container-title">
|
||||
<!-- Coloque sua nova logo aqui! -->
|
||||
<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 -->
|
||||
<x-session-messages />
|
||||
|
||||
<!-- 6. Grupo de Inputs (Usa .input-group, .form-label, .form-input-class) -->
|
||||
<div class="input-group">
|
||||
<label for="email" class="form-label">E-mail</label>
|
||||
<input class="form-input-class" id="email" type="email" name="email" placeholder="seu@email.com" required>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<label for="password" class="form-label">Senha</label>
|
||||
<input class="form-input-class" id="password" type="password" name="password" placeholder="••••••••" required>
|
||||
</div>
|
||||
|
||||
<!-- 7. Botão de Login (Usa .form-button-class) -->
|
||||
<div class="mt-4">
|
||||
<button class="form-button-class" type="submit">Login</button>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-center">
|
||||
<!-- 8. Link de Senha (Usa .forget-password) -->
|
||||
<div class="forget-password">
|
||||
<a href="#">Esqueceu sua senha?</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,13 @@
|
|||
<?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 () {
|
||||
//Rotas LinePBX.
|
||||
|
|
@ -17,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');
|
||||
});
|
||||
|
|
@ -25,14 +23,13 @@
|
|||
Route::controller(LogoutController::class)->group(function () {
|
||||
Route::post('/logout', [LogoutController::class, 'logout'])->name('logout');
|
||||
});
|
||||
|
||||
// Route::get('/add-client', function () {
|
||||
// return view('clients.add-client');
|
||||
// })->name('clients.add')->middleware('authorization');
|
||||
});
|
||||
|
||||
Route::controller(LoginController::class)->group(function () {
|
||||
Route::get('/login', function () {
|
||||
if (Auth::check()) {
|
||||
return redirect('dashboard', 302);
|
||||
}
|
||||
return view('login');
|
||||
})->name('login');
|
||||
Route::post('/login', [LoginController::class, 'login'])->name('login-post');
|
||||
|
|
|
|||
Loading…
Reference in New Issue