From 52ec8bb2ac4daca37463852bc5662f92e4028c9b Mon Sep 17 00:00:00 2001 From: myrmidex Date: Sun, 22 Mar 2026 02:07:26 +0100 Subject: [PATCH] 18 - Allow setting allocation value after type change --- resources/js/pages/Scenarios/Show.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/js/pages/Scenarios/Show.tsx b/resources/js/pages/Scenarios/Show.tsx index 9109e79..dfa1c57 100644 --- a/resources/js/pages/Scenarios/Show.tsx +++ b/resources/js/pages/Scenarios/Show.tsx @@ -342,17 +342,17 @@ export default function Show({ scenario, buckets, streams = { data: [] }, stream
Allocation:{' '} - {bucket.allocation_type === 'fixed_limit' && bucket.allocation_value !== null ? ( + {bucket.allocation_type === 'fixed_limit' ? ( patchBucket(bucket.id, { allocation_value: dollarsToCents(val) })} formatDisplay={(v) => `$${v.toFixed(2)}`} min={0} step="0.01" /> - ) : bucket.allocation_type === 'percentage' && bucket.allocation_value !== null ? ( + ) : bucket.allocation_type === 'percentage' ? ( patchBucket(bucket.id, { allocation_value: percentToBasisPoints(val) })} formatDisplay={(v) => `${v.toFixed(2)}%`} min={0}