blob: 3ad0ee9f02b1c6e3ed89ab3e47e23d70e4d3a24e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
odoo.define('point_of_sale.HeaderLockButton', function(require) {
'use strict';
const PosComponent = require('point_of_sale.PosComponent');
const Registries = require('point_of_sale.Registries');
const { useState } = owl;
class HeaderLockButton extends PosComponent {
constructor() {
super(...arguments);
this.state = useState({ isUnlockIcon: true, title: 'Unlocked' });
}
async showLoginScreen() {
await this.showTempScreen('LoginScreen');
}
onMouseOver(isMouseOver) {
this.state.isUnlockIcon = !isMouseOver;
this.state.title = isMouseOver ? 'Lock' : 'Unlocked';
}
}
Registries.Component.add(HeaderLockButton);
return HeaderLockButton;
});
|