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

+12 -2
View File
@@ -250,7 +250,13 @@ export default function Header({
{/* Prescription Upload Button (Desktop & Mobile) */}
{isPrescriptionEnabled && (
<button
onClick={() => setIsPrescriptionModalOpen(true)}
onClick={() => {
if (!isLoggedIn) {
setIsAuthModalOpen(true);
} else {
setIsPrescriptionModalOpen(true);
}
}}
className="flex items-center gap-1.5 px-2.5 sm:px-3 py-2 bg-emerald-50 text-emerald-700 border border-emerald-200 hover:bg-emerald-100 rounded-xl text-[11px] sm:text-xs font-black transition-all shadow-xs cursor-pointer"
title="ثبت نسخه دامپزشک"
>
@@ -545,7 +551,11 @@ export default function Header({
type="button"
onClick={() => {
setIsMobileMenuOpen(false);
setIsPrescriptionModalOpen(true);
if (!isLoggedIn) {
setIsAuthModalOpen(true);
} else {
setIsPrescriptionModalOpen(true);
}
}}
className="w-full flex items-center justify-between p-3.5 bg-gradient-to-r from-emerald-500 to-teal-600 text-white rounded-2xl font-black text-xs shadow-md shadow-emerald-500/20 hover:brightness-105 transition-all cursor-pointer font-vazir"
>
@@ -348,17 +348,17 @@ export default function PrescriptionUploadModal({ isOpen, onClose }: Prescriptio
{/* Phone Number */}
<div>
<label className="block text-xs font-black text-medical-gray-700 mb-1">
شماره همراه جهت هماهنگی و پیامک تایید *
شماره همراه جهت هماهنگی و پیامک تایید
</label>
<div className="relative">
<input
type="tel"
dir="ltr"
required
readOnly={isLoggedIn && !!profile?.mobile}
placeholder="۰۹۱۲۳۴۵۶۷۸۹"
value={phone}
onChange={(e) => setPhone(e.target.value)}
className="w-full bg-white border border-medical-gray-200 rounded-xl py-2.5 pr-3 pl-11 text-xs font-mono font-bold text-medical-gray-900 focus:outline-none focus:ring-2 focus:ring-canina-blue/20"
className={`w-full border border-medical-gray-200 rounded-xl py-2.5 pr-3 pl-11 text-xs font-mono font-bold text-medical-gray-900 focus:outline-none focus:ring-2 focus:ring-canina-blue/20 ${isLoggedIn && profile?.mobile ? 'bg-medical-gray-100 text-medical-gray-600 cursor-not-allowed' : 'bg-white'}`}
/>
<Phone className="w-4 h-4 text-medical-gray-400 absolute left-3.5 top-1/2 -translate-y-1/2 pointer-events-none" />
</div>