diff --git a/ui/console-src/modules/contents/attachments/AttachmentList.vue b/ui/console-src/modules/contents/attachments/AttachmentList.vue index fda62a13f..6bdc92b04 100644 --- a/ui/console-src/modules/contents/attachments/AttachmentList.vue +++ b/ui/console-src/modules/contents/attachments/AttachmentList.vue @@ -99,7 +99,7 @@ function handleClearFilters() { const { attachments, selectedAttachment, - selectedAttachments, + selectedAttachmentNames, checkedAll, isLoading, isFetching, @@ -128,13 +128,13 @@ const { size: size, }); -provide>>("selectedAttachments", selectedAttachments); +provide>>("selectedAttachmentNames", selectedAttachmentNames); const handleMove = async (group: Group) => { try { - const promises = Array.from(selectedAttachments.value).map((attachment) => { + const promises = Array.from(selectedAttachmentNames.value).map((name) => { return coreApiClient.storage.attachment.patchAttachment({ - name: attachment.metadata.name, + name, jsonPatchInner: [ { op: "add", @@ -146,7 +146,7 @@ const handleMove = async (group: Group) => { }); await Promise.all(promises); - selectedAttachments.value.clear(); + selectedAttachmentNames.value.clear(); Toast.success(t("core.attachment.operations.move.toast_success")); } catch (e) { @@ -161,13 +161,13 @@ const handleClickItem = (attachment: Attachment) => { return; } - if (selectedAttachments.value.size > 0) { + if (selectedAttachmentNames.value.size > 0) { handleSelect(attachment); return; } selectedAttachment.value = attachment; - selectedAttachments.value.clear(); + selectedAttachmentNames.value.clear(); detailVisible.value = true; }; @@ -299,14 +299,14 @@ watch(
{{ $t("core.common.buttons.delete") }} - + {{ $t("core.attachment.operations.deselect_items.button") }} @@ -560,12 +560,18 @@ watch(