File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
awesome_dashboard/static/src/dashboard Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,9 @@ class AwesomeDashboard extends Component {
14
14
static components = { Layout, DashboardItem, PieChart }
15
15
16
16
setup ( ) {
17
- this . action = useService ( "action" ) ;
17
+ this . action = useService ( "action" )
18
18
this . stats = useState ( useService ( "awesome_dashboard.statistics" ) )
19
- this . items = items
19
+ this . items = registry . category ( "awesome_dashboard" ) . getAll ( )
20
20
}
21
21
22
22
openPartners ( ) {
Original file line number Diff line number Diff line change 1
1
import { NumberCard } from "./number_card/number_card"
2
2
import { PieChartCard } from "./pie_chart_card/pie_chart_card"
3
+ import { registry } from "@web/core/registry" ;
3
4
4
- export const items = [
5
+ const items = [
5
6
{
6
7
id : "average_quantity" ,
7
8
description : "Average amount of t-shirt" ,
@@ -58,3 +59,7 @@ export const items = [
58
59
} )
59
60
}
60
61
]
62
+
63
+ items . forEach ( i => {
64
+ registry . category ( "awesome_dashboard" ) . add ( i . id , i ) ;
65
+ } ) ;
You can’t perform that action at this time.
0 commit comments