Skip to content

Commit e26fabd

Browse files
Filipclaude
authored andcommitted
fix(checkout): don't let copy control wipe locked attendee fields
Hide the copy-details control when lock is set (locked attendee inputs are disabled, so resetting them was unrecoverable and dropped locked data). Also skip attendee prefill under PER_ORDER collection and document the effect-deps omission. 🤖 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 80fb54a commit e26fabd

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • frontend/src/components/routes/product-widget/CollectInformation

frontend/src/components/routes/product-widget/CollectInformation/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ export const CollectInformation = () => {
315315
);
316316

317317
const prefilledProducts = builtProducts.map((product: any) =>
318-
ticketProductIds.has(product.product_id)
318+
(!isPerOrderCollection && ticketProductIds.has(product.product_id))
319319
? {...product, ...orderPrefill}
320320
: product
321321
);
@@ -330,6 +330,7 @@ export const CollectInformation = () => {
330330
},
331331
});
332332
}
333+
// prefill/lock intentionally omitted: they're memoized off query params that don't change during the page's lifetime
333334
}, [isEventFetched, isOrderFetched, isQuestionsFetched]);
334335

335336
useEffect(() => {
@@ -488,7 +489,7 @@ export const CollectInformation = () => {
488489
/>
489490
</InputGroup>
490491

491-
{orderRequiresAttendeeDetails && !isPerOrderCollection && totalTicketAttendees > 0 && (
492+
{orderRequiresAttendeeDetails && !isPerOrderCollection && totalTicketAttendees > 0 && !lock && (
492493
<div className={classes.copyDetailsSection}>
493494
{totalTicketAttendees === 1 ? (
494495
<Tooltip

0 commit comments

Comments
 (0)