Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kahummer committed Sep 12, 2024
1 parent ebca8ee commit 539b61a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,11 @@ test('renders correctly for edit user', async () => {

const nationalIdInput = document.querySelector('input#nationalId');
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
userEvent.type(nationalIdInput!, '1234567891011121' as any);
userEvent.type(nationalIdInput!, '1234567891011121');

const phoneNumberInput = document.querySelector('input#phoneNumber');
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
userEvent.type(phoneNumberInput!, '0700123456' as any);
userEvent.type(phoneNumberInput!, '0700123456');

const emailInput = document.querySelector('input#email');
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,13 @@ export const UserDetails = (props: UserDetailProps) => {
<Alert message={t('This user does not have any attributes')} type="info" />
) : (
<Descriptions size="small" column={{ xs: 1, sm: 1, md: 2, lg: 3, xl: 3, xxl: 4 }}>
{attributesArray.map(([key, value]) => {
if (!renderExtraFields.includes(key)) {
return (
<Descriptions.Item key={key} label={key}>
{JSON.stringify(value)}
</Descriptions.Item>
);
}
})}
{attributesArray
.filter(([key]) => !renderExtraFields.includes(key))
.map(([key, value]) => (
<Descriptions.Item key={key} label={key}>
{JSON.stringify(value)}
</Descriptions.Item>
))}
</Descriptions>
)}
</PageHeader>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { IPractitioner } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/IPracti
import type { TFunction } from '@opensrp/i18n';
import { IPractitionerRole } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/IPractitionerRole';
import { IComposition } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/IComposition';
import { Identifier } from '@smile-cdr/fhirts/dist/FHIR-R4/classes/identifier';

/**
* Utility function to get new user UUID from POST response location header
Expand Down

0 comments on commit 539b61a

Please sign in to comment.