Skip to content

erin-stephens/on-the-fly

Repository files navigation

On the Fly Netlify Status

Teachers and substitutes are often asked to cover classes without warning. This app serves as a spot for teachers to collect activities and make lesson plans to use when they are unable to prep.

View On the Fly

About the User

  • Ideal user for this application is a teacher or a substitute.
  • The user needs quick activties for their students because they forgot to make lesson plans.
  • The user has too many responsibilities and not enough time to make plans, so using the app with give them quick ideas.
  • The user may not be a certified teacher and needs activities for students to do.
  • The user needs activities to fill unstructured time.

Features

  • When an activity is added, an object is created and pushed to the array of activities.
  • Users can view, edit, and delete their created items, but can only view items created by other users.
  • Users can add activities to lesson plans to create groups of activities.
  • Users can search through all activities and all lessons.

Video Walkthrough of APP NAME

to come

Relevant Links

Code Snippet

export default function AddActivitytoLesson({ obj }) {
  const [show, setShow] = useState(false);

  const handleClose = () => setShow(false);
  const handleShow = () => setShow(true);

  const [formInput, setFormInput] = useState(initialState);
  const [activities, setActivities] = useState([]);
  const { user } = useAuth();

  useEffect(() => {
    getAllActivities().then(setActivities);
  }, [obj]);

  const handleChange = (e) => {
    const { name, value } = e.target;
    setFormInput((prevState) => ({
      ...prevState,
      [name]: value,
    }));
  };

  const handleSubmit = (e) => {
    e.preventDefault();
    if (formInput.activity_id) {
      const payload = { ...formInput, lessonPlan_id: obj.firebaseKey };
      createMergedObj(payload).then(({ name }) => {
        const patchPayload = { firebaseKey: name };
        updateMergedObject(patchPayload).then(handleClose);
      });
    } else {
      window.alert('Select an Activity');
    }
  };

Project Screenshots

login page home page offcanvas all activities activity details all lessons lesson details

Contributors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published