Skip to content

Commit a6a76f3

Browse files
committed
fix: TTL-887 Activity is required toastr
1 parent b8f23e6 commit a6a76f3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ export class EntryFieldsComponent implements OnInit, OnDestroy {
142142
customerName = dataToUse.customer_name;
143143
projectName = dataToUse.project_name;
144144
});
145+
if (!this.entryForm.valid) {
146+
this.toastrService.error('Activity is required');
147+
}
145148
return this.requiredFieldsForInternalAppExist(customerName, projectName) && this.entryForm.valid;
146149
}
147150

src/app/modules/time-clock/pages/time-clock.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ export class TimeClockComponent implements OnInit, OnDestroy {
7777
this.stopEntry();
7878
} else {
7979
this.entryFieldsComponent.entryForm.get('activity_id').markAsTouched();
80-
this.toastrService.error('Activity is required');
8180
}
8281
}
8382

0 commit comments

Comments
 (0)