diff --git a/src/components/Project/Infrastructure/TaskModel.jsx b/src/components/Project/Infrastructure/TaskModel.jsx index 6e446c3b..346c3e78 100644 --- a/src/components/Project/Infrastructure/TaskModel.jsx +++ b/src/components/Project/Infrastructure/TaskModel.jsx @@ -114,7 +114,7 @@ const TaskModel = ({ const onSubmitForm = async (data) => { setIsSubmitting(true); - await onSubmit(data); + await onSubmit(data); reset({ buildingID: data.buildingID, floorId: data.floorId, @@ -125,7 +125,6 @@ const TaskModel = ({ }); setIsSubmitting(false); }; - const resetForm = () => { setFormData(defaultModel); @@ -189,7 +188,8 @@ const TaskModel = ({ {selectedBuilding.floors.map((floor) => ( ))} @@ -237,11 +237,15 @@ const TaskModel = ({ onChange={handleActivityChange} > - {activities.map((activity) => ( - - ))} + {activities?.slice() + .sort((a, b) => + a.activityName.localeCompare(b.activityName) + ) + ?.map((activity) => ( + + ))} {errors.activityID && (
{errors.activityID.message}