zek 19.0.2 → 19.0.3
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/fesm2022/zek.mjs +16 -11
- package/fesm2022/zek.mjs.map +1 -1
- package/lib/services/crud.service.d.ts +8 -4
- package/package.json +1 -1
package/fesm2022/zek.mjs
CHANGED
|
@@ -1808,19 +1808,25 @@ class CrudService extends BaseService {
|
|
|
1808
1808
|
return this.api.delete(`api/${this.controller}/${id}/${id2}`).pipe(catchError(this.handleError(this.delete2.name, null)));
|
|
1809
1809
|
}
|
|
1810
1810
|
restore(id) {
|
|
1811
|
-
return this.api.patch(`api/${this.controller}/${id}/
|
|
1811
|
+
return this.api.patch(`api/${this.controller}/${id}/restore`).pipe(catchError(this.handleError(this.restore.name, null)));
|
|
1812
1812
|
}
|
|
1813
|
-
approve(model) {
|
|
1814
|
-
return this.api.patch(`api/${this.controller}/
|
|
1813
|
+
approve(id, model) {
|
|
1814
|
+
return this.api.patch(`api/${this.controller}/${id}/approve`, model).pipe(catchError(this.handleError(this.approve.name, null)));
|
|
1815
1815
|
}
|
|
1816
|
-
|
|
1817
|
-
return this.api.patch(`api/${this.controller}/
|
|
1816
|
+
bulkApprove(model) {
|
|
1817
|
+
return this.api.patch(`api/${this.controller}/bulk-approve`, model).pipe(catchError(this.handleError(this.bulkApprove.name, null)));
|
|
1818
|
+
}
|
|
1819
|
+
disapprove(id, model) {
|
|
1820
|
+
return this.api.patch(`api/${this.controller}/${id}/disapprove`, model).pipe(catchError(this.handleError(this.disapprove.name, null)));
|
|
1821
|
+
}
|
|
1822
|
+
bulkDisapprove(model) {
|
|
1823
|
+
return this.api.patch(`api/${this.controller}/bulk-disapprove`, model).pipe(catchError(this.handleError(this.bulkDisapprove.name, null)));
|
|
1818
1824
|
}
|
|
1819
1825
|
batch(model) {
|
|
1820
|
-
return this.api.post(`api/${this.controller}/
|
|
1826
|
+
return this.api.post(`api/${this.controller}/batch`, model).pipe(catchError(this.handleError(this.batch.name, null)));
|
|
1821
1827
|
}
|
|
1822
1828
|
export(model, fileTypeId) {
|
|
1823
|
-
return this.api.getBlob(`api/${this.controller}/
|
|
1829
|
+
return this.api.getBlob(`api/${this.controller}/export/${fileTypeId}`, model).pipe(catchError(this.handleError('export', null)));
|
|
1824
1830
|
}
|
|
1825
1831
|
}
|
|
1826
1832
|
|
|
@@ -2582,7 +2588,6 @@ class EditFormComponent extends BaseComponent {
|
|
|
2582
2588
|
}
|
|
2583
2589
|
async approve() {
|
|
2584
2590
|
if (this.id) {
|
|
2585
|
-
this.approveModel.ids = [this.id];
|
|
2586
2591
|
const approved = await this.internalApprove(this.approveModel);
|
|
2587
2592
|
if (approved) {
|
|
2588
2593
|
this.load();
|
|
@@ -2667,7 +2672,7 @@ class EditBaseComponent extends EditFormComponent {
|
|
|
2667
2672
|
}
|
|
2668
2673
|
}
|
|
2669
2674
|
async internalApprove(model) {
|
|
2670
|
-
const data = await firstValueFrom(this.service.approve(model));
|
|
2675
|
+
const data = await firstValueFrom(this.service.approve(this.id, model));
|
|
2671
2676
|
if (data && data.length > 0) {
|
|
2672
2677
|
const message = await firstValueFrom(this.translate.get('Alert.Approved'));
|
|
2673
2678
|
this.alert.success(message, null, 'fa-solid fa-floppy-disk');
|
|
@@ -2680,7 +2685,7 @@ class EditBaseComponent extends EditFormComponent {
|
|
|
2680
2685
|
}
|
|
2681
2686
|
}
|
|
2682
2687
|
async internalDisapprove(model) {
|
|
2683
|
-
const data = await firstValueFrom(this.service.disapprove(model));
|
|
2688
|
+
const data = await firstValueFrom(this.service.disapprove(this.id, model));
|
|
2684
2689
|
if (data && data.length > 0) {
|
|
2685
2690
|
const message = await firstValueFrom(this.translate.get('Alert.Disapproved'));
|
|
2686
2691
|
this.alert.success(message, null, 'fa-solid fa-floppy-disk');
|
|
@@ -2693,7 +2698,7 @@ class EditBaseComponent extends EditFormComponent {
|
|
|
2693
2698
|
}
|
|
2694
2699
|
}
|
|
2695
2700
|
async internalSubmit(model) {
|
|
2696
|
-
const data = await firstValueFrom(this.service.approve(model));
|
|
2701
|
+
const data = await firstValueFrom(this.service.approve(this.id, model));
|
|
2697
2702
|
if (data && data.length > 0) {
|
|
2698
2703
|
const message = await firstValueFrom(this.translate.get('Alert.Submitted'));
|
|
2699
2704
|
this.alert.success(message, null, 'fa-solid fa-floppy-disk');
|