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