Files
odoo_source/addons/pos_hr/static/src/js/CashierName.js
T
Samuel Degueldre cb2a53d573 [REF] point_of_sale, pos*: adapt import to moved files
pos*: l10n_co_pos, l10n_fr_pos_cert, l10n_gcc_pos, l10n_in_pos,
l10n_sa_pos, pos_adyen, pos_discount, pos_epson_printer, pos_hr,
pos_hr_restaurant, pos_loyalty, pos_mercury, pos_restaurant, pos_sale,
pos_sale_loyalty, pos_sale_product_configurator, pos_six, pos_stripe

The previous commit reorganizes the files in the pos, this commit
renames all of the imports of those files to match their new location.
This is done in a separate commit to allow git to better keep track of
the changes and apply forward-ports more seamlessly.

Part-of: odoo/odoo#123498
2023-06-05 17:51:06 +02:00

28 lines
862 B
JavaScript

/** @odoo-module */
import { CashierName } from "@point_of_sale/app/navbar/cashier_name/cashier_name";
import { patch } from "@web/core/utils/patch";
import { useCashierSelector } from "@pos_hr/js/SelectCashierMixin";
patch(CashierName.prototype, "pos_hr.CashierName", {
setup() {
this._super(...arguments);
this.selectCashier = useCashierSelector();
},
//@Override
get avatar() {
if (this.pos.globalState.config.module_pos_hr) {
const cashier = this.pos.globalState.get_cashier();
return `/web/image/hr.employee/${cashier.id}/avatar_128`;
}
return this._super(...arguments);
},
//@Override
get cssClass() {
if (this.pos.globalState.config.module_pos_hr) {
return { oe_status: true };
}
return this._super(...arguments);
},
});