Add membership fee system with disability discount and fix document permissions
Features: - Implement two fee types: entrance fee and annual fee (both NT$1,000) - Add 50% discount for disability certificate holders - Add disability certificate upload in member profile - Integrate disability verification into cashier approval workflow - Add membership fee settings in system admin Document permissions: - Fix hard-coded role logic in Document model - Use permission-based authorization instead of role checks Additional features: - Add announcements, general ledger, and trial balance modules - Add income management and accounting entries - Add comprehensive test suite with factories - Update UI translations to Traditional Chinese 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Http\Middleware\VerifyCsrfToken;
|
||||
use App\Mail\MembershipActivatedMail;
|
||||
use App\Mail\PaymentApprovedByAccountantMail;
|
||||
use App\Mail\PaymentApprovedByCashierMail;
|
||||
@@ -27,8 +28,7 @@ class PaymentVerificationTest extends TestCase
|
||||
{
|
||||
parent::setUp();
|
||||
Storage::fake('private');
|
||||
$this->artisan('db:seed', ['--class' => 'RoleSeeder']);
|
||||
$this->artisan('db:seed', ['--class' => 'PaymentVerificationRolesSeeder']);
|
||||
$this->artisan('db:seed', ['--class' => 'FinancialWorkflowPermissionsSeeder', '--force' => true]);
|
||||
}
|
||||
|
||||
public function test_member_can_submit_payment_with_receipt(): void
|
||||
@@ -43,7 +43,8 @@ class PaymentVerificationTest extends TestCase
|
||||
|
||||
$file = UploadedFile::fake()->image('receipt.jpg');
|
||||
|
||||
$response = $this->actingAs($user)->post(route('member.payments.store'), [
|
||||
$response = $this->withoutMiddleware(VerifyCsrfToken::class)
|
||||
->actingAs($user)->post(route('member.payments.store'), [
|
||||
'amount' => 1000,
|
||||
'paid_at' => now()->format('Y-m-d'),
|
||||
'payment_method' => MembershipPayment::METHOD_BANK_TRANSFER,
|
||||
@@ -388,7 +389,7 @@ class PaymentVerificationTest extends TestCase
|
||||
|
||||
public function test_dashboard_shows_correct_queues_based_on_permissions(): void
|
||||
{
|
||||
$admin = User::factory()->create(['is_admin' => true]);
|
||||
$admin = User::factory()->create();
|
||||
$admin->assignRole('admin');
|
||||
$admin->givePermissionTo('view_payment_verifications');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user