diff --git a/app/Http/Controllers/AddClientController.php b/app/Http/Controllers/AddClientController.php index b3e70c3..03eb091 100644 --- a/app/Http/Controllers/AddClientController.php +++ b/app/Http/Controllers/AddClientController.php @@ -2,9 +2,22 @@ namespace App\Http\Controllers; +use App\Services\ClientService; use Illuminate\Http\Request; class AddClientController extends Controller { - // + + private ClientService $clientService; + public function __construct(ClientService $clientService) + { + $this->clientService = $clientService; + } + + + public function addClient(Request $request) + { + + dd($this->clientService); + } } diff --git a/app/Models/Client.php b/app/Models/Client.php index 36bf29e..8ca4daf 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -2,9 +2,52 @@ namespace App\Models; +// 1. Importe o Trait +use Illuminate\Database\Eloquent\Concerns\HasUuids; +use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\SoftDeletes; class Client extends Model { - // + // 2. Use o Trait + use HasFactory, SoftDeletes, HasUuids; + + /** + * Os atributos que podem ser preenchidos em massa. + * + * @var array + */ + protected $fillable = [ + 'name', + 'legal_name', + 'cnpj', + 'profile_image_path', + 'pbx_hosting', + 'activation_date', + 'carrier', + 'access_type', + 'server_ip', + 'root_password', // Lembre-se de criptografar isso! + 'has_call_center', + 'has_voice_gateway', + 'has_fop2', + 'modules', + 'whatsapp_number', + 'whatsapp_activation_date', + ]; + + /** + * Os atributos que devem ser convertidos para tipos nativos. + * + * @var array + */ + protected $casts = [ + 'modules' => 'array', + 'has_call_center' => 'boolean', + 'has_voice_gateway' => 'boolean', + 'has_fop2' => 'boolean', + 'activation_date' => 'date', + 'whatsapp_activation_date' => 'date', + ]; } diff --git a/app/Providers/ClientServiceProvider.php b/app/Providers/ClientServiceProvider.php new file mode 100644 index 0000000..126bff3 --- /dev/null +++ b/app/Providers/ClientServiceProvider.php @@ -0,0 +1,29 @@ +app->bind(ClientService::class, function (Application $app) { + return new ClientService($app->make(Client::class)); + }); + } + + /** + * Bootstrap services. + */ + public function boot(): void + { + // + } +} diff --git a/app/Services/ClientService.php b/app/Services/ClientService.php new file mode 100644 index 0000000..0437a5e --- /dev/null +++ b/app/Services/ClientService.php @@ -0,0 +1,14 @@ +id() para $table->uuid() + $table->uuid('id')->primary(); + + // Informações de Cadastro + $table->string('name'); + $table->string('legal_name'); + $table->string('cnpj')->unique()->nullable(); + + // 2. Adicionado o path da imagem + $table->string('profile_image_path')->nullable(); // "path da imagem do cliente" + + // Informações Técnicas + $table->string('pbx_hosting')->nullable(); + $table->date('activation_date')->nullable(); + $table->string('carrier')->nullable(); + $table->string('access_type')->nullable(); + $table->ipAddress('server_ip')->nullable(); + $table->text('root_password')->nullable(); + + // Módulos e Features + $table->boolean('has_call_center')->default(false); + $table->boolean('has_voice_gateway')->default(false); + $table->boolean('has_fop2')->default(false); + + // Módulos + $table->json('modules')->nullable(); + $table->string('whatsapp_number')->nullable(); + $table->date('whatsapp_activation_date')->nullable(); + + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('clients'); + } +}; \ No newline at end of file diff --git a/resources/css/app.css b/resources/css/app.css index 393dac7..f7cb2c4 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -17,8 +17,8 @@ @layer components { body { @apply bg-white h-screen w-screen; background-image: url('../images/bg-primary.png'); - @apply bg-cover bg-center; - @apply overflow-y-hidden; + @apply bg-cover bg-center bg-fixed; + @apply overflow-y-auto overflow-x-hidden; } /*End body */ @@ -27,10 +27,42 @@ @layer components { .nav-bar { @apply flex flex-nowrap justify-center items-center mx-auto px-4 sm:px-6 lg:px-8 h-10; @apply relative; - /* Colors */ - @apply bg-white text-black; - /* Border */ - @apply border-b border-white shadow-md shadow-blue-400; + @apply bg-transparent text-black; + @apply fixed z-50 w-full; + + /* 1. ADICIONADO: A borda agora mora aqui */ + @apply border-b; + + /* 2. ESTADO BASE (Topo): A borda começa transparente */ + @apply border-transparent; + + /* 3. ADICIONADO: Também transiciona a cor da borda */ + @apply transition-colors duration-700 ease-in-out; + } + + .nav-bar::before { + content: ''; + @apply absolute top-0 left-0 w-full h-full; + + /* 2. ESTADO BASE (Topo): Fundo e Sombra */ + @apply bg-white; + @apply shadow-md shadow-blue-400; + /* 4. REMOVIDO: As classes 'border-b border-white' saíram daqui */ + + /* 3. TRANSIÇÃO (Correto) */ + @apply transition-all duration-700 ease-in-out; + + @apply -z-10; + } + + + .navbar-scrolled { + @apply border-white shadow-md; + } + + .navbar-scrolled::before { + @apply opacity-0; + @apply shadow-none; } .nav-bar>.navbar-items>a:hover, @@ -53,11 +85,13 @@ @layer components { .profile-menu { @apply absolute right-5; + @apply rounded-xl; + @apply max-w-7 max-h-7; } .profile-list-items { /* 1. Posicionamento (Correto) */ - @apply absolute top-full right-0 ml-4; + @apply absolute top-full right-0 ml-4 mt-2; @apply block w-full; /* Adicionei mt-2 para descolar do ícone */ @@ -122,7 +156,8 @@ @layer components { } .container { - @apply flex flex-col justify-center items-center w-full h-full mx-auto px-4 sm:px-6 lg:px-8; + /* Deixe APENAS as classes de largura, margem e padding */ + @apply w-full mx-auto px-4 sm:px-6 lg:px-8 mt-10 mb-10; } .form-class { @@ -141,4 +176,70 @@ @layer components { .container h1 { @apply text-2xl font-bold transition-all duration-300 transform hover:scale-105 mb-4; } + + /* Estilos para o card do cliente */ + /* CONTAINER PRINCIPAL DO CARD */ + .client-card { + /* Layout: Flex-col (vertical) */ + @apply flex flex-col justify-between; + @apply hover:transition duration-150 ease-in-out hover:scale-120; + + /* Estilo: Sombra, borda, fundo branco */ + @apply bg-white rounded-lg shadow-md hover:shadow-xl transition-shadow duration-300 ease-in-out; + @apply border border-gray-100; + + /* Garante que o conteúdo não vaze */ + @apply overflow-hidden; + } + + /* O "RETÂNGULO" SUPERIOR (Avatar + Opções) */ + .client-card-header { + /* 1. POSIÇÃO: 'relative' para ancorar o menu de opções */ + @apply relative; + + /* 2. LAYOUT: Centraliza o avatar */ + @apply flex justify-center items-center; + + /* 3. ESPAÇAMENTO: Padding interno */ + @apply p-6; + + /* 4. (Opcional) Fundo sutil para o retângulo */ + @apply bg-gray-50; + } + + /* AVATAR DO CLIENTE */ + .client-avatar { + /* A imagem interna já tem as classes de tamanho (w-32 h-32) */ + } + + /* MENU DE OPÇÕES (Três Pontinhos) */ + .client-options-menu { + /* 1. POSIÇÃO: Flutua sobre o header */ + @apply absolute top-4 right-4; + } + + .client-options-button { + @apply p-2 rounded-full hover:bg-gray-200 transition-colors; + @apply focus:outline-none focus:ring-2 focus:ring-blue-500; + } + + /* LISTA DE OPÇÕES (Dropdown) */ + .client-options-list { + @apply absolute right-0 mt-2 w-48 bg-white border border-gray-200 rounded-md shadow-lg py-1 z-10; + @apply divide-y divide-gray-100; + } + + .client-option-item { + @apply block px-4 py-2 text-sm text-gray-700 hover:bg-blue-100 hover:text-blue-800 transition-colors; + @apply cursor-pointer; + } + + + /* NOME DO CLIENTE (Área inferior) */ + .client-card-name { + @apply text-lg font-semibold text-gray-800 text-center; + + /* Espaçamento e uma borda sutil no topo */ + @apply p-4 border-t border-gray-100; + } } \ No newline at end of file diff --git a/resources/images/avanco.svg b/resources/images/avanco.svg new file mode 100644 index 0000000..8845ce6 --- /dev/null +++ b/resources/images/avanco.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/avatar-nexus.svg b/resources/images/avatar-nexus.svg index d398a0a..250e44b 100644 --- a/resources/images/avatar-nexus.svg +++ b/resources/images/avatar-nexus.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/resources/images/cabralesousa.svg b/resources/images/cabralesousa.svg new file mode 100644 index 0000000..21cd9a9 --- /dev/null +++ b/resources/images/cabralesousa.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/casadez.svg b/resources/images/casadez.svg new file mode 100644 index 0000000..5e646d6 --- /dev/null +++ b/resources/images/casadez.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/clinicaads.svg b/resources/images/clinicaads.svg new file mode 100644 index 0000000..8d2e970 --- /dev/null +++ b/resources/images/clinicaads.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/clivalemais.svg b/resources/images/clivalemais.svg new file mode 100644 index 0000000..7ac2610 --- /dev/null +++ b/resources/images/clivalemais.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/cmrpharma.svg b/resources/images/cmrpharma.svg new file mode 100644 index 0000000..7a2cf5d --- /dev/null +++ b/resources/images/cmrpharma.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/consef.svg b/resources/images/consef.svg new file mode 100644 index 0000000..ea5b74c --- /dev/null +++ b/resources/images/consef.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/curativos.svg b/resources/images/curativos.svg new file mode 100644 index 0000000..640a43b --- /dev/null +++ b/resources/images/curativos.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/grado.svg b/resources/images/grado.svg new file mode 100644 index 0000000..dcfea4c --- /dev/null +++ b/resources/images/grado.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/kivid.svg b/resources/images/kivid.svg new file mode 100644 index 0000000..0f77d50 --- /dev/null +++ b/resources/images/kivid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/maissaude.svg b/resources/images/maissaude.svg new file mode 100644 index 0000000..2298c47 --- /dev/null +++ b/resources/images/maissaude.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/mercante.svg b/resources/images/mercante.svg new file mode 100644 index 0000000..4f3ad97 --- /dev/null +++ b/resources/images/mercante.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/mr-distribuidora.svg b/resources/images/mr-distribuidora.svg new file mode 100644 index 0000000..30f2a9b --- /dev/null +++ b/resources/images/mr-distribuidora.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/oftalmocenter.svg b/resources/images/oftalmocenter.svg new file mode 100644 index 0000000..22e81ef --- /dev/null +++ b/resources/images/oftalmocenter.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/olharbem.svg b/resources/images/olharbem.svg new file mode 100644 index 0000000..f17e217 --- /dev/null +++ b/resources/images/olharbem.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/produs.svg b/resources/images/produs.svg new file mode 100644 index 0000000..41ebcca --- /dev/null +++ b/resources/images/produs.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index 91c081f..3ceabc0 100644 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -1,14 +1,391 @@ @extends('layouts.app') - @section('content')

Dashboard

- @foreach ($users as $user) -

{{ $user->name }}

- @endforeach +
+ +
+
+
+ Avatar do Cliente +
+
+ + + +
+
+
+ Cliente 1 +
+
+ +
+
+
+ Avatar do Cliente +
+
+ + + +
+
+
+ Cliente 2 +
+
+ +
+
+
+ Avatar do Cliente +
+
+ + + +
+
+
+ Cliente 3 +
+
+ +
+
+
+ Avatar do Cliente +
+
+ + + +
+
+
+ Cliente 4 +
+
+ +
+
+
+ Avatar do Cliente +
+
+ + + +
+
+
+ Cliente 4 +
+
+ +
+
+
+ Avatar do Cliente +
+
+ + + +
+
+
+ Cliente 4 +
+
+ +
+
+
+ Avatar do Cliente +
+
+ + + +
+
+
+ Cliente 4 +
+
+ +
+
+
+ Avatar do Cliente +
+
+ + + +
+
+
+ Cliente 4 +
+
+ +
+
+
+ Avatar do Cliente +
+
+ + + +
+
+
+ Cliente 4 +
+
+ +
+
+
+ Avatar do Cliente +
+
+ + + +
+
+
+ Cliente 4 +
+
+ +
+
+
+ Avatar do Cliente +
+
+ + + +
+
+
+ Cliente 4 +
+
+ +
+
+
+ Avatar do Cliente +
+
+ + + +
+
+
+ Cliente 4 +
+
+ +
+
+
+ Avatar do Cliente +
+
+ + + +
+
+
+ Cliente 4 +
+
+ +
+
+
+ Avatar do Cliente +
+
+ + + +
+
+
+ Cliente 4 +
+
+ +
@endsection \ No newline at end of file diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 2e237e9..1365cf2 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -15,7 +15,8 @@
-