Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
refactor: TT-217 Remove getOwnerId method
  • Loading branch information
VanessaIniguezG committed Apr 15, 2021
commit 86032d559d51cf301866b260cef8397eaf3eaa7a
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import { getTimeEntriesDataSource } from '../../store/entry.selectors';
import { DATE_FORMAT } from 'src/environments/environment';
import { Subscription, Observable } from 'rxjs';
import { FeatureManagerService } from './../../../shared/feature-toggles/feature-toggle-manager.service';
import { AzureAdB2CService } from 'src/app/modules/login/services/azure.ad.b2c.service';


type Merged = TechnologyState & ProjectState & ActivityState;

Expand Down Expand Up @@ -46,7 +44,6 @@ export class EntryFieldsComponent implements OnInit, OnDestroy {
private store: Store<Merged>,
private actionsSubject$: ActionsSubject,
private toastrService: ToastrService,
private azureService: AzureAdB2CService,
private featureManagerService: FeatureManagerService
) {
this.entryForm = this.formBuilder.group({
Expand Down Expand Up @@ -158,7 +155,6 @@ export class EntryFieldsComponent implements OnInit, OnDestroy {
}
this.entryForm.patchValue({ start_date: newHourEntered });
if (this.isFeatureToggleActive) {
this.newData.owner_id = this.getOwnerId();
this.newData.update_last_entry_if_overlap = true;
this.store.dispatch(new entryActions.UpdateEntryRunning({ ...this.newData, ...this.entryForm.value }));
} else {
Expand All @@ -167,10 +163,6 @@ export class EntryFieldsComponent implements OnInit, OnDestroy {
this.showTimeInbuttons = false;
}

getOwnerId(){
return this.azureService.getUserId();
}

private getLastEntry() {
const lastEntry$ = this.store.pipe(select(getTimeEntriesDataSource));
lastEntry$.subscribe((entry) => {
Expand Down