Skip to content

Commit 3235b1f

Browse files
authored
Revert "feat: TT-443 Use V2 for start timeEntry from timeClock (#777)"
This reverts commit ae78b6a.
1 parent d50eae0 commit 3235b1f

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

src/app/modules/time-clock/services/entry.service.spec.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,12 @@ describe('EntryService', () => {
4040
});
4141

4242
it('loads an activeEntry with /running', () => {
43-
service.showOptionInDevelopment = true;
4443
service.loadActiveEntry().subscribe();
4544

4645
const loadEntryRequest = httpMock.expectOne(`${service.baseUrl}/running`);
4746
expect(loadEntryRequest.request.method).toBe('GET');
4847
});
4948

50-
it('loads an activeEntry with /active/{userId}', () => {
51-
service.showOptionInDevelopment = false;
52-
service.loadActiveEntry().subscribe();
53-
54-
const loadEntryRequest = httpMock.expectOne(`${service.baseUrl}/active/2`);
55-
expect(loadEntryRequest.request.method).toBe('GET');
56-
});
57-
5849
it('loads summary with get /summary?time_offset=<time-offset>', () => {
5950
service.summary().subscribe();
6051
const timeOffset = new Date().getTimezoneOffset();

src/app/modules/time-clock/services/entry.service.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { TimeEntriesSummary } from '../models/time.entry.summary';
2-
import { Injectable, Input } from '@angular/core';
2+
import { Injectable } from '@angular/core';
33
import { HttpClient } from '@angular/common/http';
44

55
import { Observable } from 'rxjs';
@@ -19,16 +19,9 @@ export class EntryService {
1919

2020
static TIME_ENTRIES_DATE_TIME_FORMAT = 'yyyy-MM-ddTHH:mm:ssZZZZZ';
2121
baseUrl = `${environment.timeTrackerApiUrl}/time-entries`;
22-
@Input() showOptionInDevelopment: boolean;
2322

2423
loadActiveEntry(): Observable<any> {
25-
let path = '';
26-
if (this.showOptionInDevelopment){
27-
path = `${this.baseUrl}/running`;
28-
}else{
29-
path = `${this.baseUrl}/active/2`;
30-
}
31-
return this.http.get(path);
24+
return this.http.get(`${this.baseUrl}/running`);
3225
}
3326

3427
loadEntries(date): Observable<any> {

0 commit comments

Comments
 (0)