Merge pull request 'fix: Add validation to prevent target exceeding pending tasks in assign task functionality' (#41) from Vaibhav_Bug-#450 into main

Reviewed-on: #41
This commit is contained in:
vaibhav.surve 2025-06-03 11:45:19 +00:00
commit eabe48e572

View File

@ -381,6 +381,16 @@ class _AssignTaskBottomSheetState extends State<AssignTaskBottomSheet> {
return;
}
if (target > widget.pendingTask) {
showAppSnackbar(
title: "Target Too High",
message:
"Target cannot be greater than pending task (${widget.pendingTask})",
type: SnackbarType.error,
);
return;
}
final description = descriptionController.text.trim();
if (description.isEmpty) {
showAppSnackbar(