openchs-models 1.25.3 → 1.25.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Makefile +4 -1
- package/dist/application/MenuItem.js +16 -0
- package/package.json +1 -1
package/Makefile
CHANGED
|
@@ -34,7 +34,10 @@ copy-dist-to-avni-client:
|
|
|
34
34
|
deploy-to-avni-client:
|
|
35
35
|
$(if $(local),$(call _deploy,$(local)/packages/openchs-android/node_modules/openchs-models))
|
|
36
36
|
|
|
37
|
-
deploy-
|
|
37
|
+
deploy-to-avni-web:
|
|
38
|
+
$(if $(local),$(call _deploy,$(local)/node_modules/openchs-models))
|
|
39
|
+
|
|
40
|
+
deploy-as-source-to-avni-client:
|
|
38
41
|
$(if $(local),$(call _deploy_as_source,$(local)/packages/openchs-android/node_modules/openchs-models))
|
|
39
42
|
|
|
40
43
|
define _deploy_as_source
|
|
@@ -32,10 +32,26 @@ class MenuItem {
|
|
|
32
32
|
return _General.default.assignFields(resource, new MenuItem(), ['uuid', 'displayKey', 'type', 'icon', "voided", "group", "linkFunction"]);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
static fromDb(obj) {
|
|
36
|
+
return MenuItem.fromResource(obj);
|
|
37
|
+
}
|
|
38
|
+
|
|
35
39
|
toString() {
|
|
36
40
|
return `uuid:${this.uuid}; displayKey:${this.displayKey}; type:${this.type}; group:${this.group}; voided:${this.voided}`;
|
|
37
41
|
}
|
|
38
42
|
|
|
43
|
+
isLinkType() {
|
|
44
|
+
return this.type === MenuItem.HyperlinkTypeName;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
static getAllGroups() {
|
|
48
|
+
return [this.FunctionalityGroupName, this.SyncGroupName, this.UserGroupName, this.SupportGroupName];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static getAllTypes() {
|
|
52
|
+
return [this.HyperlinkTypeName];
|
|
53
|
+
}
|
|
54
|
+
|
|
39
55
|
}
|
|
40
56
|
|
|
41
57
|
_defineProperty(MenuItem, "FunctionalityGroupName", "Functionality");
|