diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 1f1e3a951..c543d2749 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -394,6 +394,15 @@ "service_details": "Service Details", "provider": "Provider", "provider_name": "Provider name", + "supplier": "Supplier", + "supplier_name": "Supplier name", + "component_supplier_name_desc": "The organization that supplied the component", + "project_supplier_name_desc": "The organization that supplied the component that the project describes", + "project_metadata_supplier_name_desc": "The organization that supplied the BOM", + "manufacturer": "Manufacturer", + "manufacturer_name": "Manufacturer name", + "manufacturer_name_desc": "The organization that manufactured the component that the project describes", + "authors": "Authors", "endpoints": "Endpoints", "data": "Data", "url": "URL", diff --git a/src/views/portfolio/projects/ComponentDetailsModal.vue b/src/views/portfolio/projects/ComponentDetailsModal.vue index 0f001160d..bad34887b 100644 --- a/src/views/portfolio/projects/ComponentDetailsModal.vue +++ b/src/views/portfolio/projects/ComponentDetailsModal.vue @@ -104,6 +104,32 @@ :readonly="this.isNotPermitted(PERMISSIONS.PORTFOLIO_MANAGEMENT)" /> + + + + + + + + + + + + + + @@ -167,6 +193,78 @@ ], selectableLicenses: [], selectedLicense: '', + supplierUrlsTableColumns: [ + { + title: this.$t('message.urls'), + sortable: false, + formatter(value, row, index) { + return xssFilters.inHTMLData(common.valueWithDefault(row, "")); + } + } + ], + supplierUrlsTableOptions: { + search: false, + showHeader: false, + showColumns: false, + showRefresh: false, + pagination: true, + silentSort: false, + sidePagination: 'client', + queryParamsType: 'pageSize', + pageList: '[5, 10, 25]', + pageSize: 5, + icons: { + refresh: 'fa-refresh' + }, + responseHandler: function (res, xhr) { + res.total = xhr.getResponseHeader("X-Total-Count"); + return res; + } + }, + supplierContactsTableColumns: [ + { + title: this.$t('message.name'), + field: "name", + sortable: false, + formatter(value, row, index) { + return xssFilters.inHTMLData(common.valueWithDefault(value, "")); + } + }, + { + title: this.$t('message.email'), + field: "email", + sortable: false, + formatter(value, row, index) { + return xssFilters.inHTMLData(common.valueWithDefault(value, "")); + } + }, + { + title: this.$t('message.phone'), + field: "phone", + sortable: false, + formatter(value, row, index) { + return xssFilters.inHTMLData(common.valueWithDefault(value, "")); + } + } + ], + supplierContactsTableOptions: { + search: false, + showColumns: false, + showRefresh: false, + pagination: true, + silentSort: false, + sidePagination: 'client', + queryParamsType: 'pageSize', + pageList: '[5, 10, 25]', + pageSize: 5, + icons: { + refresh: 'fa-refresh' + }, + responseHandler: function (res, xhr) { + res.total = xhr.getResponseHeader("X-Total-Count"); + return res; + } + }, referencesTableColumns: [ { title: this.$t('message.url'), @@ -218,6 +316,7 @@ let url = `${this.$api.BASE_URL}/${this.$api.URL_COMPONENT}`; this.axios.post(url, { uuid: this.component.uuid, + supplier: this.component.supplier, name: this.component.name, version: this.component.version, group: this.component.group, diff --git a/src/views/portfolio/projects/ProjectDetailsModal.vue b/src/views/portfolio/projects/ProjectDetailsModal.vue index 0ac486b1c..0989f6142 100644 --- a/src/views/portfolio/projects/ProjectDetailsModal.vue +++ b/src/views/portfolio/projects/ProjectDetailsModal.vue @@ -78,6 +78,58 @@ :readonly="this.isNotPermitted(PERMISSIONS.PORTFOLIO_MANAGEMENT)" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -89,6 +141,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +