Skip to content
Prev Previous commit
fix: TTL-887 Activity is required toastr
  • Loading branch information
mmaquina committed Jun 5, 2023
commit a6a76f37387ab5b0fab95d7931b4f2bc34c45c34
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ export class EntryFieldsComponent implements OnInit, OnDestroy {
customerName = dataToUse.customer_name;
projectName = dataToUse.project_name;
});
if (!this.entryForm.valid) {
this.toastrService.error('Activity is required');
}
return this.requiredFieldsForInternalAppExist(customerName, projectName) && this.entryForm.valid;
}

Expand Down
1 change: 0 additions & 1 deletion src/app/modules/time-clock/pages/time-clock.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export class TimeClockComponent implements OnInit, OnDestroy {
this.stopEntry();
} else {
this.entryFieldsComponent.entryForm.get('activity_id').markAsTouched();
this.toastrService.error('Activity is required');
}
}

Expand Down