fix group

This commit is contained in:
unknown
2025-04-14 18:37:31 +07:00
parent 0f61f3ac35
commit 59a8f364d7
2 changed files with 6 additions and 2 deletions

View File

@ -89,6 +89,10 @@ const ManageGroups = () => {
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
if (!formData.groupName) return toast.warning(`Group name can not be empty!`)
if (!formData.status) return toast.warning(`Status can not be empty!`)
if (!formData.description) return toast.warning(`Description can not be empty!`)
setIsDialogOpen(false);
setDialogOpen(true);
};
@ -198,7 +202,7 @@ const ManageGroups = () => {
<Dialog open={isDialogOpen} onClose={closeDialog}>
<DialogContent className="w-full">
<div className="flex justify-between">
<DialogTitle>Create New Group</DialogTitle>
<DialogTitle>{dialogType==='create'?"Create New Group":"Update Group"}</DialogTitle>
<Box display="flex" justifyContent="flex-end">
<Button
variant="outlined"