Skip to content

Commit ef9d8cb

Browse files
author
Gérard Collin
committed
feat: new project model
1 parent b321a0f commit ef9d8cb

2 files changed

Lines changed: 15 additions & 11 deletions

File tree

apps/xt-host/projects/host/public/assets/projects/Simple.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,28 @@
66
"creation": {
77
"type": "Application",
88
"name": "Simple",
9-
"entities": {
10-
"a": {
9+
"entities": [
10+
{
1111
"from": "",
1212
"name": "SimpleNote",
13-
"fields": {
14-
"a": {
13+
"fields": [
14+
{
1515
"name": "Text",
1616
"type": "string"
1717
},
18-
"b": {
18+
{
1919
"name": "Amount",
2020
"type": "number"
2121
},
22-
"c": {
22+
{
2323
"name": "Check",
2424
"type": "boolean"
2525
}
26-
}
27-
},
28-
"sharing": {
29-
"with": "Dont-code users"
26+
]
3027
}
28+
],
29+
"sharing": {
30+
"with": "Dont-code users"
3131
}
3232
}
3333
}

apps/xt-host/projects/host/src/app/application-model-manager/application-model-manager.service.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ export class ApplicationModelManagerService {
103103
protected toNewProjectModel(value: OldDcApplicationModel): DcApplicationModel {
104104
const ret ={ name:value.name,
105105
description: value.description,
106-
content: { creation: { entities:new Array<DcEntityModel>()}}
106+
content: { creation: {
107+
type:value.content.creation.type,
108+
entities:new Array<DcEntityModel>(),
109+
sharing: value.content.creation.sharing
110+
}}
107111
} as DcApplicationModel;
108112

109113
for (const entity of Object.values(value.content.creation.entities??{})) {

0 commit comments

Comments
 (0)