mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-10668] - Fix [object Object] for License entitlements in Admin App's About page (#7862)
* [AAE-10668] Fixed [object object] issue for the entitlements field of the license section in the about page * Added string manipulation functionality * Removed lock file from commit * [AAE-10668] resolved changes requested * [AAE-10668] changes to ObjectUtils booleanPrettify method * [AAE-10668] Fixed import statements * [AAE-10668] fixed lint problems Co-authored-by: Diogo Bastos <Diogo.Bastos@apl-y6rr6vv7yk.home>
This commit is contained in:
@@ -25,6 +25,8 @@ import { BpmProductVersionModel } from '../models/product-version.model';
|
||||
import { AuthenticationService } from '../services/authentication.service';
|
||||
import { DiscoveryApiService } from '../services/discovery-api.service';
|
||||
import { LicenseData, PackageInfo, StatusData } from './interfaces';
|
||||
import { ObjectUtils } from '../utils/object-utils';
|
||||
import { StringUtils } from '../utils/string-utils';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-about',
|
||||
@@ -101,10 +103,19 @@ export class AboutComponent implements OnInit {
|
||||
}));
|
||||
|
||||
if (repository.license) {
|
||||
this.licenseEntries = Object.keys(repository.license).map((key) => ({
|
||||
property: key,
|
||||
value: repository.license[key]
|
||||
}));
|
||||
this.licenseEntries = Object.keys(repository.license).map((key) => {
|
||||
if (ObjectUtils.isObject(repository.license[key])) {
|
||||
return {
|
||||
property: key,
|
||||
value: ObjectUtils.booleanPrettify(repository.license[key], StringUtils.prettifyBooleanEnabled)
|
||||
};
|
||||
};
|
||||
|
||||
return {
|
||||
property: key,
|
||||
value: repository.license[key]
|
||||
};
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user