not-node 5.0.10 → 5.0.13
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/bin/not-builder.js +0 -0
- package/package.json +1 -1
- package/src/core/locales/en.json +10 -3
- package/src/core/locales/ru.json +11 -3
- package/src/model/default.js +5 -2
package/bin/not-builder.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/src/core/locales/en.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"booleans_false": "
|
|
3
|
-
"booleans_true": "
|
|
2
|
+
"booleans_false": "False",
|
|
3
|
+
"booleans_true": "True",
|
|
4
4
|
"form_validation_error": "Form validation error",
|
|
5
5
|
"field_active_label": "Active",
|
|
6
6
|
"field_codeName_label": "Code name",
|
|
@@ -46,5 +46,12 @@
|
|
|
46
46
|
"field_userId_placeholder": "UserId",
|
|
47
47
|
|
|
48
48
|
"field_UUID_label": "UUID",
|
|
49
|
-
"field_UUID_placeholder": "UUID"
|
|
49
|
+
"field_UUID_placeholder": "UUID",
|
|
50
|
+
|
|
51
|
+
"crud_create_action_waiting": "Creating record...",
|
|
52
|
+
"crud_read_action_waiting": "Reading record...",
|
|
53
|
+
"crud_update_action_waiting": "Updating record...",
|
|
54
|
+
"crud_delete_action_waiting": "Deleting record...",
|
|
55
|
+
"add_label": "Add",
|
|
56
|
+
"select_from_list_label": "Select from list..."
|
|
50
57
|
}
|
package/src/core/locales/ru.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"booleans_false": "
|
|
3
|
-
"booleans_true": "
|
|
2
|
+
"booleans_false": "Нет",
|
|
3
|
+
"booleans_true": "Да",
|
|
4
4
|
"form_validation_error": "Форма заполнена с ошибками",
|
|
5
5
|
"field_active_label": "Активна",
|
|
6
6
|
"field_codeName_label": "Псевдоним",
|
|
@@ -46,5 +46,13 @@
|
|
|
46
46
|
"field_userId_placeholder": "",
|
|
47
47
|
|
|
48
48
|
"field_UUID_label": "UUID",
|
|
49
|
-
"field_UUID_placeholder": "UUID"
|
|
49
|
+
"field_UUID_placeholder": "UUID",
|
|
50
|
+
|
|
51
|
+
"crud_create_action_waiting": "Создание записи...",
|
|
52
|
+
"crud_read_action_waiting": "Чтение записи...",
|
|
53
|
+
"crud_update_action_waiting": "Обновление записи...",
|
|
54
|
+
"crud_delete_action_waiting": "Удаление записи...",
|
|
55
|
+
"add_label": "Добавить",
|
|
56
|
+
"select_from_list_label": "Выберите из списка..."
|
|
57
|
+
|
|
50
58
|
}
|
package/src/model/default.js
CHANGED
|
@@ -74,13 +74,15 @@ function sanitizeInput(input) {
|
|
|
74
74
|
* @static
|
|
75
75
|
* @param {string} id primary key
|
|
76
76
|
* @param {Array} population optional if needed population of some fields
|
|
77
|
+
* @param {Object} condition optional if needed additional condition
|
|
77
78
|
* @return {Promise} Promise
|
|
78
79
|
**/
|
|
79
|
-
function getOne(id, population = []) {
|
|
80
|
+
function getOne(id, population = [], condition = {}) {
|
|
80
81
|
let query;
|
|
81
82
|
if (this.schema.statics.__versioning) {
|
|
82
83
|
query = this.findOne({
|
|
83
84
|
_id: id,
|
|
85
|
+
...condition,
|
|
84
86
|
__latest: true,
|
|
85
87
|
__closed: false
|
|
86
88
|
});
|
|
@@ -91,7 +93,8 @@ function getOne(id, population = []) {
|
|
|
91
93
|
}
|
|
92
94
|
} else {
|
|
93
95
|
query = this.findOne({
|
|
94
|
-
_id: id
|
|
96
|
+
_id: id,
|
|
97
|
+
...condition
|
|
95
98
|
});
|
|
96
99
|
}
|
|
97
100
|
populateQuery(query, population, this.schema.statics.__versioning);
|