Debian Codegraph @

addons/pos_hr/static/src/app/components/navbar/navbar.js

raw symbols SCIP
1 import { Navbar } from "@point_of_sale/app/components/navbar/navbar";
2 import { patch } from "@web/core/utils/patch";
3
4 patch(Navbar.prototype, {
5 get showCreateProductButton() {
6 if (!this.pos.config.module_pos_hr || this.pos.employeeIsAdmin) {
7 return super.showCreateProductButton;
8 } else {
9 return false;
10 }
11 },
12 get showBackend() {
13 const cashier = this.pos.getCashierUserId();
14 return !this.pos.config.module_pos_hr || (cashier && cashier.id === this.pos.user?.id);
15 },
16 });