Show selected position in assign modal [SCI-11107]

This commit is contained in:
Anton 2024-09-26 15:01:08 +02:00
parent 96835a171e
commit a251a18d46
2 changed files with 11 additions and 1 deletions

View file

@ -7,7 +7,10 @@
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<i class="sn-icon sn-icon-close"></i>
</button>
<h4 class="modal-title truncate !block">
<h4 v-if="selectedPosition" class="modal-title truncate !block">
{{ i18n.t(`storage_locations.show.assign_modal.selected_position_title`, { position: formattedPosition }) }}
</h4>
<h4 v-else class="modal-title truncate !block">
{{ i18n.t(`storage_locations.show.assign_modal.${assignMode}_title`) }}
</h4>
</div>
@ -65,6 +68,12 @@ export default {
storage_location_id: this.containerId
});
},
formattedPosition() {
if (this.selectedPosition) {
return String.fromCharCode(96 + parseInt(this.selectedPosition[0], 10)).toUpperCase() + this.selectedPosition[1];
}
return '';
},
moveUrl() {
return move_storage_location_storage_location_repository_row_path(this.containerId, this.cellId);
},

View file

@ -2691,6 +2691,7 @@ en:
description_single: 'Are you sure you want to remove item from this location?'
button: 'Unassign'
assign_modal:
selected_position_title: 'Assign to position %{position}'
assign_title: 'Assign position'
move_title: 'Move item'
assign_description: 'Select an item to assign it to a location.'