diff --git a/frontend/src/localization/en.json b/frontend/src/localization/en.json index d660e14..aa36fbe 100755 --- a/frontend/src/localization/en.json +++ b/frontend/src/localization/en.json @@ -221,7 +221,8 @@ "name": "Name", "vendor": "Vendor", "version": "Version", - "count": "Asset Count" + "count": "Asset Count", + "alternative_package": "Alternative Package" }, "fetch": { "messages": { diff --git a/frontend/src/localization/tr.json b/frontend/src/localization/tr.json index af7250d..71b2a03 100755 --- a/frontend/src/localization/tr.json +++ b/frontend/src/localization/tr.json @@ -221,7 +221,8 @@ "name": "Adı", "vendor": "Sağlayıcı", "version": "Versiyon", - "count": "Varlık Sayısı" + "count": "Varlık Sayısı", + "alternative_package": "Alternatif Paket" }, "fetch": { "messages": { diff --git a/frontend/src/models/Package.ts b/frontend/src/models/Package.ts index a191517..998c420 100644 --- a/frontend/src/models/Package.ts +++ b/frontend/src/models/Package.ts @@ -1,4 +1,15 @@ export interface IPackage { name: string count: number + alternative_package: IAlternativePackage +} + +interface IAlternativePackage { + id: string + created_at: string + updated_at: string + deleted_at: string + name: string + url: string + package_name: string } diff --git a/frontend/src/views/pages/Packages.vue b/frontend/src/views/pages/Packages.vue index bcd3df0..0583c39 100644 --- a/frontend/src/views/pages/Packages.vue +++ b/frontend/src/views/pages/Packages.vue @@ -6,6 +6,9 @@ import AsyncStore from "@/components/Table/AsyncStore.vue" import Header from "@/components/UIElements/Header.vue" import type { IColumn } from "@/models/Column" import fileTypes from "@/utils/data/file_types.json" +import type { IPackage } from "@/models/Package" +import { h } from "vue" +import { NButton, NText } from "naive-ui" const { t } = useI18n() const store = usePackageStore() @@ -22,6 +25,28 @@ const columns: IColumn[] = reactive([ tooltip: true, }, }, + { + title: t("package.table.alternative_package"), + key: "alternative_package.name", + resizable: true, + ellipsis: { + tooltip: true, + }, + render: (row: IPackage) => { + return row.alternative_package + ? h( + NButton, + { + text: true, + onClick: () => { + window.open(row.alternative_package.url, "_blank") + }, + }, + h(NText, { underline: true }, row.alternative_package.name), + ) + : "-" + }, + }, { title: t("package.table.count"), key: "count",