ucsb-cs156-f23 / proj-happycows-f23-5pm-1

https://ucsb-cs156-f23.github.io/proj-happycows-f23-5pm-1/
0 stars 0 forks source link

Harold set default vals common fields frontend2 #36

Closed haroldmo closed 10 months ago

haroldmo commented 10 months ago

Overview

In this PR, the frontend was implemented for adminCreateCommonsPage.js. The default values were extracted from the backend in the previous PR, and was fetched in CommonsForm.js. The default values for the create commons page should now be extracted from the backend through an API call. If the API call returns nothing, then just resort to hard-coded default values. README.md is also changed with a link to a description of the environment variables

Before (capacity per person has no hard-coded value, but the rest of the fields are hard-coded)

image

After (capacity per person has a default value fetched from the api along with the other fields other than the two date fields)

image

Validation

  1. Download this branch.
  2. Run the project.
  3. Go to this page.
  4. Test this function.

Tests

Linked Issues

Closes #1

vinsonlinn commented 10 months ago

Just fix the PR description,

Otherwise, LGTM