feat(inventory): implement numeric stock inventory across fullstack and improve prescription UX handoff
Deploy Canina / deploy (push) Failing after 2m31s
E2E Playwright Tests / Run Full E2E & Security Suites (push) Failing after 7s

This commit is contained in:
devops committed 2026-10-12 19:29:48 +00:00
1 parent e9582430e6
commit 741365f04c
13 files changed
+177 -47

No files matched your search

+7 -1
View File
@@ -231,7 +231,13 @@ export default function ClientLayout({ children }: { children: React.ReactNode }
onClose={() => setIsPrescriptionModalOpen(false)}
/>
<MobileBottomNav
onPrescriptionOpen={() => setIsPrescriptionModalOpen(true)}
onPrescriptionOpen={() => {
if (!isLoggedIn) {
setAuthModalOpen(true);
} else {
setIsPrescriptionModalOpen(true);
}
}}
/>
<Toaster position="top-center" expand={true} richColors closeButton />
</>
@@ -122,10 +122,10 @@ export default async function ShopProductPage({ params }: { params: Promise<{ sl
const productUrl = `${siteUrl}/shop/${resolvedParams.slug}`;
const priceInRial = product.priceValue * 10;
// Map stock status and packageSize to Schema.org availability
// Map stock status and stock quantity to Schema.org availability
const isOutOfStock =
product.stockStatus === 'OUT_OF_STOCK' ||
(typeof product.packageSize === 'number' && product.packageSize <= 0);
(typeof product.stock === 'number' && product.stock <= 0);
let availabilityUrl = 'https://schema.org/InStock';
if (product.stockStatus === 'DISCONTINUED') {