generated from PackagrIO/goweb-template
-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
108 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
frontend/src/app/widgets/image-list-group-widget/image-list-group-widget.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<ng-container [ngTemplateOutlet]="loading ? showLoading : (!loading && isEmpty) ? showEmpty : showChart"></ng-container> | ||
|
||
<ng-template #showLoading> | ||
<loading-widget></loading-widget> | ||
</ng-template> | ||
|
||
<ng-template #showEmpty> | ||
<empty-widget></empty-widget> | ||
</ng-template> | ||
|
||
<ng-template #showChart> | ||
<ul class="list-group"> | ||
<li class="list-group-item d-flex align-items-center"> | ||
<img src="../img/faces/face6.jpg" class="wd-30 rounded-circle mg-r-15" alt=""> | ||
<div> | ||
<h6 class="tx-13 tx-inverse tx-semibold mg-b-0">Dr. Ester Howard</h6> | ||
<span class="d-block tx-11 text-muted">Neurologist, UCSF</span> | ||
</div> | ||
</li> | ||
<li class="list-group-item d-flex align-items-center"> | ||
<img src="../img/faces/face7.jpg" class="wd-30 rounded-circle mg-r-15" alt=""> | ||
<div> | ||
<h6 class="tx-13 tx-inverse tx-semibold mg-b-0">Dr. Joel Mendez</h6> | ||
<span class="d-block tx-11 text-muted">General Medicine, Kaiser</span> | ||
</div> | ||
</li> | ||
<li class="list-group-item d-flex align-items-center"> | ||
<img src="../img/faces/face8.jpg" class="wd-30 rounded-circle mg-r-15" alt=""> | ||
<div> | ||
<h6 class="tx-13 tx-inverse tx-semibold mg-b-0">Dr. Marianne Audrey</h6> | ||
<span class="d-block tx-11 text-muted">orthopedic surgeon, UCSF</span> | ||
</div> | ||
</li> | ||
</ul> | ||
</ng-template><!-- card --> |
Empty file.
23 changes: 23 additions & 0 deletions
23
frontend/src/app/widgets/image-list-group-widget/image-list-group-widget.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ImageListGroupWidgetComponent } from './image-list-group-widget.component'; | ||
|
||
describe('ImageListGroupWidgetComponent', () => { | ||
let component: ImageListGroupWidgetComponent; | ||
let fixture: ComponentFixture<ImageListGroupWidgetComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ ImageListGroupWidgetComponent ] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(ImageListGroupWidgetComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
35 changes: 35 additions & 0 deletions
35
frontend/src/app/widgets/image-list-group-widget/image-list-group-widget.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import {NgChartsModule} from 'ng2-charts'; | ||
import {CommonModule} from '@angular/common'; | ||
import {LoadingWidgetComponent} from '../loading-widget/loading-widget.component'; | ||
import {EmptyWidgetComponent} from '../empty-widget/empty-widget.component'; | ||
import {DashboardWidgetComponent} from '../dashboard-widget/dashboard-widget.component'; | ||
import {DashboardWidgetConfig} from '../../models/widget/dashboard-widget-config'; | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [NgChartsModule, CommonModule, LoadingWidgetComponent, EmptyWidgetComponent], | ||
selector: 'image-list-group-widget', | ||
templateUrl: './image-list-group-widget.component.html', | ||
styleUrls: ['./image-list-group-widget.component.scss'] | ||
}) | ||
export class ImageListGroupWidgetComponent extends DashboardWidgetComponent implements OnInit { | ||
|
||
ngOnInit(): void { | ||
//manually define the widget config, rather than pull from the configuration file | ||
this.widgetConfig = { | ||
id: 'image-list-group-widget', | ||
item_type: 'image-list-group-widget', | ||
description_text: 'Displays a summary of patient records', | ||
width: 4, | ||
height: 5, | ||
title_text: 'Medical Records', | ||
queries: [] | ||
|
||
} as DashboardWidgetConfig | ||
super.ngOnInit(); | ||
this.loading = false | ||
this.isEmpty = false | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters