?
@extends('layoutsdashboard.dashboard-design', [
'webtitle' => 'Property List',
])
@section('content')
<div class="section-userdata">
<div class="container py-2">
<div class="card shadow mt-4">
<div class="d-flex justify-content-between align-items-center mb-2">
<h2 class="card-title h4 mb-0">Property List</h2>
<a href="{{ route('properties.create') }}" class="btn btn-primary">Add New Property</a>
</div>
@if (session('success'))
<div class="alert alert-success">{{ session('success') }}</div>
@endif
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead>
<tr>
<th>Title</th>
<th>Category</th>
<th>Type</th>
<th width="30%">Location</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
@forelse ($properties as $property)
<tr>
<td>{{ $property->title }}</td>
<td>{{ $property->category }}</td>
<td>{{ $property->type }}</td>
<td>{{ $property->location }}</td>
<td>{{ $property->projectstatus }}%</td>
<td>
<a href="{{ route('properties.show', $property->id) }}"
class="btn btn-sm btn-info text-white me-2"><i class=" bi bi-eye"></i></a>
<a href="{{ route('properties.edit', $property->id) }}" class="btn btn-sm btn-info text-white me-2"><i class="bi bi bi-pencil-square"></i></a>
<button type="button" class="btn btn-sm btn-info text-white me-2" data-bs-toggle="modal"
data-bs-target="#imageManagerModal{{ $property->id }}">
<i class="bi bi-card-image"></i>
</button>
@include('properties.image-modal', ['property' => $property])
<form action="{{ route('properties.destroy', $property->id) }}" method="POST"
class="d-inline">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-sm btn-info text-white"
onclick="return confirm('Are you sure you want to delete this property?');"><i class="bi bi-trash"></i></button>
</form>
</td>
</tr>
@empty
<tr>
<td colspan="6" class="text-center">No properties found.</td>
</tr>
@endforelse
</tbody>
</table>
{{--
@foreach ($properties as $property)
@endforeach --}}
</div></div></div></div>
@stop