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:
commit
eabe48e572
@ -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