Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Apr 10, 2023. It is now read-only.
This repository was archived by the owner on Apr 10, 2023. It is now read-only.

Create add book modal #883

@knjk04

Description

@knjk04

Describe the solution you'd like

image

When a user clicks on the add book button on the 'my books' page, we should show the modal above.

  • Pressing cancel or the 'X' button should close the modal

  • Clicking reset should reset all fields to their default state

  • For now, we will assume there is only allowed to be one author

  • The pages field should only take integers (1 or greater)

  • For the status field, exactly one option should be chosen (not multiple). See below for what it should look like when an option is chosen

  • We should add validation to ensure that the book title and author's name field are not empty when the user clicks on the 'Add book' button

  • We should get the list of shelves from the /api/books/genres (GET) endpoint. A user can select only one genre from this list

image

  • We should get the list of shelves from the /api/shelf (GET) endpoint. A user can select multiple shelves from this list

image

  • When the user clicks on the add book button, we should call the /api/book (POST) endpoint

Additional context

  • Be sure to read the contributing guidelines first!
  • Discuss your implementation approach with us before we assign you to it
  • Provide us with an estimate on how long you think it will take you to complete
  • Branch from main and set main as the destination branch in your pull request

If you need help with anything, we'll be happy to help you over a GitHub Q&A discussion or our Slack workspace

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement of an existing feature requestfrontendHTML, CSS or TypeScript relatedgood first issueGood for newcomersreactImplementation is in React (JSX with TypeScript)wontfixThis will not be worked on

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions