Skip to content

Commit

Permalink
Merge pull request #42 from AplinkosMinisterija/validation-fixes
Browse files Browse the repository at this point in the history
validation fixes
  • Loading branch information
DovMa authored Jan 23, 2024
2 parents 9fa6d72 + 48518d4 commit 194bb60
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/forms/Registration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const RegistrationForm = ({
...callBacks,
});

const deleteFishStockingMutation = useMutation(() => api.deleteFishStocking(id!), {
const deleteFishStockingMutation = useMutation(() => api.cancelFishStocking(id!), {
...callBacks,
});

Expand Down Expand Up @@ -145,22 +145,22 @@ const RegistrationForm = ({
} = values;
const params = {
eventTime,
phone,
phone: phone || undefined,
geom,
assignedTo: assignedTo?.id,
stockingCustomer: stockingCustomer?.id,
location: location,
fishOrigin,
fishOrigin: fishOrigin.toUpperCase(),
fishOriginCompanyName,
...(fishOriginReservoir && {
fishOriginReservoir,
}),
batches: batches.map((batch) => {
return {
amount: batch.amount,
weight: batch.weight,
fishType: batch?.fishType?.id,
fishAge: batch?.fishAge?.id,
amount: batch.amount || undefined,
weight: batch.weight || undefined,
fishType: batch?.fishType?.id || undefined,
fishAge: batch?.fishAge?.id || undefined,
};
}),
};
Expand Down

0 comments on commit 194bb60

Please sign in to comment.