eservices-core 1.0.403 → 1.0.404
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/dist/classes/table/Table.d.ts +1 -1
- package/dist/index.js +7 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* eservices-core v1.0.
|
|
2
|
+
* eservices-core v1.0.404
|
|
3
3
|
* (c) 2022 ESERVICES
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -3851,9 +3851,11 @@ class Table$1 extends List {
|
|
|
3851
3851
|
edit: {},
|
|
3852
3852
|
remove: []
|
|
3853
3853
|
};
|
|
3854
|
-
this.changed = false;
|
|
3855
3854
|
this.save = () => { };
|
|
3856
3855
|
}
|
|
3856
|
+
get changed() {
|
|
3857
|
+
return Object.keys(this.changes.new).length || Object.keys(this.changes.edit).length || this.changes.remove.length;
|
|
3858
|
+
}
|
|
3857
3859
|
/**
|
|
3858
3860
|
* @description Создание новой записи.
|
|
3859
3861
|
*/
|
|
@@ -3969,7 +3971,8 @@ function useTableRequest(table, options) {
|
|
|
3969
3971
|
return dataService.getList(table.name, {
|
|
3970
3972
|
fields: options === null || options === void 0 ? void 0 : options.fields
|
|
3971
3973
|
})
|
|
3972
|
-
.then(arr => table.array = arr)
|
|
3974
|
+
.then(arr => table.array = arr)
|
|
3975
|
+
.then(() => table.emit(jenesiusVueForm.Form.EVENT_READ, table.array));
|
|
3973
3976
|
};
|
|
3974
3977
|
table.save = () => {
|
|
3975
3978
|
const ENTITY_NAME = table.name;
|
|
@@ -3986,6 +3989,7 @@ function useTableRequest(table, options) {
|
|
|
3986
3989
|
table.changes.remove.forEach((row) => __awaiter(this, void 0, void 0, function* () {
|
|
3987
3990
|
yield dataService.removeById(ENTITY_NAME, getId(row));
|
|
3988
3991
|
}));
|
|
3992
|
+
table.emit(jenesiusVueForm.Form.EVENT_SAVE);
|
|
3989
3993
|
};
|
|
3990
3994
|
}
|
|
3991
3995
|
|