Skip to content
Merged
Show file tree
Hide file tree
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
Next Next commit
fix: TT-295 Undefined this.newData.update_last_entry_if_overlap = true;
  • Loading branch information
Edgar Guaman committed Aug 3, 2021
commit 9c42be6dbe448b8db4032058e8d0bc8771fb58bb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('FeatureToggleGeneralService', () => {
params.map((param) => {
it(`isActivated should return a boolean ${param.bool}`, () => {
const toggleName = FeatureToggle.SWITCH_GROUP;
featureManagerService.isToggleEnabledForUser = (toggleNameV) => of(param.bool);
featureManagerService.isToggleEnabledForUser = () => of(param.bool);

featureToggleGeneralService.isActivated(toggleName).subscribe((enabled) => {
expect(enabled).toBe(param.bool);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ describe('EntryFieldsComponent', () => {
component.activeEntry = entry;
component.setDataToUpdate(entry);
const updatedTime = moment(mockDate).format('HH:mm');

// this.newData.update_last_entry_if_overlap = true;
component.entryForm.patchValue({ start_hour: updatedTime });
spyOn(store, 'dispatch');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ export class EntryFieldsComponent implements OnInit, OnDestroy {
return;
}
this.entryForm.patchValue({ start_date: newHourEntered });
this.store.dispatch(new entryActions.UpdateCurrentOrLastEntry({ ...this.newData, ...this.entryForm.value }));
this.newData.update_last_entry_if_overlap = true;
this.store.dispatch(new entryActions.UpdateEntryRunning({ ...this.newData, ...this.entryForm.value }));
this.showTimeInbuttons = false;
}

Expand Down