Skip to content

Commit

Permalink
LF-4545 Update logic for showing AnimalInventory
Browse files Browse the repository at this point in the history
Per yesterday's discussion about animals on custom tasks, it will not be task-type defined
  • Loading branch information
kathyavini committed Dec 3, 2024
1 parent f97050f commit d04904f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/webapp/src/components/Task/TaskReadOnly/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,6 @@ export default function PureTaskReadOnly({
setIsDeleting(true);
};

const ANIMAL_TASKS = ['MOVEMENT_TASK'];
const isAnimalTask = ANIMAL_TASKS.includes(taskType.task_translation_key);

return (
<Layout
buttonGroup={
Expand Down Expand Up @@ -355,7 +352,7 @@ export default function PureTaskReadOnly({
</div>
)}

{isAnimalTask && (
{task.animals || task.animal_batches ? (
<div style={{ marginBottom: '24px' }}>
<Semibold>{'Animals'}</Semibold>
<AnimalInventory
Expand All @@ -367,7 +364,7 @@ export default function PureTaskReadOnly({
showOnlySelected={true}
/>
</div>
)}
) : null}

{isAbandoned && (
<div>
Expand Down

0 comments on commit d04904f

Please sign in to comment.