From de0e9e8c9c15db1f54f1e3042cf07a8aada93fc1 Mon Sep 17 00:00:00 2001 From: natib21 Date: Sat, 27 Jun 2026 10:29:16 +0000 Subject: [PATCH 1/2] fix status update --- .../src/modules/first-mile/first-mile.service.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/edr-freight-api/src/modules/first-mile/first-mile.service.ts b/apps/edr-freight-api/src/modules/first-mile/first-mile.service.ts index 73d98b8fe..a06f9eb87 100644 --- a/apps/edr-freight-api/src/modules/first-mile/first-mile.service.ts +++ b/apps/edr-freight-api/src/modules/first-mile/first-mile.service.ts @@ -225,6 +225,16 @@ export class FirstMileService { return updated; } + async updateStatus(id: string, status: FirstMileStatus): Promise { + const updated = await this.firstMileRepository.update(id, { status }); + + if (!updated) { + throw new NotFoundException(`First-mile record ${id} not found`); + } + + return updated; + } + private async notifyDriverAssignment(vehicleId: string, record: FirstMile): Promise { try { const vehicle = await this.vehiclesService.findById(vehicleId); From 2d962d79d88a5ae88d8bdd259d6bb87906211ef7 Mon Sep 17 00:00:00 2001 From: natib21 Date: Sat, 27 Jun 2026 11:00:28 +0000 Subject: [PATCH 2/2] fix --- .../backoffice/src/pages/operations/FirstMilePage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 208db85f8..34e23e97e 100644 --- a/apps/edr-freight-web/backoffice/src/pages/operations/FirstMilePage.tsx +++ b/apps/edr-freight-web/backoffice/src/pages/operations/FirstMilePage.tsx @@ -67,7 +67,7 @@ type StatusFilter = "ALL" | FirstMileApiStatus | AssignmentStatus; const FILTER_OPTIONS: { value: StatusFilter; label: string }[] = [ { value: "ALL", label: "All" }, - ...FIRST_MILE_STATUSES.map((s) => ({ value: s as StatusFilter, label: STATUS_META[s].label })), + ...FIRST_MILE_STATUSES.filter((s) => s !== "PAYMENT_PENDING").map((s) => ({ value: s as StatusFilter, label: STATUS_META[s].label })), { value: "ASSIGNED", label: "Assigned" }, { value: "UNASSIGNED", label: "Unassigned" }, ];