Save final-review value field-block edits from the open card, and keep Duplicate available until six values are picked.

This commit is contained in:
adilallo committed 2026-11-05 22:09:14 -07:00
1 parent 64a542f456
commit 772370c4e7
2 files changed
+176 -3

No files matched your search

@@ -66,6 +66,7 @@ import { uploadCreateFlowFile } from "../../../../lib/create/uploadToServer";
import CustomMethodCardWizard from "./CustomMethodCardWizard";
import {
duplicateCoreValueChipInDraft,
MAX_SELECTED_CORE_VALUES,
removeCoreValueChipFromDraft,
} from "../../../../lib/create/coreValueChipFacet";
import {
@@ -650,7 +651,7 @@ export function FinalReviewChipEditModal({
if ((state.editingPublishedRuleId?.trim() ?? "") !== "") {
return;
}
if ((state.selectedCoreValueIds ?? []).length >= 5) {
if ((state.selectedCoreValueIds ?? []).length >= MAX_SELECTED_CORE_VALUES) {
return;
}
if (
@@ -725,7 +726,7 @@ export function FinalReviewChipEditModal({
onCustomize: handleCustomize,
onDuplicate:
(state.editingPublishedRuleId?.trim() ?? "") !== "" ||
(state.selectedCoreValueIds ?? []).length >= 5
(state.selectedCoreValueIds ?? []).length >= MAX_SELECTED_CORE_VALUES
? undefined
: handleDuplicateCoreValue,
});
@@ -775,8 +776,12 @@ export function FinalReviewChipEditModal({
return;
}
onInteract?.();
const existingBlocks =
const persistedBlocks =
state.customMethodCardFieldBlocksById?.[target.overrideKey];
const existingBlocks =
draftFieldBlocks && draftFieldBlocks.length > 0
? draftFieldBlocks
: persistedBlocks;
onSave({
groupKey: "coreValues",
overrideKey: target.overrideKey,