Skip to content

Commit

Permalink
create basic elements for Miroir Action Script (MAS), migrate Tools.s…
Browse files Browse the repository at this point in the history
…ubmit to MAS #28. Migrate Importer.tsx splitEntity to compositeAction
  • Loading branch information
miroir-framework committed Oct 14, 2024
1 parent 4aba763 commit 19dcce3
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions packages/miroir-standalone-app/src/miroir-fwk/4_view/Importer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ export const Importer:FC<ImporterCoreProps> = (props:ImporterCoreProps) => {
entityEntityDefinition,
entityReport,
newEntity,
entityMenu,
}

const objectAttributeNames = fileData[0];
Expand Down Expand Up @@ -327,7 +328,6 @@ export const Importer:FC<ImporterCoreProps> = (props:ImporterCoreProps) => {
transformerType: "mustacheStringTemplate",
definition: "{{newEntityName}}s",
},
// "parentName": "Fountain",
parentUuid: {
transformerType: "mustacheStringTemplate",
definition: "{{newEntity.uuid}}",
Expand All @@ -337,7 +337,7 @@ export const Importer:FC<ImporterCoreProps> = (props:ImporterCoreProps) => {
},
},
},
// // Details of an instance Report Definition
// Details of an instance Report Definition
newEntityDetailsReport: {
uuid: {
transformerType: "parameterReference",
Expand Down Expand Up @@ -439,10 +439,6 @@ export const Importer:FC<ImporterCoreProps> = (props:ImporterCoreProps) => {
},
],
},
// action: {
// transformerType: "parameterReference",
// referenceName: "createEntityAction",
// },
} as any,
// createReports
{
Expand Down Expand Up @@ -479,8 +475,6 @@ export const Importer:FC<ImporterCoreProps> = (props:ImporterCoreProps) => {
transformerType: "parameterReference",
referenceName: "newEntityDetailsReport",
},
// newEntityListReport as EntityInstance,
// newEntityDetailsReport as EntityInstance,
],
},
],
Expand All @@ -505,9 +499,10 @@ export const Importer:FC<ImporterCoreProps> = (props:ImporterCoreProps) => {
// referenceName: "commitAction",
// },
},
// instances for new Entity, put in "menuUpdateQueryResult"
{
compositeActionType: "query",
nameGivenToResult: newEntityName,
nameGivenToResult: "menuUpdateQueryResult",
queryTemplateAction: {
actionType: "queryTemplateAction",
actionName: "runQuery",
Expand All @@ -532,11 +527,17 @@ export const Importer:FC<ImporterCoreProps> = (props:ImporterCoreProps) => {
applicationSection: "model",
parentName: "Menu",
parentUuid: {
transformerType: "constantObject",
constantObjectValue: {
transformerType: "constantUuid",
constantUuidValue: entityMenu.uuid,
}
transformerType: "freeObjectTemplate",
definition: {
transformerType: {
transformerType: "constantString",
constantStringValue: "constantUuid"
},
constantUuidValue: {
transformerType: "mustacheStringTemplate",
definition: "{{entityMenu.uuid}}",
},
},
},
},
},
Expand All @@ -556,10 +557,6 @@ export const Importer:FC<ImporterCoreProps> = (props:ImporterCoreProps) => {
"label": "List of " + newEntityName,
"section": "data",
application: adminConfigurationDeploymentParis.uuid, // TODO: replace with application uuid, this is a deployment at the moment
// {
// transformerType: "parameterReference",
// referenceName: "currentApplicationUuid",
// },
"reportUuid": actionEffectiveParamsCreateEntity.newEntityListReportUuid,
"icon": "local_drink"
},
Expand Down Expand Up @@ -611,7 +608,7 @@ export const Importer:FC<ImporterCoreProps> = (props:ImporterCoreProps) => {
{
transformerType: "contextReference",
interpolation: "runtime",
referenceName: newEntityName,
referenceName: "menuUpdateQueryResult",
},
"updatedMenu"
],
Expand Down

0 comments on commit 19dcce3

Please sign in to comment.