Files
aroginhealthcare/Modules/Activity/resources/views/index.blade.php
2025-08-17 16:23:14 +05:45

132 lines
5.5 KiB
PHP

@extends('admin::layouts.master')
@section('title')
Activity
@endsection
@section('breadcrumb')
@php
$breadcrumbData = [
[
'title' => 'Activity',
'link' => 'null',
],
[
'title' => 'Dashboard',
'link' => route('dashboard'),
],
[
'title' => 'Activities',
'link' => null,
],
];
@endphp
@include('admin::layouts.partials.breadcrumb', $breadcrumbData)
@endsection
@section('content')
<!-- activities List Table -->
<div class="card">
<div class="row">
<div class="col-md-6">
<h4 class="card-header">List of Activity</h4>
</div>
<div class="col-md-6">
<div class="flex-column flex-md-row">
<div class="dt-action-buttons text-end pt-3 px-3">
<div class="dt-buttons btn-group flex-wrap">
<a href="{{ route('cms.activities.create') }}"
class="btn btn-secondary create-new btn-primary d-none d-sm-inline-block text-white">
<i class="bx bx-plus me-sm-1"></i>
Add New
</a>
</div>
</div>
</div>
</div>
</div>
<div class="card-datatable table-responsive">
<table class="datatables-users table border-top">
<thead class="table-light">
<tr>
<th>S.N</th>
<th>Image</th>
<th>Name</th>
<th>Created At</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody class="table-border-bottom-0">
@foreach ($activities ?? [] as $activity)
<tr>
<td>
#{{ $loop->iteration }}
</td>
<td>
<img class="object-fit-contain"
src="{{ asset($activity->image_path ? 'storage/uploads/' . $activity->image_path : 'backend/uploads/images/no-Image.jpg') }}"
alt="" srcset="" height="70" width="60">
</td>
<td>
{{ $activity->name }}
</td>
<td>
{{ $activity->created_at->toFormattedDateString() }}
</td>
<td>
<span <span
class="badge bg-label-{{ $activity->status == 'active' ? 'success' : 'danger' }}">
{{ $activity->status }}</span>
</td>
<td>
<div class="dropdown">
<button type="button" class="btn p-0 dropdown-toggle hide-arrow"
data-bs-toggle="dropdown">
<i class="bx bx-dots-vertical-rounded"></i>
</button>
<div class="dropdown-menu">
<a class="dropdown-item"
href="{{ route('cms.activities.edit', ['uuid' => $activity->uuid]) }}"><i
class="bx bx-edit-alt me-1"></i>
Edit</a>
{{-- <div class="dropdown-item btn-delete" data-name="[ {{ $activity->title }} ]"
data-action="{{ route('cms.activities.delete', ['uuid' => $activity->uuid]) }}">
<i class="bx bx-trash me-1"></i> Delete
</div> --}}
<form method="POST"
action="{{ route('cms.activities.delete', ['uuid' => $activity->uuid]) }}"
id="deleteForm_{{ $activity->uuid }}" class="dropdown-item">
@csrf
@method('DELETE')
<button type="submit" class="border-0 bg-transparent deleteBtn"
style="color:inherit"><i class="bx bx-trash me-1"></i>
Delete</button>
</form>
</div>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="px-3">
{{ $activities->links('admin::layouts.partials.pagination') }}
</div>
</div>
@endsection
{{-- style --}}
@push('required-styles')
@include('admin::vendor.dataTables.style')
@endpush
{{-- script --}}
@push('required-scripts')
@include('admin::vendor.dataTables.script')
@endpush