Skip to content

Commit

Permalink
fix validation
Browse files Browse the repository at this point in the history
  • Loading branch information
punkestu committed Nov 24, 2024
1 parent e2d1765 commit 0f4bb67
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Rotasi/PengajuanController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class PengajuanController extends Controller
public function inputView()
{
if (auth()->user()->role->name !== 'admin') {
if (!auth()->user()->profile->cabang_id) {
if (!auth()->user()->profile || !auth()->user()->profile->cabang_id) {
return redirect()->back();
}
$usersCabangs = Cabang::where('id', auth()->user()->profile->cabang_id)->get();
Expand Down
5 changes: 0 additions & 5 deletions resources/views/components/header.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ class="flex aspect-square border-2 rounded-full p-1 {{ $hasNotification ? 'borde
<path
d="M17.133 12.632v-1.8a5.406 5.406 0 0 0-4.154-5.262.955.955 0 0 0 .021-.106V3.1a1 1 0 0 0-2 0v2.364a.955.955 0 0 0 .021.106 5.406 5.406 0 0 0-4.154 5.262v1.8C6.867 15.018 5 15.614 5 16.807 5 17.4 5 18 5.538 18h12.924C19 18 19 17.4 19 16.807c0-1.193-1.867-1.789-1.867-4.175ZM8.823 19a3.453 3.453 0 0 0 6.354 0H8.823Z" />
</svg>
@if (auth()->user()->profile &&
auth()->user()->profile->cabang &&
auth()->user()->profile->cabang->notreadnotifications->count() > 0)
<p class="bg-blue-500 w-2 h-2 rounded-full"></p>
@endif
</a>
@endauth
</nav>
Expand Down

0 comments on commit 0f4bb67

Please sign in to comment.