diff --git a/apps/edr-passenger-api/prisma/schema.prisma b/apps/edr-passenger-api/prisma/schema.prisma index 43b5d2dd1..26c9c9eb3 100644 --- a/apps/edr-passenger-api/prisma/schema.prisma +++ b/apps/edr-passenger-api/prisma/schema.prisma @@ -326,8 +326,6 @@ model Station { crowdSignals StationCrowdSignal[] @@index([city, countryCode]) @@index([sequence]) - - @@index([city, countryCode]) @@schema("passenger") } @@ -422,8 +420,6 @@ model Coach { assignments CoachAssignment[] @@index([coachTypeId]) @@index([sequence]) - - @@index([coachTypeId]) @@schema("passenger") } diff --git a/apps/edr-passenger-web/backoffice/.eslintrc.json b/apps/edr-passenger-web/backoffice/.eslintrc.json index 957cd1545..015e65d11 100644 --- a/apps/edr-passenger-web/backoffice/.eslintrc.json +++ b/apps/edr-passenger-web/backoffice/.eslintrc.json @@ -1,3 +1,6 @@ { - "extends": ["next/core-web-vitals"] + "extends": ["next/core-web-vitals"], + "rules": { + "react/no-unescaped-entities": "off" + } } diff --git a/apps/edr-passenger-web/backoffice/src/app/currencies/page.tsx b/apps/edr-passenger-web/backoffice/src/app/currencies/page.tsx index 61f5eba82..d57a67c83 100644 --- a/apps/edr-passenger-web/backoffice/src/app/currencies/page.tsx +++ b/apps/edr-passenger-web/backoffice/src/app/currencies/page.tsx @@ -373,7 +373,7 @@ export default function CurrenciesPage() { onChange={(e) => setCurrencyForm({ ...currencyForm, code: e.target.value.toUpperCase() })} className="input w-full" placeholder="e.g., USD" - maxLength="3" + maxLength={3} disabled={!!editingCurrency} required /> @@ -402,7 +402,7 @@ export default function CurrenciesPage() { onChange={(e) => setCurrencyForm({ ...currencyForm, symbol: e.target.value })} className="input w-full" placeholder="e.g., $" - maxLength="3" + maxLength={3} required /> @@ -448,7 +448,7 @@ export default function CurrenciesPage() {
-

Exchange Rate Example:

+

Exchange Rate Example:

If 1 ETB = 0.018 USD, enter 0.018

If 1 ETB = 3.25 DJF, enter 3.25

diff --git a/apps/edr-passenger-web/backoffice/src/app/docs/page.tsx b/apps/edr-passenger-web/backoffice/src/app/docs/page.tsx index 4798b26cd..deaf40007 100644 --- a/apps/edr-passenger-web/backoffice/src/app/docs/page.tsx +++ b/apps/edr-passenger-web/backoffice/src/app/docs/page.tsx @@ -222,7 +222,7 @@ const DocPage = () => {
    -
  1. Click "Bookings" in Operations section
  2. +
  3. Click {`"Bookings"`} in Operations section
  4. View all bookings in table format
@@ -234,8 +234,8 @@ const DocPage = () => {
    -
  1. Click "View Details" for full information
  2. -
  3. Click "Cancel Booking" to process refunds
  4. +
  5. Click {`"View Details"`} for full information
  6. +
  7. Click {`"Cancel Booking"`} to process refunds
@@ -252,7 +252,7 @@ const DocPage = () => {
    -
  1. Click "Passengers" in Operations
  2. +
  3. Click {`"Passengers"`} in Operations
  4. View all profiles with pagination
@@ -282,7 +282,7 @@ const DocPage = () => {
    -
  1. Click "Tickets" in Operations
  2. +
  3. Click {`"Tickets"`} in Operations
  4. View all issued tickets with status
@@ -295,7 +295,7 @@ const DocPage = () => {
  1. Click ticket to view details
  2. -
  3. Click "Download PDF" for printable version
  4. +
  5. Click {`"Download PDF"`} for printable version
@@ -312,13 +312,13 @@ const DocPage = () => {
    -
  1. Click "Stations" in Master Data
  2. +
  3. Click {`"Stations"`} in Master Data
  4. View all configured stations
    -
  1. Click "Add Station"
  2. +
  3. Click {`"Add Station"`}
  4. Enter code, name, city, timezone, coordinates
@@ -342,13 +342,13 @@ const DocPage = () => {
    -
  1. Click "Trains" in Master Data
  2. +
  3. Click {`"Trains"`} in Master Data
  4. View all trains and coaches
    -
  1. Click "Add Train"
  2. +
  3. Click {`"Add Train"`}
  4. Enter code and select coaches
diff --git a/apps/edr-passenger-web/backoffice/src/app/how-to/page.tsx b/apps/edr-passenger-web/backoffice/src/app/how-to/page.tsx index 8d6b863c1..20cdd419a 100644 --- a/apps/edr-passenger-web/backoffice/src/app/how-to/page.tsx +++ b/apps/edr-passenger-web/backoffice/src/app/how-to/page.tsx @@ -82,7 +82,7 @@ const HowToPage = () => {
  1. Click on "Bookings" in the Operations section of the sidebar
  2. The page loads showing a table with all bookings
  3. -
  4. You'll see columns: Reference, Passenger, Status, Amount, Payment, Created date
  5. +
  6. You'll see columns: Reference, Passenger, Status, Amount, Payment, Created date

📍 Path: Sidebar → Operations → Bookings

@@ -147,7 +147,7 @@ const HowToPage = () => {
  • Pending bookings: 0% refund
  • -
  • Status changes to "CANCELLED"
  • +
  • Status changes to "CANCELLED"
  • Success message appears
  • diff --git a/apps/edr-passenger-web/backoffice/src/app/pricing/page.tsx b/apps/edr-passenger-web/backoffice/src/app/pricing/page.tsx index 871480a56..a2dcae6aa 100644 --- a/apps/edr-passenger-web/backoffice/src/app/pricing/page.tsx +++ b/apps/edr-passenger-web/backoffice/src/app/pricing/page.tsx @@ -93,7 +93,7 @@ export default function PricingPage() { if (!selectedSchedule) return []; try { const response = await apiClient.get(`/schedules/${selectedSchedule}/fares/all`); - return Array.isArray(response) ? response : response.data || []; + return Array.isArray(response) ? response : (response as any)?.data || []; } catch (err: any) { const errMsg = err.response?.data?.message || err.message || 'Failed to load fares'; setError(`Error loading fares: ${errMsg}`); diff --git a/apps/edr-passenger-web/backoffice/src/app/seats/page.tsx b/apps/edr-passenger-web/backoffice/src/app/seats/page.tsx index 50f7c21dc..ba4130b81 100644 --- a/apps/edr-passenger-web/backoffice/src/app/seats/page.tsx +++ b/apps/edr-passenger-web/backoffice/src/app/seats/page.tsx @@ -75,7 +75,7 @@ export default function SeatsPage() { const blockCoachMutation = useMutation({ mutationFn: async ({ coachId, reason }: any) => { - const coachSeats = coaches.find(c => c.id === coachId)?.seats || []; + const coachSeats = coaches.find((c: any) => c.id === coachId)?.seats || []; const seatIds = coachSeats.map((s: any) => s.id).filter((id: any) => id); return Promise.all(seatIds.map((seatId: string) => seatsApi.block(seatId, { reason }))); }, @@ -89,7 +89,7 @@ export default function SeatsPage() { const unblockCoachMutation = useMutation({ mutationFn: async ({ coachId }: any) => { - const coachSeats = coaches.find(c => c.id === coachId)?.seats || []; + const coachSeats = coaches.find((c: any) => c.id === coachId)?.seats || []; const seatIds = coachSeats.map((s: any) => s.id).filter((id: any) => id); return Promise.all(seatIds.map((seatId: string) => seatsApi.unblock(seatId))); },