diff --git a/shopfloor_mobile/static/wms/src/scenario/checkout.js b/shopfloor_mobile/static/wms/src/scenario/checkout.js index bd460fb9e62..1e49059c512 100644 --- a/shopfloor_mobile/static/wms/src/scenario/checkout.js +++ b/shopfloor_mobile/static/wms/src/scenario/checkout.js @@ -277,7 +277,17 @@ const Checkout = { {path: "origin"}, {path: "carrier.name", label: "Carrier"}, {path: "move_line_count", label: "Lines"}, - {path: "priority", label: "Priority"}, + { + path: "priority", + render_component: "priority-widget", + render_options: function (record) { + const priority = parseInt(record.priority); + // We need to pass the label to the component as an option instead of using "display_no_value" + // because pickings with no priority will still have a string value of "0" + // and the label would always be displayed. + return { priority, label: priority ? "Priority: " : null}; + }, + }, ], }, }; diff --git a/shopfloor_mobile_base/static/wms/src/components/priority-widget.js b/shopfloor_mobile_base/static/wms/src/components/priority-widget.js index 9e8427cc9e0..4f0da6d3fa0 100644 --- a/shopfloor_mobile_base/static/wms/src/components/priority-widget.js +++ b/shopfloor_mobile_base/static/wms/src/components/priority-widget.js @@ -18,6 +18,7 @@ export var PriorityWidget = Vue.component("priority-widget", { }, template: `
+ {{ opts.label }} mdi-star