summaryrefslogtreecommitdiff
path: root/addons/pos_six/static/src/js/Chrome.js
blob: 0df6c4e1dc7144af6f16c10af614540844c92bbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
odoo.define('pos_six.chrome', function (require) {
    'use strict';

    const Chrome = require('point_of_sale.Chrome');
    const Registries = require('point_of_sale.Registries');

    const PosSixChrome = (Chrome) =>
        class extends Chrome {
            get balanceButtonIsShown() {
                return this.env.pos.payment_methods.some(pm => pm.use_payment_terminal === 'six'); 
            }
        };

    Registries.Component.extend(Chrome, PosSixChrome);

    return Chrome;
});