Skip to content

Commit

Permalink
fix: task counter
Browse files Browse the repository at this point in the history
  • Loading branch information
blt950 committed Oct 5, 2023
1 parent e48be89 commit 9596584
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions resources/views/layouts/sidebar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<a class="nav-link" href="{{ route('tasks') }}">
<i class="fas fa-fw fa-list"></i>
<span>Tasks</span>
@if(\Auth::user()->tasks->count())
<span class="badge text-bg-danger">{{ \Auth::user()->tasks->count() }}</span>
@if(\Auth::user()->tasks->where('status', \App\Helpers\TaskStatus::PENDING->value)->count())
<span class="badge text-bg-danger">{{ \Auth::user()->tasks->where('status', \App\Helpers\TaskStatus::PENDING->value)->count() }}</span>
@endif
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/layouts/topbar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
<li class="nav-item dropdown d-lg-none">
<button class="nav-link position-relative" id="sidebar-button">
<i class="fas fa-bars"></i>
@if(\Auth::user()->tasks->count())
@if(\Auth::user()->tasks->where('status', \App\Helpers\TaskStatus::PENDING->value)->count())
<span class="position-absolute top-40 start-75 translate-middle p-1 bg-danger border border-light rounded-circle">
<span class="visually-hidden">New alerts</span>
</span>
Expand Down

0 comments on commit 9596584

Please sign in to comment.