not-node 6.3.39 → 6.3.40
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/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
const { MODULE_NAME } = require("../const");
|
|
2
2
|
//DB related validation tools
|
|
3
3
|
const Form = require("not-node").Form;
|
|
4
|
+
//
|
|
5
|
+
const actionName = 'create';
|
|
6
|
+
const FORM_NAME = Form.createName(MODULE_NAME, MODEL_NAME, actionName);
|
|
4
7
|
//form
|
|
5
|
-
const FIELDS = [
|
|
6
|
-
["
|
|
8
|
+
const FIELDS = [
|
|
9
|
+
["identity", "not-node//identity"],
|
|
10
|
+
["data", `${MODULE_NAME}//_<%- modelName %>_data`],
|
|
7
11
|
];
|
|
8
12
|
|
|
9
|
-
const FORM_NAME = `${MODULE_NAME}:<%- ModelName %>CreateForm`;
|
|
10
|
-
|
|
11
13
|
/**
|
|
12
14
|
*
|
|
13
15
|
**/
|
|
@@ -44,3 +46,4 @@ class <%- ModelName %>CreateForm extends Form {
|
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
module.exports = <%- ModelName %>CreateForm;
|
|
49
|
+
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
const { MODULE_NAME } = require("../const");
|
|
2
2
|
const Form = require("not-node").Form;
|
|
3
3
|
|
|
4
|
+
const actionName = 'update';
|
|
5
|
+
const FORM_NAME = Form.createName(MODULE_NAME, MODEL_NAME, actionName);
|
|
6
|
+
|
|
4
7
|
const FIELDS = [
|
|
5
8
|
["targetId", { required: true }, "not-node//objectId"],
|
|
6
9
|
["identity", "not-node//identity"],
|
|
7
|
-
["data", `${MODULE_NAME}//_<%-
|
|
10
|
+
["data", `${MODULE_NAME}//_<%- modelName %>_data`], //sub forms validators should start with underscore
|
|
8
11
|
];
|
|
9
|
-
const FORM_NAME = `${MODULE_NAME}:<%- ModelName %>UpdateForm`;
|
|
10
12
|
|
|
11
13
|
class <%- ModelName %>UpdateForm extends Form {
|
|
12
14
|
constructor({ app }) {
|