Skip to content

Commit

Permalink
JNG-4838 fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
noherczeg committed Nov 2, 2023
1 parent 901eed4 commit 165f86a
Show file tree
Hide file tree
Showing 18 changed files with 6,635 additions and 6,642 deletions.
1,570 changes: 785 additions & 785 deletions judo-ui-react-itest/ActionGroupTest/model/ActionGroupTest-ui.model

Large diffs are not rendered by default.

1,570 changes: 785 additions & 785 deletions judo-ui-react-itest/ActionGroupTestPro/model/ActionGroupTestPro-ui.model

Large diffs are not rendered by default.

460 changes: 230 additions & 230 deletions judo-ui-react-itest/BinaryTypeTest/model/BinaryTypeTest-ui.model

Large diffs are not rendered by default.

3,774 changes: 1,887 additions & 1,887 deletions judo-ui-react-itest/CRUDActionsTest/model/CRUDActionsTest-ui.model

Large diffs are not rendered by default.

Large diffs are not rendered by default.

404 changes: 202 additions & 202 deletions judo-ui-react-itest/FormsTest/model/FormsTest-ui.model

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

3,344 changes: 1,672 additions & 1,672 deletions judo-ui-react-itest/OperationParametersTest/model/OperationParametersTest-ui.model

Large diffs are not rendered by default.

906 changes: 453 additions & 453 deletions judo-ui-react-itest/ReadOnlyTest/model/ReadOnlyTest-ui.model

Large diffs are not rendered by default.

558 changes: 279 additions & 279 deletions judo-ui-react-itest/RelationTestReckless/model/RelationTest-ui.model

Large diffs are not rendered by default.

190 changes: 95 additions & 95 deletions judo-ui-react-itest/Shop/model/Shop-ui.model

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -211,43 +211,31 @@ public static List<PageDefinition> getRelatedDialogs(PageDefinition pageDefiniti
}

public static String getServiceImplForPage(PageDefinition pageDefinition) {
Application application = (Application) pageDefinition.eContainer();
Set<String> res = new HashSet<>();
DataElement dataElement = pageDefinition.getDataElement();

if (dataElement instanceof RelationType) {
return firstToLower(serviceRelationName((RelationType) dataElement)) + "Impl";
} else if (dataElement instanceof OperationParameterType) {
ClassType cls = ((OperationParameterType) dataElement).getTarget();
RelationType targetRelationType = (RelationType) application.getRelationTypes().stream()
.filter(r -> ((RelationType) r).getTarget().equals(cls))
.findFirst()
.orElse(null);

if (targetRelationType != null) {
return firstToLower(serviceRelationName(targetRelationType)) + "Impl";
if (dataElement instanceof RelationType relationType) {
return firstToLower(serviceRelationName(relationType) + "Impl");
} else if (dataElement instanceof OperationParameterType operationParameterType) {
if (operationParameterType.eContainer() instanceof OperationType operationType) {
if (operationType.getOutput() != null && pageDefinition.getContainer().isView()) {
return firstToLower(serviceClassName(operationType.getOutput().getTarget()) + "Impl");
}
if (operationType.eContainer() instanceof ClassType classType) {
return firstToLower(serviceClassName(classType) + "Impl");
}
if (operationParameterType.eContainer() instanceof RelationType relationType) {
return firstToLower(serviceRelationName(relationType) + "Impl");
}
}

RelationType operationInputRelationType = (RelationType) application.getRelationTypes().stream()
.filter(r -> ((RelationType) r).getTarget().getOperations().stream().anyMatch(o -> o.getInput() != null && o.getInput().getTarget().equals(cls)))
.findFirst()
.orElse(null);

if (operationInputRelationType != null) {
return firstToLower(serviceRelationName(operationInputRelationType)) + "Impl";
} else if (dataElement instanceof OperationType operationType) {
if (operationType.getOutput() != null && pageDefinition.getContainer().isView()) {
return firstToLower(serviceClassName(operationType.getOutput().getTarget()) + "Impl");
}
if (operationType.eContainer() instanceof ClassType classType) {
return firstToLower(serviceClassName(classType) + "Impl");
}
} else if (dataElement instanceof OperationType) {
OperationType operationType = (OperationType) dataElement;
if (operationType.getInput() != null) {
ClassType cls = operationType.getInput().getTarget();
RelationType operationInputRelationType = (RelationType) application.getRelationTypes().stream()
.filter(r -> ((RelationType) r).getTarget().getOperations().stream().anyMatch(o -> o.getInput() != null && o.getInput().getTarget().equals(cls)))
.findFirst()
.orElse(null);

if (operationInputRelationType != null) {
return firstToLower(serviceRelationName(operationInputRelationType)) + "Impl";
}
return firstToLower(serviceClassName(operationType.getInput().getTarget()) + "Impl");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export interface {{ componentName link }}Props {
editMode?: boolean;
}

// XMIID: {{ getXMIID link }}
// Name: {{ link.name }}
export function {{ componentName link }}(props: {{ componentName link }}Props) {
const { ownerData, actions, storeDiff, validationError, disabled, editMode } = props;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export interface {{ componentName table }}Props {
{{/ unless }}
}

// XMIID: {{ getXMIID table }}
// Name: {{ table.name }}
export function {{ componentName table }}(props: {{ componentName table }}Props) {
const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export interface {{ containerComponentName container }}Props {
{{/ unless }}
};

// XMIID: {{ getXMIID container }}
// Name: {{ container.name }}
export default function {{ containerComponentName container }}(props: {{ containerComponentName container }}Props) {
{{# unless (containerIsEmptyDashboard container) }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const {{ simpleActionDefinitionName action.actionDefinition }} = async () => {
// alert('OpenSelectorAction');
{{ debug action }}
const { result, data: returnedData } = await open{{ pageName action.targetPageDefinition }}({{{ getSelectorOpenActionParameters action page.container }}});
if (result === 'submit') {
{{# if action.targetPageDefinition.container.isRelationSelector }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import { useCallback, useEffect, useRef, useState, lazy, Suspense } from 'react'
const {{ containerComponentName page.container }}PageContainer = lazy(() => import('~/containers/{{ containerPath page.container }}/{{ containerComponentName page.container }}PageContainer'));
{{/ unless }}

// XMIID: {{ getXMIID page }}
// Name: {{ page.name }}
export default function {{ pageName page }}() {
{{# unless (containerIsEmptyDashboard page.container) }}
Expand Down

0 comments on commit 165f86a

Please sign in to comment.