mirror of
https://github.com/SARL-PACIFIC-ERP/odoo-sh-test.git
synced 2025-06-25 09:32:22 +00:00
ch2.10 make it extensible
This commit is contained in:
parent
089ac45df2
commit
7f28d797c9
|
@ -20,7 +20,7 @@ class AwesomeDashboard extends Component {
|
|||
|
||||
this.stats = useState(useService('awesome_dashboard.statistics'));
|
||||
|
||||
this.items = items;
|
||||
this.items = registry.category("awesome_dashboard").getAll();
|
||||
}
|
||||
|
||||
openCustomers() {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
/** @odoo-module */
|
||||
import { NumberCard } from "./number_card/number_card";
|
||||
import { PieChartCard } from "./pie_chart_card/pie_chart_card";
|
||||
export const items = [
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
const items = [
|
||||
{
|
||||
id: "average_quantity",
|
||||
description: "Average amount of t-shirt",
|
||||
|
@ -57,4 +59,9 @@ export const items = [
|
|||
values: data.orders_by_size,
|
||||
})
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
items.forEach(item => {
|
||||
registry.category("awesome_dashboard").add(item.id, item);
|
||||
});
|
Loading…
Reference in a new issue