1010use Domain \Timelog \Actions \CreateTimelogAction ;
1111use Illuminate \Contracts \View \View ;
1212use Livewire \Component ;
13- use Support \Helpers \Concerns \UseNotice ;
13+ use Support \Toastify \Enums \ToastType ;
14+ use Support \Toastify \Toast ;
1415
1516class CardComponent extends Component
1617{
17- use UseNotice ;
18+ use Toast ;
1819
1920 public Card $ card ;
2021
@@ -37,7 +38,7 @@ public function start(): void
3738
3839 $ this ->refreshCard ($ currentCard );
3940 $ this ->dispatch ('task.started ' );
40- $ this ->success ('Task started successfully. ' );
41+ $ this ->toast ('Task started successfully. ' , type: ToastType::Success );
4142 $ this ->toggleFavicon (true );
4243 }
4344
@@ -51,7 +52,7 @@ public function stop(): void
5152
5253 $ this ->refreshCard ($ currentCard );
5354 $ this ->dispatch ('task.stoped ' );
54- $ this ->success ('Task Stoped successfully. ' );
55+ $ this ->toast ('Task Stoped successfully. ' , type: ToastType::Success );
5556 $ this ->toggleFavicon (false );
5657 }
5758
@@ -60,7 +61,7 @@ public function archive(): void
6061 $ this ->card ->update (['archived ' => true ]);
6162
6263 $ this ->dispatch ("bucket- {$ this ->card ->bucket_id }-updated " );
63- $ this ->success ('Task Archived successfully. ' );
64+ $ this ->toast ('Task Archived successfully. ' , type: ToastType::Success );
6465 }
6566
6667 private function toggleFavicon (bool $ value ): void
@@ -75,7 +76,7 @@ public function delete(): void
7576 $ this ->card ->delete ();
7677
7778 $ this ->dispatch ("bucket- $ bucketId-updated " );
78- $ this ->success ('Task Deleted successfully. ' );
79+ $ this ->toast ('Task Deleted successfully. ' , type: ToastType::Success );
7980 }
8081
8182 public function render (): View
0 commit comments