blob: 540e84f176787961de3d3761e335e5e52791f50c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
odoo.define('point_of_sale.NotificationSound', function (require) {
'use strict';
const { useListener } = require('web.custom_hooks');
const PosComponent = require('point_of_sale.PosComponent');
const Registries = require('point_of_sale.Registries');
class NotificationSound extends PosComponent {
constructor() {
super(...arguments);
useListener('ended', () => (this.props.sound.src = null));
}
}
NotificationSound.template = 'NotificationSound';
Registries.Component.add(NotificationSound);
return NotificationSound;
});
|