Unify records model and add notification center

This commit is contained in:
Amer Agovic
2026-05-05 12:24:13 -05:00
parent 166ddcc803
commit 2157e1aea6
18 changed files with 962 additions and 544 deletions
+10 -8
View File
@@ -150,7 +150,7 @@ export function DirView({
onRowPress = null,
onRefresh = null,
showHeader = true,
showSummary = true,
showSummary = false,
density = 'comfortable',
striped = false
}) {
@@ -199,12 +199,14 @@ export function DirView({
setLoading(true);
setError('');
try {
const offset = (currentPage - 1) * pageSize;
const sortBy = orderBy ? [{ field: orderBy, direction: order }] : [];
const filterBy = effectiveSearchTerm ? { search: effectiveSearchTerm } : {};
const query = {
page: currentPage,
pageSize,
search: effectiveSearchTerm,
orderBy,
order
offset,
page_size: pageSize,
sort_by: sortBy,
filter_by: filterBy
};
const [recordResult, summaryResult] = await Promise.all([
@@ -213,8 +215,8 @@ export function DirView({
]);
if (!cancelled) {
setRecords(recordResult.records || []);
setTotalRecords(recordResult.totalRecords || 0);
setRecords(recordResult.rows || []);
setTotalRecords(recordResult.total || 0);
setSummary(summaryResult || null);
}
} catch (loadError) {