refactoring on types

This commit is contained in:
Géry Debongnie
2019-01-23 11:12:54 +01:00
parent 3766fbc7b8
commit 08938d2334
15 changed files with 85 additions and 65 deletions
+5 -4
View File
@@ -1,5 +1,6 @@
import Widget from "../core/Widget";
import Widget from "../core/widget";
import { Action } from "../services/actions";
import { Env } from "../types";
const template = `
<div class="o_navbar">
@@ -12,12 +13,12 @@ const template = `
</div>
`;
export default class Navbar extends Widget {
export default class Navbar extends Widget<Env> {
name = "navbar";
template = template;
getUrl(action: Action) {
const action_id = action.id;
return this.env.services.router.formatURL("web", { action_id });
const action_id = String(action.id);
return this.env.router.formatURL("web", { action_id });
}
}