Debian Codegraph @

addons/pos_restaurant/static/src/app/screens/receipt_header_patch.js

raw
1 import { ReceiptHeader } from "@point_of_sale/app/screens/receipt_screen/receipt/receipt_header/receipt_header";
2
3 import { _t } from "@web/core/l10n/translation";
4 import { patch } from "@web/core/utils/patch";
5
6 patch(ReceiptHeader.prototype, {
7 /** @returns {string} */
8 get tableName() {
9 const table = this.order.table_id || this.order.self_ordering_table_id;
10 if (table && this.order.customer_count) {
11 return _t("Table %(number)s, Guests: %(count)s", {
12 number: table.table_number,
13 count: this.order.customer_count,
14 });
15 }
16 if (table) {
17 return _t("Table %(number)s", { number: table.table_number });
18 }
19 return "";
20 },
21 });