Skip to content

Commit

Permalink
WIP fix propertyname
Browse files Browse the repository at this point in the history
  • Loading branch information
PKuhlmay committed Jun 28, 2024
1 parent 4ea5d37 commit a8e0abd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions Build/Sources/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ function App() {
// let modules = convertModuleToNode(working.modules);
let modules = convertModulesToNodes(working.modules);
// Check if nodes or edges are available, and update them.
console.log("modules");
console.log(modules);
console.log(working.nodes);
setNodes(modules ? modules: []);
setEdges(working.edges ? working.edges : []);

Expand Down
2 changes: 1 addition & 1 deletion Build/Sources/components/ActionButtonsComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export const ActionButtonsComponent = (props) => {
"propertyIsL10nModeExclude": property.isl10nModeExlude,
"propertyIsNullable": property.isNullable,
"propertyIsRequired": property.isRequired,
"propertyName": property.name,
"propertyType": property.type,
"propertyName": property.propertyName,
"typeSelect": {
"selectboxValues": property.typeSelect?.selectboxValues || "",
"renderType": property.typeSelect?.renderType || "selectSingle",
Expand Down
10 changes: 5 additions & 5 deletions Build/Sources/components/ReactFlow/CustomModelNode.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export const CustomModelNode = (props) => {
// TODO: create a default property inside an empty js file and set it her.
const addEmptyProperty = () => {
setProperties([...properties, {
name: '',
type: '',
propertyName: '',
description: '',
isRequired: false,
isNullable: false,
Expand Down Expand Up @@ -73,8 +73,8 @@ export const CustomModelNode = (props) => {
}]);
props.data.properties.push(
{
name: '',
type: '',
propertyName: '',
description: '',
isRequired: false,
isNullable: false,
Expand Down Expand Up @@ -460,7 +460,7 @@ export const CustomModelNode = (props) => {
props.data.properties.map((property, index) => {
return (
<TYPO3StyledAccordion
title={`${property.name} ${property.type ? `(${property.type})` : ''}`}
title={`${property.propertyName} ${property.type ? `(${property.type})` : ''}`}
id={`nodeProperty-${props.id}-${index}`}
parentId="accordionCustomModelNodeProperties"
>
Expand All @@ -469,9 +469,9 @@ export const CustomModelNode = (props) => {
label="Property name"
placeholder="Property name"
identifier="propertyName"
initialValue={property.name}
initialValue={property.propertyName}
onChange={(value) => {
updateProperty(index, "name", value.toLowerCase());
updateProperty(index, "propertyName", value.toLowerCase());
}}
/>
<SelectComponent
Expand Down
2 changes: 1 addition & 1 deletion Resources/Public/JavaScript/main.js

Large diffs are not rendered by default.

0 comments on commit a8e0abd

Please sign in to comment.