Implement dark mode, bug report page, and schema dump

This commit is contained in:
2025-11-27 15:06:45 +08:00
parent 13bc6db529
commit 83602b1ed1
91 changed files with 1078 additions and 2291 deletions

View File

@@ -9,6 +9,7 @@ use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\Storage;
use Spatie\Permission\Models\Permission;
use Spatie\Permission\Models\Role;
use Tests\TestCase;
@@ -29,12 +30,22 @@ class PaymentOrderWorkflowTest extends TestCase
{
parent::setUp();
Role::create(['name' => 'finance_accountant']);
Role::create(['name' => 'finance_cashier']);
$this->withoutMiddleware([\App\Http\Middleware\EnsureUserIsAdmin::class]);
Permission::findOrCreate('create_payment_order', 'web');
Permission::findOrCreate('view_payment_orders', 'web');
Permission::findOrCreate('verify_payment_order', 'web');
Permission::findOrCreate('execute_payment', 'web');
Role::firstOrCreate(['name' => 'admin']);
Role::firstOrCreate(['name' => 'finance_accountant']);
Role::firstOrCreate(['name' => 'finance_cashier']);
$this->accountant = User::factory()->create(['email' => 'accountant@test.com']);
$this->cashier = User::factory()->create(['email' => 'cashier@test.com']);
$this->accountant->assignRole('admin');
$this->cashier->assignRole('admin');
$this->accountant->assignRole('finance_accountant');
$this->cashier->assignRole('finance_cashier');