@openmrs/esm-stock-management-app 1.0.1-pre.753 → 1.0.1-pre.763
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/172.js +1 -1
- package/dist/20.js +1 -1
- package/dist/290.js +1 -1
- package/dist/400.js +1 -0
- package/dist/400.js.map +1 -0
- package/dist/606.js +1 -1
- package/dist/627.js +1 -1
- package/dist/766.js +2 -0
- package/dist/766.js.map +1 -0
- 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 +62 -62
- package/dist/openmrs-esm-stock-management-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/stock-home/stock-home-inventory-card.component.tsx +12 -2
- package/src/stock-home/stock-home-inventory-expiry.component.tsx +64 -0
- package/src/stock-home/stock-home-issuing-card.component.tsx +10 -2
- package/src/stock-home/stock-home-issuing-modal.component.tsx +56 -0
- package/src/stock-home/stock-home-receiving-card.component.tsx +10 -2
- package/src/stock-home/stock-home-receiving-modal.component.tsx +58 -0
- package/src/stock-operations/stock-operations-table.component.tsx +1 -1
- package/dist/18.js +0 -1
- package/dist/18.js.map +0 -1
- package/dist/651.js +0 -2
- package/dist/651.js.map +0 -1
- /package/dist/{651.js.LICENSE.txt → 766.js.LICENSE.txt} +0 -0
@@ -0,0 +1,58 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Modal, Table, TableHead, TableRow, TableHeader, TableBody, TableCell, TableContainer } from '@carbon/react';
|
3
|
+
|
4
|
+
const ReceivingStockModal = ({ open, onClose, receivingStock }) => {
|
5
|
+
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' },
|
12
|
+
];
|
13
|
+
|
14
|
+
return (
|
15
|
+
<Modal
|
16
|
+
open={open}
|
17
|
+
onRequestClose={onClose}
|
18
|
+
modalHeading="Received Stock"
|
19
|
+
primaryButtonText="Close"
|
20
|
+
onSecondarySubmit={onClose}
|
21
|
+
size="lg"
|
22
|
+
>
|
23
|
+
<div>
|
24
|
+
{receivingStock && receivingStock.length > 0 ? (
|
25
|
+
<TableContainer>
|
26
|
+
<Table>
|
27
|
+
<TableHead>
|
28
|
+
<TableRow>
|
29
|
+
{headers.map((header) => (
|
30
|
+
<TableHeader key={header.key}>{header.header}</TableHeader>
|
31
|
+
))}
|
32
|
+
</TableRow>
|
33
|
+
</TableHead>
|
34
|
+
<TableBody>
|
35
|
+
{receivingStock.map((item, index) =>
|
36
|
+
item?.stockOperationItems.map((stock, stockIndex) => (
|
37
|
+
<TableRow key={`${index}-${stockIndex}`}>
|
38
|
+
<TableCell>{item?.status || 'N/A'}</TableCell>
|
39
|
+
<TableCell>{item?.sourceName || 'N/A'}</TableCell>
|
40
|
+
<TableCell>{item?.destinationName || 'N/A'}</TableCell>
|
41
|
+
<TableCell>{stock?.stockItemName || 'N/A'}</TableCell>
|
42
|
+
<TableCell>{stock?.stockItemPackagingUOMName || 'N/A'}</TableCell>
|
43
|
+
<TableCell>{stock?.quantity || 'N/A'}</TableCell>
|
44
|
+
</TableRow>
|
45
|
+
)),
|
46
|
+
)}
|
47
|
+
</TableBody>
|
48
|
+
</Table>
|
49
|
+
</TableContainer>
|
50
|
+
) : (
|
51
|
+
<p>No received stock data available.</p>
|
52
|
+
)}
|
53
|
+
</div>
|
54
|
+
</Modal>
|
55
|
+
);
|
56
|
+
};
|
57
|
+
|
58
|
+
export default ReceivingStockModal;
|
@@ -309,7 +309,7 @@ const StockOperations: React.FC<StockOperationsTableProps> = () => {
|
|
309
309
|
</Tile>
|
310
310
|
</div>
|
311
311
|
) : null}
|
312
|
-
{filterApplied && isLoading && (
|
312
|
+
{Boolean(filterApplied && isLoading) && (
|
313
313
|
<div className={styles.rowLoadingContainer}>
|
314
314
|
<InlineLoading description={t('loading', 'Loading...')} />
|
315
315
|
</div>
|