added subscriber profile
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<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>
|
||||
<p class="text-muted mb-0">Last Synced: {{ $service->last_synced_at ?? 'Never' }}</p>
|
||||
</div>
|
||||
<a href="{{ route('dashboard.index') }}" class="btn btn-outline-secondary">Back to Dashboard</a>
|
||||
</div>
|
||||
@@ -38,7 +38,11 @@
|
||||
<tbody>
|
||||
@forelse($subscribers as $sub)
|
||||
<tr>
|
||||
<td class="fw-bold">{{ $sub->phone_number }}</td>
|
||||
<td>
|
||||
<a href="{{ route('services.subscriber.profile', [$service->id, $sub->phone_number]) }}" class="fw-bold text-decoration-none">
|
||||
{{ $sub->phone_number }}
|
||||
</a>
|
||||
</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' }}">
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<div class="spinner-border text-primary" role="status">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
<p class="text-muted mt-2">Aggregating cross-service metrics...</p>
|
||||
<p class="text-muted mt-2">Aggregating cross-db entries...</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
53
resources/views/dashboard/subscriber-profile.blade.php
Normal file
53
resources/views/dashboard/subscriber-profile.blade.php
Normal file
@@ -0,0 +1,53 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container mt-4">
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<div>
|
||||
<h2>Subscriber Profile</h2>
|
||||
<p class="text-muted mb-0">Service: <strong>{{ $service->name }}</strong> | MSISDN: <span class="text-primary fw-bold">{{ $msisdn }}</span></p>
|
||||
</div>
|
||||
<a href="{{ url()->previous() }}" class="btn btn-outline-secondary">Back</a>
|
||||
</div>
|
||||
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header bg-light">
|
||||
<h5 class="mb-0">Content Delivery Frequency</h5>
|
||||
</div>
|
||||
<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>Content Name</th>
|
||||
<th>Frequency (Times Received)</th>
|
||||
<th>Total Cost Incurred</th>
|
||||
<th>Last Received Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse($contentFrequency as $row)
|
||||
<tr>
|
||||
<td class="fw-bold">{{ $row->content }}</td>
|
||||
<td>
|
||||
<span class="badge bg-primary rounded-pill px-3 py-2">{{ $row->frequency }} deliveries</span>
|
||||
</td>
|
||||
<td>{{ number_format($row->total_spent, 2) }}</td>
|
||||
<td class="text-muted small">{{ $row->last_received }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="4" class="text-center py-4 text-muted">No content transaction history found for this subscriber.</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
{{ $contentFrequency->links() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user