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

Binder View #7

Open
JonoSommers opened this issue Feb 25, 2025 · 0 comments
Open

Binder View #7

JonoSommers opened this issue Feb 25, 2025 · 0 comments

Comments

@JonoSommers
Copy link
Owner

JonoSommers commented Feb 25, 2025

Description:
The Binder View displays the name of the binder at the top along with a search bar and a home button. It shows all the cards that are saved to the binder. Additionally, the view includes buttons at the bottom to switch between the first and second binder.

Details:

  • The top of the page displays the binder name, a Search Bar, and a Home button.
  • All the cards saved to the binder are displayed in this view, shown as "posters" with their name and image.
  • At the bottom of the page, there are buttons to switch between the first and second binder.
  • If the user has more than one binder, the option to view the second binder is provided.
  • Users can go back to the Home page or search for cards using the search bar.

Examples:

  • Response Body for Binder View (Using a Joins Table - binderCards):
{
  "binder": {
    "id": 101,
    "name": "My Pokemon Binder"
  },
  "binder_cards": [
    {
      "binder_id": 101,
      "card_id": 1,
      "card": {
        "id": 1,
        "name": "Pikachu",
        "type": "Pokemon",
        "image": "https://example.com/images/pikachu.png"
      }
    },
    {
      "binder_id": 101,
      "card_id": 2,
      "card": {
        "id": 2,
        "name": "Charmander",
        "type": "Pokemon",
        "image": "https://example.com/images/charmander.png"
      }
    }
  ],
  "binders": [
    {"id": 101, "name": "Pokemon Binder"},
    {"id": 102, "name": "MTG Binder"}
  ]
}
  • Response for Switching Between Binders (Example for Second Binder):
{
  "binder": {
    "id": 102,
    "name": "My MTG Binder"
  },
  "binder_cards": [
    {
      "binder_id": 102,
      "card_id": 101,
      "card": {
        "id": 101,
        "name": "Black Lotus",
        "type": "MTG",
        "image": "https://example.com/images/black-lotus.png"
      }
    },
    {
      "binder_id": 102,
      "card_id": 102,
      "card": {
        "id": 102,
        "name": "Shivan Dragon",
        "type": "MTG",
        "image": "https://example.com/images/shivan-dragon.png"
      }
    }
  ],
  "binders": [
    {"id": 101, "name": "Pokemon Binder"},
    {"id": 102, "name": "MTG Binder"}
  ]
}

Acceptance Criteria:

  • The binder name is displayed correctly at the top of the Binder View.
  • The correct cards associated with the selected binder are displayed below the binder name (fetched through the binderCards join table).
  • Each card shows its correct information (e.g., name, type, image).
  • The user can switch between binders, and the cards associated with the selected binder are displayed correctly.
  • The list of binders (Pokemon and MTG binders) is available and selectable.
  • The Binder View loads without errors and displays the expected data for the selected binder.
Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

1 participant