pet-rescue icon indicating copy to clipboard operation
pet-rescue copied to clipboard

Foster index and creation form

Open mononoken opened this issue 1 year ago • 4 comments

This work likely needs design tweaks but the implementation can certainly be built right now.

Description

We want to have an index page for showing a list of all created fosters for the active organization. This page will be meant for staff use. The page should be able to also create new fosters by inputting into a form. In the future, it should be filterable/sortable.

Data Vocab (refer if you have any confusion)

  • Foster - caretaking for a pet for a duration of time (contrasted with adoption where there is no end time)
  • Fosterer - person who fosters
  • Adopter - person who adopts a pet (note: in the app, it is possible for a user to be both an adopter and a fosterer)
  • Match - adoption or foster

For Design

Design work completed: https://www.figma.com/file/0jVgYASUJy0KiX3BVc3dFM/Tasks?type=design&node-id=645-2&mode=dev

The Pet Task index page can be used as a reference (Task V2 Completed in Figma): image

  • We do not need the checkboxes, descriptions, or "Show Completed" toggle
  • We do need: (for each entry)
    • Fosterer name
    • Pet name
    • Start date of foster
    • End date of foster
    • Edit button
    • Delete button
    • Thought: Maybe the delete button should only appear when activating the Edit button to conserve space for mobile
  • We also need a button at the top, like tasks, to open a form for making new fosters
  • We want the mobile view to work as well.

Acceptance Criteria

  • [x] Show all Match records with match_type of :foster
    • [x] Matches will be grouped by Pet in the index per design direction
    • [x] Match records should be scoped for the organization (this most likely is already handled by ActsAsTenant)
    • [x] Default sort? Created at recency? Maybe touch Pet via match updates and sort by last updated pets.
  • [x] Index should include the following info:
    • [x] Fosterer name
    • [x] Pet name
    • [x] Start date
    • [x] End date
    • [x] Link for editing individual fosters (should utilize Turbo)
    • [x] Button for destroying the individual foster ~~- [ ] Utilize Turbo to instantiate new Foster form~~ (We decided in meeting that this won't be necessary for now)

mononoken avatar Apr 17 '24 20:04 mononoken

@mononoken the blocking task is now merged. Do you think we can make this ready for assigning to a GitHubber (if they are interested) without the design work? I made this loom to add some context: https://www.loom.com/share/6d111a2bb3964892ac322516b2c28695?sid=b90362fd-58fd-4a72-bdef-ba3205f7f1b2

I left a bolded note in the acceptance criteria, above, too.

Let me know if you think this is sufficient to make 'Ready' and if not, what else me might want to add.

kasugaijin avatar Apr 18 '24 17:04 kasugaijin

Perfect @kasugaijin ! Thanks for adding the loom. I will mark this ready. If we want additional design for this, we can make those design changes later like we discussed in the last meeting.

mononoken avatar Apr 19 '24 00:04 mononoken

@mononoken Are we ready to add design to this issue and remove the Needs Design label? 🌜

kasugaijin avatar May 06 '24 21:05 kasugaijin

@mononoken Are we ready to add design to this issue and remove the Needs Design label? 🌜

@kasugaijin I think so! Kirin is out of town this week, but the figma file looks ready. I will add a link to the file to the issue now.

mononoken avatar May 07 '24 23:05 mononoken