working loading spinner component.
This commit is contained in:
parent
4294880d79
commit
3d1eac1682
|
@ -0,0 +1,11 @@
|
||||||
|
<div class="card bg-gray-100">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="text-center tx-indigo">
|
||||||
|
<p class="pb-3">{{loadingTitle}}</p>
|
||||||
|
<div class="spinner-border" role="status">
|
||||||
|
<span class="sr-only">Loading...</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!-- card-body -->
|
||||||
|
</div>
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { LoadingSpinnerComponent } from './loading-spinner.component';
|
||||||
|
|
||||||
|
describe('LoadingSpinnerComponent', () => {
|
||||||
|
let component: LoadingSpinnerComponent;
|
||||||
|
let fixture: ComponentFixture<LoadingSpinnerComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
declarations: [ LoadingSpinnerComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(LoadingSpinnerComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,17 @@
|
||||||
|
import {Component, Input, OnInit} from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-loading-spinner',
|
||||||
|
templateUrl: './loading-spinner.component.html',
|
||||||
|
styleUrls: ['./loading-spinner.component.scss']
|
||||||
|
})
|
||||||
|
export class LoadingSpinnerComponent implements OnInit {
|
||||||
|
@Input() loadingTitle: string = "Please wait, loading..."
|
||||||
|
@Input() loadingSubTitle: string = ""
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -42,6 +42,7 @@ import {FilterPipe} from '../pipes/filter.pipe';
|
||||||
import { ReportMedicalHistoryConditionComponent } from './report-medical-history-condition/report-medical-history-condition.component';
|
import { ReportMedicalHistoryConditionComponent } from './report-medical-history-condition/report-medical-history-condition.component';
|
||||||
import { ReportLabsObservationComponent } from './report-labs-observation/report-labs-observation.component';
|
import { ReportLabsObservationComponent } from './report-labs-observation/report-labs-observation.component';
|
||||||
import { ChartsModule } from 'ng2-charts';
|
import { ChartsModule } from 'ng2-charts';
|
||||||
|
import { LoadingSpinnerComponent } from './loading-spinner/loading-spinner.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -90,6 +91,7 @@ import { ChartsModule } from 'ng2-charts';
|
||||||
FilterPipe,
|
FilterPipe,
|
||||||
ReportMedicalHistoryConditionComponent,
|
ReportMedicalHistoryConditionComponent,
|
||||||
ReportLabsObservationComponent,
|
ReportLabsObservationComponent,
|
||||||
|
LoadingSpinnerComponent,
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
ComponentsSidebarComponent,
|
ComponentsSidebarComponent,
|
||||||
|
@ -126,7 +128,8 @@ import { ChartsModule } from 'ng2-charts';
|
||||||
FhirPathPipe,
|
FhirPathPipe,
|
||||||
FilterPipe,
|
FilterPipe,
|
||||||
ReportMedicalHistoryConditionComponent,
|
ReportMedicalHistoryConditionComponent,
|
||||||
ReportLabsObservationComponent
|
ReportLabsObservationComponent,
|
||||||
|
LoadingSpinnerComponent
|
||||||
|
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -136,12 +136,7 @@
|
||||||
<ng-template #isLoadingTemplate>
|
<ng-template #isLoadingTemplate>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="text-center">
|
<app-loading-spinner [loadingTitle]="'Please wait, loading sources...'"></app-loading-spinner>
|
||||||
<p class="pb-3">Please wait, loading sources...</p>
|
|
||||||
<div class="spinner-border" role="status">
|
|
||||||
<span class="sr-only">Loading...</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
Loading…
Reference in New Issue