phlask / phlask-data-handlers

Phlask middleware to help make data ingestion and presentation more efficient!
5 stars 2 forks source link

Create TypeScript React TapForm component with auto-fill and toggle functionality #27

Closed ojimba01 closed 1 year ago

ojimba01 commented 1 year ago

Overview We need a TypeScript React component called TapForm that allows users to input and edit information about a tap. The component should have the ability to auto-fill itself when editing an existing tap and toggle off the dashboard view. Additionally, when the user clicks the TapForm toggle button in the navbar, it should create a TapForm with default data and toggle off the dashboard. The required fields for the form are address, access, and organization. A crucial part of this component is handling the hours format, which has a unique structure.

Task Your task is to develop the TapForm component with the following features:

Steps to complete this task

  1. Design and implement the TapForm component with the required fields (address, access, and organization) and unique hours format.
  2. Implement auto-fill functionality when editing an existing tap.
  3. Implement TapForm creation with default data when the TapForm toggle button in the navbar is clicked.
  4. Add sliders for editing the hours of operation for each day of the week.
  5. Test the TapForm component to ensure that all features work correctly and as expected.
  6. Submit the TapForm component along with any necessary documentation.

Here is an example of how the hours is formatted for future reference: "hours": [{"close": {"day": 0, "time": "2100"}, "open": {"day": 0, "time": "0700"}}, {"close": {"day": 1, "time": "2200"}, "open": {"day": 1, "time": "0700"}}, {"close": {"day": 2, "time": "2200"}, "open": {"day": 2, "time": "0700"}}, {"close": {"day": 3, "time": "2200"}, "open": {"day": 3, "time": "0700"}}, {"close": {"day": 4, "time": "2200"}, "open": {"day": 4, "time": "0700"}}, {"close": {"day": 5, "time": "2200"}, "open": {"day": 5, "time": "0700"}}, {"close": {"day": 6, "time": "2100"}, "open": {"day": 6, "time": "0700"}}],

Please provide an estimate of the time needed to complete this task and any other information you might need to get started. Keep in contact with me for further details about the data format and any other requirements. Your contribution to this project is highly appreciated!