@gipisistemas/ng-core 1.1.10 → 1.1.11
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/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
@@ -26236,6 +26236,9 @@
|
|
26236
26236
|
}
|
26237
26237
|
if (ObjectUtil.isNull(pageEvent) && !ObjectUtil.isNull(this.tablePageEventDTO)) {
|
26238
26238
|
pageEvent = this.tablePageEventDTO;
|
26239
|
+
if (ObjectUtil.hasPropertyInObj(pageEvent, 'pageIndex')) {
|
26240
|
+
pageEvent.pageIndex = 0;
|
26241
|
+
}
|
26239
26242
|
}
|
26240
26243
|
if (pageEvent) {
|
26241
26244
|
this.tablePageEventDTO = pageEvent;
|
@@ -27384,13 +27387,13 @@
|
|
27384
27387
|
GIPIAbstractCrudComponent.prototype.ngOnDestroy = function () {
|
27385
27388
|
_super.prototype.ngOnDestroy.call(this);
|
27386
27389
|
};
|
27387
|
-
GIPIAbstractCrudComponent.prototype.onInitForm = function () {
|
27390
|
+
GIPIAbstractCrudComponent.prototype.onInitForm = function (version) {
|
27388
27391
|
var _this = this;
|
27389
27392
|
try {
|
27390
27393
|
this.loading = true;
|
27391
27394
|
var id = this.activatedRoute.snapshot.params.id;
|
27392
27395
|
if (this.UUIDIsValid(id)) {
|
27393
|
-
this.abstractCrudService.getOne(id).toPromise().then(function (entity) {
|
27396
|
+
this.abstractCrudService.getOne(id, version).toPromise().then(function (entity) {
|
27394
27397
|
_this.entity = entity;
|
27395
27398
|
_this.onAfterGetOne();
|
27396
27399
|
_this.loading = false;
|
@@ -27411,7 +27414,7 @@
|
|
27411
27414
|
};
|
27412
27415
|
GIPIAbstractCrudComponent.prototype.onAfterGetOne = function () { };
|
27413
27416
|
GIPIAbstractCrudComponent.prototype.preSave = function (entity) { };
|
27414
|
-
GIPIAbstractCrudComponent.prototype.save = function (entity, toGoBack) {
|
27417
|
+
GIPIAbstractCrudComponent.prototype.save = function (entity, toGoBack, version) {
|
27415
27418
|
var _this = this;
|
27416
27419
|
if (toGoBack === void 0) { toGoBack = true; }
|
27417
27420
|
try {
|
@@ -27421,7 +27424,7 @@
|
|
27421
27424
|
}
|
27422
27425
|
if (this.isValid(entity)) {
|
27423
27426
|
this.preSave(entity);
|
27424
|
-
this.abstractCrudService.save(entity).toPromise().then(function (resp) {
|
27427
|
+
this.abstractCrudService.save(entity, version).toPromise().then(function (resp) {
|
27425
27428
|
_this.addSuccessMessage(exports.INJECTOR.get(APP_MESSAGES).SUCCESS);
|
27426
27429
|
if (toGoBack) {
|
27427
27430
|
_this.navigateByUrl(_this.getPath(), [_this.getPath()], true);
|
@@ -27590,6 +27593,9 @@
|
|
27590
27593
|
}
|
27591
27594
|
if (ObjectUtil.isNull(pageEvent) && !ObjectUtil.isNull(this.tablePageEventDTO)) {
|
27592
27595
|
pageEvent = this.tablePageEventDTO;
|
27596
|
+
if (ObjectUtil.hasPropertyInObj(pageEvent, 'pageIndex')) {
|
27597
|
+
pageEvent.pageIndex = 0;
|
27598
|
+
}
|
27593
27599
|
}
|
27594
27600
|
if (pageEvent) {
|
27595
27601
|
this.tablePageEventDTO = pageEvent;
|
@@ -27659,7 +27665,7 @@
|
|
27659
27665
|
this.navigateByUrl(this.getPath(), [this.getPath(), 'edit', id], true);
|
27660
27666
|
}
|
27661
27667
|
};
|
27662
|
-
GIPIAbstractFindComponent.prototype.deleteRegister = function (id, permission, fetchAgain) {
|
27668
|
+
GIPIAbstractFindComponent.prototype.deleteRegister = function (id, permission, fetchAgain, version) {
|
27663
27669
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27664
27670
|
try {
|
27665
27671
|
id = this.handleEntityId(id);
|
@@ -27667,7 +27673,7 @@
|
|
27667
27673
|
return;
|
27668
27674
|
}
|
27669
27675
|
if (StringUtil.isEmpty(permission) && ObjectUtil.isNull(this.basePermissionList)) {
|
27670
|
-
this._deleteRegister(id, fetchAgain);
|
27676
|
+
this._deleteRegister(id, fetchAgain, version);
|
27671
27677
|
}
|
27672
27678
|
else {
|
27673
27679
|
if (StringUtil.isEmpty(permission) && !ObjectUtil.isNull(this.basePermissionList)) {
|
@@ -27677,7 +27683,7 @@
|
|
27677
27683
|
this.addWarningMessage(exports.INJECTOR.get(APP_MESSAGES).NOT_PERMISSION);
|
27678
27684
|
return;
|
27679
27685
|
}
|
27680
|
-
this._deleteRegister(id, fetchAgain);
|
27686
|
+
this._deleteRegister(id, fetchAgain, version);
|
27681
27687
|
}
|
27682
27688
|
}
|
27683
27689
|
catch (e) {
|
@@ -27689,7 +27695,7 @@
|
|
27689
27695
|
}
|
27690
27696
|
};
|
27691
27697
|
/** @Internal */
|
27692
|
-
GIPIAbstractFindComponent.prototype._deleteRegister = function (id, fetchAgain) {
|
27698
|
+
GIPIAbstractFindComponent.prototype._deleteRegister = function (id, fetchAgain, version) {
|
27693
27699
|
var _this = this;
|
27694
27700
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27695
27701
|
try {
|
@@ -27701,7 +27707,7 @@
|
|
27701
27707
|
_this.loading = true;
|
27702
27708
|
_this.page = _this.newPage();
|
27703
27709
|
_this.preDelete(id);
|
27704
|
-
_this.abstractCrudService.delete(id).toPromise().then(function () {
|
27710
|
+
_this.abstractCrudService.delete(id, version).toPromise().then(function () {
|
27705
27711
|
if (fetchAgain) {
|
27706
27712
|
_this.findAll();
|
27707
27713
|
}
|
@@ -27718,7 +27724,7 @@
|
|
27718
27724
|
throw new Error(e);
|
27719
27725
|
}
|
27720
27726
|
};
|
27721
|
-
GIPIAbstractFindComponent.prototype.deleteAllRegister = function (idList, permission, fetchAgain) {
|
27727
|
+
GIPIAbstractFindComponent.prototype.deleteAllRegister = function (idList, permission, fetchAgain, version) {
|
27722
27728
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27723
27729
|
try {
|
27724
27730
|
idList = this.handleEntityIdList(idList);
|
@@ -27726,7 +27732,7 @@
|
|
27726
27732
|
return;
|
27727
27733
|
}
|
27728
27734
|
if (StringUtil.isEmpty(permission) && ObjectUtil.isNull(this.basePermissionList)) {
|
27729
|
-
this._deleteAllRegister(idList, fetchAgain);
|
27735
|
+
this._deleteAllRegister(idList, fetchAgain, version);
|
27730
27736
|
}
|
27731
27737
|
else {
|
27732
27738
|
if (StringUtil.isEmpty(permission) && !ObjectUtil.isNull(this.basePermissionList)) {
|
@@ -27736,7 +27742,7 @@
|
|
27736
27742
|
this.addWarningMessage(exports.INJECTOR.get(APP_MESSAGES).NOT_PERMISSION);
|
27737
27743
|
return;
|
27738
27744
|
}
|
27739
|
-
this._deleteAllRegister(idList, fetchAgain);
|
27745
|
+
this._deleteAllRegister(idList, fetchAgain, version);
|
27740
27746
|
}
|
27741
27747
|
}
|
27742
27748
|
catch (e) {
|
@@ -27748,7 +27754,7 @@
|
|
27748
27754
|
}
|
27749
27755
|
};
|
27750
27756
|
/** @Internal */
|
27751
|
-
GIPIAbstractFindComponent.prototype._deleteAllRegister = function (idList, fetchAgain) {
|
27757
|
+
GIPIAbstractFindComponent.prototype._deleteAllRegister = function (idList, fetchAgain, version) {
|
27752
27758
|
var _this = this;
|
27753
27759
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27754
27760
|
try {
|
@@ -27760,7 +27766,7 @@
|
|
27760
27766
|
_this.loading = true;
|
27761
27767
|
_this.page = _this.newPage();
|
27762
27768
|
_this.preDelete();
|
27763
|
-
_this.abstractCrudService.deleteAll(idList).toPromise().then(function () {
|
27769
|
+
_this.abstractCrudService.deleteAll(idList, version).toPromise().then(function () {
|
27764
27770
|
if (fetchAgain) {
|
27765
27771
|
_this.findAll();
|
27766
27772
|
}
|
@@ -27806,7 +27812,7 @@
|
|
27806
27812
|
this.viewRegister(id, permission);
|
27807
27813
|
}
|
27808
27814
|
};
|
27809
|
-
GIPIAbstractFindComponent.prototype.enableOrDisableRegister = function (action, id, permission, fetchAgain) {
|
27815
|
+
GIPIAbstractFindComponent.prototype.enableOrDisableRegister = function (action, id, permission, fetchAgain, version) {
|
27810
27816
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27811
27817
|
try {
|
27812
27818
|
id = this.handleEntityId(id);
|
@@ -27814,7 +27820,7 @@
|
|
27814
27820
|
return;
|
27815
27821
|
}
|
27816
27822
|
if (StringUtil.isEmpty(permission) && ObjectUtil.isNull(this.basePermissionList)) {
|
27817
|
-
this._enableOrDisableRegister(action, id, fetchAgain);
|
27823
|
+
this._enableOrDisableRegister(action, id, fetchAgain, version);
|
27818
27824
|
}
|
27819
27825
|
else {
|
27820
27826
|
if (StringUtil.isEmpty(permission) && !ObjectUtil.isNull(this.basePermissionList)) {
|
@@ -27824,7 +27830,7 @@
|
|
27824
27830
|
this.addWarningMessage(exports.INJECTOR.get(APP_MESSAGES).NOT_PERMISSION);
|
27825
27831
|
return;
|
27826
27832
|
}
|
27827
|
-
this._enableOrDisableRegister(action, id, fetchAgain);
|
27833
|
+
this._enableOrDisableRegister(action, id, fetchAgain, version);
|
27828
27834
|
}
|
27829
27835
|
}
|
27830
27836
|
catch (e) {
|
@@ -27836,7 +27842,7 @@
|
|
27836
27842
|
}
|
27837
27843
|
};
|
27838
27844
|
/** @Internal */
|
27839
|
-
GIPIAbstractFindComponent.prototype._enableOrDisableRegister = function (action, id, fetchAgain) {
|
27845
|
+
GIPIAbstractFindComponent.prototype._enableOrDisableRegister = function (action, id, fetchAgain, version) {
|
27840
27846
|
var _this = this;
|
27841
27847
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27842
27848
|
try {
|
@@ -27847,7 +27853,7 @@
|
|
27847
27853
|
_this.setFilterSessionStorage();
|
27848
27854
|
_this.loading = true;
|
27849
27855
|
_this.page = _this.newPage();
|
27850
|
-
_this.abstractCrudService.enableOrDisable(id, action).toPromise().then(function () {
|
27856
|
+
_this.abstractCrudService.enableOrDisable(id, action, version).toPromise().then(function () {
|
27851
27857
|
if (fetchAgain) {
|
27852
27858
|
_this.findAll();
|
27853
27859
|
}
|
@@ -27864,7 +27870,7 @@
|
|
27864
27870
|
throw new Error(e);
|
27865
27871
|
}
|
27866
27872
|
};
|
27867
|
-
GIPIAbstractFindComponent.prototype.enableAndDisableAllRegister = function (action, idList, permission, fetchAgain) {
|
27873
|
+
GIPIAbstractFindComponent.prototype.enableAndDisableAllRegister = function (action, idList, permission, fetchAgain, version) {
|
27868
27874
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27869
27875
|
try {
|
27870
27876
|
idList = this.handleEntityIdList(idList);
|
@@ -27872,7 +27878,7 @@
|
|
27872
27878
|
return;
|
27873
27879
|
}
|
27874
27880
|
if (StringUtil.isEmpty(permission) && ObjectUtil.isNull(this.basePermissionList)) {
|
27875
|
-
this._enableAndDisableAllRegister(action, idList, fetchAgain);
|
27881
|
+
this._enableAndDisableAllRegister(action, idList, fetchAgain, version);
|
27876
27882
|
}
|
27877
27883
|
else {
|
27878
27884
|
if (StringUtil.isEmpty(permission) && !ObjectUtil.isNull(this.basePermissionList)) {
|
@@ -27882,7 +27888,7 @@
|
|
27882
27888
|
this.addWarningMessage(exports.INJECTOR.get(APP_MESSAGES).NOT_PERMISSION);
|
27883
27889
|
return;
|
27884
27890
|
}
|
27885
|
-
this._enableAndDisableAllRegister(action, idList, fetchAgain);
|
27891
|
+
this._enableAndDisableAllRegister(action, idList, fetchAgain, version);
|
27886
27892
|
}
|
27887
27893
|
}
|
27888
27894
|
catch (e) {
|
@@ -27894,7 +27900,7 @@
|
|
27894
27900
|
}
|
27895
27901
|
};
|
27896
27902
|
/** @Internal */
|
27897
|
-
GIPIAbstractFindComponent.prototype._enableAndDisableAllRegister = function (action, idList, fetchAgain) {
|
27903
|
+
GIPIAbstractFindComponent.prototype._enableAndDisableAllRegister = function (action, idList, fetchAgain, version) {
|
27898
27904
|
var _this = this;
|
27899
27905
|
if (fetchAgain === void 0) { fetchAgain = true; }
|
27900
27906
|
try {
|
@@ -27905,7 +27911,7 @@
|
|
27905
27911
|
_this.setFilterSessionStorage();
|
27906
27912
|
_this.loading = true;
|
27907
27913
|
_this.page = _this.newPage();
|
27908
|
-
_this.abstractCrudService.enableOrDisableAll(idList, action).toPromise().then(function () {
|
27914
|
+
_this.abstractCrudService.enableOrDisableAll(idList, action, version).toPromise().then(function () {
|
27909
27915
|
if (fetchAgain) {
|
27910
27916
|
_this.findAll();
|
27911
27917
|
}
|