File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
src/app/modules/time-clock/services Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -40,15 +40,15 @@ describe('EntryService', () => {
4040 } ) ;
4141
4242 it ( 'loads an activeEntry with /running' , ( ) => {
43- service . showOptionInDevelopment = true ;
43+ service . urlInProduction = true ;
4444 service . loadActiveEntry ( ) . subscribe ( ) ;
4545
4646 const loadEntryRequest = httpMock . expectOne ( `${ service . baseUrl } /running` ) ;
4747 expect ( loadEntryRequest . request . method ) . toBe ( 'GET' ) ;
4848 } ) ;
4949
5050 it ( 'loads an activeEntry with /active/{userId}' , ( ) => {
51- service . showOptionInDevelopment = false ;
51+ service . urlInProduction = false ;
5252 service . loadActiveEntry ( ) . subscribe ( ) ;
5353
5454 const loadEntryRequest = httpMock . expectOne ( `${ service . baseUrl } /active/2` ) ;
Original file line number Diff line number Diff line change 11import { TimeEntriesSummary } from '../models/time.entry.summary' ;
2- import { Injectable , Input } from '@angular/core' ;
2+ import { Injectable } from '@angular/core' ;
33import { HttpClient } from '@angular/common/http' ;
44
55import { Observable } from 'rxjs' ;
@@ -19,11 +19,12 @@ 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 ;
22+ urlInProduction = environment . production ;
2323
2424 loadActiveEntry ( ) : Observable < any > {
2525 let path = '' ;
26- if ( this . showOptionInDevelopment ) {
26+
27+ if ( this . urlInProduction ) {
2728 path = `${ this . baseUrl } /running` ;
2829 } else {
2930 path = `${ this . baseUrl } /active/2` ;
You can’t perform that action at this time.
0 commit comments