Skip to content

Handle Unavailable Institutions#313

Open
codingLogan wants to merge 7 commits intomasterfrom
lr/CTT-70
Open

Handle Unavailable Institutions#313
codingLogan wants to merge 7 commits intomasterfrom
lr/CTT-70

Conversation

@codingLogan
Copy link
Copy Markdown
Collaborator

@codingLogan codingLogan commented Apr 23, 2026

https://mxcom.atlassian.net/browse/CTT-70

Changes

  • Institutions now have a status and client_status field available, if the API passes them to the widget.
  • Unavailable institutions should be hidden from the popular list
  • When searched for, Unavailable institutions should show in the list with a tag/chip
  • When selected, the widget should show a status page for the Unavailable institution
  • On load to an INS that is Unavailable, the new page should show
  • On load to a MBR that is part of an INS that is Unavailable, the new page should show

Tangent areas

  • Experimental "unavailableInstitutions" will soon be deprecated in favor of real statuses

Screenshots

image image

codingLogan and others added 3 commits April 23, 2026 15:56
…us to unavailable

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
@platypus801
Copy link
Copy Markdown

approved pending changes to the placement of the chip. will need to revisit chip and change styling once available in MXUI.

Comment thread src/components/__tests__/InstitutionTile-test.jsx Outdated
codingLogan and others added 2 commits April 24, 2026 13:45
action.payload.institution &&
(institutionIsBlockedForCostReasons(action.payload.institution) ||
action.payload.institutionStatus === InstitutionStatus.UNAVAILABLE)
action.payload.institutionStatus === InstitutionStatus.UNAVAILABLE ||
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's probably worth using the same pattern you used on line 550 with the includes here

status: InstitutionStatusField.UNAVAILABLE,
}
const unavailableInstitutions: { guid: string; name: string }[] = []
vi.mocked(institutionBlocks.institutionIsBlockedForCostReasons).mockReturnValue(false)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to make this fail in a real way than mock it

status: InstitutionStatusField.UNAVAILABLE,
}
const store = createMockStore([])
vi.mocked(institutionBlocks.institutionIsBlockedForCostReasons).mockReturnValue(false)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

const filteredPopularInstitutions = updatedPopularInstitutions.filter((popular) => {
const status = getInstitutionStatus(popular, unavailableInstitutions)
return (
status !== InstitutionStatus.UNAVAILABLE &&
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems worth making an abstraction based on how many times I'm seeing the status checked for both

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