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

LF-4384(b): Refactor useAnimalOrBatchRemoval #3549

Open
wants to merge 1 commit into
base: LF-4384/End-to-End_Animal_Details
Choose a base branch
from

Conversation

SayakaOno
Copy link
Collaborator

Description

Currently the useAnimalOrBatchRemoval hook accepts inventory IDs and parses them. This parsing is redundant for the SingleAnimalView, which already has a parsed ID. This PR makes the hook more generic by:

  • Updating useAnimalOrBatchRemoval to accept:
    • ids with kind (animal or batch key) instead of inventory IDs
    • onSuccess instead of setSelectedInventoryIds
  • Move the inventory ID parsing and setSelectedInventoryIds logic to the Inventory component.

(This PR addresses the comment on #3534)

@SayakaOno SayakaOno added the enhancement New feature or request label Nov 26, 2024
@SayakaOno SayakaOno self-assigned this Nov 26, 2024
@SayakaOno SayakaOno requested review from a team as code owners November 26, 2024 01:37
@SayakaOno SayakaOno requested review from antsgar, kathyavini and Duncan-Brain and removed request for a team and kathyavini November 26, 2024 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant