@webtypen/webframez-core 0.3.40 → 0.3.41
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.
|
@@ -57,6 +57,11 @@ export declare class Datatable {
|
|
|
57
57
|
entries: any;
|
|
58
58
|
sums: any;
|
|
59
59
|
}>;
|
|
60
|
+
stats(req: Request): Promise<Array<{
|
|
61
|
+
label: string;
|
|
62
|
+
type: string;
|
|
63
|
+
value: any;
|
|
64
|
+
}>>;
|
|
60
65
|
getTotalData(req: Request): Promise<any>;
|
|
61
66
|
getFilter(req: Request): Promise<any>;
|
|
62
67
|
getColumns(req: Request): Promise<any>;
|
|
@@ -312,6 +312,11 @@ class Datatable {
|
|
|
312
312
|
return data;
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
|
+
stats(req) {
|
|
316
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
317
|
+
return [];
|
|
318
|
+
});
|
|
319
|
+
}
|
|
315
320
|
getTotalData(req) {
|
|
316
321
|
return __awaiter(this, void 0, void 0, function* () {
|
|
317
322
|
const aggregation = [];
|
|
@@ -43,6 +43,12 @@ class DatatableController extends Controller_1.Controller {
|
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
const table = new tableClass();
|
|
46
|
+
if (req.body.type === "stats" || req.body.mode === "stats") {
|
|
47
|
+
return res.send({
|
|
48
|
+
status: "success",
|
|
49
|
+
data: yield table.stats(req),
|
|
50
|
+
});
|
|
51
|
+
}
|
|
46
52
|
if (req.body.apiFunction && typeof req.body.apiFunction === "string" && req.body.apiFunction.trim() !== "") {
|
|
47
53
|
const func = (_a = table.selectableFunctions) === null || _a === void 0 ? void 0 : _a[req.body.apiFunction];
|
|
48
54
|
if (!func || !func.handle) {
|
package/package.json
CHANGED