From e858d8b34d138d7ecdd43f348f0dd73f1ab867c6 Mon Sep 17 00:00:00 2001 From: LukiBeg Date: Mon, 17 Nov 2025 17:26:47 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20Componentes=20para=20edi=C3=A7=C3=A3o?= =?UTF-8?q?=20dos=20clientes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Livewire/Admin/EditClient.php | 45 ++++ .../livewire/admin/edit-client.blade.php | 192 ++++++++++++++++++ 2 files changed, 237 insertions(+) create mode 100644 app/Livewire/Admin/EditClient.php create mode 100644 resources/views/livewire/admin/edit-client.blade.php diff --git a/app/Livewire/Admin/EditClient.php b/app/Livewire/Admin/EditClient.php new file mode 100644 index 0000000..0ac03ad --- /dev/null +++ b/app/Livewire/Admin/EditClient.php @@ -0,0 +1,45 @@ +client = Client::find($id); + + if ($this->client) { + $this->clientForm->addClient($this->client); + } + } catch (Exception $e) { + $this->dispatch('notify', message: 'Ocorreu um erro inesperado ao editar o cliente. ' + $e); + } + } + public function edit($clientId) + { + $this->clientForm->validate(); + + try { + $this->clientForm->updateClient($this->client); + $this->dispatch('notify', message: $this->client->client_name + ' atualizado com sucesso!'); + } catch (Exception $e) { + $this->dispatch('notify', message: 'Ocorreu um erro inesperado ao tentar confirmar edição do cliente. ' + $e); + } + } + public function render() + { + return view('livewire.admin.edit-client'); + } +} diff --git a/resources/views/livewire/admin/edit-client.blade.php b/resources/views/livewire/admin/edit-client.blade.php new file mode 100644 index 0000000..ae753fd --- /dev/null +++ b/resources/views/livewire/admin/edit-client.blade.php @@ -0,0 +1,192 @@ +
+ +
+ +
+
+ +
+ +
+
+

+ Edição de cliente +

+ +
+
+ +
+
+ +
+ +
+

Informações Principais

+ +
+
+ + + @error('form.client_name') {{ $message }} + @enderror +
+
+ + + @error('form.legal_name') {{ $message }} @enderror +
+
+
+ + + @error('form.cnpj') {{ $message }} + @enderror +
+
+ + + +
+ Enviando... +
+ @error('form.profile_image_path') {{ $message }} @enderror +
+
+ +
+ +
+

Detalhes do Servidor PBX

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + + @error('form.server_ip') {{ $message }} @enderror +
+
+ + +
+
+
+ +
+ +
+

WhatsApp

+
+
+ + +
+
+ + +
+
+
+
+
+
+
+

Módulos & Recursos

+
+ + + +
+
+ + + @error('form.modules') {{ $message }} + @enderror +
+
+
+
+
+
+
+
+ + + + +
+
+ +
+
+
+ + +
\ No newline at end of file