@kenyaemr/esm-admin-app 5.4.2-pre.2478 → 5.4.2-pre.2482
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/.turbo/turbo-build.log +2 -2
- package/dist/20.js +1 -1
- package/dist/20.js.map +1 -1
- package/dist/kenyaemr-esm-admin-app.js.buildmanifest.json +6 -6
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/components/provider-banner/provider-banner.component.tsx +23 -13
- package/src/components/provider-banner/provider-banner.module.scss +6 -1
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"kenyaemrCharts":"^1.6.7"},"extensions":[{"component":"adminLeftPanelLink","name":"admin-left-panel-link","slot":"admin-left-panel-slot"},{"component":"userManagementLeftPannelLink","name":"user-management-left-panel-link","slot":"admin-left-panel-slot"},{"component":"etlAdministrationLeftPannelLink","name":"etl-administration-left-panel-link","slot":"admin-left-panel-slot"},{"component":"locationsLeftPanelLink","name":"locations-left-panel-link","slot":"admin-left-panel-slot"},{"component":"facilitySetupLeftPanelLink","name":"facility-setup-left-panel-link","slot":"admin-left-panel-slot"},{"component":"providerBanner","name":"provider-banner","slot":"top-nav-info-slot","order":1}],"workspaces":[{"name":"manage-user-workspace","component":"manageUserWorkspace","title":"Manage User Workspace","type":"other-form","canMaximize":true,"width":"extra-wide"},{"name":"user-role-scope-workspace","component":"userRoleScopeWorkspace","title":"User Rple Scope Workspace","type":"other-form","canMaximize":true,"width":"extra-wide"},{"name":"add-location-workspace","title":"Add Location","component":"addLocation","type":"workspace"},{"name":"search-location-workspace","title":"Search Location","component":"searchLocationWorkspace","type":"workspace"},{"name":"hwr-sync-workspace","title":"HWR Sync Workspace","component":"hwrSyncWorkspace","type":"other-form"},{"name":"hwr-sync-modal","title":"HWR Sync Modal","component":"hwrSyncModal","type":"modal"}],"modals":[{"component":"operationConfirmationModal","name":"operation-confirmation-modal"},{"component":"hwrConfirmationModal","name":"hwr-confirmation-modal"},{"component":"hwrEmptyModal","name":"hwr-empty-modal"},{"component":"hwrSyncModal","name":"hwr-syncing-modal"}],"pages":[{"component":"root","route":"admin"}],"version":"5.4.2-pre.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"kenyaemrCharts":"^1.6.7"},"extensions":[{"component":"adminLeftPanelLink","name":"admin-left-panel-link","slot":"admin-left-panel-slot"},{"component":"userManagementLeftPannelLink","name":"user-management-left-panel-link","slot":"admin-left-panel-slot"},{"component":"etlAdministrationLeftPannelLink","name":"etl-administration-left-panel-link","slot":"admin-left-panel-slot"},{"component":"locationsLeftPanelLink","name":"locations-left-panel-link","slot":"admin-left-panel-slot"},{"component":"facilitySetupLeftPanelLink","name":"facility-setup-left-panel-link","slot":"admin-left-panel-slot"},{"component":"providerBanner","name":"provider-banner","slot":"top-nav-info-slot","order":1}],"workspaces":[{"name":"manage-user-workspace","component":"manageUserWorkspace","title":"Manage User Workspace","type":"other-form","canMaximize":true,"width":"extra-wide"},{"name":"user-role-scope-workspace","component":"userRoleScopeWorkspace","title":"User Rple Scope Workspace","type":"other-form","canMaximize":true,"width":"extra-wide"},{"name":"add-location-workspace","title":"Add Location","component":"addLocation","type":"workspace"},{"name":"search-location-workspace","title":"Search Location","component":"searchLocationWorkspace","type":"workspace"},{"name":"hwr-sync-workspace","title":"HWR Sync Workspace","component":"hwrSyncWorkspace","type":"other-form"},{"name":"hwr-sync-modal","title":"HWR Sync Modal","component":"hwrSyncModal","type":"modal"}],"modals":[{"component":"operationConfirmationModal","name":"operation-confirmation-modal"},{"component":"hwrConfirmationModal","name":"hwr-confirmation-modal"},{"component":"hwrEmptyModal","name":"hwr-empty-modal"},{"component":"hwrSyncModal","name":"hwr-syncing-modal"}],"pages":[{"component":"root","route":"admin"}],"version":"5.4.2-pre.2482"}
|
package/package.json
CHANGED
|
@@ -39,7 +39,7 @@ const ProviderBannerTag: React.FC = () => {
|
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
const formatDate = (dateString: string): string => {
|
|
42
|
-
if (!dateString) {
|
|
42
|
+
if (!dateString || dateString === '000-000-00') {
|
|
43
43
|
return '0000-00-00';
|
|
44
44
|
}
|
|
45
45
|
try {
|
|
@@ -62,6 +62,7 @@ const ProviderBannerTag: React.FC = () => {
|
|
|
62
62
|
const hwi = getAttributeValue(providerAttributes?.attributes, 'Provider unique identifier') || 'NONE';
|
|
63
63
|
const licenseExpiry = getAttributeValue(providerAttributes?.attributes, 'License Expiry Date');
|
|
64
64
|
const formattedExpiry = formatDate(licenseExpiry) || '0000-00-00';
|
|
65
|
+
const shouldShowLicenseExpiry = !!licenseExpiry;
|
|
65
66
|
const licenseStatus = getLicenseStatus(licenseExpiry);
|
|
66
67
|
|
|
67
68
|
return (
|
|
@@ -69,23 +70,32 @@ const ProviderBannerTag: React.FC = () => {
|
|
|
69
70
|
<div className={styles.bannerContent}>
|
|
70
71
|
<div className={styles.divider} />
|
|
71
72
|
<div className={styles.infoItem}>
|
|
72
|
-
<span className={styles.label}>
|
|
73
|
-
|
|
73
|
+
<span className={styles.label}>
|
|
74
|
+
{t('healthProviderUniqueIdentifier', 'Health Provider unique identifier' + ':')}
|
|
75
|
+
</span>
|
|
76
|
+
<span className={`${styles.value} ${styles.hwiValue}`}>{hwi}</span>
|
|
74
77
|
</div>
|
|
75
78
|
|
|
76
79
|
<div className={styles.divider} />
|
|
77
80
|
|
|
78
|
-
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
</div>
|
|
81
|
+
<>
|
|
82
|
+
<div className={styles.infoItem}>
|
|
83
|
+
{shouldShowLicenseExpiry && (
|
|
84
|
+
<>
|
|
85
|
+
<span className={styles.label}>{t('licenseExpiry', 'License Expiry' + ':')}</span>
|
|
86
|
+
<span className={styles.value}>{formattedExpiry}</span>
|
|
87
|
+
</>
|
|
88
|
+
)}
|
|
87
89
|
|
|
88
|
-
|
|
90
|
+
<span className={styles.statusIndicator}>
|
|
91
|
+
<Tag size="md" type={licenseStatus.tagType}>
|
|
92
|
+
{licenseStatus.message}
|
|
93
|
+
</Tag>
|
|
94
|
+
</span>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<div className={styles.divider} />
|
|
98
|
+
</>
|
|
89
99
|
|
|
90
100
|
<div className={styles.infoItem}>
|
|
91
101
|
<span className={styles.label}>{t('name', 'Name' + ':')}</span>
|