Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a form for adding new Donated item #23

Closed
Anjali0407-git opened this issue Sep 24, 2024 · 0 comments · Fixed by #33
Closed

Create a form for adding new Donated item #23

Anjali0407-git opened this issue Sep 24, 2024 · 0 comments · Fixed by #33
Assignees
Labels
enhancement New feature or request sprint 2

Comments

@Anjali0407-git
Copy link
Collaborator

Anjali0407-git commented Sep 24, 2024

We need to develop a form that allows staff members to manually enter details about donated items into our system. The form has to include fields for item type, current status, donor email, program and date donated. It also has to allow for the upload of images related to the donated items. This form will serve as a foundation for more complex functionality in the future, such as linking corresponding donor and program details to the donated item.

Form Requirements:

  • Item Type: Dropdown menu with options: 'Bicycle' and 'Computer'.
  • Current Status: Set the default status of the item to "Received" and disable this field to prevent users from modifying it.
  • Donor Email: Dropdown menu with hardcoded emails for now. As multiple donors can have same names, it's better to use email ids or for uniquely identifying the donor.
  • Program: Dropdown menu with hardcoded options for hardcoded program names.
  • Image Upload: Allow users to upload between 1 to 5 images of the donated item.
  • Date Donated: Date picker to select the date of donation.

Tasks:

  1. Form Setup:
  • Implement the form layout with the specified fields.
  • Use appropriate UI elements such as dropdowns for selecting Item Type, Donor Email and Program; a text input for Current Status, a date picker for the Date Donated; and a file input for Image Upload.
  • Provide a tooltip near the Image Upload field informing users to upload 1 to 5 images.
  • Store the images as base64-encoded strings, rather than just storing the file names.
  1. Validation:
  • Mark all fields as mandatory and validate that no field is left empty.
  • Allow only image files for Image Upload field.
  • Do not allow for form submission until all validations are passed.
  1. Form Submission:
  • On submission, the form should simply console log the entered details for now.

In near future, we will replace the hardcoded Programs and Donor Email ids with the real data from database once we have those APIs setup in backend.

@Anjali0407-git Anjali0407-git added enhancement New feature or request sprint 2 labels Sep 24, 2024
@truffer11 truffer11 self-assigned this Sep 25, 2024
truffer11 added a commit that referenced this issue Sep 30, 2024
@truffer11 truffer11 linked a pull request Sep 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sprint 2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants