Initial commit

This commit is contained in:
2025-11-20 23:21:05 +08:00
commit 13bc6db529
378 changed files with 54527 additions and 0 deletions

View File

@@ -0,0 +1,93 @@
<x-app-layout>
<x-slot name="header">
<h2 class="text-xl font-semibold leading-tight text-gray-800">
{{ __('Record payment for :name', ['name' => $member->full_name]) }}
</h2>
</x-slot>
<div class="py-12">
<div class="mx-auto max-w-3xl sm:px-6 lg:px-8">
<div class="bg-white shadow sm:rounded-lg">
<div class="px-4 py-5 sm:p-6">
<form method="POST" action="{{ route('admin.members.payments.store', $member) }}" class="space-y-6">
@csrf
<div>
<label for="paid_at" class="block text-sm font-medium text-gray-700">
{{ __('Paid at') }}
</label>
<input
type="date"
name="paid_at"
id="paid_at"
value="{{ old('paid_at', now()->toDateString()) }}"
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
required
>
@error('paid_at')
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
@enderror
</div>
<div>
<label for="amount" class="block text-sm font-medium text-gray-700">
{{ __('Amount') }}
</label>
<input
type="number"
step="0.01"
name="amount"
id="amount"
value="{{ old('amount') }}"
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
required
>
@error('amount')
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
@enderror
</div>
<div>
<label for="method" class="block text-sm font-medium text-gray-700">
{{ __('Method') }}
</label>
<input
type="text"
name="method"
id="method"
value="{{ old('method') }}"
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 sm:text-sm"
>
@error('method')
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
@enderror
</div>
<div>
<label for="reference" class="block text-sm font-medium text-gray-700">
{{ __('Reference') }}
</label>
<input
type="text"
name="reference"
id="reference"
value="{{ old('reference') }}"
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 sm:text-sm"
>
@error('reference')
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
@enderror
</div>
<div class="flex justify-end">
<button type="submit" class="inline-flex items-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">
{{ __('Save payment') }}
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</x-app-layout>

View File

@@ -0,0 +1,102 @@
<x-app-layout>
<x-slot name="header">
<h2 class="text-xl font-semibold leading-tight text-gray-800">
{{ __('Edit payment for :name', ['name' => $member->full_name]) }}
</h2>
</x-slot>
<div class="py-12">
<div class="mx-auto max-w-3xl sm:px-6 lg:px-8">
<div class="bg-white shadow sm:rounded-lg">
<div class="px-4 py-5 sm:p-6">
<form method="POST" action="{{ route('admin.members.payments.update', [$member, $payment]) }}" class="space-y-6">
@csrf
@method('PATCH')
<div>
<label for="paid_at" class="block text-sm font-medium text-gray-700">
{{ __('Paid at') }}
</label>
<input
type="date"
name="paid_at"
id="paid_at"
value="{{ old('paid_at', optional($payment->paid_at)->toDateString()) }}"
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
required
>
@error('paid_at')
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
@enderror
</div>
<div>
<label for="amount" class="block text-sm font-medium text-gray-700">
{{ __('Amount') }}
</label>
<input
type="number"
step="0.01"
name="amount"
id="amount"
value="{{ old('amount', $payment->amount) }}"
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
required
>
@error('amount')
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
@enderror
</div>
<div>
<label for="method" class="block text-sm font-medium text-gray-700">
{{ __('Method') }}
</label>
<input
type="text"
name="method"
id="method"
value="{{ old('method', $payment->method) }}"
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 sm:text-sm"
>
@error('method')
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
@enderror
</div>
<div>
<label for="reference" class="block text-sm font-medium text-gray-700">
{{ __('Reference') }}
</label>
<input
type="text"
name="reference"
id="reference"
value="{{ old('reference', $payment->reference) }}"
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 sm:text-sm"
>
@error('reference')
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
@enderror
</div>
<div class="flex justify-between">
<form method="POST" action="{{ route('admin.members.payments.destroy', [$member, $payment]) }}">
@csrf
@method('DELETE')
<button type="submit" class="inline-flex items-center rounded-md border border-red-300 bg-white px-4 py-2 text-sm font-medium text-red-700 hover:bg-red-50 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2">
{{ __('Delete') }}
</button>
</form>
<button type="submit" class="inline-flex items-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">
{{ __('Save changes') }}
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</x-app-layout>

View File

@@ -0,0 +1,161 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Payment Receipt #{{ $payment->id }}</title>
<style>
body {
font-family: Arial, sans-serif;
color: #333;
line-height: 1.6;
margin: 0;
padding: 20px;
}
.header {
text-align: center;
margin-bottom: 30px;
border-bottom: 2px solid #4F46E5;
padding-bottom: 20px;
}
.header h1 {
margin: 0;
color: #4F46E5;
font-size: 28px;
}
.header p {
margin: 5px 0;
color: #666;
}
.receipt-details {
margin: 30px 0;
}
.receipt-details table {
width: 100%;
border-collapse: collapse;
}
.receipt-details td {
padding: 10px;
border-bottom: 1px solid #eee;
}
.receipt-details td:first-child {
font-weight: bold;
width: 40%;
color: #555;
}
.amount-box {
background-color: #F0FDF4;
border: 2px solid #10B981;
border-radius: 8px;
padding: 20px;
margin: 30px 0;
text-align: center;
}
.amount-box .label {
font-size: 14px;
color: #666;
margin-bottom: 5px;
}
.amount-box .amount {
font-size: 36px;
font-weight: bold;
color: #10B981;
}
.footer {
margin-top: 50px;
padding-top: 20px;
border-top: 1px solid #eee;
text-align: center;
font-size: 12px;
color: #999;
}
.stamp {
margin-top: 40px;
text-align: right;
}
.stamp p {
margin: 5px 0;
font-size: 12px;
color: #666;
}
</style>
</head>
<body>
<div class="header">
<h1>PAYMENT RECEIPT</h1>
<p>Membership Payment Confirmation</p>
<p>Receipt #{{ $payment->id }}</p>
</div>
<div class="amount-box">
<div class="label">Amount Paid</div>
<div class="amount">${{ number_format($payment->amount, 2) }}</div>
</div>
<div class="receipt-details">
<table>
<tr>
<td>Payment Date:</td>
<td>{{ $payment->paid_at ? $payment->paid_at->format('F d, Y') : 'N/A' }}</td>
</tr>
<tr>
<td>Receipt Date:</td>
<td>{{ now()->format('F d, Y') }}</td>
</tr>
<tr>
<td>Payment Method:</td>
<td>{{ $payment->method ?? 'N/A' }}</td>
</tr>
@if($payment->reference)
<tr>
<td>Reference Number:</td>
<td>{{ $payment->reference }}</td>
</tr>
@endif
</table>
</div>
<div class="receipt-details">
<h3 style="color: #4F46E5; margin-bottom: 15px;">Member Information</h3>
<table>
<tr>
<td>Name:</td>
<td>{{ $member->full_name }}</td>
</tr>
<tr>
<td>Email:</td>
<td>{{ $member->email }}</td>
</tr>
@if($member->phone)
<tr>
<td>Phone:</td>
<td>{{ $member->phone }}</td>
</tr>
@endif
@if($member->membership_started_at)
<tr>
<td>Membership Start:</td>
<td>{{ $member->membership_started_at->format('F d, Y') }}</td>
</tr>
@endif
@if($member->membership_expires_at)
<tr>
<td>Membership Expires:</td>
<td>{{ $member->membership_expires_at->format('F d, Y') }}</td>
</tr>
@endif
</table>
</div>
<div class="stamp">
<p><strong>Issued by:</strong> {{ config('app.name') }}</p>
<p><strong>Date:</strong> {{ now()->format('F d, Y \a\t H:i') }}</p>
</div>
<div class="footer">
<p>This is an official receipt for membership payment.</p>
<p>Please keep this receipt for your records.</p>
<p>For questions or concerns, please contact the membership office.</p>
</div>
</body>
</html>