zek 19.0.5 → 19.0.7
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
CHANGED
|
@@ -175,15 +175,11 @@ class ArrayHelper {
|
|
|
175
175
|
const keys = Object.keys(value);
|
|
176
176
|
const slice = keys.length / 2;
|
|
177
177
|
const result = [];
|
|
178
|
-
// for (let i = 0; i < slice; i++) {
|
|
179
|
-
// result.push({ key: +keys[i], value: keys[i + slice] } as T);
|
|
180
|
-
// }
|
|
181
178
|
for (let i = slice; i < keys.length; i++) {
|
|
182
179
|
const name = keys[i];
|
|
183
180
|
result.push({ key: +value[name], value: name });
|
|
184
181
|
}
|
|
185
182
|
return result;
|
|
186
|
-
//return Array.from(keys.slice(keys.length / 2), x => { key:x, value:'aaa' } as Object);
|
|
187
183
|
}
|
|
188
184
|
static enumToKeyPairArray(value) {
|
|
189
185
|
return this.enumToKeyPairBaseArray(value);
|
|
@@ -1820,6 +1816,9 @@ class CrudService extends BaseService {
|
|
|
1820
1816
|
restore(id) {
|
|
1821
1817
|
return this.api.patch(`api/${this.controller}/${id}/restore`).pipe(catchError(this.handleError(this.restore.name, null)));
|
|
1822
1818
|
}
|
|
1819
|
+
submit(id, model) {
|
|
1820
|
+
return this.api.patch(`api/${this.controller}/${id}/submit`, model).pipe(catchError(this.handleError(this.submit.name, null)));
|
|
1821
|
+
}
|
|
1823
1822
|
approve(id, model) {
|
|
1824
1823
|
return this.api.patch(`api/${this.controller}/${id}/approve`, model).pipe(catchError(this.handleError(this.approve.name, null)));
|
|
1825
1824
|
}
|
|
@@ -1836,6 +1835,9 @@ class CrudService extends BaseService {
|
|
|
1836
1835
|
return this.api.post(`api/${this.controller}/batch`, model).pipe(catchError(this.handleError(this.batch.name, null)));
|
|
1837
1836
|
}
|
|
1838
1837
|
export(model, fileTypeId) {
|
|
1838
|
+
if (Convert.isNumber(model)) {
|
|
1839
|
+
return this.api.getBlob(`api/${this.controller}/${model}/export/${fileTypeId}`).pipe(catchError(this.handleError('export', null)));
|
|
1840
|
+
}
|
|
1839
1841
|
return this.api.getBlob(`api/${this.controller}/export/${fileTypeId}`, model).pipe(catchError(this.handleError('export', null)));
|
|
1840
1842
|
}
|
|
1841
1843
|
}
|
|
@@ -2741,7 +2743,7 @@ class EditBaseComponent extends EditFormComponent {
|
|
|
2741
2743
|
}
|
|
2742
2744
|
}
|
|
2743
2745
|
export(fileTypeId) {
|
|
2744
|
-
this.service.export(
|
|
2746
|
+
this.service.export(this.id, fileTypeId).subscribe(data => {
|
|
2745
2747
|
this.downloadFile(data, 'export.xlsx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
|
|
2746
2748
|
});
|
|
2747
2749
|
}
|