29 lines
880 B
QML
29 lines
880 B
QML
|
|
// Auto-generated by `bin/console make:bridge:read-model TodoSummary`.
|
||
|
|
// Read-only projection — no Mercure topic, no auto-updates.
|
||
|
|
//
|
||
|
|
// For invalidation: when the underlying data changes, dispatch a
|
||
|
|
// domain event from PHP (see `make:bridge:event`) and call
|
||
|
|
// `todoSummaryList.refresh()` from the event-handler in QML.
|
||
|
|
|
||
|
|
import QtQuick
|
||
|
|
import QtQuick.Controls
|
||
|
|
import PhpQml.Bridge
|
||
|
|
|
||
|
|
ListView {
|
||
|
|
id: todoSummaryList
|
||
|
|
|
||
|
|
model: ReactiveListModel {
|
||
|
|
baseUrl: BackendConnection.url
|
||
|
|
token: BackendConnection.token
|
||
|
|
source: "/api/todo-summaries"
|
||
|
|
// topic: intentionally unset — read-models are queries, not
|
||
|
|
// reactive resources. Drive refreshes from domain events.
|
||
|
|
}
|
||
|
|
|
||
|
|
delegate: ItemDelegate {
|
||
|
|
// Replace with your projection's columns.
|
||
|
|
text: String(model.modelData)
|
||
|
|
width: ListView.view.width
|
||
|
|
}
|
||
|
|
}
|