fix: Add validation to prevent target exceeding pending tasks in assign task functionality
This commit is contained in:
parent
1a5a084115
commit
ba42551b25
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user