Refactor menu codes to remove 'onticket' prefix
- Updated route middleware and menu codes across various files to replace 'onticket.adminapp' with 'adminapp'. - Adjusted API routes for Ticketing, FiestaFutbolInfantil, and Desfile to reflect the new menu structure. - Modified database migrations to remove the 'onticket' prefix from existing menu codes. - Updated tests to align with the new menu code structure, ensuring compatibility and correctness.
This commit is contained in:
@@ -18,8 +18,8 @@ class TicketMenuAccessTest extends TestCase
|
||||
public static function menuAssignments(): array
|
||||
{
|
||||
return [
|
||||
'new code' => ['onticket.adminapp.tickets', 'current', false],
|
||||
'old code' => ['adminapp.tickets', 'current', true],
|
||||
'compatible code' => ['adminapp.tickets', 'current', true],
|
||||
'prefixed code' => ['onticket.adminapp.tickets', 'current', false],
|
||||
'another tenant' => ['adminapp.tickets', 'other', false],
|
||||
'unrelated menu' => ['adminapp.ventas', 'current', false],
|
||||
];
|
||||
@@ -39,6 +39,7 @@ class TicketMenuAccessTest extends TestCase
|
||||
Schema::create('tenants_menues', function (Blueprint $table): void {
|
||||
$table->string('tenant_code');
|
||||
$table->string('menu_code');
|
||||
$table->boolean('is_enabled')->default(true);
|
||||
});
|
||||
DB::table('tenants')->insert(['codigo' => 'current']);
|
||||
DB::table('menues')->insert(['code' => $menuCode]);
|
||||
|
||||
Reference in New Issue
Block a user