Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/Maestro-ESEO/Web-App into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Ortiix85 committed Jan 21, 2024
2 parents c25ea3e + 1b0d4b6 commit 7bae752
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions resources/views/components/sidebar/button.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,18 @@

@php
use App\Models\Task;
$selected = request()->path() == $href;
// Check if task is in the url
if (str_contains(request()->path(), 'task') && request()->route()->hasParameter('id')) {
$task = Task::find(request()->route()->parameter('id'));
if ($href == "project/".$task->project_id) {
$selected = true;
}
}
@endphp


Expand Down

0 comments on commit 7bae752

Please sign in to comment.