not-node 5.1.24 → 5.1.25

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,6 +1,6 @@
1
1
  {
2
2
  "name": "not-node",
3
- "version": "5.1.24",
3
+ "version": "5.1.25",
4
4
  "description": "node complimentary part for client side notFramework.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -6,6 +6,9 @@
6
6
  "list_navigation_next_button_label": "Next",
7
7
  "button_cancel_label": "Cancel",
8
8
  "button_apply_label": "Apply",
9
+ "action_details_label": "Details",
10
+ "action_update_label": "Update",
11
+ "action_delete_label": "Delete",
9
12
  "field_select_label": "Select",
10
13
  "field_value_is_empty_placeholder": "Empty",
11
14
  "loading_label": "Loading...",
@@ -11,6 +11,9 @@
11
11
  "loading_label": "Загрузка...",
12
12
  "button_cancel_label": "Отмена",
13
13
  "button_apply_label": "Применить",
14
+ "action_details_label": "Подробнее",
15
+ "action_update_label": "Изменить",
16
+ "action_delete_label": "Удалить",
14
17
  "form_validation_error": "Форма заполнена с ошибками",
15
18
  "field_active_label": "Активна",
16
19
  "field_codeName_label": "Псевдоним",
@@ -383,7 +383,12 @@ function close() {
383
383
  return this.save();
384
384
  }
385
385
 
386
+ function saveNewVersion() {
387
+ return routine.update(this, { _id: this._id }, this.toObject());
388
+ }
389
+
386
390
  module.exports.thisMethods = {
387
391
  getID,
388
392
  close,
393
+ saveNewVersion,
389
394
  };
@@ -64,7 +64,7 @@ class ModelRoutine {
64
64
  filter.__latest = true;
65
65
  filter.__closed = false;
66
66
  const item = await model
67
- .findOneAndUpdate(filter, data, { returnOriginal: false })
67
+ .updateOne(filter, data, { returnOriginal: false })
68
68
  .exec();
69
69
  return model.saveVersion(item._id);
70
70
  }