Tower: upload laundry_management 19.0.19.0.4 (via marketplace)
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
/** @odoo-module */
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import { OrderSummary } from "@point_of_sale/app/screens/product_screen/order_summary/order_summary";
|
||||
|
||||
patch(OrderSummary.prototype, {
|
||||
get laundryTypeSummary() {
|
||||
const order = this.currentOrder;
|
||||
if (!order) {
|
||||
return null;
|
||||
}
|
||||
const type = order.laundry_order_type_id;
|
||||
const attrs = order.laundry_order_attribute_ids || [];
|
||||
if (!type && (!attrs || attrs.length === 0)) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
typeName: type?.name || "",
|
||||
typeColor: type?.color || "",
|
||||
attributes: attrs.map((a) => ({
|
||||
id: a.id,
|
||||
name: a.name,
|
||||
color: a.color || "",
|
||||
})),
|
||||
isDelivery: !!order.laundry_is_delivery,
|
||||
scheduledAt: order.laundry_delivery_scheduled_at || "",
|
||||
canEdit: !!this.pos.config?.allow_change_laundry_order_type_before_payment,
|
||||
};
|
||||
},
|
||||
|
||||
onClickEditLaundryType() {
|
||||
this.pos.editLaundryOrderType();
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user