Enterprise tables and financial workflows
Cursor lists, bulk scope, import/export parity, permissions, audit, and safe transactional workflows in Omni.
Reference implementation and scope
Section titled “Reference implementation and scope”Use frontend/src/pages/master-data/CustomerList.vue as the managed-resource list reference.
The framework is DataTable, DataTablePager, and useDataTable, not a page-local replacement table.
Source inspection confirms these contracts exist; it does not establish parity across every module.
The requirements below apply to managed master-data and transactional lists.
Small dropdowns and analytical reports can use appropriate lighter query and pagination patterns.
Query and display responsibilities
Section titled “Query and display responsibilities”useDataTable receives a fetcher returning KeysetResponse, plus optional pageSize, initialSort, rowKey, and paginationMode.
Its fetcher receives a query and optional AbortSignal; forward the signal to the HTTP client.
Use buildQuery() to preserve search, filters, and sort intent when calling compatible endpoints.
reloadFirst, goNext, goPrev, and loadMore represent different navigation intentions.
The optional urlSync preserves configured search/filter/sort/view state, not opaque cursors.
Do not put confidential search values in shareable URLs without a deliberate data-handling decision.
DataTable receives columns, rows, rowKey, loading, sortRules, and columnFilters.
Selection uses selectable and selectedIds; actions use rowActions and the row-action event.
Sorting and filtering emit toggle-sort, set-filter, and clear-filters for the owning page to handle.
editable enables configured inline editing and emits inline-save with row, key, and value.
It does not make every column editable or replace backend validation and version checks.
Cursor pagination without false totals
Section titled “Cursor pagination without false totals”| Pattern | Use | Do not imply |
|---|---|---|
prevNext | Deliberate review of bounded result windows | Random access to every numbered page |
loadMore | Append additional results while keeping context | All rows are already loaded |
pageIndex | Display the local navigation position | An exact total page count |
shown | Describe rows currently displayed | Total matching records unless separately known |
canNext and canPrev | Enable valid navigation | Guess availability from the current row count alone |
DataTablePager emits prev, next, and load-more and disables navigation while loading.
When filters or sorting change, restart the cursor sequence rather than reusing a stale cursor.
After a mutation changes ordering, reload and explain any moved or removed row without losing context silently.
Use a stable row identifier, not the row’s current visual index, for selection and actions.
Search, filters, and sorting
Section titled “Search, filters, and sorting”Offer meaningful search scope, debounce interactive search, and expose an obvious clear action. Make active filters visible; a filtered empty state must not claim the resource has never existed. Use allow-listed fields and operators supported by the server; do not silently drop unsupported filters. Preserve multi-sort precedence and make it understandable, not just a set of arrows with no order. Cancel or ignore stale responses so older searches cannot replace newer results. Saved filters are user intent, not authorization; the server must reapply current access rules.
Selection and bulk actions
Section titled “Selection and bulk actions”| Decision | Required behavior | Dangerous alternative |
|---|---|---|
| Select visible rows | Describe the visible selection scope | Claim “all results” when only a window is selected |
| Keep cross-page selection | Show total selected count and a clear action | Hide selections outside the current window |
| Change query or tenant | Explicitly clear or explain selection policy; always isolate tenants | Apply a stale selection to another context |
| Submit bulk update | One authorized bulk request with bounded IDs | Loop many row updates from the browser |
| Review result | Show affected, skipped, and failed counts according to actual transaction semantics | Report all selected records as successful |
The repository’s bulk DTO convention caps IDs at 500; the UI must respect the endpoint’s actual limit. Before submission, state the action, selected count, excluded system records, and meaningful consequences. An all-results operation needs an explicit server-supported selection contract, not a fabricated list of loaded IDs. Permission and eligibility can change between selection and submission; handle server rejections truthfully.
Import and export parity
Section titled “Import and export parity”Full export uses the endpoint’s export API with the same filter, search, and sort intent from buildQuery().
Selected export is a separate action based on the selected rows available to the export implementation.
If selected IDs span unloaded pages, resolve the required rows through an authorized contract or explain the limitation.
Never label a current-page export “Export all”.
Preserve CSV formula-injection protection and the shared serializer; raw string concatenation is not equivalent.
Exports must enforce tenant and permission scope independently of the visible table.
Import should offer a real template, validation/dry-run results, and an explicit commit step. Show row numbers, field errors, duplicates, and whether commit is atomic before users proceed. Do not silently accept the valid subset when the contract promises an all-or-nothing import. Long-running imports require a job identity, visible status, and retry semantics that avoid duplication.
Financial workflow and audit
Section titled “Financial workflow and audit”Keep draft, submitted, approved, posted, paid, and reversed states distinct in labels and available actions. An approval does not prove payment; an accepted background task does not prove ledger posting. Posted records are corrected by reversal, not hidden deletion or an ordinary editable field. Show period restrictions, currency, full amounts, and material differences before confirmation. Segregation of duties must be enforced on the server; hiding a button is only interface guidance.
DataTable exposes historyResource, historyIdKey, historyLabelKey, and historyAllowRevert for configured history integration.
If rowKey is a natural code, provide the real database identity through the correct history configuration.
Displaying history is not evidence that every mutation has a complete audit trail.
Revert controls must respect current authorization and business rules, especially after posting.
Avoid leaking another tenant’s actor names or document identifiers through history or previews.
Acceptance criteria
Section titled “Acceptance criteria”- List, export, import, bulk update, and inline edit honor the same server-side scope and permissions.
- Cursor transitions, changed filters, stale responses, and empty windows are tested without invented totals.
- Selected scope is explicit across pages and cannot cross tenant boundaries.
- Keyboard users have alternatives to double-click editing and access to row-action menus.
- Financial review includes full amount, currency, period, consequence, and authoritative status.
- Atomic failures, partial jobs, skipped rows, and unknown outcomes are reported accurately.
- Audit links resolve the correct identity and never bypass posting or reversal rules.
Use forms for mutation handling and feedback for persistent recovery.