Compare commits

..

No commits in common. "1222dceb9d75d12b583291faf34ee0209a63452d" and "5a02a8fd9eac54760ad8300ef77f99e64a81faeb" have entirely different histories.

6 changed files with 5 additions and 16 deletions

View File

@ -26,8 +26,6 @@ public function save(ClientService $clientService)
$data = $this->form->all(); $data = $this->form->all();
$data['name'] = $data['client_name']; $data['name'] = $data['client_name'];
dd($data);
if ($this->form->profile_image_path) { if ($this->form->profile_image_path) {
$path = $this->form->profile_image_path->store('client_logos', 'public'); $path = $this->form->profile_image_path->store('client_logos', 'public');
$data['profile_image_path'] = $path; $data['profile_image_path'] = $path;
@ -39,8 +37,6 @@ public function save(ClientService $clientService)
$this->dispatch('client-added'); $this->dispatch('client-added');
$this->dispatch('notify', message: $client->name . ' adicionado com sucesso!'); $this->dispatch('notify', message: $client->name . ' adicionado com sucesso!');
$this->form->reset();
} catch (\Exception $e) { } catch (\Exception $e) {
$this->dispatch('notify', message: 'Ocorreu um erro inesperado ao salvar. ' . $e->getMessage(), type: 'error'); $this->dispatch('notify', message: 'Ocorreu um erro inesperado ao salvar. ' . $e->getMessage(), type: 'error');
} }

View File

@ -54,7 +54,6 @@ public function edit(ClientService $clientService)
$this->dispatch('client-updated'); $this->dispatch('client-updated');
$this->dispatch('notify', message: $this->clientForm->client_name . ' atualizado com sucesso!'); $this->dispatch('notify', message: $this->clientForm->client_name . ' atualizado com sucesso!');
$this->clientForm->reset();
} catch (Exception $e) { } catch (Exception $e) {
$this->dispatch('notify', message: 'Falha na edição: ' . $e->getMessage(), type: 'error'); $this->dispatch('notify', message: 'Falha na edição: ' . $e->getMessage(), type: 'error');
} }

View File

@ -43,7 +43,6 @@ public function editUser(UserService $userService)
$this->dispatch('user-updated'); $this->dispatch('user-updated');
$this->dispatch('notify', message: $this->userForm->name . ' atualizado com sucesso!'); $this->dispatch('notify', message: $this->userForm->name . ' atualizado com sucesso!');
$this->userForm->reset();
} catch (\Exception $e) { } catch (\Exception $e) {
$this->dispatch('notify', message: 'Falha na edição: ' . $e->getMessage(), type: 'error'); $this->dispatch('notify', message: 'Falha na edição: ' . $e->getMessage(), type: 'error');
// $this->addError('general', $e->getMessage()); // $this->addError('general', $e->getMessage());

View File

@ -4,8 +4,7 @@
<div x-on:click.outside="showUsers = false" x-show="showUsers" x-transition:enter="transition-enter" <div x-on:click.outside="showUsers = false" x-show="showUsers" x-transition:enter="transition-enter"
x-transition:enter-start="transition-enter-start" x-transition:enter-end="transition-enter-end" x-transition:enter-start="transition-enter-start" x-transition:enter-end="transition-enter-end"
x-transition:leave="transition-leave" x-transition:leave-start="transition-leave-start" x-transition:leave="transition-leave" x-transition:leave-start="transition-leave-start"
x-transition:leave-end="transition-leave-end" x-on:keydown.escape.window="showUsers = false" x-transition:leave-end="transition-leave-end" class="modal-container w-full max-w-2xl">
class="modal-container w-full max-w-2xl">
<h3 class="modal-title">Usuários Cadastrados no Nexus</h3> <h3 class="modal-title">Usuários Cadastrados no Nexus</h3>
<div class="user-list-content"> <div class="user-list-content">

View File

@ -6,8 +6,7 @@
<div x-on:click.outside="showModal = false" x-show="showModal" x-transition:enter="transition-enter" <div x-on:click.outside="showModal = false" x-show="showModal" x-transition:enter="transition-enter"
x-transition:enter-start="transition-enter-start" x-transition:enter-end="transition-enter-end" x-transition:enter-start="transition-enter-start" x-transition:enter-end="transition-enter-end"
x-transition:leave="transition-leave" x-transition:leave-start="transition-leave-start" x-transition:leave="transition-leave" x-transition:leave-start="transition-leave-start"
x-transition:leave-end="transition-leave-end" x-on:keydown.escape.window="showModal = false" x-transition:leave-end="transition-leave-end" class="modal-container">
class="modal-container">
<h3 class="modal-title">Novo Usuário Nexus</h3> <h3 class="modal-title">Novo Usuário Nexus</h3>
@ -66,8 +65,7 @@ class="modal-container">
<div x-show="open" x-transition style="display: none;" class="select-options"> <div x-show="open" x-transition style="display: none;" class="select-options">
<div x-on:click="selected = 'user'; open = false" class="select-option" <div x-on:click="selected = 'user'; open = false" class="select-option"
:class="{ 'selected-option': selected == 'user' }"> :class="{ 'selected-option': selected == 'user' }">
<span class="option-label" <span class="option-label" :class="{ 'font-semibold': selected == 'user' }">Usuário</span>
:class="{ 'font-semibold': selected == 'user' }">Usuário</span>
<span x-show="selected == 'user'" <span x-show="selected == 'user'"
class="absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600"> class="absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600">
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" <svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"
@ -81,8 +79,7 @@ class="absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600">
<div x-on:click="selected = 'admin'; open = false" class="select-option" <div x-on:click="selected = 'admin'; open = false" class="select-option"
:class="{ 'selected-option': selected == 'admin' }"> :class="{ 'selected-option': selected == 'admin' }">
<span class="option-label" <span class="option-label" :class="{ 'font-semibold': selected == 'admin' }">Admin</span>
:class="{ 'font-semibold': selected == 'admin' }">Admin</span>
<span x-show="selected == 'admin'" <span x-show="selected == 'admin'"
class="absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600"> class="absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600">
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" <svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"

View File

@ -7,8 +7,7 @@
<div x-on:click.outside="showModalUpdate = false" x-show="showModalUpdate" x-transition:enter="transition-enter" <div x-on:click.outside="showModalUpdate = false" x-show="showModalUpdate" x-transition:enter="transition-enter"
x-transition:enter-start="transition-enter-start" x-transition:enter-end="transition-enter-end" x-transition:enter-start="transition-enter-start" x-transition:enter-end="transition-enter-end"
x-transition:leave="transition-leave" x-transition:leave-start="transition-leave-start" x-transition:leave="transition-leave" x-transition:leave-start="transition-leave-start"
x-transition:leave-end="transition-leave-end" x-on:keydown.escape.window="showModalUpdate = false" x-transition:leave-end="transition-leave-end" class="modal-container">
class="modal-container">
<h3 class="modal-title">Novo Usuário Nexus</h3> <h3 class="modal-title">Novo Usuário Nexus</h3>