54 lines
2.7 KiB
PHP
54 lines
2.7 KiB
PHP
<x-dashboard.admin.layout title="Customers">
|
|
<x-slot:heading>
|
|
<x-dashboard.page-heading
|
|
title="Manage Customers"
|
|
description="Edit, Delete and Login as Customer"
|
|
/>
|
|
</x-slot:heading>
|
|
<div class="flex items-center justify-center px-4 pb-4 pt-0 md:px-8 md:pb-8">
|
|
<x-dashboard.card class="w-full">
|
|
|
|
<h3 class="text-md font-bold mb-4">Customer details</h3>
|
|
<x-ui.table>
|
|
<x-ui.table.head>
|
|
<th>Name</th>
|
|
<th>Email</th>
|
|
<th>Location</th>
|
|
</x-ui.table.head>
|
|
|
|
@forelse($customers as $customer)
|
|
<x-ui.table.row>
|
|
<td class="text-sm px-4 text-center">{{$customer->user->name}}</td>
|
|
<td class="text-sm px-4 text-center">{{$customer->user->email}}</td>
|
|
<td class="text-sm px-4 text-center">{{$customer->location}}</td>
|
|
<x-slot:actions>
|
|
<div class="flex items-center justify-center space-x-5 py-1 px-2">
|
|
<x-ui.button-sm :link="route('admin.customers.edit', $customer)" variant="ghost">
|
|
<x-heroicon-o-pencil-square class="w-4"/>
|
|
</x-ui.button-sm>
|
|
<form action="{{route('admin.customers.destroy', $customer)}}"
|
|
onsubmit="return confirm('Are you sure to delete this ?')" method="post"
|
|
class=" h-full items-center flex justify-center">
|
|
@csrf
|
|
@method('DELETE')
|
|
<x-ui.button-sm variant="red">
|
|
<x-heroicon-o-trash class="w-4"/>
|
|
</x-ui.button-sm>
|
|
</form>
|
|
<x-ui.button-sm :link="route('impersonate', ['user' => $customer->user->id])"
|
|
variant="neutral">
|
|
<x-heroicon-o-camera class="w-4"/>
|
|
</x-ui.button-sm>
|
|
</div>
|
|
</x-slot:actions>
|
|
</x-ui.table.row>
|
|
@empty
|
|
<x-ui.table.row>
|
|
<td colspan="2" class="text-center text-sm text-accent-600 py-2">No Deals found</td>
|
|
</x-ui.table.row>
|
|
@endforelse
|
|
</x-ui.table>
|
|
</x-dashboard.card>
|
|
</div>
|
|
</x-dashboard.admin.layout>
|