1. load_dashboard.py: get_today_usage/amount and trend functions now filter out accounting_status='failed' records so failed transactions are not counted as successful. 2. stat_errors.ui: added click bind to navigate to llmage failed accounting records page (app.sage_main_content target).
65 lines
2.0 KiB
XML
65 lines
2.0 KiB
XML
{
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"css": "stat-card",
|
|
"padding": "14px",
|
|
"borderRadius": "12px",
|
|
"flex": "1",
|
|
"minHeight": "90px",
|
|
"cursor": "pointer",
|
|
"borderLeft": "4px solid #ef4444"
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "click",
|
|
"actiontype": "urlwidget",
|
|
"target": "app.sage_main_content",
|
|
"options": {
|
|
"url": "{{entire_url('/llmage/failed_accounting.ui')}}"
|
|
},
|
|
"mode": "replace"
|
|
}
|
|
],
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "HBox",
|
|
"options": {
|
|
"alignItems": "center",
|
|
"marginBottom": "12px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Svg",
|
|
"options": {
|
|
"svg": "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#EF4444\" stroke-width=\"2\"><path d=\"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z\"/></svg>",
|
|
"width": "24px",
|
|
"height": "24px"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Filler"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {
|
|
"css": "stat-value",
|
|
"text": "{{get_accounting_errors(request)}}",
|
|
"fontSize": "32px",
|
|
"fontWeight": "700",
|
|
"lineHeight": "1.1"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {
|
|
"fontSize": "14px",
|
|
"marginTop": "4px",
|
|
"otext": "记账异常",
|
|
"i18n": true
|
|
}
|
|
}
|
|
]
|
|
} |