Skip to content

Commit

Permalink
Merged in bugfix/SHIBUI-1211 (pull request #290)
Browse files Browse the repository at this point in the history
Fixed issue with count of required actions, also fixes SHIBUI-1213

Approved-by: Ryan Mathis <rmathis@unicon.net>
  • Loading branch information
rmathis committed Feb 11, 2019
2 parents 1ab6e41 + 93f5e86 commit bc37b04
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 0 additions & 2 deletions ui/src/app/admin/admin.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ describe('Admin Root Component', () => {

it('should compile', () => {
fixture.detectChanges();

expect(fixture).toBeDefined();
expect(store.dispatch).toHaveBeenCalled();
});
});
4 changes: 1 addition & 3 deletions ui/src/app/admin/admin.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@ import { LoadAdminRequest } from './action/admin-collection.action';
export class AdminComponent {
constructor(
private store: Store<fromRoot.State>
) {
this.store.dispatch(new LoadAdminRequest());
}
) {}
}
2 changes: 0 additions & 2 deletions ui/src/app/admin/component/enable-metadata.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ export class EnableMetadataComponent implements OnInit {
private router: Router,
private modalService: NgbModal
) {
this.store.dispatch(new LoadMetadataRequest());

this.resolvers$ = this.store
.select(fromMetadata.getMetadataCollection)
.pipe(
Expand Down
5 changes: 5 additions & 0 deletions ui/src/app/dashboard/container/dashboard.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import * as fromCore from '../../core/reducer';
import { Observable } from 'rxjs';
import { LoadRoleRequest } from '../../core/action/configuration.action';
import { map } from 'rxjs/operators';
import { LoadAdminRequest } from '../../admin/action/admin-collection.action';
import { LoadMetadataRequest } from '../../admin/action/metadata-collection.action';

@Component({
selector: 'dashboard-page',
Expand All @@ -26,6 +28,9 @@ export class DashboardPageComponent {
this.actionsRequired$ = this.store.select(fromAdmin.getTotalActionsRequired);
this.hasActions$ = this.actionsRequired$.pipe(map(a => a > 0));
this.isAdmin$ = this.store.select(fromCore.isCurrentUserAdmin);

this.store.dispatch(new LoadRoleRequest());
this.store.dispatch(new LoadAdminRequest());
this.store.dispatch(new LoadMetadataRequest());
}
}

0 comments on commit bc37b04

Please sign in to comment.