Skip to content

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

Merged
merged 2 commits into from
Dec 23, 2024

Conversation

mattyod
Copy link
Collaborator

@mattyod mattyod commented Dec 20, 2024

  • 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:
Screenshot 2024-12-20 at 3 02 21 pm

After:
Screenshot 2024-12-20 at 3 02 07 pm

/agreement/AGREEMENT_ID/claims

Before:
Screenshot 2024-12-20 at 3 06 44 pm

After:
Screenshot 2024-12-20 at 3 02 07 pm

- stop allowing 404s from contact history (it now returns [] instead)
- remove debug logging for auth, just in case we go to prod
@mattyod mattyod force-pushed the show-organisation-name-AHWR-321 branch from 6bbc134 to 1674040 Compare December 20, 2024 15:08
}
}

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) {
Copy link
Collaborator

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?

Copy link
Collaborator Author

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)

bendef-24
bendef-24 previously approved these changes Dec 20, 2024
Remove lodash references (it's not a direct dependency)
@mattyod mattyod merged commit 6090ad5 into main Dec 23, 2024
12 checks passed
@mattyod mattyod deleted the show-organisation-name-AHWR-321 branch December 23, 2024 14:17
aaroncarroll82 added a commit that referenced this pull request Dec 24, 2024
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants