Skip to content

Commit

Permalink
UIU-1975: Fix empty payments select
Browse files Browse the repository at this point in the history
  • Loading branch information
annamelnyk authored and zburke committed Nov 24, 2020
1 parent 7aafc62 commit 141dd11
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Accounts/ChargeFeeFine/ChargeFeeFine.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,6 @@ class ChargeFeeFine extends React.Component {
}
});
const feefines = _.get(resources, ['allfeefines', 'records'], []);
const payments = _.get(resources, ['payments', 'records'], []).filter(p => p.ownerId === this.state.ownerId);
const accounts = _.get(resources, ['accounts', 'records'], []);
const settings = _.get(resources, ['commentRequired', 'records', 0], {});
const barcode = _.get(resources, 'activeRecord.barcode');
Expand Down Expand Up @@ -464,6 +463,10 @@ class ChargeFeeFine extends React.Component {
const selectedFeeFine = feefines.find(f => f.id === feeFineTypeId);
const currentOwnerFeeFineTypes = feefines.filter(f => f.ownerId === resources.activeRecord.ownerId);
const selectedOwner = owners.find(o => o.id === initialOwnerId);
const payments = _.get(resources, ['payments', 'records'], []).filter(
p => p.ownerId === this.state.ownerId || resources.activeRecord.ownerId
);

const initialChargeValues = {
ownerId: resources.activeRecord.ownerId || '',
notify: !!(selectedFeeFine?.chargeNoticeId || selectedOwner?.defaultChargeNoticeId),
Expand Down

0 comments on commit 141dd11

Please sign in to comment.