working loading spinner component.

This commit is contained in:
Jason Kulatunga 2023-01-05 08:38:46 -08:00
parent 4294880d79
commit 3d1eac1682
6 changed files with 92 additions and 43 deletions

View File

@ -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>

View File

@ -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();
});
});

View File

@ -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 {
}
}

View File

@ -42,6 +42,7 @@ import {FilterPipe} from '../pipes/filter.pipe';
import { ReportMedicalHistoryConditionComponent } from './report-medical-history-condition/report-medical-history-condition.component';
import { ReportLabsObservationComponent } from './report-labs-observation/report-labs-observation.component';
import { ChartsModule } from 'ng2-charts';
import { LoadingSpinnerComponent } from './loading-spinner/loading-spinner.component';
@NgModule({
imports: [
@ -90,45 +91,47 @@ import { ChartsModule } from 'ng2-charts';
FilterPipe,
ReportMedicalHistoryConditionComponent,
ReportLabsObservationComponent,
LoadingSpinnerComponent,
],
exports: [
ComponentsSidebarComponent,
ListAllergyIntoleranceComponent,
ListAdverseEventComponent,
ListCarePlanComponent,
ListCommunicationComponent,
ListConditionComponent,
ListEncounterComponent,
ListAppointmentComponent,
ListGenericResourceComponent,
ListImmunizationComponent,
ListMedicationAdministrationComponent,
ListMedicationComponent,
ListMedicationDispenseComponent,
ListMedicationRequestComponent,
ListNutritionOrderComponent,
ListObservationComponent,
ListPatientComponent,
ListProcedureComponent,
ListDeviceRequestComponent,
UtilitiesSidebarComponent,
ListCoverageComponent,
ListServiceRequestComponent,
ListDocumentReferenceComponent,
ListDeviceComponent,
ListDiagnosticReportComponent,
ListGoalComponent,
ResourceListComponent,
ResourceListOutletDirective,
ToastComponent,
ReportHeaderComponent,
ReportMedicalHistoryEditorComponent,
FhirPathPipe,
FilterPipe,
ReportMedicalHistoryConditionComponent,
ReportLabsObservationComponent
exports: [
ComponentsSidebarComponent,
ListAllergyIntoleranceComponent,
ListAdverseEventComponent,
ListCarePlanComponent,
ListCommunicationComponent,
ListConditionComponent,
ListEncounterComponent,
ListAppointmentComponent,
ListGenericResourceComponent,
ListImmunizationComponent,
ListMedicationAdministrationComponent,
ListMedicationComponent,
ListMedicationDispenseComponent,
ListMedicationRequestComponent,
ListNutritionOrderComponent,
ListObservationComponent,
ListPatientComponent,
ListProcedureComponent,
ListDeviceRequestComponent,
UtilitiesSidebarComponent,
ListCoverageComponent,
ListServiceRequestComponent,
ListDocumentReferenceComponent,
ListDeviceComponent,
ListDiagnosticReportComponent,
ListGoalComponent,
ResourceListComponent,
ResourceListOutletDirective,
ToastComponent,
ReportHeaderComponent,
ReportMedicalHistoryEditorComponent,
FhirPathPipe,
FilterPipe,
ReportMedicalHistoryConditionComponent,
ReportLabsObservationComponent,
LoadingSpinnerComponent
]
]
})
export class SharedModule { }

View File

@ -136,12 +136,7 @@
<ng-template #isLoadingTemplate>
<div class="row">
<div class="col-12">
<div class="text-center">
<p class="pb-3">Please wait, loading sources...</p>
<div class="spinner-border" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
<app-loading-spinner [loadingTitle]="'Please wait, loading sources...'"></app-loading-spinner>
</div>
</div>
</ng-template>