using cloude sonet 3.5 i have used the prompt to create the migrations and their files and installed api package
This commit is contained in:
1 parent
f27b5abf02
commit
4a7353e3fc
23 files changed
+1871
-2
No files matched your search
@@ -0,0 +1,97 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container py-4">
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h1 class="mb-0">My Invoices</h1>
|
||||
</div>
|
||||
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header bg-white d-flex justify-content-between align-items-center">
|
||||
<h4 class="mb-0">All Invoices</h4>
|
||||
<div class="btn-group" role="group">
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="bi bi-funnel"></i> Filter
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><a class="dropdown-item" href="{{ route('invoices.index') }}">All</a></li>
|
||||
<li><a class="dropdown-item" href="{{ route('invoices.index', ['status' => 'pending']) }}">Pending</a></li>
|
||||
<li><a class="dropdown-item" href="{{ route('invoices.index', ['status' => 'paid']) }}">Paid</a></li>
|
||||
<li><a class="dropdown-item" href="{{ route('invoices.index', ['status' => 'overdue']) }}">Overdue</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if(session('success'))
|
||||
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||
{{ session('success') }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($invoices->count() > 0)
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Invoice #</th>
|
||||
<th>Student</th>
|
||||
<th>Club</th>
|
||||
<th>Amount</th>
|
||||
<th>Status</th>
|
||||
<th>Due Date</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($invoices as $invoice)
|
||||
<tr>
|
||||
<td>{{ $invoice->id }}</td>
|
||||
<td>{{ $invoice->student->full_name }}</td>
|
||||
<td>{{ $invoice->tenant->club_name }}</td>
|
||||
<td>${{ number_format($invoice->amount, 2) }}</td>
|
||||
<td>
|
||||
@if($invoice->status === 'paid')
|
||||
<span class="badge bg-success">Paid</span>
|
||||
@elseif($invoice->status === 'pending')
|
||||
<span class="badge bg-warning text-dark">Pending</span>
|
||||
@else
|
||||
<span class="badge bg-danger">Overdue</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $invoice->due_date->format('M j, Y') }}</td>
|
||||
<td>
|
||||
<div class="btn-group" role="group">
|
||||
<a href="{{ route('invoices.show', $invoice->id) }}" class="btn btn-sm btn-outline-primary">
|
||||
<i class="bi bi-eye"></i> View
|
||||
</a>
|
||||
@if($invoice->status !== 'paid')
|
||||
<a href="{{ route('invoices.pay', $invoice->id) }}" class="btn btn-sm btn-success">
|
||||
<i class="bi bi-credit-card"></i> Pay
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@else
|
||||
<div class="text-center py-5">
|
||||
<i class="bi bi-receipt" style="font-size: 3rem;"></i>
|
||||
<h4 class="mt-3">No Invoices Found</h4>
|
||||
<p class="text-muted">There are no invoices matching your criteria.</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@if($invoices->where('status', '!=', 'paid')->count() > 0)
|
||||
<div class="card-footer bg-white d-flex justify-content-end">
|
||||
<a href="{{ route('invoices.pay-all') }}" class="btn btn-success">
|
||||
<i class="bi bi-credit-card"></i> Pay All
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,100 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container py-4">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header bg-white d-flex justify-content-between align-items-center">
|
||||
<h4 class="mb-0">Invoice #{{ $invoice->id }}</h4>
|
||||
<a href="{{ route('invoices.index') }}" class="btn btn-outline-secondary btn-sm">
|
||||
<i class="bi bi-arrow-left"></i> Back to Invoices
|
||||
</a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if(session('success'))
|
||||
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||
{{ session('success') }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="row mb-4">
|
||||
<div class="col-md-6">
|
||||
<h5>Billed To</h5>
|
||||
<p class="mb-1">{{ Auth::user()->full_name }}</p>
|
||||
<p class="mb-1">{{ Auth::user()->email }}</p>
|
||||
@if(Auth::user()->mobile)
|
||||
<p class="mb-0">{{ Auth::user()->mobile }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-md-6 text-md-end">
|
||||
<h5>Invoice Details</h5>
|
||||
<p class="mb-1">Invoice #: {{ $invoice->id }}</p>
|
||||
<p class="mb-1">Due Date: {{ $invoice->due_date->format('F j, Y') }}</p>
|
||||
<p class="mb-0">
|
||||
Status:
|
||||
@if($invoice->status === 'paid')
|
||||
<span class="badge bg-success">Paid</span>
|
||||
@elseif($invoice->status === 'pending')
|
||||
<span class="badge bg-warning text-dark">Pending</span>
|
||||
@else
|
||||
<span class="badge bg-danger">Overdue</span>
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-4">
|
||||
<div class="col-md-6">
|
||||
<h5>Club Information</h5>
|
||||
<p class="mb-1">{{ $invoice->tenant->club_name }}</p>
|
||||
<p class="mb-0">{{ $invoice->tenant->owner->full_name }} (Owner)</p>
|
||||
</div>
|
||||
<div class="col-md-6 text-md-end">
|
||||
<h5>Student Information</h5>
|
||||
<p class="mb-1">{{ $invoice->student->full_name }}</p>
|
||||
<p class="mb-0">Age: {{ $invoice->student->age }} ({{ $invoice->student->life_stage }})</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive mb-4">
|
||||
<table class="table table-bordered">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>Description</th>
|
||||
<th class="text-end">Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Club Membership Fee - {{ $invoice->tenant->club_name }}</td>
|
||||
<td class="text-end">${{ number_format($invoice->amount, 2) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Total</th>
|
||||
<th class="text-end">${{ number_format($invoice->amount, 2) }}</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-end">
|
||||
@if($invoice->status !== 'paid')
|
||||
<a href="{{ route('invoices.pay', $invoice->id) }}" class="btn btn-success">
|
||||
<i class="bi bi-credit-card"></i> Pay Now
|
||||
</a>
|
||||
@else
|
||||
<button class="btn btn-outline-success" disabled>
|
||||
<i class="bi bi-check-circle"></i> Paid
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in new issue
Block a user