kusowl ccb5a2ed5e refactor: consolidate alert components and improve functionality
- replaced `alert-error` and `alert-success` components with a single reusable `alert` component
- added JS functionality for dismissible alerts
- updated related views to use the new `alert` component
- adjusted broker profile logic to display initials and verification status dynamically
- refactored morph relations from `type` to `role`
- enhanced image preview behavior for file inputs
- made broker migration fields nullable and added safeguards against registration errors
- Added confirmation when a user wants delete deal
- Add dynamic initials for user profile picture
- make image file name non-overidding with timestamp
2026-01-14 12:19:20 +05:30

63 lines
3.1 KiB
PHP

<x-layout title="Profile">
<x-dashboard.page-heading
title="Broker Profile"
description="Public profile information"
:back-link="route('broker.dashboard')"
>
<x-slot:end>
<x-ui.button :link="route('broker.profile.edit', auth()->user()->id)" class="border border-accent-600/40">
Edit Profile
</x-ui.button>
</x-slot:end>
</x-dashboard.page-heading>
<div class="flex items-center justify-center">
<div class="flex items-center justify-center mt-8 max-w-10/12">
<x-dashboard.card>
<div class="grid grid-cols-8 gap-6">
<div class="col-span-8 place-self-start md:col-span-1 flex items-center justify-center w-full">
<div class="w-25 h-25 rounded-xl bg-linear-150 from-[#305afc] to-[#941dfb] text-5xl text-white flex justify-center items-center">
{{$initials}}
</div>
</div>
<div class="col-span-8 md:col-span-7 flex flex-col space-y-6">
<div class="">
<p class="text-3xl font-bold">{{$name ?? 'Name'}}</p>
<div class="flex space-x-1 mt-2">
<x-ui.button-sm variant="neutral">{{$verified ? 'Verified Broker' : 'Not Verified'}}</x-ui.button-sm>
<x-heroicon-s-star class="ml-2 w-4 fill-amber-300"/>
<p>4.8</p>
</div>
</div>
<div class="">
<p>{{$bio ?? 'Bio is empty'}}</p>
</div>
<div class="grid grid-cols-2 grid-rows-2 gap-3">
<div class="fill-accent-600/70 text-accent-600/70 flex space-x-4 text-sm items-center">
<x-heroicon-o-envelope class="w-4" />
<p>{{$email ?? 'email is empty'}}</p>
</div>
<div class="fill-accent-600/70 text-accent-600/70 flex space-x-4 text-sm items-center">
<x-heroicon-o-phone class="w-4" />
<p>{{$phone ?? 'phone is empty'}}</p>
</div>
<div class="fill-accent-600/70 text-accent-600/70 flex space-x-4 text-sm items-center">
<x-heroicon-o-map class="w-4" />
<p>{{$location ?? 'location is empty'}}</p>
</div>
<div class="fill-accent-600/70 text-accent-600/70 flex space-x-4 text-sm items-center">
<x-heroicon-o-arrow-trending-up class="w-4" />
<p>Joined {{$joinDate ?? 'date is empty'}}</p>
</div>
</div>
</div>
</div>
</x-dashboard.card>
</div>
</div>
</x-layout>