From ac26c93a2d511d3afc0d9466653fca9eea1f4eee Mon Sep 17 00:00:00 2001 From: Kariamos Date: Wed, 11 Feb 2026 16:35:58 +0100 Subject: [PATCH 1/2] fix(OtherCosts): update supplier options to use supplier ID instead of index --- src/pages/campaigns/quote/sections/OtherCosts/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/campaigns/quote/sections/OtherCosts/index.tsx b/src/pages/campaigns/quote/sections/OtherCosts/index.tsx index 05126d10..16623c56 100644 --- a/src/pages/campaigns/quote/sections/OtherCosts/index.tsx +++ b/src/pages/campaigns/quote/sections/OtherCosts/index.tsx @@ -68,8 +68,8 @@ const useSuppliers = ({ campaignId }: { campaignId: string }) => { const options = useMemo(() => { if (!data?.items) return []; - return data.items.map((item, index) => ({ - value: String(index + 1), + return data.items.map((item) => ({ + value: String(item.id), label: item.name, })); }, [data]); From 024b2ae04c3eeb2a045bd5b271460baeeea75a2e Mon Sep 17 00:00:00 2001 From: ZecD Date: Thu, 12 Feb 2026 09:54:28 +0100 Subject: [PATCH 2/2] fix(OtherCosts): update cost type options to use item ID instead of index --- src/pages/campaigns/quote/sections/OtherCosts/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/campaigns/quote/sections/OtherCosts/index.tsx b/src/pages/campaigns/quote/sections/OtherCosts/index.tsx index 16623c56..61fd4a7e 100644 --- a/src/pages/campaigns/quote/sections/OtherCosts/index.tsx +++ b/src/pages/campaigns/quote/sections/OtherCosts/index.tsx @@ -51,9 +51,9 @@ const useCostTypes = ({ campaignId }: { campaignId: string }) => { const options = useMemo(() => { if (!data?.items) return []; - return data.items.map((item, index) => ({ - value: String(index + 1), - label: item.name || `Type ${index + 1}`, + return data.items.map((item) => ({ + value: String(item.id), + label: item.name, })); }, [data]);