Commit efa64a1346550878c6924241d010828f75d8bf20

Authored by Michel Felipe de Oliveira Ferreira - SUPDE/DESDR/DE502
Committed by Carlos Purificação
1 parent 556724ef

Fix helpers.ts type problems and added conditional to show profile custom-fields table

src/app/profile/data/profile-data.component.spec.ts
... ... @@ -52,11 +52,10 @@ describe('Profile data component', () => {
52 52 profileMock.additional_data = {
53 53 'Address': 'Street A, Number 102'
54 54 };
  55 +
55 56 buildComponent().then((fixture: ComponentFixture) => {
56 57 let profileData: ProfileDataComponent = fixture.debugElement.componentViewChildren[0].componentInstance;
57 58 profileData.profile = profileMock;
58   -
59   - expect(profileData.hasCustomFields()).toBeTruthy();
60 59 expect(fixture.debugElement.query('div.profile-custom-fields').length).toEqual(1);
61 60 });
62 61 });
... ...
src/app/profile/data/profile-data.html
... ... @@ -22,7 +22,7 @@
22 22 </div>
23 23  
24 24 <!-- Custom Fields -->
25   -<div class="main-box clearfix profile-custom-fields" ng-if="ctrl.hasCustomFields()">
  25 +<div class="main-box clearfix profile-custom-fields" ng-if="!equals({},ctrl.profile.additional_data)">
26 26 <header class="main-box-header clearfix">
27 27 <h2>{{"profile.others_info" | translate}}</h2>
28 28 </header>
... ...