@burdenoff/microfe-subscriberbot 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 (141) hide show
  1. package/dist/index.js +4 -4
  2. package/dist/subscriberbot/SubscriberBotRoot.js +61 -133
  3. package/dist/subscriberbot/SubscriberBotRoot.js.map +1 -1
  4. package/dist/subscriberbot/SubscriberBotRoutes.js +56 -187
  5. package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -1
  6. package/dist/subscriberbot/components/StateViews.js +49 -0
  7. package/dist/subscriberbot/components/StateViews.js.map +1 -0
  8. package/dist/subscriberbot/components/StatusBadge.js +45 -47
  9. package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
  10. package/dist/subscriberbot/context/SubscriberBotContext.js +22 -30
  11. package/dist/subscriberbot/context/SubscriberBotContext.js.map +1 -1
  12. package/dist/subscriberbot/hooks/useSubscriberBotApi.js +342 -195
  13. package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
  14. package/dist/subscriberbot/index.js +1 -1
  15. package/dist/subscriberbot/pages/DashboardPage.js +269 -0
  16. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -0
  17. package/dist/subscriberbot/pages/InboxPage.js +186 -0
  18. package/dist/subscriberbot/pages/InboxPage.js.map +1 -0
  19. package/dist/subscriberbot/pages/InvoicesPage.js +211 -0
  20. package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -0
  21. package/dist/subscriberbot/pages/WorkflowsPage.js +236 -0
  22. package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -0
  23. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +160 -0
  24. package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -0
  25. package/dist/subscriberbot/pages/agents/AgentNewPage.js +140 -0
  26. package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -0
  27. package/dist/subscriberbot/pages/agents/AgentsListPage.js +178 -0
  28. package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -0
  29. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +179 -0
  30. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -0
  31. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +185 -0
  32. package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -0
  33. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +254 -0
  34. package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -0
  35. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +306 -0
  36. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -0
  37. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +253 -0
  38. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -0
  39. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +248 -0
  40. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -0
  41. package/dist/subscriberbot/utils/formatters.js +50 -32
  42. package/dist/subscriberbot/utils/formatters.js.map +1 -1
  43. package/package.json +1 -1
  44. package/dist/subscriberbot/components/InvestmentCard.js +0 -97
  45. package/dist/subscriberbot/components/InvestmentCard.js.map +0 -1
  46. package/dist/subscriberbot/components/RatingDisplay.js +0 -35
  47. package/dist/subscriberbot/components/RatingDisplay.js.map +0 -1
  48. package/dist/subscriberbot/mocks/data.js +0 -1517
  49. package/dist/subscriberbot/mocks/data.js.map +0 -1
  50. package/dist/subscriberbot/mocks/users.js +0 -34
  51. package/dist/subscriberbot/mocks/users.js.map +0 -1
  52. package/dist/subscriberbot/pages/HomePage.js +0 -930
  53. package/dist/subscriberbot/pages/HomePage.js.map +0 -1
  54. package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js +0 -651
  55. package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js.map +0 -1
  56. package/dist/subscriberbot/pages/admin/AdminDashboard.js +0 -679
  57. package/dist/subscriberbot/pages/admin/AdminDashboard.js.map +0 -1
  58. package/dist/subscriberbot/pages/admin/AdminFinancialPage.js +0 -427
  59. package/dist/subscriberbot/pages/admin/AdminFinancialPage.js.map +0 -1
  60. package/dist/subscriberbot/pages/admin/AdminOrdersPage.js +0 -665
  61. package/dist/subscriberbot/pages/admin/AdminOrdersPage.js.map +0 -1
  62. package/dist/subscriberbot/pages/admin/AdminProfilePage.js +0 -261
  63. package/dist/subscriberbot/pages/admin/AdminProfilePage.js.map +0 -1
  64. package/dist/subscriberbot/pages/admin/AdminSettingsPage.js +0 -654
  65. package/dist/subscriberbot/pages/admin/AdminSettingsPage.js.map +0 -1
  66. package/dist/subscriberbot/pages/admin/CartManagementPage.js +0 -874
  67. package/dist/subscriberbot/pages/admin/CartManagementPage.js.map +0 -1
  68. package/dist/subscriberbot/pages/admin/UserManagementPage.js +0 -898
  69. package/dist/subscriberbot/pages/admin/UserManagementPage.js.map +0 -1
  70. package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js +0 -839
  71. package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  72. package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js +0 -705
  73. package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  74. package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js +0 -802
  75. package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  76. package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  77. package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  78. package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js +0 -633
  79. package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  80. package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js +0 -910
  81. package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  82. package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js +0 -879
  83. package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js.map +0 -1
  84. package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js +0 -838
  85. package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js.map +0 -1
  86. package/dist/subscriberbot/pages/common/HelpSupportPage.js +0 -1323
  87. package/dist/subscriberbot/pages/common/HelpSupportPage.js.map +0 -1
  88. package/dist/subscriberbot/pages/common/NotificationCenterPage.js +0 -672
  89. package/dist/subscriberbot/pages/common/NotificationCenterPage.js.map +0 -1
  90. package/dist/subscriberbot/pages/common/SettingsPage.js +0 -973
  91. package/dist/subscriberbot/pages/common/SettingsPage.js.map +0 -1
  92. package/dist/subscriberbot/pages/customer/BookingDetailsPage.js +0 -626
  93. package/dist/subscriberbot/pages/customer/BookingDetailsPage.js.map +0 -1
  94. package/dist/subscriberbot/pages/customer/CartDetailPage.js +0 -654
  95. package/dist/subscriberbot/pages/customer/CartDetailPage.js.map +0 -1
  96. package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js +0 -555
  97. package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js.map +0 -1
  98. package/dist/subscriberbot/pages/customer/CheckoutPage.js +0 -529
  99. package/dist/subscriberbot/pages/customer/CheckoutPage.js.map +0 -1
  100. package/dist/subscriberbot/pages/customer/CustomerDashboard.js +0 -532
  101. package/dist/subscriberbot/pages/customer/CustomerDashboard.js.map +0 -1
  102. package/dist/subscriberbot/pages/customer/CustomerProfilePage.js +0 -630
  103. package/dist/subscriberbot/pages/customer/CustomerProfilePage.js.map +0 -1
  104. package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js +0 -633
  105. package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js.map +0 -1
  106. package/dist/subscriberbot/pages/customer/FavoritesPage.js +0 -484
  107. package/dist/subscriberbot/pages/customer/FavoritesPage.js.map +0 -1
  108. package/dist/subscriberbot/pages/customer/OrderHistoryPage.js +0 -446
  109. package/dist/subscriberbot/pages/customer/OrderHistoryPage.js.map +0 -1
  110. package/dist/subscriberbot/pages/customer/OrderTrackingPage.js +0 -394
  111. package/dist/subscriberbot/pages/customer/OrderTrackingPage.js.map +0 -1
  112. package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js +0 -495
  113. package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js.map +0 -1
  114. package/dist/subscriberbot/pages/customer/ReviewsPage.js +0 -613
  115. package/dist/subscriberbot/pages/customer/ReviewsPage.js.map +0 -1
  116. package/dist/subscriberbot/pages/customer/SavedAddressesPage.js +0 -450
  117. package/dist/subscriberbot/pages/customer/SavedAddressesPage.js.map +0 -1
  118. package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js +0 -886
  119. package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js.map +0 -1
  120. package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js +0 -947
  121. package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  122. package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js +0 -687
  123. package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  124. package/dist/subscriberbot/pages/investor/InvestorDashboard.js +0 -451
  125. package/dist/subscriberbot/pages/investor/InvestorDashboard.js.map +0 -1
  126. package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js +0 -406
  127. package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  128. package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js +0 -575
  129. package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js.map +0 -1
  130. package/dist/subscriberbot/pages/investor/InvestorProfilePage.js +0 -1070
  131. package/dist/subscriberbot/pages/investor/InvestorProfilePage.js.map +0 -1
  132. package/dist/subscriberbot/pages/worker/TaskDetailsPage.js +0 -535
  133. package/dist/subscriberbot/pages/worker/TaskDetailsPage.js.map +0 -1
  134. package/dist/subscriberbot/pages/worker/WorkerDashboard.js +0 -666
  135. package/dist/subscriberbot/pages/worker/WorkerDashboard.js.map +0 -1
  136. package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js +0 -681
  137. package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js.map +0 -1
  138. package/dist/subscriberbot/pages/worker/WorkerProfilePage.js +0 -692
  139. package/dist/subscriberbot/pages/worker/WorkerProfilePage.js.map +0 -1
  140. package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js +0 -588
  141. package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,613 +0,0 @@
1
- import { useSubscriberBot as e } from "../../context/SubscriberBotContext.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/subscriberbot/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-status-warning-text text-status-warning-text" : "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
- /* @__PURE__ */ _(b, {
236
- icon: /* @__PURE__ */ _(m, { className: "h-4 w-4" }),
237
- className: "mb-6",
238
- children: "Share your experience and read what others think. Write reviews for carts you've ordered from to help the community find great service, and revisit your own ratings any time. Honest feedback keeps quality high and helps good carts stand out."
239
- }),
240
- N && /* @__PURE__ */ v("div", {
241
- className: "mb-4 rounded-lg border border-status-success-border/30 bg-status-success-bg/10 p-3 flex items-center gap-2",
242
- children: [/* @__PURE__ */ _(c, { className: "h-4 w-4 text-status-success-text shrink-0" }), /* @__PURE__ */ _("p", {
243
- className: "text-sm text-status-success-text",
244
- children: N
245
- })]
246
- }),
247
- /* @__PURE__ */ v(y, {
248
- className: "flex flex-wrap items-center gap-4 text-sm text-text-secondary mb-6",
249
- children: [
250
- /* @__PURE__ */ v("span", { children: [T.length, " total reviews"] }),
251
- /* @__PURE__ */ v("span", { children: [L, " your reviews"] }),
252
- /* @__PURE__ */ v("span", {
253
- className: "flex items-center gap-1",
254
- children: [
255
- "Average: ",
256
- R,
257
- /* @__PURE__ */ _(m, { className: "h-3.5 w-3.5 fill-status-warning-text text-status-warning-text" })
258
- ]
259
- })
260
- ]
261
- }),
262
- /* @__PURE__ */ _("div", {
263
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 mb-6",
264
- children: /* @__PURE__ */ v("div", {
265
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",
266
- children: [
267
- /* @__PURE__ */ v("div", {
268
- className: "relative",
269
- children: [/* @__PURE__ */ _(p, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ _("input", {
270
- type: "text",
271
- placeholder: "Search reviews...",
272
- value: j.searchQuery,
273
- onChange: (e) => M((t) => ({
274
- ...t,
275
- searchQuery: e.target.value
276
- })),
277
- className: "w-full rounded-lg border border-border-seam 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)]"
278
- })]
279
- }),
280
- /* @__PURE__ */ v("select", {
281
- value: j.type,
282
- onChange: (e) => M((t) => ({
283
- ...t,
284
- type: e.target.value
285
- })),
286
- className: "w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
287
- children: [
288
- /* @__PURE__ */ _("option", {
289
- value: "all",
290
- children: "All Reviews"
291
- }),
292
- /* @__PURE__ */ _("option", {
293
- value: "cart",
294
- children: "Cart Reviews"
295
- }),
296
- /* @__PURE__ */ _("option", {
297
- value: "product",
298
- children: "Product Reviews"
299
- }),
300
- /* @__PURE__ */ _("option", {
301
- value: "my-reviews",
302
- children: "My Reviews"
303
- })
304
- ]
305
- }),
306
- /* @__PURE__ */ v("select", {
307
- value: j.rating,
308
- onChange: (e) => M((t) => ({
309
- ...t,
310
- rating: e.target.value
311
- })),
312
- className: "w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
313
- children: [
314
- /* @__PURE__ */ _("option", {
315
- value: "",
316
- children: "All Ratings"
317
- }),
318
- /* @__PURE__ */ _("option", {
319
- value: "5",
320
- children: "5 Stars"
321
- }),
322
- /* @__PURE__ */ _("option", {
323
- value: "4",
324
- children: "4 Stars"
325
- }),
326
- /* @__PURE__ */ _("option", {
327
- value: "3",
328
- children: "3 Stars"
329
- }),
330
- /* @__PURE__ */ _("option", {
331
- value: "2",
332
- children: "2 Stars"
333
- }),
334
- /* @__PURE__ */ _("option", {
335
- value: "1",
336
- children: "1 Star"
337
- })
338
- ]
339
- }),
340
- /* @__PURE__ */ v("select", {
341
- value: j.sortBy,
342
- onChange: (e) => M((t) => ({
343
- ...t,
344
- sortBy: e.target.value
345
- })),
346
- className: "w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
347
- children: [
348
- /* @__PURE__ */ _("option", {
349
- value: "recent",
350
- children: "Most Recent"
351
- }),
352
- /* @__PURE__ */ _("option", {
353
- value: "helpful",
354
- children: "Most Helpful"
355
- }),
356
- /* @__PURE__ */ _("option", {
357
- value: "rating-high",
358
- children: "Highest Rating"
359
- }),
360
- /* @__PURE__ */ _("option", {
361
- value: "rating-low",
362
- children: "Lowest Rating"
363
- })
364
- ]
365
- })
366
- ]
367
- })
368
- }),
369
- I.length === 0 ? /* @__PURE__ */ _(r, {
370
- illustration: "empty-data",
371
- icon: /* @__PURE__ */ _(d, { className: "h-12 w-12" }),
372
- title: "No reviews found",
373
- description: "Be the first to write a review!",
374
- action: /* @__PURE__ */ _("button", {
375
- type: "button",
376
- onClick: () => O(!0),
377
- className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
378
- children: "Write a Review"
379
- })
380
- }) : /* @__PURE__ */ _("div", {
381
- className: "space-y-4",
382
- children: I.map((e) => {
383
- let n = e.userId === x;
384
- return /* @__PURE__ */ v("div", {
385
- className: t("rounded-lg border bg-bg-surface p-5", n ? "border-foreground/20" : "border-border-seam"),
386
- children: [
387
- /* @__PURE__ */ v("div", {
388
- className: "flex items-start gap-3 mb-3",
389
- children: [
390
- /* @__PURE__ */ _("img", {
391
- src: e.userAvatar,
392
- alt: e.userName,
393
- className: "h-10 w-10 rounded-full object-cover shrink-0"
394
- }),
395
- /* @__PURE__ */ v("div", {
396
- className: "flex-1 min-w-0",
397
- children: [/* @__PURE__ */ v("div", {
398
- className: "flex items-center gap-2 flex-wrap",
399
- children: [
400
- /* @__PURE__ */ _("span", {
401
- className: "text-sm font-semibold text-text-primary",
402
- children: e.userName
403
- }),
404
- e.isVerified && /* @__PURE__ */ v("span", {
405
- className: "inline-flex items-center gap-1 rounded-full bg-status-success-bg/10 px-2 py-0.5 text-[10px] font-medium text-status-success-text",
406
- children: [/* @__PURE__ */ _(c, { className: "h-3 w-3" }), "Verified"]
407
- }),
408
- n && /* @__PURE__ */ _("span", {
409
- className: "inline-flex items-center rounded-full bg-status-info-bg/10 px-2 py-0.5 text-[10px] font-medium text-status-info-text",
410
- children: "Your Review"
411
- })
412
- ]
413
- }), /* @__PURE__ */ v("div", {
414
- className: "flex flex-wrap items-center gap-2 text-xs text-text-secondary mt-0.5",
415
- 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, {
416
- hour: void 0,
417
- minute: void 0,
418
- hour12: void 0
419
- }) })]
420
- })]
421
- }),
422
- /* @__PURE__ */ v("div", {
423
- className: "shrink-0",
424
- children: [/* @__PURE__ */ _(a, {
425
- value: e.rating,
426
- size: "sm"
427
- }), /* @__PURE__ */ v("p", {
428
- className: "text-xs text-text-secondary mt-0.5 text-right",
429
- children: ["From: ", e.cartName]
430
- })]
431
- })
432
- ]
433
- }),
434
- /* @__PURE__ */ v("div", {
435
- className: "mb-3",
436
- children: [/* @__PURE__ */ _("h4", {
437
- className: "text-sm font-semibold text-text-primary mb-1",
438
- children: e.title
439
- }), /* @__PURE__ */ _("p", {
440
- className: "text-sm text-text-primary leading-relaxed",
441
- children: e.comment
442
- })]
443
- }),
444
- e.images && e.images.length > 0 && /* @__PURE__ */ _("div", {
445
- className: "mb-3 flex gap-2 overflow-x-auto pb-1",
446
- children: e.images.map((e, t) => /* @__PURE__ */ _("img", {
447
- src: e,
448
- alt: `Review image ${t + 1}`,
449
- className: "h-20 w-20 rounded-lg object-cover shrink-0"
450
- }, t))
451
- }),
452
- e.response && /* @__PURE__ */ v("div", {
453
- className: "mb-3 rounded-lg border border-status-info-border/20 bg-status-info-bg/5 p-3",
454
- children: [/* @__PURE__ */ v("div", {
455
- className: "flex flex-wrap items-center gap-2 mb-1.5",
456
- children: [
457
- /* @__PURE__ */ _(u, { className: "h-3.5 w-3.5 text-status-info-text" }),
458
- /* @__PURE__ */ v("span", {
459
- className: "text-xs font-medium text-status-info-text",
460
- children: ["Response from ", e.response.respondedBy]
461
- }),
462
- /* @__PURE__ */ _("span", {
463
- className: "text-[10px] text-status-info-text/70",
464
- children: i(e.response.respondedAt, {
465
- hour: void 0,
466
- minute: void 0,
467
- hour12: void 0
468
- })
469
- })
470
- ]
471
- }), /* @__PURE__ */ _("p", {
472
- className: "text-xs text-status-info-text leading-relaxed",
473
- children: e.response.message
474
- })]
475
- }),
476
- /* @__PURE__ */ v("div", {
477
- className: "flex items-center justify-between pt-3 border-t border-border-seam",
478
- children: [/* @__PURE__ */ v("button", {
479
- type: "button",
480
- onClick: () => B(e.id),
481
- className: t("flex items-center gap-1.5 text-xs transition-colors", e.isHelpful ? "text-status-info-text font-medium" : "text-text-secondary hover:text-text-primary"),
482
- children: [
483
- /* @__PURE__ */ _(h, { className: t("h-3.5 w-3.5", e.isHelpful && "fill-current") }),
484
- "Helpful (",
485
- e.helpfulCount,
486
- ")"
487
- ]
488
- }), /* @__PURE__ */ v("div", {
489
- className: "flex items-center gap-3 text-xs text-text-secondary",
490
- children: [/* @__PURE__ */ v("span", { children: ["Order: ", e.orderId] }), /* @__PURE__ */ _("button", {
491
- type: "button",
492
- onClick: () => S(`/customer/carts/${e.cartId}`),
493
- className: "font-medium hover:text-text-primary transition-colors",
494
- children: "View Cart"
495
- })]
496
- })]
497
- })
498
- ]
499
- }, e.id);
500
- })
501
- }),
502
- D && /* @__PURE__ */ _("div", {
503
- className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-canvas/50 p-4",
504
- children: /* @__PURE__ */ _("div", {
505
- className: "w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-lg border border-border-seam bg-bg-surface shadow-lg",
506
- children: /* @__PURE__ */ v("div", {
507
- className: "p-5",
508
- children: [
509
- /* @__PURE__ */ v("div", {
510
- className: "flex items-center justify-between mb-5",
511
- children: [/* @__PURE__ */ _("h3", {
512
- className: "text-lg font-semibold text-text-primary",
513
- children: "Write a Review"
514
- }), /* @__PURE__ */ _("button", {
515
- type: "button",
516
- onClick: () => O(!1),
517
- className: "rounded-md p-2 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
518
- children: /* @__PURE__ */ _(g, { className: "h-4 w-4" })
519
- })]
520
- }),
521
- /* @__PURE__ */ v("div", {
522
- className: "space-y-4",
523
- children: [
524
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
525
- className: "block text-sm font-medium text-text-primary mb-2",
526
- children: ["Rating ", /* @__PURE__ */ _("span", {
527
- className: "text-status-error-text",
528
- children: "*"
529
- })]
530
- }), /* @__PURE__ */ _(w, {
531
- value: k.rating,
532
- onChange: (e) => A((t) => ({
533
- ...t,
534
- rating: e
535
- }))
536
- })] }),
537
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
538
- className: "block text-sm font-medium text-text-primary mb-1.5",
539
- children: ["Review Title ", /* @__PURE__ */ _("span", {
540
- className: "text-status-error-text",
541
- children: "*"
542
- })]
543
- }), /* @__PURE__ */ _("input", {
544
- type: "text",
545
- placeholder: "Summarize your experience",
546
- value: k.title,
547
- onChange: (e) => A((t) => ({
548
- ...t,
549
- title: e.target.value
550
- })),
551
- className: "w-full rounded-lg border border-border-seam 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)]"
552
- })] }),
553
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
554
- className: "block text-sm font-medium text-text-primary mb-1.5",
555
- children: ["Your Review ", /* @__PURE__ */ _("span", {
556
- className: "text-status-error-text",
557
- children: "*"
558
- })]
559
- }), /* @__PURE__ */ _("textarea", {
560
- rows: 5,
561
- placeholder: "Share your experience with others...",
562
- value: k.comment,
563
- onChange: (e) => A((t) => ({
564
- ...t,
565
- comment: e.target.value
566
- })),
567
- className: "w-full rounded-lg border border-border-seam 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"
568
- })] }),
569
- /* @__PURE__ */ v("div", {
570
- className: "rounded-lg bg-bg-sunken p-4",
571
- children: [/* @__PURE__ */ v("div", {
572
- className: "flex items-center gap-2 mb-2",
573
- children: [/* @__PURE__ */ _(l, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ _("h4", {
574
- className: "text-sm font-medium text-text-primary",
575
- children: "Review Guidelines"
576
- })]
577
- }), /* @__PURE__ */ v("ul", {
578
- className: "text-xs text-text-secondary space-y-1",
579
- children: [
580
- /* @__PURE__ */ _("li", { children: "- Be honest and helpful to other customers" }),
581
- /* @__PURE__ */ _("li", { children: "- Focus on your experience with the food and service" }),
582
- /* @__PURE__ */ _("li", { children: "- Avoid personal information or inappropriate content" }),
583
- /* @__PURE__ */ _("li", { children: "- Reviews are public and cannot be deleted once submitted" })
584
- ]
585
- })]
586
- })
587
- ]
588
- }),
589
- /* @__PURE__ */ v("div", {
590
- className: "flex items-center gap-3 pt-5",
591
- children: [/* @__PURE__ */ _("button", {
592
- type: "button",
593
- onClick: z,
594
- className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
595
- children: "Submit Review"
596
- }), /* @__PURE__ */ _("button", {
597
- type: "button",
598
- onClick: () => O(!1),
599
- className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
600
- children: "Cancel"
601
- })]
602
- })
603
- ]
604
- })
605
- })
606
- })
607
- ]
608
- });
609
- }
610
- //#endregion
611
- export { T as ReviewsPage };
612
-
613
- //# sourceMappingURL=ReviewsPage.js.map