Fix sso ordering in apps listing

This commit is contained in:
Johannes Zellner
2024-12-19 12:22:36 +01:00
parent cbd32e7372
commit 876fd218af

View File

@@ -76,7 +76,12 @@ angular.module('Application').controller('AppsController', ['$scope', '$translat
$scope.orderByFilter = function (item) {
if ($scope.orderBy === 'app') return item.manifest.title || 'App Link';
if ($scope.orderBy === 'status') return item.installationState + '-' + item.runState;
if ($scope.orderBy === 'sso') return item.sso;
if ($scope.orderBy === 'sso') {
if (item.ssoAuth && item.manifest.addons.oidc) return 'oidc';
if (item.ssoAuth && (!item.manifest.addons.oidc && !item.manifest.addons.email)) return 'sso';
if (item.manifest.addons.email) return 'email';
return '';
}
return item.label || item.fqdn;
};