isobit-ui 0.0.356 → 0.0.359
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/index.js +18 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* isobit-ui v0.0.
|
|
2
|
+
* isobit-ui v0.0.359
|
|
3
3
|
* (c) Erik Alarcon Pinedo
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -3283,7 +3283,7 @@ var __vue_component__$7 = /*#__PURE__*/__vue_normalize____default['default']({
|
|
|
3283
3283
|
//
|
|
3284
3284
|
//
|
|
3285
3285
|
var script$6 = {
|
|
3286
|
-
props: ['header', '
|
|
3286
|
+
props: ['header', 'store', 'action'],
|
|
3287
3287
|
watch: {
|
|
3288
3288
|
header: function header(v) {
|
|
3289
3289
|
this.setTitle(v);
|
|
@@ -5775,7 +5775,7 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
5775
5775
|
|
|
5776
5776
|
var f = function f(e) {
|
|
5777
5777
|
if (callback) callback();
|
|
5778
|
-
me.
|
|
5778
|
+
me.open(e);
|
|
5779
5779
|
};
|
|
5780
5780
|
|
|
5781
5781
|
for (var i = 0; i < a.length; i++) {
|
|
@@ -6191,6 +6191,7 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
6191
6191
|
save: function save() {
|
|
6192
6192
|
try {
|
|
6193
6193
|
var _exit2 = false;
|
|
6194
|
+
var store;
|
|
6194
6195
|
|
|
6195
6196
|
var _this4 = this;
|
|
6196
6197
|
|
|
@@ -6224,8 +6225,8 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
6224
6225
|
if (!(_typeof(o) === 'object' && !Array.isArray(o) && o !== null)) return;
|
|
6225
6226
|
return _invoke(function () {
|
|
6226
6227
|
if (!action || !_this4.app.networkStatus.connected) {
|
|
6227
|
-
|
|
6228
|
-
return _await(me.getStoredList(
|
|
6228
|
+
store = me.$children[0].store;
|
|
6229
|
+
return _await(me.getStoredList(store), function (storedList) {
|
|
6229
6230
|
if (!storedList) storedList = [];
|
|
6230
6231
|
|
|
6231
6232
|
if (o.id) {
|
|
@@ -6239,7 +6240,7 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
6239
6240
|
}
|
|
6240
6241
|
|
|
6241
6242
|
var db = window._.db;
|
|
6242
|
-
var objectStore = db.transaction([
|
|
6243
|
+
var objectStore = db.transaction([store], "readwrite").objectStore(store);
|
|
6243
6244
|
|
|
6244
6245
|
if (!o.id) {
|
|
6245
6246
|
o.id = -new Date();
|
|
@@ -6247,7 +6248,8 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
6247
6248
|
|
|
6248
6249
|
storedList.unshift(o);
|
|
6249
6250
|
objectStore.add(o);
|
|
6250
|
-
me.$emit('
|
|
6251
|
+
me.$emit('stored', o, storedList);
|
|
6252
|
+
if (me.app && me.app.toast) me.app.toast('El rgistro fue grabado correctamente!');
|
|
6251
6253
|
me.close({
|
|
6252
6254
|
success: true,
|
|
6253
6255
|
data: o
|
|
@@ -6266,7 +6268,8 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
6266
6268
|
});
|
|
6267
6269
|
}
|
|
6268
6270
|
|
|
6269
|
-
me.$emit('
|
|
6271
|
+
me.$emit('stored', o, storedList);
|
|
6272
|
+
if (me.app && me.app.toast) me.app.toast('El rgistro fue grabado correctamente!');
|
|
6270
6273
|
me.close({
|
|
6271
6274
|
success: true,
|
|
6272
6275
|
data: o
|
|
@@ -6289,7 +6292,7 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
6289
6292
|
if (o.tmpId) {
|
|
6290
6293
|
var storage = me.$children[0].storage;
|
|
6291
6294
|
|
|
6292
|
-
var objectStore = window._.db.transaction([
|
|
6295
|
+
var objectStore = window._.db.transaction([store], "readwrite").objectStore(store);
|
|
6293
6296
|
|
|
6294
6297
|
var item = objectStore.get(o.tmpId);
|
|
6295
6298
|
o.tmpSynchronized = 1;
|
|
@@ -6310,7 +6313,12 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
6310
6313
|
};
|
|
6311
6314
|
}
|
|
6312
6315
|
|
|
6313
|
-
me.
|
|
6316
|
+
if (me.app && me.app.toast) me.app.toast('El rgistro fue grabado correectamente!', function () {
|
|
6317
|
+
me.close({
|
|
6318
|
+
success: true,
|
|
6319
|
+
data: data
|
|
6320
|
+
});
|
|
6321
|
+
});else me.MsgBox('El registro fue grabado exitosamente!', function () {
|
|
6314
6322
|
me.close({
|
|
6315
6323
|
success: true,
|
|
6316
6324
|
data: data
|