|
1 | 1 | <?xml version="1.0" encoding="UTF-8" ?> |
2 | 2 | <templates xml:space="preserve"> |
3 | | - |
4 | 3 | <t t-name="awesome_dashboard.AwesomeDashboard"> |
5 | | - hello dashboard |
| 4 | + <Layout display="{controlPanel: {}}" className="'o_dashboard h-100'"> |
| 5 | + <t t-set-slot="layout-buttons"> |
| 6 | + <div class="d-flex flex-warp"> |
| 7 | + <button class="btn btn-primary" t-on-click="openCustomers">Customers</button> |
| 8 | + <button class="btn btn-primary" t-on-click="openLeads">Leads</button> |
| 9 | + </div> |
| 10 | + </t> |
| 11 | + <div class="d-flex flex-warp"> |
| 12 | + <DashboardItem size="50"> |
| 13 | + <h2 class="card-text o_text"> Average amount of t-shirt by order this month</h2> |
| 14 | + <t t-esc="result.average_quantity"/> |
| 15 | + </DashboardItem> |
| 16 | + <DashboardItem size="50"> |
| 17 | + <h2 class="card-text"> Average time for an order to go from ‘new’ to ‘sent’ or ‘cancelled’</h2> |
| 18 | + <t t-esc="result.average_time"/> |
| 19 | + </DashboardItem> |
| 20 | + <DashboardItem size="25"> |
| 21 | + <h2 class="card-text">Number of cancelled orders this month</h2> |
| 22 | + <t t-esc="result.nb_cancelled_orders"/> |
| 23 | + </DashboardItem> |
| 24 | + <DashboardItem size="25"> |
| 25 | + <h2 class="card-text">Number of new orders this month</h2> |
| 26 | + <t t-esc="result.nb_new_orders"/> |
| 27 | + </DashboardItem> |
| 28 | + <DashboardItem size="75"> |
| 29 | + <h2 class="card-text">Total amount of new orders this month</h2> |
| 30 | + <t t-esc="result.total_amount"/> |
| 31 | + </DashboardItem> |
| 32 | + <DashboardItem>Test</DashboardItem> |
| 33 | + </div> |
| 34 | + <DashboardItem size="35"> |
| 35 | + <PieChart data="result.orders_by_size" label="'Shirt by size'"/> |
| 36 | + </DashboardItem> |
| 37 | + </Layout> |
| 38 | + |
6 | 39 | </t> |
7 | 40 |
|
8 | 41 | </templates> |
0 commit comments