From 892e214607a3015ea86c052156b12bfa515cd55a Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Sun, 17 Mar 2024 15:18:24 -0500 Subject: [PATCH] fix open in History bug --- .../History/Content/ContentItem.vue | 20 ++++++++++--------- .../History/Content/GenericItem.vue | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/client/src/components/History/Content/ContentItem.vue b/client/src/components/History/Content/ContentItem.vue index dc7022d3a824..4ae9b844e040 100644 --- a/client/src/components/History/Content/ContentItem.vue +++ b/client/src/components/History/Content/ContentItem.vue @@ -56,22 +56,23 @@ const props = withDefaults(defineProps(), { }); const emit = defineEmits<{ - (e: "update:selected", selected: boolean): void; - (e: "update:expand-dataset", expand: boolean): void; - (e: "shift-select", direction: string): void; - (e: "init-key-selection"): void; (e: "arrow-navigate", direction: string): void; + (e: "delete", item: any, recursive: boolean): void; + (e: "drag-start", evt: DragEvent): void; (e: "hide-selection"): void; + (e: "init-key-selection"): void; + (e: "open-in-history", item: any): void; (e: "select-all"): void; (e: "selected-to", reset: boolean): void; - (e: "delete", item: any, recursive: boolean): void; - (e: "undelete"): void; - (e: "unhide"): void; - (e: "view-collection", item: any, name: string): void; - (e: "drag-start", evt: DragEvent): void; + (e: "shift-select", direction: string): void; (e: "tag-change", item: any, newTags: Array): void; (e: "tag-click", tag: string): void; (e: "toggleHighlights", item: any): void; + (e: "undelete"): void; + (e: "unhide"): void; + (e: "update:expand-dataset", expand: boolean): void; + (e: "update:selected", selected: boolean): void; + (e: "view-collection", item: any, name: string): void; }>(); const entryPointStore = useEntryPointStore(); @@ -237,6 +238,7 @@ function onClick(e?: Event) { } else { emit("view-collection", props.item, props.name); } + emit("open-in-history", props.item); } function onDisplay() { diff --git a/client/src/components/History/Content/GenericItem.vue b/client/src/components/History/Content/GenericItem.vue index 38eca55a0ad6..8ae583d52c0c 100644 --- a/client/src/components/History/Content/GenericItem.vue +++ b/client/src/components/History/Content/GenericItem.vue @@ -122,7 +122,7 @@ export default { const filters = { deleted: item.deleted, visible: item.visible, - hid: hid, + related: hid, }; try { await this.applyFilters(history_id, filters);