not-node 6.3.40 → 6.3.41
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,13 @@
|
|
|
1
|
+
import { MODULE_NAME } from "../../const.js";
|
|
1
2
|
import Validators from "../common/validators.js";
|
|
2
3
|
import { Frame } from "not-bulma";
|
|
3
4
|
const { notCRUD } = Frame;
|
|
4
5
|
|
|
5
|
-
const MODULE_NAME = "<%- ModuleName %>";
|
|
6
6
|
const MODEL_NAME = "<%- ModelName %>";
|
|
7
7
|
|
|
8
8
|
const LABELS = {
|
|
9
|
-
plural:
|
|
10
|
-
single:
|
|
9
|
+
plural: `${MODULE_NAME}:${MODEL_NAME}_label_plural`,
|
|
10
|
+
single: `${MODULE_NAME}:${MODEL_NAME}_label_single`,
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
class nc<%- ModelName %>Common extends notCRUD {
|
|
@@ -44,7 +44,7 @@ class nc<%- ModelName %>Common extends notCRUD {
|
|
|
44
44
|
<% for (let fieldName of fields){ %>
|
|
45
45
|
{
|
|
46
46
|
path: ":<%- fieldName %>",
|
|
47
|
-
title:
|
|
47
|
+
title: `${MODULE_NAME}:<%- `${modelName}_field_${fieldName}_label` %>`,
|
|
48
48
|
searchable: true,
|
|
49
49
|
sortable: true,
|
|
50
50
|
},
|
|
@@ -56,17 +56,17 @@ class nc<%- ModelName %>Common extends notCRUD {
|
|
|
56
56
|
preprocessor: (value) => {
|
|
57
57
|
return [
|
|
58
58
|
{
|
|
59
|
-
action: this.goDetails
|
|
59
|
+
action: ()=>this.goDetails(value),
|
|
60
60
|
title: "Подробнее",
|
|
61
61
|
size: "small",
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
|
-
action: this.goUpdate
|
|
64
|
+
action: ()=>this.goUpdate(value),
|
|
65
65
|
title: "Изменить",
|
|
66
66
|
size: "small",
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
|
-
action: this.goDelete
|
|
69
|
+
action: ()=>this.goDelete(value),
|
|
70
70
|
color: "danger",
|
|
71
71
|
title: "Удалить",
|
|
72
72
|
size: "small",
|
|
@@ -94,3 +94,4 @@ class nc<%- ModelName %>Common extends notCRUD {
|
|
|
94
94
|
|
|
95
95
|
export default nc<%- ModelName %>Common;
|
|
96
96
|
|
|
97
|
+
|