Skip to content

Commit

Permalink
VCST-1213: make optional dependencies inactive if no module info is f…
Browse files Browse the repository at this point in the history
…ound (#2793)
  • Loading branch information
ksavosteev authored May 16, 2024
1 parent ddce0c9 commit 24615ba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@
<div class="list-t">{{ 'platform.blades.module-detail.labels.optional-dependencies' | translate }}</div>
<div class="list-descr">
<div ng-repeat="dependency in blade.currentEntity.dependencies | filter:{ optional: true }">
<a class="__link" ng-click="openDependencyModule(dependency)">{{dependency.id}}</a> {{formDependencyVersion(dependency)}}
<div ng-if="isModulePresent(dependency.id)"><a class="__link" ng-click="openDependencyModule(dependency)">{{dependency.id}}</a> {{formDependencyVersion(dependency)}}</div>
<div ng-if="!isModulePresent(dependency.id)">{{ dependency.id }} {{formDependencyVersion(dependency)}}</div>
</div>
</div>
</li>
Expand Down

0 comments on commit 24615ba

Please sign in to comment.