From b1d9045d0b790c93e9b9a2a520241afd6ac58212 Mon Sep 17 00:00:00 2001 From: natib21 Date: Tue, 30 Jun 2026 03:15:58 +0000 Subject: [PATCH 1/2] fix: remove isPostPaymentCompleted filter check Property removed from entities until migration creates column. Temporarily skip this filter until feature is fully implemented. Co-Authored-By: Claude Haiku 4.5 --- .../backoffice/src/pages/operations/FirstMilePage.tsx | 1 - .../backoffice/src/pages/operations/LastMilePage.tsx | 1 - 2 files changed, 2 deletions(-) diff --git a/apps/edr-freight-web/backoffice/src/pages/operations/FirstMilePage.tsx b/apps/edr-freight-web/backoffice/src/pages/operations/FirstMilePage.tsx index e17ea46c7..2b2f00904 100644 --- a/apps/edr-freight-web/backoffice/src/pages/operations/FirstMilePage.tsx +++ b/apps/edr-freight-web/backoffice/src/pages/operations/FirstMilePage.tsx @@ -530,7 +530,6 @@ const FirstMilePage = () => { }; const matchesFilter = (r: FirstMileRecord) => { - if (filterPostPaymentPending && r.isPostPaymentCompleted) return false; switch (statusFilter) { case "ALL": return true; case "ASSIGNED": return isAssigned(r); diff --git a/apps/edr-freight-web/backoffice/src/pages/operations/LastMilePage.tsx b/apps/edr-freight-web/backoffice/src/pages/operations/LastMilePage.tsx index 9798a90bf..e81f516e2 100644 --- a/apps/edr-freight-web/backoffice/src/pages/operations/LastMilePage.tsx +++ b/apps/edr-freight-web/backoffice/src/pages/operations/LastMilePage.tsx @@ -509,7 +509,6 @@ const LastMilePage = () => { ); const matchesFilter = (r: LastMileRecord) => { - if (filterPostPaymentPending && r.isPostPaymentCompleted) return false; switch (statusFilter) { case "ALL": return true; case "ASSIGNED": return isAssigned(r); From 25e91c6d933cd7656904e960b69f40787a94576e Mon Sep 17 00:00:00 2001 From: natib21 Date: Tue, 30 Jun 2026 03:33:54 +0000 Subject: [PATCH 2/2] fix: comment out isPostPaymentCompleted column decorator Column doesn't exist in DB yet. Commenting out @Column decorator prevents TypeORM from trying to select non-existent column. Fixes 500 QueryFailedError on first-mile/last-mile list endpoints. Co-Authored-By: Claude Haiku 4.5 --- .../src/modules/first-mile/entities/first-mile.entity.ts | 5 +++-- .../src/modules/last-mile/entities/last-mile.entity.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/edr-freight-api/src/modules/first-mile/entities/first-mile.entity.ts b/apps/edr-freight-api/src/modules/first-mile/entities/first-mile.entity.ts index 513aaf98e..ef2ffb845 100644 --- a/apps/edr-freight-api/src/modules/first-mile/entities/first-mile.entity.ts +++ b/apps/edr-freight-api/src/modules/first-mile/entities/first-mile.entity.ts @@ -34,8 +34,9 @@ export class FirstMile extends BaseEntity { @Column({ name: 'remaining_payment', type: 'numeric', precision: 14, scale: 2, default: 0 }) remainingPayment!: number; - @Column({ type: 'boolean', default: false }) - isPostPaymentCompleted!: boolean; + // TODO: uncomment after migration creates column + // @Column({ type: 'boolean', default: false }) + // isPostPaymentCompleted!: boolean; @Column({ name: 'estimated_km', type: 'numeric', precision: 10, scale: 2, nullable: true }) estimatedKm?: number | null; diff --git a/apps/edr-freight-api/src/modules/last-mile/entities/last-mile.entity.ts b/apps/edr-freight-api/src/modules/last-mile/entities/last-mile.entity.ts index 6c8c9d1ca..0d342956f 100644 --- a/apps/edr-freight-api/src/modules/last-mile/entities/last-mile.entity.ts +++ b/apps/edr-freight-api/src/modules/last-mile/entities/last-mile.entity.ts @@ -34,8 +34,9 @@ export class LastMile extends BaseEntity { @Column({ name: 'remaining_payment', type: 'numeric', precision: 14, scale: 2, default: 0 }) remainingPayment!: number; - @Column({ type: 'boolean', default: false }) - isPostPaymentCompleted!: boolean; + // TODO: uncomment after migration creates column + // @Column({ type: 'boolean', default: false }) + // isPostPaymentCompleted!: boolean; @Column({ name: 'estimated_km', type: 'numeric', precision: 10, scale: 2, nullable: true }) estimatedKm?: number | null;