From 24615ba1b4d916f9eb07cf403890a3143860e6c1 Mon Sep 17 00:00:00 2001 From: Konstantin Savosteev Date: Thu, 16 May 2024 12:54:35 +0200 Subject: [PATCH] VCST-1213: make optional dependencies inactive if no module info is found (#2793) --- .../wwwroot/js/app/modularity/blades/module-detail.js | 6 ++++++ .../wwwroot/js/app/modularity/blades/module-detail.tpl.html | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/VirtoCommerce.Platform.Web/wwwroot/js/app/modularity/blades/module-detail.js b/src/VirtoCommerce.Platform.Web/wwwroot/js/app/modularity/blades/module-detail.js index 42a8a4ce03..79dafa847f 100644 --- a/src/VirtoCommerce.Platform.Web/wwwroot/js/app/modularity/blades/module-detail.js +++ b/src/VirtoCommerce.Platform.Web/wwwroot/js/app/modularity/blades/module-detail.js @@ -66,6 +66,12 @@ angular.module('platformWebApp') return result; } + $scope.isModulePresent = function (dependencyId) { + return _.any(moduleHelper.allmodules, function (x) { + return x.id === dependencyId; + }); + } + $scope.formDependencyVersion = function (dependency) { return dependency.version.major + '.' + dependency.version.minor + '.' + dependency.version.patch; }; diff --git a/src/VirtoCommerce.Platform.Web/wwwroot/js/app/modularity/blades/module-detail.tpl.html b/src/VirtoCommerce.Platform.Web/wwwroot/js/app/modularity/blades/module-detail.tpl.html index 2ea0a50006..9f98d5db5d 100644 --- a/src/VirtoCommerce.Platform.Web/wwwroot/js/app/modularity/blades/module-detail.tpl.html +++ b/src/VirtoCommerce.Platform.Web/wwwroot/js/app/modularity/blades/module-detail.tpl.html @@ -89,7 +89,8 @@
{{ 'platform.blades.module-detail.labels.optional-dependencies' | translate }}
- {{dependency.id}} {{formDependencyVersion(dependency)}} +
{{dependency.id}} {{formDependencyVersion(dependency)}}
+
{{ dependency.id }} {{formDependencyVersion(dependency)}}