Initial commit
This commit is contained in:
67
resources/views/dashboard/details.blade.php
Normal file
67
resources/views/dashboard/details.blade.php
Normal file
@@ -0,0 +1,67 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container mt-4">
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<div>
|
||||
<h2>{{ $service->name }} — Subscriber Log</h2>
|
||||
<p class="text-muted mb-0">Schema Type: {{ strtoupper($service->schema_type) }} | Last Synced: {{ $service->last_synced_at ?? 'Never' }}</p>
|
||||
</div>
|
||||
<a href="{{ route('dashboard.index') }}" class="btn btn-outline-secondary">Back to Dashboard</a>
|
||||
</div>
|
||||
|
||||
<!-- Search Bar -->
|
||||
<form method="GET" action="{{ route('services.details', $service->id) }}" class="mb-4">
|
||||
<div class="input-group">
|
||||
<input type="text" name="search" class="form-control" placeholder="Search by phone number, content etc..." value="{{ request('search') }}">
|
||||
<button class="btn btn-primary" type="submit">Search</button>
|
||||
@if(request('search'))
|
||||
<a href="{{ route('services.details', $service->id) }}" class="btn btn-outline-dark">Reset</a>
|
||||
@endif
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- Subscribers Table -->
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body p-0">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover mb-0 align-middle">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>Phone Number</th>
|
||||
<th>Subscribed Content</th>
|
||||
<th>Status</th>
|
||||
<th>Join Date</th>
|
||||
<th>Last Synced</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse($subscribers as $sub)
|
||||
<tr>
|
||||
<td class="fw-bold">{{ $sub->phone_number }}</td>
|
||||
<td><span class="badge bg-info text-dark">{{ $sub->content_name }}</span></td>
|
||||
<td>
|
||||
<span class="badge {{ $sub->status === 'active' ? 'bg-success' : 'bg-danger' }}">
|
||||
{{ ucfirst($sub->status) }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ $sub->join_date ?? 'N/A' }}</td>
|
||||
<td class="text-muted small">{{ $sub->updated_at }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="5" class="text-center py-4 text-muted">No subscribers found.</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Pagination Links -->
|
||||
<div class="mt-4">
|
||||
{{ $subscribers->withQueryString()->links() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user