@burdenoff/microfe-atheletebridge 2026.626.1 → 2026.628.1

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.
Files changed (162) hide show
  1. package/dist/atheletebridge/AthleteBridgeRoot.js +49 -129
  2. package/dist/atheletebridge/AthleteBridgeRoot.js.map +1 -1
  3. package/dist/atheletebridge/AthleteBridgeRoutes.js +65 -184
  4. package/dist/atheletebridge/AthleteBridgeRoutes.js.map +1 -1
  5. package/dist/atheletebridge/components/CursorPager.js +34 -0
  6. package/dist/atheletebridge/components/CursorPager.js.map +1 -0
  7. package/dist/atheletebridge/components/FilterSelect.js +22 -0
  8. package/dist/atheletebridge/components/FilterSelect.js.map +1 -0
  9. package/dist/atheletebridge/components/FixtureCard.js +76 -0
  10. package/dist/atheletebridge/components/FixtureCard.js.map +1 -0
  11. package/dist/atheletebridge/components/LoadingState.js +36 -0
  12. package/dist/atheletebridge/components/LoadingState.js.map +1 -0
  13. package/dist/atheletebridge/components/ProgramCard.js +69 -0
  14. package/dist/atheletebridge/components/ProgramCard.js.map +1 -0
  15. package/dist/atheletebridge/components/SessionCard.js +76 -0
  16. package/dist/atheletebridge/components/SessionCard.js.map +1 -0
  17. package/dist/atheletebridge/components/StatusBadge.js +44 -35
  18. package/dist/atheletebridge/components/StatusBadge.js.map +1 -1
  19. package/dist/atheletebridge/components/TeamCard.js +81 -0
  20. package/dist/atheletebridge/components/TeamCard.js.map +1 -0
  21. package/dist/atheletebridge/components/domain.js +47 -0
  22. package/dist/atheletebridge/components/domain.js.map +1 -0
  23. package/dist/atheletebridge/components/form.js +29 -0
  24. package/dist/atheletebridge/components/form.js.map +1 -0
  25. package/dist/atheletebridge/context/AthleteBridgeContext.js +6 -6
  26. package/dist/atheletebridge/context/AthleteBridgeContext.js.map +1 -1
  27. package/dist/atheletebridge/hooks/useAthleteBridgeApi.js +342 -165
  28. package/dist/atheletebridge/hooks/useAthleteBridgeApi.js.map +1 -1
  29. package/dist/atheletebridge/index.js +1 -1
  30. package/dist/atheletebridge/pages/DashboardPage.js +169 -0
  31. package/dist/atheletebridge/pages/DashboardPage.js.map +1 -0
  32. package/dist/atheletebridge/pages/StandingsPage.js +166 -0
  33. package/dist/atheletebridge/pages/StandingsPage.js.map +1 -0
  34. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js +201 -0
  35. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js.map +1 -0
  36. package/dist/atheletebridge/pages/fixtures/FixtureFormPage.js +205 -0
  37. package/dist/atheletebridge/pages/fixtures/FixtureFormPage.js.map +1 -0
  38. package/dist/atheletebridge/pages/fixtures/FixturesListPage.js +92 -0
  39. package/dist/atheletebridge/pages/fixtures/FixturesListPage.js.map +1 -0
  40. package/dist/atheletebridge/pages/programs/ProgramDetailPage.js +374 -0
  41. package/dist/atheletebridge/pages/programs/ProgramDetailPage.js.map +1 -0
  42. package/dist/atheletebridge/pages/programs/ProgramFormPage.js +207 -0
  43. package/dist/atheletebridge/pages/programs/ProgramFormPage.js.map +1 -0
  44. package/dist/atheletebridge/pages/programs/ProgramsListPage.js +113 -0
  45. package/dist/atheletebridge/pages/programs/ProgramsListPage.js.map +1 -0
  46. package/dist/atheletebridge/pages/sessions/SessionDetailPage.js +224 -0
  47. package/dist/atheletebridge/pages/sessions/SessionDetailPage.js.map +1 -0
  48. package/dist/atheletebridge/pages/sessions/SessionFormPage.js +206 -0
  49. package/dist/atheletebridge/pages/sessions/SessionFormPage.js.map +1 -0
  50. package/dist/atheletebridge/pages/sessions/SessionsListPage.js +92 -0
  51. package/dist/atheletebridge/pages/sessions/SessionsListPage.js.map +1 -0
  52. package/dist/atheletebridge/pages/teams/TeamDetailPage.js +350 -0
  53. package/dist/atheletebridge/pages/teams/TeamDetailPage.js.map +1 -0
  54. package/dist/atheletebridge/pages/teams/TeamFormPage.js +222 -0
  55. package/dist/atheletebridge/pages/teams/TeamFormPage.js.map +1 -0
  56. package/dist/atheletebridge/pages/teams/TeamsListPage.js +101 -0
  57. package/dist/atheletebridge/pages/teams/TeamsListPage.js.map +1 -0
  58. package/dist/atheletebridge/store/atheletebridgeStore.js +2 -13
  59. package/dist/atheletebridge/store/atheletebridgeStore.js.map +1 -1
  60. package/dist/atheletebridge/utils/datetime.js +10 -0
  61. package/dist/atheletebridge/utils/datetime.js.map +1 -0
  62. package/dist/atheletebridge/utils/formatters.js +1 -4
  63. package/dist/atheletebridge/utils/formatters.js.map +1 -1
  64. package/package.json +1 -1
  65. package/dist/atheletebridge/components/InvestmentCard.js +0 -96
  66. package/dist/atheletebridge/components/InvestmentCard.js.map +0 -1
  67. package/dist/atheletebridge/components/RatingDisplay.js +0 -35
  68. package/dist/atheletebridge/components/RatingDisplay.js.map +0 -1
  69. package/dist/atheletebridge/mocks/data.js +0 -1517
  70. package/dist/atheletebridge/mocks/data.js.map +0 -1
  71. package/dist/atheletebridge/mocks/users.js +0 -34
  72. package/dist/atheletebridge/mocks/users.js.map +0 -1
  73. package/dist/atheletebridge/pages/HomePage.js +0 -936
  74. package/dist/atheletebridge/pages/HomePage.js.map +0 -1
  75. package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js +0 -653
  76. package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js.map +0 -1
  77. package/dist/atheletebridge/pages/admin/AdminDashboard.js +0 -671
  78. package/dist/atheletebridge/pages/admin/AdminDashboard.js.map +0 -1
  79. package/dist/atheletebridge/pages/admin/AdminFinancialPage.js +0 -429
  80. package/dist/atheletebridge/pages/admin/AdminFinancialPage.js.map +0 -1
  81. package/dist/atheletebridge/pages/admin/AdminOrdersPage.js +0 -667
  82. package/dist/atheletebridge/pages/admin/AdminOrdersPage.js.map +0 -1
  83. package/dist/atheletebridge/pages/admin/AdminProfilePage.js +0 -261
  84. package/dist/atheletebridge/pages/admin/AdminProfilePage.js.map +0 -1
  85. package/dist/atheletebridge/pages/admin/AdminSettingsPage.js +0 -653
  86. package/dist/atheletebridge/pages/admin/AdminSettingsPage.js.map +0 -1
  87. package/dist/atheletebridge/pages/admin/CartManagementPage.js +0 -876
  88. package/dist/atheletebridge/pages/admin/CartManagementPage.js.map +0 -1
  89. package/dist/atheletebridge/pages/admin/UserManagementPage.js +0 -900
  90. package/dist/atheletebridge/pages/admin/UserManagementPage.js.map +0 -1
  91. package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js +0 -839
  92. package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  93. package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js +0 -704
  94. package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  95. package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js +0 -792
  96. package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  97. package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  98. package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  99. package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js +0 -633
  100. package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  101. package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js +0 -913
  102. package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  103. package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js +0 -881
  104. package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js.map +0 -1
  105. package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js +0 -841
  106. package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js.map +0 -1
  107. package/dist/atheletebridge/pages/common/HelpSupportPage.js +0 -1319
  108. package/dist/atheletebridge/pages/common/HelpSupportPage.js.map +0 -1
  109. package/dist/atheletebridge/pages/common/NotificationCenterPage.js +0 -674
  110. package/dist/atheletebridge/pages/common/NotificationCenterPage.js.map +0 -1
  111. package/dist/atheletebridge/pages/common/SettingsPage.js +0 -972
  112. package/dist/atheletebridge/pages/common/SettingsPage.js.map +0 -1
  113. package/dist/atheletebridge/pages/customer/BookingDetailsPage.js +0 -602
  114. package/dist/atheletebridge/pages/customer/BookingDetailsPage.js.map +0 -1
  115. package/dist/atheletebridge/pages/customer/CartDetailPage.js +0 -656
  116. package/dist/atheletebridge/pages/customer/CartDetailPage.js.map +0 -1
  117. package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js +0 -558
  118. package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js.map +0 -1
  119. package/dist/atheletebridge/pages/customer/CheckoutPage.js +0 -536
  120. package/dist/atheletebridge/pages/customer/CheckoutPage.js.map +0 -1
  121. package/dist/atheletebridge/pages/customer/CustomerDashboard.js +0 -539
  122. package/dist/atheletebridge/pages/customer/CustomerDashboard.js.map +0 -1
  123. package/dist/atheletebridge/pages/customer/CustomerProfilePage.js +0 -657
  124. package/dist/atheletebridge/pages/customer/CustomerProfilePage.js.map +0 -1
  125. package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js +0 -635
  126. package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js.map +0 -1
  127. package/dist/atheletebridge/pages/customer/FavoritesPage.js +0 -486
  128. package/dist/atheletebridge/pages/customer/FavoritesPage.js.map +0 -1
  129. package/dist/atheletebridge/pages/customer/OrderHistoryPage.js +0 -447
  130. package/dist/atheletebridge/pages/customer/OrderHistoryPage.js.map +0 -1
  131. package/dist/atheletebridge/pages/customer/OrderTrackingPage.js +0 -393
  132. package/dist/atheletebridge/pages/customer/OrderTrackingPage.js.map +0 -1
  133. package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js +0 -494
  134. package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js.map +0 -1
  135. package/dist/atheletebridge/pages/customer/ReviewsPage.js +0 -615
  136. package/dist/atheletebridge/pages/customer/ReviewsPage.js.map +0 -1
  137. package/dist/atheletebridge/pages/customer/SavedAddressesPage.js +0 -451
  138. package/dist/atheletebridge/pages/customer/SavedAddressesPage.js.map +0 -1
  139. package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js +0 -881
  140. package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js.map +0 -1
  141. package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js +0 -945
  142. package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  143. package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js +0 -686
  144. package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  145. package/dist/atheletebridge/pages/investor/InvestorDashboard.js +0 -453
  146. package/dist/atheletebridge/pages/investor/InvestorDashboard.js.map +0 -1
  147. package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js +0 -405
  148. package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  149. package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js +0 -577
  150. package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js.map +0 -1
  151. package/dist/atheletebridge/pages/investor/InvestorProfilePage.js +0 -1069
  152. package/dist/atheletebridge/pages/investor/InvestorProfilePage.js.map +0 -1
  153. package/dist/atheletebridge/pages/worker/TaskDetailsPage.js +0 -530
  154. package/dist/atheletebridge/pages/worker/TaskDetailsPage.js.map +0 -1
  155. package/dist/atheletebridge/pages/worker/WorkerDashboard.js +0 -669
  156. package/dist/atheletebridge/pages/worker/WorkerDashboard.js.map +0 -1
  157. package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js +0 -681
  158. package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js.map +0 -1
  159. package/dist/atheletebridge/pages/worker/WorkerProfilePage.js +0 -691
  160. package/dist/atheletebridge/pages/worker/WorkerProfilePage.js.map +0 -1
  161. package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js +0 -588
  162. package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,615 +0,0 @@
1
- import { useAthleteBridge as e } from "../../context/AthleteBridgeContext.js";
2
- import { cn as t } from "../../utils/cn.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { EmptyState as r } from "../../components/EmptyState.js";
5
- import { formatDate as i } from "../../utils/formatters.js";
6
- import { RatingDisplay as a } from "../../components/RatingDisplay.js";
7
- import { useCallback as o, useState as s } from "react";
8
- import { CheckCircle2 as c, Info as l, MessageCircle as u, MessageSquare as d, PenSquare as f, Search as p, Star as m, ThumbsUp as h, X as g } from "lucide-react";
9
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
10
- import { EmphasisPanel as y, PagePurpose as b } from "@burdenoff/fe-libs/ui";
11
- //#region src/atheletebridge/pages/customer/ReviewsPage.tsx
12
- var x = "user-001", S = {
13
- 1: "Terrible",
14
- 2: "Poor",
15
- 3: "Average",
16
- 4: "Good",
17
- 5: "Excellent"
18
- }, C = [
19
- {
20
- id: "review-001",
21
- userId: x,
22
- userName: "Rahul Sharma",
23
- userAvatar: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=100",
24
- itemId: "FOOD-001",
25
- itemName: "Dosa Express",
26
- itemType: "cart",
27
- cartId: "FOOD-001",
28
- cartName: "Dosa Express",
29
- orderId: "ORD-2024-001",
30
- rating: 5,
31
- title: "Excellent breakfast spot!",
32
- comment: "Amazing dosas and filter coffee. The masala dosa was perfectly crispy and the potato filling was delicious. Service was quick and friendly. Highly recommend for authentic South Indian breakfast!",
33
- helpfulCount: 12,
34
- isHelpful: !0,
35
- isVerified: !0,
36
- createdAt: "2024-06-20T09:30:00Z",
37
- response: {
38
- message: "Thank you so much for your wonderful review! We're thrilled you enjoyed the dosas. We look forward to serving you again soon!",
39
- respondedBy: "Dosa Express Team",
40
- respondedAt: "2024-06-20T15:45:00Z"
41
- }
42
- },
43
- {
44
- id: "review-002",
45
- userId: "user-002",
46
- userName: "Priya Patel",
47
- userAvatar: "https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=100",
48
- itemId: "prod-002",
49
- itemName: "Pani Puri",
50
- itemType: "product",
51
- cartId: "FOOD-002",
52
- cartName: "Chaat Corner",
53
- orderId: "ORD-2024-002",
54
- rating: 4,
55
- title: "Good but could be spicier",
56
- comment: "The pani puri was good overall. The puris were crispy and fresh. However, the pani could have been more spicy and tangy. The portions were generous though.",
57
- helpfulCount: 8,
58
- isHelpful: !1,
59
- isVerified: !0,
60
- createdAt: "2024-06-18T19:15:00Z"
61
- },
62
- {
63
- id: "review-003",
64
- userId: "user-003",
65
- userName: "Amit Kumar",
66
- userAvatar: "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=100",
67
- itemId: "FOOD-002",
68
- itemName: "Chaat Corner",
69
- itemType: "cart",
70
- cartId: "FOOD-002",
71
- cartName: "Chaat Corner",
72
- orderId: "ORD-2024-003",
73
- rating: 5,
74
- title: "Authentic Mumbai street food!",
75
- comment: "This place brings back memories of Mumbai streets. Every item I ordered was authentic and delicious. The bhel puri and vada pav were exceptional. Will definitely order again!",
76
- images: ["https://images.unsplash.com/photo-1601050690597-df0568f70950?w=400"],
77
- helpfulCount: 15,
78
- isHelpful: !1,
79
- isVerified: !0,
80
- createdAt: "2024-06-17T20:30:00Z"
81
- },
82
- {
83
- id: "review-004",
84
- userId: x,
85
- userName: "Rahul Sharma",
86
- userAvatar: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=100",
87
- itemId: "prod-001",
88
- itemName: "Masala Dosa",
89
- itemType: "product",
90
- cartId: "FOOD-001",
91
- cartName: "Dosa Express",
92
- orderId: "ORD-2024-004",
93
- rating: 5,
94
- title: "Perfect masala dosa!",
95
- comment: "The masala dosa here is absolutely perfect. Crispy, golden brown, and the potato masala inside is perfectly spiced. Comes with great chutneys and sambar.",
96
- helpfulCount: 6,
97
- isHelpful: !1,
98
- isVerified: !0,
99
- createdAt: "2024-06-15T08:45:00Z",
100
- response: {
101
- message: "Glad you loved it, Rahul! Our chef takes great care with every dosa. See you soon!",
102
- respondedBy: "Dosa Express Team",
103
- respondedAt: "2024-06-15T14:00:00Z"
104
- }
105
- },
106
- {
107
- id: "review-005",
108
- userId: "user-004",
109
- userName: "Sneha Reddy",
110
- userAvatar: "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=100",
111
- itemId: "FOOD-001",
112
- itemName: "Dosa Express",
113
- itemType: "cart",
114
- cartId: "FOOD-001",
115
- cartName: "Dosa Express",
116
- orderId: "ORD-2024-005",
117
- rating: 3,
118
- title: "Average experience",
119
- comment: "The food was okay but delivery took longer than expected. The taste was good but not exceptional. The packaging could be better to keep food warm.",
120
- helpfulCount: 4,
121
- isHelpful: !1,
122
- isVerified: !0,
123
- createdAt: "2024-06-12T12:20:00Z"
124
- }
125
- ];
126
- function w({ value: e, onChange: n }) {
127
- let [r, i] = s(0), a = r || e;
128
- return /* @__PURE__ */ v("div", {
129
- className: "flex items-center gap-3",
130
- children: [/* @__PURE__ */ _("div", {
131
- className: "flex items-center gap-0.5",
132
- children: [
133
- 1,
134
- 2,
135
- 3,
136
- 4,
137
- 5
138
- ].map((e) => /* @__PURE__ */ _("button", {
139
- type: "button",
140
- onClick: () => n(e),
141
- onMouseEnter: () => i(e),
142
- onMouseLeave: () => i(0),
143
- className: "p-0.5 transition-transform",
144
- children: /* @__PURE__ */ _(m, { className: t("h-6 w-6", e <= a ? "fill-yellow-400 text-yellow-400" : "fill-none text-text-secondary/40") })
145
- }, e))
146
- }), /* @__PURE__ */ _("span", {
147
- className: "text-sm font-medium text-text-secondary",
148
- children: S[a] ?? ""
149
- })]
150
- });
151
- }
152
- function T() {
153
- let { navigateTo: S } = e(), [T, E] = s(C), [D, O] = s(!1), [k, A] = s({
154
- rating: 5,
155
- title: "",
156
- comment: ""
157
- }), [j, M] = s({
158
- searchQuery: "",
159
- type: "all",
160
- rating: "",
161
- sortBy: "recent"
162
- }), [N, P] = s(null), F = (e) => {
163
- P(e), setTimeout(() => P(null), 3e3);
164
- }, I = o(() => {
165
- let e = [...T];
166
- if (j.type === "my-reviews" ? e = e.filter((e) => e.userId === x) : j.type !== "all" && (e = e.filter((e) => e.itemType === j.type)), j.rating) {
167
- let t = parseInt(j.rating, 10);
168
- e = e.filter((e) => e.rating === t);
169
- }
170
- if (j.searchQuery) {
171
- let t = j.searchQuery.toLowerCase();
172
- e = e.filter((e) => e.itemName.toLowerCase().includes(t) || e.title.toLowerCase().includes(t) || e.comment.toLowerCase().includes(t) || e.cartName.toLowerCase().includes(t));
173
- }
174
- switch (j.sortBy) {
175
- case "recent":
176
- e.sort((e, t) => new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime());
177
- break;
178
- case "helpful":
179
- e.sort((e, t) => t.helpfulCount - e.helpfulCount);
180
- break;
181
- case "rating-high":
182
- e.sort((e, t) => t.rating - e.rating);
183
- break;
184
- case "rating-low":
185
- e.sort((e, t) => e.rating - t.rating);
186
- break;
187
- }
188
- return e;
189
- }, [T, j])(), L = T.filter((e) => e.userId === x).length, R = T.length > 0 ? (T.reduce((e, t) => e + t.rating, 0) / T.length).toFixed(1) : "0", z = () => {
190
- if (!k.title.trim() || !k.comment.trim()) {
191
- alert("Please fill in the Review Title and Comment.");
192
- return;
193
- }
194
- let e = {
195
- id: `review-${Date.now()}`,
196
- userId: x,
197
- userName: "Rahul Sharma",
198
- userAvatar: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=100",
199
- itemId: "FOOD-001",
200
- itemName: "Dosa Express",
201
- itemType: "cart",
202
- cartId: "FOOD-001",
203
- cartName: "Dosa Express",
204
- orderId: `ORD-2024-${Date.now()}`,
205
- rating: k.rating,
206
- title: k.title,
207
- comment: k.comment,
208
- helpfulCount: 0,
209
- isHelpful: !1,
210
- isVerified: !0,
211
- createdAt: (/* @__PURE__ */ new Date()).toISOString()
212
- };
213
- E((t) => [e, ...t]), A({
214
- rating: 5,
215
- title: "",
216
- comment: ""
217
- }), O(!1), F("Review submitted successfully!");
218
- }, B = (e) => {
219
- E((t) => t.map((t) => t.id === e ? {
220
- ...t,
221
- isHelpful: !t.isHelpful,
222
- helpfulCount: t.isHelpful ? t.helpfulCount - 1 : t.helpfulCount + 1
223
- } : t));
224
- };
225
- return /* @__PURE__ */ v(n, {
226
- title: "Reviews & Ratings",
227
- description: `${I.length} reviews found`,
228
- actions: /* @__PURE__ */ v("button", {
229
- type: "button",
230
- onClick: () => O(!0),
231
- className: t("flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-opacity", "bg-foreground text-background hover:opacity-90"),
232
- children: [/* @__PURE__ */ _(f, { className: "h-4 w-4" }), "Write Review"]
233
- }),
234
- children: [
235
- N && /* @__PURE__ */ v("div", {
236
- className: "mb-4 rounded-lg border border-green-500/30 bg-green-500/10 p-3 flex items-center gap-2",
237
- children: [/* @__PURE__ */ _(c, { className: "h-4 w-4 text-green-600 dark:text-green-400 shrink-0" }), /* @__PURE__ */ _("p", {
238
- className: "text-sm text-green-600 dark:text-green-400",
239
- children: N
240
- })]
241
- }),
242
- /* @__PURE__ */ _(b, {
243
- className: "mb-6",
244
- children: "See what customers are saying and share your own experience. Read reviews for carts and products, filter by rating, and write a review to help others choose well and give providers useful feedback."
245
- }),
246
- /* @__PURE__ */ _(y, {
247
- className: "mb-6",
248
- children: /* @__PURE__ */ v("div", {
249
- className: "flex flex-wrap items-center gap-4 text-sm text-text-secondary",
250
- children: [
251
- /* @__PURE__ */ v("span", { children: [T.length, " total reviews"] }),
252
- /* @__PURE__ */ v("span", { children: [L, " your reviews"] }),
253
- /* @__PURE__ */ v("span", {
254
- className: "flex items-center gap-1",
255
- children: [
256
- "Average: ",
257
- R,
258
- /* @__PURE__ */ _(m, { className: "h-3.5 w-3.5 fill-yellow-400 text-yellow-400" })
259
- ]
260
- })
261
- ]
262
- })
263
- }),
264
- /* @__PURE__ */ _("div", {
265
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 mb-6",
266
- children: /* @__PURE__ */ v("div", {
267
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",
268
- children: [
269
- /* @__PURE__ */ v("div", {
270
- className: "relative",
271
- children: [/* @__PURE__ */ _(p, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ _("input", {
272
- type: "text",
273
- placeholder: "Search reviews...",
274
- value: j.searchQuery,
275
- onChange: (e) => M((t) => ({
276
- ...t,
277
- searchQuery: e.target.value
278
- })),
279
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2 pl-9 pr-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
280
- })]
281
- }),
282
- /* @__PURE__ */ v("select", {
283
- value: j.type,
284
- onChange: (e) => M((t) => ({
285
- ...t,
286
- type: e.target.value
287
- })),
288
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
289
- children: [
290
- /* @__PURE__ */ _("option", {
291
- value: "all",
292
- children: "All Reviews"
293
- }),
294
- /* @__PURE__ */ _("option", {
295
- value: "cart",
296
- children: "Cart Reviews"
297
- }),
298
- /* @__PURE__ */ _("option", {
299
- value: "product",
300
- children: "Product Reviews"
301
- }),
302
- /* @__PURE__ */ _("option", {
303
- value: "my-reviews",
304
- children: "My Reviews"
305
- })
306
- ]
307
- }),
308
- /* @__PURE__ */ v("select", {
309
- value: j.rating,
310
- onChange: (e) => M((t) => ({
311
- ...t,
312
- rating: e.target.value
313
- })),
314
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
315
- children: [
316
- /* @__PURE__ */ _("option", {
317
- value: "",
318
- children: "All Ratings"
319
- }),
320
- /* @__PURE__ */ _("option", {
321
- value: "5",
322
- children: "5 Stars"
323
- }),
324
- /* @__PURE__ */ _("option", {
325
- value: "4",
326
- children: "4 Stars"
327
- }),
328
- /* @__PURE__ */ _("option", {
329
- value: "3",
330
- children: "3 Stars"
331
- }),
332
- /* @__PURE__ */ _("option", {
333
- value: "2",
334
- children: "2 Stars"
335
- }),
336
- /* @__PURE__ */ _("option", {
337
- value: "1",
338
- children: "1 Star"
339
- })
340
- ]
341
- }),
342
- /* @__PURE__ */ v("select", {
343
- value: j.sortBy,
344
- onChange: (e) => M((t) => ({
345
- ...t,
346
- sortBy: e.target.value
347
- })),
348
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
349
- children: [
350
- /* @__PURE__ */ _("option", {
351
- value: "recent",
352
- children: "Most Recent"
353
- }),
354
- /* @__PURE__ */ _("option", {
355
- value: "helpful",
356
- children: "Most Helpful"
357
- }),
358
- /* @__PURE__ */ _("option", {
359
- value: "rating-high",
360
- children: "Highest Rating"
361
- }),
362
- /* @__PURE__ */ _("option", {
363
- value: "rating-low",
364
- children: "Lowest Rating"
365
- })
366
- ]
367
- })
368
- ]
369
- })
370
- }),
371
- I.length === 0 ? /* @__PURE__ */ _(r, {
372
- illustration: "empty-data",
373
- icon: /* @__PURE__ */ _(d, { className: "h-12 w-12" }),
374
- title: "No reviews found",
375
- description: "Be the first to write a review!",
376
- action: /* @__PURE__ */ _("button", {
377
- type: "button",
378
- onClick: () => O(!0),
379
- className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
380
- children: "Write a Review"
381
- })
382
- }) : /* @__PURE__ */ _("div", {
383
- className: "space-y-4",
384
- children: I.map((e) => {
385
- let n = e.userId === x;
386
- return /* @__PURE__ */ v("div", {
387
- className: t("rounded-lg border bg-bg-surface p-5", n ? "border-foreground/20" : "border-border-subtle"),
388
- children: [
389
- /* @__PURE__ */ v("div", {
390
- className: "flex items-start gap-3 mb-3",
391
- children: [
392
- /* @__PURE__ */ _("img", {
393
- src: e.userAvatar,
394
- alt: e.userName,
395
- className: "h-10 w-10 rounded-full object-cover shrink-0"
396
- }),
397
- /* @__PURE__ */ v("div", {
398
- className: "flex-1 min-w-0",
399
- children: [/* @__PURE__ */ v("div", {
400
- className: "flex items-center gap-2 flex-wrap",
401
- children: [
402
- /* @__PURE__ */ _("span", {
403
- className: "text-sm font-semibold text-text-primary",
404
- children: e.userName
405
- }),
406
- e.isVerified && /* @__PURE__ */ v("span", {
407
- className: "inline-flex items-center gap-1 rounded-full bg-green-500/10 px-2 py-0.5 text-[10px] font-medium text-green-600 dark:text-green-400",
408
- children: [/* @__PURE__ */ _(c, { className: "h-3 w-3" }), "Verified"]
409
- }),
410
- n && /* @__PURE__ */ _("span", {
411
- className: "inline-flex items-center rounded-full bg-blue-500/10 px-2 py-0.5 text-[10px] font-medium text-blue-600 dark:text-blue-400",
412
- children: "Your Review"
413
- })
414
- ]
415
- }), /* @__PURE__ */ v("div", {
416
- className: "flex flex-wrap items-center gap-2 text-xs text-text-secondary mt-0.5",
417
- children: [/* @__PURE__ */ v("span", { children: [e.itemType === "cart" ? /* @__PURE__ */ _(d, { className: "inline h-3 w-3 mr-0.5" }) : /* @__PURE__ */ _(m, { className: "inline h-3 w-3 mr-0.5" }), e.itemName] }), /* @__PURE__ */ _("span", { children: i(e.createdAt, {
418
- hour: void 0,
419
- minute: void 0,
420
- hour12: void 0
421
- }) })]
422
- })]
423
- }),
424
- /* @__PURE__ */ v("div", {
425
- className: "shrink-0",
426
- children: [/* @__PURE__ */ _(a, {
427
- value: e.rating,
428
- size: "sm"
429
- }), /* @__PURE__ */ v("p", {
430
- className: "text-xs text-text-secondary mt-0.5 text-right",
431
- children: ["From: ", e.cartName]
432
- })]
433
- })
434
- ]
435
- }),
436
- /* @__PURE__ */ v("div", {
437
- className: "mb-3",
438
- children: [/* @__PURE__ */ _("h4", {
439
- className: "text-sm font-semibold text-text-primary mb-1",
440
- children: e.title
441
- }), /* @__PURE__ */ _("p", {
442
- className: "text-sm text-text-primary leading-relaxed",
443
- children: e.comment
444
- })]
445
- }),
446
- e.images && e.images.length > 0 && /* @__PURE__ */ _("div", {
447
- className: "mb-3 flex gap-2 overflow-x-auto pb-1",
448
- children: e.images.map((e, t) => /* @__PURE__ */ _("img", {
449
- src: e,
450
- alt: `Review image ${t + 1}`,
451
- className: "h-20 w-20 rounded-lg object-cover shrink-0"
452
- }, t))
453
- }),
454
- e.response && /* @__PURE__ */ v("div", {
455
- className: "mb-3 rounded-lg border border-blue-500/20 bg-blue-500/5 p-3",
456
- children: [/* @__PURE__ */ v("div", {
457
- className: "flex flex-wrap items-center gap-2 mb-1.5",
458
- children: [
459
- /* @__PURE__ */ _(u, { className: "h-3.5 w-3.5 text-blue-600 dark:text-blue-400" }),
460
- /* @__PURE__ */ v("span", {
461
- className: "text-xs font-medium text-blue-600 dark:text-blue-400",
462
- children: ["Response from ", e.response.respondedBy]
463
- }),
464
- /* @__PURE__ */ _("span", {
465
- className: "text-[10px] text-blue-500/70",
466
- children: i(e.response.respondedAt, {
467
- hour: void 0,
468
- minute: void 0,
469
- hour12: void 0
470
- })
471
- })
472
- ]
473
- }), /* @__PURE__ */ _("p", {
474
- className: "text-xs text-blue-700 dark:text-blue-300 leading-relaxed",
475
- children: e.response.message
476
- })]
477
- }),
478
- /* @__PURE__ */ v("div", {
479
- className: "flex items-center justify-between pt-3 border-t border-border-subtle",
480
- children: [/* @__PURE__ */ v("button", {
481
- type: "button",
482
- onClick: () => B(e.id),
483
- className: t("flex items-center gap-1.5 text-xs transition-colors", e.isHelpful ? "text-blue-600 dark:text-blue-400 font-medium" : "text-text-secondary hover:text-text-primary"),
484
- children: [
485
- /* @__PURE__ */ _(h, { className: t("h-3.5 w-3.5", e.isHelpful && "fill-current") }),
486
- "Helpful (",
487
- e.helpfulCount,
488
- ")"
489
- ]
490
- }), /* @__PURE__ */ v("div", {
491
- className: "flex items-center gap-3 text-xs text-text-secondary",
492
- children: [/* @__PURE__ */ v("span", { children: ["Order: ", e.orderId] }), /* @__PURE__ */ _("button", {
493
- type: "button",
494
- onClick: () => S(`/customer/carts/${e.cartId}`),
495
- className: "font-medium hover:text-text-primary transition-colors",
496
- children: "View Cart"
497
- })]
498
- })]
499
- })
500
- ]
501
- }, e.id);
502
- })
503
- }),
504
- D && /* @__PURE__ */ _("div", {
505
- className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
506
- children: /* @__PURE__ */ _("div", {
507
- className: "w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-lg border border-border-subtle bg-bg-surface shadow-lg",
508
- children: /* @__PURE__ */ v("div", {
509
- className: "p-5",
510
- children: [
511
- /* @__PURE__ */ v("div", {
512
- className: "flex items-center justify-between mb-5",
513
- children: [/* @__PURE__ */ _("h3", {
514
- className: "text-lg font-semibold text-text-primary",
515
- children: "Write a Review"
516
- }), /* @__PURE__ */ _("button", {
517
- type: "button",
518
- onClick: () => O(!1),
519
- className: "rounded-md p-2 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
520
- children: /* @__PURE__ */ _(g, { className: "h-4 w-4" })
521
- })]
522
- }),
523
- /* @__PURE__ */ v("div", {
524
- className: "space-y-4",
525
- children: [
526
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
527
- className: "block text-sm font-medium text-text-primary mb-2",
528
- children: ["Rating ", /* @__PURE__ */ _("span", {
529
- className: "text-red-500",
530
- children: "*"
531
- })]
532
- }), /* @__PURE__ */ _(w, {
533
- value: k.rating,
534
- onChange: (e) => A((t) => ({
535
- ...t,
536
- rating: e
537
- }))
538
- })] }),
539
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
540
- className: "block text-sm font-medium text-text-primary mb-1.5",
541
- children: ["Review Title ", /* @__PURE__ */ _("span", {
542
- className: "text-red-500",
543
- children: "*"
544
- })]
545
- }), /* @__PURE__ */ _("input", {
546
- type: "text",
547
- placeholder: "Summarize your experience",
548
- value: k.title,
549
- onChange: (e) => A((t) => ({
550
- ...t,
551
- title: e.target.value
552
- })),
553
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
554
- })] }),
555
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
556
- className: "block text-sm font-medium text-text-primary mb-1.5",
557
- children: ["Your Review ", /* @__PURE__ */ _("span", {
558
- className: "text-red-500",
559
- children: "*"
560
- })]
561
- }), /* @__PURE__ */ _("textarea", {
562
- rows: 5,
563
- placeholder: "Share your experience with others...",
564
- value: k.comment,
565
- onChange: (e) => A((t) => ({
566
- ...t,
567
- comment: e.target.value
568
- })),
569
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none"
570
- })] }),
571
- /* @__PURE__ */ v("div", {
572
- className: "rounded-lg bg-bg-sunken p-4",
573
- children: [/* @__PURE__ */ v("div", {
574
- className: "flex items-center gap-2 mb-2",
575
- children: [/* @__PURE__ */ _(l, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ _("h4", {
576
- className: "text-sm font-medium text-text-primary",
577
- children: "Review Guidelines"
578
- })]
579
- }), /* @__PURE__ */ v("ul", {
580
- className: "text-xs text-text-secondary space-y-1",
581
- children: [
582
- /* @__PURE__ */ _("li", { children: "- Be honest and helpful to other customers" }),
583
- /* @__PURE__ */ _("li", { children: "- Focus on your experience with the food and service" }),
584
- /* @__PURE__ */ _("li", { children: "- Avoid personal information or inappropriate content" }),
585
- /* @__PURE__ */ _("li", { children: "- Reviews are public and cannot be deleted once submitted" })
586
- ]
587
- })]
588
- })
589
- ]
590
- }),
591
- /* @__PURE__ */ v("div", {
592
- className: "flex items-center gap-3 pt-5",
593
- children: [/* @__PURE__ */ _("button", {
594
- type: "button",
595
- onClick: z,
596
- className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
597
- children: "Submit Review"
598
- }), /* @__PURE__ */ _("button", {
599
- type: "button",
600
- onClick: () => O(!1),
601
- className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
602
- children: "Cancel"
603
- })]
604
- })
605
- ]
606
- })
607
- })
608
- })
609
- ]
610
- });
611
- }
612
- //#endregion
613
- export { T as ReviewsPage };
614
-
615
- //# sourceMappingURL=ReviewsPage.js.map