This commit is contained in:
seb
2026-10-10 00:39:23 +02:00
parent 2c36a705c4
commit ff54fe3a18
30 changed files with 2250 additions and 2256 deletions

19
src/api/globalHistory.js Normal file
View File

@@ -0,0 +1,19 @@
import { http } from './http.js';
export const globalHistory = {
/**
* GET /api/history
* Global system/entity history with paging/sorting/filtering
*/
list({ startRow, endRow, offset, limit, sortModel, filterModel } = {}) {
const params = new URLSearchParams();
if (startRow != null) params.set('startRow', String(startRow));
if (endRow != null) params.set('endRow', String(endRow));
if (offset != null) params.set('offset', String(offset));
if (limit != null) params.set('limit', String(limit));
if (sortModel && sortModel.length) params.set('sort', JSON.stringify(sortModel));
if (filterModel && Object.keys(filterModel).length) params.set('filter', JSON.stringify(filterModel));
const qs = params.toString();
return http(`/api/history${qs ? `?${qs}` : ''}`);
},
};