@openmrs/esm-stock-management-app 3.0.1-pre.840 → 3.0.1-pre.845
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/dist/10.js +1 -1
- package/dist/119.js +1 -1
- package/dist/14.js +1 -0
- package/dist/14.js.map +1 -0
- package/dist/152.js +1 -0
- package/dist/152.js.map +1 -0
- package/dist/172.js +1 -1
- package/dist/20.js +1 -1
- package/dist/235.js +1 -0
- package/dist/235.js.map +1 -0
- package/dist/290.js +1 -1
- package/dist/467.js +1 -1
- package/dist/574.js +1 -1
- package/dist/606.js +1 -1
- package/dist/627.js +1 -1
- package/dist/642.js +1 -1
- package/dist/675.js +1 -1
- package/dist/703.js +1 -0
- package/dist/703.js.map +1 -0
- package/dist/727.js +1 -1
- package/dist/842.js +2 -0
- package/dist/842.js.map +1 -0
- package/dist/93.js +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-stock-management-app.js +1 -1
- package/dist/openmrs-esm-stock-management-app.js.buildmanifest.json +127 -55
- package/dist/openmrs-esm-stock-management-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/core/components/card/metrics-card-component.tsx +24 -21
- package/src/core/components/card/metrics-card.scss +46 -8
- package/src/dashboard/home-dashboard.scss +0 -4
- package/src/index.ts +61 -42
- package/src/routes.json +12 -4
- package/src/stock-home/{stock-home-inventory-expiry.component.tsx → expired-stock.modal.tsx} +26 -14
- package/src/stock-home/{stock-home-issuing-modal.component.tsx → issuing-stock.modal.tsx} +26 -14
- package/src/stock-home/{stock-home-receiving-modal.component.tsx → receiving-stock.modal.tsx} +27 -20
- package/src/stock-home/stock-home-detail-card.scss +24 -30
- package/src/stock-home/stock-home-detail-cards.component.tsx +34 -33
- package/src/stock-home/stock-home-inventory-card.component.tsx +19 -33
- package/src/stock-home/{stock-home-inventory-expiry.resource.tsx → stock-home-inventory-expiry.resource.ts} +2 -7
- package/src/stock-home/{stock-home-inventory-items.resource.tsx → stock-home-inventory-items.resource.ts} +2 -1
- package/src/stock-home/stock-home-issuing-card.component.tsx +17 -28
- package/src/stock-home/stock-home-landing-page-component.tsx +1 -3
- package/src/stock-home/{stock-home-metrics.tsx → stock-home-metrics.component.tsx} +37 -40
- package/src/stock-home/stock-home-receiving-card.component.tsx +16 -27
- package/src/stock-home/stock-home.scss +5 -5
- package/src/stock-items/add-stock-item/stock-item-rules/add-stock-rule-button.component.tsx +1 -1
- package/translations/en.json +34 -29
- package/dist/165.js +0 -2
- package/dist/165.js.map +0 -1
- package/dist/769.js +0 -1
- package/dist/769.js.map +0 -1
- /package/dist/{165.js.LICENSE.txt → 842.js.LICENSE.txt} +0 -0
- /package/src/stock-home/{stock-home-issuing.resource.tsx → stock-home-issuing.resource.ts} +0 -0
- /package/src/stock-home/{stock-home-receiving.resource.tsx → stock-home-receiving.resource.ts} +0 -0
@@ -1,36 +1,41 @@
|
|
1
|
+
@use '@carbon/colors';
|
1
2
|
@use '@carbon/layout';
|
2
3
|
@use '@carbon/type';
|
3
|
-
@use '@
|
4
|
-
|
4
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
5
|
+
|
5
6
|
.tileContainer {
|
6
|
-
border: 0.0625rem solid $ui-03;
|
7
|
-
flex-grow: 1;
|
8
|
-
height: 7.875rem;
|
9
|
-
padding: 0 layout.$spacing-04;
|
10
7
|
background-color: colors.$white;
|
8
|
+
border: 1px solid $ui-03;
|
11
9
|
display: flex;
|
12
10
|
flex-direction: column;
|
11
|
+
flex-grow: 1;
|
12
|
+
height: 7.875rem;
|
13
13
|
justify-content: space-between;
|
14
|
-
|
14
|
+
padding: layout.$spacing-05;
|
15
15
|
}
|
16
|
+
|
16
17
|
.tileHeader {
|
17
18
|
display: flex;
|
18
19
|
justify-content: space-between;
|
19
20
|
align-items: center;
|
20
21
|
margin-bottom: layout.$spacing-03;
|
21
22
|
}
|
23
|
+
|
22
24
|
.headerLabel {
|
23
25
|
@include type.type-style('label-02');
|
24
26
|
color: colors.$gray-70;
|
25
27
|
}
|
28
|
+
|
26
29
|
.totalsLabel {
|
27
30
|
@include type.type-style('label-01');
|
28
31
|
color: $text-02;
|
29
32
|
}
|
33
|
+
|
30
34
|
.totalsValue {
|
31
35
|
@include type.type-style('heading-04');
|
32
36
|
color: $ui-05;
|
33
37
|
}
|
38
|
+
|
34
39
|
.headerLabelContainer {
|
35
40
|
display: flex;
|
36
41
|
align-items: center;
|
@@ -38,26 +43,59 @@
|
|
38
43
|
justify-content: space-between;
|
39
44
|
width: 100%;
|
40
45
|
}
|
46
|
+
|
41
47
|
.link {
|
42
48
|
text-decoration: none;
|
43
49
|
display: flex;
|
44
50
|
align-items: flex-end;
|
51
|
+
color: $interactive-01;
|
52
|
+
|
53
|
+
svg {
|
54
|
+
margin-left: layout.$spacing-03;
|
55
|
+
}
|
45
56
|
}
|
57
|
+
|
46
58
|
.metricsGrid {
|
47
59
|
display: grid;
|
48
60
|
grid-template-columns: 1fr 1fr;
|
61
|
+
align-items: center;
|
49
62
|
}
|
63
|
+
|
50
64
|
.countGrid {
|
51
65
|
display: grid;
|
52
66
|
grid-template-columns: 1fr 1fr;
|
53
67
|
justify-self: flex-end;
|
54
68
|
column-gap: layout.$spacing-03;
|
69
|
+
align-items: center;
|
70
|
+
|
55
71
|
& > span {
|
56
72
|
font-size: 0.625rem !important;
|
57
73
|
margin: 0;
|
58
|
-
color: colors.$gray-70;
|
59
74
|
}
|
75
|
+
|
60
76
|
& > p {
|
61
77
|
margin: 0;
|
62
78
|
}
|
63
79
|
}
|
80
|
+
|
81
|
+
.in6MonthsLabel,
|
82
|
+
.belowMinLabel,
|
83
|
+
.expiredLabel {
|
84
|
+
color: colors.$red-60;
|
85
|
+
}
|
86
|
+
|
87
|
+
.in6MonthsValue,
|
88
|
+
.belowMinValue,
|
89
|
+
.expiredValue {
|
90
|
+
color: colors.$red-60;
|
91
|
+
}
|
92
|
+
|
93
|
+
.aboveMaxLabel,
|
94
|
+
.aboveMaxValue {
|
95
|
+
color: #319227;
|
96
|
+
}
|
97
|
+
|
98
|
+
.poorQualityLabel,
|
99
|
+
.poorQualityValue {
|
100
|
+
color: #faba5f;
|
101
|
+
}
|
package/src/index.ts
CHANGED
@@ -1,13 +1,11 @@
|
|
1
1
|
import { defineConfigSchema, getAsyncLifecycle, getSyncLifecycle } from '@openmrs/esm-framework';
|
2
2
|
import { configSchema } from './config-schema';
|
3
3
|
import { createDashboardLink } from './createDashboardLink';
|
4
|
+
import appMenu from './stock-app-menu-item/item.component';
|
5
|
+
import deletePackagingUnitModalButtonComponent from './stock-items/add-stock-item/packaging-units/packaging-units-delete-modal-button.component';
|
4
6
|
import Root from './root.component';
|
5
7
|
import SideMenu from './side-menu/side-menu.component';
|
6
|
-
import appMenu from './stock-app-menu-item/item.component';
|
7
8
|
import StockHomeLandingPage from './stock-home/stock-home-landing-page-component';
|
8
|
-
import deletePackagingUnitModalButtonComponent from './stock-items/add-stock-item/packaging-units/packaging-units-delete-modal-button.component';
|
9
|
-
import TransactionsBincardPrintPreview from './stock-items/add-stock-item/transactions/printout/transactions-print-bincard-preview.modal';
|
10
|
-
import TransactionsStockcardPrintPreview from './stock-items/add-stock-item/transactions/printout/transactions-print-stockcard-preview.modal';
|
11
9
|
import StockItems from './stock-items/stock-items.component';
|
12
10
|
import StockLocations from './stock-locations/stock-locations.component';
|
13
11
|
import stockManagementAdminCardLinkComponent from './stock-management-admin-card-link.component';
|
@@ -17,6 +15,8 @@ import StockReports from './stock-reports/report-list/stock-reports.component';
|
|
17
15
|
import StockSettings from './stock-settings/stock-settings.component';
|
18
16
|
import StockSources from './stock-sources/stock-sources.component';
|
19
17
|
import StockUserScopes from './stock-user-role-scopes/stock-user-role-scopes.component';
|
18
|
+
import TransactionsBincardPrintPreview from './stock-items/add-stock-item/transactions/printout/transactions-print-bincard-preview.modal';
|
19
|
+
import TransactionsStockcardPrintPreview from './stock-items/add-stock-item/transactions/printout/transactions-print-stockcard-preview.modal';
|
20
20
|
|
21
21
|
const moduleName = '@openmrs/esm-stock-management-app';
|
22
22
|
|
@@ -27,7 +27,59 @@ const options = {
|
|
27
27
|
|
28
28
|
export const importTranslation = require.context('../translations', false, /.json$/, 'lazy');
|
29
29
|
|
30
|
+
export const deleteStockModal = getAsyncLifecycle(() => import('./stock-sources/delete-stock-modal.component'), {
|
31
|
+
featureName: 'delete-stock-modal',
|
32
|
+
moduleName,
|
33
|
+
});
|
34
|
+
|
35
|
+
export const deleteUserScopeModal = getAsyncLifecycle(
|
36
|
+
() => import('./stock-user-role-scopes/delete-stock-user-scope-modal.component'),
|
37
|
+
{
|
38
|
+
featureName: 'delete-stock-user-scope-modal',
|
39
|
+
moduleName,
|
40
|
+
},
|
41
|
+
);
|
42
|
+
|
43
|
+
export const deletePackagingUnitModal = getAsyncLifecycle(
|
44
|
+
() => import('./stock-items/add-stock-item/packaging-units/packaging-units-delete-modal.component'),
|
45
|
+
{
|
46
|
+
featureName: 'delete-packaging-unit-modal',
|
47
|
+
moduleName,
|
48
|
+
},
|
49
|
+
);
|
50
|
+
|
51
|
+
export const deletePackagingUnitButton = getSyncLifecycle(deletePackagingUnitModalButtonComponent, {
|
52
|
+
featureName: 'delete-packaging-unit-button',
|
53
|
+
moduleName,
|
54
|
+
});
|
55
|
+
|
56
|
+
export const expiredStockModal = getAsyncLifecycle(() => import('./stock-home/expired-stock.modal'), {
|
57
|
+
featureName: 'expired-stock-modal',
|
58
|
+
moduleName,
|
59
|
+
});
|
60
|
+
|
61
|
+
export const importBulkStockItemsModal = getAsyncLifecycle(
|
62
|
+
() => import('./stock-items/add-bulk-stock-item/stock-items-bulk-import.component'),
|
63
|
+
{
|
64
|
+
featureName: 'import-bulk-stock-items-modal',
|
65
|
+
moduleName,
|
66
|
+
},
|
67
|
+
);
|
68
|
+
|
69
|
+
export const issuingStockModal = getAsyncLifecycle(() => import('./stock-home/issuing-stock.modal'), {
|
70
|
+
featureName: 'issuing-stock-modal',
|
71
|
+
moduleName,
|
72
|
+
});
|
73
|
+
|
74
|
+
export const root = getSyncLifecycle(Root, options);
|
75
|
+
|
76
|
+
export const receivingStockModal = getAsyncLifecycle(() => import('./stock-home/receiving-stock.modal'), {
|
77
|
+
featureName: 'receiving-stock-modal',
|
78
|
+
moduleName,
|
79
|
+
});
|
80
|
+
|
30
81
|
export const stockManagementAdminCardLink = getSyncLifecycle(stockManagementAdminCardLinkComponent, options);
|
82
|
+
|
31
83
|
export const stockNavMenu = getSyncLifecycle(SideMenu, options);
|
32
84
|
|
33
85
|
// t("overview","Overview")
|
@@ -46,6 +98,7 @@ export const stockOperationsLink = getSyncLifecycle(
|
|
46
98
|
|
47
99
|
// t("items","Items")
|
48
100
|
export const stockItems = getSyncLifecycle(StockItems, options);
|
101
|
+
|
49
102
|
export const stockItemsLink = getSyncLifecycle(createDashboardLink({ title: 'Items', name: 'items' }), options);
|
50
103
|
|
51
104
|
// t("useScopes","User role scopes")
|
@@ -79,37 +132,6 @@ export const stockSettingsLink = getSyncLifecycle(
|
|
79
132
|
|
80
133
|
export const stockManagement = getSyncLifecycle(stockManagementComponent, options);
|
81
134
|
|
82
|
-
export const root = getSyncLifecycle(Root, options);
|
83
|
-
|
84
|
-
export const deleteStockModal = getAsyncLifecycle(() => import('./stock-sources/delete-stock-modal.component'), {
|
85
|
-
featureName: 'delete-stock-modal',
|
86
|
-
moduleName,
|
87
|
-
});
|
88
|
-
|
89
|
-
export const deleteUserScopeModal = getAsyncLifecycle(
|
90
|
-
() => import('./stock-user-role-scopes/delete-stock-user-scope-modal.component'),
|
91
|
-
{
|
92
|
-
featureName: 'delete-stock-user-scope-modal',
|
93
|
-
moduleName,
|
94
|
-
},
|
95
|
-
);
|
96
|
-
|
97
|
-
export const deletePackagingUnitModal = getAsyncLifecycle(
|
98
|
-
() => import('./stock-items/add-stock-item/packaging-units/packaging-units-delete-modal.component'),
|
99
|
-
{
|
100
|
-
featureName: 'delete-packaging-unit-modal',
|
101
|
-
moduleName,
|
102
|
-
},
|
103
|
-
);
|
104
|
-
|
105
|
-
export const importBulkStockItemsModal = getAsyncLifecycle(
|
106
|
-
() => import('./stock-items/add-bulk-stock-item/stock-items-bulk-import.component'),
|
107
|
-
{
|
108
|
-
featureName: 'import-bulk-stock-items-modal',
|
109
|
-
moduleName,
|
110
|
-
},
|
111
|
-
);
|
112
|
-
|
113
135
|
export const stockOperationModal = getAsyncLifecycle(
|
114
136
|
() => import('./stock-operations/stock-operations-dialog/stock-operations-dialog.component'),
|
115
137
|
{
|
@@ -118,15 +140,8 @@ export const stockOperationModal = getAsyncLifecycle(
|
|
118
140
|
},
|
119
141
|
);
|
120
142
|
|
121
|
-
export const deletePackagingUnitButton = getSyncLifecycle(deletePackagingUnitModalButtonComponent, {
|
122
|
-
featureName: 'delete-packaging-unit-button',
|
123
|
-
moduleName,
|
124
|
-
});
|
125
|
-
|
126
143
|
export const stockManagementAppMenuItem = getSyncLifecycle(appMenu, options);
|
127
144
|
|
128
|
-
export const transactionBincardPrintPreviewModal = getSyncLifecycle(TransactionsBincardPrintPreview, options);
|
129
|
-
export const transactionStockcardPrintPreviewModal = getSyncLifecycle(TransactionsStockcardPrintPreview, options);
|
130
145
|
export const stockOperationFormWorkspace = getAsyncLifecycle(
|
131
146
|
() => import('./stock-operations/stock-operations-forms/stock-operation-form.component'),
|
132
147
|
options,
|
@@ -160,6 +175,10 @@ export const stockUserScopesFormWorkspace = getAsyncLifecycle(
|
|
160
175
|
options,
|
161
176
|
);
|
162
177
|
|
178
|
+
export const transactionBincardPrintPreviewModal = getSyncLifecycle(TransactionsBincardPrintPreview, options);
|
179
|
+
|
180
|
+
export const transactionStockcardPrintPreviewModal = getSyncLifecycle(TransactionsStockcardPrintPreview, options);
|
181
|
+
|
163
182
|
export function startupApp() {
|
164
183
|
defineConfigSchema(moduleName, configSchema);
|
165
184
|
}
|
package/src/routes.json
CHANGED
@@ -173,10 +173,18 @@
|
|
173
173
|
"name": "delete-packaging-unit-modal",
|
174
174
|
"component": "deletePackagingUnitModal"
|
175
175
|
},
|
176
|
+
{
|
177
|
+
"name": "expired-stock-modal",
|
178
|
+
"component": "expiredStockModal"
|
179
|
+
},
|
176
180
|
{
|
177
181
|
"name": "import-bulk-stock-items",
|
178
182
|
"component": "importBulkStockItemsModal"
|
179
183
|
},
|
184
|
+
{
|
185
|
+
"name": "receiving-stock-modal",
|
186
|
+
"component": "receivingStockModal"
|
187
|
+
},
|
180
188
|
{
|
181
189
|
"name": "stock-operation-dialog",
|
182
190
|
"component": "stockOperationModal"
|
@@ -214,7 +222,7 @@
|
|
214
222
|
"width": "extra-wide"
|
215
223
|
},
|
216
224
|
{
|
217
|
-
"name"
|
225
|
+
"name": "stock-sources-form-workspace",
|
218
226
|
"component": "stockSourcesFormWorkspace",
|
219
227
|
"title": "Stock Sources",
|
220
228
|
"type": "form",
|
@@ -222,7 +230,7 @@
|
|
222
230
|
"width": "extra-wide"
|
223
231
|
},
|
224
232
|
{
|
225
|
-
"name"
|
233
|
+
"name": "stock-location-form-workspace",
|
226
234
|
"component": "stockLocationsFormWorkspace",
|
227
235
|
"title": "Stock Locations",
|
228
236
|
"type": "form",
|
@@ -230,7 +238,7 @@
|
|
230
238
|
"width": "extra-wide"
|
231
239
|
},
|
232
240
|
{
|
233
|
-
"name"
|
241
|
+
"name": "stock-user-role-scopes-form-workspace",
|
234
242
|
"component": "stockUserScopesFormWorkspace",
|
235
243
|
"title": "User Role Scopes",
|
236
244
|
"type": "form",
|
@@ -238,7 +246,7 @@
|
|
238
246
|
"width": "extra-wide"
|
239
247
|
},
|
240
248
|
{
|
241
|
-
"name"
|
249
|
+
"name": "stock-reports-form-workspace",
|
242
250
|
"component": "stockReportsFormWorkspace",
|
243
251
|
"title": "Reports",
|
244
252
|
"type": "form",
|
package/src/stock-home/{stock-home-inventory-expiry.component.tsx → expired-stock.modal.tsx}
RENAMED
@@ -1,7 +1,25 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
2
|
+
import {
|
3
|
+
ModalBody,
|
4
|
+
ModalHeader,
|
5
|
+
Table,
|
6
|
+
TableBody,
|
7
|
+
TableCell,
|
8
|
+
TableContainer,
|
9
|
+
TableHead,
|
10
|
+
TableHeader,
|
11
|
+
TableRow,
|
12
|
+
} from '@carbon/react';
|
13
|
+
import { useTranslation } from 'react-i18next';
|
14
|
+
|
15
|
+
interface ExpiredStockModalProps {
|
16
|
+
closeModal: () => void;
|
17
|
+
expiredStock: any[];
|
18
|
+
}
|
19
|
+
|
20
|
+
const ExpiredStockModal = ({ closeModal, expiredStock }: ExpiredStockModalProps) => {
|
21
|
+
const { t } = useTranslation();
|
3
22
|
|
4
|
-
const ExpiredStockModal = ({ open, onClose, expiredStock }) => {
|
5
23
|
const headers = [
|
6
24
|
{ key: 'drugName', header: 'Drug Name' },
|
7
25
|
{ key: 'batchNo', header: 'Batch No' },
|
@@ -21,15 +39,9 @@ const ExpiredStockModal = ({ open, onClose, expiredStock }) => {
|
|
21
39
|
};
|
22
40
|
|
23
41
|
return (
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
modalHeading="Expired Stock"
|
28
|
-
primaryButtonText="Close"
|
29
|
-
onSecondarySubmit={onClose}
|
30
|
-
size="lg"
|
31
|
-
>
|
32
|
-
<div>
|
42
|
+
<>
|
43
|
+
<ModalHeader closeModal={closeModal} title={t('expiredStock', 'Expired stock')} />
|
44
|
+
<ModalBody>
|
33
45
|
{expiredStock.length > 0 ? (
|
34
46
|
<TableContainer>
|
35
47
|
<Table>
|
@@ -54,10 +66,10 @@ const ExpiredStockModal = ({ open, onClose, expiredStock }) => {
|
|
54
66
|
</Table>
|
55
67
|
</TableContainer>
|
56
68
|
) : (
|
57
|
-
<p>No expired stock data available
|
69
|
+
<p>{t('noExpiredStockDataAvailable', 'No expired stock data available.')}</p>
|
58
70
|
)}
|
59
|
-
</
|
60
|
-
|
71
|
+
</ModalBody>
|
72
|
+
</>
|
61
73
|
);
|
62
74
|
};
|
63
75
|
|
@@ -1,7 +1,25 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
2
|
+
import {
|
3
|
+
ModalBody,
|
4
|
+
ModalHeader,
|
5
|
+
Table,
|
6
|
+
TableBody,
|
7
|
+
TableCell,
|
8
|
+
TableContainer,
|
9
|
+
TableHead,
|
10
|
+
TableHeader,
|
11
|
+
TableRow,
|
12
|
+
} from '@carbon/react';
|
13
|
+
import { useTranslation } from 'react-i18next';
|
14
|
+
|
15
|
+
interface IssuingStockModalProps {
|
16
|
+
issuingStock: any[];
|
17
|
+
closeModal: () => void;
|
18
|
+
}
|
19
|
+
|
20
|
+
const IssuingStockModal = ({ issuingStock, closeModal }: IssuingStockModalProps) => {
|
21
|
+
const { t } = useTranslation();
|
3
22
|
|
4
|
-
const IssuingStockModal = ({ open, onClose, issuingStock }) => {
|
5
23
|
const headers = [
|
6
24
|
{ key: 'status', header: 'Status' },
|
7
25
|
{ key: 'sourceName', header: 'Source' },
|
@@ -12,15 +30,9 @@ const IssuingStockModal = ({ open, onClose, issuingStock }) => {
|
|
12
30
|
];
|
13
31
|
|
14
32
|
return (
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
modalHeading="Issued Stock"
|
19
|
-
primaryButtonText="Close"
|
20
|
-
onSecondarySubmit={onClose}
|
21
|
-
size="lg"
|
22
|
-
>
|
23
|
-
<div>
|
33
|
+
<>
|
34
|
+
<ModalHeader closeModal={closeModal} title={t('issuedStock', 'Issued stock')} />
|
35
|
+
<ModalBody>
|
24
36
|
{issuingStock && issuingStock.length > 0 ? (
|
25
37
|
<TableContainer>
|
26
38
|
<Table>
|
@@ -46,10 +58,10 @@ const IssuingStockModal = ({ open, onClose, issuingStock }) => {
|
|
46
58
|
</Table>
|
47
59
|
</TableContainer>
|
48
60
|
) : (
|
49
|
-
<p>No issued stock data available
|
61
|
+
<p>{t('noIssuedStockDataAvailable', 'No issued stock data available.')}</p>
|
50
62
|
)}
|
51
|
-
</
|
52
|
-
|
63
|
+
</ModalBody>
|
64
|
+
</>
|
53
65
|
);
|
54
66
|
};
|
55
67
|
|
package/src/stock-home/{stock-home-receiving-modal.component.tsx → receiving-stock.modal.tsx}
RENAMED
@@ -1,26 +1,33 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
2
|
+
import {
|
3
|
+
ModalBody,
|
4
|
+
ModalHeader,
|
5
|
+
Table,
|
6
|
+
TableBody,
|
7
|
+
TableCell,
|
8
|
+
TableContainer,
|
9
|
+
TableHead,
|
10
|
+
TableHeader,
|
11
|
+
TableRow,
|
12
|
+
} from '@carbon/react';
|
13
|
+
import { useTranslation } from 'react-i18next';
|
14
|
+
|
15
|
+
const ReceivingStockModal = ({ closeModal, receivingStock }) => {
|
16
|
+
const { t } = useTranslation();
|
3
17
|
|
4
|
-
const ReceivingStockModal = ({ open, onClose, receivingStock }) => {
|
5
18
|
const headers = [
|
6
|
-
{ key: 'status', header: 'Status' },
|
7
|
-
{ key: 'sourceName', header: 'Source' },
|
8
|
-
{ key: 'destinationName', header: 'Destination' },
|
9
|
-
{ key: 'stockItemName', header: 'Stock Item' },
|
10
|
-
{ key: 'stockItemPackagingUOMName', header: 'Unit' },
|
11
|
-
{ key: 'quantity', header: 'Quantity' },
|
19
|
+
{ key: 'status', header: t('status', 'Status') },
|
20
|
+
{ key: 'sourceName', header: t('source', 'Source') },
|
21
|
+
{ key: 'destinationName', header: t('destination', 'Destination') },
|
22
|
+
{ key: 'stockItemName', header: t('stockItem', 'Stock Item') },
|
23
|
+
{ key: 'stockItemPackagingUOMName', header: t('unit', 'Unit') },
|
24
|
+
{ key: 'quantity', header: t('quantity', 'Quantity') },
|
12
25
|
];
|
13
26
|
|
14
27
|
return (
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
modalHeading="Received Stock"
|
19
|
-
primaryButtonText="Close"
|
20
|
-
onSecondarySubmit={onClose}
|
21
|
-
size="lg"
|
22
|
-
>
|
23
|
-
<div>
|
28
|
+
<>
|
29
|
+
<ModalHeader closeModal={closeModal} title={t('receivedStock', 'Received stock')} />
|
30
|
+
<ModalBody>
|
24
31
|
{receivingStock && receivingStock.length > 0 ? (
|
25
32
|
<TableContainer>
|
26
33
|
<Table>
|
@@ -48,10 +55,10 @@ const ReceivingStockModal = ({ open, onClose, receivingStock }) => {
|
|
48
55
|
</Table>
|
49
56
|
</TableContainer>
|
50
57
|
) : (
|
51
|
-
<p>No received stock data available
|
58
|
+
<p>{t('noReceivedStockDataAvailable', 'No received stock data available.')}</p>
|
52
59
|
)}
|
53
|
-
</
|
54
|
-
|
60
|
+
</ModalBody>
|
61
|
+
</>
|
55
62
|
);
|
56
63
|
};
|
57
64
|
|
@@ -1,9 +1,10 @@
|
|
1
|
+
@use '@carbon/colors';
|
1
2
|
@use '@carbon/layout';
|
2
3
|
@use '@carbon/type';
|
3
|
-
@use '
|
4
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
4
5
|
|
5
6
|
.container {
|
6
|
-
margin:
|
7
|
+
margin: layout.$spacing-07 0;
|
7
8
|
}
|
8
9
|
|
9
10
|
.emptyStateContainer,
|
@@ -12,13 +13,9 @@
|
|
12
13
|
}
|
13
14
|
|
14
15
|
.tilesContainer {
|
15
|
-
background-color: $ui-02;
|
16
16
|
border: 1px solid $ui-03;
|
17
|
-
|
17
|
+
min-height: 7.875rem;
|
18
18
|
width: 100%;
|
19
|
-
margin: 0 auto;
|
20
|
-
max-width: 95vw;
|
21
|
-
padding-bottom: 0;
|
22
19
|
}
|
23
20
|
|
24
21
|
.headerContainer {
|
@@ -92,13 +89,13 @@
|
|
92
89
|
@include type.type-style('heading-compact-01');
|
93
90
|
color: $text-02;
|
94
91
|
margin-top: layout.$spacing-05;
|
95
|
-
margin-bottom: layout.$spacing-03;
|
96
92
|
}
|
97
93
|
|
98
94
|
.desktopHeading,
|
99
95
|
.tabletHeading {
|
100
96
|
text-align: left;
|
101
97
|
text-transform: capitalize;
|
98
|
+
margin-bottom: layout.$spacing-05;
|
102
99
|
|
103
100
|
h4 {
|
104
101
|
@include type.type-style('heading-compact-02');
|
@@ -115,11 +112,6 @@
|
|
115
112
|
}
|
116
113
|
}
|
117
114
|
|
118
|
-
.tile {
|
119
|
-
text-align: center;
|
120
|
-
border: 1px solid $ui-03;
|
121
|
-
}
|
122
|
-
|
123
115
|
.filterEmptyState {
|
124
116
|
display: flex;
|
125
117
|
justify-content: center;
|
@@ -146,24 +138,26 @@
|
|
146
138
|
|
147
139
|
.cardContainer {
|
148
140
|
display: flex;
|
149
|
-
|
141
|
+
padding: layout.$spacing-05;
|
142
|
+
background-color: #ffffff;
|
143
|
+
flex-flow: row wrap;
|
144
|
+
flex-grow: 1;
|
145
|
+
gap: layout.$spacing-05;
|
146
|
+
align-items: stretch;
|
150
147
|
}
|
151
148
|
|
152
149
|
.cardContainer > * {
|
153
|
-
flex: 1;
|
154
|
-
|
155
|
-
}
|
156
|
-
|
157
|
-
.cardContainerBig {
|
158
|
-
display: flex;
|
159
|
-
flex-direction: column;
|
150
|
+
flex: 1 1 0;
|
151
|
+
height: 100%;
|
160
152
|
}
|
161
153
|
|
162
154
|
.card {
|
163
155
|
display: flex;
|
164
|
-
|
156
|
+
flex-direction: column;
|
165
157
|
margin: 10px;
|
166
|
-
background-color:
|
158
|
+
background-color: colors.$gray-10;
|
159
|
+
height: 100%;
|
160
|
+
justify-content: space-between;
|
167
161
|
}
|
168
162
|
|
169
163
|
.icon {
|
@@ -172,31 +166,31 @@
|
|
172
166
|
|
173
167
|
.colorLineYellow {
|
174
168
|
width: 5px;
|
175
|
-
background-color:
|
169
|
+
background-color: colors.$yellow-30;
|
176
170
|
margin-right: 10px;
|
177
171
|
}
|
178
172
|
|
179
173
|
.colorLineBlue {
|
180
174
|
width: 5px;
|
181
|
-
background-color:
|
175
|
+
background-color: colors.$blue-60;
|
182
176
|
margin-right: 10px;
|
183
177
|
}
|
184
178
|
|
185
179
|
.colorLineOrange {
|
186
180
|
width: 5px;
|
187
|
-
background-color:
|
181
|
+
background-color: colors.$orange-40;
|
188
182
|
margin-right: 10px;
|
189
183
|
}
|
190
184
|
|
191
185
|
.colorLineGreen {
|
192
186
|
width: 5px;
|
193
|
-
background-color:
|
187
|
+
background-color: colors.$green-60;
|
194
188
|
margin-right: 10px;
|
195
189
|
}
|
196
190
|
|
197
191
|
.colorLineRed {
|
198
192
|
width: 5px;
|
199
|
-
background-color:
|
193
|
+
background-color: colors.$red-60;
|
200
194
|
margin-right: 10px;
|
201
195
|
}
|
202
196
|
|
@@ -206,6 +200,6 @@
|
|
206
200
|
}
|
207
201
|
|
208
202
|
.cardText p {
|
209
|
-
font-size:
|
210
|
-
color:
|
203
|
+
font-size: layout.$spacing-05;
|
204
|
+
color: colors.$gray-70;
|
211
205
|
}
|