Merge pull request #7891 from aignatov-bio/ai-sci-11107-show-selected-position-in-assign-modal

Show selected position in assign modal [SCI-11107]
This commit is contained in:
Martin Artnik 2024-09-26 17:19:25 +02:00 committed by GitHub
commit b9540cafb2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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.'