diff --git a/client/src/components/DataDialog/DataDialog.vue b/client/src/components/DataDialog/DataDialog.vue index ca12a0a66168..8302589752e3 100644 --- a/client/src/components/DataDialog/DataDialog.vue +++ b/client/src/components/DataDialog/DataDialog.vue @@ -61,6 +61,22 @@ const services = new Services(); const model = new Model({ multiple: props.multiple, format: props.format }); let urlTracker = new UrlTracker(getHistoryUrl()); +/** Specifies data columns to be shown in the dialog's table */ +const fields = [ + { + key: "label", + }, + { + key: "extension", + }, + { + key: "tags", + }, + { + key: "update_time", + }, +]; + /** Add highlighting for record variations, i.e. datasets vs. libraries/collections **/ function formatRows() { for (const item of items.value) { @@ -168,6 +184,7 @@ watch( { - let timeStamp = item[props.timeKey]; + const timeStamp = item[props.timeKey]; showTime.value = !!timeStamp; - if (timeStamp) { - const date = new Date(timeStamp); - timeStamp = date.toLocaleString("default", { - day: "numeric", - month: "short", - year: "numeric", - minute: "numeric", - hour: "numeric", - }); - } return { id: item.id, label: item[props.labelKey] || null, diff --git a/client/src/components/SelectionDialog/SelectionDialog.vue b/client/src/components/SelectionDialog/SelectionDialog.vue index 1f275ddcd357..6800e3f07b2d 100644 --- a/client/src/components/SelectionDialog/SelectionDialog.vue +++ b/client/src/components/SelectionDialog/SelectionDialog.vue @@ -11,6 +11,7 @@ import { SELECTION_STATES } from "@/components/SelectionDialog/selectionTypes"; import { type FieldEntry, type SelectionItem } from "./selectionTypes"; import DataDialogSearch from "@/components/SelectionDialog/DataDialogSearch.vue"; +import StatelessTags from "@/components/TagsMultiselect/StatelessTags.vue"; library.add(faCaretLeft, faCheck, faCheckSquare, faFolder, faMinusSquare, faSpinner, faSquare, faTimes); @@ -100,6 +101,22 @@ function filtered(items: Array) { currentPage.value = 1; } +/** Format time stamp */ +function formatTime(value: string) { + if (value) { + const date = new Date(value); + return date.toLocaleString("default", { + day: "numeric", + month: "short", + year: "numeric", + minute: "numeric", + hour: "numeric", + }); + } else { + return "-"; + } +} + watch( () => props.items, () => { @@ -167,8 +184,15 @@ watch( + +