Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { FeatureToggleGeneralService } from './../../../shared/feature-toggles/feature-toggle-general/feature-toggle-general.service';
import { Subscription, of, Observable } from 'rxjs';
import { LoadActiveEntry, EntryActionTypes, UpdateEntry } from './../../store/entry.actions';
import { ActivityManagementActionTypes } from './../../../activities-management/store/activity-management.actions';
Expand All @@ -16,7 +17,6 @@ import { NgxMaterialTimepickerModule } from 'ngx-material-timepicker';
import * as moment from 'moment';
import { DATE_FORMAT_YEAR } from 'src/environments/environment';
import { FeatureManagerService } from './../../../shared/feature-toggles/feature-toggle-manager.service';
import { FeatureToggleGeneralService } from './../../../shared/feature-toggles/feature-toggle-general/feature-toggle-general.service';
import { FeatureToggle } from 'src/environments/enum';


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class EntryFieldsComponent implements OnInit, OnDestroy {
private actionsSubject$: ActionsSubject,
private toastrService: ToastrService,
private featureToggleGeneralService: FeatureToggleGeneralService,
private azureAdB2CService: AzureAdB2CService
) {
this.entryForm = this.formBuilder.group({
description: '',
Expand Down Expand Up @@ -159,6 +160,7 @@ export class EntryFieldsComponent implements OnInit, OnDestroy {
this.entryForm.patchValue({ start_date: newHourEntered });
if (this.isFeatureToggleActive) {
this.newData.update_last_entry_if_overlap = true;
this.newData.owner_id = this.azureAdB2CService.getUserId();
this.store.dispatch(new entryActions.UpdateEntryRunning({ ...this.newData, ...this.entryForm.value }));
} else {
this.store.dispatch(new entryActions.UpdateCurrentOrLastEntry({ ...this.newData, ...this.entryForm.value }));
Expand Down