diff --git a/samples/android-cmp-app/src/androidInstrumentedTest/kotlin/com/pega/constellation/sdk/kmp/samples/androidcmpapp/test/cases/EmbeddedDataTest.kt b/samples/android-cmp-app/src/androidInstrumentedTest/kotlin/com/pega/constellation/sdk/kmp/samples/androidcmpapp/test/cases/EmbeddedDataTest.kt index 9a048697..1fead5ee 100644 --- a/samples/android-cmp-app/src/androidInstrumentedTest/kotlin/com/pega/constellation/sdk/kmp/samples/androidcmpapp/test/cases/EmbeddedDataTest.kt +++ b/samples/android-cmp-app/src/androidInstrumentedTest/kotlin/com/pega/constellation/sdk/kmp/samples/androidcmpapp/test/cases/EmbeddedDataTest.kt @@ -4,9 +4,12 @@ import androidx.compose.ui.test.ComposeUiTest import androidx.compose.ui.test.ExperimentalTestApi import androidx.compose.ui.test.SemanticsMatcher import androidx.compose.ui.test.SemanticsNodeInteractionCollection +import androidx.compose.ui.test.SemanticsNodeInteractionsProvider import androidx.compose.ui.test.filter import androidx.compose.ui.test.hasAnyAncestor +import androidx.compose.ui.test.hasClickAction import androidx.compose.ui.test.hasContentDescription +import androidx.compose.ui.test.hasSetTextAction import androidx.compose.ui.test.hasTestTag import androidx.compose.ui.test.hasText import androidx.compose.ui.test.onFirst @@ -16,7 +19,10 @@ import androidx.compose.ui.test.onSiblings import androidx.compose.ui.test.performClick import androidx.compose.ui.test.performScrollTo import androidx.compose.ui.test.performTextInput +import androidx.compose.ui.test.performTextReplacement import androidx.compose.ui.test.runComposeUiTest +import androidx.compose.ui.test.waitUntilAtLeastOneExists +import androidx.compose.ui.test.waitUntilDoesNotExist import androidx.compose.ui.test.waitUntilExactlyOneExists import androidx.compose.ui.test.waitUntilNodeCount import com.pega.constellation.sdk.kmp.samples.androidcmpapp.test.ComposeTest @@ -31,7 +37,7 @@ class EmbeddedDataTest : ComposeTest(PegaVersion.v24_2_2) { @Test fun test_embedded_data_repeating_view() = runComposeUiTest { - setupApp("O40M3A-MarekCo-Work-EmbeddedDataTest") + setupApp("O40M3A-MarekCo-Work-EmbeddedDataTest-RepeatingViewEditable") // create case onNodeWithText("New Service").performClick() @@ -48,7 +54,7 @@ class EmbeddedDataTest : ComposeTest(PegaVersion.v24_2_2) { waitUntilExactlyOneExists(hasContentDescription("Delete item 1")) onNodeWithContentDescription("Delete item 1").performClick() waitForNodes("No items", count = 2) - waitUntilNodeCount(hasContentDescription("No items"), count = 2) + waitUntilNodeCount(hasContentDescription("No items icon"), count = 2) onNodeWithText("Add", substring = true).performClick() // verify error banner @@ -56,100 +62,297 @@ class EmbeddedDataTest : ComposeTest(PegaVersion.v24_2_2) { waitForNode("brand: Cannot be blank", substring = true) // enter data in row 1 and verify - onAllNodes(hasAnyAncestor(hasTestTag("field_group_template_[Cars repeating view editable]"))).let { - it.findFirstWithText("brand").performTextInput("Audi") - it.findFirstWithText("model").performTextInput("A5") - it.findFirstWithText("Price").performTextInput("123000") - it.findFirstWithText("IsFirstOwner").onSiblings().onFirst().performClick() - it.findFirstWithText("interior").performScrollTo().performClick() + val carsEditableFieldGroup = "field_group_template_[Cars repeating view editable]" + onAllDescendantsOf(carsEditableFieldGroup).let { + it.find("brand").performTextInput("Audi") + it.find("model").performTextInput("A5") + it.find("Price").performTextInput("123000") + it.find("IsFirstOwner").onSiblings().onFirst().performClick() + it.find("interior").performScrollTo().performClick() onNodeWithText("comfort").performClick() - it.findFirstWithText("Insurance").performScrollTo().performClick() + it.find("Insurance").performScrollTo().performClick() onNodeWithText("gold").performClick() - it.findFirstWithText("client meeting date").performScrollTo().performClick() + it.find("client meeting date").performScrollTo().performClick() onNodeWithText("Today, ", substring = true).performClick() onNodeWithText("OK").performClick() - it.findFirstWithText("Client meeting time").performScrollTo().performClick() + it.find("Client meeting time").performScrollTo().performClick() onNodeWithText("OK").performClick() - it.findFirstWithText("Transaction date time").performScrollTo().performScrollTo() + it.find("Transaction date time").performScrollTo().performScrollTo() .performClick() onNodeWithText("Today, ", substring = true).performClick() onNodeWithText("OK").performClick() onNodeWithText("OK").performClick() - it.findFirstWithText("Notes").performScrollTo().performTextInput("This is a note") + it.find("Notes").performScrollTo().performTextInput("This is a note") // remove focus to propagate data onNodeWithText("Cars repeating view readonly").performScrollTo().performClick() // verify editable data - verifyEmbeddedDataRecord( + verifyFieldGroupItem( nodes = it, expectedDate = LocalDateTime.now().toString().substring(0, 10), isEditable = true ) } // verify if row 1 data propagated to readonly duplicated view - onAllNodes(hasAnyAncestor(hasTestTag("field_group_template_[Cars repeating view readonly]"))).let { - verifyEmbeddedDataRecord( - nodes = it, - expectedDate = LocalDateTime.now().toString().substring(0, 10), - isEditable = false - ) - } + val carsReadonlyFieldGroup = "field_group_template_[Cars repeating view readonly]" + verifyFieldGroupItem( + nodes = onAllDescendantsOf(carsReadonlyFieldGroup), + expectedDate = LocalDateTime.now().toString().substring(0, 10), + isEditable = false + ) // adding row 2 onNodeWithText("Add", substring = true).performScrollTo().performClick() - // enter data in row 2 waitForNodes("cars 2", count = 2) - onAllNodes(hasAnyAncestor(hasTestTag("field_group_template_[Cars repeating view editable]"))).let { nodes -> - nodes.filter(hasAnyAncestor(hasTestTag("field_group_item_2"))).let { - it.findFirstWithText("brand").performTextInput("Ford") - nodes.findFirstWithText("cars 2").performClick() // remove focus to propagate data - it.findFirstWithText("Ford").assertExists() + onAllDescendantsOf(carsEditableFieldGroup).let { nodes -> + nodes.filterDescendantsOf("field_group_item_2").let { + it.find("brand").performTextInput("Ford") + nodes.find("cars 2").performClick() // remove focus to propagate data + it.find("Ford").assertExists() } } // verify data in row 2 propagated to duplicated - onAllNodes(hasAnyAncestor(hasTestTag("field_group_template_[Cars repeating view readonly]"))).let { nodes -> - nodes.filter(hasAnyAncestor(hasTestTag("field_group_item_2"))).let { - waitUntilAtLeastOneExists(it, hasText("Ford"), timeoutMillis = 5000L) - } + onAllDescendantsOf(carsReadonlyFieldGroup).filterDescendantsOf("field_group_item_2").let { + waitUntilExactlyOneExists(it, hasText("Ford"), timeoutMillis = 5000L) } // 2nd step onNodeWithText("Next").performClick() - waitForNode("ED repeating view readonly (", substring = true) + waitForNode("ED repeating view readonly", substring = true) // verify row 1 on second step - onAllNodes(hasAnyAncestor(hasTestTag("field_group_template_[Cars repeating view readonly]"))).let { - verifyEmbeddedDataRecord(it, expectedDate = "2025-12-16", isEditable = false) + verifyFieldGroupItem( + onAllDescendantsOf(carsReadonlyFieldGroup), + expectedDate = "2025-12-16", + isEditable = false + ) + } + + @Test + fun test_embedded_data_table_simple_table() = runComposeUiTest { + setupApp("O40M3A-MarekCo-Work-EmbeddedDataTest-EditableTable") + + val columnValues = mutableMapOf( + "brand" to "Ford", + "model" to "Focus", + "Price" to "123456", + "IsFirstOwner" to "Yes", + "interior" to "comfort", + "Insurance" to "gold", + "client meeting date" to "2026-01-08", + "Client meeting time" to "12:00 AM", + "Transaction date time" to "2026-01-08 12:00 AM", + "Notes" to "This is a note" + ) + val edContext = "caseInfo.content.EmbeddedDataListOfRecords" + + // create case + onNodeWithText("New Service").performClick() + + // Step 1 - editable table + // verify form title + waitForNode("ED table editable", substring = true) + // verify table title + waitForNode("Cars editable table") + // verify columns + columnValues.keys.forEach { waitForTableNode(it.uppercase()) } + + // verify add and delete records + onNodeWithText("+ Add cars").performClick() + waitUntilAtLeastOneExists(hasContentDescription("Delete item 1")) + waitUntilAtLeastOneExists(hasContentDescription("Reorder item 1")) + onAllNodes(hasContentDescription("Delete item 1")).onFirst().performClick() + waitUntilDoesNotExist(hasContentDescription("Delete item 1")) + waitUntilDoesNotExist(hasContentDescription("Reorder item 1")) + // verify adding record with data + onNodeWithText("+ Add cars").performClick() + performTextInput("$edContext[0].Brand", "Ford") + performTextInput("$edContext[0].Model", "Focus") + performTextInput("$edContext[0].Price", "123456") + performClick("$edContext[0].IsFirstOwner") + performClick("$edContext[0].Interior") + onNodeWithText("comfort").performClick() + performClick("$edContext[0].Insurance") + onNodeWithText("gold").performClick() + performClick("$edContext[0].ClientMeetingDate") + onNodeWithText("Today, ", substring = true).performClick() + onNodeWithText("OK").performClick() + performClick("$edContext[0].ClientMeetingTime") + onNodeWithText("OK").performClick() + performClick("$edContext[0].TransactionDateTime") + onNodeWithText("Today, ", substring = true).performClick() + onNodeWithText("OK").performClick() + onNodeWithText("OK").performClick() + performTextInput("$edContext[0].Notes", "This is a note") + + // Step 2 - editable table with popup + waitForNode("Next") + onNodeWithText("Next").performClick() + // verify form title + waitForNode("ED table editable popup", substring = true) + // verify table title + waitForNode("Cars editable table with popup") + // verify columns + columnValues.keys.forEach { waitForTableNode(it.uppercase()) } + // verify table data + columnValues.values.forEach { waitForTableNode(it) } + // verify reorder icon exists + waitUntilAtLeastOneExists(hasContentDescription("Reorder item 1")) + // verify edit record popup + onAllNodes(hasContentDescription("Edit item 1")).onFirst().performScrollTo().performClick() + waitForNode("Edit Record") + + onAllDescendantsOf("ModalViewContainer").let { modal -> + columnValues.forEach { + modal.find(it.key).assertExists() + if (it.key != "IsFirstOwner") { // not able to check checkbox state + modal.find(it.value).assertExists() + } + } + modal.find("model").performTextReplacement("Fiesta") + modal.find("Submit").performScrollTo().performClick() } + waitUntilDoesNotExist(hasText("Edit Record"), timeoutMillis = 3000) + // verify updated record in table + waitForTableNode("Fiesta") + + // adding new record via popup + onNodeWithText("+ Add cars").performScrollTo().performClick() + waitForNode("Add Record") + onAllDescendantsOf("ModalViewContainer").let { modal -> + modal.find("Submit").performScrollTo().performClick() + waitUntilExactlyOneExists(modal, hasText("brand: Cannot be blank")) + + modal.find("brand").performTextReplacement("Opel") + modal.find("model").performTextReplacement("Astra") + modal.find("Submit").performScrollTo().performClick() + } + waitUntilDoesNotExist(hasText("Add Record"), timeoutMillis = 3000) + // verify new record in table + waitForTableNode("Opel") + waitForTableNode("Astra") + + // Step 3 - readonly simple table + onNodeWithText("Next").performClick() + // verify form title + waitForNode("ED simple table readonly", substring = true) + // verify table title + waitForNode("Cars readonly simple table") + verifyReadonlyTable(columnValues) + + // Step 4 - readonly table + onNodeWithText("Next").performClick() + // verify form title + waitForNode("ED table readonly", substring = true) + // verify table title + waitForNode("Cars readonly table") + verifyReadonlyTable(columnValues) + } + + @Test + fun test_embedded_data_add_edit_remove_conditions() = runComposeUiTest { + // Step 1 - Editable table + setupApp("O40M3A-MarekCo-Work-EmbeddedDataTest-Conditions") + // create case + onNodeWithText("New Service").performClick() + // verify form title + waitForNode("ED table editable conditions", substring = true) + // verify table title + waitForNode("Cars editable table") + + waitForNode("+ Add cars") + onNodeWithText("+ Add cars").performClick() + // verify add/edit/remove/reorder + waitForNode("+ Add cars") + val edContext = "caseInfo.content.EmbeddedDataListOfRecords" + performTextInput("$edContext[0].Brand", "Ford") + waitUntilAtLeastOneExists(hasContentDescription("Delete item 1")) + waitUntilAtLeastOneExists(hasContentDescription("Reorder item 1")) + + onNodeWithText("disable add/edit/remove/reorder").onSiblings().onFirst().performClick() + + waitUntilDoesNotExist(hasText("+ Add cars")) + waitUntilDoesNotExist(hasSetTextAction()) + waitUntilDoesNotExist(hasContentDescription("Delete item 1")) + waitUntilDoesNotExist(hasContentDescription("Reorder item 1")) + + onNodeWithText("disable add/edit/remove/reorder").onSiblings().onFirst().performClick() + + // Step 2 - Editable popup table + onNodeWithText("Next").performClick() + // verify form title + waitForNode("ED table editable popup conditions", substring = true) + // verify table title + waitForNode("Cars editable table with popup", substring = true) + // verify add/edit/remove/reorder + waitForNode("+ Add cars") + waitUntilAtLeastOneExists(hasContentDescription("Edit item 1")) + waitUntilAtLeastOneExists(hasContentDescription("Delete item 1")) + waitUntilAtLeastOneExists(hasContentDescription("Reorder item 1")) + + onNodeWithText("disable add/edit/remove/reorder").onSiblings().onFirst().performClick() + + waitUntilDoesNotExist(hasText("+ Add cars")) + waitUntilDoesNotExist(hasContentDescription("Edit item 1")) + waitUntilDoesNotExist(hasContentDescription("Delete item 1")) + waitUntilDoesNotExist(hasContentDescription("Reorder item 1")) } - fun ComposeUiTest.verifyEmbeddedDataRecord( + private fun ComposeUiTest.verifyFieldGroupItem( nodes: SemanticsNodeInteractionCollection, expectedDate: String, isEditable: Boolean ) { with(nodes) { - findFirstWithText("Audi").assertExists() - findFirstWithText("A5").assertExists() - findFirstWithText("123000").assertExists() + find("Audi").assertExists() + find("A5").assertExists() + find("123000").assertExists() if (!isEditable) { - findFirstWithText("Yes").assertExists() + find("Yes").assertExists() } - findFirstWithText("comfort").assertExists() - findFirstWithText("gold").assertExists() - findFirstWithText(expectedDate).assertExists() - findFirstWithText("12:00 AM").assertExists() - findFirstWithText("$expectedDate 12:00 AM").assertExists() - findFirstWithText("Notes").performScrollTo() - waitUntilAtLeastOneExists(nodes, hasText("This is a note"), timeoutMillis = 5000L) + find("comfort").assertExists() + find("gold").assertExists() + find(expectedDate).assertExists() + find("12:00 AM").assertExists() + find("$expectedDate 12:00 AM").assertExists() + find("Notes").performScrollTo() + waitUntilExactlyOneExists(nodes, hasText("This is a note"), timeoutMillis = 5000L) + } + } + + private fun ComposeUiTest.verifyReadonlyTable(columnValues: MutableMap) { + // verify columns + columnValues.keys.forEach { waitForTableNode(it.uppercase()) } + // verify table data + columnValues["model"] = "Fiesta" // updated model name + columnValues.values.forEach { + waitForTableNode(it) } + waitForTableNode("Opel") + waitForTableNode("Astra") + // verify absence of add/edit/delete actions + waitUntilDoesNotExist(hasText("+ Add cars")) + waitUntilDoesNotExist(hasContentDescription("Edit item 1")) + waitUntilDoesNotExist(hasContentDescription("Delete item 1")) + waitUntilDoesNotExist(hasContentDescription("Reorder item 1")) + } + + private fun ComposeUiTest.performTextInput(testTag: String, inputText: String) { + waitUntilAtLeastOneExists(hasTestTag(testTag)) + onAllDescendantsOf(testTag).filter(hasSetTextAction()).onFirst().performTextInput(inputText) + } + + private fun ComposeUiTest.performClick(testTag: String) { + waitUntilAtLeastOneExists(hasTestTag(testTag)) + onAllDescendantsOf(testTag) + .filter(hasClickAction()).onFirst().performScrollTo().performClick() } - fun SemanticsNodeInteractionCollection.findFirstWithText(text: String) = + private fun SemanticsNodeInteractionCollection.find(text: String) = this.filter(hasText(text)).onFirst() - fun ComposeUiTest.waitUntilAtLeastOneExists( + private fun ComposeUiTest.waitUntilExactlyOneExists( nodes: SemanticsNodeInteractionCollection, matcher: SemanticsMatcher, timeoutMillis: Long = 5000L @@ -158,4 +361,14 @@ class EmbeddedDataTest : ComposeTest(PegaVersion.v24_2_2) { nodes.filter(matcher).fetchSemanticsNodes().size == 1 } } + + private fun SemanticsNodeInteractionsProvider.onAllDescendantsOf(testTag: String) = + onAllNodes(hasAnyAncestor(hasTestTag(testTag))) + + private fun SemanticsNodeInteractionCollection.filterDescendantsOf(testTag: String) = + filter(hasAnyAncestor(hasTestTag(testTag))) + + // Only one table node with the given text is visible, + // but for some reason the test framework detects two. + private fun ComposeUiTest.waitForTableNode(text: String) = waitForNodes(text, count = 2) } diff --git a/scripts/dxcomponents/components/containers/templates/simple-table-manual.component.js b/scripts/dxcomponents/components/containers/templates/simple-table-manual.component.js index 14fab1bb..4d20e89b 100644 --- a/scripts/dxcomponents/components/containers/templates/simple-table-manual.component.js +++ b/scripts/dxcomponents/components/containers/templates/simple-table-manual.component.js @@ -91,8 +91,8 @@ export class SimpleTableManualComponent extends BaseComponent { presets, allowActions, allowTableEdit, - allowRowDelete, - allowRowEdit, + allowRowDelete: allowRowDeleteExpression, + allowRowEdit: allowRowEditExpression, label: labelProp, propertyLabel, editMode, @@ -108,10 +108,13 @@ export class SimpleTableManualComponent extends BaseComponent { const conditions = this.#calculateConditions(editMode, allowActions, allowTableEdit) this.referenceListStr = getContext(this.pConn).referenceListStr; - this.props.label = this.pConn.getInheritedProps().label ?? labelProp ?? propertyLabel; + this.props.label = this.pConn.getInheritedProps().label || labelProp || propertyLabel; this.targetClassLabel = targetClassLabel; this.props.addButtonLabel = targetClassLabel ? `+ Add ${targetClassLabel}` : "+ Add"; - this.referenceList = referenceList; + this.referenceList = referenceList.map((element) => { + element.allowEdit = conditions.allowEditRow && evaluateAllowRowAction(allowRowEditExpression, element) + return element; + }); this.contextClass = this.#getContextClass(configProps); this.pConn.setReferenceList(getReferenceList(this.pConn)); @@ -141,8 +144,18 @@ export class SimpleTableManualComponent extends BaseComponent { this.props.columnLabels = this.#getColumnLabels(fieldDefs, resolvedFields); if ((!this.#listsEqual(this.prevReferenceList, this.referenceList))) { - this.#buildRows(rawFields, editableMode, conditions.allowDeleteRow, allowRowDelete, conditions.allowEditRow, allowRowEdit); + this.#buildRows(rawFields); } + this.props.rows = this.editableRows.map((row, rowIndex) => { + const allowDelete = conditions.allowDeleteRow && evaluateAllowRowAction(allowRowDeleteExpression, this.referenceList[rowIndex]) + const showEditButton = editableMode && this.allowEditingInModal && this.referenceList[rowIndex].allowEdit + const showDeleteButton = editableMode && allowDelete + return { + cellComponentIds: row.cells.map((cell) => cell.component.compId), + showEditButton: showEditButton, + showDeleteButton: showDeleteButton + } + }); this.prevReferenceList = this.referenceList; this.componentsManager.onComponentPropsUpdate(this) } @@ -200,13 +213,10 @@ export class SimpleTableManualComponent extends BaseComponent { } } - #buildRows(rawFields, editableMode, allowDelete, allowRowDeleteExpression, allowEdit, allowRowEditExpression) { + #buildRows(rawFields) { const context = this.pConn.getContextName(); const newEditableRows = []; this.referenceList.forEach((element, rowIndex) => { - const showDeleteButton = editableMode && allowDelete && evaluateAllowRowAction(allowRowDeleteExpression, element); - const showEditButton = editableMode && allowEdit && evaluateAllowRowAction(allowRowEditExpression, element) && this.allowEditingInModal; - const editableRow = this.editableRows[rowIndex]; const newEditableCells = []; rawFields?.forEach((item, cellIndex) => { @@ -216,7 +226,7 @@ export class SimpleTableManualComponent extends BaseComponent { config: { ...item.config, label: '', - displayMode: this.readOnlyMode || this.allowEditingInModal ? 'DISPLAY_ONLY' : undefined + displayMode: this.readOnlyMode || this.allowEditingInModal || !element.allowEdit ? 'DISPLAY_ONLY' : undefined } }; const referenceListData = getReferenceList(this.pConn); @@ -238,20 +248,9 @@ export class SimpleTableManualComponent extends BaseComponent { newEditableCells.push({ component: newComponent }) } }); - newEditableRows.push({ - cells: newEditableCells, - showEditButton: showEditButton, - showDeleteButton: showDeleteButton - }); + newEditableRows.push({ cells: newEditableCells}); }); this.editableRows = newEditableRows; - this.props.rows = newEditableRows.map((row) => { - return { - cellComponentIds: row.cells.map((cell) => cell.component.compId), - showEditButton: row.showEditButton, - showDeleteButton: row.showDeleteButton - } - }); } #addSimpleTableRow() { diff --git a/scripts/dxcomponents/components/containers/view.component.js b/scripts/dxcomponents/components/containers/view.component.js index 86d40866..ee400c6f 100644 --- a/scripts/dxcomponents/components/containers/view.component.js +++ b/scripts/dxcomponents/components/containers/view.component.js @@ -77,10 +77,10 @@ export class ViewComponent extends ContainerBaseComponent { const template = this.#resolveTemplateType(configProps); const label = configProps.label ?? ""; - const showLabel = configProps.showLabel || this.DETAILS_TEMPLATES.includes(template) || this.props.showLabel; - + const showLabel = configProps.showLabel || this.DETAILS_TEMPLATES.includes(template); + const isTemplateWithHeader = !this.NO_HEADER_TEMPLATES.includes(template); this.props.label = inheritedProps.label ?? label; - this.props.showLabel = (inheritedProps.showLabel ?? showLabel) && !this.NO_HEADER_TEMPLATES.includes(template); + this.props.showLabel = (inheritedProps.showLabel || showLabel) && isTemplateWithHeader; this.props.visible = configProps.visibility ?? this.props.visible; if (this.READ_ONLY_DETAILS_TEMPLATES.includes(template)) { diff --git a/test/src/commonMain/composeResources/files/responses/dx/assignments/EmbeddedDataTest-Conditions.json b/test/src/commonMain/composeResources/files/responses/dx/assignments/EmbeddedDataTest-Conditions.json new file mode 100644 index 00000000..8339c5a2 --- /dev/null +++ b/test/src/commonMain/composeResources/files/responses/dx/assignments/EmbeddedDataTest-Conditions.json @@ -0,0 +1,672 @@ +{ + "data": { + "caseInfo": { + "caseTypeID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "owner": "rep@mediaco", + "availableActions": [{ + "name": "Edit details", + "links": { + "open": { + "rel": "self", + "href": "/cases/O40M3A-MAREKCO-WORK E-26028/actions/pyUpdateCaseDetails", + "type": "GET", + "title": "Get case action details" + } + }, + "ID": "pyUpdateCaseDetails", + "type": "Case" + }, { + "name": "Change stage", + "links": { + "open": { + "rel": "self", + "href": "/cases/O40M3A-MAREKCO-WORK E-26028/actions/pyChangeStage", + "type": "GET", + "title": "Get case action details" + } + }, + "ID": "pyChangeStage", + "type": "Case" + }], + "associations": { + "follows": false + }, + "lastUpdatedBy": "rep@mediaco", + "assignments": [{ + "instructions": "", + "canPerform": "true", + "assigneeInfo": { + "name": "Administrator", + "ID": "rep@mediaco", + "type": "worklist" + }, + "processID": "CreateForm_Default", + "urgency": "10", + "processName": "Create", + "isMultiStep": "true", + "name": "ED table editable popup conditions ", + "context": "", + "links": { + "open": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT", + "type": "GET", + "title": "Get assignment details" + } + }, + "ID": "ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT", + "actions": [{ + "name": "Ed table editable popup conditions ", + "links": { + "submit": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/actions/EdTableEditablePopupConditions", + "type": "PATCH", + "title": "Submit assignment action " + }, + "save": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/actions/EdTableEditablePopupConditions/save", + "type": "PATCH", + "title": "Save assignment action " + }, + "open": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/actions/EdTableEditablePopupConditions", + "type": "GET", + "title": "Get assignment action details" + } + }, + "ID": "EdTableEditablePopupConditions", + "type": "FlowAction" + }] + }], + "hasNewAttachments": false, + "businessID": "E-26028", + "sla": { + "goal": "", + "deadline": "" + }, + "WidgetsToRefresh": ["TaskList"], + "caseTypeName": "EmbeddedDataTest", + "urgency": "10", + "createTime": "2026-01-12T14:37:57.600Z", + "createdBy": "rep@mediaco", + "name": "EmbeddedDataTest", + "stages": [{ + "entryTime": "2026-01-12T14:37:57.606Z", + "name": "Create", + "links": { + "open": { + "rel": "self", + "href": "/cases/O40M3A-MAREKCO-WORK E-26028/stages/PRIM0", + "type": "PUT", + "title": "Jump to this stage" + } + }, + "visited_status": "active", + "ID": "PRIM0", + "type": "Primary", + "transitionType": "create" + }], + "ID": "O40M3A-MAREKCO-WORK E-26028", + "caseTypeIcon": "cmicons/pycase.svg", + "status": "New", + "stageID": "PRIM0", + "stageLabel": "Create", + "lastUpdateTime": "2026-01-12T14:38:01.637Z", + "content": { + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "DisableAddeditremovereorder": false, + "EmbeddedDataListOfRecords": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "Brand": "Ford" + }], + "pxObjClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "pyLabel": "EmbeddedDataTest", + "pyID": "E-26028" + } + } + }, + "uiResources": { + "resources": { + "views": { + "EdTableEditablePopupConditions": [{ + "name": "EdTableEditablePopupConditions", + "type": "View", + "config": { + "template": "DefaultForm", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "localeReference": "@LR O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDTABLEEDITABLEPOPUPCONDITIONS" + }, + "children": [{ + "name": "Fields", + "type": "Region", + "children": [{ + "type": "Checkbox", + "config": { + "caption": "@FL .DisableAddeditremovereorder", + "value": "@P .DisableAddeditremovereorder", + "labelOption": "default", + "captionOption": "default", + "trueLabel": "@L Yes", + "falseLabel": "@L No" + } + }, { + "type": "reference", + "config": { + "name": "EdTableEditablePopupConditions_EmbeddedDataListOfRecords", + "inheritedProps": [{ + "prop": "label", + "value": "@L Cars editable table with popup" + }], + "authorContext": ".EmbeddedDataListOfRecords", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "labelOption": "custom", + "type": "view" + } + }] + }], + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "EdTableEditablePopupConditions_EmbeddedDataListOfRecords": [{ + "name": "EdTableEditablePopupConditions_EmbeddedDataListOfRecords", + "type": "View", + "config": { + "type": "multirecordlist", + "contextClass": "O40M3A-MarekCo-Data-Cars", + "referenceList": "@P .EmbeddedDataListOfRecords", + "targetClassLabel": "@L cars", + "heading": "@L cars", + "name": "EmbeddedDataListOfRecords", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "renderMode": "Editable", + "multiRecordDisplayAs": "table", + "template": "SimpleTable", + "children": [{ + "name": "Columns", + "type": "Region", + "children": [{ + "type": "TextInput", + "config": { + "value": "@P .Brand", + "label": "@FL .Brand", + "labelOption": "default" + } + }, { + "type": "TextInput", + "config": { + "value": "@P .Model", + "label": "@FL .Model", + "labelOption": "default" + } + }, { + "type": "Currency", + "config": { + "value": "@P .Price", + "label": "@FL .Price", + "labelOption": "default", + "isoCodeSelection": "constant", + "currencyISOCode": "USD", + "allowDecimals": true + } + }] + }], + "editMode": "modal", + "editModeConfig": { + "defaultView": "Create" + }, + "parentClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "dataRetrievalType": "MANUAL", + "propertyLabel": "@L EmbeddedDataListOfRecords", + "localeReference": "@LR O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDTABLEEDITABLEPOPUPCONDITIONS_EMBEDDEDDATALISTOFRECORDS", + "allowActions": { + "allowAdd": "@E .DisableAddeditremovereorder == false", + "allowEdit": "@E .DisableAddeditremovereorder == false", + "allowDelete": "@E .DisableAddeditremovereorder == false", + "allowDragDrop": "@E .DisableAddeditremovereorder == false" + }, + "allowRowDelete": "@E .Brand != 'no_delete'", + "allowRowEdit": "@E .Brand != 'no_edit'" + }, + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "Create": [{ + "name": "Create", + "type": "View", + "config": { + "template": "DefaultForm", + "ruleClass": "O40M3A-MarekCo-Data-Cars", + "localeReference": "@LR O40M3A-MAREKCO-DATA-CARS!VIEW!CREATE" + }, + "children": [{ + "name": "Fields", + "type": "Region", + "children": [{ + "type": "Integer", + "config": { + "value": "@P .Id", + "label": "@FL .Id", + "labelOption": "default" + } + }, { + "type": "TextInput", + "config": { + "value": "@P .Brand", + "label": "@FL .Brand", + "labelOption": "default" + } + }, { + "type": "TextInput", + "config": { + "value": "@P .Model", + "label": "@FL .Model", + "labelOption": "default" + } + }, { + "type": "TextInput", + "config": { + "value": "@P .Color", + "label": "@FL .Color", + "labelOption": "default" + } + }, { + "type": "TextInput", + "config": { + "value": "@P .Owner", + "label": "@FL .Owner", + "labelOption": "default" + } + }, { + "type": "DateTime", + "config": { + "value": "@P .BuyDate", + "label": "@FL .BuyDate", + "labelOption": "default" + } + }, { + "type": "Checkbox", + "config": { + "caption": "@FL .IsFirstOwner", + "value": "@P .IsFirstOwner", + "labelOption": "default", + "captionOption": "default", + "trueLabel": "@L Yes", + "falseLabel": "@L No" + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Insurance", + "label": "@FL .Insurance", + "labelOption": "default", + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Insurance", + "deferDatasource": true + } + }] + }], + "classID": "O40M3A-MarekCo-Data-Cars" + }] + }, + "paragraphs": { + "DisableAddeditremovereorder_additionalInfo": [{ + "content": "", + "name": "DisableAddeditremovereorder_additionalInfo", + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "EmbeddedDataListOfRecords_additionalInfo": [{ + "content": "", + "name": "EmbeddedDataListOfRecords_additionalInfo", + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "Brand_additionalInfo": [{ + "content": "", + "name": "Brand_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Model_additionalInfo": [{ + "content": "", + "name": "Model_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Price_additionalInfo": [{ + "content": "", + "name": "Price_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "IsFirstOwner_additionalInfo": [{ + "content": "", + "name": "IsFirstOwner_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Insurance_additionalInfo": [{ + "content": "", + "name": "Insurance_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Id_additionalInfo": [{ + "content": "", + "name": "Id_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }] + }, + "datapages": { + "D_InsuranceList": { + "classID": "O40M3A-MarekCo-Data-Insurance", + "mode": "readonly", + "isSearchable": false, + "isQueryable": true, + "structure": "list", + "isWorkObject": false, + "isDataObject": true + }, + "D_cars": { + "parameters": [{ + "name": "Id", + "defaultValue": "", + "linkedField": "Id" + }], + "classID": "O40M3A-MarekCo-Data-Cars", + "mode": "readonly", + "isSearchable": false, + "isQueryable": false, + "isAlternateKeyStorage": true, + "structure": "page" + }, + "D_carsSavable": { + "parameters": [{ + "name": "Id", + "defaultValue": "", + "linkedField": "Id" + }], + "classID": "O40M3A-MarekCo-Data-Cars", + "mode": "editable", + "isSearchable": false, + "isQueryable": false, + "isAlternateKeyStorage": true, + "structure": "page" + } + }, + "dataTypes": { + "O40M3A-MarekCo-Data-Cars": { + "classKeys": ["Id"], + "savableDataPage": "D_carsSavable", + "lookupDataPage": "D_cars", + "lookupDataPageInfo": { + "isAlternateKeyStorage": true, + "parameters": { + "Id": "@P .Id" + } + } + } + }, + "fields": { + "DisableAddeditremovereorder": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "True-False", + "displayAs": "pxCheckbox", + "additionalInformation": "@PARAGRAPH DisableAddeditremovereorder_additionalInfo", + "label": "disable add/edit/remove/reorder" + }], + "EmbeddedDataListOfRecords": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Page List", + "dataRetrievalType": "manual", + "additionalInformation": "@PARAGRAPH EmbeddedDataListOfRecords_additionalInfo", + "pageClass": "O40M3A-MarekCo-Data-Cars", + "label": "EmbeddedDataListOfRecords" + }], + "Brand": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Brand_additionalInfo", + "label": "brand" + }], + "Model": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Model_additionalInfo", + "label": "model" + }], + "Price": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Decimal", + "displayAs": "pxCurrency", + "additionalInformation": "@PARAGRAPH Price_additionalInfo", + "label": "Price" + }], + "IsFirstOwner": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "True-False", + "displayAs": "pxCheckbox", + "additionalInformation": "@PARAGRAPH IsFirstOwner_additionalInfo", + "label": "IsFirstOwner" + }], + "Insurance": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Insurance_additionalInfo", + "label": "Insurance", + "datasource": { + "tableType": "DataPage", + "tableClass": "O40M3A-MarekCo-Data-Insurance", + "name": "D_InsuranceList", + "propertyForDisplayText": "@P .Name", + "propertyForValue": "@P .pyGUID", + "parameters": [] + } + }], + "Color": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Unknown" + }], + "BuyDate": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Unknown" + }], + "Id": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Integer", + "displayAs": "pxInteger", + "additionalInformation": "@PARAGRAPH Id_additionalInfo", + "label": "id", + "isClassKey": true + }], + "Owner": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Unknown" + }], + "pyLabel": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Text", + "maxLength": 64, + "displayAs": "pxTextInput", + "definedOnClassID": "Work-", + "expectedLength": 60, + "label": "Label" + }], + "pyID": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Text", + "maxLength": 32, + "displayAs": "pxDisplayText", + "definedOnClassID": "Work-Cover-", + "expectedLength": 22, + "label": "Case ID", + "isClassKey": true + }] + } + }, + "components": ["Integer", "DefaultForm", "Checkbox", "Currency", "SimpleTable", "Dropdown", "Region", "TextInput", "View", "DateTime"], + "localeReferences": ["O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDTABLEEDITABLEPOPUPCONDITIONS", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!MODEL_ADDITIONALINFO", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!PARAGRAPH!EMBEDDEDDATALISTOFRECORDS_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INSURANCE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!BRAND_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!VIEW!CREATE", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDTABLEEDITABLEPOPUPCONDITIONS_EMBEDDEDDATALISTOFRECORDS", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!ID_ADDITIONALINFO", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!PARAGRAPH!DISABLEADDEDITREMOVEREORDER_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!PRICE_ADDITIONALINFO", "@BASECLASS!DATAPAGE!D_INSURANCELIST", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!CASE!EMBEDDEDDATATEST", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!ISFIRSTOWNER_ADDITIONALINFO"], + "root": { + "type": "reference", + "config": { + "type": "view", + "name": "EdTableEditablePopupConditions", + "context": "caseInfo.content" + } + }, + "context_data": { + "caseInfo": { + "content": { + "EmbeddedDataListOfRecordsTemp": [{ + "summary_of_associated_lists__": {} + }] + } + } + }, + "navigation": { + "template": "Horizontal", + "steps": [{ + "allow_jump": true, + "name": "ED table editable conditions", + "actionID": "EDCheckAddeditremoveConditions", + "visited_status": "success", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF7", + "type": "PATCH", + "title": "Go to ED table editable conditions" + } + }, + "ID": "AssignmentSF7" + }, { + "allow_jump": true, + "name": "Ed table editable popup conditions ", + "actionID": "EdTableEditablePopupConditions", + "visited_status": "current", + "ID": "AssignmentSF8" + }, { + "allow_jump": true, + "name": "ED table editable", + "actionID": "EmbeddedDataDisplayAsRepeatingViewEdit", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF4", + "type": "PATCH", + "title": "Go to ED table editable" + } + }, + "ID": "AssignmentSF4" + }, { + "allow_jump": true, + "name": "ED table editable popup", + "actionID": "EDTableEditablePopup", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF5", + "type": "PATCH", + "title": "Go to ED table editable popup" + } + }, + "ID": "AssignmentSF5" + }, { + "allow_jump": true, + "name": "ED simple table readonly", + "actionID": "EDSimpleTableReadonly", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF1", + "type": "PATCH", + "title": "Go to ED simple table readonly" + } + }, + "ID": "AssignmentSF1" + }, { + "allow_jump": true, + "name": "ED table readonly", + "actionID": "EmbeddedDataDisplayAsTable", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF3", + "type": "PATCH", + "title": "Go to ED table readonly" + } + }, + "ID": "AssignmentSF3" + }, { + "allow_jump": true, + "name": "ED repeating view editable", + "actionID": "EDRepeatingViewEditable", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF2", + "type": "PATCH", + "title": "Go to ED repeating view editable" + } + }, + "ID": "AssignmentSF2" + }, { + "allow_jump": true, + "name": "ED repeating view readonly", + "actionID": "EDRepeatingViewReadonly", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF6", + "type": "PATCH", + "title": "Go to ED repeating view readonly" + } + }, + "ID": "AssignmentSF6" + }] + }, + "actionButtons": { + "secondary": [{ + "jsAction": "cancelAssignment", + "name": "Cancel", + "actionID": "cancel" + }, { + "jsAction": "navigateToStep", + "name": "Previous", + "actionID": "back", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/navigation_steps/previous", + "type": "PATCH", + "title": "Go back to previous step" + } + } + }], + "main": [{ + "jsAction": "finishAssignment", + "name": "Next ", + "actionID": "next" + }] + } + }, + "nextAssignmentInfo": { + "context": "self", + "className": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "links": { + "open": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT", + "type": "GET", + "title": "Get assignment details" + } + }, + "ID": "ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT" + } +} \ No newline at end of file diff --git a/test/src/commonMain/composeResources/files/responses/dx/assignments/EmbeddedDataTest-EditableTablePopup.json b/test/src/commonMain/composeResources/files/responses/dx/assignments/EmbeddedDataTest-EditableTablePopup.json new file mode 100644 index 00000000..050d2904 --- /dev/null +++ b/test/src/commonMain/composeResources/files/responses/dx/assignments/EmbeddedDataTest-EditableTablePopup.json @@ -0,0 +1,756 @@ +{ + "data": { + "caseInfo": { + "caseTypeID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "owner": "rep@mediaco", + "availableActions": [{ + "name": "Edit details", + "links": { + "open": { + "rel": "self", + "href": "/cases/O40M3A-MAREKCO-WORK E-24003/actions/pyUpdateCaseDetails", + "type": "GET", + "title": "Get case action details" + } + }, + "ID": "pyUpdateCaseDetails", + "type": "Case" + }, { + "name": "Change stage", + "links": { + "open": { + "rel": "self", + "href": "/cases/O40M3A-MAREKCO-WORK E-24003/actions/pyChangeStage", + "type": "GET", + "title": "Get case action details" + } + }, + "ID": "pyChangeStage", + "type": "Case" + }], + "associations": { + "follows": false + }, + "lastUpdatedBy": "rep@mediaco", + "assignments": [{ + "instructions": "", + "canPerform": "true", + "assigneeInfo": { + "name": "Administrator", + "ID": "rep@mediaco", + "type": "worklist" + }, + "processID": "CreateForm_Default", + "urgency": "10", + "processName": "Create", + "isMultiStep": "true", + "name": "ED table editable popup", + "context": "", + "links": { + "open": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT", + "type": "GET", + "title": "Get assignment details" + } + }, + "ID": "ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT", + "actions": [{ + "name": "ED table editable popup", + "links": { + "submit": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/actions/EDTableEditablePopup", + "type": "PATCH", + "title": "Submit assignment action " + }, + "save": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/actions/EDTableEditablePopup/save", + "type": "PATCH", + "title": "Save assignment action " + }, + "open": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/actions/EDTableEditablePopup", + "type": "GET", + "title": "Get assignment action details" + } + }, + "ID": "EDTableEditablePopup", + "type": "FlowAction" + }] + }], + "hasNewAttachments": false, + "businessID": "E-24003", + "sla": { + "goal": "", + "deadline": "" + }, + "WidgetsToRefresh": ["TaskList"], + "caseTypeName": "EmbeddedDataTest", + "urgency": "10", + "createTime": "2026-01-07T14:17:20.983Z", + "createdBy": "rep@mediaco", + "name": "EmbeddedDataTest", + "stages": [{ + "entryTime": "2026-01-07T14:17:20.990Z", + "name": "Create", + "links": { + "open": { + "rel": "self", + "href": "/cases/O40M3A-MAREKCO-WORK E-24003/stages/PRIM0", + "type": "PUT", + "title": "Jump to this stage" + } + }, + "visited_status": "active", + "ID": "PRIM0", + "type": "Primary", + "transitionType": "create" + }], + "ID": "O40M3A-MAREKCO-WORK E-24003", + "caseTypeIcon": "cmicons/pycase.svg", + "status": "New", + "stageID": "PRIM0", + "stageLabel": "Create", + "lastUpdateTime": "2026-01-07T14:17:50.466Z", + "content": { + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "EmbeddedDataListOfRecords": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "Brand": "Ford", + "Model": "Focus", + "Price": "123456", + "IsFirstOwner": true, + "Interior": "comfort", + "Insurance": "8b42e334-5541-4658-86b5-1871e7b2133e", + "ClientMeetingDate": "2026-01-08", + "ClientMeetingTime": "00:00:00", + "TransactionDateTime": "2026-01-08T05:00:00.000Z", + "Notes": "This is a note" + }], + "pxObjClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "pyLabel": "EmbeddedDataTest", + "pyID": "E-24003" + } + } + }, + "uiResources": { + "resources": { + "views": { + "EDTableEditablePopup": [{ + "name": "EDTableEditablePopup", + "type": "View", + "config": { + "template": "DefaultForm", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "localeReference": "@LR O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDTABLEEDITABLEPOPUP" + }, + "children": [{ + "name": "Fields", + "type": "Region", + "children": [{ + "type": "reference", + "config": { + "name": "EDTableEditablePopup_EmbeddedDataListOfRecords", + "inheritedProps": [{ + "prop": "label", + "value": "@L Cars editable table with popup" + }], + "authorContext": ".EmbeddedDataListOfRecords", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "labelOption": "custom", + "type": "view" + } + }] + }], + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "EDTableEditablePopup_EmbeddedDataListOfRecords": [{ + "name": "EDTableEditablePopup_EmbeddedDataListOfRecords", + "type": "View", + "config": { + "type": "multirecordlist", + "contextClass": "O40M3A-MarekCo-Data-Cars", + "referenceList": "@P .EmbeddedDataListOfRecords", + "targetClassLabel": "@L cars", + "heading": "@L cars", + "name": "EmbeddedDataListOfRecords", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "renderMode": "Editable", + "multiRecordDisplayAs": "table", + "template": "SimpleTable", + "children": [{ + "name": "Columns", + "type": "Region", + "children": [{ + "type": "TextInput", + "config": { + "value": "@P .Brand", + "label": "@FL .Brand", + "labelOption": "default" + } + }, { + "type": "TextInput", + "config": { + "value": "@P .Model", + "label": "@FL .Model", + "labelOption": "default" + } + }, { + "type": "Currency", + "config": { + "value": "@P .Price", + "label": "@FL .Price", + "labelOption": "default", + "isoCodeSelection": "constant", + "currencyISOCode": "USD", + "allowDecimals": true + } + }, { + "type": "Checkbox", + "config": { + "label": "@FL .IsFirstOwner", + "value": "@P .IsFirstOwner", + "labelOption": "default", + "captionOption": "default", + "trueLabel": "@L Yes", + "falseLabel": "@L No", + "caption": "@FL .IsFirstOwner" + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Interior", + "label": "@FL .Interior", + "labelOption": "default", + "deferDatasource": true, + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Interior" + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Insurance", + "label": "@FL .Insurance", + "labelOption": "default", + "deferDatasource": true, + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Insurance" + } + }, { + "type": "Date", + "config": { + "value": "@P .ClientMeetingDate", + "label": "@FL .ClientMeetingDate", + "labelOption": "default" + } + }, { + "type": "Time", + "config": { + "value": "@P .ClientMeetingTime", + "label": "@FL .ClientMeetingTime", + "labelOption": "default" + } + }, { + "type": "DateTime", + "config": { + "value": "@P .TransactionDateTime", + "label": "@FL .TransactionDateTime", + "labelOption": "default" + } + }, { + "type": "TextArea", + "config": { + "value": "@P .Notes", + "label": "@FL .Notes", + "labelOption": "default" + } + }] + }], + "editMode": "modal", + "editModeConfig": { + "defaultView": "Create2", + "useSeparateViewForEdit": false, + "editView": "pyEdit" + }, + "parentClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "dataRetrievalType": "MANUAL", + "propertyLabel": "@L EmbeddedDataListOfRecords", + "localeReference": "@LR O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDTABLEEDITABLEPOPUP_EMBEDDEDDATALISTOFRECORDS" + }, + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "Create2": [{ + "name": "Create2", + "type": "View", + "config": { + "mode": "editable", + "ruleClass": "O40M3A-MarekCo-Data-Cars", + "template": "DefaultForm", + "localeReference": "@LR O40M3A-MAREKCO-DATA-CARS!VIEW!CREATE2" + }, + "children": [{ + "name": "Fields", + "type": "Region", + "children": [{ + "type": "TextInput", + "config": { + "value": "@P .Brand", + "label": "@FL .Brand", + "labelOption": "default", + "required": true + } + }, { + "type": "TextInput", + "config": { + "value": "@P .Model", + "label": "@FL .Model", + "labelOption": "default" + } + }, { + "type": "Currency", + "config": { + "value": "@P .Price", + "label": "@FL .Price", + "labelOption": "default", + "isoCodeSelection": "constant", + "currencyISOCode": "USD", + "allowDecimals": true + } + }, { + "type": "Checkbox", + "config": { + "caption": "@FL .IsFirstOwner", + "value": "@P .IsFirstOwner", + "labelOption": "default", + "captionOption": "default", + "trueLabel": "@L Yes", + "falseLabel": "@L No" + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Interior", + "label": "@FL .Interior", + "labelOption": "default", + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Interior", + "deferDatasource": true + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Insurance", + "label": "@FL .Insurance", + "labelOption": "default", + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Insurance", + "deferDatasource": true + } + }, { + "type": "Date", + "config": { + "value": "@P .ClientMeetingDate", + "label": "@FL .ClientMeetingDate", + "labelOption": "default" + } + }, { + "type": "Time", + "config": { + "value": "@P .ClientMeetingTime", + "label": "@FL .ClientMeetingTime", + "labelOption": "default" + } + }, { + "type": "DateTime", + "config": { + "value": "@P .TransactionDateTime", + "label": "@FL .TransactionDateTime", + "labelOption": "default" + } + }, { + "type": "TextArea", + "config": { + "value": "@P .Notes", + "label": "@FL .Notes", + "labelOption": "default" + } + }] + }], + "classID": "O40M3A-MarekCo-Data-Cars" + }] + }, + "paragraphs": { + "EmbeddedDataListOfRecords_additionalInfo": [{ + "content": "", + "name": "EmbeddedDataListOfRecords_additionalInfo", + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "Brand_additionalInfo": [{ + "content": "", + "name": "Brand_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Model_additionalInfo": [{ + "content": "", + "name": "Model_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Price_additionalInfo": [{ + "content": "", + "name": "Price_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "IsFirstOwner_additionalInfo": [{ + "content": "", + "name": "IsFirstOwner_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Interior_additionalInfo": [{ + "content": "", + "name": "Interior_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Insurance_additionalInfo": [{ + "content": "", + "name": "Insurance_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "ClientMeetingDate_additionalInfo": [{ + "content": "", + "name": "ClientMeetingDate_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "ClientMeetingTime_additionalInfo": [{ + "content": "", + "name": "ClientMeetingTime_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "TransactionDateTime_additionalInfo": [{ + "content": "", + "name": "TransactionDateTime_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Notes_additionalInfo": [{ + "content": "", + "name": "Notes_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }] + }, + "datapages": { + "D_InsuranceList": { + "classID": "O40M3A-MarekCo-Data-Insurance", + "mode": "readonly", + "isSearchable": false, + "isQueryable": true, + "structure": "list", + "isWorkObject": false, + "isDataObject": true + }, + "D_cars": { + "parameters": [{ + "name": "Id", + "defaultValue": "", + "linkedField": "Id" + }], + "classID": "O40M3A-MarekCo-Data-Cars", + "mode": "readonly", + "isSearchable": false, + "isQueryable": false, + "isAlternateKeyStorage": true, + "structure": "page" + }, + "D_carsSavable": { + "parameters": [{ + "name": "Id", + "defaultValue": "", + "linkedField": "Id" + }], + "classID": "O40M3A-MarekCo-Data-Cars", + "mode": "editable", + "isSearchable": false, + "isQueryable": false, + "isAlternateKeyStorage": true, + "structure": "page" + } + }, + "dataTypes": { + "O40M3A-MarekCo-Data-Cars": { + "classKeys": ["Id"], + "savableDataPage": "D_carsSavable", + "lookupDataPage": "D_cars", + "lookupDataPageInfo": { + "isAlternateKeyStorage": true, + "parameters": { + "Id": "@P .Id" + } + } + } + }, + "fields": { + "EmbeddedDataListOfRecords": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Page List", + "dataRetrievalType": "manual", + "additionalInformation": "@PARAGRAPH EmbeddedDataListOfRecords_additionalInfo", + "pageClass": "O40M3A-MarekCo-Data-Cars", + "label": "EmbeddedDataListOfRecords" + }], + "Brand": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Brand_additionalInfo", + "label": "brand" + }], + "Model": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Model_additionalInfo", + "label": "model" + }], + "Price": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Decimal", + "displayAs": "pxCurrency", + "additionalInformation": "@PARAGRAPH Price_additionalInfo", + "label": "Price" + }], + "IsFirstOwner": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "True-False", + "displayAs": "pxCheckbox", + "additionalInformation": "@PARAGRAPH IsFirstOwner_additionalInfo", + "label": "IsFirstOwner" + }], + "Interior": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Interior_additionalInfo", + "label": "interior", + "datasource": { + "tableType": "PromptList", + "records": [{ + "key": "basic", + "value": "basic" + }, { + "key": "comfort", + "value": "comfort" + }, { + "key": "elite", + "value": "elite" + }] + } + }], + "Insurance": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Insurance_additionalInfo", + "label": "Insurance", + "datasource": { + "tableType": "DataPage", + "tableClass": "O40M3A-MarekCo-Data-Insurance", + "name": "D_InsuranceList", + "propertyForDisplayText": "@P .Name", + "propertyForValue": "@P .pyGUID", + "parameters": [] + } + }], + "ClientMeetingDate": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Date", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH ClientMeetingDate_additionalInfo", + "label": "client meeting date" + }], + "ClientMeetingTime": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "TimeOfDay", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH ClientMeetingTime_additionalInfo", + "label": "Client meeting time" + }], + "TransactionDateTime": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Date Time", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH TransactionDateTime_additionalInfo", + "label": "Transaction date time" + }], + "Notes": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxTextArea", + "additionalInformation": "@PARAGRAPH Notes_additionalInfo", + "label": "Notes" + }], + "pyLabel": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Text", + "maxLength": 64, + "displayAs": "pxTextInput", + "definedOnClassID": "Work-", + "expectedLength": 60, + "label": "Label" + }], + "pyID": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Text", + "maxLength": 32, + "displayAs": "pxDisplayText", + "definedOnClassID": "Work-Cover-", + "expectedLength": 22, + "label": "Case ID", + "isClassKey": true + }] + } + }, + "components": ["DefaultForm", "TextArea", "Checkbox", "Currency", "Dropdown", "SimpleTable", "Region", "Time", "TextInput", "View", "Date", "DateTime"], + "localeReferences": ["O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDTABLEEDITABLEPOPUP_EMBEDDEDDATALISTOFRECORDS", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!MODEL_ADDITIONALINFO", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!PARAGRAPH!EMBEDDEDDATALISTOFRECORDS_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INSURANCE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!CLIENTMEETINGTIME_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!BRAND_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!NOTES_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!ASSOCIATED!INTERIOR", "O40M3A-MAREKCO-DATA-CARS!VIEW!CREATE2", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!PRICE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!CLIENTMEETINGDATE_ADDITIONALINFO", "@BASECLASS!DATAPAGE!D_INSURANCELIST", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!CASE!EMBEDDEDDATATEST", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INTERIOR_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!ISFIRSTOWNER_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!TRANSACTIONDATETIME_ADDITIONALINFO", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDTABLEEDITABLEPOPUP"], + "root": { + "type": "reference", + "config": { + "type": "view", + "name": "EDTableEditablePopup", + "context": "caseInfo.content" + } + }, + "context_data": { + "caseInfo": { + "content": { + "EmbeddedDataListOfRecords": [{ + "summary_of_associated_lists__": {} + }] + } + } + }, + "navigation": { + "template": "Horizontal", + "steps": [{ + "allow_jump": true, + "name": "ED table editable", + "actionID": "EmbeddedDataDisplayAsRepeatingViewEdit", + "visited_status": "success", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF4", + "type": "PATCH", + "title": "Go to ED table editable" + } + }, + "ID": "AssignmentSF4" + }, { + "allow_jump": true, + "name": "ED table editable popup", + "actionID": "EDTableEditablePopup", + "visited_status": "current", + "ID": "AssignmentSF5" + }, { + "allow_jump": true, + "name": "ED simple table readonly", + "actionID": "EDSimpleTableReadonly", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF1", + "type": "PATCH", + "title": "Go to ED simple table readonly" + } + }, + "ID": "AssignmentSF1" + }, { + "allow_jump": true, + "name": "ED table readonly", + "actionID": "EmbeddedDataDisplayAsTable", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF3", + "type": "PATCH", + "title": "Go to ED table readonly" + } + }, + "ID": "AssignmentSF3" + }, { + "allow_jump": true, + "name": "ED repeating view editable", + "actionID": "EDRepeatingViewEditable", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF2", + "type": "PATCH", + "title": "Go to ED repeating view editable" + } + }, + "ID": "AssignmentSF2" + }, { + "allow_jump": true, + "name": "ED repeating view readonly", + "actionID": "EDRepeatingViewReadonly", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF6", + "type": "PATCH", + "title": "Go to ED repeating view readonly" + } + }, + "ID": "AssignmentSF6" + }] + }, + "actionButtons": { + "secondary": [{ + "jsAction": "cancelAssignment", + "name": "Cancel", + "actionID": "cancel" + }, { + "jsAction": "navigateToStep", + "name": "Previous", + "actionID": "back", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/previous", + "type": "PATCH", + "title": "Go back to previous step" + } + } + }], + "main": [{ + "jsAction": "finishAssignment", + "name": "Next ", + "actionID": "next" + }] + } + }, + "nextAssignmentInfo": { + "context": "self", + "className": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "links": { + "open": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT", + "type": "GET", + "title": "Get assignment details" + } + }, + "ID": "ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT" + } +} \ No newline at end of file diff --git a/test/src/commonMain/composeResources/files/responses/dx/assignments/EmbeddedDataTest-ReadonlySimpleTable.json b/test/src/commonMain/composeResources/files/responses/dx/assignments/EmbeddedDataTest-ReadonlySimpleTable.json new file mode 100644 index 00000000..4d5fb59c --- /dev/null +++ b/test/src/commonMain/composeResources/files/responses/dx/assignments/EmbeddedDataTest-ReadonlySimpleTable.json @@ -0,0 +1,624 @@ +{ + "data": { + "caseInfo": { + "caseTypeID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "owner": "rep@mediaco", + "availableActions": [{ + "name": "Edit details", + "links": { + "open": { + "rel": "self", + "href": "/cases/O40M3A-MAREKCO-WORK E-24003/actions/pyUpdateCaseDetails", + "type": "GET", + "title": "Get case action details" + } + }, + "ID": "pyUpdateCaseDetails", + "type": "Case" + }, { + "name": "Change stage", + "links": { + "open": { + "rel": "self", + "href": "/cases/O40M3A-MAREKCO-WORK E-24003/actions/pyChangeStage", + "type": "GET", + "title": "Get case action details" + } + }, + "ID": "pyChangeStage", + "type": "Case" + }], + "associations": { + "follows": false + }, + "lastUpdatedBy": "rep@mediaco", + "assignments": [{ + "instructions": "", + "canPerform": "true", + "assigneeInfo": { + "name": "Administrator", + "ID": "rep@mediaco", + "type": "worklist" + }, + "processID": "CreateForm_Default", + "urgency": "10", + "processName": "Create", + "isMultiStep": "true", + "name": "ED simple table readonly", + "context": "", + "links": { + "open": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT", + "type": "GET", + "title": "Get assignment details" + } + }, + "ID": "ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT", + "actions": [{ + "name": "ED simple table readonly", + "links": { + "submit": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/actions/EDSimpleTableReadonly", + "type": "PATCH", + "title": "Submit assignment action " + }, + "save": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/actions/EDSimpleTableReadonly/save", + "type": "PATCH", + "title": "Save assignment action " + }, + "open": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/actions/EDSimpleTableReadonly", + "type": "GET", + "title": "Get assignment action details" + } + }, + "ID": "EDSimpleTableReadonly", + "type": "FlowAction" + }] + }], + "hasNewAttachments": false, + "businessID": "E-24003", + "sla": { + "goal": "", + "deadline": "" + }, + "WidgetsToRefresh": ["TaskList"], + "caseTypeName": "EmbeddedDataTest", + "urgency": "10", + "createTime": "2026-01-07T14:17:20.983Z", + "createdBy": "rep@mediaco", + "name": "EmbeddedDataTest", + "stages": [{ + "entryTime": "2026-01-07T14:17:20.990Z", + "name": "Create", + "links": { + "open": { + "rel": "self", + "href": "/cases/O40M3A-MAREKCO-WORK E-24003/stages/PRIM0", + "type": "PUT", + "title": "Jump to this stage" + } + }, + "visited_status": "active", + "ID": "PRIM0", + "type": "Primary", + "transitionType": "create" + }], + "ID": "O40M3A-MAREKCO-WORK E-24003", + "caseTypeIcon": "cmicons/pycase.svg", + "status": "New", + "stageID": "PRIM0", + "stageLabel": "Create", + "lastUpdateTime": "2026-01-07T14:18:42.214Z", + "content": { + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "EmbeddedDataListOfRecords": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "Brand": "Ford", + "Model": "Fiesta", + "Price": "123456", + "IsFirstOwner": true, + "Interior": "comfort", + "Insurance": "8b42e334-5541-4658-86b5-1871e7b2133e", + "ClientMeetingDate": "2026-01-08", + "ClientMeetingTime": "00:00:00", + "TransactionDateTime": "2026-01-08T05:00:00.000Z", + "Notes": "This is a note" + }, { + "classID": "O40M3A-MarekCo-Data-Cars", + "Brand": "Opel", + "Model": "Astra", + "Price": "", + "IsFirstOwner": false, + "Interior": "", + "Insurance": "", + "ClientMeetingDate": "", + "ClientMeetingTime": "", + "TransactionDateTime": "", + "Notes": "" + }], + "pxObjClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "pyLabel": "EmbeddedDataTest", + "pyID": "E-24003" + } + } + }, + "uiResources": { + "resources": { + "views": { + "EDSimpleTableReadonly": [{ + "name": "EDSimpleTableReadonly", + "type": "View", + "config": { + "template": "DefaultForm", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "localeReference": "@LR O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDSIMPLETABLEREADONLY" + }, + "children": [{ + "name": "Fields", + "type": "Region", + "children": [{ + "type": "reference", + "config": { + "name": "EDSimpleTableReadonly_EmbeddedDataListOfRecords", + "inheritedProps": [{ + "prop": "label", + "value": "@L Cars readonly simple table" + }], + "authorContext": ".EmbeddedDataListOfRecords", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "labelOption": "custom", + "type": "view" + } + }] + }], + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "EDSimpleTableReadonly_EmbeddedDataListOfRecords": [{ + "name": "EDSimpleTableReadonly_EmbeddedDataListOfRecords", + "type": "View", + "config": { + "type": "multirecordlist", + "contextClass": "O40M3A-MarekCo-Data-Cars", + "referenceList": "@P .EmbeddedDataListOfRecords", + "targetClassLabel": "@L cars", + "heading": "@L cars", + "name": "EmbeddedDataListOfRecords", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "renderMode": "ReadOnly", + "multiRecordDisplayAs": "simpleTable", + "template": "SimpleTable", + "children": [{ + "name": "Columns", + "type": "Region", + "children": [{ + "type": "TextInput", + "config": { + "value": "@P .Brand", + "label": "@FL .Brand", + "labelOption": "default" + } + }, { + "type": "TextInput", + "config": { + "value": "@P .Model", + "label": "@FL .Model", + "labelOption": "default" + } + }, { + "type": "Currency", + "config": { + "value": "@P .Price", + "label": "@FL .Price", + "labelOption": "default", + "isoCodeSelection": "constant", + "currencyISOCode": "USD", + "allowDecimals": true + } + }, { + "type": "Checkbox", + "config": { + "label": "@FL .IsFirstOwner", + "value": "@P .IsFirstOwner", + "labelOption": "default", + "captionOption": "default", + "trueLabel": "@L Yes", + "falseLabel": "@L No", + "caption": "@FL .IsFirstOwner" + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Interior", + "label": "@FL .Interior", + "labelOption": "default", + "deferDatasource": true, + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Interior" + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Insurance", + "label": "@FL .Insurance", + "labelOption": "default", + "deferDatasource": true, + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Insurance" + } + }, { + "type": "Date", + "config": { + "value": "@P .ClientMeetingDate", + "label": "@FL .ClientMeetingDate", + "labelOption": "default" + } + }, { + "type": "Time", + "config": { + "value": "@P .ClientMeetingTime", + "label": "@FL .ClientMeetingTime", + "labelOption": "default" + } + }, { + "type": "DateTime", + "config": { + "value": "@P .TransactionDateTime", + "label": "@FL .TransactionDateTime", + "labelOption": "default" + } + }, { + "type": "TextArea", + "config": { + "value": "@P .Notes", + "label": "@FL .Notes", + "labelOption": "default" + } + }] + }], + "parentClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "dataRetrievalType": "MANUAL", + "propertyLabel": "@L EmbeddedDataListOfRecords", + "localeReference": "@LR O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDSIMPLETABLEREADONLY_EMBEDDEDDATALISTOFRECORDS" + }, + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }] + }, + "paragraphs": { + "EmbeddedDataListOfRecords_additionalInfo": [{ + "content": "", + "name": "EmbeddedDataListOfRecords_additionalInfo", + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "Brand_additionalInfo": [{ + "content": "", + "name": "Brand_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Model_additionalInfo": [{ + "content": "", + "name": "Model_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Price_additionalInfo": [{ + "content": "", + "name": "Price_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "IsFirstOwner_additionalInfo": [{ + "content": "", + "name": "IsFirstOwner_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Interior_additionalInfo": [{ + "content": "", + "name": "Interior_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Insurance_additionalInfo": [{ + "content": "", + "name": "Insurance_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "ClientMeetingDate_additionalInfo": [{ + "content": "", + "name": "ClientMeetingDate_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "ClientMeetingTime_additionalInfo": [{ + "content": "", + "name": "ClientMeetingTime_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "TransactionDateTime_additionalInfo": [{ + "content": "", + "name": "TransactionDateTime_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Notes_additionalInfo": [{ + "content": "", + "name": "Notes_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }] + }, + "datapages": { + "D_InsuranceList": { + "classID": "O40M3A-MarekCo-Data-Insurance", + "mode": "readonly", + "isSearchable": false, + "isQueryable": true, + "structure": "list", + "isWorkObject": false, + "isDataObject": true + } + }, + "fields": { + "EmbeddedDataListOfRecords": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Page List", + "dataRetrievalType": "manual", + "additionalInformation": "@PARAGRAPH EmbeddedDataListOfRecords_additionalInfo", + "pageClass": "O40M3A-MarekCo-Data-Cars", + "label": "EmbeddedDataListOfRecords" + }], + "Brand": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Brand_additionalInfo", + "label": "brand" + }], + "Model": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Model_additionalInfo", + "label": "model" + }], + "Price": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Decimal", + "displayAs": "pxCurrency", + "additionalInformation": "@PARAGRAPH Price_additionalInfo", + "label": "Price" + }], + "IsFirstOwner": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "True-False", + "displayAs": "pxCheckbox", + "additionalInformation": "@PARAGRAPH IsFirstOwner_additionalInfo", + "label": "IsFirstOwner" + }], + "Interior": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Interior_additionalInfo", + "label": "interior", + "datasource": { + "tableType": "PromptList", + "records": [{ + "key": "basic", + "value": "basic" + }, { + "key": "comfort", + "value": "comfort" + }, { + "key": "elite", + "value": "elite" + }] + } + }], + "Insurance": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Insurance_additionalInfo", + "label": "Insurance", + "datasource": { + "tableType": "DataPage", + "tableClass": "O40M3A-MarekCo-Data-Insurance", + "name": "D_InsuranceList", + "propertyForDisplayText": "@P .Name", + "propertyForValue": "@P .pyGUID", + "parameters": [] + } + }], + "ClientMeetingDate": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Date", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH ClientMeetingDate_additionalInfo", + "label": "client meeting date" + }], + "ClientMeetingTime": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "TimeOfDay", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH ClientMeetingTime_additionalInfo", + "label": "Client meeting time" + }], + "TransactionDateTime": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Date Time", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH TransactionDateTime_additionalInfo", + "label": "Transaction date time" + }], + "Notes": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxTextArea", + "additionalInformation": "@PARAGRAPH Notes_additionalInfo", + "label": "Notes" + }], + "pyLabel": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Text", + "maxLength": 64, + "displayAs": "pxTextInput", + "definedOnClassID": "Work-", + "expectedLength": 60, + "label": "Label" + }], + "pyID": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Text", + "maxLength": 32, + "displayAs": "pxDisplayText", + "definedOnClassID": "Work-Cover-", + "expectedLength": 22, + "label": "Case ID", + "isClassKey": true + }] + } + }, + "components": ["DefaultForm", "TextArea", "Checkbox", "Currency", "Dropdown", "SimpleTable", "Region", "Time", "TextInput", "View", "Date", "DateTime"], + "localeReferences": ["O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDSIMPLETABLEREADONLY", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!MODEL_ADDITIONALINFO", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!PARAGRAPH!EMBEDDEDDATALISTOFRECORDS_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INSURANCE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!CLIENTMEETINGTIME_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!BRAND_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!NOTES_ADDITIONALINFO", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDSIMPLETABLEREADONLY_EMBEDDEDDATALISTOFRECORDS", "O40M3A-MAREKCO-DATA-CARS!ASSOCIATED!INTERIOR", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!PRICE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!CLIENTMEETINGDATE_ADDITIONALINFO", "@BASECLASS!DATAPAGE!D_INSURANCELIST", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!CASE!EMBEDDEDDATATEST", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INTERIOR_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!ISFIRSTOWNER_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!TRANSACTIONDATETIME_ADDITIONALINFO"], + "root": { + "type": "reference", + "config": { + "type": "view", + "name": "EDSimpleTableReadonly", + "context": "caseInfo.content" + } + }, + "context_data": { + "caseInfo": { + "content": { + "EmbeddedDataListOfRecords": [{ + "summary_of_associated_lists__": {} + }, { + "summary_of_associated_lists__": {} + }] + } + } + }, + "navigation": { + "template": "Horizontal", + "steps": [{ + "allow_jump": true, + "name": "ED table editable", + "actionID": "EmbeddedDataDisplayAsRepeatingViewEdit", + "visited_status": "success", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF4", + "type": "PATCH", + "title": "Go to ED table editable" + } + }, + "ID": "AssignmentSF4" + }, { + "allow_jump": true, + "name": "ED table editable popup", + "actionID": "EDTableEditablePopup", + "visited_status": "success", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF5", + "type": "PATCH", + "title": "Go to ED table editable popup" + } + }, + "ID": "AssignmentSF5" + }, { + "allow_jump": true, + "name": "ED simple table readonly", + "actionID": "EDSimpleTableReadonly", + "visited_status": "current", + "ID": "AssignmentSF1" + }, { + "allow_jump": true, + "name": "ED table readonly", + "actionID": "EmbeddedDataDisplayAsTable", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF3", + "type": "PATCH", + "title": "Go to ED table readonly" + } + }, + "ID": "AssignmentSF3" + }, { + "allow_jump": true, + "name": "ED repeating view editable", + "actionID": "EDRepeatingViewEditable", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF2", + "type": "PATCH", + "title": "Go to ED repeating view editable" + } + }, + "ID": "AssignmentSF2" + }, { + "allow_jump": true, + "name": "ED repeating view readonly", + "actionID": "EDRepeatingViewReadonly", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF6", + "type": "PATCH", + "title": "Go to ED repeating view readonly" + } + }, + "ID": "AssignmentSF6" + }] + }, + "actionButtons": { + "secondary": [{ + "jsAction": "cancelAssignment", + "name": "Cancel", + "actionID": "cancel" + }, { + "jsAction": "navigateToStep", + "name": "Previous", + "actionID": "back", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/previous", + "type": "PATCH", + "title": "Go back to previous step" + } + } + }], + "main": [{ + "jsAction": "finishAssignment", + "name": "Next ", + "actionID": "next" + }] + } + }, + "nextAssignmentInfo": { + "context": "self", + "className": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "links": { + "open": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT", + "type": "GET", + "title": "Get assignment details" + } + }, + "ID": "ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT" + } +} \ No newline at end of file diff --git a/test/src/commonMain/composeResources/files/responses/dx/assignments/EmbeddedDataTest-ReadonlyTable.json b/test/src/commonMain/composeResources/files/responses/dx/assignments/EmbeddedDataTest-ReadonlyTable.json new file mode 100644 index 00000000..bf31c7ad --- /dev/null +++ b/test/src/commonMain/composeResources/files/responses/dx/assignments/EmbeddedDataTest-ReadonlyTable.json @@ -0,0 +1,664 @@ +{ + "data": { + "caseInfo": { + "caseTypeID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "owner": "rep@mediaco", + "availableActions": [{ + "name": "Edit details", + "links": { + "open": { + "rel": "self", + "href": "/cases/O40M3A-MAREKCO-WORK E-24003/actions/pyUpdateCaseDetails", + "type": "GET", + "title": "Get case action details" + } + }, + "ID": "pyUpdateCaseDetails", + "type": "Case" + }, { + "name": "Change stage", + "links": { + "open": { + "rel": "self", + "href": "/cases/O40M3A-MAREKCO-WORK E-24003/actions/pyChangeStage", + "type": "GET", + "title": "Get case action details" + } + }, + "ID": "pyChangeStage", + "type": "Case" + }], + "associations": { + "follows": false + }, + "lastUpdatedBy": "rep@mediaco", + "assignments": [{ + "instructions": "", + "canPerform": "true", + "assigneeInfo": { + "name": "Administrator", + "ID": "rep@mediaco", + "type": "worklist" + }, + "processID": "CreateForm_Default", + "urgency": "10", + "processName": "Create", + "isMultiStep": "true", + "name": "ED table readonly", + "context": "", + "links": { + "open": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT", + "type": "GET", + "title": "Get assignment details" + } + }, + "ID": "ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT", + "actions": [{ + "name": "ED table readonly", + "links": { + "submit": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/actions/EmbeddedDataDisplayAsTable", + "type": "PATCH", + "title": "Submit assignment action " + }, + "save": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/actions/EmbeddedDataDisplayAsTable/save", + "type": "PATCH", + "title": "Save assignment action " + }, + "open": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/actions/EmbeddedDataDisplayAsTable", + "type": "GET", + "title": "Get assignment action details" + } + }, + "ID": "EmbeddedDataDisplayAsTable", + "type": "FlowAction" + }] + }], + "hasNewAttachments": false, + "businessID": "E-24003", + "sla": { + "goal": "", + "deadline": "" + }, + "WidgetsToRefresh": ["TaskList"], + "caseTypeName": "EmbeddedDataTest", + "urgency": "10", + "createTime": "2026-01-07T14:17:20.983Z", + "createdBy": "rep@mediaco", + "name": "EmbeddedDataTest", + "stages": [{ + "entryTime": "2026-01-07T14:17:20.990Z", + "name": "Create", + "links": { + "open": { + "rel": "self", + "href": "/cases/O40M3A-MAREKCO-WORK E-24003/stages/PRIM0", + "type": "PUT", + "title": "Jump to this stage" + } + }, + "visited_status": "active", + "ID": "PRIM0", + "type": "Primary", + "transitionType": "create" + }], + "ID": "O40M3A-MAREKCO-WORK E-24003", + "caseTypeIcon": "cmicons/pycase.svg", + "status": "New", + "stageID": "PRIM0", + "stageLabel": "Create", + "lastUpdateTime": "2026-01-07T14:18:52.504Z", + "content": { + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "EmbeddedDataListOfRecords": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "Brand": "Ford", + "Model": "Fiesta", + "Price": "123456", + "IsFirstOwner": true, + "Interior": "comfort", + "Insurance": "8b42e334-5541-4658-86b5-1871e7b2133e", + "ClientMeetingDate": "2026-01-08", + "ClientMeetingTime": "00:00:00", + "TransactionDateTime": "2026-01-08T05:00:00.000Z", + "Notes": "This is a note" + }, { + "classID": "O40M3A-MarekCo-Data-Cars", + "Brand": "Opel", + "Model": "Astra", + "Price": "", + "IsFirstOwner": false, + "Interior": "", + "Insurance": "", + "ClientMeetingDate": "", + "ClientMeetingTime": "", + "TransactionDateTime": "", + "Notes": "" + }], + "pxObjClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "pyLabel": "EmbeddedDataTest", + "pyID": "E-24003" + } + } + }, + "uiResources": { + "resources": { + "views": { + "EmbeddedDataDisplayAsTable": [{ + "name": "EmbeddedDataDisplayAsTable", + "type": "View", + "config": { + "template": "DefaultForm", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "localeReference": "@LR O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EMBEDDEDDATADISPLAYASTABLE" + }, + "children": [{ + "name": "Fields", + "type": "Region", + "children": [{ + "type": "reference", + "config": { + "name": "EmbeddedDataDisplayAsTable_EmbeddedDataListOfRecords", + "inheritedProps": [{ + "prop": "label", + "value": "@L Cars readonly table" + }], + "authorContext": ".EmbeddedDataListOfRecords", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "labelOption": "custom", + "type": "view" + } + }] + }], + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "EmbeddedDataDisplayAsTable_EmbeddedDataListOfRecords": [{ + "name": "EmbeddedDataDisplayAsTable_EmbeddedDataListOfRecords", + "type": "View", + "config": { + "type": "multirecordlist", + "contextClass": "O40M3A-MarekCo-Data-Cars", + "referenceList": "@P .EmbeddedDataListOfRecords", + "targetClassLabel": "@L cars", + "heading": "@L cars", + "name": "EmbeddedDataListOfRecords", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "renderMode": "ReadOnly", + "multiRecordDisplayAs": "table", + "template": "SimpleTable", + "children": [{ + "name": "Columns", + "type": "Region", + "children": [{ + "type": "TextInput", + "config": { + "value": "@P .Brand", + "label": "@FL .Brand", + "labelOption": "default" + } + }, { + "type": "TextInput", + "config": { + "value": "@P .Model", + "label": "@FL .Model", + "labelOption": "default" + } + }, { + "type": "Currency", + "config": { + "value": "@P .Price", + "label": "@FL .Price", + "labelOption": "default", + "isoCodeSelection": "constant", + "currencyISOCode": "USD", + "allowDecimals": true + } + }, { + "type": "Checkbox", + "config": { + "label": "@FL .IsFirstOwner", + "value": "@P .IsFirstOwner", + "labelOption": "default", + "captionOption": "default", + "trueLabel": "@L Yes", + "falseLabel": "@L No", + "caption": "@FL .IsFirstOwner" + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Interior", + "label": "@FL .Interior", + "labelOption": "default", + "deferDatasource": true, + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Interior" + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Insurance", + "label": "@FL .Insurance", + "labelOption": "default", + "deferDatasource": true, + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Insurance" + } + }, { + "type": "Date", + "config": { + "value": "@P .ClientMeetingDate", + "label": "@FL .ClientMeetingDate", + "labelOption": "default" + } + }, { + "type": "Time", + "config": { + "value": "@P .ClientMeetingTime", + "label": "@FL .ClientMeetingTime", + "labelOption": "default" + } + }, { + "type": "DateTime", + "config": { + "value": "@P .TransactionDateTime", + "label": "@FL .TransactionDateTime", + "labelOption": "default" + } + }, { + "type": "TextArea", + "config": { + "value": "@P .Notes", + "label": "@FL .Notes", + "labelOption": "default" + } + }] + }], + "parentClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "dataRetrievalType": "MANUAL", + "propertyLabel": "@L EmbeddedDataListOfRecords", + "localeReference": "@LR O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EMBEDDEDDATADISPLAYASTABLE_EMBEDDEDDATALISTOFRECORDS", + "editMode": "tableRows" + }, + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }] + }, + "paragraphs": { + "EmbeddedDataListOfRecords_additionalInfo": [{ + "content": "", + "name": "EmbeddedDataListOfRecords_additionalInfo", + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "Brand_additionalInfo": [{ + "content": "", + "name": "Brand_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Model_additionalInfo": [{ + "content": "", + "name": "Model_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Price_additionalInfo": [{ + "content": "", + "name": "Price_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "IsFirstOwner_additionalInfo": [{ + "content": "", + "name": "IsFirstOwner_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Interior_additionalInfo": [{ + "content": "", + "name": "Interior_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Insurance_additionalInfo": [{ + "content": "", + "name": "Insurance_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "ClientMeetingDate_additionalInfo": [{ + "content": "", + "name": "ClientMeetingDate_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "ClientMeetingTime_additionalInfo": [{ + "content": "", + "name": "ClientMeetingTime_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "TransactionDateTime_additionalInfo": [{ + "content": "", + "name": "TransactionDateTime_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Notes_additionalInfo": [{ + "content": "", + "name": "Notes_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }] + }, + "datapages": { + "D_InsuranceList": { + "classID": "O40M3A-MarekCo-Data-Insurance", + "mode": "readonly", + "isSearchable": false, + "isQueryable": true, + "structure": "list", + "isWorkObject": false, + "isDataObject": true + }, + "D_cars": { + "parameters": [{ + "name": "Id", + "defaultValue": "", + "linkedField": "Id" + }], + "classID": "O40M3A-MarekCo-Data-Cars", + "mode": "readonly", + "isSearchable": false, + "isQueryable": false, + "isAlternateKeyStorage": true, + "structure": "page" + }, + "D_carsSavable": { + "parameters": [{ + "name": "Id", + "defaultValue": "", + "linkedField": "Id" + }], + "classID": "O40M3A-MarekCo-Data-Cars", + "mode": "editable", + "isSearchable": false, + "isQueryable": false, + "isAlternateKeyStorage": true, + "structure": "page" + } + }, + "dataTypes": { + "O40M3A-MarekCo-Data-Cars": { + "classKeys": ["Id"], + "savableDataPage": "D_carsSavable", + "lookupDataPage": "D_cars", + "lookupDataPageInfo": { + "isAlternateKeyStorage": true, + "parameters": { + "Id": "@P .Id" + } + } + } + }, + "fields": { + "EmbeddedDataListOfRecords": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Page List", + "dataRetrievalType": "manual", + "additionalInformation": "@PARAGRAPH EmbeddedDataListOfRecords_additionalInfo", + "pageClass": "O40M3A-MarekCo-Data-Cars", + "label": "EmbeddedDataListOfRecords" + }], + "Brand": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Brand_additionalInfo", + "label": "brand" + }], + "Model": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Model_additionalInfo", + "label": "model" + }], + "Price": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Decimal", + "displayAs": "pxCurrency", + "additionalInformation": "@PARAGRAPH Price_additionalInfo", + "label": "Price" + }], + "IsFirstOwner": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "True-False", + "displayAs": "pxCheckbox", + "additionalInformation": "@PARAGRAPH IsFirstOwner_additionalInfo", + "label": "IsFirstOwner" + }], + "Interior": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Interior_additionalInfo", + "label": "interior", + "datasource": { + "tableType": "PromptList", + "records": [{ + "key": "basic", + "value": "basic" + }, { + "key": "comfort", + "value": "comfort" + }, { + "key": "elite", + "value": "elite" + }] + } + }], + "Insurance": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Insurance_additionalInfo", + "label": "Insurance", + "datasource": { + "tableType": "DataPage", + "tableClass": "O40M3A-MarekCo-Data-Insurance", + "name": "D_InsuranceList", + "propertyForDisplayText": "@P .Name", + "propertyForValue": "@P .pyGUID", + "parameters": [] + } + }], + "ClientMeetingDate": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Date", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH ClientMeetingDate_additionalInfo", + "label": "client meeting date" + }], + "ClientMeetingTime": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "TimeOfDay", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH ClientMeetingTime_additionalInfo", + "label": "Client meeting time" + }], + "TransactionDateTime": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Date Time", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH TransactionDateTime_additionalInfo", + "label": "Transaction date time" + }], + "Notes": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxTextArea", + "additionalInformation": "@PARAGRAPH Notes_additionalInfo", + "label": "Notes" + }], + "pyLabel": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Text", + "maxLength": 64, + "displayAs": "pxTextInput", + "definedOnClassID": "Work-", + "expectedLength": 60, + "label": "Label" + }], + "pyID": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Text", + "maxLength": 32, + "displayAs": "pxDisplayText", + "definedOnClassID": "Work-Cover-", + "expectedLength": 22, + "label": "Case ID", + "isClassKey": true + }] + } + }, + "components": ["DefaultForm", "TextArea", "Checkbox", "Currency", "Dropdown", "SimpleTable", "Region", "Time", "TextInput", "View", "Date", "DateTime"], + "localeReferences": ["O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!MODEL_ADDITIONALINFO", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!PARAGRAPH!EMBEDDEDDATALISTOFRECORDS_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INSURANCE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!CLIENTMEETINGTIME_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!BRAND_ADDITIONALINFO", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EMBEDDEDDATADISPLAYASTABLE", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!NOTES_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!ASSOCIATED!INTERIOR", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!PRICE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!CLIENTMEETINGDATE_ADDITIONALINFO", "@BASECLASS!DATAPAGE!D_INSURANCELIST", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!CASE!EMBEDDEDDATATEST", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EMBEDDEDDATADISPLAYASTABLE_EMBEDDEDDATALISTOFRECORDS", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INTERIOR_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!ISFIRSTOWNER_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!TRANSACTIONDATETIME_ADDITIONALINFO"], + "root": { + "type": "reference", + "config": { + "type": "view", + "name": "EmbeddedDataDisplayAsTable", + "context": "caseInfo.content" + } + }, + "context_data": { + "caseInfo": { + "content": { + "EmbeddedDataListOfRecords": [{ + "summary_of_associated_lists__": {} + }, { + "summary_of_associated_lists__": {} + }] + } + } + }, + "navigation": { + "template": "Horizontal", + "steps": [{ + "allow_jump": true, + "name": "ED table editable", + "actionID": "EmbeddedDataDisplayAsRepeatingViewEdit", + "visited_status": "success", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF4", + "type": "PATCH", + "title": "Go to ED table editable" + } + }, + "ID": "AssignmentSF4" + }, { + "allow_jump": true, + "name": "ED table editable popup", + "actionID": "EDTableEditablePopup", + "visited_status": "success", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF5", + "type": "PATCH", + "title": "Go to ED table editable popup" + } + }, + "ID": "AssignmentSF5" + }, { + "allow_jump": true, + "name": "ED simple table readonly", + "actionID": "EDSimpleTableReadonly", + "visited_status": "success", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF1", + "type": "PATCH", + "title": "Go to ED simple table readonly" + } + }, + "ID": "AssignmentSF1" + }, { + "allow_jump": true, + "name": "ED table readonly", + "actionID": "EmbeddedDataDisplayAsTable", + "visited_status": "current", + "ID": "AssignmentSF3" + }, { + "allow_jump": true, + "name": "ED repeating view editable", + "actionID": "EDRepeatingViewEditable", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF2", + "type": "PATCH", + "title": "Go to ED repeating view editable" + } + }, + "ID": "AssignmentSF2" + }, { + "allow_jump": true, + "name": "ED repeating view readonly", + "actionID": "EDRepeatingViewReadonly", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF6", + "type": "PATCH", + "title": "Go to ED repeating view readonly" + } + }, + "ID": "AssignmentSF6" + }] + }, + "actionButtons": { + "secondary": [{ + "jsAction": "cancelAssignment", + "name": "Cancel", + "actionID": "cancel" + }, { + "jsAction": "navigateToStep", + "name": "Previous", + "actionID": "back", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/previous", + "type": "PATCH", + "title": "Go back to previous step" + } + } + }], + "main": [{ + "jsAction": "finishAssignment", + "name": "Next ", + "actionID": "next" + }] + } + }, + "nextAssignmentInfo": { + "context": "self", + "className": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "links": { + "open": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT", + "type": "GET", + "title": "Get assignment details" + } + }, + "ID": "ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT" + } +} \ No newline at end of file diff --git a/test/src/commonMain/composeResources/files/responses/dx/assignments/refresh/EmbeddedDataTest-EditableTable-Popup-Refresh-1.json b/test/src/commonMain/composeResources/files/responses/dx/assignments/refresh/EmbeddedDataTest-EditableTable-Popup-Refresh-1.json new file mode 100644 index 00000000..5c6c5217 --- /dev/null +++ b/test/src/commonMain/composeResources/files/responses/dx/assignments/refresh/EmbeddedDataTest-EditableTable-Popup-Refresh-1.json @@ -0,0 +1,503 @@ +{ + "data": { + "caseInfo": { + "content": { + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "EmbeddedDataListOfRecords": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "Brand": "Ford", + "Model": "Fiesta", + "Price": "123456", + "IsFirstOwner": true, + "Interior": "comfort", + "Insurance": "8b42e334-5541-4658-86b5-1871e7b2133e", + "ClientMeetingDate": "2026-01-08", + "ClientMeetingTime": "00:00:00", + "TransactionDateTime": "2026-01-08T05:00:00.000Z", + "Notes": "This is a note" + }] + } + } + }, + "uiResources": { + "resources": { + "views": { + "EDTableEditablePopup": [{ + "name": "EDTableEditablePopup", + "type": "View", + "config": { + "template": "DefaultForm", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "localeReference": "@LR O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDTABLEEDITABLEPOPUP" + }, + "children": [{ + "name": "Fields", + "type": "Region", + "children": [{ + "type": "reference", + "config": { + "name": "EDTableEditablePopup_EmbeddedDataListOfRecords", + "inheritedProps": [{ + "prop": "label", + "value": "@L Cars editable table with popup" + }], + "authorContext": ".EmbeddedDataListOfRecords", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "labelOption": "custom", + "type": "view" + } + }] + }], + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "EDTableEditablePopup_EmbeddedDataListOfRecords": [{ + "name": "EDTableEditablePopup_EmbeddedDataListOfRecords", + "type": "View", + "config": { + "type": "multirecordlist", + "contextClass": "O40M3A-MarekCo-Data-Cars", + "referenceList": "@P .EmbeddedDataListOfRecords", + "targetClassLabel": "@L cars", + "heading": "@L cars", + "name": "EmbeddedDataListOfRecords", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "renderMode": "Editable", + "multiRecordDisplayAs": "table", + "template": "SimpleTable", + "children": [{ + "name": "Columns", + "type": "Region", + "children": [{ + "type": "TextInput", + "config": { + "value": "@P .Brand", + "label": "@FL .Brand", + "labelOption": "default" + } + }, { + "type": "TextInput", + "config": { + "value": "@P .Model", + "label": "@FL .Model", + "labelOption": "default" + } + }, { + "type": "Currency", + "config": { + "value": "@P .Price", + "label": "@FL .Price", + "labelOption": "default", + "isoCodeSelection": "constant", + "currencyISOCode": "USD", + "allowDecimals": true + } + }, { + "type": "Checkbox", + "config": { + "label": "@FL .IsFirstOwner", + "value": "@P .IsFirstOwner", + "labelOption": "default", + "captionOption": "default", + "trueLabel": "@L Yes", + "falseLabel": "@L No", + "caption": "@FL .IsFirstOwner" + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Interior", + "label": "@FL .Interior", + "labelOption": "default", + "deferDatasource": true, + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Interior" + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Insurance", + "label": "@FL .Insurance", + "labelOption": "default", + "deferDatasource": true, + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Insurance" + } + }, { + "type": "Date", + "config": { + "value": "@P .ClientMeetingDate", + "label": "@FL .ClientMeetingDate", + "labelOption": "default" + } + }, { + "type": "Time", + "config": { + "value": "@P .ClientMeetingTime", + "label": "@FL .ClientMeetingTime", + "labelOption": "default" + } + }, { + "type": "DateTime", + "config": { + "value": "@P .TransactionDateTime", + "label": "@FL .TransactionDateTime", + "labelOption": "default" + } + }, { + "type": "TextArea", + "config": { + "value": "@P .Notes", + "label": "@FL .Notes", + "labelOption": "default" + } + }] + }], + "editMode": "modal", + "editModeConfig": { + "defaultView": "Create2", + "useSeparateViewForEdit": false, + "editView": "pyEdit" + }, + "parentClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "dataRetrievalType": "MANUAL", + "propertyLabel": "@L EmbeddedDataListOfRecords", + "localeReference": "@LR O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDTABLEEDITABLEPOPUP_EMBEDDEDDATALISTOFRECORDS" + }, + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "Create2": [{ + "name": "Create2", + "type": "View", + "config": { + "mode": "editable", + "ruleClass": "O40M3A-MarekCo-Data-Cars", + "template": "DefaultForm", + "localeReference": "@LR O40M3A-MAREKCO-DATA-CARS!VIEW!CREATE2" + }, + "children": [{ + "name": "Fields", + "type": "Region", + "children": [{ + "type": "TextInput", + "config": { + "value": "@P .Brand", + "label": "@FL .Brand", + "labelOption": "default", + "required": true + } + }, { + "type": "TextInput", + "config": { + "value": "@P .Model", + "label": "@FL .Model", + "labelOption": "default" + } + }, { + "type": "Currency", + "config": { + "value": "@P .Price", + "label": "@FL .Price", + "labelOption": "default", + "isoCodeSelection": "constant", + "currencyISOCode": "USD", + "allowDecimals": true + } + }, { + "type": "Checkbox", + "config": { + "caption": "@FL .IsFirstOwner", + "value": "@P .IsFirstOwner", + "labelOption": "default", + "captionOption": "default", + "trueLabel": "@L Yes", + "falseLabel": "@L No" + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Interior", + "label": "@FL .Interior", + "labelOption": "default", + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Interior", + "deferDatasource": true + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Insurance", + "label": "@FL .Insurance", + "labelOption": "default", + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Insurance", + "deferDatasource": true + } + }, { + "type": "Date", + "config": { + "value": "@P .ClientMeetingDate", + "label": "@FL .ClientMeetingDate", + "labelOption": "default" + } + }, { + "type": "Time", + "config": { + "value": "@P .ClientMeetingTime", + "label": "@FL .ClientMeetingTime", + "labelOption": "default" + } + }, { + "type": "DateTime", + "config": { + "value": "@P .TransactionDateTime", + "label": "@FL .TransactionDateTime", + "labelOption": "default" + } + }, { + "type": "TextArea", + "config": { + "value": "@P .Notes", + "label": "@FL .Notes", + "labelOption": "default" + } + }] + }], + "classID": "O40M3A-MarekCo-Data-Cars" + }] + }, + "paragraphs": { + "EmbeddedDataListOfRecords_additionalInfo": [{ + "content": "", + "name": "EmbeddedDataListOfRecords_additionalInfo", + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "Brand_additionalInfo": [{ + "content": "", + "name": "Brand_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Model_additionalInfo": [{ + "content": "", + "name": "Model_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Price_additionalInfo": [{ + "content": "", + "name": "Price_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "IsFirstOwner_additionalInfo": [{ + "content": "", + "name": "IsFirstOwner_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Interior_additionalInfo": [{ + "content": "", + "name": "Interior_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Insurance_additionalInfo": [{ + "content": "", + "name": "Insurance_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "ClientMeetingDate_additionalInfo": [{ + "content": "", + "name": "ClientMeetingDate_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "ClientMeetingTime_additionalInfo": [{ + "content": "", + "name": "ClientMeetingTime_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "TransactionDateTime_additionalInfo": [{ + "content": "", + "name": "TransactionDateTime_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Notes_additionalInfo": [{ + "content": "", + "name": "Notes_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }] + }, + "datapages": { + "D_InsuranceList": { + "classID": "O40M3A-MarekCo-Data-Insurance", + "mode": "readonly", + "isSearchable": false, + "isQueryable": true, + "structure": "list", + "isWorkObject": false, + "isDataObject": true + }, + "D_cars": { + "parameters": [{ + "name": "Id", + "defaultValue": "", + "linkedField": "Id" + }], + "classID": "O40M3A-MarekCo-Data-Cars", + "mode": "readonly", + "isSearchable": false, + "isQueryable": false, + "isAlternateKeyStorage": true, + "structure": "page" + }, + "D_carsSavable": { + "parameters": [{ + "name": "Id", + "defaultValue": "", + "linkedField": "Id" + }], + "classID": "O40M3A-MarekCo-Data-Cars", + "mode": "editable", + "isSearchable": false, + "isQueryable": false, + "isAlternateKeyStorage": true, + "structure": "page" + } + }, + "dataTypes": { + "O40M3A-MarekCo-Data-Cars": { + "classKeys": ["Id"], + "savableDataPage": "D_carsSavable", + "lookupDataPage": "D_cars", + "lookupDataPageInfo": { + "isAlternateKeyStorage": true, + "parameters": { + "Id": "@P .Id" + } + } + } + }, + "fields": { + "EmbeddedDataListOfRecords": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Page List", + "dataRetrievalType": "manual", + "additionalInformation": "@PARAGRAPH EmbeddedDataListOfRecords_additionalInfo", + "pageClass": "O40M3A-MarekCo-Data-Cars", + "label": "EmbeddedDataListOfRecords" + }], + "Brand": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Brand_additionalInfo", + "label": "brand" + }], + "Model": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Model_additionalInfo", + "label": "model" + }], + "Price": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Decimal", + "displayAs": "pxCurrency", + "additionalInformation": "@PARAGRAPH Price_additionalInfo", + "label": "Price" + }], + "IsFirstOwner": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "True-False", + "displayAs": "pxCheckbox", + "additionalInformation": "@PARAGRAPH IsFirstOwner_additionalInfo", + "label": "IsFirstOwner" + }], + "Interior": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Interior_additionalInfo", + "label": "interior", + "datasource": { + "tableType": "PromptList", + "records": [{ + "key": "basic", + "value": "basic" + }, { + "key": "comfort", + "value": "comfort" + }, { + "key": "elite", + "value": "elite" + }] + } + }], + "Insurance": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Insurance_additionalInfo", + "label": "Insurance", + "datasource": { + "tableType": "DataPage", + "tableClass": "O40M3A-MarekCo-Data-Insurance", + "name": "D_InsuranceList", + "propertyForDisplayText": "@P .Name", + "propertyForValue": "@P .pyGUID", + "parameters": [] + } + }], + "ClientMeetingDate": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Date", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH ClientMeetingDate_additionalInfo", + "label": "client meeting date" + }], + "ClientMeetingTime": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "TimeOfDay", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH ClientMeetingTime_additionalInfo", + "label": "Client meeting time" + }], + "TransactionDateTime": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Date Time", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH TransactionDateTime_additionalInfo", + "label": "Transaction date time" + }], + "Notes": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxTextArea", + "additionalInformation": "@PARAGRAPH Notes_additionalInfo", + "label": "Notes" + }] + } + }, + "components": ["DefaultForm", "TextArea", "Checkbox", "Currency", "Dropdown", "SimpleTable", "Region", "Time", "TextInput", "View", "Date", "DateTime"], + "localeReferences": ["O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDTABLEEDITABLEPOPUP_EMBEDDEDDATALISTOFRECORDS", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!MODEL_ADDITIONALINFO", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!PARAGRAPH!EMBEDDEDDATALISTOFRECORDS_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INSURANCE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!CLIENTMEETINGTIME_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!BRAND_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!NOTES_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!ASSOCIATED!INTERIOR", "O40M3A-MAREKCO-DATA-CARS!VIEW!CREATE2", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!PRICE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!CLIENTMEETINGDATE_ADDITIONALINFO", "@BASECLASS!DATAPAGE!D_INSURANCELIST", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!CASE!EMBEDDEDDATATEST", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INTERIOR_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!ISFIRSTOWNER_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!TRANSACTIONDATETIME_ADDITIONALINFO", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDTABLEEDITABLEPOPUP"], + "root": { + "type": "reference", + "config": { + "type": "view", + "name": "EDTableEditablePopup", + "context": "caseInfo.content" + } + }, + "context_data": { + "caseInfo": { + "content": { + "EmbeddedDataListOfRecords": [{ + "summary_of_associated_lists__": {} + }] + } + } + } + } +} \ No newline at end of file diff --git a/test/src/commonMain/composeResources/files/responses/dx/assignments/refresh/EmbeddedDataTest-EditableTable-Popup-Refresh-2.json b/test/src/commonMain/composeResources/files/responses/dx/assignments/refresh/EmbeddedDataTest-EditableTable-Popup-Refresh-2.json new file mode 100644 index 00000000..5992aa88 --- /dev/null +++ b/test/src/commonMain/composeResources/files/responses/dx/assignments/refresh/EmbeddedDataTest-EditableTable-Popup-Refresh-2.json @@ -0,0 +1,517 @@ +{ + "data": { + "caseInfo": { + "content": { + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "EmbeddedDataListOfRecords": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "Brand": "Ford", + "Model": "Fiesta", + "Price": "123456", + "IsFirstOwner": true, + "Interior": "comfort", + "Insurance": "8b42e334-5541-4658-86b5-1871e7b2133e", + "ClientMeetingDate": "2026-01-08", + "ClientMeetingTime": "00:00:00", + "TransactionDateTime": "2026-01-08T05:00:00.000Z", + "Notes": "This is a note" + }, { + "classID": "O40M3A-MarekCo-Data-Cars", + "Brand": "Opel", + "Model": "Astra", + "Price": "", + "IsFirstOwner": false, + "Interior": "", + "Insurance": "", + "ClientMeetingDate": "", + "ClientMeetingTime": "", + "TransactionDateTime": "", + "Notes": "" + }] + } + } + }, + "uiResources": { + "resources": { + "views": { + "EDTableEditablePopup": [{ + "name": "EDTableEditablePopup", + "type": "View", + "config": { + "template": "DefaultForm", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "localeReference": "@LR O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDTABLEEDITABLEPOPUP" + }, + "children": [{ + "name": "Fields", + "type": "Region", + "children": [{ + "type": "reference", + "config": { + "name": "EDTableEditablePopup_EmbeddedDataListOfRecords", + "inheritedProps": [{ + "prop": "label", + "value": "@L Cars editable table with popup" + }], + "authorContext": ".EmbeddedDataListOfRecords", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "labelOption": "custom", + "type": "view" + } + }] + }], + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "EDTableEditablePopup_EmbeddedDataListOfRecords": [{ + "name": "EDTableEditablePopup_EmbeddedDataListOfRecords", + "type": "View", + "config": { + "type": "multirecordlist", + "contextClass": "O40M3A-MarekCo-Data-Cars", + "referenceList": "@P .EmbeddedDataListOfRecords", + "targetClassLabel": "@L cars", + "heading": "@L cars", + "name": "EmbeddedDataListOfRecords", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "renderMode": "Editable", + "multiRecordDisplayAs": "table", + "template": "SimpleTable", + "children": [{ + "name": "Columns", + "type": "Region", + "children": [{ + "type": "TextInput", + "config": { + "value": "@P .Brand", + "label": "@FL .Brand", + "labelOption": "default" + } + }, { + "type": "TextInput", + "config": { + "value": "@P .Model", + "label": "@FL .Model", + "labelOption": "default" + } + }, { + "type": "Currency", + "config": { + "value": "@P .Price", + "label": "@FL .Price", + "labelOption": "default", + "isoCodeSelection": "constant", + "currencyISOCode": "USD", + "allowDecimals": true + } + }, { + "type": "Checkbox", + "config": { + "label": "@FL .IsFirstOwner", + "value": "@P .IsFirstOwner", + "labelOption": "default", + "captionOption": "default", + "trueLabel": "@L Yes", + "falseLabel": "@L No", + "caption": "@FL .IsFirstOwner" + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Interior", + "label": "@FL .Interior", + "labelOption": "default", + "deferDatasource": true, + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Interior" + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Insurance", + "label": "@FL .Insurance", + "labelOption": "default", + "deferDatasource": true, + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Insurance" + } + }, { + "type": "Date", + "config": { + "value": "@P .ClientMeetingDate", + "label": "@FL .ClientMeetingDate", + "labelOption": "default" + } + }, { + "type": "Time", + "config": { + "value": "@P .ClientMeetingTime", + "label": "@FL .ClientMeetingTime", + "labelOption": "default" + } + }, { + "type": "DateTime", + "config": { + "value": "@P .TransactionDateTime", + "label": "@FL .TransactionDateTime", + "labelOption": "default" + } + }, { + "type": "TextArea", + "config": { + "value": "@P .Notes", + "label": "@FL .Notes", + "labelOption": "default" + } + }] + }], + "editMode": "modal", + "editModeConfig": { + "defaultView": "Create2", + "useSeparateViewForEdit": false, + "editView": "pyEdit" + }, + "parentClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "dataRetrievalType": "MANUAL", + "propertyLabel": "@L EmbeddedDataListOfRecords", + "localeReference": "@LR O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDTABLEEDITABLEPOPUP_EMBEDDEDDATALISTOFRECORDS" + }, + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "Create2": [{ + "name": "Create2", + "type": "View", + "config": { + "mode": "editable", + "ruleClass": "O40M3A-MarekCo-Data-Cars", + "template": "DefaultForm", + "localeReference": "@LR O40M3A-MAREKCO-DATA-CARS!VIEW!CREATE2" + }, + "children": [{ + "name": "Fields", + "type": "Region", + "children": [{ + "type": "TextInput", + "config": { + "value": "@P .Brand", + "label": "@FL .Brand", + "labelOption": "default", + "required": true + } + }, { + "type": "TextInput", + "config": { + "value": "@P .Model", + "label": "@FL .Model", + "labelOption": "default" + } + }, { + "type": "Currency", + "config": { + "value": "@P .Price", + "label": "@FL .Price", + "labelOption": "default", + "isoCodeSelection": "constant", + "currencyISOCode": "USD", + "allowDecimals": true + } + }, { + "type": "Checkbox", + "config": { + "caption": "@FL .IsFirstOwner", + "value": "@P .IsFirstOwner", + "labelOption": "default", + "captionOption": "default", + "trueLabel": "@L Yes", + "falseLabel": "@L No" + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Interior", + "label": "@FL .Interior", + "labelOption": "default", + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Interior", + "deferDatasource": true + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Insurance", + "label": "@FL .Insurance", + "labelOption": "default", + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Insurance", + "deferDatasource": true + } + }, { + "type": "Date", + "config": { + "value": "@P .ClientMeetingDate", + "label": "@FL .ClientMeetingDate", + "labelOption": "default" + } + }, { + "type": "Time", + "config": { + "value": "@P .ClientMeetingTime", + "label": "@FL .ClientMeetingTime", + "labelOption": "default" + } + }, { + "type": "DateTime", + "config": { + "value": "@P .TransactionDateTime", + "label": "@FL .TransactionDateTime", + "labelOption": "default" + } + }, { + "type": "TextArea", + "config": { + "value": "@P .Notes", + "label": "@FL .Notes", + "labelOption": "default" + } + }] + }], + "classID": "O40M3A-MarekCo-Data-Cars" + }] + }, + "paragraphs": { + "EmbeddedDataListOfRecords_additionalInfo": [{ + "content": "", + "name": "EmbeddedDataListOfRecords_additionalInfo", + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "Brand_additionalInfo": [{ + "content": "", + "name": "Brand_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Model_additionalInfo": [{ + "content": "", + "name": "Model_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Price_additionalInfo": [{ + "content": "", + "name": "Price_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "IsFirstOwner_additionalInfo": [{ + "content": "", + "name": "IsFirstOwner_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Interior_additionalInfo": [{ + "content": "", + "name": "Interior_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Insurance_additionalInfo": [{ + "content": "", + "name": "Insurance_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "ClientMeetingDate_additionalInfo": [{ + "content": "", + "name": "ClientMeetingDate_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "ClientMeetingTime_additionalInfo": [{ + "content": "", + "name": "ClientMeetingTime_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "TransactionDateTime_additionalInfo": [{ + "content": "", + "name": "TransactionDateTime_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Notes_additionalInfo": [{ + "content": "", + "name": "Notes_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }] + }, + "datapages": { + "D_InsuranceList": { + "classID": "O40M3A-MarekCo-Data-Insurance", + "mode": "readonly", + "isSearchable": false, + "isQueryable": true, + "structure": "list", + "isWorkObject": false, + "isDataObject": true + }, + "D_cars": { + "parameters": [{ + "name": "Id", + "defaultValue": "", + "linkedField": "Id" + }], + "classID": "O40M3A-MarekCo-Data-Cars", + "mode": "readonly", + "isSearchable": false, + "isQueryable": false, + "isAlternateKeyStorage": true, + "structure": "page" + }, + "D_carsSavable": { + "parameters": [{ + "name": "Id", + "defaultValue": "", + "linkedField": "Id" + }], + "classID": "O40M3A-MarekCo-Data-Cars", + "mode": "editable", + "isSearchable": false, + "isQueryable": false, + "isAlternateKeyStorage": true, + "structure": "page" + } + }, + "dataTypes": { + "O40M3A-MarekCo-Data-Cars": { + "classKeys": ["Id"], + "savableDataPage": "D_carsSavable", + "lookupDataPage": "D_cars", + "lookupDataPageInfo": { + "isAlternateKeyStorage": true, + "parameters": { + "Id": "@P .Id" + } + } + } + }, + "fields": { + "EmbeddedDataListOfRecords": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Page List", + "dataRetrievalType": "manual", + "additionalInformation": "@PARAGRAPH EmbeddedDataListOfRecords_additionalInfo", + "pageClass": "O40M3A-MarekCo-Data-Cars", + "label": "EmbeddedDataListOfRecords" + }], + "Brand": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Brand_additionalInfo", + "label": "brand" + }], + "Model": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Model_additionalInfo", + "label": "model" + }], + "Price": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Decimal", + "displayAs": "pxCurrency", + "additionalInformation": "@PARAGRAPH Price_additionalInfo", + "label": "Price" + }], + "IsFirstOwner": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "True-False", + "displayAs": "pxCheckbox", + "additionalInformation": "@PARAGRAPH IsFirstOwner_additionalInfo", + "label": "IsFirstOwner" + }], + "Interior": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Interior_additionalInfo", + "label": "interior", + "datasource": { + "tableType": "PromptList", + "records": [{ + "key": "basic", + "value": "basic" + }, { + "key": "comfort", + "value": "comfort" + }, { + "key": "elite", + "value": "elite" + }] + } + }], + "Insurance": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Insurance_additionalInfo", + "label": "Insurance", + "datasource": { + "tableType": "DataPage", + "tableClass": "O40M3A-MarekCo-Data-Insurance", + "name": "D_InsuranceList", + "propertyForDisplayText": "@P .Name", + "propertyForValue": "@P .pyGUID", + "parameters": [] + } + }], + "ClientMeetingDate": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Date", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH ClientMeetingDate_additionalInfo", + "label": "client meeting date" + }], + "ClientMeetingTime": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "TimeOfDay", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH ClientMeetingTime_additionalInfo", + "label": "Client meeting time" + }], + "TransactionDateTime": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Date Time", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH TransactionDateTime_additionalInfo", + "label": "Transaction date time" + }], + "Notes": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxTextArea", + "additionalInformation": "@PARAGRAPH Notes_additionalInfo", + "label": "Notes" + }] + } + }, + "components": ["DefaultForm", "TextArea", "Checkbox", "Currency", "Dropdown", "SimpleTable", "Region", "Time", "TextInput", "View", "Date", "DateTime"], + "localeReferences": ["O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDTABLEEDITABLEPOPUP_EMBEDDEDDATALISTOFRECORDS", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!MODEL_ADDITIONALINFO", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!PARAGRAPH!EMBEDDEDDATALISTOFRECORDS_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INSURANCE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!CLIENTMEETINGTIME_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!BRAND_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!NOTES_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!ASSOCIATED!INTERIOR", "O40M3A-MAREKCO-DATA-CARS!VIEW!CREATE2", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!PRICE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!CLIENTMEETINGDATE_ADDITIONALINFO", "@BASECLASS!DATAPAGE!D_INSURANCELIST", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!CASE!EMBEDDEDDATATEST", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INTERIOR_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!ISFIRSTOWNER_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!TRANSACTIONDATETIME_ADDITIONALINFO", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDTABLEEDITABLEPOPUP"], + "root": { + "type": "reference", + "config": { + "type": "view", + "name": "EDTableEditablePopup", + "context": "caseInfo.content" + } + }, + "context_data": { + "caseInfo": { + "content": { + "EmbeddedDataListOfRecords": [{ + "summary_of_associated_lists__": {} + }, { + "summary_of_associated_lists__": {} + }] + } + } + } + } +} \ No newline at end of file diff --git a/test/src/commonMain/composeResources/files/responses/dx/cases/EmbeddedDataTest-Conditions-POST.json b/test/src/commonMain/composeResources/files/responses/dx/cases/EmbeddedDataTest-Conditions-POST.json new file mode 100644 index 00000000..8158a62c --- /dev/null +++ b/test/src/commonMain/composeResources/files/responses/dx/cases/EmbeddedDataTest-Conditions-POST.json @@ -0,0 +1,589 @@ +{ + "data": { + "caseInfo": { + "caseTypeID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "owner": "rep@mediaco", + "availableActions": [{ + "name": "Edit details", + "links": { + "open": { + "rel": "self", + "href": "/cases/O40M3A-MAREKCO-WORK E-26028/actions/pyUpdateCaseDetails", + "type": "GET", + "title": "Get case action details" + } + }, + "ID": "pyUpdateCaseDetails", + "type": "Case" + }, { + "name": "Change stage", + "links": { + "open": { + "rel": "self", + "href": "/cases/O40M3A-MAREKCO-WORK E-26028/actions/pyChangeStage", + "type": "GET", + "title": "Get case action details" + } + }, + "ID": "pyChangeStage", + "type": "Case" + }], + "associations": { + "follows": false + }, + "lastUpdatedBy": "rep@mediaco", + "assignments": [{ + "instructions": "", + "canPerform": "true", + "assigneeInfo": { + "name": "Administrator", + "ID": "rep@mediaco", + "type": "worklist" + }, + "processID": "CreateForm_Default", + "urgency": "10", + "processName": "Create", + "isMultiStep": "true", + "name": "ED table editable conditions", + "context": "", + "links": { + "open": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT", + "type": "GET", + "title": "Get assignment details" + } + }, + "ID": "ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT", + "actions": [{ + "name": "ED table editable conditions", + "links": { + "submit": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/actions/EDCheckAddeditremoveConditions", + "type": "PATCH", + "title": "Submit assignment action " + }, + "save": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/actions/EDCheckAddeditremoveConditions/save", + "type": "PATCH", + "title": "Save assignment action " + }, + "open": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/actions/EDCheckAddeditremoveConditions", + "type": "GET", + "title": "Get assignment action details" + } + }, + "ID": "EDCheckAddeditremoveConditions", + "type": "FlowAction" + }] + }], + "hasNewAttachments": false, + "businessID": "E-26028", + "sla": { + "goal": "", + "deadline": "" + }, + "WidgetsToRefresh": ["TaskList"], + "caseTypeName": "EmbeddedDataTest", + "urgency": "10", + "createTime": "2026-01-12T14:37:57.600Z", + "createdBy": "rep@mediaco", + "name": "EmbeddedDataTest", + "stages": [{ + "entryTime": "2026-01-12T14:37:57.606Z", + "name": "Create", + "links": { + "open": { + "rel": "self", + "href": "/cases/O40M3A-MAREKCO-WORK E-26028/stages/PRIM0", + "type": "PUT", + "title": "Jump to this stage" + } + }, + "visited_status": "active", + "ID": "PRIM0", + "type": "Primary", + "transitionType": "create" + }], + "ID": "O40M3A-MAREKCO-WORK E-26028", + "caseTypeIcon": "cmicons/pycase.svg", + "status": "New", + "stageID": "PRIM0", + "stageLabel": "Create", + "lastUpdateTime": "2026-01-12T14:37:57.608Z", + "content": { + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "pxObjClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "pyLabel": "EmbeddedDataTest", + "pyID": "E-26028", + "pyViewName": "EDCheckAddeditremoveConditions", + "pyViewContext": "", + "DisableAddeditremovereorder": false, + "EmbeddedDataListOfRecords": [] + } + } + }, + "uiResources": { + "resources": { + "views": { + "pyEmbedAssignment": [{ + "name": "pyEmbedAssignment", + "type": "View", + "config": { + "ruleClass": "Work-" + }, + "children": [{ + "name": "A", + "type": "Region", + "children": [{ + "type": "reference", + "config": { + "type": "view", + "name": "pyCaseWorkarea" + } + }] + }], + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "pyCaseWorkarea": [{ + "name": "pyCaseWorkarea", + "type": "View", + "config": { + "ruleClass": "Work-" + }, + "children": [{ + "name": "A", + "type": "Region", + "children": [{ + "type": "reference", + "config": { + "type": "view", + "name": "pzFlowContainer" + } + }] + }], + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "pzFlowContainer": [{ + "name": "pzFlowContainer", + "type": "View", + "config": { + "ruleClass": "@baseclass" + }, + "children": [{ + "type": "FlowContainer", + "config": { + "name": "workarea", + "routingInfo": "@ROUTING_INFO" + }, + "children": [{ + "type": "reference", + "config": { + "type": "view", + "name": "@P .pyViewName", + "context": "@P .pyViewContext" + } + }] + }], + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "EDCheckAddeditremoveConditions": [{ + "name": "EDCheckAddeditremoveConditions", + "type": "View", + "config": { + "template": "DefaultForm", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "localeReference": "@LR O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDCHECKADDEDITREMOVECONDITIONS" + }, + "children": [{ + "name": "Fields", + "type": "Region", + "children": [{ + "type": "Checkbox", + "config": { + "caption": "@FL .DisableAddeditremovereorder", + "value": "@P .DisableAddeditremovereorder", + "labelOption": "default", + "captionOption": "default", + "trueLabel": "@L Yes", + "falseLabel": "@L No" + } + }, { + "type": "reference", + "config": { + "name": "EDCheckAddeditremoveConditions_EmbeddedDataListOfRecords_1", + "inheritedProps": [{ + "prop": "label", + "value": "@L Cars editable table" + }], + "authorContext": ".EmbeddedDataListOfRecords", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "labelOption": "custom", + "type": "view" + } + }] + }], + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "EDCheckAddeditremoveConditions_EmbeddedDataListOfRecords_1": [{ + "name": "EDCheckAddeditremoveConditions_EmbeddedDataListOfRecords_1", + "type": "View", + "config": { + "type": "multirecordlist", + "contextClass": "O40M3A-MarekCo-Data-Cars", + "referenceList": "@P .EmbeddedDataListOfRecords", + "targetClassLabel": "@L cars", + "heading": "@L cars", + "name": "EmbeddedDataListOfRecords", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "renderMode": "Editable", + "multiRecordDisplayAs": "table", + "template": "SimpleTable", + "children": [{ + "name": "Columns", + "type": "Region", + "children": [{ + "type": "TextInput", + "config": { + "value": "@P .Brand", + "label": "@FL .Brand", + "labelOption": "default" + } + }, { + "type": "TextInput", + "config": { + "value": "@P .Model", + "label": "@FL .Model", + "labelOption": "default" + } + }, { + "type": "Currency", + "config": { + "value": "@P .Price", + "label": "@FL .Price", + "labelOption": "default", + "isoCodeSelection": "constant", + "currencyISOCode": "USD", + "allowDecimals": true + } + }] + }], + "editMode": "tableRows", + "editModeConfig": { + "defaultView": "Create" + }, + "parentClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "dataRetrievalType": "MANUAL", + "propertyLabel": "@L EmbeddedDataListOfRecords", + "localeReference": "@LR O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDCHECKADDEDITREMOVECONDITIONS_EMBEDDEDDATALISTOFRECORDS_1", + "uniqueField": ".EmbedListUUID__", + "allowActions": { + "allowAdd": "@E .DisableAddeditremovereorder == false", + "allowEdit": "@E .DisableAddeditremovereorder == false", + "allowDelete": "@E .DisableAddeditremovereorder == false", + "allowDragDrop": "@E .DisableAddeditremovereorder == false" + } + }, + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }] + }, + "paragraphs": { + "DisableAddeditremovereorder_additionalInfo": [{ + "content": "", + "name": "DisableAddeditremovereorder_additionalInfo", + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "EmbeddedDataListOfRecords_additionalInfo": [{ + "content": "", + "name": "EmbeddedDataListOfRecords_additionalInfo", + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "Brand_additionalInfo": [{ + "content": "", + "name": "Brand_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Model_additionalInfo": [{ + "content": "", + "name": "Model_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Price_additionalInfo": [{ + "content": "", + "name": "Price_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }] + }, + "dataTypes": { + "O40M3A-MarekCo-Data-Cars": { + "classKeys": ["Id"], + "savableDataPage": "D_carsSavable", + "lookupDataPage": "D_cars", + "lookupDataPageInfo": { + "isAlternateKeyStorage": true, + "parameters": { + "Id": "@P .Id" + } + } + } + }, + "datapages": { + "D_cars": { + "parameters": [{ + "name": "Id", + "defaultValue": "", + "linkedField": "Id" + }], + "classID": "O40M3A-MarekCo-Data-Cars", + "mode": "readonly", + "isSearchable": false, + "isQueryable": false, + "isAlternateKeyStorage": true, + "structure": "page" + }, + "D_carsSavable": { + "parameters": [{ + "name": "Id", + "defaultValue": "", + "linkedField": "Id" + }], + "classID": "O40M3A-MarekCo-Data-Cars", + "mode": "editable", + "isSearchable": false, + "isQueryable": false, + "isAlternateKeyStorage": true, + "structure": "page" + } + }, + "fields": { + "pyLabel": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Text", + "maxLength": 64, + "displayAs": "pxTextInput", + "definedOnClassID": "Work-", + "expectedLength": 60, + "label": "Label" + }], + "pyID": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Text", + "maxLength": 32, + "displayAs": "pxDisplayText", + "definedOnClassID": "Work-Cover-", + "expectedLength": 22, + "label": "Case ID", + "isClassKey": true + }], + "pyViewName": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Text", + "displayAs": "pxTextInput", + "definedOnClassID": "Work-", + "label": "pyViewName" + }], + "pyViewContext": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Text", + "displayAs": "pxTextInput", + "definedOnClassID": "Work-", + "label": "pyViewContext" + }], + "DisableAddeditremovereorder": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "True-False", + "displayAs": "pxCheckbox", + "additionalInformation": "@PARAGRAPH DisableAddeditremovereorder_additionalInfo", + "label": "disable add/edit/remove/reorder" + }], + "EmbeddedDataListOfRecords": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Page List", + "dataRetrievalType": "manual", + "additionalInformation": "@PARAGRAPH EmbeddedDataListOfRecords_additionalInfo", + "pageClass": "O40M3A-MarekCo-Data-Cars", + "label": "EmbeddedDataListOfRecords" + }], + "EmbedListUUID__": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxTextInput", + "definedOnClassID": "@baseclass", + "label": "EmbedListUUID__" + }], + "Brand": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Brand_additionalInfo", + "label": "brand" + }], + "Model": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Model_additionalInfo", + "label": "model" + }], + "Price": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Decimal", + "displayAs": "pxCurrency", + "additionalInformation": "@PARAGRAPH Price_additionalInfo", + "label": "Price" + }] + } + }, + "components": ["DefaultForm", "FlowContainer", "Checkbox", "Currency", "SimpleTable", "Region", "Text", "TextInput", "View"], + "localeReferences": ["O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!PARAGRAPH!DISABLEADDEDITREMOVEREORDER_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!MODEL_ADDITIONALINFO", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!PARAGRAPH!EMBEDDEDDATALISTOFRECORDS_ADDITIONALINFO", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDCHECKADDEDITREMOVECONDITIONS_EMBEDDEDDATALISTOFRECORDS_1", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EDCHECKADDEDITREMOVECONDITIONS", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!PRICE_ADDITIONALINFO", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!CASE!EMBEDDEDDATATEST", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!BRAND_ADDITIONALINFO"], + "root": { + "type": "reference", + "config": { + "type": "view", + "name": "pyEmbedAssignment", + "context": "caseInfo.content" + } + }, + "context_data": {}, + "navigation": { + "template": "Horizontal", + "steps": [{ + "allow_jump": true, + "name": "ED table editable conditions", + "actionID": "EDCheckAddeditremoveConditions", + "visited_status": "current", + "ID": "AssignmentSF7" + }, { + "allow_jump": true, + "name": "Ed table editable popup conditions ", + "actionID": "EdTableEditablePopupConditions", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF8", + "type": "PATCH", + "title": "Go to Ed table editable popup conditions " + } + }, + "ID": "AssignmentSF8" + }, { + "allow_jump": true, + "name": "ED table editable", + "actionID": "EmbeddedDataDisplayAsRepeatingViewEdit", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF4", + "type": "PATCH", + "title": "Go to ED table editable" + } + }, + "ID": "AssignmentSF4" + }, { + "allow_jump": true, + "name": "ED table editable popup", + "actionID": "EDTableEditablePopup", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF5", + "type": "PATCH", + "title": "Go to ED table editable popup" + } + }, + "ID": "AssignmentSF5" + }, { + "allow_jump": true, + "name": "ED simple table readonly", + "actionID": "EDSimpleTableReadonly", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF1", + "type": "PATCH", + "title": "Go to ED simple table readonly" + } + }, + "ID": "AssignmentSF1" + }, { + "allow_jump": true, + "name": "ED table readonly", + "actionID": "EmbeddedDataDisplayAsTable", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF3", + "type": "PATCH", + "title": "Go to ED table readonly" + } + }, + "ID": "AssignmentSF3" + }, { + "allow_jump": true, + "name": "ED repeating view editable", + "actionID": "EDRepeatingViewEditable", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF2", + "type": "PATCH", + "title": "Go to ED repeating view editable" + } + }, + "ID": "AssignmentSF2" + }, { + "allow_jump": true, + "name": "ED repeating view readonly", + "actionID": "EDRepeatingViewReadonly", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF6", + "type": "PATCH", + "title": "Go to ED repeating view readonly" + } + }, + "ID": "AssignmentSF6" + }] + }, + "actionButtons": { + "secondary": [{ + "jsAction": "cancelAssignment", + "name": "Cancel", + "actionID": "cancel" + }], + "main": [{ + "jsAction": "finishAssignment", + "name": "Next ", + "actionID": "next" + }] + } + }, + "ID": "O40M3A-MAREKCO-WORK E-26028", + "nextAssignmentInfo": { + "context": "self", + "className": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "links": { + "open": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT", + "type": "GET", + "title": "Get assignment details" + } + }, + "ID": "ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-26028!CREATEFORM_DEFAULT" + } +} \ No newline at end of file diff --git a/test/src/commonMain/composeResources/files/responses/dx/cases/EmbeddedDataTest-EditableTable-POST.json b/test/src/commonMain/composeResources/files/responses/dx/cases/EmbeddedDataTest-EditableTable-POST.json new file mode 100644 index 00000000..13710dd6 --- /dev/null +++ b/test/src/commonMain/composeResources/files/responses/dx/cases/EmbeddedDataTest-EditableTable-POST.json @@ -0,0 +1,712 @@ +{ + "data": { + "caseInfo": { + "caseTypeID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "owner": "rep@mediaco", + "availableActions": [{ + "name": "Edit details", + "links": { + "open": { + "rel": "self", + "href": "/cases/O40M3A-MAREKCO-WORK E-24003/actions/pyUpdateCaseDetails", + "type": "GET", + "title": "Get case action details" + } + }, + "ID": "pyUpdateCaseDetails", + "type": "Case" + }, { + "name": "Change stage", + "links": { + "open": { + "rel": "self", + "href": "/cases/O40M3A-MAREKCO-WORK E-24003/actions/pyChangeStage", + "type": "GET", + "title": "Get case action details" + } + }, + "ID": "pyChangeStage", + "type": "Case" + }], + "associations": { + "follows": false + }, + "lastUpdatedBy": "rep@mediaco", + "assignments": [{ + "instructions": "", + "canPerform": "true", + "assigneeInfo": { + "name": "Administrator", + "ID": "rep@mediaco", + "type": "worklist" + }, + "processID": "CreateForm_Default", + "urgency": "10", + "processName": "Create", + "isMultiStep": "true", + "name": "ED table editable", + "context": "", + "links": { + "open": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT", + "type": "GET", + "title": "Get assignment details" + } + }, + "ID": "ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT", + "actions": [{ + "name": "ED table editable", + "links": { + "submit": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/actions/EmbeddedDataDisplayAsRepeatingViewEdit", + "type": "PATCH", + "title": "Submit assignment action " + }, + "save": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/actions/EmbeddedDataDisplayAsRepeatingViewEdit/save", + "type": "PATCH", + "title": "Save assignment action " + }, + "open": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/actions/EmbeddedDataDisplayAsRepeatingViewEdit", + "type": "GET", + "title": "Get assignment action details" + } + }, + "ID": "EmbeddedDataDisplayAsRepeatingViewEdit", + "type": "FlowAction" + }] + }], + "hasNewAttachments": false, + "businessID": "E-24003", + "sla": { + "goal": "", + "deadline": "" + }, + "WidgetsToRefresh": ["TaskList"], + "caseTypeName": "EmbeddedDataTest", + "urgency": "10", + "createTime": "2026-01-07T14:17:20.983Z", + "createdBy": "rep@mediaco", + "name": "EmbeddedDataTest", + "stages": [{ + "entryTime": "2026-01-07T14:17:20.990Z", + "name": "Create", + "links": { + "open": { + "rel": "self", + "href": "/cases/O40M3A-MAREKCO-WORK E-24003/stages/PRIM0", + "type": "PUT", + "title": "Jump to this stage" + } + }, + "visited_status": "active", + "ID": "PRIM0", + "type": "Primary", + "transitionType": "create" + }], + "ID": "O40M3A-MAREKCO-WORK E-24003", + "caseTypeIcon": "cmicons/pycase.svg", + "status": "New", + "stageID": "PRIM0", + "stageLabel": "Create", + "lastUpdateTime": "2026-01-07T14:17:20.993Z", + "content": { + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "pxObjClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "pyLabel": "EmbeddedDataTest", + "pyID": "E-24003", + "pyViewName": "EmbeddedDataDisplayAsRepeatingViewEdit", + "pyViewContext": "", + "EmbeddedDataListOfRecords": [] + } + } + }, + "uiResources": { + "resources": { + "views": { + "pyEmbedAssignment": [{ + "name": "pyEmbedAssignment", + "type": "View", + "config": { + "ruleClass": "Work-" + }, + "children": [{ + "name": "A", + "type": "Region", + "children": [{ + "type": "reference", + "config": { + "type": "view", + "name": "pyCaseWorkarea" + } + }] + }], + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "pyCaseWorkarea": [{ + "name": "pyCaseWorkarea", + "type": "View", + "config": { + "ruleClass": "Work-" + }, + "children": [{ + "name": "A", + "type": "Region", + "children": [{ + "type": "reference", + "config": { + "type": "view", + "name": "pzFlowContainer" + } + }] + }], + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "pzFlowContainer": [{ + "name": "pzFlowContainer", + "type": "View", + "config": { + "ruleClass": "@baseclass" + }, + "children": [{ + "type": "FlowContainer", + "config": { + "name": "workarea", + "routingInfo": "@ROUTING_INFO" + }, + "children": [{ + "type": "reference", + "config": { + "type": "view", + "name": "@P .pyViewName", + "context": "@P .pyViewContext" + } + }] + }], + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "EmbeddedDataDisplayAsRepeatingViewEdit": [{ + "name": "EmbeddedDataDisplayAsRepeatingViewEdit", + "type": "View", + "config": { + "template": "DefaultForm", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "localeReference": "@LR O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EMBEDDEDDATADISPLAYASREPEATINGVIEWEDIT" + }, + "children": [{ + "name": "Fields", + "type": "Region", + "children": [{ + "type": "reference", + "config": { + "name": "EmbeddedDataDisplayAsRepeatingViewEdit_EmbeddedDataListOfRec", + "inheritedProps": [{ + "prop": "label", + "value": "@L Cars editable table" + }], + "authorContext": ".EmbeddedDataListOfRecords", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "labelOption": "custom", + "type": "view" + } + }] + }], + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "EmbeddedDataDisplayAsRepeatingViewEdit_EmbeddedDataListOfRec": [{ + "name": "EmbeddedDataDisplayAsRepeatingViewEdit_EmbeddedDataListOfRec", + "type": "View", + "config": { + "type": "multirecordlist", + "contextClass": "O40M3A-MarekCo-Data-Cars", + "referenceList": "@P .EmbeddedDataListOfRecords", + "targetClassLabel": "@L cars", + "heading": "@L cars", + "name": "EmbeddedDataListOfRecords", + "ruleClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "renderMode": "Editable", + "multiRecordDisplayAs": "table", + "template": "SimpleTable", + "parentClass": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "dataRetrievalType": "MANUAL", + "propertyLabel": "@L EmbeddedDataListOfRecords", + "localeReference": "@LR O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EMBEDDEDDATADISPLAYASREPEATINGVIEWEDIT_EMBEDDEDDATALISTOFREC", + "children": [{ + "name": "Columns", + "type": "Region", + "children": [{ + "type": "TextInput", + "config": { + "value": "@P .Brand", + "label": "@FL .Brand", + "labelOption": "default" + } + }, { + "type": "TextInput", + "config": { + "value": "@P .Model", + "label": "@FL .Model", + "labelOption": "default" + } + }, { + "type": "Currency", + "config": { + "value": "@P .Price", + "label": "@FL .Price", + "labelOption": "default", + "isoCodeSelection": "constant", + "currencyISOCode": "USD", + "allowDecimals": true + } + }, { + "type": "Checkbox", + "config": { + "label": "@FL .IsFirstOwner", + "value": "@P .IsFirstOwner", + "labelOption": "default", + "captionOption": "default", + "trueLabel": "@L Yes", + "falseLabel": "@L No", + "caption": "@FL .IsFirstOwner" + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Interior", + "label": "@FL .Interior", + "labelOption": "default", + "deferDatasource": true, + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Interior" + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Insurance", + "label": "@FL .Insurance", + "labelOption": "default", + "deferDatasource": true, + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Insurance" + } + }, { + "type": "Date", + "config": { + "value": "@P .ClientMeetingDate", + "label": "@FL .ClientMeetingDate", + "labelOption": "default" + } + }, { + "type": "Time", + "config": { + "value": "@P .ClientMeetingTime", + "label": "@FL .ClientMeetingTime", + "labelOption": "default" + } + }, { + "type": "DateTime", + "config": { + "value": "@P .TransactionDateTime", + "label": "@FL .TransactionDateTime", + "labelOption": "default" + } + }, { + "type": "TextArea", + "config": { + "value": "@P .Notes", + "label": "@FL .Notes", + "labelOption": "default" + } + }] + }], + "editMode": "tableRows", + "editModeConfig": { + "defaultView": "Create2" + }, + "uniqueField": ".EmbedListUUID__", + "allowActions": { + "allowEdit": true + }, + "allowRowEdit": true + }, + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }] + }, + "paragraphs": { + "EmbeddedDataListOfRecords_additionalInfo": [{ + "content": "", + "name": "EmbeddedDataListOfRecords_additionalInfo", + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest" + }], + "Brand_additionalInfo": [{ + "content": "", + "name": "Brand_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Model_additionalInfo": [{ + "content": "", + "name": "Model_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Price_additionalInfo": [{ + "content": "", + "name": "Price_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "IsFirstOwner_additionalInfo": [{ + "content": "", + "name": "IsFirstOwner_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Interior_additionalInfo": [{ + "content": "", + "name": "Interior_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Insurance_additionalInfo": [{ + "content": "", + "name": "Insurance_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "ClientMeetingDate_additionalInfo": [{ + "content": "", + "name": "ClientMeetingDate_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "ClientMeetingTime_additionalInfo": [{ + "content": "", + "name": "ClientMeetingTime_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "TransactionDateTime_additionalInfo": [{ + "content": "", + "name": "TransactionDateTime_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Notes_additionalInfo": [{ + "content": "", + "name": "Notes_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }] + }, + "datapages": { + "D_InsuranceList": { + "classID": "O40M3A-MarekCo-Data-Insurance", + "mode": "readonly", + "isSearchable": false, + "isQueryable": true, + "structure": "list", + "isWorkObject": false, + "isDataObject": true + }, + "D_cars": { + "parameters": [{ + "name": "Id", + "defaultValue": "", + "linkedField": "Id" + }], + "classID": "O40M3A-MarekCo-Data-Cars", + "mode": "readonly", + "isSearchable": false, + "isQueryable": false, + "isAlternateKeyStorage": true, + "structure": "page" + }, + "D_carsSavable": { + "parameters": [{ + "name": "Id", + "defaultValue": "", + "linkedField": "Id" + }], + "classID": "O40M3A-MarekCo-Data-Cars", + "mode": "editable", + "isSearchable": false, + "isQueryable": false, + "isAlternateKeyStorage": true, + "structure": "page" + } + }, + "dataTypes": { + "O40M3A-MarekCo-Data-Cars": { + "classKeys": ["Id"], + "savableDataPage": "D_carsSavable", + "lookupDataPage": "D_cars", + "lookupDataPageInfo": { + "isAlternateKeyStorage": true, + "parameters": { + "Id": "@P .Id" + } + } + } + }, + "fields": { + "pyLabel": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Text", + "maxLength": 64, + "displayAs": "pxTextInput", + "definedOnClassID": "Work-", + "expectedLength": 60, + "label": "Label" + }], + "pyID": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Text", + "maxLength": 32, + "displayAs": "pxDisplayText", + "definedOnClassID": "Work-Cover-", + "expectedLength": 22, + "label": "Case ID", + "isClassKey": true + }], + "pyViewName": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Text", + "displayAs": "pxTextInput", + "definedOnClassID": "Work-", + "label": "pyViewName" + }], + "pyViewContext": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Text", + "displayAs": "pxTextInput", + "definedOnClassID": "Work-", + "label": "pyViewContext" + }], + "EmbeddedDataListOfRecords": [{ + "classID": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "type": "Page List", + "dataRetrievalType": "manual", + "additionalInformation": "@PARAGRAPH EmbeddedDataListOfRecords_additionalInfo", + "pageClass": "O40M3A-MarekCo-Data-Cars", + "label": "EmbeddedDataListOfRecords" + }], + "Brand": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Brand_additionalInfo", + "label": "brand" + }], + "Model": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Model_additionalInfo", + "label": "model" + }], + "Price": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Decimal", + "displayAs": "pxCurrency", + "additionalInformation": "@PARAGRAPH Price_additionalInfo", + "label": "Price" + }], + "IsFirstOwner": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "True-False", + "displayAs": "pxCheckbox", + "additionalInformation": "@PARAGRAPH IsFirstOwner_additionalInfo", + "label": "IsFirstOwner" + }], + "Interior": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Interior_additionalInfo", + "label": "interior", + "datasource": { + "tableType": "PromptList", + "records": [{ + "key": "basic", + "value": "basic" + }, { + "key": "comfort", + "value": "comfort" + }, { + "key": "elite", + "value": "elite" + }] + } + }], + "Insurance": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Insurance_additionalInfo", + "label": "Insurance", + "datasource": { + "tableType": "DataPage", + "tableClass": "O40M3A-MarekCo-Data-Insurance", + "name": "D_InsuranceList", + "propertyForDisplayText": "@P .Name", + "propertyForValue": "@P .pyGUID", + "parameters": [] + } + }], + "ClientMeetingDate": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Date", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH ClientMeetingDate_additionalInfo", + "label": "client meeting date" + }], + "ClientMeetingTime": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "TimeOfDay", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH ClientMeetingTime_additionalInfo", + "label": "Client meeting time" + }], + "TransactionDateTime": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Date Time", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH TransactionDateTime_additionalInfo", + "label": "Transaction date time" + }], + "Notes": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxTextArea", + "additionalInformation": "@PARAGRAPH Notes_additionalInfo", + "label": "Notes" + }] + } + }, + "components": ["TextArea", "Dropdown", "SimpleTable", "Time", "View", "Date", "DateTime", "DefaultForm", "FlowContainer", "Checkbox", "Currency", "Region", "TextInput"], + "localeReferences": ["O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EMBEDDEDDATADISPLAYASREPEATINGVIEWEDIT_EMBEDDEDDATALISTOFREC", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!MODEL_ADDITIONALINFO", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!PARAGRAPH!EMBEDDEDDATALISTOFRECORDS_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INSURANCE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!CLIENTMEETINGTIME_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!BRAND_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!NOTES_ADDITIONALINFO", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!VIEW!EMBEDDEDDATADISPLAYASREPEATINGVIEWEDIT", "O40M3A-MAREKCO-DATA-CARS!ASSOCIATED!INTERIOR", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!PRICE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!CLIENTMEETINGDATE_ADDITIONALINFO", "@BASECLASS!DATAPAGE!D_INSURANCELIST", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!CASE!EMBEDDEDDATATEST", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INTERIOR_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!ISFIRSTOWNER_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!TRANSACTIONDATETIME_ADDITIONALINFO"], + "root": { + "type": "reference", + "config": { + "type": "view", + "name": "pyEmbedAssignment", + "context": "caseInfo.content" + } + }, + "context_data": { + "caseInfo": { + "content": { + "EmbeddedDataListOfRecordsTemp": [{ + "summary_of_associated_lists__": {} + }] + } + } + }, + "navigation": { + "template": "Horizontal", + "steps": [{ + "allow_jump": true, + "name": "ED table editable", + "actionID": "EmbeddedDataDisplayAsRepeatingViewEdit", + "visited_status": "current", + "ID": "AssignmentSF4" + }, { + "allow_jump": true, + "name": "ED table editable popup", + "actionID": "EDTableEditablePopup", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF5", + "type": "PATCH", + "title": "Go to ED table editable popup" + } + }, + "ID": "AssignmentSF5" + }, { + "allow_jump": true, + "name": "ED simple table readonly", + "actionID": "EDSimpleTableReadonly", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF1", + "type": "PATCH", + "title": "Go to ED simple table readonly" + } + }, + "ID": "AssignmentSF1" + }, { + "allow_jump": true, + "name": "ED table readonly", + "actionID": "EmbeddedDataDisplayAsTable", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF3", + "type": "PATCH", + "title": "Go to ED table readonly" + } + }, + "ID": "AssignmentSF3" + }, { + "allow_jump": true, + "name": "ED repeating view editable", + "actionID": "EDRepeatingViewEditable", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF2", + "type": "PATCH", + "title": "Go to ED repeating view editable" + } + }, + "ID": "AssignmentSF2" + }, { + "allow_jump": true, + "name": "ED repeating view readonly", + "actionID": "EDRepeatingViewReadonly", + "visited_status": "future", + "links": { + "open": { + "rel": "self", + "href": "assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT/navigation_steps/AssignmentSF6", + "type": "PATCH", + "title": "Go to ED repeating view readonly" + } + }, + "ID": "AssignmentSF6" + }] + }, + "actionButtons": { + "secondary": [{ + "jsAction": "cancelAssignment", + "name": "Cancel", + "actionID": "cancel" + }], + "main": [{ + "jsAction": "finishAssignment", + "name": "Next ", + "actionID": "next" + }] + } + }, + "ID": "O40M3A-MAREKCO-WORK E-24003", + "nextAssignmentInfo": { + "context": "self", + "className": "O40M3A-MarekCo-Work-EmbeddedDataTest", + "links": { + "open": { + "rel": "self", + "href": "/assignments/ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT", + "type": "GET", + "title": "Get assignment details" + } + }, + "ID": "ASSIGN-WORKLIST O40M3A-MAREKCO-WORK E-24003!CREATEFORM_DEFAULT" + } +} \ No newline at end of file diff --git a/test/src/commonMain/composeResources/files/responses/dx/cases/views/EmbeddedDataTest-Add-Popup-Refresh-1-PATCH.json b/test/src/commonMain/composeResources/files/responses/dx/cases/views/EmbeddedDataTest-Add-Popup-Refresh-1-PATCH.json new file mode 100644 index 00000000..5915fe67 --- /dev/null +++ b/test/src/commonMain/composeResources/files/responses/dx/cases/views/EmbeddedDataTest-Add-Popup-Refresh-1-PATCH.json @@ -0,0 +1,305 @@ +{ + "data": { + "caseInfo": { + "content": { + "EmbeddedDataListOfRecords": [{}, { + "classID": "O40M3A-MarekCo-Data-Cars", + "Price": "", + "IsFirstOwner": false, + "Insurance": "", + "Model": "", + "Interior": "", + "ClientMeetingDate": "", + "ClientMeetingTime": "", + "Notes": "", + "Brand": "", + "TransactionDateTime": "" + }] + } + } + }, + "uiResources": { + "resources": { + "views": { + "Create2": [{ + "name": "Create2", + "type": "View", + "config": { + "mode": "editable", + "ruleClass": "O40M3A-MarekCo-Data-Cars", + "template": "DefaultForm", + "localeReference": "@LR O40M3A-MAREKCO-DATA-CARS!VIEW!CREATE2" + }, + "children": [{ + "name": "Fields", + "type": "Region", + "children": [{ + "type": "TextInput", + "config": { + "value": "@P .Brand", + "label": "@FL .Brand", + "labelOption": "default", + "required": true + } + }, { + "type": "TextInput", + "config": { + "value": "@P .Model", + "label": "@FL .Model", + "labelOption": "default" + } + }, { + "type": "Currency", + "config": { + "value": "@P .Price", + "label": "@FL .Price", + "labelOption": "default", + "isoCodeSelection": "constant", + "currencyISOCode": "USD", + "allowDecimals": true + } + }, { + "type": "Checkbox", + "config": { + "caption": "@FL .IsFirstOwner", + "value": "@P .IsFirstOwner", + "labelOption": "default", + "captionOption": "default", + "trueLabel": "@L Yes", + "falseLabel": "@L No" + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Interior", + "label": "@FL .Interior", + "labelOption": "default", + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Interior", + "deferDatasource": true + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Insurance", + "label": "@FL .Insurance", + "labelOption": "default", + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Insurance", + "deferDatasource": true + } + }, { + "type": "Date", + "config": { + "value": "@P .ClientMeetingDate", + "label": "@FL .ClientMeetingDate", + "labelOption": "default" + } + }, { + "type": "Time", + "config": { + "value": "@P .ClientMeetingTime", + "label": "@FL .ClientMeetingTime", + "labelOption": "default" + } + }, { + "type": "DateTime", + "config": { + "value": "@P .TransactionDateTime", + "label": "@FL .TransactionDateTime", + "labelOption": "default" + } + }, { + "type": "TextArea", + "config": { + "value": "@P .Notes", + "label": "@FL .Notes", + "labelOption": "default" + } + }] + }], + "classID": "O40M3A-MarekCo-Data-Cars" + }] + }, + "paragraphs": { + "Price_additionalInfo": [{ + "content": "", + "name": "Price_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "IsFirstOwner_additionalInfo": [{ + "content": "", + "name": "IsFirstOwner_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Insurance_additionalInfo": [{ + "content": "", + "name": "Insurance_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Model_additionalInfo": [{ + "content": "", + "name": "Model_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Interior_additionalInfo": [{ + "content": "", + "name": "Interior_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "ClientMeetingDate_additionalInfo": [{ + "content": "", + "name": "ClientMeetingDate_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "ClientMeetingTime_additionalInfo": [{ + "content": "", + "name": "ClientMeetingTime_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Notes_additionalInfo": [{ + "content": "", + "name": "Notes_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Brand_additionalInfo": [{ + "content": "", + "name": "Brand_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "TransactionDateTime_additionalInfo": [{ + "content": "", + "name": "TransactionDateTime_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }] + }, + "datapages": { + "D_InsuranceList": { + "classID": "O40M3A-MarekCo-Data-Insurance", + "mode": "readonly", + "isSearchable": false, + "isQueryable": true, + "structure": "list", + "isWorkObject": false, + "isDataObject": true + } + }, + "fields": { + "Price": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Decimal", + "displayAs": "pxCurrency", + "additionalInformation": "@PARAGRAPH Price_additionalInfo", + "label": "Price" + }], + "IsFirstOwner": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "True-False", + "displayAs": "pxCheckbox", + "additionalInformation": "@PARAGRAPH IsFirstOwner_additionalInfo", + "label": "IsFirstOwner" + }], + "Insurance": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Insurance_additionalInfo", + "label": "Insurance", + "datasource": { + "tableType": "DataPage", + "tableClass": "O40M3A-MarekCo-Data-Insurance", + "name": "D_InsuranceList", + "propertyForDisplayText": "@P .Name", + "propertyForValue": "@P .pyGUID", + "parameters": [] + } + }], + "Model": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Model_additionalInfo", + "label": "model" + }], + "Interior": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Interior_additionalInfo", + "label": "interior", + "datasource": { + "tableType": "PromptList", + "records": [{ + "key": "basic", + "value": "basic" + }, { + "key": "comfort", + "value": "comfort" + }, { + "key": "elite", + "value": "elite" + }] + } + }], + "ClientMeetingDate": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Date", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH ClientMeetingDate_additionalInfo", + "label": "client meeting date" + }], + "ClientMeetingTime": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "TimeOfDay", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH ClientMeetingTime_additionalInfo", + "label": "Client meeting time" + }], + "Notes": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxTextArea", + "additionalInformation": "@PARAGRAPH Notes_additionalInfo", + "label": "Notes" + }], + "Brand": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Brand_additionalInfo", + "label": "brand" + }], + "TransactionDateTime": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Date Time", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH TransactionDateTime_additionalInfo", + "label": "Transaction date time" + }] + } + }, + "components": ["DefaultForm", "TextArea", "Checkbox", "Currency", "Dropdown", "Region", "Time", "TextInput", "View", "Date", "DateTime"], + "localeReferences": ["O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!MODEL_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INSURANCE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!CLIENTMEETINGTIME_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!BRAND_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!NOTES_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!ASSOCIATED!INTERIOR", "O40M3A-MAREKCO-DATA-CARS!VIEW!CREATE2", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!PRICE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!CLIENTMEETINGDATE_ADDITIONALINFO", "@BASECLASS!DATAPAGE!D_INSURANCELIST", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!CASE!EMBEDDEDDATATEST", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INTERIOR_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!ISFIRSTOWNER_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!TRANSACTIONDATETIME_ADDITIONALINFO"], + "root": { + "type": "reference", + "config": { + "type": "view", + "name": "Create2", + "context": "caseInfo.content.EmbeddedDataListOfRecords[1]" + } + }, + "context_data": { + "caseInfo": { + "content": { + "EmbeddedDataListOfRecords": [{}, { + "summary_of_associated_lists__": {} + }] + } + } + } + } +} \ No newline at end of file diff --git a/test/src/commonMain/composeResources/files/responses/dx/cases/views/EmbeddedDataTest-Add-Popup-Refresh-2-PATCH.json b/test/src/commonMain/composeResources/files/responses/dx/cases/views/EmbeddedDataTest-Add-Popup-Refresh-2-PATCH.json new file mode 100644 index 00000000..5a4eda50 --- /dev/null +++ b/test/src/commonMain/composeResources/files/responses/dx/cases/views/EmbeddedDataTest-Add-Popup-Refresh-2-PATCH.json @@ -0,0 +1,305 @@ +{ + "data": { + "caseInfo": { + "content": { + "EmbeddedDataListOfRecords": [{}, { + "classID": "O40M3A-MarekCo-Data-Cars", + "Price": "", + "IsFirstOwner": false, + "Insurance": "", + "Model": "Astra", + "Interior": "", + "ClientMeetingDate": "", + "ClientMeetingTime": "", + "Notes": "", + "Brand": "Opel", + "TransactionDateTime": "" + }] + } + } + }, + "uiResources": { + "resources": { + "views": { + "Create2": [{ + "name": "Create2", + "type": "View", + "config": { + "mode": "editable", + "ruleClass": "O40M3A-MarekCo-Data-Cars", + "template": "DefaultForm", + "localeReference": "@LR O40M3A-MAREKCO-DATA-CARS!VIEW!CREATE2" + }, + "children": [{ + "name": "Fields", + "type": "Region", + "children": [{ + "type": "TextInput", + "config": { + "value": "@P .Brand", + "label": "@FL .Brand", + "labelOption": "default", + "required": true + } + }, { + "type": "TextInput", + "config": { + "value": "@P .Model", + "label": "@FL .Model", + "labelOption": "default" + } + }, { + "type": "Currency", + "config": { + "value": "@P .Price", + "label": "@FL .Price", + "labelOption": "default", + "isoCodeSelection": "constant", + "currencyISOCode": "USD", + "allowDecimals": true + } + }, { + "type": "Checkbox", + "config": { + "caption": "@FL .IsFirstOwner", + "value": "@P .IsFirstOwner", + "labelOption": "default", + "captionOption": "default", + "trueLabel": "@L Yes", + "falseLabel": "@L No" + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Interior", + "label": "@FL .Interior", + "labelOption": "default", + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Interior", + "deferDatasource": true + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Insurance", + "label": "@FL .Insurance", + "labelOption": "default", + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Insurance", + "deferDatasource": true + } + }, { + "type": "Date", + "config": { + "value": "@P .ClientMeetingDate", + "label": "@FL .ClientMeetingDate", + "labelOption": "default" + } + }, { + "type": "Time", + "config": { + "value": "@P .ClientMeetingTime", + "label": "@FL .ClientMeetingTime", + "labelOption": "default" + } + }, { + "type": "DateTime", + "config": { + "value": "@P .TransactionDateTime", + "label": "@FL .TransactionDateTime", + "labelOption": "default" + } + }, { + "type": "TextArea", + "config": { + "value": "@P .Notes", + "label": "@FL .Notes", + "labelOption": "default" + } + }] + }], + "classID": "O40M3A-MarekCo-Data-Cars" + }] + }, + "paragraphs": { + "Price_additionalInfo": [{ + "content": "", + "name": "Price_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "IsFirstOwner_additionalInfo": [{ + "content": "", + "name": "IsFirstOwner_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Insurance_additionalInfo": [{ + "content": "", + "name": "Insurance_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Model_additionalInfo": [{ + "content": "", + "name": "Model_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Interior_additionalInfo": [{ + "content": "", + "name": "Interior_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "ClientMeetingDate_additionalInfo": [{ + "content": "", + "name": "ClientMeetingDate_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "ClientMeetingTime_additionalInfo": [{ + "content": "", + "name": "ClientMeetingTime_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Notes_additionalInfo": [{ + "content": "", + "name": "Notes_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Brand_additionalInfo": [{ + "content": "", + "name": "Brand_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "TransactionDateTime_additionalInfo": [{ + "content": "", + "name": "TransactionDateTime_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }] + }, + "datapages": { + "D_InsuranceList": { + "classID": "O40M3A-MarekCo-Data-Insurance", + "mode": "readonly", + "isSearchable": false, + "isQueryable": true, + "structure": "list", + "isWorkObject": false, + "isDataObject": true + } + }, + "fields": { + "Price": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Decimal", + "displayAs": "pxCurrency", + "additionalInformation": "@PARAGRAPH Price_additionalInfo", + "label": "Price" + }], + "IsFirstOwner": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "True-False", + "displayAs": "pxCheckbox", + "additionalInformation": "@PARAGRAPH IsFirstOwner_additionalInfo", + "label": "IsFirstOwner" + }], + "Insurance": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Insurance_additionalInfo", + "label": "Insurance", + "datasource": { + "tableType": "DataPage", + "tableClass": "O40M3A-MarekCo-Data-Insurance", + "name": "D_InsuranceList", + "propertyForDisplayText": "@P .Name", + "propertyForValue": "@P .pyGUID", + "parameters": [] + } + }], + "Model": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Model_additionalInfo", + "label": "model" + }], + "Interior": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Interior_additionalInfo", + "label": "interior", + "datasource": { + "tableType": "PromptList", + "records": [{ + "key": "basic", + "value": "basic" + }, { + "key": "comfort", + "value": "comfort" + }, { + "key": "elite", + "value": "elite" + }] + } + }], + "ClientMeetingDate": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Date", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH ClientMeetingDate_additionalInfo", + "label": "client meeting date" + }], + "ClientMeetingTime": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "TimeOfDay", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH ClientMeetingTime_additionalInfo", + "label": "Client meeting time" + }], + "Notes": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxTextArea", + "additionalInformation": "@PARAGRAPH Notes_additionalInfo", + "label": "Notes" + }], + "Brand": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Brand_additionalInfo", + "label": "brand" + }], + "TransactionDateTime": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Date Time", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH TransactionDateTime_additionalInfo", + "label": "Transaction date time" + }] + } + }, + "components": ["DefaultForm", "TextArea", "Checkbox", "Currency", "Dropdown", "Region", "Time", "TextInput", "View", "Date", "DateTime"], + "localeReferences": ["O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!MODEL_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INSURANCE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!CLIENTMEETINGTIME_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!BRAND_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!NOTES_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!ASSOCIATED!INTERIOR", "O40M3A-MAREKCO-DATA-CARS!VIEW!CREATE2", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!PRICE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!CLIENTMEETINGDATE_ADDITIONALINFO", "@BASECLASS!DATAPAGE!D_INSURANCELIST", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!CASE!EMBEDDEDDATATEST", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INTERIOR_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!ISFIRSTOWNER_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!TRANSACTIONDATETIME_ADDITIONALINFO"], + "root": { + "type": "reference", + "config": { + "type": "view", + "name": "Create2", + "context": "caseInfo.content.EmbeddedDataListOfRecords[1]" + } + }, + "context_data": { + "caseInfo": { + "content": { + "EmbeddedDataListOfRecords": [{}, { + "summary_of_associated_lists__": {} + }] + } + } + } + } +} \ No newline at end of file diff --git a/test/src/commonMain/composeResources/files/responses/dx/cases/views/EmbeddedDataTest-Edit-Popup-Refresh-1-PATCH.json b/test/src/commonMain/composeResources/files/responses/dx/cases/views/EmbeddedDataTest-Edit-Popup-Refresh-1-PATCH.json new file mode 100644 index 00000000..66a8f19b --- /dev/null +++ b/test/src/commonMain/composeResources/files/responses/dx/cases/views/EmbeddedDataTest-Edit-Popup-Refresh-1-PATCH.json @@ -0,0 +1,305 @@ +{ + "data": { + "caseInfo": { + "content": { + "EmbeddedDataListOfRecords": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "Brand": "Ford", + "Model": "Focus", + "Price": "123456", + "IsFirstOwner": true, + "Interior": "comfort", + "Insurance": "8b42e334-5541-4658-86b5-1871e7b2133e", + "ClientMeetingDate": "2026-01-08", + "ClientMeetingTime": "00:00:00", + "TransactionDateTime": "2026-01-08T05:00:00.000Z", + "Notes": "This is a note" + }] + } + } + }, + "uiResources": { + "resources": { + "views": { + "Create2": [{ + "name": "Create2", + "type": "View", + "config": { + "mode": "editable", + "ruleClass": "O40M3A-MarekCo-Data-Cars", + "template": "DefaultForm", + "localeReference": "@LR O40M3A-MAREKCO-DATA-CARS!VIEW!CREATE2" + }, + "children": [{ + "name": "Fields", + "type": "Region", + "children": [{ + "type": "TextInput", + "config": { + "value": "@P .Brand", + "label": "@FL .Brand", + "labelOption": "default", + "required": true + } + }, { + "type": "TextInput", + "config": { + "value": "@P .Model", + "label": "@FL .Model", + "labelOption": "default" + } + }, { + "type": "Currency", + "config": { + "value": "@P .Price", + "label": "@FL .Price", + "labelOption": "default", + "isoCodeSelection": "constant", + "currencyISOCode": "USD", + "allowDecimals": true + } + }, { + "type": "Checkbox", + "config": { + "caption": "@FL .IsFirstOwner", + "value": "@P .IsFirstOwner", + "labelOption": "default", + "captionOption": "default", + "trueLabel": "@L Yes", + "falseLabel": "@L No" + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Interior", + "label": "@FL .Interior", + "labelOption": "default", + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Interior", + "deferDatasource": true + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Insurance", + "label": "@FL .Insurance", + "labelOption": "default", + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Insurance", + "deferDatasource": true + } + }, { + "type": "Date", + "config": { + "value": "@P .ClientMeetingDate", + "label": "@FL .ClientMeetingDate", + "labelOption": "default" + } + }, { + "type": "Time", + "config": { + "value": "@P .ClientMeetingTime", + "label": "@FL .ClientMeetingTime", + "labelOption": "default" + } + }, { + "type": "DateTime", + "config": { + "value": "@P .TransactionDateTime", + "label": "@FL .TransactionDateTime", + "labelOption": "default" + } + }, { + "type": "TextArea", + "config": { + "value": "@P .Notes", + "label": "@FL .Notes", + "labelOption": "default" + } + }] + }], + "classID": "O40M3A-MarekCo-Data-Cars" + }] + }, + "paragraphs": { + "Price_additionalInfo": [{ + "content": "", + "name": "Price_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "IsFirstOwner_additionalInfo": [{ + "content": "", + "name": "IsFirstOwner_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Insurance_additionalInfo": [{ + "content": "", + "name": "Insurance_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Model_additionalInfo": [{ + "content": "", + "name": "Model_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Interior_additionalInfo": [{ + "content": "", + "name": "Interior_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "ClientMeetingDate_additionalInfo": [{ + "content": "", + "name": "ClientMeetingDate_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "ClientMeetingTime_additionalInfo": [{ + "content": "", + "name": "ClientMeetingTime_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Notes_additionalInfo": [{ + "content": "", + "name": "Notes_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Brand_additionalInfo": [{ + "content": "", + "name": "Brand_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "TransactionDateTime_additionalInfo": [{ + "content": "", + "name": "TransactionDateTime_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }] + }, + "datapages": { + "D_InsuranceList": { + "classID": "O40M3A-MarekCo-Data-Insurance", + "mode": "readonly", + "isSearchable": false, + "isQueryable": true, + "structure": "list", + "isWorkObject": false, + "isDataObject": true + } + }, + "fields": { + "Price": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Decimal", + "displayAs": "pxCurrency", + "additionalInformation": "@PARAGRAPH Price_additionalInfo", + "label": "Price" + }], + "IsFirstOwner": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "True-False", + "displayAs": "pxCheckbox", + "additionalInformation": "@PARAGRAPH IsFirstOwner_additionalInfo", + "label": "IsFirstOwner" + }], + "Insurance": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Insurance_additionalInfo", + "label": "Insurance", + "datasource": { + "tableType": "DataPage", + "tableClass": "O40M3A-MarekCo-Data-Insurance", + "name": "D_InsuranceList", + "propertyForDisplayText": "@P .Name", + "propertyForValue": "@P .pyGUID", + "parameters": [] + } + }], + "Model": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Model_additionalInfo", + "label": "model" + }], + "Interior": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Interior_additionalInfo", + "label": "interior", + "datasource": { + "tableType": "PromptList", + "records": [{ + "key": "basic", + "value": "basic" + }, { + "key": "comfort", + "value": "comfort" + }, { + "key": "elite", + "value": "elite" + }] + } + }], + "ClientMeetingDate": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Date", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH ClientMeetingDate_additionalInfo", + "label": "client meeting date" + }], + "ClientMeetingTime": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "TimeOfDay", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH ClientMeetingTime_additionalInfo", + "label": "Client meeting time" + }], + "Notes": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxTextArea", + "additionalInformation": "@PARAGRAPH Notes_additionalInfo", + "label": "Notes" + }], + "Brand": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Brand_additionalInfo", + "label": "brand" + }], + "TransactionDateTime": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Date Time", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH TransactionDateTime_additionalInfo", + "label": "Transaction date time" + }] + } + }, + "components": ["DefaultForm", "TextArea", "Checkbox", "Currency", "Dropdown", "Region", "Time", "TextInput", "View", "Date", "DateTime"], + "localeReferences": ["O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!MODEL_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INSURANCE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!CLIENTMEETINGTIME_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!BRAND_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!NOTES_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!ASSOCIATED!INTERIOR", "O40M3A-MAREKCO-DATA-CARS!VIEW!CREATE2", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!PRICE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!CLIENTMEETINGDATE_ADDITIONALINFO", "@BASECLASS!DATAPAGE!D_INSURANCELIST", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!CASE!EMBEDDEDDATATEST", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INTERIOR_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!ISFIRSTOWNER_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!TRANSACTIONDATETIME_ADDITIONALINFO"], + "root": { + "type": "reference", + "config": { + "type": "view", + "name": "Create2", + "context": "caseInfo.content.EmbeddedDataListOfRecords[0]" + } + }, + "context_data": { + "caseInfo": { + "content": { + "EmbeddedDataListOfRecords": [{ + "summary_of_associated_lists__": {} + }] + } + } + } + } +} \ No newline at end of file diff --git a/test/src/commonMain/composeResources/files/responses/dx/cases/views/EmbeddedDataTest-Edit-Popup-Refresh-2-PATCH.json b/test/src/commonMain/composeResources/files/responses/dx/cases/views/EmbeddedDataTest-Edit-Popup-Refresh-2-PATCH.json new file mode 100644 index 00000000..82360ea9 --- /dev/null +++ b/test/src/commonMain/composeResources/files/responses/dx/cases/views/EmbeddedDataTest-Edit-Popup-Refresh-2-PATCH.json @@ -0,0 +1,305 @@ +{ + "data": { + "caseInfo": { + "content": { + "EmbeddedDataListOfRecords": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "Brand": "Ford", + "Model": "Fiesta", + "Price": "123456", + "IsFirstOwner": true, + "Interior": "comfort", + "Insurance": "8b42e334-5541-4658-86b5-1871e7b2133e", + "ClientMeetingDate": "2026-01-08", + "ClientMeetingTime": "00:00:00", + "TransactionDateTime": "2026-01-08T05:00:00.000Z", + "Notes": "This is a note" + }] + } + } + }, + "uiResources": { + "resources": { + "views": { + "Create2": [{ + "name": "Create2", + "type": "View", + "config": { + "mode": "editable", + "ruleClass": "O40M3A-MarekCo-Data-Cars", + "template": "DefaultForm", + "localeReference": "@LR O40M3A-MAREKCO-DATA-CARS!VIEW!CREATE2" + }, + "children": [{ + "name": "Fields", + "type": "Region", + "children": [{ + "type": "TextInput", + "config": { + "value": "@P .Brand", + "label": "@FL .Brand", + "labelOption": "default", + "required": true + } + }, { + "type": "TextInput", + "config": { + "value": "@P .Model", + "label": "@FL .Model", + "labelOption": "default" + } + }, { + "type": "Currency", + "config": { + "value": "@P .Price", + "label": "@FL .Price", + "labelOption": "default", + "isoCodeSelection": "constant", + "currencyISOCode": "USD", + "allowDecimals": true + } + }, { + "type": "Checkbox", + "config": { + "caption": "@FL .IsFirstOwner", + "value": "@P .IsFirstOwner", + "labelOption": "default", + "captionOption": "default", + "trueLabel": "@L Yes", + "falseLabel": "@L No" + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Interior", + "label": "@FL .Interior", + "labelOption": "default", + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Interior", + "deferDatasource": true + } + }, { + "type": "Dropdown", + "config": { + "value": "@P .Insurance", + "label": "@FL .Insurance", + "labelOption": "default", + "placeholder": "@L Select...", + "listType": "associated", + "datasource": "@ASSOCIATED .Insurance", + "deferDatasource": true + } + }, { + "type": "Date", + "config": { + "value": "@P .ClientMeetingDate", + "label": "@FL .ClientMeetingDate", + "labelOption": "default" + } + }, { + "type": "Time", + "config": { + "value": "@P .ClientMeetingTime", + "label": "@FL .ClientMeetingTime", + "labelOption": "default" + } + }, { + "type": "DateTime", + "config": { + "value": "@P .TransactionDateTime", + "label": "@FL .TransactionDateTime", + "labelOption": "default" + } + }, { + "type": "TextArea", + "config": { + "value": "@P .Notes", + "label": "@FL .Notes", + "labelOption": "default" + } + }] + }], + "classID": "O40M3A-MarekCo-Data-Cars" + }] + }, + "paragraphs": { + "Price_additionalInfo": [{ + "content": "", + "name": "Price_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "IsFirstOwner_additionalInfo": [{ + "content": "", + "name": "IsFirstOwner_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Insurance_additionalInfo": [{ + "content": "", + "name": "Insurance_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Model_additionalInfo": [{ + "content": "", + "name": "Model_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Interior_additionalInfo": [{ + "content": "", + "name": "Interior_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "ClientMeetingDate_additionalInfo": [{ + "content": "", + "name": "ClientMeetingDate_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "ClientMeetingTime_additionalInfo": [{ + "content": "", + "name": "ClientMeetingTime_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Notes_additionalInfo": [{ + "content": "", + "name": "Notes_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "Brand_additionalInfo": [{ + "content": "", + "name": "Brand_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }], + "TransactionDateTime_additionalInfo": [{ + "content": "", + "name": "TransactionDateTime_additionalInfo", + "classID": "O40M3A-MarekCo-Data-Cars" + }] + }, + "datapages": { + "D_InsuranceList": { + "classID": "O40M3A-MarekCo-Data-Insurance", + "mode": "readonly", + "isSearchable": false, + "isQueryable": true, + "structure": "list", + "isWorkObject": false, + "isDataObject": true + } + }, + "fields": { + "Price": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Decimal", + "displayAs": "pxCurrency", + "additionalInformation": "@PARAGRAPH Price_additionalInfo", + "label": "Price" + }], + "IsFirstOwner": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "True-False", + "displayAs": "pxCheckbox", + "additionalInformation": "@PARAGRAPH IsFirstOwner_additionalInfo", + "label": "IsFirstOwner" + }], + "Insurance": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Insurance_additionalInfo", + "label": "Insurance", + "datasource": { + "tableType": "DataPage", + "tableClass": "O40M3A-MarekCo-Data-Insurance", + "name": "D_InsuranceList", + "propertyForDisplayText": "@P .Name", + "propertyForValue": "@P .pyGUID", + "parameters": [] + } + }], + "Model": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Model_additionalInfo", + "label": "model" + }], + "Interior": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxDropdown", + "additionalInformation": "@PARAGRAPH Interior_additionalInfo", + "label": "interior", + "datasource": { + "tableType": "PromptList", + "records": [{ + "key": "basic", + "value": "basic" + }, { + "key": "comfort", + "value": "comfort" + }, { + "key": "elite", + "value": "elite" + }] + } + }], + "ClientMeetingDate": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Date", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH ClientMeetingDate_additionalInfo", + "label": "client meeting date" + }], + "ClientMeetingTime": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "TimeOfDay", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH ClientMeetingTime_additionalInfo", + "label": "Client meeting time" + }], + "Notes": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "displayAs": "pxTextArea", + "additionalInformation": "@PARAGRAPH Notes_additionalInfo", + "label": "Notes" + }], + "Brand": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Text", + "maxLength": 256, + "displayAs": "pxTextInput", + "additionalInformation": "@PARAGRAPH Brand_additionalInfo", + "label": "brand" + }], + "TransactionDateTime": [{ + "classID": "O40M3A-MarekCo-Data-Cars", + "type": "Date Time", + "displayAs": "pxDateTime", + "additionalInformation": "@PARAGRAPH TransactionDateTime_additionalInfo", + "label": "Transaction date time" + }] + } + }, + "components": ["DefaultForm", "TextArea", "Checkbox", "Currency", "Dropdown", "Region", "Time", "TextInput", "View", "Date", "DateTime"], + "localeReferences": ["O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!MODEL_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INSURANCE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!CLIENTMEETINGTIME_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!BRAND_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!NOTES_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!ASSOCIATED!INTERIOR", "O40M3A-MAREKCO-DATA-CARS!VIEW!CREATE2", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!PRICE_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!CLIENTMEETINGDATE_ADDITIONALINFO", "@BASECLASS!DATAPAGE!D_INSURANCELIST", "O40M3A-MAREKCO-WORK-EMBEDDEDDATATEST!CASE!EMBEDDEDDATATEST", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!INTERIOR_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!ISFIRSTOWNER_ADDITIONALINFO", "O40M3A-MAREKCO-DATA-CARS!PARAGRAPH!TRANSACTIONDATETIME_ADDITIONALINFO"], + "root": { + "type": "reference", + "config": { + "type": "view", + "name": "Create2", + "context": "caseInfo.content.EmbeddedDataListOfRecords[0]" + } + }, + "context_data": { + "caseInfo": { + "content": { + "EmbeddedDataListOfRecords": [{ + "summary_of_associated_lists__": {} + }] + } + } + } + } +} \ No newline at end of file diff --git a/test/src/commonMain/kotlin/com/pega/constellation/sdk/kmp/test/mock/handlers/DxAssignmentsHandler.kt b/test/src/commonMain/kotlin/com/pega/constellation/sdk/kmp/test/mock/handlers/DxAssignmentsHandler.kt index 9a48a82a..28a0fa48 100644 --- a/test/src/commonMain/kotlin/com/pega/constellation/sdk/kmp/test/mock/handlers/DxAssignmentsHandler.kt +++ b/test/src/commonMain/kotlin/com/pega/constellation/sdk/kmp/test/mock/handlers/DxAssignmentsHandler.kt @@ -7,6 +7,7 @@ import com.pega.constellation.sdk.kmp.test.mock.MockResponse.Asset import com.pega.constellation.sdk.kmp.test.mock.MockResponse.Error import kotlinx.serialization.json.Json import kotlinx.serialization.json.int +import kotlinx.serialization.json.jsonArray import kotlinx.serialization.json.jsonObject import kotlinx.serialization.json.jsonPrimitive @@ -29,7 +30,9 @@ class DxAssignmentsHandler : MockHandler { assignmentId.contains("D-2036") -> handleDataReferenceTest(request, actionId) assignmentId.contains("K-10048") -> handleKeysAndCiphers(request, actionId) assignmentId.contains("G-3025") -> handleGroupTest(actionId) - assignmentId.contains("E-22056") -> handleEmbeddedDataTest(actionId) + assignmentId.contains("E-22056") -> handleEmbeddedDataRepeatingViewTest(actionId) + assignmentId.contains("E-24003") -> handleEmbeddedDataTableSimpleTableTest(request, actionId) + assignmentId.contains("E-26028") -> handleEmbeddedDataConditionsTest(actionId) else -> Error(501, "Cannot handle assignment: $assignmentId, action: $actionId") } @@ -46,13 +49,39 @@ class DxAssignmentsHandler : MockHandler { } } - private fun handleEmbeddedDataTest(actionId: String): MockResponse { + private fun handleEmbeddedDataRepeatingViewTest(actionId: String): MockResponse { return when (actionId) { "EDRepeatingViewEditable" -> Asset("responses/dx/assignments/EmbeddedDataTest-1-RepeatingViewReadonly.json") else -> Error(404, "Invalid actionId: $actionId") } } + private fun handleEmbeddedDataTableSimpleTableTest(request: MockRequest, actionId: String): MockResponse { + return when (actionId) { + "EmbeddedDataDisplayAsRepeatingViewEdit" -> Asset("responses/dx/assignments/EmbeddedDataTest-EditableTablePopup.json") + "EDTableEditablePopup/refresh" -> { + val body = request.body ?: return Error(400, "Missing request body") + val bodyJson = Json.parseToJsonElement(body).jsonObject + val pageInstructions = bodyJson.getValue("pageInstructions").jsonArray + return when (pageInstructions.size) { + 2 -> Asset("responses/dx/assignments/refresh/EmbeddedDataTest-EditableTable-Popup-Refresh-1.json") + 4 -> Asset("responses/dx/assignments/refresh/EmbeddedDataTest-EditableTable-Popup-Refresh-2.json") + else -> Error(404, "No data for given pageInstructions size: ${pageInstructions.size} for actionId: $actionId") + } + } + "EDTableEditablePopup" -> Asset("responses/dx/assignments/EmbeddedDataTest-ReadonlySimpleTable.json") + "EDSimpleTableReadonly" -> Asset("responses/dx/assignments/EmbeddedDataTest-ReadonlyTable.json") + else -> Error(404, "Invalid actionId: $actionId") + } + } + + private fun handleEmbeddedDataConditionsTest(actionId: String): MockResponse { + return when (actionId) { + "EDCheckAddeditremoveConditions" -> Asset("responses/dx/assignments/EmbeddedDataTest-Conditions.json") + else -> Error(404, "Invalid actionId: $actionId") + } + } + private fun handleGroupTest(actionId: String): MockResponse { return when (actionId) { "Create" -> Asset("responses/dx/assignments/GroupTest-1-Create.json") diff --git a/test/src/commonMain/kotlin/com/pega/constellation/sdk/kmp/test/mock/handlers/DxCasesHandler.kt b/test/src/commonMain/kotlin/com/pega/constellation/sdk/kmp/test/mock/handlers/DxCasesHandler.kt index fb8fd658..ec7d39cb 100644 --- a/test/src/commonMain/kotlin/com/pega/constellation/sdk/kmp/test/mock/handlers/DxCasesHandler.kt +++ b/test/src/commonMain/kotlin/com/pega/constellation/sdk/kmp/test/mock/handlers/DxCasesHandler.kt @@ -6,6 +6,7 @@ import com.pega.constellation.sdk.kmp.test.mock.MockResponse import com.pega.constellation.sdk.kmp.test.mock.MockResponse.Asset import com.pega.constellation.sdk.kmp.test.mock.MockResponse.Error import kotlinx.serialization.json.Json +import kotlinx.serialization.json.jsonArray import kotlinx.serialization.json.jsonObject import kotlinx.serialization.json.jsonPrimitive @@ -15,6 +16,7 @@ class DxCasesHandler : MockHandler { override fun handle(request: MockRequest) = when (request.method) { "POST" -> handlePost(request) "DELETE" -> handleDelete(request) + "PATCH" -> handlePatch(request) else -> Error(500, "Method ${request.method} not supported") } @@ -25,7 +27,9 @@ class DxCasesHandler : MockHandler { return when (caseTypeId) { "DIXL-MediaCo-Work-SDKTesting" -> Asset("responses/dx/cases/SDKTesting-POST.json") "DIXL-MediaCo-Work-NewService" -> Asset("responses/dx/cases/NewService-POST.json") - "O40M3A-MarekCo-Work-EmbeddedDataTest" -> Asset("responses/dx/cases/EmbeddedDataTest-RepeatingViewEditable-POST.json") + "O40M3A-MarekCo-Work-EmbeddedDataTest-RepeatingViewEditable" -> Asset("responses/dx/cases/EmbeddedDataTest-RepeatingViewEditable-POST.json") + "O40M3A-MarekCo-Work-EmbeddedDataTest-EditableTable" -> Asset("responses/dx/cases/EmbeddedDataTest-EditableTable-POST.json") + "O40M3A-MarekCo-Work-EmbeddedDataTest-Conditions" -> Asset("responses/dx/cases/EmbeddedDataTest-Conditions-POST.json") "O40M3A-MarekCo-Work-DataReferenceTest2" -> Asset("responses/dx/cases/DataReferenceTest-POST.json") "O40M3A-MarekCo-Work-KeysAndCiphers" -> Asset("responses/dx/cases/KeysAndCiphers-POST.json") "O40M3A-MarekCo-Work-GroupTest" -> Asset("responses/dx/cases/GroupTest-POST.json") @@ -34,6 +38,26 @@ class DxCasesHandler : MockHandler { } } + private fun handlePatch(request: MockRequest) = + when { + request.url.contains("E-24003/views/Create2/refresh") -> handleEmbeddedDataPopupRefresh(request) + else -> Error(500, "Missing response for ${request.url}") + } + + private fun handleEmbeddedDataPopupRefresh(request: MockRequest): MockResponse { + val body = request.body ?: return Error(400, "Missing request body") + val bodyJson = Json.parseToJsonElement(body).jsonObject + val pageInstructions = bodyJson.getValue("pageInstructions").jsonArray + val interestPage = bodyJson.getValue("interestPage").jsonPrimitive.content + return when { + interestPage == ".EmbeddedDataListOfRecords(1)" && pageInstructions.size == 1 -> Asset("responses/dx/cases/views/EmbeddedDataTest-Edit-Popup-Refresh-1-PATCH.json") + interestPage == ".EmbeddedDataListOfRecords(1)" && pageInstructions.size == 2 -> Asset("responses/dx/cases/views/EmbeddedDataTest-Edit-Popup-Refresh-2-PATCH.json") + interestPage == ".EmbeddedDataListOfRecords(2)" && pageInstructions.size == 2 -> Asset("responses/dx/cases/views/EmbeddedDataTest-Add-Popup-Refresh-1-PATCH.json") + interestPage == ".EmbeddedDataListOfRecords(2)" && pageInstructions.size == 4 -> Asset("responses/dx/cases/views/EmbeddedDataTest-Add-Popup-Refresh-2-PATCH.json") + else -> Error(404, "No data for given interestPage: $interestPage and pageInstructions size: ${pageInstructions.size}") + } + } + private fun handleDelete(request: MockRequest) = when { request.url.contains("S-17098") -> Asset("responses/dx/cases/SDKTesting-DELETE.json") diff --git a/ui-components-cmp/src/commonMain/kotlin/com/pega/constellation/sdk/kmp/ui/components/cmp/controls/form/EditableTable.kt b/ui-components-cmp/src/commonMain/kotlin/com/pega/constellation/sdk/kmp/ui/components/cmp/controls/form/EditableTable.kt index f055232a..1fce97f0 100644 --- a/ui-components-cmp/src/commonMain/kotlin/com/pega/constellation/sdk/kmp/ui/components/cmp/controls/form/EditableTable.kt +++ b/ui-components-cmp/src/commonMain/kotlin/com/pega/constellation/sdk/kmp/ui/components/cmp/controls/form/EditableTable.kt @@ -15,6 +15,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.LocalFocusManager +import androidx.compose.ui.platform.testTag import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp @@ -120,10 +121,11 @@ fun EditableTable( if (haveDeleteColumn) { cell { if (rowObject.onDeleteButtonClick != null) { - IconButton(onClick = { - focusManager.clearFocus() - rowObject.onDeleteButtonClick() - }) { + IconButton( + onClick = { + focusManager.clearFocus() + rowObject.onDeleteButtonClick() + }, modifier = Modifier.testTag("delete_button_$rowId")) { Icon( painterResource(Res.drawable.icon_delete_48), "Delete item ${rowId + 1}", diff --git a/ui-renderer-cmp/src/commonMain/kotlin/com/pega/constellation/sdk/kmp/ui/renderer/cmp/containers/FieldGroupTemplateRenderer.kt b/ui-renderer-cmp/src/commonMain/kotlin/com/pega/constellation/sdk/kmp/ui/renderer/cmp/containers/FieldGroupTemplateRenderer.kt index 2a257313..e0525288 100644 --- a/ui-renderer-cmp/src/commonMain/kotlin/com/pega/constellation/sdk/kmp/ui/renderer/cmp/containers/FieldGroupTemplateRenderer.kt +++ b/ui-renderer-cmp/src/commonMain/kotlin/com/pega/constellation/sdk/kmp/ui/renderer/cmp/containers/FieldGroupTemplateRenderer.kt @@ -70,7 +70,7 @@ class FieldGroupTemplateRenderer : ComponentRenderer onDeleteButtonClick = if (row.showDeleteButton) { { deleteRow(rowId) } } else null, - cells = row.cells.map { { it.component.Render() } } + cells = row.cells.map { + { + val testTag = (it.component as? FieldComponent)?.pConnectPropertyReference ?: "" + Box(modifier = Modifier.testTag(testTag)) { + it.component.Render() + } + } + } ) }, addRowButton = if (allowAddRows) {