feat(MED-100): show analysis packages and analyses in separate block from tto services
This commit is contained in:
@@ -22,12 +22,12 @@ const IS_DISCOUNT_SHOWN = false as boolean;
|
||||
|
||||
export default function Cart({
|
||||
cart,
|
||||
analysisPackages,
|
||||
otherItems,
|
||||
synlabAnalyses,
|
||||
ttoServiceItems,
|
||||
}: {
|
||||
cart: StoreCart | null
|
||||
analysisPackages: StoreCartLineItem[];
|
||||
otherItems: StoreCartLineItem[];
|
||||
synlabAnalyses: StoreCartLineItem[];
|
||||
ttoServiceItems: StoreCartLineItem[];
|
||||
}) {
|
||||
const { i18n: { language } } = useTranslation();
|
||||
|
||||
@@ -68,13 +68,13 @@ export default function Cart({
|
||||
}
|
||||
|
||||
const hasCartItems = Array.isArray(cart.items) && cart.items.length > 0;
|
||||
const isLocationsShown = analysisPackages.length > 0;
|
||||
const isLocationsShown = synlabAnalyses.length > 0;
|
||||
|
||||
return (
|
||||
<div className="grid grid-cols-1 small:grid-cols-[1fr_360px] gap-x-40 lg:px-4">
|
||||
<div className="flex flex-col bg-white gap-y-6">
|
||||
<CartItems cart={cart} items={analysisPackages} productColumnLabelKey="cart:items.analysisPackages.productColumnLabel" />
|
||||
<CartItems cart={cart} items={otherItems} productColumnLabelKey="cart:items.services.productColumnLabel" />
|
||||
<CartItems cart={cart} items={synlabAnalyses} productColumnLabelKey="cart:items.synlabAnalyses.productColumnLabel" />
|
||||
<CartItems cart={cart} items={ttoServiceItems} productColumnLabelKey="cart:items.ttoServices.productColumnLabel" />
|
||||
</div>
|
||||
{hasCartItems && (
|
||||
<div className="flex justify-end gap-x-4 px-6 py-4">
|
||||
@@ -121,7 +121,7 @@ export default function Cart({
|
||||
</h5>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<AnalysisLocation cart={{ ...cart }} analysisPackages={analysisPackages} />
|
||||
<AnalysisLocation cart={{ ...cart }} synlabAnalyses={synlabAnalyses} />
|
||||
</CardContent>
|
||||
</Card>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user