Skip to content

Commit 37b2cd7

Browse files
committed
shopfloor_mobile: allow line breaks in picking note
1 parent c114af4 commit 37b2cd7

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

shopfloor_mobile/static/wms/src/scenario/checkout.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,10 @@ const Checkout = {
7676
</div>
7777
7878
<div v-if="state_is('select_package')">
79-
<v-alert type="info" tile v-if="state.data.packing_info" class="packing-info">
80-
<p v-text="state.data.packing_info" />
79+
<v-alert type="info" tile v-if="state.data.picking.note" class="packing-info">
80+
<div v-for="note in utils.wms.split_picking_note(state)">
81+
<span v-text="note"/>
82+
</div>
8183
</v-alert>
8284
<item-detail-card
8385
v-if="state.data.picking.carrier"

shopfloor_mobile/static/wms/src/scenario/cluster_picking.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ const ClusterPicking = {
3030
v-on:confirm="state.on_confirm"
3131
v-on:cancel="state.on_cancel"
3232
/>
33+
<v-alert type="info" tile v-if="state_is('start_line') && state.data.picking.note" class="packing-info">
34+
<div v-for="note in utils.wms.split_picking_note(state)">
35+
<span v-text="note"/>
36+
</div>
37+
</v-alert>
3338
<batch-picking-line-detail
3439
v-if="state_in(['start_line', 'scan_destination', 'change_pack_lot', 'stock_issue'])"
3540
:line="state.data"

shopfloor_mobile/static/wms/src/wms_utils.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,10 @@ export class WMSUtils {
331331
};
332332
return _.extend(props, override || {});
333333
}
334+
split_picking_note(state) {
335+
// Allow to introduce line breaks in the note.
336+
return state.data.picking.note.split("\n");
337+
}
334338
}
335339

336340
utils_registry.add("wms", new WMSUtils());

0 commit comments

Comments
 (0)