From a5b9dc1153ae410fa6e740deb93c25c1aa09c3ba Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 May 2026 10:18:29 +0000 Subject: [PATCH] fix: ternary syntax in assignDriver logPayload --- src/services/supabase/orderGroupRepository.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/supabase/orderGroupRepository.js b/src/services/supabase/orderGroupRepository.js index c3ccefb..87fc869 100644 --- a/src/services/supabase/orderGroupRepository.js +++ b/src/services/supabase/orderGroupRepository.js @@ -274,7 +274,7 @@ export const assignDriverToOrderGroup = async ({ const driverName = data?.assigned_driver?.name || driverId || "—"; const oldDriverName = currentGroup?.assigned_driver?.name || currentGroup?.assigned_driver_id || ""; const logPayload = driverId - { orderGroupId, action: "driver_assigned", oldValue: oldDriverName || undefined, newValue: driverName, details: { driver_id: driverId, driver_name: driverName } } + ? { orderGroupId, action: "driver_assigned", oldValue: oldDriverName || undefined, newValue: driverName, details: { driver_id: driverId, driver_name: driverName } } : { orderGroupId, action: "driver_removed", oldValue: oldDriverName, newValue: "Снят", details: { driver_name: oldDriverName } }; await logAction(logPayload).catch(() => {});