@kenyaemr/esm-etims-app 5.4.5-pre.1109
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 +6 -0
- package/README.md +3 -0
- package/dist/1067.js +1 -0
- package/dist/1067.js.map +1 -0
- package/dist/1072.js +1 -0
- package/dist/1072.js.map +1 -0
- package/dist/1148.js +1 -0
- package/dist/1148.js.map +1 -0
- package/dist/1278.js +1 -0
- package/dist/1278.js.map +1 -0
- package/dist/1442.js +1 -0
- package/dist/1442.js.map +1 -0
- package/dist/15.js +1 -0
- package/dist/15.js.map +1 -0
- package/dist/1620.js +1 -0
- package/dist/1620.js.map +1 -0
- package/dist/1638.js +1 -0
- package/dist/1638.js.map +1 -0
- package/dist/1789.js +1 -0
- package/dist/1789.js.map +1 -0
- package/dist/1831.js +1 -0
- package/dist/1831.js.map +1 -0
- package/dist/1844.js +1 -0
- package/dist/1844.js.map +1 -0
- package/dist/1946.js +1 -0
- package/dist/1946.js.map +1 -0
- package/dist/2007.js +1 -0
- package/dist/2007.js.map +1 -0
- package/dist/2115.js +1 -0
- package/dist/2115.js.map +1 -0
- package/dist/2131.js +1 -0
- package/dist/2131.js.map +1 -0
- package/dist/2152.js +1 -0
- package/dist/2152.js.map +1 -0
- package/dist/2202.js +1 -0
- package/dist/2202.js.map +1 -0
- package/dist/2394.js +1 -0
- package/dist/2394.js.map +1 -0
- package/dist/2534.js +1 -0
- package/dist/2534.js.map +1 -0
- package/dist/2537.js +1 -0
- package/dist/2537.js.map +1 -0
- package/dist/2556.js +1 -0
- package/dist/2556.js.map +1 -0
- package/dist/2621.js +1 -0
- package/dist/2621.js.map +1 -0
- package/dist/2648.js +1 -0
- package/dist/2648.js.map +1 -0
- package/dist/2795.js +1 -0
- package/dist/2795.js.map +1 -0
- package/dist/2842.js +1 -0
- package/dist/2842.js.map +1 -0
- package/dist/2916.js +1 -0
- package/dist/2916.js.map +1 -0
- package/dist/2924.js +1 -0
- package/dist/2924.js.map +1 -0
- package/dist/2929.js +1 -0
- package/dist/2929.js.map +1 -0
- package/dist/2947.js +1 -0
- package/dist/2947.js.map +1 -0
- package/dist/2971.js +1 -0
- package/dist/2971.js.map +1 -0
- package/dist/3284.js +1 -0
- package/dist/3284.js.map +1 -0
- package/dist/3285.js +1 -0
- package/dist/3285.js.map +1 -0
- package/dist/3335.js +1 -0
- package/dist/3335.js.map +1 -0
- package/dist/335.js +1 -0
- package/dist/335.js.map +1 -0
- package/dist/3378.js +1 -0
- package/dist/3378.js.map +1 -0
- package/dist/338.js +1 -0
- package/dist/338.js.map +1 -0
- package/dist/3504.js +1 -0
- package/dist/3504.js.map +1 -0
- package/dist/3544.js +1 -0
- package/dist/3544.js.map +1 -0
- package/dist/356.js +1 -0
- package/dist/356.js.map +1 -0
- package/dist/3569.js +1 -0
- package/dist/3569.js.map +1 -0
- package/dist/3723.js +1 -0
- package/dist/3723.js.map +1 -0
- package/dist/3745.js +1 -0
- package/dist/3745.js.map +1 -0
- package/dist/3813.js +1 -0
- package/dist/3813.js.map +1 -0
- package/dist/393.js +6 -0
- package/dist/393.js.map +1 -0
- package/dist/3949.js +1 -0
- package/dist/3949.js.map +1 -0
- package/dist/3953.js +1 -0
- package/dist/3953.js.map +1 -0
- package/dist/3989.js +1 -0
- package/dist/3989.js.map +1 -0
- package/dist/4178.js +1 -0
- package/dist/4178.js.map +1 -0
- package/dist/4303.js +1 -0
- package/dist/4303.js.map +1 -0
- package/dist/4308.js +1 -0
- package/dist/4308.js.map +1 -0
- package/dist/4487.js +11 -0
- package/dist/4487.js.map +1 -0
- package/dist/4588.js +1 -0
- package/dist/4588.js.map +1 -0
- package/dist/4637.js +1 -0
- package/dist/4637.js.map +1 -0
- package/dist/466.js +1 -0
- package/dist/466.js.map +1 -0
- package/dist/4817.js +1 -0
- package/dist/4817.js.map +1 -0
- package/dist/4818.js +1 -0
- package/dist/4818.js.map +1 -0
- package/dist/500.js +1 -0
- package/dist/500.js.map +1 -0
- package/dist/5086.js +1 -0
- package/dist/5086.js.map +1 -0
- package/dist/5117.js +1 -0
- package/dist/5117.js.map +1 -0
- package/dist/5159.js +1 -0
- package/dist/5159.js.map +1 -0
- package/dist/5285.js +1 -0
- package/dist/5285.js.map +1 -0
- package/dist/5361.js +1 -0
- package/dist/5361.js.map +1 -0
- package/dist/5366.js +1 -0
- package/dist/5366.js.map +1 -0
- package/dist/5484.js +1 -0
- package/dist/5484.js.map +1 -0
- package/dist/5598.js +1 -0
- package/dist/5598.js.map +1 -0
- package/dist/5676.js +1 -0
- package/dist/5676.js.map +1 -0
- package/dist/5694.js +1 -0
- package/dist/5694.js.map +1 -0
- package/dist/5731.js +5 -0
- package/dist/5731.js.map +1 -0
- package/dist/5743.js +1 -0
- package/dist/5743.js.map +1 -0
- package/dist/5825.js +1 -0
- package/dist/5825.js.map +1 -0
- package/dist/5932.js +1 -0
- package/dist/5932.js.map +1 -0
- package/dist/5941.js +1 -0
- package/dist/5941.js.map +1 -0
- package/dist/5967.js +1 -0
- package/dist/5967.js.map +1 -0
- package/dist/6104.js +1 -0
- package/dist/6104.js.map +1 -0
- package/dist/624.js +1 -0
- package/dist/624.js.map +1 -0
- package/dist/6259.js +1 -0
- package/dist/6259.js.map +1 -0
- package/dist/6273.js +1 -0
- package/dist/6273.js.map +1 -0
- package/dist/6337.js +1 -0
- package/dist/6337.js.map +1 -0
- package/dist/6427.js +1 -0
- package/dist/6427.js.map +1 -0
- package/dist/647.js +1 -0
- package/dist/647.js.map +1 -0
- package/dist/6478.js +7 -0
- package/dist/6478.js.map +1 -0
- package/dist/6508.js +1 -0
- package/dist/6508.js.map +1 -0
- package/dist/6567.js +1 -0
- package/dist/6567.js.map +1 -0
- package/dist/6634.js +1 -0
- package/dist/6634.js.map +1 -0
- package/dist/6868.js +1 -0
- package/dist/6868.js.map +1 -0
- package/dist/689.js +1 -0
- package/dist/689.js.map +1 -0
- package/dist/7022.js +1 -0
- package/dist/7022.js.map +1 -0
- package/dist/7101.js +1 -0
- package/dist/7101.js.map +1 -0
- package/dist/7209.js +1 -0
- package/dist/7209.js.map +1 -0
- package/dist/7293.js +1 -0
- package/dist/7293.js.map +1 -0
- package/dist/7360.js +1 -0
- package/dist/7360.js.map +1 -0
- package/dist/7453.js +1 -0
- package/dist/7453.js.map +1 -0
- package/dist/7478.js +1 -0
- package/dist/7478.js.map +1 -0
- package/dist/7782.js +1 -0
- package/dist/7782.js.map +1 -0
- package/dist/7808.js +1 -0
- package/dist/7808.js.map +1 -0
- package/dist/7876.js +1 -0
- package/dist/7876.js.map +1 -0
- package/dist/8028.js +1 -0
- package/dist/8028.js.map +1 -0
- package/dist/8196.js +1 -0
- package/dist/8196.js.map +1 -0
- package/dist/820.js +1 -0
- package/dist/820.js.map +1 -0
- package/dist/8240.js +1 -0
- package/dist/8240.js.map +1 -0
- package/dist/8458.js +1 -0
- package/dist/8458.js.map +1 -0
- package/dist/8472.js +1 -0
- package/dist/8472.js.map +1 -0
- package/dist/8602.js +1 -0
- package/dist/8602.js.map +1 -0
- package/dist/8607.js +1 -0
- package/dist/8607.js.map +1 -0
- package/dist/8640.js +1 -0
- package/dist/8640.js.map +1 -0
- package/dist/8762.js +1 -0
- package/dist/8762.js.map +1 -0
- package/dist/9060.js +1 -0
- package/dist/9060.js.map +1 -0
- package/dist/9061.js +1 -0
- package/dist/9061.js.map +1 -0
- package/dist/9087.js +1 -0
- package/dist/9087.js.map +1 -0
- package/dist/9168.js +1 -0
- package/dist/9168.js.map +1 -0
- package/dist/9213.js +1 -0
- package/dist/9213.js.map +1 -0
- package/dist/9286.js +1 -0
- package/dist/9286.js.map +1 -0
- package/dist/9425.js +1 -0
- package/dist/9520.js +1 -0
- package/dist/9520.js.map +1 -0
- package/dist/9547.js +1 -0
- package/dist/9547.js.map +1 -0
- package/dist/9612.js +1 -0
- package/dist/9612.js.map +1 -0
- package/dist/9632.js +1 -0
- package/dist/9632.js.map +1 -0
- package/dist/9771.js +1 -0
- package/dist/9771.js.map +1 -0
- package/dist/9774.js +1 -0
- package/dist/9774.js.map +1 -0
- package/dist/9806.js +1 -0
- package/dist/9806.js.map +1 -0
- package/dist/9885.js +1 -0
- package/dist/9885.js.map +1 -0
- package/dist/992.js +1 -0
- package/dist/992.js.map +1 -0
- package/dist/kenyaemr-esm-etims-app.js +3 -0
- package/dist/kenyaemr-esm-etims-app.js.buildmanifest.json +3354 -0
- package/dist/kenyaemr-esm-etims-app.js.map +1 -0
- package/dist/main.js +3 -0
- package/dist/main.js.map +1 -0
- package/dist/routes.json +1 -0
- package/package.json +48 -0
- package/rspack.config.js +1 -0
- package/src/components/header/header.component.tsx +22 -0
- package/src/components/header/header.scss +6 -0
- package/src/components/side-menu/left-panel.component.tsx +22 -0
- package/src/components/side-menu/left-panel.scss +34 -0
- package/src/components/user-menu-link/etims-nav-link.scss +29 -0
- package/src/components/user-menu-link/user-menu-link.component.tsx +25 -0
- package/src/config-schema.ts +1 -0
- package/src/credit-note/etims-credit-note-dashboard.component.tsx +23 -0
- package/src/credit-note/etims-credit-note-dashboard.scss +8 -0
- package/src/credit-note/etims-credit-note-table.component.tsx +284 -0
- package/src/credit-note/etims-credit-note-table.scss +16 -0
- package/src/credit-note/etims-credit-note.resource.ts +96 -0
- package/src/credit-note/etims-credit-note.types.ts +56 -0
- package/src/credit-note/etims-credit-note.workspace.scss +76 -0
- package/src/credit-note/etims-credit-note.workspace.tsx +267 -0
- package/src/declarations.d.ts +2 -0
- package/src/global-properties/etims-global-properties-dashboard.component.tsx +141 -0
- package/src/global-properties/etims-global-properties-dashboard.scss +62 -0
- package/src/global-properties/etims-global-properties-form.workspace.scss +74 -0
- package/src/global-properties/etims-global-properties-form.workspace.tsx +244 -0
- package/src/global-properties/etims-global-properties.resource.ts +60 -0
- package/src/index.ts +100 -0
- package/src/item-mapping/etims-item-mapping-dashboard.component.tsx +29 -0
- package/src/item-mapping/etims-item-mapping-dashboard.scss +42 -0
- package/src/item-mapping/etims-item-mapping-form.fields.tsx +136 -0
- package/src/item-mapping/etims-item-mapping-form.schema.ts +35 -0
- package/src/item-mapping/etims-item-mapping-form.workspace.scss +54 -0
- package/src/item-mapping/etims-item-mapping-form.workspace.tsx +555 -0
- package/src/item-mapping/etims-item-mapping-table.component.tsx +398 -0
- package/src/item-mapping/etims-item-mapping-table.scss +20 -0
- package/src/item-mapping/etims-item-mapping.resource.ts +318 -0
- package/src/item-mapping/etims-item-mapping.types.ts +92 -0
- package/src/item-mapping/register-item-mapping.modal.tsx +113 -0
- package/src/item-mapping/void-item-mapping.modal.tsx +80 -0
- package/src/left-panel-link.component.tsx +39 -0
- package/src/left-panel-link.scss +12 -0
- package/src/reference-data/etims-catalog-table.component.tsx +178 -0
- package/src/reference-data/etims-catalog-table.scss +16 -0
- package/src/reference-data/etims-code-table.component.tsx +87 -0
- package/src/reference-data/etims-item-class-table.component.tsx +86 -0
- package/src/reference-data/etims-reference-data-dashboard.component.tsx +38 -0
- package/src/reference-data/etims-reference-data-dashboard.scss +11 -0
- package/src/reference-data/etims-reference-data.resource.ts +40 -0
- package/src/reference-data/etims-reference-data.types.ts +38 -0
- package/src/reference-data/etims-sync-meta.modal.tsx +62 -0
- package/src/root.component.tsx +38 -0
- package/src/root.scss +11 -0
- package/src/routes.json +117 -0
- package/src/status/etims-status-dashboard.component.tsx +212 -0
- package/src/status/etims-status-dashboard.scss +116 -0
- package/src/status/etims-status.resource.ts +20 -0
- package/src/status/etims-status.types.ts +30 -0
- package/src/transaction/confirm-transaction-action.modal.tsx +113 -0
- package/src/transaction/etims-transaction-dashboard.component.tsx +23 -0
- package/src/transaction/etims-transaction-dashboard.scss +8 -0
- package/src/transaction/etims-transaction-details.workspace.scss +76 -0
- package/src/transaction/etims-transaction-details.workspace.tsx +201 -0
- package/src/transaction/etims-transaction-table.component.tsx +450 -0
- package/src/transaction/etims-transaction-table.scss +20 -0
- package/src/transaction/etims-transaction.resource.ts +180 -0
- package/src/transaction/etims-transaction.types.ts +78 -0
- package/src/transaction/override-reconciliation.modal.scss +7 -0
- package/src/transaction/override-reconciliation.modal.tsx +203 -0
- package/translations/am.json +129 -0
- package/translations/en.json +129 -0
- package/translations/fr.json +130 -0
- package/translations/sw.json +129 -0
- package/tsconfig.json +5 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
@use '@carbon/colors';
|
|
2
|
+
@use '@carbon/layout';
|
|
3
|
+
@use '@carbon/type';
|
|
4
|
+
|
|
5
|
+
.form {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
height: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.formContainer {
|
|
13
|
+
margin: layout.$spacing-05;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: layout.$spacing-05;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.section {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
gap: layout.$spacing-03;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.sectionTitle {
|
|
26
|
+
@include type.type-style('heading-compact-01');
|
|
27
|
+
margin: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.detailList {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
gap: layout.$spacing-03;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.detailRow {
|
|
37
|
+
display: grid;
|
|
38
|
+
grid-template-columns: 12rem 1fr;
|
|
39
|
+
gap: layout.$spacing-03;
|
|
40
|
+
align-items: start;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.detailLabel {
|
|
44
|
+
@include type.type-style('label-01');
|
|
45
|
+
color: colors.$gray-70;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.detailValue {
|
|
49
|
+
@include type.type-style('body-compact-01');
|
|
50
|
+
overflow-wrap: anywhere;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.tablet {
|
|
54
|
+
padding: layout.$spacing-06 layout.$spacing-05;
|
|
55
|
+
background-color: colors.$white;
|
|
56
|
+
|
|
57
|
+
& button {
|
|
58
|
+
max-width: 50% !important;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.desktop {
|
|
63
|
+
padding: 0;
|
|
64
|
+
|
|
65
|
+
& button {
|
|
66
|
+
max-width: 50% !important;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.buttonContainer {
|
|
71
|
+
max-width: 50%;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.qrLink {
|
|
75
|
+
word-break: break-all;
|
|
76
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { Button, ButtonSet, InlineLoading, Tag } from '@carbon/react';
|
|
3
|
+
import {
|
|
4
|
+
ErrorCard,
|
|
5
|
+
formatDatetime,
|
|
6
|
+
parseDate,
|
|
7
|
+
useLayoutType,
|
|
8
|
+
Workspace2,
|
|
9
|
+
type Workspace2DefinitionProps,
|
|
10
|
+
} from '@openmrs/esm-framework';
|
|
11
|
+
import classNames from 'classnames';
|
|
12
|
+
import { useTranslation } from 'react-i18next';
|
|
13
|
+
import { useEtimsReconciliationOverrides, useEtimsTransaction } from './etims-transaction.resource';
|
|
14
|
+
import type { EtimsTransaction } from './etims-transaction.types';
|
|
15
|
+
import styles from './etims-transaction-details.workspace.scss';
|
|
16
|
+
|
|
17
|
+
type EtimsTransactionDetailsWorkspaceProps = {
|
|
18
|
+
transaction?: EtimsTransaction | null;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const displayValue = (value?: string | number | boolean | null) => {
|
|
22
|
+
if (value === null || value === undefined || value === '') {
|
|
23
|
+
return '--';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return String(value);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const formatNullableDatetime = (value?: string | null) => {
|
|
30
|
+
if (!value) {
|
|
31
|
+
return '--';
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
try {
|
|
35
|
+
return formatDatetime(parseDate(value), { mode: 'standard', noToday: true });
|
|
36
|
+
} catch {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const statusTagType = (status?: string | null): 'green' | 'red' | 'blue' | 'cyan' | 'magenta' | 'purple' | 'gray' => {
|
|
42
|
+
if (status === 'CONFIRMED') {
|
|
43
|
+
return 'green';
|
|
44
|
+
}
|
|
45
|
+
if (status === 'PERMANENTLY_FAILED' || status === 'ACTION_REQUIRED') {
|
|
46
|
+
return 'red';
|
|
47
|
+
}
|
|
48
|
+
if (status === 'RECONCILIATION_REQUIRED') {
|
|
49
|
+
return 'magenta';
|
|
50
|
+
}
|
|
51
|
+
if (status === 'RETRY') {
|
|
52
|
+
return 'purple';
|
|
53
|
+
}
|
|
54
|
+
if (status === 'SUBMITTED' || status === 'PROCESSING') {
|
|
55
|
+
return 'cyan';
|
|
56
|
+
}
|
|
57
|
+
if (status === 'PENDING') {
|
|
58
|
+
return 'blue';
|
|
59
|
+
}
|
|
60
|
+
return 'gray';
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const DetailRow: React.FC<{ label: string; value: React.ReactNode }> = ({ label, value }) => (
|
|
64
|
+
<div className={styles.detailRow}>
|
|
65
|
+
<span className={styles.detailLabel}>{label}</span>
|
|
66
|
+
<span className={styles.detailValue}>{value}</span>
|
|
67
|
+
</div>
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
const EtimsTransactionDetailsWorkspace: React.FC<
|
|
71
|
+
Workspace2DefinitionProps<EtimsTransactionDetailsWorkspaceProps, {}, {}>
|
|
72
|
+
> = ({ closeWorkspace, workspaceProps }) => {
|
|
73
|
+
const { t } = useTranslation();
|
|
74
|
+
const isTablet = useLayoutType() === 'tablet';
|
|
75
|
+
const listedTransaction = workspaceProps?.transaction;
|
|
76
|
+
const { transaction, error, isLoading } = useEtimsTransaction(listedTransaction?.uuid);
|
|
77
|
+
const { overrides, isLoading: isLoadingOverrides } = useEtimsReconciliationOverrides(listedTransaction?.uuid);
|
|
78
|
+
const details = transaction ?? listedTransaction ?? null;
|
|
79
|
+
|
|
80
|
+
const title = t('transactionDetails', 'Transaction details');
|
|
81
|
+
|
|
82
|
+
const rows = useMemo(() => {
|
|
83
|
+
if (!details) {
|
|
84
|
+
return [];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return [
|
|
88
|
+
{ label: t('billId', 'Bill ID'), value: displayValue(details.billId) },
|
|
89
|
+
{ label: t('transactionType', 'Type'), value: displayValue(details.transactionType) },
|
|
90
|
+
{
|
|
91
|
+
label: t('status', 'Status'),
|
|
92
|
+
value: (
|
|
93
|
+
<Tag type={statusTagType(details.status)} size="sm">
|
|
94
|
+
{displayValue(details.status)}
|
|
95
|
+
</Tag>
|
|
96
|
+
),
|
|
97
|
+
},
|
|
98
|
+
{ label: t('revisionNumber', 'Revision'), value: displayValue(details.revisionNumber) },
|
|
99
|
+
{ label: t('traderInvoiceNumber', 'Trader invoice'), value: displayValue(details.traderInvoiceNumber) },
|
|
100
|
+
{ label: t('kraInvoiceNumber', 'KRA invoice'), value: displayValue(details.kraInvoiceNumber) },
|
|
101
|
+
{ label: t('cuInvoiceNumber', 'CU invoice'), value: displayValue(details.cuInvoiceNumber) },
|
|
102
|
+
{ label: t('kraReceiptNumber', 'KRA receipt'), value: displayValue(details.kraReceiptNumber) },
|
|
103
|
+
{ label: t('resultCode', 'Result code'), value: displayValue(details.resultCode) },
|
|
104
|
+
{ label: t('resultMessage', 'Last result'), value: displayValue(details.resultMessage) },
|
|
105
|
+
{ label: t('failureCategory', 'Failure category'), value: displayValue(details.failureCategory) },
|
|
106
|
+
{ label: t('attemptCount', 'Attempts'), value: displayValue(details.attemptCount) },
|
|
107
|
+
{ label: t('sdcId', 'SDC ID'), value: displayValue(details.sdcId) },
|
|
108
|
+
{ label: t('mrcNumber', 'MRC number'), value: displayValue(details.mrcNumber) },
|
|
109
|
+
{
|
|
110
|
+
label: t('qrUrl', 'QR URL'),
|
|
111
|
+
value: details.qrUrl ? (
|
|
112
|
+
<a className={styles.qrLink} href={details.qrUrl} rel="noreferrer" target="_blank">
|
|
113
|
+
{details.qrUrl}
|
|
114
|
+
</a>
|
|
115
|
+
) : (
|
|
116
|
+
'--'
|
|
117
|
+
),
|
|
118
|
+
},
|
|
119
|
+
{ label: t('receiptSignature', 'Receipt signature'), value: displayValue(details.receiptSignature) },
|
|
120
|
+
{ label: t('publicationDate', 'Publication date'), value: formatNullableDatetime(details.publicationDate) },
|
|
121
|
+
{ label: t('originalTransactionId', 'Original transaction'), value: displayValue(details.originalTransactionId) },
|
|
122
|
+
{ label: t('dateCreated', 'Date created'), value: formatNullableDatetime(details.dateCreated) },
|
|
123
|
+
{ label: t('confirmedAt', 'Confirmed at'), value: formatNullableDatetime(details.confirmedAt) },
|
|
124
|
+
{ label: t('nextAttemptAt', 'Next attempt'), value: formatNullableDatetime(details.nextAttemptAt) },
|
|
125
|
+
];
|
|
126
|
+
}, [details, t]);
|
|
127
|
+
|
|
128
|
+
if (isLoading && !details) {
|
|
129
|
+
return (
|
|
130
|
+
<Workspace2 title={title}>
|
|
131
|
+
<div className={styles.formContainer}>
|
|
132
|
+
<InlineLoading description={t('loadingTransaction', 'Loading transaction...')} />
|
|
133
|
+
</div>
|
|
134
|
+
</Workspace2>
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (error && !details) {
|
|
139
|
+
return (
|
|
140
|
+
<Workspace2 title={title}>
|
|
141
|
+
<div className={styles.formContainer}>
|
|
142
|
+
<ErrorCard error={error} headerTitle={t('transactionDetailsError', 'Transaction details')} />
|
|
143
|
+
</div>
|
|
144
|
+
</Workspace2>
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
return (
|
|
149
|
+
<Workspace2 title={title}>
|
|
150
|
+
<div className={styles.form}>
|
|
151
|
+
<div className={styles.formContainer}>
|
|
152
|
+
<section className={styles.section}>
|
|
153
|
+
<h3 className={styles.sectionTitle}>{t('fiscalOutbox', 'Fiscal outbox')}</h3>
|
|
154
|
+
<div className={styles.detailList}>
|
|
155
|
+
{rows.map((row) => (
|
|
156
|
+
<DetailRow key={row.label} label={row.label} value={row.value} />
|
|
157
|
+
))}
|
|
158
|
+
</div>
|
|
159
|
+
</section>
|
|
160
|
+
|
|
161
|
+
<section className={styles.section}>
|
|
162
|
+
<h3 className={styles.sectionTitle}>{t('reconciliationOverrides', 'Reconciliation overrides')}</h3>
|
|
163
|
+
{isLoadingOverrides ? (
|
|
164
|
+
<InlineLoading description={t('loadingOverrides', 'Loading overrides...')} />
|
|
165
|
+
) : overrides.length === 0 ? (
|
|
166
|
+
<p className={styles.detailValue}>{t('noReconciliationOverrides', 'No reconciliation overrides')}</p>
|
|
167
|
+
) : (
|
|
168
|
+
overrides.map((override) => (
|
|
169
|
+
<div className={styles.detailList} key={override.uuid}>
|
|
170
|
+
<DetailRow label={t('overrideAction', 'Action')} value={displayValue(override.action)} />
|
|
171
|
+
<DetailRow
|
|
172
|
+
label={t('previousStatus', 'Previous status')}
|
|
173
|
+
value={displayValue(override.previousStatus)}
|
|
174
|
+
/>
|
|
175
|
+
<DetailRow label={t('newStatus', 'New status')} value={displayValue(override.newStatus)} />
|
|
176
|
+
<DetailRow label={t('reason', 'Reason')} value={displayValue(override.reason)} />
|
|
177
|
+
<DetailRow
|
|
178
|
+
label={t('evidenceReference', 'Evidence')}
|
|
179
|
+
value={displayValue(override.evidenceReference)}
|
|
180
|
+
/>
|
|
181
|
+
<DetailRow
|
|
182
|
+
label={t('dateCreated', 'Date created')}
|
|
183
|
+
value={formatNullableDatetime(override.dateCreated)}
|
|
184
|
+
/>
|
|
185
|
+
</div>
|
|
186
|
+
))
|
|
187
|
+
)}
|
|
188
|
+
</section>
|
|
189
|
+
</div>
|
|
190
|
+
|
|
191
|
+
<ButtonSet className={classNames({ [styles.tablet]: isTablet, [styles.desktop]: !isTablet })}>
|
|
192
|
+
<Button className={styles.buttonContainer} kind="secondary" onClick={() => closeWorkspace()}>
|
|
193
|
+
{t('close', 'Close')}
|
|
194
|
+
</Button>
|
|
195
|
+
</ButtonSet>
|
|
196
|
+
</div>
|
|
197
|
+
</Workspace2>
|
|
198
|
+
);
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
export default EtimsTransactionDetailsWorkspace;
|