From adc4f7301a8a1f78ff1a6e2c0e5f5e10d52105e7 Mon Sep 17 00:00:00 2001 From: Abubeker Yasin Date: Wed, 29 Jul 2026 16:50:56 +0300 Subject: [PATCH] fix : ( ticket ) change kickets.generate to tickets.manage --- .../src/modules/tickets/tickets.controller.ts | 16 ++++++++-------- .../backoffice/src/components/layout/Sidebar.tsx | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/edr-passenger-api/src/modules/tickets/tickets.controller.ts b/apps/edr-passenger-api/src/modules/tickets/tickets.controller.ts index 869a8578a..3467706de 100644 --- a/apps/edr-passenger-api/src/modules/tickets/tickets.controller.ts +++ b/apps/edr-passenger-api/src/modules/tickets/tickets.controller.ts @@ -56,7 +56,7 @@ export class TicketsController { } @Get() - @PassengerStaff(PASSENGER_PERMS.tickets.generate) + @PassengerStaff(PASSENGER_PERMS.tickets.view) @ApiBearerAuth('IAM-auth') @ApiOperation({ summary: 'List all tickets with optional filters' }) @ApiQuery({ name: 'search', required: false }) @@ -99,7 +99,7 @@ export class TicketsController { } @Get('by-order/:merchantOrderId') - @PassengerStaff(PASSENGER_PERMS.tickets.generate) + @PassengerStaff(PASSENGER_PERMS.tickets.view) @ApiBearerAuth('IAM-auth') @ApiOperation({ summary: 'Get ticket by merchant order ID', @@ -117,7 +117,7 @@ export class TicketsController { } @Post('scan-board/:qrCodeOrRef') - @PassengerStaff(PASSENGER_PERMS.tickets.generate) + @PassengerStaff(PASSENGER_PERMS.tickets.manage) @ApiBearerAuth('IAM-auth') @ApiOperation({ summary: 'Scan QR code or booking ref and automatically board ticket', @@ -142,7 +142,7 @@ export class TicketsController { } @Post(':bookingRef/validate') - @PassengerStaff(PASSENGER_PERMS.tickets.generate) + @PassengerStaff(PASSENGER_PERMS.tickets.manage) @ApiBearerAuth('IAM-auth') @ApiOperation({ summary: 'Validate ticket at gate with audit logging', @@ -173,7 +173,7 @@ export class TicketsController { } @Get(':ticketId/validation-logs') - @PassengerStaff(PASSENGER_PERMS.tickets.generate) + @PassengerStaff(PASSENGER_PERMS.tickets.view) @ApiBearerAuth('IAM-auth') @ApiOperation({ summary: 'Get validation logs for ticket' }) getValidationLogs(@Param('ticketId') ticketId: string) { @@ -181,7 +181,7 @@ export class TicketsController { } @Get('offline/export') - @PassengerStaff(PASSENGER_PERMS.tickets.generate) + @PassengerStaff(PASSENGER_PERMS.tickets.view) @ApiBearerAuth('IAM-auth') @ApiOperation({ summary: 'Export tickets for offline validation' }) exportOfflineData(@Query('scheduleId') scheduleId: string) { @@ -189,7 +189,7 @@ export class TicketsController { } @Post('validate/offline') - @PassengerStaff(PASSENGER_PERMS.tickets.generate) + @PassengerStaff(PASSENGER_PERMS.tickets.manage) @ApiBearerAuth('IAM-auth') @ApiOperation({ summary: 'Batch import offline validations', @@ -232,7 +232,7 @@ export class TicketsController { } @Patch(':id/restore') - @PassengerStaff(PASSENGER_PERMS.tickets.generate) + @PassengerStaff(PASSENGER_PERMS.tickets.manage) @ApiBearerAuth('IAM-auth') @ApiOperation({ summary: 'Restore a cancelled ticket by resetting its status to ACTIVE' }) restore(@Param('id') id: string) { diff --git a/apps/edr-passenger-web/backoffice/src/components/layout/Sidebar.tsx b/apps/edr-passenger-web/backoffice/src/components/layout/Sidebar.tsx index ca8e1fb15..3c93538b9 100644 --- a/apps/edr-passenger-web/backoffice/src/components/layout/Sidebar.tsx +++ b/apps/edr-passenger-web/backoffice/src/components/layout/Sidebar.tsx @@ -64,7 +64,7 @@ const navigationSections: { title: string; items: NavItem[] }[] = [ { name: 'Bookings', href: '/bookings', icon: Ticket, permission: PERMS.bookings.view }, { name: 'Passengers', href: '/passengers', icon: Users, permission: PERMS.passengers.view }, { name: 'Tickets', href: '/tickets', icon: FileText, permission: PERMS.tickets.view }, - { name: 'Boarding', href: '/boarding', icon: LogIn, permission: PERMS.tickets.view }, + { name: 'Boarding', href: '/boarding', icon: LogIn, permission: PERMS.tickets.manage }, { name: 'Luggage', href: '/excess-baggage', icon: Banknote, permission: PERMS.bookings.view }, { name: 'Discrepancy', href: '/discrepancy', icon: Layers, permission: PERMS.seats.manage }, ]