Skip to content

Commit

Permalink
OP-668 Add payer error
Browse files Browse the repository at this point in the history
  • Loading branch information
edarchis committed May 4, 2022
1 parent f0901f3 commit 2dbea1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/AddFundingDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const AddFundingDialog = (props) => {
pubRef="product.ProductPicker"
value={form.product}
required
locationId={decodeId(payer.location.id)}
locationId={payer && payer.location ? decodeId(payer.location.id) : null }
onChange={(product) => setForm({ ...form, product })}
/>
</Grid>
Expand Down
4 changes: 4 additions & 0 deletions src/components/FundingPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ const FundingPanel = (props) => {
refetch();
};

// We can't show the add funding panel until the payer is created
if (edited && !edited.id) {
return <></>;
}
return (
<>
<Grid item xs={12}>
Expand Down

0 comments on commit 2dbea1d

Please sign in to comment.