File tree Expand file tree Collapse file tree 6 files changed +12
-5
lines changed
awesome_dashboard/static/src Expand file tree Collapse file tree 6 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 11import { Component } from "@odoo/owl" ;
22import { registry } from "@web/core/registry" ;
3+ import { Layout } from "@web/search/layout" ;
34
45class AwesomeDashboard extends Component {
56 static template = "awesome_dashboard.AwesomeDashboard" ;
7+ static components = { Layout }
68}
79
810registry . category ( "actions" ) . add ( "awesome_dashboard.dashboard" , AwesomeDashboard ) ;
Original file line number Diff line number Diff line change 1+ .o_dashboard {
2+ background-color : gray ;
3+ }
Original file line number Diff line number Diff line change 22<templates xml : space =" preserve" >
33
44 <t t-name =" awesome_dashboard.AwesomeDashboard" >
5- hello dashboard
5+ <Layout display =" {controlPanel: {}}" className =" 'o_dashboard h-100'" >
6+ <h1 >Hello World</h1 >
7+ </Layout >
68 </t >
79
810</templates >
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export class TodoItem extends Component {
1313 this . props . toggleState ( this . props . todo . id )
1414 }
1515
16- onClickRremove ( ) {
16+ onClickRemove ( ) {
1717 this . props . removeTodo ( this . props . todo . id )
1818 }
1919}
Original file line number Diff line number Diff line change 55 <input type =" checkbox" t-att-checked =" props.todo.isCompleted" t-on-change =" toggleIsCompleted" />
66 <span t-esc =" props.todo.id" />.
77 <span t-esc =" props.todo.description" />
8- <span style =" margin-left: 10px; cursor: pointer;" t-on-click =" onClickRremove " >❌</span >
8+ <span style =" margin-left: 10px; cursor: pointer;" t-on-click =" onClickRemove " >❌</span >
99 </div >
1010 </t >
1111</templates >
Original file line number Diff line number Diff line change 11import { useRef , onMounted } from "@odoo/owl" ;
22
3+
34export function useAutofocus ( refName ) {
45 const ref = useRef ( refName ) ;
56
67 onMounted ( ( ) => {
78 if ( ref . el ) {
89 ref . el . focus ( ) ;
910 }
10- } ) ;
11-
11+ } ) ;
1212 return ref ;
1313}
You can’t perform that action at this time.
0 commit comments