Refactor tags functionality and improve user experience

This commit is contained in:
Andras Bacsai 2024-02-03 12:44:18 +01:00
parent 0b5baf60a5
commit 1d3b7ffd3b
2 changed files with 2 additions and 1 deletions

View File

@ -54,6 +54,7 @@ public function deleteTag(string $id)
public function refresh()
{
$this->resource->load(['tags']);
$this->tags = Tag::ownedByCurrentTeam()->get();
$this->new_tag = null;
}
public function submit()

View File

@ -24,7 +24,7 @@ class="inline-block w-3 h-3 rounded cursor-pointer stroke-current hover:bg-red-5
</form>
@if ($tags->count() > 0)
<h3 class="pt-4">Already defined tags</h3>
<div>Click to quickly add</div>
<div>Click to quickly add one.</div>
<div class="flex gap-2 pt-4">
@foreach ($tags as $tag)
<x-forms.button wire:click="addTag('{{ $tag->id }}','{{ $tag->name }}')">