-
Notifications
You must be signed in to change notification settings - Fork 1.1k
ENG-613 Add expiry date to supply delivery table #16479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
5199d33
b39df8d
1069a54
e35e92b
1fc991d
f6e8cbd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -165,6 +165,10 @@ | |||||||||||||
| return map; | ||||||||||||||
| }, [deliveries]); | ||||||||||||||
|
|
||||||||||||||
| const formatExpiryDate = (expiryDate?: string) => { | ||||||||||||||
| return expiryDate ? formatDate(new Date(expiryDate), "dd/MM/yyyy") : "-"; | ||||||||||||||
| }; | ||||||||||||||
|
Comment on lines
+168
to
+170
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Comment on lines
+168
to
+170
|
||||||||||||||
|
|
||||||||||||||
| return ( | ||||||||||||||
| <Table> | ||||||||||||||
| <TableHeader> | ||||||||||||||
|
|
@@ -185,6 +189,7 @@ | |||||||||||||
| <TableHead rowSpan={2}>{t("#")}</TableHead> | ||||||||||||||
| <TableHead rowSpan={2}>{t("item")}</TableHead> | ||||||||||||||
| <TableHead rowSpan={2}>{t("batch")}</TableHead> | ||||||||||||||
| <TableHead rowSpan={2}>{t("expiry")}</TableHead> | ||||||||||||||
| <TableHead rowSpan={2}>{t("requested_qty")}</TableHead> | ||||||||||||||
| {!internal && <TableHead rowSpan={2}>{t("pack_size")}</TableHead>} | ||||||||||||||
| {!internal && <TableHead rowSpan={2}>{t("pack_qty")}</TableHead>} | ||||||||||||||
|
|
@@ -278,8 +283,12 @@ | |||||||||||||
| })()} | ||||||||||||||
| </TableCell> | ||||||||||||||
| <TableCell> | ||||||||||||||
| {delivery.supplied_inventory_item?.product?.batch?.lot_number || | ||||||||||||||
| "-"} | ||||||||||||||
| {delivery.supplied_inventory_item?.product?.batch?.lot_number || "-"} | ||||||||||||||
| </TableCell> | ||||||||||||||
| <TableCell> | ||||||||||||||
| {formatExpiryDate( | ||||||||||||||
| delivery.supplied_inventory_item?.product?.expiration_date, | ||||||||||||||
| )} | ||||||||||||||
| </TableCell> | ||||||||||||||
| <TableCell> | ||||||||||||||
| {delivery.supply_request | ||||||||||||||
|
|
||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are rendering expiry date's MM and YYYY only so far everywhere in CARE. Shouldn't we follow the same pattern here as well?