@gipisistemas/ng-core 1.1.10 → 1.1.11
Sign up to get free protection for your applications and to get access to all the features.
- package/bundles/gipisistemas-ng-core.umd.js +30 -24
- package/bundles/gipisistemas-ng-core.umd.js.map +1 -1
- package/bundles/gipisistemas-ng-core.umd.min.js +1 -1
- package/bundles/gipisistemas-ng-core.umd.min.js.map +1 -1
- package/core/gipi-components/components/abstract-crud.component.d.ts +2 -2
- package/core/gipi-components/components/abstract-find.component.d.ts +4 -4
- package/esm2015/core/components/abstract-find.component.js +4 -1
- package/esm2015/core/gipi-components/components/abstract-crud.component.js +5 -5
- package/esm2015/core/gipi-components/components/abstract-find.component.js +24 -21
- package/esm5/core/components/abstract-find.component.js +4 -1
- package/esm5/core/gipi-components/components/abstract-crud.component.js +5 -5
- package/esm5/core/gipi-components/components/abstract-find.component.js +24 -21
- package/fesm2015/gipisistemas-ng-core.js +30 -24
- package/fesm2015/gipisistemas-ng-core.js.map +1 -1
- package/fesm5/gipisistemas-ng-core.js +30 -24
- package/fesm5/gipisistemas-ng-core.js.map +1 -1
- package/package.json +1 -1
@@ -26082,6 +26082,9 @@ var AbstractFindComponent = /** @class */ (function (_super) {
|
|
26082
26082
|
}
|
26083
26083
|
if (ObjectUtil.isNull(pageEvent) && !ObjectUtil.isNull(this.tablePageEventDTO)) {
|
26084
26084
|
pageEvent = this.tablePageEventDTO;
|
26085
|
+
if (ObjectUtil.hasPropertyInObj(pageEvent, 'pageIndex')) {
|
26086
|
+
pageEvent.pageIndex = 0;
|
26087
|
+
}
|
26085
26088
|
}
|
26086
26089
|
if (pageEvent) {
|
26087
26090
|
this.tablePageEventDTO = pageEvent;
|
@@ -27230,13 +27233,13 @@ var GIPIAbstractCrudComponent = /** @class */ (function (_super) {
|
|
27230
27233
|
GIPIAbstractCrudComponent.prototype.ngOnDestroy = function () {
|
27231
27234
|
_super.prototype.ngOnDestroy.call(this);
|
27232
27235
|
};
|
27233
|
-
GIPIAbstractCrudComponent.prototype.onInitForm = function () {
|
27236
|
+
GIPIAbstractCrudComponent.prototype.onInitForm = function (version) {
|
27234
27237
|
var _this = this;
|
27235
27238
|
try {
|
27236
27239
|
this.loading = true;
|
27237
27240
|
var id = this.activatedRoute.snapshot.params.id;
|
27238
27241
|
if (this.UUIDIsValid(id)) {
|
27239
|
-
this.abstractCrudService.getOne(id).toPromise().then(function (entity) {
|
27242
|
+
this.abstractCrudService.getOne(id, version).toPromise().then(function (entity) {
|
27240
27243
|
_this.entity = entity;
|
27241
27244
|
_this.onAfterGetOne();
|
27242
27245
|
_this.loading = false;
|
@@ -27257,7 +27260,7 @@ var GIPIAbstractCrudComponent = /** @class */ (function (_super) {
|
|
27257
27260
|
};
|
27258
27261
|
GIPIAbstractCrudComponent.prototype.onAfterGetOne = function () { };
|
27259
27262
|
GIPIAbstractCrudComponent.prototype.preSave = function (entity) { };
|
27260
|
-
GIPIAbstractCrudComponent.prototype.save = function (entity, toGoBack) {
|
27263
|
+
GIPIAbstractCrudComponent.prototype.save = function (entity, toGoBack, version) {
|
27261
27264
|
var _this = this;
|
27262
27265
|
if (toGoBack === void 0) { toGoBack = true; }
|
27263
27266
|
try {
|
@@ -27267,7 +27270,7 @@ var GIPIAbstractCrudComponent = /** @class */ (function (_super) {
|
|
27267
27270
|
}
|
27268
27271
|
if (this.isValid(entity)) {
|
27269
27272
|
this.preSave(entity);
|
27270
|
-
this.abstractCrudService.save(entity).toPromise().then(function (resp) {
|
27273
|
+
this.abstractCrudService.save(entity, version).toPromise().then(function (resp) {
|
27271
27274
|
_this.addSuccessMessage(INJECTOR.get(APP_MESSAGES).SUCCESS);
|
27272
27275
|
if (toGoBack) {
|
27273
27276
|
_this.navigateByUrl(_this.getPath(), [_this.getPath()], true);
|
@@ -27436,6 +27439,9 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27436
27439
|
}
|
27437
27440
|
if (ObjectUtil.isNull(pageEvent) && !ObjectUtil.isNull(this.tablePageEventDTO)) {
|
27438
27441
|
pageEvent = this.tablePageEventDTO;
|
27442
|
+
if (ObjectUtil.hasPropertyInObj(pageEvent, 'pageIndex')) {
|
27443
|
+
pageEvent.pageIndex = 0;
|
27444
|
+
}
|
27439
27445
|
}
|
27440
27446
|
if (pageEvent) {
|
27441
27447
|
this.tablePageEventDTO = pageEvent;
|
@@ -27505,7 +27511,7 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27505
27511
|
this.navigateByUrl(this.getPath(), [this.getPath(), 'edit', id], true);
|
27506
27512
|
}
|
27507
27513
|
};
|
27508
|
-
GIPIAbstractFindComponent.prototype.deleteRegister = function (id, permission, fetchAgain) {
|
27514
|
+
GIPIAbstractFindComponent.prototype.deleteRegister = function (id, permission, fetchAgain, version) {
|
27509
27515
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27510
27516
|
try {
|
27511
27517
|
id = this.handleEntityId(id);
|
@@ -27513,7 +27519,7 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27513
27519
|
return;
|
27514
27520
|
}
|
27515
27521
|
if (StringUtil.isEmpty(permission) && ObjectUtil.isNull(this.basePermissionList)) {
|
27516
|
-
this._deleteRegister(id, fetchAgain);
|
27522
|
+
this._deleteRegister(id, fetchAgain, version);
|
27517
27523
|
}
|
27518
27524
|
else {
|
27519
27525
|
if (StringUtil.isEmpty(permission) && !ObjectUtil.isNull(this.basePermissionList)) {
|
@@ -27523,7 +27529,7 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27523
27529
|
this.addWarningMessage(INJECTOR.get(APP_MESSAGES).NOT_PERMISSION);
|
27524
27530
|
return;
|
27525
27531
|
}
|
27526
|
-
this._deleteRegister(id, fetchAgain);
|
27532
|
+
this._deleteRegister(id, fetchAgain, version);
|
27527
27533
|
}
|
27528
27534
|
}
|
27529
27535
|
catch (e) {
|
@@ -27535,7 +27541,7 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27535
27541
|
}
|
27536
27542
|
};
|
27537
27543
|
/** @Internal */
|
27538
|
-
GIPIAbstractFindComponent.prototype._deleteRegister = function (id, fetchAgain) {
|
27544
|
+
GIPIAbstractFindComponent.prototype._deleteRegister = function (id, fetchAgain, version) {
|
27539
27545
|
var _this = this;
|
27540
27546
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27541
27547
|
try {
|
@@ -27547,7 +27553,7 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27547
27553
|
_this.loading = true;
|
27548
27554
|
_this.page = _this.newPage();
|
27549
27555
|
_this.preDelete(id);
|
27550
|
-
_this.abstractCrudService.delete(id).toPromise().then(function () {
|
27556
|
+
_this.abstractCrudService.delete(id, version).toPromise().then(function () {
|
27551
27557
|
if (fetchAgain) {
|
27552
27558
|
_this.findAll();
|
27553
27559
|
}
|
@@ -27564,7 +27570,7 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27564
27570
|
throw new Error(e);
|
27565
27571
|
}
|
27566
27572
|
};
|
27567
|
-
GIPIAbstractFindComponent.prototype.deleteAllRegister = function (idList, permission, fetchAgain) {
|
27573
|
+
GIPIAbstractFindComponent.prototype.deleteAllRegister = function (idList, permission, fetchAgain, version) {
|
27568
27574
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27569
27575
|
try {
|
27570
27576
|
idList = this.handleEntityIdList(idList);
|
@@ -27572,7 +27578,7 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27572
27578
|
return;
|
27573
27579
|
}
|
27574
27580
|
if (StringUtil.isEmpty(permission) && ObjectUtil.isNull(this.basePermissionList)) {
|
27575
|
-
this._deleteAllRegister(idList, fetchAgain);
|
27581
|
+
this._deleteAllRegister(idList, fetchAgain, version);
|
27576
27582
|
}
|
27577
27583
|
else {
|
27578
27584
|
if (StringUtil.isEmpty(permission) && !ObjectUtil.isNull(this.basePermissionList)) {
|
@@ -27582,7 +27588,7 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27582
27588
|
this.addWarningMessage(INJECTOR.get(APP_MESSAGES).NOT_PERMISSION);
|
27583
27589
|
return;
|
27584
27590
|
}
|
27585
|
-
this._deleteAllRegister(idList, fetchAgain);
|
27591
|
+
this._deleteAllRegister(idList, fetchAgain, version);
|
27586
27592
|
}
|
27587
27593
|
}
|
27588
27594
|
catch (e) {
|
@@ -27594,7 +27600,7 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27594
27600
|
}
|
27595
27601
|
};
|
27596
27602
|
/** @Internal */
|
27597
|
-
GIPIAbstractFindComponent.prototype._deleteAllRegister = function (idList, fetchAgain) {
|
27603
|
+
GIPIAbstractFindComponent.prototype._deleteAllRegister = function (idList, fetchAgain, version) {
|
27598
27604
|
var _this = this;
|
27599
27605
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27600
27606
|
try {
|
@@ -27606,7 +27612,7 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27606
27612
|
_this.loading = true;
|
27607
27613
|
_this.page = _this.newPage();
|
27608
27614
|
_this.preDelete();
|
27609
|
-
_this.abstractCrudService.deleteAll(idList).toPromise().then(function () {
|
27615
|
+
_this.abstractCrudService.deleteAll(idList, version).toPromise().then(function () {
|
27610
27616
|
if (fetchAgain) {
|
27611
27617
|
_this.findAll();
|
27612
27618
|
}
|
@@ -27652,7 +27658,7 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27652
27658
|
this.viewRegister(id, permission);
|
27653
27659
|
}
|
27654
27660
|
};
|
27655
|
-
GIPIAbstractFindComponent.prototype.enableOrDisableRegister = function (action, id, permission, fetchAgain) {
|
27661
|
+
GIPIAbstractFindComponent.prototype.enableOrDisableRegister = function (action, id, permission, fetchAgain, version) {
|
27656
27662
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27657
27663
|
try {
|
27658
27664
|
id = this.handleEntityId(id);
|
@@ -27660,7 +27666,7 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27660
27666
|
return;
|
27661
27667
|
}
|
27662
27668
|
if (StringUtil.isEmpty(permission) && ObjectUtil.isNull(this.basePermissionList)) {
|
27663
|
-
this._enableOrDisableRegister(action, id, fetchAgain);
|
27669
|
+
this._enableOrDisableRegister(action, id, fetchAgain, version);
|
27664
27670
|
}
|
27665
27671
|
else {
|
27666
27672
|
if (StringUtil.isEmpty(permission) && !ObjectUtil.isNull(this.basePermissionList)) {
|
@@ -27670,7 +27676,7 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27670
27676
|
this.addWarningMessage(INJECTOR.get(APP_MESSAGES).NOT_PERMISSION);
|
27671
27677
|
return;
|
27672
27678
|
}
|
27673
|
-
this._enableOrDisableRegister(action, id, fetchAgain);
|
27679
|
+
this._enableOrDisableRegister(action, id, fetchAgain, version);
|
27674
27680
|
}
|
27675
27681
|
}
|
27676
27682
|
catch (e) {
|
@@ -27682,7 +27688,7 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27682
27688
|
}
|
27683
27689
|
};
|
27684
27690
|
/** @Internal */
|
27685
|
-
GIPIAbstractFindComponent.prototype._enableOrDisableRegister = function (action, id, fetchAgain) {
|
27691
|
+
GIPIAbstractFindComponent.prototype._enableOrDisableRegister = function (action, id, fetchAgain, version) {
|
27686
27692
|
var _this = this;
|
27687
27693
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27688
27694
|
try {
|
@@ -27693,7 +27699,7 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27693
27699
|
_this.setFilterSessionStorage();
|
27694
27700
|
_this.loading = true;
|
27695
27701
|
_this.page = _this.newPage();
|
27696
|
-
_this.abstractCrudService.enableOrDisable(id, action).toPromise().then(function () {
|
27702
|
+
_this.abstractCrudService.enableOrDisable(id, action, version).toPromise().then(function () {
|
27697
27703
|
if (fetchAgain) {
|
27698
27704
|
_this.findAll();
|
27699
27705
|
}
|
@@ -27710,7 +27716,7 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27710
27716
|
throw new Error(e);
|
27711
27717
|
}
|
27712
27718
|
};
|
27713
|
-
GIPIAbstractFindComponent.prototype.enableAndDisableAllRegister = function (action, idList, permission, fetchAgain) {
|
27719
|
+
GIPIAbstractFindComponent.prototype.enableAndDisableAllRegister = function (action, idList, permission, fetchAgain, version) {
|
27714
27720
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27715
27721
|
try {
|
27716
27722
|
idList = this.handleEntityIdList(idList);
|
@@ -27718,7 +27724,7 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27718
27724
|
return;
|
27719
27725
|
}
|
27720
27726
|
if (StringUtil.isEmpty(permission) && ObjectUtil.isNull(this.basePermissionList)) {
|
27721
|
-
this._enableAndDisableAllRegister(action, idList, fetchAgain);
|
27727
|
+
this._enableAndDisableAllRegister(action, idList, fetchAgain, version);
|
27722
27728
|
}
|
27723
27729
|
else {
|
27724
27730
|
if (StringUtil.isEmpty(permission) && !ObjectUtil.isNull(this.basePermissionList)) {
|
@@ -27728,7 +27734,7 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27728
27734
|
this.addWarningMessage(INJECTOR.get(APP_MESSAGES).NOT_PERMISSION);
|
27729
27735
|
return;
|
27730
27736
|
}
|
27731
|
-
this._enableAndDisableAllRegister(action, idList, fetchAgain);
|
27737
|
+
this._enableAndDisableAllRegister(action, idList, fetchAgain, version);
|
27732
27738
|
}
|
27733
27739
|
}
|
27734
27740
|
catch (e) {
|
@@ -27740,7 +27746,7 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27740
27746
|
}
|
27741
27747
|
};
|
27742
27748
|
/** @Internal */
|
27743
|
-
GIPIAbstractFindComponent.prototype._enableAndDisableAllRegister = function (action, idList, fetchAgain) {
|
27749
|
+
GIPIAbstractFindComponent.prototype._enableAndDisableAllRegister = function (action, idList, fetchAgain, version) {
|
27744
27750
|
var _this = this;
|
27745
27751
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27746
27752
|
try {
|
@@ -27751,7 +27757,7 @@ var GIPIAbstractFindComponent = /** @class */ (function (_super) {
|
|
27751
27757
|
_this.setFilterSessionStorage();
|
27752
27758
|
_this.loading = true;
|
27753
27759
|
_this.page = _this.newPage();
|
27754
|
-
_this.abstractCrudService.enableOrDisableAll(idList, action).toPromise().then(function () {
|
27760
|
+
_this.abstractCrudService.enableOrDisableAll(idList, action, version).toPromise().then(function () {
|
27755
27761
|
if (fetchAgain) {
|
27756
27762
|
_this.findAll();
|
27757
27763
|
}
|