- 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
46 lines
1.8 KiB
PHP
46 lines
1.8 KiB
PHP
@props(['id' => '', 'image' => '', 'title' => '', 'category' => '', 'impressions' => 0, 'likes' => 0, 'clicks' => 0, 'status' => false, 'external_link' => ''])
|
|
|
|
<x-ui.image-card :image="$image">
|
|
<div class="bg-white pt-8 p-4 h-full space-y-4 flex flex-col justify-between">
|
|
<div class="flex justify-between items-start">
|
|
|
|
<div class="flex items-start space-x-1 mr-2">
|
|
<p class="font-bold text-lg ">{{$title}}</p>
|
|
|
|
@if($external_link !== '')
|
|
<a href="{{$external_link}}" target="_blank" title="{{$external_link}}"
|
|
class="text-xs underline text-accent-601 mt-1">
|
|
<x-heroicon-o-arrow-top-right-on-square class="w-4 stroke-2 "/>
|
|
</a>
|
|
@endif
|
|
|
|
</div>
|
|
|
|
@if($status == 1)
|
|
<x-ui.badge title="Active"/>
|
|
@else
|
|
<x-ui.badge title="Pending" variant="ghost"/>
|
|
@endif
|
|
|
|
</div>
|
|
|
|
<div class="flex flex-col space-y-4">
|
|
<p class="text-accent-600">{{$category}}</p>
|
|
|
|
<x-dashboard.listing-stats :impression="$impressions" :likes="$likes" :clicks="$clicks"/>
|
|
|
|
<div class="flex justify-between space-x-4">
|
|
<x-ui.button :link="route('broker.deals.edit', $id)" class="w-full border border-accent-600/30"
|
|
icon="pencil-square">Edit
|
|
</x-ui.button>
|
|
<form class="w-full" onsubmit="return confirm('Are you sure to delete this ?')" method="post" action="{{route('broker.deals.destroy', $id)}}">
|
|
@csrf
|
|
@method("DELETE")
|
|
<x-ui.button variant="red" class="w-full" icon="trash" >Delete</x-ui.button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</x-ui.image-card>
|