@kenyaemr/esm-admin-app 5.4.4-pre.142 → 5.4.4-pre.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/confirm-modal/confirmation-operation.test.tsx +8 -19
- package/src/components/dashboard/dashboard.component.tsx +4 -1
- package/src/components/empty-state/empty-state-log.test.tsx +3 -4
- package/src/components/facility-setup/constant/index.ts +3 -0
- package/src/components/facility-setup/facility-info.component.tsx +176 -106
- package/src/components/facility-setup/facility-info.scss +39 -1
- package/src/components/facility-setup/facility-setup.component.tsx +2 -2
- package/src/components/facility-setup/type/index.ts +61 -0
- package/src/components/facility-setup/useFacilityRegistry.ts +29 -0
- package/src/components/global-property/dashboard/global-property-dashboard.component.tsx +23 -0
- package/src/components/global-property/dashboard/global-property-dashboard.scss +6 -0
- package/src/components/global-property/hooks/useGlobalProperty.ts +64 -0
- package/src/components/global-property/index.ts +14 -0
- package/src/components/global-property/modal/delete-global-property-modal.component.tsx +71 -0
- package/src/components/global-property/modal/delete-global-property-modal.test.tsx +131 -0
- package/src/components/global-property/table/global-property-table.component.tsx +249 -0
- package/src/components/global-property/table/global-property-table.scss +34 -0
- package/src/components/global-property/table/global-property-table.test.tsx +198 -0
- package/src/components/global-property/workspace/global-property-form-schema.ts +32 -0
- package/src/components/global-property/workspace/global-property.workspace.scss +40 -0
- package/src/components/global-property/workspace/global-property.workspace.test.tsx +172 -0
- package/src/components/global-property/workspace/global-property.workspace.tsx +260 -0
- package/src/components/hook/healthWorkerRegistry.ts +78 -0
- package/src/components/hook/useProfessionalRegistryEnums.ts +59 -0
- package/src/components/logs-table/operation-log-table.component.tsx +87 -75
- package/src/components/logs-table/operation-log.test.tsx +134 -28
- package/src/components/modal/hwr-confirmation.modal.scss +80 -4
- package/src/components/modal/hwr-confirmation.modal.tsx +118 -128
- package/src/components/modal/hwr-sync.modal.tsx +194 -106
- package/src/components/users/manage-users/user-details/user-detail.scss +167 -39
- package/src/components/users/manage-users/user-details/user-details.component.tsx +130 -122
- package/src/components/users/manage-users/user-management.workspace.scss +233 -95
- package/src/components/users/manage-users/user-management.workspace.tsx +481 -375
- package/src/components/users/userManagementFormSchema.tsx +17 -8
- package/src/config-schema.ts +48 -68
- package/src/index.ts +9 -1
- package/src/root.component.tsx +2 -0
- package/src/routes.json +20 -1
- package/src/types/index.ts +11 -2
- package/translations/am.json +175 -10
- package/translations/en.json +108 -40
- package/translations/fr.json +171 -101
- package/translations/sw.json +312 -147
- package/.turbo/turbo-build.log +0 -6
- package/dist/1074.js +0 -1
- package/dist/1074.js.map +0 -1
- package/dist/12.js +0 -17
- package/dist/12.js.map +0 -1
- package/dist/1201.js +0 -1
- package/dist/1201.js.map +0 -1
- package/dist/1242.js +0 -1
- package/dist/1242.js.map +0 -1
- package/dist/1311.js +0 -1
- package/dist/1311.js.map +0 -1
- package/dist/1462.js +0 -1
- package/dist/1462.js.map +0 -1
- package/dist/1469.js +0 -1
- package/dist/1469.js.map +0 -1
- package/dist/1506.js +0 -13
- package/dist/1506.js.map +0 -1
- package/dist/1718.js +0 -1
- package/dist/1718.js.map +0 -1
- package/dist/1722.js +0 -1
- package/dist/1722.js.map +0 -1
- package/dist/1772.js +0 -1
- package/dist/1772.js.map +0 -1
- package/dist/1889.js +0 -1
- package/dist/1889.js.map +0 -1
- package/dist/1972.js +0 -1
- package/dist/1972.js.map +0 -1
- package/dist/1990.js +0 -1
- package/dist/1990.js.map +0 -1
- package/dist/2016.js +0 -1
- package/dist/2016.js.map +0 -1
- package/dist/2080.js +0 -1
- package/dist/2080.js.map +0 -1
- package/dist/2096.js +0 -1
- package/dist/2096.js.map +0 -1
- package/dist/2153.js +0 -1
- package/dist/2153.js.map +0 -1
- package/dist/216.js +0 -1
- package/dist/216.js.map +0 -1
- package/dist/2270.js +0 -1
- package/dist/2270.js.map +0 -1
- package/dist/2294.js +0 -1
- package/dist/2294.js.map +0 -1
- package/dist/2345.js +0 -1
- package/dist/2345.js.map +0 -1
- package/dist/2402.js +0 -1
- package/dist/2402.js.map +0 -1
- package/dist/2500.js +0 -1
- package/dist/2500.js.map +0 -1
- package/dist/251.js +0 -1
- package/dist/251.js.map +0 -1
- package/dist/257.js +0 -1
- package/dist/257.js.map +0 -1
- package/dist/2586.js +0 -1
- package/dist/2586.js.map +0 -1
- package/dist/2625.js +0 -1
- package/dist/2625.js.map +0 -1
- package/dist/2652.js +0 -1
- package/dist/2652.js.map +0 -1
- package/dist/2685.js +0 -1
- package/dist/2685.js.map +0 -1
- package/dist/2948.js +0 -1
- package/dist/2948.js.map +0 -1
- package/dist/3089.js +0 -1
- package/dist/3089.js.map +0 -1
- package/dist/3190.js +0 -1
- package/dist/3190.js.map +0 -1
- package/dist/3224.js +0 -1
- package/dist/3224.js.map +0 -1
- package/dist/3366.js +0 -1
- package/dist/3366.js.map +0 -1
- package/dist/349.js +0 -1
- package/dist/349.js.map +0 -1
- package/dist/3548.js +0 -1
- package/dist/3548.js.map +0 -1
- package/dist/3571.js +0 -1
- package/dist/3571.js.map +0 -1
- package/dist/3691.js +0 -1
- package/dist/3691.js.map +0 -1
- package/dist/3775.js +0 -1
- package/dist/3775.js.map +0 -1
- package/dist/3816.js +0 -1
- package/dist/3816.js.map +0 -1
- package/dist/3852.js +0 -1
- package/dist/3852.js.map +0 -1
- package/dist/3906.js +0 -1
- package/dist/3906.js.map +0 -1
- package/dist/3963.js +0 -1
- package/dist/3963.js.map +0 -1
- package/dist/405.js +0 -1
- package/dist/405.js.map +0 -1
- package/dist/4296.js +0 -1
- package/dist/4296.js.map +0 -1
- package/dist/4337.js +0 -1
- package/dist/4337.js.map +0 -1
- package/dist/4735.js +0 -1
- package/dist/4735.js.map +0 -1
- package/dist/4744.js +0 -1
- package/dist/4744.js.map +0 -1
- package/dist/4813.js +0 -2
- package/dist/4813.js.map +0 -1
- package/dist/4858.js +0 -1
- package/dist/4858.js.map +0 -1
- package/dist/487.js +0 -1
- package/dist/487.js.map +0 -1
- package/dist/4970.js +0 -1
- package/dist/4970.js.map +0 -1
- package/dist/5202.js +0 -1
- package/dist/5202.js.map +0 -1
- package/dist/5294.js +0 -1
- package/dist/5294.js.map +0 -1
- package/dist/545.js +0 -1
- package/dist/545.js.map +0 -1
- package/dist/552.js +0 -1
- package/dist/552.js.map +0 -1
- package/dist/5592.js +0 -1
- package/dist/5592.js.map +0 -1
- package/dist/5669.js +0 -1
- package/dist/5669.js.map +0 -1
- package/dist/5884.js +0 -1
- package/dist/5884.js.map +0 -1
- package/dist/5940.js +0 -1
- package/dist/5940.js.map +0 -1
- package/dist/6092.js +0 -1
- package/dist/6092.js.map +0 -1
- package/dist/6155.js +0 -1
- package/dist/6155.js.map +0 -1
- package/dist/6178.js +0 -1
- package/dist/6178.js.map +0 -1
- package/dist/6399.js +0 -1
- package/dist/6399.js.map +0 -1
- package/dist/6456.js +0 -1
- package/dist/6466.js +0 -3
- package/dist/6466.js.map +0 -1
- package/dist/6492.js +0 -1
- package/dist/6492.js.map +0 -1
- package/dist/6676.js +0 -1
- package/dist/6676.js.map +0 -1
- package/dist/6800.js +0 -1
- package/dist/6800.js.map +0 -1
- package/dist/6976.js +0 -1
- package/dist/6976.js.map +0 -1
- package/dist/7005.js +0 -1
- package/dist/7005.js.map +0 -1
- package/dist/7201.js +0 -1
- package/dist/7201.js.map +0 -1
- package/dist/7210.js +0 -1
- package/dist/7210.js.map +0 -1
- package/dist/7234.js +0 -1
- package/dist/7234.js.map +0 -1
- package/dist/7261.js +0 -1
- package/dist/7261.js.map +0 -1
- package/dist/7326.js +0 -1
- package/dist/7463.js +0 -1
- package/dist/7463.js.map +0 -1
- package/dist/7528.js +0 -1
- package/dist/7528.js.map +0 -1
- package/dist/7584.js +0 -1
- package/dist/7584.js.map +0 -1
- package/dist/7607.js +0 -1
- package/dist/7717.js +0 -1
- package/dist/7717.js.map +0 -1
- package/dist/7737.js +0 -1
- package/dist/7737.js.map +0 -1
- package/dist/7739.js +0 -1
- package/dist/7739.js.map +0 -1
- package/dist/7765.js +0 -1
- package/dist/7765.js.map +0 -1
- package/dist/7820.js +0 -1
- package/dist/7820.js.map +0 -1
- package/dist/7844.js +0 -1
- package/dist/7844.js.map +0 -1
- package/dist/7866.js +0 -1
- package/dist/7866.js.map +0 -1
- package/dist/7916.js +0 -1
- package/dist/7916.js.map +0 -1
- package/dist/7971.js +0 -1
- package/dist/7971.js.map +0 -1
- package/dist/8159.js +0 -7
- package/dist/8159.js.map +0 -1
- package/dist/8244.js +0 -1
- package/dist/8244.js.map +0 -1
- package/dist/8262.js +0 -1
- package/dist/8262.js.map +0 -1
- package/dist/834.js +0 -1
- package/dist/834.js.map +0 -1
- package/dist/8376.js +0 -1
- package/dist/8376.js.map +0 -1
- package/dist/845.js +0 -1
- package/dist/845.js.map +0 -1
- package/dist/8546.js +0 -1
- package/dist/8546.js.map +0 -1
- package/dist/8570.js +0 -1
- package/dist/8570.js.map +0 -1
- package/dist/87.js +0 -1
- package/dist/87.js.map +0 -1
- package/dist/8727.js +0 -1
- package/dist/8828.js +0 -1
- package/dist/8828.js.map +0 -1
- package/dist/8860.js +0 -1
- package/dist/8860.js.map +0 -1
- package/dist/9036.js +0 -1
- package/dist/9036.js.map +0 -1
- package/dist/9124.js +0 -1
- package/dist/9124.js.map +0 -1
- package/dist/9182.js +0 -1
- package/dist/921.js +0 -1
- package/dist/921.js.map +0 -1
- package/dist/9404.js +0 -1
- package/dist/9404.js.map +0 -1
- package/dist/9406.js +0 -1
- package/dist/9406.js.map +0 -1
- package/dist/9446.js +0 -1
- package/dist/9446.js.map +0 -1
- package/dist/9449.js +0 -1
- package/dist/9449.js.map +0 -1
- package/dist/9566.js +0 -5
- package/dist/9566.js.map +0 -1
- package/dist/9641.js +0 -1
- package/dist/9641.js.map +0 -1
- package/dist/9711.js +0 -1
- package/dist/9711.js.map +0 -1
- package/dist/9801.js +0 -1
- package/dist/9801.js.map +0 -1
- package/dist/9835.js +0 -11
- package/dist/9835.js.map +0 -1
- package/dist/kenyaemr-esm-admin-app.js +0 -5
- package/dist/kenyaemr-esm-admin-app.js.buildmanifest.json +0 -3173
- package/dist/kenyaemr-esm-admin-app.js.map +0 -1
- package/dist/main.js +0 -5
- package/dist/main.js.map +0 -1
- package/dist/routes.json +0 -1
- package/src/components/facility-setup/facility-setup.resource.tsx +0 -7
- package/src/components/hook/healthWorkerAdapter.ts +0 -213
- package/src/components/hook/useFacilityInfo.tsx +0 -37
|
@@ -1,176 +1,184 @@
|
|
|
1
|
-
import React, { useRef } from 'react';
|
|
2
|
-
import styles from './user-detail.scss';
|
|
1
|
+
import React, { useMemo, useRef } from 'react';
|
|
3
2
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { Tag, Accordion, AccordionItem,
|
|
5
|
-
import { PatientPhoto } from '@openmrs/esm-framework';
|
|
3
|
+
import { Tag, Accordion, AccordionItem, ContainedListItem } from '@carbon/react';
|
|
4
|
+
import { PatientPhoto, useConfig } from '@openmrs/esm-framework';
|
|
6
5
|
import dayjs from 'dayjs';
|
|
7
6
|
import classNames from 'classnames';
|
|
8
7
|
import capitalize from 'lodash/capitalize';
|
|
8
|
+
|
|
9
|
+
import styles from './user-detail.scss';
|
|
9
10
|
import { type ProviderResponse, type UserResponse } from '../../../../types';
|
|
11
|
+
import { type ConfigObject } from '../../../../config-schema';
|
|
10
12
|
|
|
11
13
|
interface UserDetailsProps {
|
|
12
14
|
provider: ProviderResponse;
|
|
13
15
|
user: UserResponse;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
|
-
interface ProviderAttribute {
|
|
17
|
-
value: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
interface ProviderAttributes {
|
|
21
|
-
licenseAttr?: ProviderAttribute;
|
|
22
|
-
nationalID?: ProviderAttribute;
|
|
23
|
-
dateAttr?: ProviderAttribute;
|
|
24
|
-
phoneNumber?: ProviderAttribute;
|
|
25
|
-
qualification?: ProviderAttribute;
|
|
26
|
-
registrationNumber?: ProviderAttribute;
|
|
27
|
-
emailAddress?: ProviderAttribute;
|
|
28
|
-
passportNumber: ProviderAttribute;
|
|
29
|
-
providerUniqueIdentifier: ProviderAttribute;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
18
|
const UserDetails: React.FC<UserDetailsProps> = ({ provider, user }) => {
|
|
33
19
|
const { t } = useTranslation();
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
const attributeMap = {
|
|
37
|
-
licenseAttr: 'Practising License Number',
|
|
38
|
-
nationalID: 'Provider National Id Number',
|
|
39
|
-
dateAttr: 'License Expiry Date',
|
|
40
|
-
phoneNumber: 'Provider Telephone',
|
|
41
|
-
qualification: 'Provider Qualification',
|
|
42
|
-
registrationNumber: 'License Body',
|
|
43
|
-
emailAddress: 'Provider Address',
|
|
44
|
-
passportNumber: 'Provider passport number',
|
|
45
|
-
providerUniqueIdentifier: 'Provider unique identifier',
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const attributes: ProviderAttributes = Object.entries(attributeMap).reduce((acc, [key, display]) => {
|
|
49
|
-
const attr = provider?.attributes?.find((attr) => attr.attributeType.display === display);
|
|
50
|
-
if (attr) {
|
|
51
|
-
acc[key as keyof ProviderAttributes] = { value: attr.value };
|
|
52
|
-
}
|
|
53
|
-
return acc;
|
|
54
|
-
}, {} as ProviderAttributes);
|
|
20
|
+
const bannerRef = useRef<HTMLElement>(null);
|
|
55
21
|
|
|
56
22
|
const {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
23
|
+
licenseNumberUuid,
|
|
24
|
+
licenseExpiryDateUuid,
|
|
25
|
+
licenseBodyUuid,
|
|
26
|
+
qualificationUuid,
|
|
27
|
+
specialtyUuid,
|
|
28
|
+
providerCadreUuid,
|
|
29
|
+
practiceTypeUuid,
|
|
30
|
+
providerNationalIdUuid,
|
|
31
|
+
passportNumberUuid,
|
|
32
|
+
providerUniqueIdentifierAttributeTypeUuid,
|
|
33
|
+
externalProviderIdentifierUuid,
|
|
34
|
+
phoneNumberUuid,
|
|
35
|
+
providerAddressUuid,
|
|
36
|
+
} = useConfig<ConfigObject>();
|
|
37
|
+
|
|
38
|
+
const attrByUuid = useMemo(() => {
|
|
39
|
+
const map: Record<string, string> = {};
|
|
40
|
+
provider?.attributes?.forEach((a) => {
|
|
41
|
+
const uuid = a?.attributeType?.uuid;
|
|
42
|
+
if (uuid && a.value != null) {
|
|
43
|
+
map[uuid] = typeof a.value === 'string' ? a.value : String(a.value);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return map;
|
|
47
|
+
}, [provider]);
|
|
48
|
+
|
|
49
|
+
const licenseNumber = attrByUuid[licenseNumberUuid];
|
|
50
|
+
const licenseExpiryRaw = attrByUuid[licenseExpiryDateUuid];
|
|
51
|
+
const licenseBody = attrByUuid[licenseBodyUuid];
|
|
52
|
+
const qualification = attrByUuid[qualificationUuid];
|
|
53
|
+
const specialty = attrByUuid[specialtyUuid];
|
|
54
|
+
const providerCadre = attrByUuid[providerCadreUuid];
|
|
55
|
+
const practiceType = attrByUuid[practiceTypeUuid];
|
|
56
|
+
const nationalId = attrByUuid[providerNationalIdUuid];
|
|
57
|
+
const passportNumber = attrByUuid[passportNumberUuid];
|
|
58
|
+
const providerUniqueIdentifier = attrByUuid[providerUniqueIdentifierAttributeTypeUuid];
|
|
59
|
+
const externalProviderIdentifier = attrByUuid[externalProviderIdentifierUuid];
|
|
60
|
+
const phoneNumber = attrByUuid[phoneNumberUuid];
|
|
61
|
+
const emailAddress = attrByUuid[providerAddressUuid];
|
|
62
|
+
|
|
69
63
|
const today = dayjs();
|
|
70
|
-
const expiryDate =
|
|
64
|
+
const expiryDate = licenseExpiryRaw ? dayjs(licenseExpiryRaw) : null;
|
|
71
65
|
const daysUntilExpiry = expiryDate ? expiryDate.diff(today, 'day') : null;
|
|
66
|
+
const formattedExpiryDate = expiryDate?.isValid() ? expiryDate.format('YYYY-MM-DD') : null;
|
|
72
67
|
|
|
73
68
|
const getLicenseStatusTag = () => {
|
|
74
|
-
if (!
|
|
69
|
+
if (!licenseNumber) {
|
|
75
70
|
return <Tag type="red">{t('unlicensed', 'Unlicensed')}</Tag>;
|
|
76
71
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return (
|
|
82
|
-
<>
|
|
83
|
-
<Tag type="cyan">{t('licenseExpiringSoon', 'License is expiring soon')}</Tag>
|
|
84
|
-
</>
|
|
85
|
-
);
|
|
86
|
-
} else {
|
|
87
|
-
return <Tag type="green">{t('active', 'Active')}</Tag>;
|
|
72
|
+
if (daysUntilExpiry !== null && daysUntilExpiry < 0) {
|
|
73
|
+
return <Tag type="red">{t('licenseExpired', 'License expired')}</Tag>;
|
|
74
|
+
}
|
|
75
|
+
if (daysUntilExpiry !== null && daysUntilExpiry <= 3) {
|
|
76
|
+
return <Tag type="warm-gray">{t('licenseExpiringSoon', 'License expiring soon')}</Tag>;
|
|
88
77
|
}
|
|
78
|
+
return <Tag type="green">{t('active', 'Active')}</Tag>;
|
|
89
79
|
};
|
|
90
80
|
|
|
81
|
+
const genderLabel =
|
|
82
|
+
provider?.person?.gender === 'M'
|
|
83
|
+
? t('male', 'Male')
|
|
84
|
+
: provider?.person?.gender === 'F'
|
|
85
|
+
? t('female', 'Female')
|
|
86
|
+
: '';
|
|
87
|
+
|
|
88
|
+
const Field = ({ label, value }: { label: string; value?: string | null }) => (
|
|
89
|
+
<span className={styles.spanField}>
|
|
90
|
+
<span className={styles.fieldLabel}>{label}:</span> <span className={styles.fieldValue}>{value || '--'}</span>
|
|
91
|
+
</span>
|
|
92
|
+
);
|
|
93
|
+
|
|
91
94
|
return (
|
|
92
95
|
<div className={styles.providerDetailsContainer}>
|
|
93
|
-
<header aria-label=
|
|
96
|
+
<header aria-label={t('providerBanner', 'Provider banner')} role="banner" ref={bannerRef}>
|
|
94
97
|
<div className={styles.patientBanner}>
|
|
95
98
|
<div className={styles.patientAvatar} role="img">
|
|
96
99
|
<PatientPhoto patientUuid={provider?.uuid} patientName={provider?.person?.display} />
|
|
97
100
|
</div>
|
|
101
|
+
|
|
98
102
|
<div className={styles.patientInfo}>
|
|
99
103
|
<div className={classNames(styles.row, styles.patientNameRow)}>
|
|
100
104
|
<div className={styles.flexRow}>
|
|
101
|
-
<span className={styles.patientName}>{provider?.person?.display}
|
|
102
|
-
<span className={styles.gender}>
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
{
|
|
109
|
-
</span>
|
|
110
|
-
<span className={styles.statusTag}>
|
|
111
|
-
{providerUniqueIdentifier?.value && (
|
|
112
|
-
<Tag type="cyan">{capitalize(providerUniqueIdentifier?.value)}</Tag>
|
|
113
|
-
)}
|
|
105
|
+
<span className={styles.patientName}>{provider?.person?.display}</span>
|
|
106
|
+
{genderLabel && <span className={styles.gender}>{genderLabel}</span>}
|
|
107
|
+
|
|
108
|
+
<span className={styles.tagRow}>
|
|
109
|
+
{getLicenseStatusTag()}
|
|
110
|
+
{qualification && <Tag type="cyan">{capitalize(qualification)}</Tag>}
|
|
111
|
+
{specialty && <Tag type="purple">{capitalize(specialty)}</Tag>}
|
|
112
|
+
{providerCadre && <Tag type="teal">{capitalize(providerCadre)}</Tag>}
|
|
114
113
|
</span>
|
|
115
114
|
</div>
|
|
116
115
|
</div>
|
|
117
|
-
|
|
118
|
-
<div className={classNames(styles.row, styles.patientNameRow)}>
|
|
116
|
+
<div className={styles.row}>
|
|
119
117
|
<div className={styles.flexRow}>
|
|
120
|
-
<
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
<span className={styles.middot}>· </span>
|
|
124
|
-
|
|
125
|
-
<span className={styles.spanField}>
|
|
126
|
-
{t('emailAddress', 'Email address')}: {emailAddress?.value ? emailAddress.value : '--'}
|
|
127
|
-
</span>
|
|
118
|
+
<Field label={t('phoneNumber', 'Phone')} value={phoneNumber} />
|
|
119
|
+
<span className={styles.middot}>·</span>
|
|
120
|
+
<Field label={t('emailAddress', 'Email')} value={emailAddress} />
|
|
128
121
|
</div>
|
|
129
122
|
</div>
|
|
130
|
-
<div className={classNames(styles.row, styles.patientNameRow)}>
|
|
131
|
-
<div className={styles.flexRow}>
|
|
132
|
-
<span className={styles.spanField}>
|
|
133
|
-
{t('nationalId', 'National ID')}: {nationalID?.value ? nationalID.value : '--'}
|
|
134
|
-
</span>
|
|
135
|
-
<span className={styles.middot}>· </span>
|
|
136
123
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
<span className={styles.middot}
|
|
141
|
-
<
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
<
|
|
146
|
-
|
|
147
|
-
<
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
<span className={styles.middot}>· </span>
|
|
124
|
+
<div className={styles.row}>
|
|
125
|
+
<div className={styles.flexRow}>
|
|
126
|
+
<Field label={t('nationalId', 'National ID')} value={nationalId} />
|
|
127
|
+
<span className={styles.middot}>·</span>
|
|
128
|
+
<Field label={t('passportNumber', 'Passport')} value={passportNumber} />
|
|
129
|
+
<span className={styles.middot}>·</span>
|
|
130
|
+
<Field label={t('licenseNumber', 'License #')} value={licenseNumber} />
|
|
131
|
+
<span className={styles.middot}>·</span>
|
|
132
|
+
<Field label={t('licenseBody', 'License body')} value={licenseBody} />
|
|
133
|
+
<span className={styles.middot}>·</span>
|
|
134
|
+
<Field label={t('licenseExpiryDate', 'License expiry')} value={formattedExpiryDate} />
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
151
137
|
|
|
152
|
-
|
|
153
|
-
|
|
138
|
+
{/* Practice row */}
|
|
139
|
+
{practiceType && (
|
|
140
|
+
<div className={styles.row}>
|
|
141
|
+
<div className={styles.flexRow}>
|
|
142
|
+
<Field label={t('practiceType', 'Practice')} value={practiceType} />
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
)}
|
|
146
|
+
{providerUniqueIdentifier && (
|
|
147
|
+
<div className={styles.row}>
|
|
148
|
+
<span className={styles.puidBadge}>
|
|
149
|
+
{t('puid', 'PUID')}: <strong>{providerUniqueIdentifier}</strong>
|
|
150
|
+
{externalProviderIdentifier && (
|
|
151
|
+
<>
|
|
152
|
+
<span className={styles.middot}>·</span>
|
|
153
|
+
<span className={styles.fieldLabel}>{t('externalRef', 'External ref')}:</span>{' '}
|
|
154
|
+
<strong>{externalProviderIdentifier}</strong>
|
|
155
|
+
</>
|
|
156
|
+
)}
|
|
154
157
|
</span>
|
|
155
158
|
</div>
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
159
|
+
)}
|
|
160
|
+
|
|
161
|
+
{/* Roles */}
|
|
162
|
+
<div className={classNames(styles.row, styles.viewRoles)}>
|
|
163
|
+
<Accordion>
|
|
164
|
+
<AccordionItem title={t('viewRoles', 'View roles ({{count}})', { count: user?.roles?.length ?? 0 })}>
|
|
165
|
+
{user?.roles?.length ? (
|
|
166
|
+
user.roles.map((role, i) => (
|
|
160
167
|
<ContainedListItem key={i}>
|
|
161
168
|
<div className={styles.roleContainer}>
|
|
162
|
-
<strong>{role.display}</strong>
|
|
169
|
+
<strong className={styles.roleName}>{role.display}</strong>
|
|
163
170
|
<p className={styles.roleDescription}>
|
|
164
171
|
{role.description || t('noDescriptionAvailable', 'No description available')}
|
|
165
172
|
</p>
|
|
166
173
|
</div>
|
|
167
174
|
</ContainedListItem>
|
|
168
|
-
))
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
175
|
+
))
|
|
176
|
+
) : (
|
|
177
|
+
<p className={styles.roleDescription}>{t('noRolesAssigned', 'No roles assigned')}</p>
|
|
178
|
+
)}
|
|
179
|
+
</AccordionItem>
|
|
180
|
+
</Accordion>
|
|
172
181
|
</div>
|
|
173
|
-
<br />
|
|
174
182
|
</div>
|
|
175
183
|
</div>
|
|
176
184
|
</header>
|