diff --git a/app/Livewire/Card/CardComponent.php b/app/Livewire/Card/CardComponent.php index 40a7afb..4575485 100644 --- a/app/Livewire/Card/CardComponent.php +++ b/app/Livewire/Card/CardComponent.php @@ -10,9 +10,12 @@ use Domain\Timelog\Actions\CreateTimelogAction; use Illuminate\Contracts\View\View; use Livewire\Component; +use Support\Helpers\Concerns\UseNotice; class CardComponent extends Component { + use UseNotice; + public Card $card; protected $listeners = [ @@ -30,6 +33,7 @@ public function start(): void } $this->refreshCard($currentCard); + $this->success('Task started successfully.'); } public function stop(): void @@ -41,6 +45,7 @@ public function stop(): void CreateTimelogAction::run($currentCard); $this->refreshCard($currentCard); + $this->success('Task Stoped successfully.'); } public function delete(): void @@ -50,6 +55,7 @@ public function delete(): void $this->card->delete(); $this->dispatch("bucket-$bucketId-updated"); + $this->success('Task Deleted successfully.'); } public function render(): View diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index 581face..9b9a38c 100644 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -8,3 +8,7 @@ window.addEventListener('refresh.preline.dropdown', () => { setTimeout(() => HSDropdown.autoInit(), 1000); }); + +window.addEventListener('notice.add', (event) => { + Livewire.dispatch('notice', event.detail[0]); +}); diff --git a/resources/views/components/icons/close.blade.php b/resources/views/components/icons/close.blade.php new file mode 100644 index 0000000..bd006d3 --- /dev/null +++ b/resources/views/components/icons/close.blade.php @@ -0,0 +1,3 @@ + diff --git a/resources/views/components/layouts/app.blade.php b/resources/views/components/layouts/app.blade.php index b153e13..9aa918e 100644 --- a/resources/views/components/layouts/app.blade.php +++ b/resources/views/components/layouts/app.blade.php @@ -20,7 +20,9 @@