mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-04 19:53:19 +08:00
Merge pull request #7953 from aignatov-bio/ai-sci-11162-improve-box-item-move-modal
Improve box item move modal [SCI-11162]
This commit is contained in:
commit
a03bd8e4ec
3 changed files with 16 additions and 5 deletions
|
@ -34,6 +34,7 @@
|
||||||
:selectedContainer="assignToContainer"
|
:selectedContainer="assignToContainer"
|
||||||
:selectedPosition="assignToPosition"
|
:selectedPosition="assignToPosition"
|
||||||
:selectedRow="rowIdToMove"
|
:selectedRow="rowIdToMove"
|
||||||
|
:selectedRowName="rowNameToMove"
|
||||||
:cellId="cellIdToUnassign"
|
:cellId="cellIdToUnassign"
|
||||||
@close="openAssignModal = false; resetTableSearch(); this.reloadingTable = true"
|
@close="openAssignModal = false; resetTableSearch(); this.reloadingTable = true"
|
||||||
></AssignModal>
|
></AssignModal>
|
||||||
|
@ -115,6 +116,7 @@ export default {
|
||||||
assignToPosition: null,
|
assignToPosition: null,
|
||||||
assignToContainer: null,
|
assignToContainer: null,
|
||||||
rowIdToMove: null,
|
rowIdToMove: null,
|
||||||
|
rowNameToMove: null,
|
||||||
cellIdToUnassign: null,
|
cellIdToUnassign: null,
|
||||||
assignMode: 'assign',
|
assignMode: 'assign',
|
||||||
storageLocationUnassignDescription: ''
|
storageLocationUnassignDescription: ''
|
||||||
|
@ -219,6 +221,7 @@ export default {
|
||||||
assignRow() {
|
assignRow() {
|
||||||
this.openAssignModal = true;
|
this.openAssignModal = true;
|
||||||
this.rowIdToMove = null;
|
this.rowIdToMove = null;
|
||||||
|
this.rowNameToMove = null;
|
||||||
this.assignToContainer = this.containerId;
|
this.assignToContainer = this.containerId;
|
||||||
this.assignToPosition = null;
|
this.assignToPosition = null;
|
||||||
this.cellIdToUnassign = null;
|
this.cellIdToUnassign = null;
|
||||||
|
@ -227,6 +230,7 @@ export default {
|
||||||
assignRowToPosition(position) {
|
assignRowToPosition(position) {
|
||||||
this.openAssignModal = true;
|
this.openAssignModal = true;
|
||||||
this.rowIdToMove = null;
|
this.rowIdToMove = null;
|
||||||
|
this.rowNameToMove = null;
|
||||||
this.assignToContainer = this.containerId;
|
this.assignToContainer = this.containerId;
|
||||||
this.assignToPosition = position;
|
this.assignToPosition = position;
|
||||||
this.cellIdToUnassign = null;
|
this.cellIdToUnassign = null;
|
||||||
|
@ -235,6 +239,7 @@ export default {
|
||||||
moveRow(_event, data) {
|
moveRow(_event, data) {
|
||||||
this.openAssignModal = true;
|
this.openAssignModal = true;
|
||||||
this.rowIdToMove = data[0].row_id;
|
this.rowIdToMove = data[0].row_id;
|
||||||
|
this.rowNameToMove = data[0].row_name || this.i18n.t('storage_locations.show.hidden');
|
||||||
this.assignToContainer = null;
|
this.assignToContainer = null;
|
||||||
this.assignToPosition = null;
|
this.assignToPosition = null;
|
||||||
this.cellIdToUnassign = data[0].id;
|
this.cellIdToUnassign = data[0].id;
|
||||||
|
|
|
@ -10,19 +10,25 @@
|
||||||
<h4 v-if="selectedPosition" 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 }) }}
|
{{ i18n.t(`storage_locations.show.assign_modal.selected_position_title`, { position: formattedPosition }) }}
|
||||||
</h4>
|
</h4>
|
||||||
<h4 v-else-if="selectedRow && selectedRowName" class="modal-title truncate !block">
|
<h4 v-else-if="assignMode === 'assign' && selectedRow && selectedRowName" class="modal-title truncate !block">
|
||||||
{{ i18n.t(`storage_locations.show.assign_modal.selected_row_title`) }}
|
{{ i18n.t(`storage_locations.show.assign_modal.selected_row_title`) }}
|
||||||
</h4>
|
</h4>
|
||||||
|
<h4 v-else-if="assignMode === 'move'" class="modal-title truncate !block">
|
||||||
|
{{ i18n.t(`storage_locations.show.assign_modal.move_title`, { name: selectedRowName }) }}
|
||||||
|
</h4>
|
||||||
<h4 v-else class="modal-title truncate !block">
|
<h4 v-else class="modal-title truncate !block">
|
||||||
{{ i18n.t(`storage_locations.show.assign_modal.${assignMode}_title`) }}
|
{{ i18n.t(`storage_locations.show.assign_modal.assign_title`) }}
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p v-if="selectedRow && selectedRowName" class="mb-4">
|
<p v-if="selectedRow && selectedRowName" class="mb-4">
|
||||||
{{ i18n.t(`storage_locations.show.assign_modal.selected_row_description`, { name: selectedRowName }) }}
|
{{ i18n.t(`storage_locations.show.assign_modal.selected_row_description`, { name: selectedRowName }) }}
|
||||||
</p>
|
</p>
|
||||||
|
<h4 v-else-if="assignMode === 'move'" class="modal-title truncate !block">
|
||||||
|
{{ i18n.t(`storage_locations.show.assign_modal.move_description`, { name: selectedRowName }) }}
|
||||||
|
</h4>
|
||||||
<p v-else class="mb-4">
|
<p v-else class="mb-4">
|
||||||
{{ i18n.t(`storage_locations.show.assign_modal.${assignMode}_description`) }}
|
{{ i18n.t(`storage_locations.show.assign_modal.assign_description`) }}
|
||||||
</p>
|
</p>
|
||||||
<RowSelector v-if="!selectedRow" @change="this.rowId = $event" class="mb-4"></RowSelector>
|
<RowSelector v-if="!selectedRow" @change="this.rowId = $event" class="mb-4"></RowSelector>
|
||||||
<ContainerSelector v-if="!selectedContainer" @change="this.containerId = $event"></ContainerSelector>
|
<ContainerSelector v-if="!selectedContainer" @change="this.containerId = $event"></ContainerSelector>
|
||||||
|
|
|
@ -2701,9 +2701,9 @@ en:
|
||||||
selected_position_title: 'Assign to position %{position}'
|
selected_position_title: 'Assign to position %{position}'
|
||||||
selected_row_title: 'Assign new location'
|
selected_row_title: 'Assign new location'
|
||||||
assign_title: 'Assign position'
|
assign_title: 'Assign position'
|
||||||
move_title: 'Move item'
|
move_title: 'Move %{name}'
|
||||||
assign_description: 'Select an item to assign it to a location.'
|
assign_description: 'Select an item to assign it to a location.'
|
||||||
move_description: 'Select a new location for your item.'
|
move_description: 'Select where you want to move %{name}.'
|
||||||
selected_row_description: "Select a location for the item %{name}."
|
selected_row_description: "Select a location for the item %{name}."
|
||||||
assign_action: 'Assign'
|
assign_action: 'Assign'
|
||||||
move_action: 'Move'
|
move_action: 'Move'
|
||||||
|
|
Loading…
Reference in a new issue