-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #494 from udsm-dhis2-lab/feature/clinic-notes
Merge improvement to adding time to fill form also UI Improvement on clinic forms
- Loading branch information
Showing
8 changed files
with
111 additions
and
18 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
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
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
16 changes: 16 additions & 0 deletions
16
ui/src/app/shared/resources/global-setting/services/globalsetting.service.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,16 @@ | ||
/* tslint:disable:no-unused-variable */ | ||
|
||
import { TestBed, inject, waitForAsync } from '@angular/core/testing'; | ||
import { GlobalSettingService } from './globalsetting.service'; | ||
|
||
describe('Service: Observation', () => { | ||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
providers: [GlobalSettingService] | ||
}); | ||
}); | ||
|
||
it('should ...', inject([GlobalSettingService], (service: GlobalSettingService) => { | ||
expect(service).toBeTruthy(); | ||
})); | ||
}); |
36 changes: 36 additions & 0 deletions
36
ui/src/app/shared/resources/global-setting/services/globalsetting.service.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,36 @@ | ||
import { Injectable } from "@angular/core"; | ||
import { from, Observable, of, zip } from "rxjs"; | ||
import { catchError, map, switchMap, tap } from "rxjs/operators"; | ||
import { OpenmrsHttpClientService } from "src/app/shared/modules/openmrs-http-client/services/openmrs-http-client.service"; | ||
import { Api, ObsCreate, ObsGetFull, ObsUpdate } from "../../openmrs"; | ||
|
||
import { omit } from "lodash"; | ||
import { HttpClient } from "@angular/common/http"; | ||
import { Observation } from "../../observation/models/observation.model"; | ||
|
||
@Injectable({ | ||
providedIn: "root", | ||
}) | ||
export class GlobalSettingService { | ||
constructor( | ||
private api: Api, | ||
private httpClient: OpenmrsHttpClientService, | ||
private http: HttpClient | ||
) {} | ||
|
||
|
||
getSpecificGlobalProperties(uuid: string): Observable<any> { | ||
const endpoint = `systemsetting/${uuid}`; | ||
return this.httpClient.get(endpoint).pipe( | ||
map((response: any) => { | ||
return response; | ||
}), | ||
catchError((error) => { | ||
console.error("Failed to fetch global property:", error); | ||
return of(null); | ||
}) | ||
); | ||
} | ||
|
||
|
||
} |
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 @@ | ||
export { GlobalSettingService } from './/globalsetting.service'; |