-
Notifications
You must be signed in to change notification settings - Fork 0
fix(AHWR-321): use organisation, not farmer, name #256
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
Conversation
- stop allowing 404s from contact history (it now returns [] instead) - remove debug logging for auth, just in case we go to prod
6bbc134
to
1674040
Compare
app/api/contact-history.js
Outdated
} | ||
} | ||
|
||
const getContactFieldData = (contactHistoryData, field) => { | ||
const filteredData = contactHistoryData.filter(contact => contact?.data?.field === field) | ||
const filteredData = contactHistoryData.filter(contact => contact.data?.field === field) | ||
if (filteredData.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not your code I know, but could we swap this around so we have
if (!filteredData.length) return 'NA'
And then we can have the happy path underneath, no need for an else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go on then. Though I prefer positive assertions, so used if (filteredData.length === 0)
Remove lodash references (it's not a direct dependency)
|
* fix(AHWR-321): use organisation, not farmer, name - stop allowing 404s from contact history (it now returns [] instead) - remove debug logging for auth, just in case we go to prod
/view-claim/CLAIM_ID
Before:

After:

/agreement/AGREEMENT_ID/claims
Before:

After:
