From 9c7f42982f6f72fe712d05479586b9500ca17bd0 Mon Sep 17 00:00:00 2001 From: Stephanos A Date: Sun, 14 Jun 2026 15:29:37 +0300 Subject: [PATCH] Lockfile and lint issues resolution --- .../backoffice/src/app/coaches/page.tsx | 2 +- .../backoffice/src/app/dashboard/page.tsx | 2 +- .../backoffice/src/app/reports/page.tsx | 9 +++++---- packages/types/src/index.ts | 2 ++ pnpm-lock.yaml | 18 ++++++++++++++++++ 5 files changed, 27 insertions(+), 6 deletions(-) diff --git a/apps/edr-passenger-web/backoffice/src/app/coaches/page.tsx b/apps/edr-passenger-web/backoffice/src/app/coaches/page.tsx index 52c7e0e67..39acd4a4f 100644 --- a/apps/edr-passenger-web/backoffice/src/app/coaches/page.tsx +++ b/apps/edr-passenger-web/backoffice/src/app/coaches/page.tsx @@ -32,7 +32,7 @@ const renderBedVisualization = (coach: any) => { if (!isBedCoach || !hasBedPositionData) { // Regular seat layout const arrangement = coach.seatArrangement || coach.arrangement || '2+2'; - const [left, right] = arrangement.split('+').map(p => parseInt(p.trim())); + const [left, right] = arrangement.split('+').map((p: string) => parseInt(p.trim())); const cols = new Map(); for (const seat of validSeats) { diff --git a/apps/edr-passenger-web/backoffice/src/app/dashboard/page.tsx b/apps/edr-passenger-web/backoffice/src/app/dashboard/page.tsx index 744c32137..d61acff41 100644 --- a/apps/edr-passenger-web/backoffice/src/app/dashboard/page.tsx +++ b/apps/edr-passenger-web/backoffice/src/app/dashboard/page.tsx @@ -107,7 +107,7 @@ export default function DashboardPage() {

Dashboard

-

Welcome back! Here's your operational summary.

+

Welcome back! Here's your operational summary.

{/* Primary Metrics */} diff --git a/apps/edr-passenger-web/backoffice/src/app/reports/page.tsx b/apps/edr-passenger-web/backoffice/src/app/reports/page.tsx index 72e73a9f3..353b1fd3a 100644 --- a/apps/edr-passenger-web/backoffice/src/app/reports/page.tsx +++ b/apps/edr-passenger-web/backoffice/src/app/reports/page.tsx @@ -58,12 +58,12 @@ export default function ReportsPage() { : []; // Calculate metrics - const totalRevenue = bookings.reduce((sum, b: any) => sum + (b.totalMinor || 0), 0); + const totalRevenue = bookings.reduce((sum: number, b: any) => sum + (b.totalMinor || 0), 0); const totalBookings = bookings.length; const avgTicketPrice = totalBookings > 0 ? Math.round(totalRevenue / totalBookings) : 0; // Group by date for revenue chart - const byDate = bookings.reduce((acc, b: any) => { + const byDate = bookings.reduce((acc: Record, b: any) => { const date = new Date(b.createdAt).toISOString().split('T')[0]; if (!acc[date]) { acc[date] = { totalMinor: 0, count: 0 }; @@ -267,12 +267,13 @@ export default function ReportsPage() {

Payment Methods

{bookings.length > 0 ? (
- {Object.entries( - bookings.reduce((acc, b: any) => { + {(Object.entries( + bookings.reduce((acc: Record, b: any) => { const method = b.paymentIntent?.method || 'Unknown'; acc[method] = (acc[method] || 0) + 1; return acc; }, {} as Record) + ) as [string, number][] ) .sort(([, a], [, b]) => b - a) .slice(0, 5) diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index c3093e515..0fe137f2c 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -1,3 +1,5 @@ export * from "./common/index"; export * as Freight from "./freight/index"; export * as Passenger from "./passenger/index"; +export type { PaymentEvent, PaymentEventType, PaymentFailedEvent, PaymentSucceededEvent } from "./common/payments"; +export { PaymentIntentSnapshot, InitiatePaymentRequest, PaymentReferenceType, PaymentService } from "./common/payments"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b6771011e..ba222b79b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -470,6 +470,9 @@ importers: tsconfig-paths: specifier: ^4.2.0 version: 4.2.0 + uuid: + specifier: ^10.0.0 + version: 10.0.0 devDependencies: '@edr/eslint-config': specifier: workspace:* @@ -507,6 +510,9 @@ importers: '@types/supertest': specifier: ^6.0.2 version: 6.0.3 + '@types/uuid': + specifier: ^9.0.0 + version: 9.0.8 jest: specifier: ^29.7.0 version: 29.7.0(@types/node@20.19.42)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@20.19.42)(typescript@5.9.3)) @@ -4376,6 +4382,9 @@ packages: '@types/use-sync-external-store@0.0.6': resolution: {integrity: sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==} + '@types/uuid@9.0.8': + resolution: {integrity: sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==} + '@types/validate-npm-package-name@4.0.2': resolution: {integrity: sha512-lrpDziQipxCEeK5kWxvljWYhUvOiB2A9izZd9B2AFarYAkqZshb4lPbRs7zKEic6eGtH8V/2qJW+dPp9OtF6bw==} @@ -12131,6 +12140,11 @@ packages: utrie@1.0.2: resolution: {integrity: sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==} + uuid@10.0.0: + resolution: {integrity: sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==} + deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028). + hasBin: true + uuid@11.1.1: resolution: {integrity: sha512-vIYxrBCC/N/K+Js3qSN88go7kIfNPssr/hHCesKCQNAjmgvYS2oqr69kIufEG+O4+PfezOH4EbIeHCfFov8ZgQ==} hasBin: true @@ -17507,6 +17521,8 @@ snapshots: '@types/use-sync-external-store@0.0.6': {} + '@types/uuid@9.0.8': {} + '@types/validate-npm-package-name@4.0.2': {} '@types/validator@13.15.10': {} @@ -26999,6 +27015,8 @@ snapshots: dependencies: base64-arraybuffer: 1.0.2 + uuid@10.0.0: {} + uuid@11.1.1: {} uuid@3.4.0: {}