kusowl d62b6977c4 feat(user dashboard): add user-specific dashboard with deal listings
- Created a dedicated UserDashboardController to handle user-related logic.
- Added deal listing views and components for users, including action toolbars, broker contact, and stat badges.
- Refactored UI components to support new features like toggle buttons and improved input handling.
- Updated routes with a new prefix for user-related pathways, ensuring a better structure across dashboards.
2026-01-14 17:42:56 +05:30

65 lines
2.4 KiB
PHP

@php
$categories = [0 => ['name' => 'All Categories', 'value' => '0']];
@endphp
<x-layout title="Deals">
<x-dashboard.page-heading
title="Explore Deals"
description="Discover trusted recommendation"
>
<x-slot:end>
<form method="post" action="{{route('logout')}}">
@csrf
@method('delete')
<x-ui.button class="flex space-x-3 hover:bg-gray-100 hover:border-gray-300 hover:border">
<x-heroicon-o-arrow-right-start-on-rectangle class="w-4 stroke-2 mr-2"/>
<p class="hidden sm:block">Logout</p>
</x-ui.button>
</form>
</x-slot:end>
</x-dashboard.page-heading>
<section class="flex flex-col space-y-8 bg-[#F9FAFB] wrapper mt-2 pb-6">
<div>
@session('success')
<x-ui.alert variant="success">{{$value}}</x-ui.alert>
@endsession
@session('error')
<x-ui.alert variant="error">{{$value}}</x-ui.alert>
@endsession
</div>
<x-dashboard.card>
<div class="flex space-x-4">
<x-ui.input class="flex-1" name="search" placeholder="Search deals, services, places"/>
<x-ui.select name="category" :options="$categories" value-key="value" label-key="name" />
</div>
</x-dashboard.card>
<x-ui.toggle-button-group>
<x-ui.toggle-button active>
<a href="" class="flex items-center px-2 py-1 space-x-2">
<x-heroicon-o-clock class="w-4 stroke-2" />
<p class="font-bold">All Deals</p>
</a>
</x-ui.toggle-button>
<x-ui.toggle-button>
<a href="" class="flex items-center px-2 py-1 space-x-2">
<x-heroicon-o-arrow-trending-up class="w-4 stroke-2" />
<p class="font-bold">Most Liked</p>
</a>
</x-ui.toggle-button>
<x-ui.toggle-button>
<a href="" class="flex items-center px-2 py-1 space-x-2">
<x-heroicon-o-star class="w-4 stroke-2" />
<p class="font-bold">Most Clicked</p>
</a>
</x-ui.toggle-button>
</x-ui.toggle-button-group>
<x-dashboard.user.listing :deals="$deals" />
</section>
</x-layout>