- {existingCustomReceiptName
+ {existingCustomReceiptLayoutSetName
? t('process_editor.configuration_panel_custom_receipt_name')
: t('process_editor.configuration_panel_custom_receipt_add')}
,
- value: existingCustomReceiptName,
+ value: existingCustomReceiptLayoutSetName,
onBlur: ({ target }) =>
- handleUpdateLayoutSet(existingCustomReceiptName ?? target.value, target.value),
+ handleUpdateLayoutSet(existingCustomReceiptLayoutSetName, target.value),
size: 'small',
}}
+ customValidation={(newLayoutSetId: string) => {
+ const validationResult = getLayoutSetIdValidationErrorKey(
+ layoutSets,
+ existingCustomReceiptLayoutSetName,
+ newLayoutSetId,
+ );
+ return validationResult ? t(validationResult) : undefined;
+ }}
/>
>
diff --git a/frontend/packages/process-editor/src/components/ConfigPanel/ConfigPanel.test.tsx b/frontend/packages/process-editor/src/components/ConfigPanel/ConfigPanel.test.tsx
index da0a29667d4..546c14720b3 100644
--- a/frontend/packages/process-editor/src/components/ConfigPanel/ConfigPanel.test.tsx
+++ b/frontend/packages/process-editor/src/components/ConfigPanel/ConfigPanel.test.tsx
@@ -9,6 +9,7 @@ import { BpmnTypeEnum } from '../../enum/BpmnTypeEnum';
import { BpmnConfigPanelFormContextProvider } from '../../contexts/BpmnConfigPanelContext';
import type Modeler from 'bpmn-js/lib/Modeler';
import { shouldDisplayFeature } from 'app-shared/utils/featureToggleUtils';
+import { BpmnApiContextProvider } from '../../contexts/BpmnApiContext';
jest.mock('app-shared/utils/featureToggleUtils', () => ({
shouldDisplayFeature: jest.fn().mockReturnValue(false),
@@ -69,7 +70,6 @@ describe('ConfigPanel', () => {
it('should display the details about the end event when bpmnDetails.type is "EndEvent" and customizeEndEvent feature flag is enabled', () => {
(shouldDisplayFeature as jest.Mock).mockReturnValue(true);
renderConfigPanel({ bpmnDetails: { ...mockBpmnDetails, type: BpmnTypeEnum.EndEvent } });
-
expect(
screen.getByText(textMock('process_editor.configuration_panel_end_event')),
).toBeInTheDocument();
@@ -104,9 +104,16 @@ describe('ConfigPanel', () => {
const renderConfigPanel = (rootContextProps: Partial