Skip to content

Commit 6e0dd2d

Browse files
authored
#4721 - Migrate old templates to use the new UI (#13)
1 parent 70ff362 commit 6e0dd2d

88 files changed

Lines changed: 1232 additions & 2355 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

codbex-methods/codbex-methods.edm

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
<model>
22
<entities>
3-
<entity name="PaymentMethod" dataName="PAYMENTMETHOD" dataCount="SELECT COUNT(*) AS COUNT FROM &quot;${tablePrefix}PAYMENTMETHOD&quot;" dataQuery="" type="SETTING" title="PaymentMethod" caption="Manage entity PaymentMethod" description="Manage entity PaymentMethod" tooltip="PaymentMethod" icon="/services/web/resources/unicons/file.svg" menuKey="paymentmethod" menuLabel="PaymentMethod" menuIndex="100" layoutType="MANAGE" navigationPath="/Home" perspectiveName="PaymentMethod" perspectiveLabel="PaymentMethod" perspectiveIcon="/services/web/resources/unicons/archive.svg" perspectiveOrder="100" perspectiveRole="" generateReport="false" generateDefaultRoles="true" roleRead="codbex-methods.PaymentMethod.PaymentMethodReadOnly" roleWrite="codbex-methods.PaymentMethod.PaymentMethodFullAccess">
3+
<entity name="PaymentMethod" dataName="PAYMENTMETHOD" dataCount="SELECT COUNT(*) AS COUNT FROM &quot;${tablePrefix}PAYMENTMETHOD&quot;" dataQuery="" type="SETTING" title="PaymentMethod" caption="Manage entity PaymentMethod" description="Manage entity PaymentMethod" tooltip="PaymentMethod" icon="/services/web/resources/unicons/file.svg" menuKey="paymentmethod" menuLabel="PaymentMethod" menuIndex="100" layoutType="" perspectiveName="Settings" perspectiveLabel="" perspectiveHeader="" perspectiveIcon="/services/web/resources/unicons/copy.svg" perspectiveOrder="100" perspectiveNavId="" perspectiveRole="" generateReport="false" generateDefaultRoles="true" feedUsername="YWRtaW4=" feedPassword="YWRtaW4=" roleRead="codbex-methods.PaymentMethod.PaymentMethodReadOnly" roleWrite="codbex-methods.PaymentMethod.PaymentMethodFullAccess">
44
<property name="Id" description="" tooltip="" dataName="PAYMENTMETHOD_ID" dataType="INTEGER" dataNullable="true" dataPrimaryKey="true" dataAutoIncrement="true" widgetType="TEXTBOX" widgetSize="" widgetLength="20" widgetIsMajor="true"></property>
55
<property name="Name" description="" tooltip="" dataName="PAYMENTMETHOD_NAME" dataType="VARCHAR" dataLength="20" dataNullable="true" widgetType="TEXTBOX" widgetSize="" widgetLength="20" widgetIsMajor="true"></property>
66
</entity>
7-
<entity name="SentMethod" dataName="SENTMETHOD" dataCount="SELECT COUNT(*) AS COUNT FROM &quot;${tablePrefix}SENTMETHOD&quot;" dataQuery="" type="SETTING" title="SentMethod" caption="Manage entity SentMethod" description="Manage entity SentMethod" tooltip="SentMethod" icon="/services/web/resources/unicons/file.svg" menuKey="sentmethod" menuLabel="SentMethod" menuIndex="100" layoutType="MANAGE" navigationPath="/Home" perspectiveName="SentMethod" perspectiveLabel="SentMethod" perspectiveIcon="/services/web/resources/unicons/archive.svg" perspectiveOrder="200" perspectiveRole="" generateReport="false" generateDefaultRoles="true" roleRead="codbex-methods.SentMethod.SentMethodReadOnly" roleWrite="codbex-methods.SentMethod.SentMethodFullAccess">
7+
<entity name="SentMethod" dataName="SENTMETHOD" dataCount="SELECT COUNT(*) AS COUNT FROM &quot;${tablePrefix}SENTMETHOD&quot;" dataQuery="" type="SETTING" title="SentMethod" caption="Manage entity SentMethod" description="Manage entity SentMethod" tooltip="SentMethod" icon="/services/web/resources/unicons/file.svg" menuKey="sentmethod" menuLabel="SentMethod" menuIndex="100" layoutType="" perspectiveName="Settings" perspectiveLabel="" perspectiveHeader="" perspectiveIcon="/services/web/resources/unicons/copy.svg" perspectiveOrder="100" perspectiveNavId="" perspectiveRole="" generateReport="false" generateDefaultRoles="true" feedUsername="YWRtaW4=" feedPassword="YWRtaW4=" roleRead="codbex-methods.SentMethod.SentMethodReadOnly" roleWrite="codbex-methods.SentMethod.SentMethodFullAccess">
88
<property name="Id" description="" tooltip="" dataName="SENTMETHOD_ID" dataType="INTEGER" dataNullable="true" dataPrimaryKey="true" dataAutoIncrement="true" widgetType="TEXTBOX" widgetSize="" widgetLength="20" widgetIsMajor="true"></property>
99
<property name="Name" description="" tooltip="" dataName="SENTMETHOD_NAME" dataType="VARCHAR" dataLength="20" dataNullable="true" widgetType="TEXTBOX" widgetSize="" widgetLength="20" widgetIsMajor="true"></property>
1010
</entity>
1111
</entities>
1212
<perspectives>
13-
<perspective><name>PaymentMethod</name><label>PaymentMethod</label><icon>/services/web/resources/unicons/archive.svg</icon><order>100</order><role></role></perspective>
14-
<perspective><name>SentMethod</name><label>SentMethod</label><icon>/services/web/resources/unicons/archive.svg</icon><order>200</order><role></role></perspective>
1513
</perspectives>
1614
<navigations>
1715
</navigations>
18-
<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" style="entity" parent="1" vertex="1"><Entity name="PaymentMethod" dataName="PAYMENTMETHOD" dataCount="SELECT COUNT(*) AS COUNT FROM &quot;${tablePrefix}PAYMENTMETHOD&quot;" title="PaymentMethod" caption="Manage entity PaymentMethod" tooltip="PaymentMethod" menuLabel="PaymentMethod" type="Entity" menuKey="paymentmethod" disableGeneration="false" perspectiveName="PaymentMethod" entityType="SETTING" description="Manage entity PaymentMethod" generateDefaultRoles="true" roleRead="codbex-methods.PaymentMethod.PaymentMethodReadOnly" roleWrite="codbex-methods.PaymentMethod.PaymentMethodFullAccess" as="value"><Array as="referenceProjections"/></Entity><mxGeometry x="20" y="20" width="200" height="80" as="geometry"><mxRectangle width="200" height="28" as="alternateBounds"/></mxGeometry></mxCell><mxCell id="3" parent="2" vertex="1" connectable="0"><Property name="Id" dataName="PAYMENTMETHOD_ID" dataType="INTEGER" dataLength="0" dataPrimaryKey="true" dataAutoIncrement="true" as="value"/><mxGeometry y="28" width="200" height="26" as="geometry"/></mxCell><mxCell id="4" parent="2" vertex="1" connectable="0"><Property name="Name" dataName="PAYMENTMETHOD_NAME" as="value"/><mxGeometry y="54" width="200" height="26" as="geometry"/></mxCell><mxCell id="5" style="entity" parent="1" vertex="1"><Entity name="SentMethod" dataName="SENTMETHOD" dataCount="SELECT COUNT(*) AS COUNT FROM &quot;${tablePrefix}SENTMETHOD&quot;" title="SentMethod" caption="Manage entity SentMethod" tooltip="SentMethod" menuLabel="SentMethod" type="Entity" menuKey="sentmethod" disableGeneration="false" perspectiveName="SentMethod" entityType="SETTING" description="Manage entity SentMethod" generateDefaultRoles="true" roleRead="codbex-methods.SentMethod.SentMethodReadOnly" roleWrite="codbex-methods.SentMethod.SentMethodFullAccess" as="value"><Array as="referenceProjections"/></Entity><mxGeometry x="270" y="20" width="200" height="80" as="geometry"><mxRectangle width="200" height="28" as="alternateBounds"/></mxGeometry></mxCell><mxCell id="6" parent="5" vertex="1" connectable="0"><Property name="Id" dataName="SENTMETHOD_ID" dataType="INTEGER" dataLength="0" dataPrimaryKey="true" dataAutoIncrement="true" dataPrecision="NaN" dataScale="NaN" as="value"/><mxGeometry y="28" width="200" height="26" as="geometry"/></mxCell><mxCell id="7" parent="5" vertex="1" connectable="0"><Property name="Name" dataName="SENTMETHOD_NAME" dataPrecision="NaN" dataScale="NaN" as="value"/><mxGeometry y="54" width="200" height="26" as="geometry"/></mxCell></root></mxGraphModel>
16+
<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" style="entity" parent="1" vertex="1"><Entity name="PaymentMethod" dataName="PAYMENTMETHOD" dataCount="SELECT COUNT(*) AS COUNT FROM &quot;${tablePrefix}PAYMENTMETHOD&quot;" title="PaymentMethod" caption="Manage entity PaymentMethod" tooltip="PaymentMethod" menuLabel="PaymentMethod" type="Entity" menuKey="paymentmethod" disableGeneration="false" perspectiveName="Settings" entityType="SETTING" description="Manage entity PaymentMethod" generateDefaultRoles="true" roleRead="codbex-methods.PaymentMethod.PaymentMethodReadOnly" roleWrite="codbex-methods.PaymentMethod.PaymentMethodFullAccess" feedUsername="YWRtaW4=" feedPassword="YWRtaW4=" as="value"><Array as="referenceProjections"/></Entity><mxGeometry x="20" y="20" width="200" height="80" as="geometry"><mxRectangle width="200" height="28" as="alternateBounds"/></mxGeometry></mxCell><mxCell id="3" parent="2" vertex="1" connectable="0"><Property name="Id" dataName="PAYMENTMETHOD_ID" dataType="INTEGER" dataLength="0" dataPrimaryKey="true" dataAutoIncrement="true" as="value"/><mxGeometry y="28" width="200" height="26" as="geometry"/></mxCell><mxCell id="4" parent="2" vertex="1" connectable="0"><Property name="Name" dataName="PAYMENTMETHOD_NAME" as="value"/><mxGeometry y="54" width="200" height="26" as="geometry"/></mxCell><mxCell id="5" style="entity" parent="1" vertex="1"><Entity name="SentMethod" dataName="SENTMETHOD" dataCount="SELECT COUNT(*) AS COUNT FROM &quot;${tablePrefix}SENTMETHOD&quot;" title="SentMethod" caption="Manage entity SentMethod" tooltip="SentMethod" menuLabel="SentMethod" type="Entity" menuKey="sentmethod" disableGeneration="false" perspectiveName="Settings" entityType="SETTING" description="Manage entity SentMethod" generateDefaultRoles="true" roleRead="codbex-methods.SentMethod.SentMethodReadOnly" roleWrite="codbex-methods.SentMethod.SentMethodFullAccess" feedUsername="YWRtaW4=" feedPassword="YWRtaW4=" as="value"><Array as="referenceProjections"/></Entity><mxGeometry x="270" y="20" width="200" height="80" as="geometry"><mxRectangle width="200" height="28" as="alternateBounds"/></mxGeometry></mxCell><mxCell id="6" parent="5" vertex="1" connectable="0"><Property name="Id" dataName="SENTMETHOD_ID" dataType="INTEGER" dataLength="0" dataPrimaryKey="true" dataAutoIncrement="true" dataPrecision="NaN" dataScale="NaN" as="value"/><mxGeometry y="28" width="200" height="26" as="geometry"/></mxCell><mxCell id="7" parent="5" vertex="1" connectable="0"><Property name="Name" dataName="SENTMETHOD_NAME" dataPrecision="NaN" dataScale="NaN" as="value"/><mxGeometry y="54" width="200" height="26" as="geometry"/></mxCell></root></mxGraphModel>
1917
</model>

codbex-methods/codbex-methods.gen

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,17 @@
2424
"filePath": "codbex-methods.model",
2525
"templateId": "template-application-angular/template/template.js",
2626
"perspectives": {
27-
"PaymentMethod": {
28-
"views": [
29-
"PaymentMethod"
30-
],
31-
"name": "PaymentMethod",
32-
"label": "PaymentMethod",
33-
"order": "100",
34-
"icon": "/services/web/resources/unicons/archive.svg",
35-
"role": ""
36-
},
37-
"SentMethod": {
27+
"Settings": {
3828
"views": [
29+
"PaymentMethod",
3930
"SentMethod"
4031
],
41-
"name": "SentMethod",
42-
"label": "SentMethod",
43-
"order": "200",
44-
"icon": "/services/web/resources/unicons/archive.svg",
32+
"name": "Settings",
33+
"label": "Settings",
34+
"header": "",
35+
"order": "100",
36+
"navId": "",
37+
"icon": "/services/web/resources/unicons/copy.svg",
4538
"role": ""
4639
}
4740
},
@@ -103,18 +96,19 @@
10396
"dataName": "PAYMENTMETHOD",
10497
"dataQuery": "",
10598
"description": "Manage entity PaymentMethod",
99+
"feedPassword": "YWRtaW4=",
100+
"feedUsername": "YWRtaW4=",
106101
"generateDefaultRoles": "true",
107102
"generateReport": "false",
108103
"icon": "/services/web/resources/unicons/file.svg",
109-
"layoutType": "MANAGE",
110104
"menuIndex": "100",
111105
"menuKey": "paymentmethod",
112106
"menuLabel": "PaymentMethod",
113107
"name": "PaymentMethod",
114-
"navigationPath": "/Home",
115-
"perspectiveIcon": "/services/web/resources/unicons/archive.svg",
116-
"perspectiveLabel": "PaymentMethod",
117-
"perspectiveName": "PaymentMethod",
108+
"perspectiveHeader": "",
109+
"perspectiveIcon": "/services/web/resources/unicons/copy.svg",
110+
"perspectiveName": "Settings",
111+
"perspectiveNavId": "",
118112
"perspectiveOrder": "100",
119113
"perspectiveRole": "",
120114
"roleRead": "codbex-methods.PaymentMethod.PaymentMethodReadOnly",
@@ -186,19 +180,20 @@
186180
"dataName": "SENTMETHOD",
187181
"dataQuery": "",
188182
"description": "Manage entity SentMethod",
183+
"feedPassword": "YWRtaW4=",
184+
"feedUsername": "YWRtaW4=",
189185
"generateDefaultRoles": "true",
190186
"generateReport": "false",
191187
"icon": "/services/web/resources/unicons/file.svg",
192-
"layoutType": "MANAGE",
193188
"menuIndex": "100",
194189
"menuKey": "sentmethod",
195190
"menuLabel": "SentMethod",
196191
"name": "SentMethod",
197-
"navigationPath": "/Home",
198-
"perspectiveIcon": "/services/web/resources/unicons/archive.svg",
199-
"perspectiveLabel": "SentMethod",
200-
"perspectiveName": "SentMethod",
201-
"perspectiveOrder": "200",
192+
"perspectiveHeader": "",
193+
"perspectiveIcon": "/services/web/resources/unicons/copy.svg",
194+
"perspectiveName": "Settings",
195+
"perspectiveNavId": "",
196+
"perspectiveOrder": "100",
202197
"perspectiveRole": "",
203198
"roleRead": "codbex-methods.SentMethod.SentMethodReadOnly",
204199
"roleWrite": "codbex-methods.SentMethod.SentMethodFullAccess",

codbex-methods/codbex-methods.model

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,21 @@
3636
"dataName": "PAYMENTMETHOD",
3737
"dataQuery": "",
3838
"description": "Manage entity PaymentMethod",
39+
"feedPassword": "YWRtaW4=",
40+
"feedUsername": "YWRtaW4=",
3941
"generateDefaultRoles": "true",
4042
"generateReport": "false",
4143
"icon": "/services/web/resources/unicons/file.svg",
42-
"layoutType": "MANAGE",
44+
"layoutType": "",
4345
"menuIndex": "100",
4446
"menuKey": "paymentmethod",
4547
"menuLabel": "PaymentMethod",
4648
"name": "PaymentMethod",
47-
"navigationPath": "/Home",
48-
"perspectiveIcon": "/services/web/resources/unicons/archive.svg",
49-
"perspectiveLabel": "PaymentMethod",
50-
"perspectiveName": "PaymentMethod",
49+
"perspectiveHeader": "",
50+
"perspectiveIcon": "/services/web/resources/unicons/copy.svg",
51+
"perspectiveLabel": "",
52+
"perspectiveName": "Settings",
53+
"perspectiveNavId": "",
5154
"perspectiveOrder": "100",
5255
"perspectiveRole": "",
5356
"roleRead": "codbex-methods.PaymentMethod.PaymentMethodReadOnly",
@@ -91,19 +94,22 @@
9194
"dataName": "SENTMETHOD",
9295
"dataQuery": "",
9396
"description": "Manage entity SentMethod",
97+
"feedPassword": "YWRtaW4=",
98+
"feedUsername": "YWRtaW4=",
9499
"generateDefaultRoles": "true",
95100
"generateReport": "false",
96101
"icon": "/services/web/resources/unicons/file.svg",
97-
"layoutType": "MANAGE",
102+
"layoutType": "",
98103
"menuIndex": "100",
99104
"menuKey": "sentmethod",
100105
"menuLabel": "SentMethod",
101106
"name": "SentMethod",
102-
"navigationPath": "/Home",
103-
"perspectiveIcon": "/services/web/resources/unicons/archive.svg",
104-
"perspectiveLabel": "SentMethod",
105-
"perspectiveName": "SentMethod",
106-
"perspectiveOrder": "200",
107+
"perspectiveHeader": "",
108+
"perspectiveIcon": "/services/web/resources/unicons/copy.svg",
109+
"perspectiveLabel": "",
110+
"perspectiveName": "Settings",
111+
"perspectiveNavId": "",
112+
"perspectiveOrder": "100",
107113
"perspectiveRole": "",
108114
"roleRead": "codbex-methods.SentMethod.SentMethodReadOnly",
109115
"roleWrite": "codbex-methods.SentMethod.SentMethodFullAccess",
@@ -112,22 +118,7 @@
112118
"type": "SETTING"
113119
}
114120
],
115-
"perspectives": [
116-
{
117-
"name": "PaymentMethod",
118-
"label": "PaymentMethod",
119-
"icon": "/services/web/resources/unicons/archive.svg",
120-
"order": "100",
121-
"role": {}
122-
},
123-
{
124-
"name": "SentMethod",
125-
"label": "SentMethod",
126-
"icon": "/services/web/resources/unicons/archive.svg",
127-
"order": "200",
128-
"role": {}
129-
}
130-
],
121+
"perspectives": [],
131122
"navigations": []
132123
}
133124
}

codbex-methods/gen/codbex-methods/api/PaymentMethod/PaymentMethodService.ts renamed to codbex-methods/gen/codbex-methods/api/Settings/PaymentMethodService.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { Controller, Get, Post, Put, Delete, response } from "sdk/http"
22
import { Extensions } from "sdk/extensions"
3-
import { PaymentMethodRepository, PaymentMethodEntityOptions } from "../../dao/PaymentMethod/PaymentMethodRepository";
3+
import { PaymentMethodRepository, PaymentMethodEntityOptions } from "../../dao/Settings/PaymentMethodRepository";
44
import { user } from "sdk/security"
55
import { ForbiddenError } from "../utils/ForbiddenError";
66
import { ValidationError } from "../utils/ValidationError";
77
import { HttpUtils } from "../utils/HttpUtils";
88

9-
const validationModules = await Extensions.loadExtensionModules("codbex-methods-PaymentMethod-PaymentMethod", ["validate"]);
9+
const validationModules = await Extensions.loadExtensionModules("codbex-methods-Settings-PaymentMethod", ["validate"]);
1010

1111
@Controller
1212
class PaymentMethodService {
@@ -34,7 +34,7 @@ class PaymentMethodService {
3434
this.checkPermissions("write");
3535
this.validateEntity(entity);
3636
entity.Id = this.repository.create(entity);
37-
response.setHeader("Content-Location", "/services/ts/codbex-methods/gen/codbex-methods/api/PaymentMethod/PaymentMethodService.ts/" + entity.Id);
37+
response.setHeader("Content-Location", "/services/ts/codbex-methods/gen/codbex-methods/api/Settings/PaymentMethodService.ts/" + entity.Id);
3838
response.setStatus(response.CREATED);
3939
return entity;
4040
} catch (error: any) {
@@ -46,7 +46,7 @@ class PaymentMethodService {
4646
public count() {
4747
try {
4848
this.checkPermissions("read");
49-
return this.repository.count();
49+
return { count: this.repository.count() };
5050
} catch (error: any) {
5151
this.handleError(error);
5252
}
@@ -56,7 +56,7 @@ class PaymentMethodService {
5656
public countWithFilter(filter: any) {
5757
try {
5858
this.checkPermissions("read");
59-
return this.repository.count(filter);
59+
return { count: this.repository.count(filter) };
6060
} catch (error: any) {
6161
this.handleError(error);
6262
}

0 commit comments

Comments
 (0)