Skip to content
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

Feat: Reformat Organization Details Page & Locale Update - 1962 #2120

Merged
merged 3 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions frontend/src/assets/locales/en/organization.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
"phoneNbrLabel": "Phone number",
"supplierTypLabel": "Supplier type",
"regTrnLabel": "Registered for transfers",
"registeredTransferYes": "Yes — A registered organization is able to transfer compliance units.",
"registeredTransferNo": "No — An organization must be registered to transfer compliance units.",
"earlyIssuanceLabel": "Enable early issuance reporting",
"earlyIssuanceIndicator": "Early issuance reporting enabled",
"edrmsLabel": "Organization profile, EDRMS record # (optional)",
"serviceAddrLabel": "Address for service (postal address)",
"streetAddrLabel": "Street address / PO box",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,15 @@ export const ViewOrganization = () => {
<strong>{t('org:regTrnLabel')}:</strong>{' '}
{orgData?.orgStatus.status ===
ORGANIZATION_STATUSES.REGISTERED
? 'Yes — A registered organization is able to transfer compliance units.'
: 'No — An organization must be registered to transfer compliance units.'}
? t('org:registeredTransferYes')
: t('org:registeredTransferNo')}
</BCTypography>

<BCTypography variant="body4">
<strong>{t('org:earlyIssuanceIndicator')}:</strong>{' '}
{orgData?.hasEarlyIssuance
? t('common:yes')
: t('common:no')}
</BCTypography>
</BCBox>
</BCBox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ vi.mock('@/hooks/useOrganization', () => ({
operatingName: 'Test Operating Name',
email: 'test@test.com',
phone: '1234567890',
hasEarlyIssuance: false,
orgAddress: {
streetAddress: '123 Test St',
addressOther: 'Unit 101',
Expand Down Expand Up @@ -138,4 +139,17 @@ describe('ViewOrganization Component Tests', () => {
expect(screen.getByText(/1,000/i)).toBeInTheDocument()
expect(screen.getByText(/500/i)).toBeInTheDocument()
})

it('renders the "Registered for transfers" text for a Registered org', () => {
expect(
screen.getByText(
/A registered organization is able to transfer compliance units/i
)
).toBeInTheDocument()
})

it('shows "No" for early issuance if hasEarlyIssuance is not provided', () => {
expect(screen.getByText(/Early issuance reporting/i)).toBeInTheDocument()
expect(screen.getByText(/No/i)).toBeInTheDocument()
})
})