Skip to content

Commit a504190

Browse files
author
Edgar Guaman
committed
fix: TT-295 Undefined this.newData.update_last_entry_if_overlap = true;
1 parent 9b65a94 commit a504190

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/app/modules/shared/feature-toggles/feature-toggle-general/feature-toggle-general.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('FeatureToggleGeneralService', () => {
2727
params.map((param) => {
2828
it(`isActivated should return a boolean ${param.bool}`, () => {
2929
const toggleName = FeatureToggle.SWITCH_GROUP;
30-
featureManagerService.isToggleEnabledForUser = (toggleNameV) => of(param.bool);
30+
featureManagerService.isToggleEnabledForUser = () => of(param.bool);
3131

3232
featureToggleGeneralService.isActivated(toggleName).subscribe((enabled) => {
3333
expect(enabled).toBe(param.bool);

src/app/modules/time-clock/components/entry-fields/entry-fields.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ describe('EntryFieldsComponent', () => {
255255
component.activeEntry = entry;
256256
component.setDataToUpdate(entry);
257257
const updatedTime = moment(mockDate).format('HH:mm');
258-
258+
// this.newData.update_last_entry_if_overlap = true;
259259
component.entryForm.patchValue({ start_hour: updatedTime });
260260
spyOn(store, 'dispatch');
261261

src/app/modules/time-clock/components/entry-fields/entry-fields.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ export class EntryFieldsComponent implements OnInit, OnDestroy {
160160
return;
161161
}
162162
this.entryForm.patchValue({ start_date: newHourEntered });
163-
this.store.dispatch(new entryActions.UpdateCurrentOrLastEntry({ ...this.newData, ...this.entryForm.value }));
163+
this.newData.update_last_entry_if_overlap = true;
164+
this.store.dispatch(new entryActions.UpdateEntryRunning({ ...this.newData, ...this.entryForm.value }));
164165
this.showTimeInbuttons = false;
165166
}
166167

0 commit comments

Comments
 (0)