hey-pharmacist-ecommerce 1.1.41 → 1.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +370 -370
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +370 -370
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/AccountAddressesTab.tsx +9 -9
- package/src/components/AccountOrdersTab.tsx +11 -11
- package/src/components/AccountOverviewTab.tsx +21 -21
- package/src/components/AccountPaymentTab.tsx +2 -2
- package/src/components/AccountReviewsTab.tsx +1 -1
- package/src/components/AccountSettingsTab.tsx +6 -6
- package/src/components/AddressFormModal.tsx +2 -2
- package/src/components/CartItem.tsx +2 -2
- package/src/components/FilterChips.tsx +7 -7
- package/src/components/Footer.tsx +9 -9
- package/src/components/Header.tsx +7 -7
- package/src/components/NotificationBell.tsx +3 -3
- package/src/components/NotificationDrawer.tsx +1 -1
- package/src/components/NotificationModal.tsx +1 -1
- package/src/components/OrderCard.tsx +2 -2
- package/src/components/ProductCard.tsx +6 -6
- package/src/components/QuickViewModal.tsx +23 -23
- package/src/components/ReviewCard.tsx +4 -4
- package/src/components/TabNavigation.tsx +2 -2
- package/src/components/ui/Badge.tsx +2 -2
- package/src/components/ui/Button.tsx +3 -3
- package/src/components/ui/ConfirmModal.tsx +3 -3
- package/src/components/ui/Input.tsx +1 -1
- package/src/providers/ThemeProvider.tsx +2 -2
- package/src/screens/AddressesScreen.tsx +6 -6
- package/src/screens/CartScreen.tsx +19 -19
- package/src/screens/ChangePasswordScreen.tsx +2 -2
- package/src/screens/CheckoutScreen.tsx +21 -21
- package/src/screens/CurrentOrdersScreen.tsx +4 -4
- package/src/screens/EditProfileScreen.tsx +1 -1
- package/src/screens/ForgotPasswordScreen.tsx +11 -11
- package/src/screens/LoginScreen.tsx +12 -12
- package/src/screens/OrderDetailScreen.tsx +30 -30
- package/src/screens/OrdersScreen.tsx +3 -3
- package/src/screens/ProductDetailScreen.tsx +48 -48
- package/src/screens/ProfileScreen.tsx +2 -2
- package/src/screens/RegisterScreen.tsx +15 -15
- package/src/screens/ResetPasswordScreen.tsx +14 -14
- package/src/screens/SearchResultsScreen.tsx +7 -7
- package/src/screens/ShopScreen.tsx +50 -50
- package/src/screens/WishlistScreen.tsx +22 -22
- package/src/styles/globals.css +43 -43
|
@@ -595,13 +595,13 @@ export function CheckoutScreen() {
|
|
|
595
595
|
}
|
|
596
596
|
}}
|
|
597
597
|
className={`relative flex w-full items-center justify-between rounded-xl border-2 p-3 transition-all duration-200 ${active
|
|
598
|
-
? 'border-
|
|
599
|
-
: 'border-gray-200 hover:border-
|
|
598
|
+
? 'border-hprimary-500 bg-hprimary-50'
|
|
599
|
+
: 'border-gray-200 hover:border-hprimary-300'
|
|
600
600
|
}`}
|
|
601
601
|
>
|
|
602
602
|
<div className="flex items-center gap-3">
|
|
603
603
|
<div
|
|
604
|
-
className={`p-2 rounded-lg ${active ? 'bg-
|
|
604
|
+
className={`p-2 rounded-lg ${active ? 'bg-hprimary-100 text-hprimary-600' : 'bg-gray-100 text-gray-600'
|
|
605
605
|
}`}
|
|
606
606
|
>
|
|
607
607
|
{option.icon}
|
|
@@ -612,7 +612,7 @@ export function CheckoutScreen() {
|
|
|
612
612
|
</div>
|
|
613
613
|
</div>
|
|
614
614
|
{active && (
|
|
615
|
-
<div className="w-5 h-5 rounded-full bg-
|
|
615
|
+
<div className="w-5 h-5 rounded-full bg-hprimary-500 flex items-center justify-center shrink-0">
|
|
616
616
|
<Check className="w-3 h-3 text-white" />
|
|
617
617
|
</div>
|
|
618
618
|
)}
|
|
@@ -726,9 +726,9 @@ export function CheckoutScreen() {
|
|
|
726
726
|
<label
|
|
727
727
|
key={addr.id}
|
|
728
728
|
className={`group relative flex items-start gap-3 p-4 rounded-2xl border ${selectedAddressId === addr.id
|
|
729
|
-
? 'border-
|
|
729
|
+
? 'border-hprimary-500 bg-hprimary-50 shadow-xs'
|
|
730
730
|
: 'border-slate-200 bg-white'
|
|
731
|
-
} cursor-pointer hover:border-
|
|
731
|
+
} cursor-pointer hover:border-hprimary-300 transition-colors`}
|
|
732
732
|
>
|
|
733
733
|
<input
|
|
734
734
|
type="radio"
|
|
@@ -763,14 +763,14 @@ export function CheckoutScreen() {
|
|
|
763
763
|
)}
|
|
764
764
|
<div className="mt-3 flex items-center gap-2">
|
|
765
765
|
{addr.isDefault && (
|
|
766
|
-
<span className="inline-flex items-center gap-1 rounded-full bg-
|
|
766
|
+
<span className="inline-flex items-center gap-1 rounded-full bg-hprimary-100 px-2.5 py-0.5 text-xs font-semibold text-hprimary-700">
|
|
767
767
|
Default
|
|
768
768
|
</span>
|
|
769
769
|
)}
|
|
770
770
|
<button
|
|
771
771
|
type="button"
|
|
772
772
|
onClick={(e) => { e.preventDefault(); setEditingAddress(addr); setIsAddressModalOpen(true); }}
|
|
773
|
-
className="inline-flex items-center gap-1 rounded-full border border-slate-200 px-2.5 py-0.5 text-xs font-medium text-slate-600 hover:border-
|
|
773
|
+
className="inline-flex items-center gap-1 rounded-full border border-slate-200 px-2.5 py-0.5 text-xs font-medium text-slate-600 hover:border-hprimary-300 hover:text-hprimary-600"
|
|
774
774
|
>
|
|
775
775
|
<Edit3 className="h-3.5 w-3.5" /> Edit
|
|
776
776
|
</button>
|
|
@@ -833,7 +833,7 @@ export function CheckoutScreen() {
|
|
|
833
833
|
|
|
834
834
|
{shippingRatesLoading ? (
|
|
835
835
|
<div className="flex items-center justify-center py-12">
|
|
836
|
-
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-
|
|
836
|
+
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-haccent"></div>
|
|
837
837
|
<span className="ml-3 text-gray-600">Loading shipping options...</span>
|
|
838
838
|
</div>
|
|
839
839
|
) : shippingRatesError ? (
|
|
@@ -861,7 +861,7 @@ export function CheckoutScreen() {
|
|
|
861
861
|
setShippingPrice(parseFloat(rate.amount));
|
|
862
862
|
}}
|
|
863
863
|
className={`relative p-5 border-2 rounded-xl cursor-pointer transition-all duration-200 hover:shadow-md ${isSelected
|
|
864
|
-
? 'border-
|
|
864
|
+
? 'border-hprimary-500 bg-hprimary-50 ring-2 ring-hprimary-200'
|
|
865
865
|
: 'border-gray-200 hover:border-gray-300'
|
|
866
866
|
}`}
|
|
867
867
|
>
|
|
@@ -889,7 +889,7 @@ export function CheckoutScreen() {
|
|
|
889
889
|
{rate.provider} {rate.servicelevel?.name}
|
|
890
890
|
</h3>
|
|
891
891
|
{isTest && (
|
|
892
|
-
<span className="px-2 py-1 text-xs font-medium bg-
|
|
892
|
+
<span className="px-2 py-1 text-xs font-medium bg-hprimary-100 text-hprimary-800 rounded-full">
|
|
893
893
|
TEST
|
|
894
894
|
</span>
|
|
895
895
|
)}
|
|
@@ -947,7 +947,7 @@ export function CheckoutScreen() {
|
|
|
947
947
|
{/* Selection Indicator */}
|
|
948
948
|
{isSelected && (
|
|
949
949
|
<div className="absolute top-3 right-3">
|
|
950
|
-
<div className="w-6 h-6 bg-
|
|
950
|
+
<div className="w-6 h-6 bg-hprimary-500 rounded-full flex items-center justify-center">
|
|
951
951
|
<CheckIcon className="w-4 h-4 text-white" />
|
|
952
952
|
</div>
|
|
953
953
|
</div>
|
|
@@ -979,8 +979,8 @@ export function CheckoutScreen() {
|
|
|
979
979
|
className="space-y-10 lg:sticky lg:top-24 lg:col-span-1"
|
|
980
980
|
>
|
|
981
981
|
{/* Order Summary */}
|
|
982
|
-
<div className="bg-linear-to-br from-
|
|
983
|
-
<h2 className="font-['Poppins',sans-serif] font-semibold text-
|
|
982
|
+
<div className="bg-linear-to-br from-hsecondary/10 to-hsecondary/10 rounded-[24px] p-8 border-2 border-hsecondary/20 sticky top-24">
|
|
983
|
+
<h2 className="font-['Poppins',sans-serif] font-semibold text-hsecondary mb-6 text-2xl">Order Summary</h2>
|
|
984
984
|
|
|
985
985
|
|
|
986
986
|
{/* Cart Summary */}
|
|
@@ -998,7 +998,7 @@ export function CheckoutScreen() {
|
|
|
998
998
|
<p className="font-['Poppins',sans-serif] text-[11px] text-[#676c80]">
|
|
999
999
|
{item?.productVariantData?.brand} • Qty: {item.quantity}
|
|
1000
1000
|
</p>
|
|
1001
|
-
<p className="font-['Poppins',sans-serif] font-semibold text-[12px] text-
|
|
1001
|
+
<p className="font-['Poppins',sans-serif] font-semibold text-[12px] text-hsecondary mt-1">
|
|
1002
1002
|
{formatPrice(item.productVariantData.finalPrice * item.quantity)}
|
|
1003
1003
|
</p>
|
|
1004
1004
|
</div>
|
|
@@ -1006,7 +1006,7 @@ export function CheckoutScreen() {
|
|
|
1006
1006
|
))}
|
|
1007
1007
|
</div>
|
|
1008
1008
|
|
|
1009
|
-
<div className="h-px bg-
|
|
1009
|
+
<div className="h-px bg-hsecondary/20 my-4" />
|
|
1010
1010
|
|
|
1011
1011
|
{/* Coupon Code Section */}
|
|
1012
1012
|
<div className="mb-6">
|
|
@@ -1042,11 +1042,11 @@ export function CheckoutScreen() {
|
|
|
1042
1042
|
<span>Estimated tax</span>
|
|
1043
1043
|
<span className="font-semibold">{formatPrice(tax)}</span>
|
|
1044
1044
|
</div>
|
|
1045
|
-
<div className="h-px bg-
|
|
1045
|
+
<div className="h-px bg-hsecondary/20 mt-6" />
|
|
1046
1046
|
|
|
1047
1047
|
<div className="flex items-center justify-between mb-6">
|
|
1048
|
-
<span className="font-['Poppins',sans-serif] font-semibold text-[16px] text-
|
|
1049
|
-
<span className="font-['Poppins',sans-serif] font-bold text-[24px] text-
|
|
1048
|
+
<span className="font-['Poppins',sans-serif] font-semibold text-[16px] text-hsecondary">Total</span>
|
|
1049
|
+
<span className="font-['Poppins',sans-serif] font-bold text-[24px] text-hsecondary">{formatPrice(total)}</span>
|
|
1050
1050
|
</div>
|
|
1051
1051
|
{/* <p className="mt-1 text-xs text-slate-500">
|
|
1052
1052
|
Tax is estimated. Final amount confirmed after payment.
|
|
@@ -1055,7 +1055,7 @@ export function CheckoutScreen() {
|
|
|
1055
1055
|
|
|
1056
1056
|
<div className="bg-white/80 rounded-xl p-4">
|
|
1057
1057
|
<p className="font-['Poppins',sans-serif] text-[11px] text-[#676c80] leading-[1.6]">
|
|
1058
|
-
<strong className="text-
|
|
1058
|
+
<strong className="text-hsecondary">Payment:</strong> We'll contact you to arrange payment upon pickup or delivery. We accept cash, credit cards, and all major payment methods.
|
|
1059
1059
|
</p>
|
|
1060
1060
|
</div>
|
|
1061
1061
|
</section>
|
|
@@ -1093,7 +1093,7 @@ export function CheckoutScreen() {
|
|
|
1093
1093
|
<button
|
|
1094
1094
|
type="submit"
|
|
1095
1095
|
disabled={isSubmitting}
|
|
1096
|
-
className="font-['Poppins',sans-serif] font-medium text-[14px] px-6 py-3 rounded-full text-white hover:bg-[#d66f45] hover:shadow-lg transition-all duration-300 mt-4 w-full bg-
|
|
1096
|
+
className="font-['Poppins',sans-serif] font-medium text-[14px] px-6 py-3 rounded-full text-white hover:bg-[#d66f45] hover:shadow-lg transition-all duration-300 mt-4 w-full bg-hsecondary hover:bg-[#2B4B7C] flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
1097
1097
|
>
|
|
1098
1098
|
<CreditCard className="h-5 w-5" />
|
|
1099
1099
|
{isSubmitting ? 'Placing order...' : 'Place Secure Order'}
|
|
@@ -112,21 +112,21 @@ export function CurrentOrdersScreen() {
|
|
|
112
112
|
</h2>
|
|
113
113
|
<div className="mt-4 space-y-4 text-sm text-slate-600">
|
|
114
114
|
<div className="flex items-start gap-3 rounded-2xl bg-slate-50 p-4">
|
|
115
|
-
<Warehouse className="h-5 w-5 text-
|
|
115
|
+
<Warehouse className="h-5 w-5 text-hprimary-500" />
|
|
116
116
|
<div>
|
|
117
117
|
<p className="font-semibold text-slate-800">Preparation</p>
|
|
118
118
|
<p>Our pharmacists verify ingredients and pack thermo-sensitive items.</p>
|
|
119
119
|
</div>
|
|
120
120
|
</div>
|
|
121
121
|
<div className="flex items-start gap-3 rounded-2xl bg-slate-50 p-4">
|
|
122
|
-
<Truck className="h-5 w-5 text-
|
|
122
|
+
<Truck className="h-5 w-5 text-hprimary-500" />
|
|
123
123
|
<div>
|
|
124
124
|
<p className="font-semibold text-slate-800">In transit</p>
|
|
125
125
|
<p>Track live courier location with ETA updates tailored to your delivery window.</p>
|
|
126
126
|
</div>
|
|
127
127
|
</div>
|
|
128
128
|
<div className="flex items-start gap-3 rounded-2xl bg-slate-50 p-4">
|
|
129
|
-
<BellRing className="h-5 w-5 text-
|
|
129
|
+
<BellRing className="h-5 w-5 text-hprimary-500" />
|
|
130
130
|
<div>
|
|
131
131
|
<p className="font-semibold text-slate-800">Arrival alerts</p>
|
|
132
132
|
<p>Receive SMS and email notifications when parcels are out for delivery.</p>
|
|
@@ -135,7 +135,7 @@ export function CurrentOrdersScreen() {
|
|
|
135
135
|
</div>
|
|
136
136
|
</div>
|
|
137
137
|
|
|
138
|
-
<div className="rounded-3xl border border-
|
|
138
|
+
<div className="rounded-3xl border border-hprimary-100 bg-hprimary-50/70 p-6 text-sm text-hprimary-700 shadow-xs">
|
|
139
139
|
<p className="font-semibold uppercase tracking-[0.3em]">Need support?</p>
|
|
140
140
|
<p className="mt-3 leading-relaxed">
|
|
141
141
|
Our fulfillment team is online 7 days a week. Message us if you need to adjust
|
|
@@ -75,7 +75,7 @@ export function EditProfileScreen() {
|
|
|
75
75
|
className="mx-auto max-w-3xl rounded-3xl border border-slate-200 bg-white p-8 shadow-xl shadow-primary-50"
|
|
76
76
|
>
|
|
77
77
|
<div className="flex items-center gap-3">
|
|
78
|
-
<span className="flex h-11 w-11 items-center justify-center rounded-2xl bg-
|
|
78
|
+
<span className="flex h-11 w-11 items-center justify-center rounded-2xl bg-hprimary-50 text-hprimary-600">
|
|
79
79
|
<User className="h-5 w-5" />
|
|
80
80
|
</span>
|
|
81
81
|
<div>
|
|
@@ -67,10 +67,10 @@ export function ForgotPasswordScreen() {
|
|
|
67
67
|
<div className="space-y-2">
|
|
68
68
|
<Mail
|
|
69
69
|
strokeWidth={2}
|
|
70
|
-
className="h-16 w-16 mx-auto text-white rounded-full bg-
|
|
70
|
+
className="h-16 w-16 mx-auto text-white rounded-full bg-hsecondary m-2 mb-4 px-4"
|
|
71
71
|
/>
|
|
72
|
-
<h2 className="text-4xl text-
|
|
73
|
-
<p className="text-sm text-
|
|
72
|
+
<h2 className="text-4xl text-hsecondary">Forgot Password?</h2>
|
|
73
|
+
<p className="text-sm text-hmuted">
|
|
74
74
|
No worries! Enter your email and we'll send you reset instructions.
|
|
75
75
|
</p>
|
|
76
76
|
</div>
|
|
@@ -95,23 +95,23 @@ export function ForgotPasswordScreen() {
|
|
|
95
95
|
</div>
|
|
96
96
|
)}
|
|
97
97
|
|
|
98
|
-
<div className="text-start text-
|
|
99
|
-
<h2 className="text-sm text-
|
|
100
|
-
Email Address <span className="text-
|
|
98
|
+
<div className="text-start text-hsecondary">
|
|
99
|
+
<h2 className="text-sm text-hsecondary mb-3">
|
|
100
|
+
Email Address <span className="text-hprimary-500">*</span>
|
|
101
101
|
</h2>
|
|
102
102
|
<Input
|
|
103
103
|
type="email"
|
|
104
104
|
placeholder="you@example.com"
|
|
105
105
|
{...register('email')}
|
|
106
106
|
error={errors.email?.message}
|
|
107
|
-
className="text-
|
|
107
|
+
className="text-hsecondary"
|
|
108
108
|
/>
|
|
109
109
|
</div>
|
|
110
110
|
|
|
111
111
|
<button
|
|
112
112
|
type="submit"
|
|
113
113
|
disabled={isSubmitting}
|
|
114
|
-
className="w-full bg-
|
|
114
|
+
className="w-full bg-hsecondary hover:opacity-80 text-white font-medium py-3 px-4 rounded-lg transition-colors disabled:opacity-70 disabled:cursor-not-allowed flex items-center justify-center gap-2"
|
|
115
115
|
>
|
|
116
116
|
{isSubmitting ? (
|
|
117
117
|
'Sending...'
|
|
@@ -126,7 +126,7 @@ export function ForgotPasswordScreen() {
|
|
|
126
126
|
<div className="pt-4 border-t border-slate-200">
|
|
127
127
|
<Link
|
|
128
128
|
href={buildPath('/login')}
|
|
129
|
-
className="flex items-center justify-center gap-2 text-sm font-medium text-
|
|
129
|
+
className="flex items-center justify-center gap-2 text-sm font-medium text-hprimary transition hover:opacity-80"
|
|
130
130
|
>
|
|
131
131
|
<ArrowLeft className="h-4 w-4" />
|
|
132
132
|
Back to login
|
|
@@ -135,11 +135,11 @@ export function ForgotPasswordScreen() {
|
|
|
135
135
|
</form>
|
|
136
136
|
|
|
137
137
|
<div className="mt-4">
|
|
138
|
-
<p className="text-
|
|
138
|
+
<p className="text-hmuted">
|
|
139
139
|
Don't have an account?{' '}
|
|
140
140
|
<Link
|
|
141
141
|
href={buildPath('/register')}
|
|
142
|
-
className="font-medium text-
|
|
142
|
+
className="font-medium text-hprimary transition hover:opacity-90"
|
|
143
143
|
>
|
|
144
144
|
Sign up
|
|
145
145
|
</Link>
|
|
@@ -81,9 +81,9 @@ export function LoginScreen() {
|
|
|
81
81
|
>
|
|
82
82
|
<div className="w-full max-w-lg space-y-10 text-center">
|
|
83
83
|
<div className="space-y-2">
|
|
84
|
-
<Lock strokeWidth={2} className='h-16 w-16 mx-auto text-white rounded-full bg-
|
|
85
|
-
<h2 className="text-4xl text-
|
|
86
|
-
<p className="text-sm text-
|
|
84
|
+
<Lock strokeWidth={2} className='h-16 w-16 mx-auto text-white rounded-full bg-hsecondary m-2 mb-4 px-4' />
|
|
85
|
+
<h2 className="text-4xl text-hsecondary">Welcome Back</h2>
|
|
86
|
+
<p className="text-sm text-hmuted">Sign in to access your patient portal
|
|
87
87
|
</p>
|
|
88
88
|
</div>
|
|
89
89
|
|
|
@@ -103,19 +103,19 @@ export function LoginScreen() {
|
|
|
103
103
|
</div>
|
|
104
104
|
)}
|
|
105
105
|
|
|
106
|
-
<div className='text-start text-
|
|
107
|
-
<h2 className="text-sm text-
|
|
106
|
+
<div className='text-start text-hsecondary'>
|
|
107
|
+
<h2 className="text-sm text-hsecondary mb-3">Email Address <span className='text-hprimary-500'>*</span></h2>
|
|
108
108
|
<Input
|
|
109
109
|
type="email"
|
|
110
110
|
// label="Email address"
|
|
111
111
|
placeholder="you@example.com"
|
|
112
112
|
{...register('email')}
|
|
113
113
|
error={errors.email?.message}
|
|
114
|
-
className='text-
|
|
114
|
+
className='text-hsecondary'
|
|
115
115
|
/>
|
|
116
116
|
</div>
|
|
117
|
-
<div className="relative text-start text-
|
|
118
|
-
<h2 className="text-sm text-
|
|
117
|
+
<div className="relative text-start text-hsecondary">
|
|
118
|
+
<h2 className="text-sm text-hsecondary mb-3">Password <span className='text-hprimary-500'>*</span></h2>
|
|
119
119
|
|
|
120
120
|
<Input
|
|
121
121
|
type={showPassword ? 'text' : 'password'}
|
|
@@ -135,7 +135,7 @@ export function LoginScreen() {
|
|
|
135
135
|
<div className="flex items-center justify-end text-sm">
|
|
136
136
|
<Link
|
|
137
137
|
href={buildPath('/forgot-password')}
|
|
138
|
-
className="font-medium text-
|
|
138
|
+
className="font-medium text-hprimary transition hover:opacity-80"
|
|
139
139
|
>
|
|
140
140
|
Forgot password?
|
|
141
141
|
</Link>
|
|
@@ -144,20 +144,20 @@ export function LoginScreen() {
|
|
|
144
144
|
<button
|
|
145
145
|
type="submit"
|
|
146
146
|
disabled={isSubmitting}
|
|
147
|
-
className="w-full bg-
|
|
147
|
+
className="w-full bg-hsecondary hover:opacity-80 text-white font-medium py-3 px-4 rounded-lg transition-colors disabled:opacity-70 disabled:cursor-not-allowed"
|
|
148
148
|
>
|
|
149
149
|
{isSubmitting ? 'Signing in...' : 'Sign in'}
|
|
150
150
|
</button>
|
|
151
151
|
</form>
|
|
152
152
|
|
|
153
153
|
<div className="mt-4">
|
|
154
|
-
<p className="text-
|
|
154
|
+
<p className="text-hmuted">Don't have an account? <Link href={buildPath('/register')} className="font-medium text-hprimary transition hover:opacity-90">Sign up</Link></p>
|
|
155
155
|
</div>
|
|
156
156
|
|
|
157
157
|
|
|
158
158
|
{/* <div className="rounded-3xl border border-slate-100 bg-slate-50 p-6 text-sm text-slate-600">
|
|
159
159
|
<div className="flex items-start gap-3">
|
|
160
|
-
<Lock className="mt-0.5 h-5 w-5 text-
|
|
160
|
+
<Lock className="mt-0.5 h-5 w-5 text-hprimary-500" />
|
|
161
161
|
<div>
|
|
162
162
|
<p className="font-semibold text-slate-800">Secure by design</p>
|
|
163
163
|
<p>
|
|
@@ -59,8 +59,8 @@ export function OrderDetailScreen({ id }: OrderDetailScreenProps) {
|
|
|
59
59
|
if (isLoading) {
|
|
60
60
|
return (
|
|
61
61
|
<div className="min-h-screen bg-slate-50 flex flex-col items-center justify-center p-4">
|
|
62
|
-
<div className="w-16 h-16 border-4 border-
|
|
63
|
-
<p className="text-
|
|
62
|
+
<div className="w-16 h-16 border-4 border-hprimary-20 border-t-primary rounded-full animate-spin mb-4" />
|
|
63
|
+
<p className="text-hmuted font-medium animate-pulse">Retrieving order details...</p>
|
|
64
64
|
</div>
|
|
65
65
|
);
|
|
66
66
|
}
|
|
@@ -71,8 +71,8 @@ export function OrderDetailScreen({ id }: OrderDetailScreenProps) {
|
|
|
71
71
|
<div className="p-4 bg-red-50 rounded-full mb-4">
|
|
72
72
|
<AlertCircle className="w-10 h-10 text-red-500" />
|
|
73
73
|
</div>
|
|
74
|
-
<h1 className="text-xl font-bold text-
|
|
75
|
-
<p className="text-
|
|
74
|
+
<h1 className="text-xl font-bold text-hsecondary mb-2">Order Not Found</h1>
|
|
75
|
+
<p className="text-hmuted mb-6">We couldn't find the order you're looking for.</p>
|
|
76
76
|
<Button onClick={() => router.push(buildPath('/account'))}>
|
|
77
77
|
Back to Account
|
|
78
78
|
</Button>
|
|
@@ -106,7 +106,7 @@ export function OrderDetailScreen({ id }: OrderDetailScreenProps) {
|
|
|
106
106
|
<div className="container mx-auto px-4 pt-8 max-w-6xl">
|
|
107
107
|
<button
|
|
108
108
|
onClick={() => router.back()}
|
|
109
|
-
className="group flex items-center gap-2 text-
|
|
109
|
+
className="group flex items-center gap-2 text-hmuted hover:text-hsecondary transition-colors mb-6"
|
|
110
110
|
>
|
|
111
111
|
<div className="p-1.5 rounded-full bg-white shadow-xs group-hover:shadow-md transition-all">
|
|
112
112
|
<ChevronLeft className="w-4 h-4" />
|
|
@@ -117,16 +117,16 @@ export function OrderDetailScreen({ id }: OrderDetailScreenProps) {
|
|
|
117
117
|
<div className="flex flex-col md:flex-row md:items-end justify-between gap-6 mb-8">
|
|
118
118
|
<div>
|
|
119
119
|
<div className="flex items-center gap-3 mb-2">
|
|
120
|
-
<h1 className="text-3xl font-bold text-
|
|
120
|
+
<h1 className="text-3xl font-bold text-hsecondary">Order Details</h1>
|
|
121
121
|
<Badge variant={getStatusVariant(status)}>{status}</Badge>
|
|
122
|
-
<Badge variant="primary" className="bg-
|
|
122
|
+
<Badge variant="primary" className="bg-hprimary-100 text-hprimary-700 border-hprimary-200">
|
|
123
123
|
{order.orderType || 'Pickup'}
|
|
124
124
|
</Badge>
|
|
125
125
|
</div>
|
|
126
|
-
<div className="flex flex-wrap items-center gap-x-6 gap-y-2 text-sm text-
|
|
126
|
+
<div className="flex flex-wrap items-center gap-x-6 gap-y-2 text-sm text-hmuted">
|
|
127
127
|
<span className="flex items-center gap-1.5 font-medium">
|
|
128
128
|
<span className="opacity-60 text-xs uppercase tracking-widest font-bold">ID:</span>
|
|
129
|
-
<span className="text-
|
|
129
|
+
<span className="text-hsecondary font-mono tracking-tight">#{id.toUpperCase()}</span>
|
|
130
130
|
</span>
|
|
131
131
|
<span className="flex items-center gap-1.5 font-medium">
|
|
132
132
|
<Calendar className="w-4 h-4 opacity-60" />
|
|
@@ -136,7 +136,7 @@ export function OrderDetailScreen({ id }: OrderDetailScreenProps) {
|
|
|
136
136
|
</div>
|
|
137
137
|
<div className="flex gap-3">
|
|
138
138
|
{order.payment?.hostedInvoiceUrl && (
|
|
139
|
-
<Button size="sm" onClick={() => window.open(order.payment?.hostedInvoiceUrl, '_blank')} className="bg-
|
|
139
|
+
<Button size="sm" onClick={() => window.open(order.payment?.hostedInvoiceUrl, '_blank')} className="bg-haccent hover:bg-haccent-dark border-none">
|
|
140
140
|
<ExternalLink className="w-4 h-4" />
|
|
141
141
|
Payment Details
|
|
142
142
|
</Button>
|
|
@@ -156,10 +156,10 @@ export function OrderDetailScreen({ id }: OrderDetailScreenProps) {
|
|
|
156
156
|
>
|
|
157
157
|
<div className="p-6 border-b border-slate-100 bg-slate-50/50 flex items-center justify-between">
|
|
158
158
|
<div className="flex items-center gap-2">
|
|
159
|
-
<Package className="w-5 h-5 text-
|
|
160
|
-
<h2 className="font-bold text-
|
|
159
|
+
<Package className="w-5 h-5 text-hsecondary" />
|
|
160
|
+
<h2 className="font-bold text-hsecondary">Order Items</h2>
|
|
161
161
|
</div>
|
|
162
|
-
<span className="text-xs font-bold bg-slate-200 text-
|
|
162
|
+
<span className="text-xs font-bold bg-slate-200 text-hmuted px-2.5 py-1 rounded-full">
|
|
163
163
|
{items.length} {items.length === 1 ? 'Product' : 'Products'}
|
|
164
164
|
</span>
|
|
165
165
|
</div>
|
|
@@ -179,19 +179,19 @@ export function OrderDetailScreen({ id }: OrderDetailScreenProps) {
|
|
|
179
179
|
</div>
|
|
180
180
|
<div className="flex-1 flex flex-col justify-between py-1">
|
|
181
181
|
<div>
|
|
182
|
-
<h3 className="font-bold text-
|
|
182
|
+
<h3 className="font-bold text-hsecondary text-lg group-hover:text-hprimary transition-colors leading-snug mb-1">
|
|
183
183
|
{item.productVariantData?.name}
|
|
184
184
|
</h3>
|
|
185
|
-
<div className="flex flex-wrap gap-x-4 gap-y-1 text-sm text-
|
|
185
|
+
<div className="flex flex-wrap gap-x-4 gap-y-1 text-sm text-hmuted">
|
|
186
186
|
<span className="flex items-center gap-1.5">
|
|
187
187
|
<span className="w-1.5 h-1.5 rounded-full bg-slate-300" />
|
|
188
|
-
Quantity: <span className="text-
|
|
188
|
+
Quantity: <span className="text-hsecondary font-bold">{item.quantity}</span>
|
|
189
189
|
</span>
|
|
190
190
|
</div>
|
|
191
191
|
</div>
|
|
192
192
|
<div className="flex items-center justify-between">
|
|
193
|
-
<span className="text-
|
|
194
|
-
<span className="font-black text-
|
|
193
|
+
<span className="text-hmuted text-sm">{formatPrice(item.productVariantData?.finalPrice || 0)} per unit</span>
|
|
194
|
+
<span className="font-black text-hsecondary">{formatPrice((item.productVariantData?.finalPrice || 0) * item.quantity)}</span>
|
|
195
195
|
</div>
|
|
196
196
|
</div>
|
|
197
197
|
</div>
|
|
@@ -203,12 +203,12 @@ export function OrderDetailScreen({ id }: OrderDetailScreenProps) {
|
|
|
203
203
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
204
204
|
<div className="bg-white p-6 rounded-3xl border border-slate-200 shadow-xs">
|
|
205
205
|
<div className="flex items-center gap-2 mb-4">
|
|
206
|
-
<MapPin className="w-5 h-5 text-
|
|
207
|
-
<h3 className="font-bold text-
|
|
206
|
+
<MapPin className="w-5 h-5 text-haccent" />
|
|
207
|
+
<h3 className="font-bold text-hsecondary">{isDelivery ? 'Shipping Address' : 'Pickup Location'}</h3>
|
|
208
208
|
</div>
|
|
209
209
|
{activeAddress ? (
|
|
210
|
-
<div className="text-sm text-
|
|
211
|
-
<p className="font-bold text-
|
|
210
|
+
<div className="text-sm text-hmuted leading-relaxed">
|
|
211
|
+
<p className="font-bold text-hsecondary text-base mb-1">
|
|
212
212
|
{activeAddress.name}
|
|
213
213
|
</p>
|
|
214
214
|
<p>{activeAddress.street1}</p>
|
|
@@ -217,16 +217,16 @@ export function OrderDetailScreen({ id }: OrderDetailScreenProps) {
|
|
|
217
217
|
<p>{activeAddress.country}</p>
|
|
218
218
|
</div>
|
|
219
219
|
) : (
|
|
220
|
-
<p className="text-sm text-
|
|
220
|
+
<p className="text-sm text-hmuted italic">No address recorded</p>
|
|
221
221
|
)}
|
|
222
222
|
</div>
|
|
223
223
|
<div className="bg-white p-6 rounded-3xl border border-slate-200 shadow-xs">
|
|
224
224
|
<div className="flex items-center gap-2 mb-4">
|
|
225
|
-
<CreditCard className="w-5 h-5 text-
|
|
226
|
-
<h3 className="font-bold text-
|
|
225
|
+
<CreditCard className="w-5 h-5 text-haccent" />
|
|
226
|
+
<h3 className="font-bold text-hsecondary">Payment Method</h3>
|
|
227
227
|
</div>
|
|
228
|
-
<div className="text-sm text-
|
|
229
|
-
<p className="font-bold text-
|
|
228
|
+
<div className="text-sm text-hmuted leading-relaxed">
|
|
229
|
+
<p className="font-bold text-hsecondary text-base mb-1">
|
|
230
230
|
{order.payment?.paymentMethod ? order.payment.paymentMethod.replace('_', ' ').toUpperCase() : 'N/A'}
|
|
231
231
|
</p>
|
|
232
232
|
<p className="flex items-center gap-2 mt-2">
|
|
@@ -250,7 +250,7 @@ export function OrderDetailScreen({ id }: OrderDetailScreenProps) {
|
|
|
250
250
|
<motion.div
|
|
251
251
|
initial={{ opacity: 0, x: 20 }}
|
|
252
252
|
animate={{ opacity: 1, x: 0 }}
|
|
253
|
-
className="bg-
|
|
253
|
+
className="bg-hsecondary p-8 rounded-[2rem] text-white shadow-xl shadow-secondary-20 sticky top-8"
|
|
254
254
|
>
|
|
255
255
|
<h2 className="text-xl font-bold mb-6 flex items-center gap-2">
|
|
256
256
|
Summary View
|
|
@@ -270,7 +270,7 @@ export function OrderDetailScreen({ id }: OrderDetailScreenProps) {
|
|
|
270
270
|
<span className="font-bold text-white">{formatPrice(order.tax || 0)}</span>
|
|
271
271
|
</div>
|
|
272
272
|
{order.discountedAmount !== undefined && order.discountedAmount > 0 && (
|
|
273
|
-
<div className="flex justify-between items-center text-
|
|
273
|
+
<div className="flex justify-between items-center text-hprimary">
|
|
274
274
|
<span className="text-sm font-medium">Discount</span>
|
|
275
275
|
<span className="font-bold">-{formatPrice(order.discountedAmount)}</span>
|
|
276
276
|
</div>
|
|
@@ -292,7 +292,7 @@ export function OrderDetailScreen({ id }: OrderDetailScreenProps) {
|
|
|
292
292
|
{order.orderStatus === 'Pending' && (
|
|
293
293
|
<div className="p-4 bg-white/5 rounded-2xl border border-white/10 mb-8">
|
|
294
294
|
<div className="flex items-start gap-3">
|
|
295
|
-
<Info className="w-5 h-5 text-
|
|
295
|
+
<Info className="w-5 h-5 text-hprimary shrink-0 mt-0.5" />
|
|
296
296
|
<div>
|
|
297
297
|
<p className="text-xs font-bold mb-1">Order is processing</p>
|
|
298
298
|
<p className="text-[11px] text-white/60 leading-relaxed">We've received your request and our pharmacists are reviewing it for safety and accuracy.</p>
|
|
@@ -64,9 +64,9 @@ export function OrdersScreen() {
|
|
|
64
64
|
className="space-y-6"
|
|
65
65
|
>
|
|
66
66
|
<div className="mb-8">
|
|
67
|
-
<h1 className="text-3xl font-black text-
|
|
68
|
-
<p className="text-sm font-medium text-
|
|
69
|
-
<span className="w-1.5 h-1.5 rounded-full bg-
|
|
67
|
+
<h1 className="text-3xl font-black text-hsecondary tracking-tight">Order History</h1>
|
|
68
|
+
<p className="text-sm font-medium text-hmuted mt-1 flex items-center gap-2">
|
|
69
|
+
<span className="w-1.5 h-1.5 rounded-full bg-haccent animate-pulse" />
|
|
70
70
|
{filteredOrders.length} {filteredOrders.length === 1 ? 'record found' : 'records found'} for your account
|
|
71
71
|
</p>
|
|
72
72
|
</div>
|