MIF_E31220412/resources/views/layouts/customer.blade.php

89 lines
4.4 KiB
PHP

<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@yield('title', 'INUFA Customer')</title>
<script src="https://cdn.tailwindcss.com"></script>
@stack('styles')
</head>
<body class="bg-gray-50">
<div class="flex h-screen">
<!-- Customer Sidebar -->
<div class="w-64 h-full bg-white shadow-md">
<!-- Logo -->
<div class="p-4 flex justify-center">
<img src="{{ asset('assets/images/logo.png') }}" alt="INUFA Logo" class="w-28 h-28 object-contain">
</div>
<!-- Customer Menu -->
<nav class="mt-4">
<a href="{{ route('customer.dashboard') }}" class="block py-3 px-4 text-gray-800 font-semibold mb-1 hover:bg-gray-100 {{ request()->routeIs('customer.dashboard') ? 'bg-blue-800 text-white' : '' }}">
Dashboard
</a>
<a href="{{ route('sewa.index') }}" class="block py-3 px-4 text-gray-800 font-semibold mb-1 hover:bg-gray-100 {{ request()->routeIs('sewa.*') ? 'bg-blue-800 text-white' : '' }}">
Sewa Paket
</a>
<a href="{{ route('riwayat') }}" class="block py-3 px-4 text-gray-800 font-semibold mb-1 hover:bg-gray-100 {{ request()->routeIs('riwayat') ? 'bg-blue-800 text-white' : '' }}">
Riwayat Sewa
</a>
<a href="{{ route('profile.index') }}" class="block py-3 px-4 text-gray-800 font-semibold mb-1 hover:bg-gray-100 {{ request()->routeIs('profile.index') ? 'bg-blue-800 text-white' : '' }}">
Profil Saya
</a>
</nav>
</div>
<!-- Main Content -->
<div class="flex-1 flex flex-col">
<!-- Header -->
<header class="bg-white shadow-sm py-4 px-6 flex justify-between items-center">
<div class="flex space-x-8">
<h1 class="text-xl font-bold text-gray-800">@yield('header', 'Customer Dashboard')</h1>
</div>
<div class="flex items-center space-x-4">
<a href="{{ route('profile.index') }}" class="font-semibold text-gray-600 flex items-center space-x-2">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z" clip-rule="evenodd" />
</svg>
<span>Profile</span>
</a>
<form action="{{ route('logout') }}" method="POST" class="inline">
@csrf
<button type="submit" class="font-semibold text-gray-600 flex items-center space-x-2 hover:text-gray-800">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M3 3a1 1 0 00-1 1v12a1 1 0 102 0V4a1 1 0 00-1-1zm10.293 9.293a1 1 0 001.414 1.414l3-3a1 1 0 000-1.414l-3-3a1 1 0 10-1.414 1.414L14.586 9H7a1 1 0 100 2h7.586l-1.293 1.293z" clip-rule="evenodd" />
</svg>
<span>Logout</span>
</button>
</form>
</div>
</header>
<!-- Content -->
<main class="flex-1 p-6 bg-gray-50 overflow-auto">
@if(session('success'))
<div class="bg-green-100 border-l-4 border-green-500 text-green-700 p-4 mb-4 rounded" role="alert">
<p>{{ session('success') }}</p>
</div>
@endif
@if(session('warning'))
<div class="bg-yellow-100 border-l-4 border-yellow-500 text-yellow-700 p-4 mb-4 rounded" role="alert">
<p>{{ session('warning') }}</p>
</div>
@endif
@if(session('error'))
<div class="bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-4 rounded" role="alert">
<p>{{ session('error') }}</p>
</div>
@endif
@yield('content')
</main>
</div>
</div>
@stack('scripts')
</body>
</html>