@mohasinac/appkit 2.7.11 → 2.7.13
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/_internal/server/jobs/core/assignSpinPrize.js +8 -7
- package/dist/_internal/server/jobs/core/bundleStockSync.js +17 -20
- package/dist/_internal/server/jobs/core/countersReconcile.js +3 -2
- package/dist/_internal/server/jobs/core/onProductStockChange.js +18 -20
- package/dist/_internal/server/jobs/core/onProductWrite.js +3 -2
- package/dist/_internal/server/jobs/core/prizeRevealClose.js +7 -5
- package/dist/_internal/server/jobs/core/prizeRevealExpiry.js +11 -6
- package/dist/_internal/server/jobs/core/prizeRevealOpen.js +13 -7
- package/dist/_internal/server/jobs/core/prizeRevealReminder.js +9 -4
- package/dist/_internal/server/jobs/core/triggerEventRaffle.js +3 -2
- package/dist/_internal/shared/features/blog/schema.d.ts +4 -4
- package/dist/_internal/shared/features/categories/bundle-copy.d.ts +3 -6
- package/dist/_internal/shared/features/categories/bundle-copy.js +3 -6
- package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +32 -32
- package/dist/_internal/shared/features/events/schema.d.ts +4 -4
- package/dist/_internal/shared/features/products/schema.d.ts +20 -20
- package/dist/_internal/shared/features/promotions/schema.d.ts +2 -2
- package/dist/_internal/shared/features/reviews/schema.d.ts +1 -1
- package/dist/constants/field-names.d.ts +824 -0
- package/dist/constants/field-names.js +929 -0
- package/dist/constants/sort.d.ts +7 -0
- package/dist/constants/sort.js +5 -0
- package/dist/constants/table-keys.d.ts +48 -0
- package/dist/constants/table-keys.js +46 -0
- package/dist/features/account/components/AddressesIndexListing.js +9 -6
- package/dist/features/admin/components/AdminAllEventEntriesView.js +4 -1
- package/dist/features/admin/components/AdminBidsView.js +4 -1
- package/dist/features/admin/components/AdminBlogView.js +9 -2
- package/dist/features/admin/components/AdminBrandsView.js +9 -2
- package/dist/features/admin/components/AdminBundlesView.js +0 -1
- package/dist/features/admin/components/AdminCarouselView.js +4 -1
- package/dist/features/admin/components/AdminCartsView.js +4 -1
- package/dist/features/admin/components/AdminCategoriesView.js +9 -2
- package/dist/features/admin/components/AdminContactView.js +4 -1
- package/dist/features/admin/components/AdminCouponsView.js +4 -1
- package/dist/features/admin/components/AdminFaqsView.js +5 -1
- package/dist/features/admin/components/AdminFeaturesView.js +5 -2
- package/dist/features/admin/components/AdminHistoryView.js +5 -1
- package/dist/features/admin/components/AdminNewsletterView.js +4 -1
- package/dist/features/admin/components/AdminNotificationsView.js +4 -1
- package/dist/features/admin/components/AdminOrdersView.js +14 -12
- package/dist/features/admin/components/AdminPayoutsView.js +4 -1
- package/dist/features/admin/components/AdminPrizeDrawsView.js +4 -1
- package/dist/features/admin/components/AdminProductsView.js +14 -3
- package/dist/features/admin/components/AdminReturnRequestsView.js +4 -1
- package/dist/features/admin/components/AdminReviewsView.js +4 -1
- package/dist/features/admin/components/AdminScammersView.js +4 -1
- package/dist/features/admin/components/AdminSessionsView.js +4 -1
- package/dist/features/admin/components/AdminStoreAddressesView.js +5 -1
- package/dist/features/admin/components/AdminStoresView.js +10 -3
- package/dist/features/admin/components/AdminSublistingCategoriesView.js +4 -1
- package/dist/features/admin/components/AdminSupportTicketsView.js +4 -1
- package/dist/features/admin/components/AdminTeamView.js +4 -1
- package/dist/features/admin/components/AdminUsersView.js +9 -12
- package/dist/features/admin/components/AdminViewCards.d.ts +12 -0
- package/dist/features/admin/components/AdminViewCards.js +53 -0
- package/dist/features/admin/components/AdminWishlistsView.js +4 -1
- package/dist/features/auctions/repository/bid.repository.js +1 -6
- package/dist/features/auctions/schemas/index.d.ts +4 -4
- package/dist/features/blog/actions/blog-actions.d.ts +16 -16
- package/dist/features/blog/components/BlogFilters.d.ts +28 -28
- package/dist/features/blog/components/BlogFilters.js +18 -15
- package/dist/features/blog/components/BlogIndexListing.js +20 -16
- package/dist/features/blog/schemas/index.d.ts +10 -10
- package/dist/features/categories/components/BundleDetailView.js +0 -1
- package/dist/features/categories/components/CategoriesIndexListing.js +25 -21
- package/dist/features/categories/components/CategoryBundlesListing.js +2 -4
- package/dist/features/categories/schemas/firestore.d.ts +1 -1
- package/dist/features/categories/schemas/index.d.ts +2 -2
- package/dist/features/events/components/AdminEventsView.js +5 -1
- package/dist/features/events/components/EventFilters.d.ts +24 -24
- package/dist/features/events/components/EventFilters.js +16 -13
- package/dist/features/events/components/EventStatusBadge.js +1 -0
- package/dist/features/events/components/EventsIndexListing.js +31 -26
- package/dist/features/events/components/EventsListPageView.js +13 -10
- package/dist/features/events/schemas/firestore.d.ts +1 -0
- package/dist/features/events/schemas/firestore.js +1 -0
- package/dist/features/events/schemas/index.d.ts +1 -1
- package/dist/features/events/types/index.d.ts +1 -1
- package/dist/features/faq/actions/faq-actions.d.ts +10 -10
- package/dist/features/faq/schemas/index.d.ts +4 -4
- package/dist/features/homepage/components/FeaturedBundlesSection.js +1 -3
- package/dist/features/orders/components/OrderFilters.d.ts +20 -20
- package/dist/features/orders/components/OrderFilters.js +33 -30
- package/dist/features/orders/repository/orders.repository.js +1 -15
- package/dist/features/orders/schemas/index.d.ts +2 -2
- package/dist/features/pre-orders/components/PreOrdersIndexListing.js +35 -31
- package/dist/features/pre-orders/repository/preorders.repository.js +8 -4
- package/dist/features/pre-orders/schemas/index.d.ts +3 -3
- package/dist/features/products/components/AuctionsIndexListing.js +34 -30
- package/dist/features/products/components/BidHistory.d.ts +0 -1
- package/dist/features/products/components/BidHistory.js +1 -1
- package/dist/features/products/components/PrizeDrawsIndexListing.js +44 -40
- package/dist/features/products/components/ProductDetailPageView.js +1 -1
- package/dist/features/products/components/ProductFilters.d.ts +20 -20
- package/dist/features/products/components/ProductFilters.js +62 -59
- package/dist/features/products/components/ProductsIndexListing.js +28 -24
- package/dist/features/products/components/ProductsIndexPageView.js +18 -10
- package/dist/features/products/hooks/useProducts.js +2 -0
- package/dist/features/products/repository/products.repository.js +2 -22
- package/dist/features/products/schemas/index.d.ts +28 -28
- package/dist/features/products/schemas/product-features.validators.d.ts +12 -12
- package/dist/features/products/types/index.d.ts +2 -0
- package/dist/features/promotions/components/CouponsIndexListing.js +57 -32
- package/dist/features/promotions/schemas/index.d.ts +4 -4
- package/dist/features/reviews/components/ReviewDetailShell.js +6 -5
- package/dist/features/reviews/components/ReviewFilters.d.ts +16 -16
- package/dist/features/reviews/components/ReviewFilters.js +10 -7
- package/dist/features/reviews/components/ReviewsIndexListing.js +21 -17
- package/dist/features/reviews/components/ReviewsList.d.ts +5 -2
- package/dist/features/reviews/components/ReviewsList.js +11 -5
- package/dist/features/reviews/schemas/firestore.d.ts +1 -0
- package/dist/features/reviews/schemas/index.d.ts +8 -8
- package/dist/features/reviews/types/index.d.ts +1 -0
- package/dist/features/search/schemas/index.d.ts +2 -2
- package/dist/features/seller/components/SellerAuctionsView.js +5 -1
- package/dist/features/seller/components/SellerBidsView.js +4 -1
- package/dist/features/seller/components/SellerCouponsView.js +4 -1
- package/dist/features/seller/components/SellerOffersView.js +5 -1
- package/dist/features/seller/components/SellerOrdersView.js +4 -1
- package/dist/features/seller/components/SellerPayoutsView.js +5 -1
- package/dist/features/seller/components/SellerPreOrdersView.js +4 -1
- package/dist/features/seller/components/SellerPrizeDrawsView.js +4 -1
- package/dist/features/seller/components/SellerProductsView.js +4 -1
- package/dist/features/seller/schemas/index.d.ts +12 -12
- package/dist/features/stores/api/route.js +10 -1
- package/dist/features/stores/components/StoreReviewsListing.js +1 -1
- package/dist/features/stores/components/StoresIndexListing.js +24 -20
- package/dist/features/stores/repository/stores.repository.js +8 -5
- package/dist/features/stores/schemas/firestore.d.ts +1 -0
- package/dist/features/stores/schemas/index.d.ts +4 -4
- package/dist/index.d.ts +8 -1
- package/dist/index.js +12 -1
- package/dist/providers/firebase-client/auth.d.ts +7 -0
- package/dist/providers/firebase-client/auth.js +15 -8
- package/dist/react/hooks/useUrlTable.js +2 -1
- package/dist/seed/bids-seed-data.js +45 -44
- package/dist/seed/categories-seed-data.js +41 -40
- package/dist/seed/coupons-seed-data.js +41 -40
- package/dist/seed/products-auctions-seed-data.js +54 -53
- package/dist/seed/products-preorders-seed-data.js +25 -24
- package/dist/seed/products-prize-draws-seed-data.js +24 -23
- package/dist/seed/products-standard-seed-data.js +294 -293
- package/dist/seed/reviews-seed-data.js +61 -60
- package/dist/seed/scammers-seed-data.js +3 -2
- package/dist/seed/stores-seed-data.js +9 -8
- package/dist/seed/support-tickets-seed-data.js +13 -12
- package/dist/seed/users-seed-data.js +28 -27
- package/dist/tailwind-utilities.css +1 -1
- package/dist/utils/sieve-builder.d.ts +41 -0
- package/dist/utils/sieve-builder.js +66 -0
- package/package.json +2 -2
|
@@ -9,23 +9,27 @@ import { ROUTES } from "../../../next";
|
|
|
9
9
|
import { InteractiveStoreCard } from "./InteractiveStoreCard";
|
|
10
10
|
import { StoreFilters } from "./StoreFilters";
|
|
11
11
|
import { useBulkSelection } from "../../../react/hooks/useBulkSelection";
|
|
12
|
+
import { TABLE_KEYS, VIEW_MODE } from "../../../constants/table-keys";
|
|
13
|
+
import { sortBy } from "../../../constants/sort";
|
|
14
|
+
import { STORE_FIELDS } from "../../../constants/field-names";
|
|
15
|
+
const DEFAULT_SORT = sortBy(STORE_FIELDS.CREATED_AT);
|
|
12
16
|
const STORE_SORT_OPTIONS = [
|
|
13
|
-
{ value:
|
|
14
|
-
{ value: "
|
|
17
|
+
{ value: sortBy(STORE_FIELDS.CREATED_AT), label: "Newest First" },
|
|
18
|
+
{ value: sortBy(STORE_FIELDS.STORE_NAME, "ASC"), label: "Name A–Z" },
|
|
15
19
|
{ value: "-itemsSold", label: "Most Sales" },
|
|
16
20
|
{ value: "-averageRating", label: "Top Rated" },
|
|
17
21
|
];
|
|
18
|
-
const FILTER_KEYS = [
|
|
22
|
+
const FILTER_KEYS = [TABLE_KEYS.CATEGORY, "rating", "minProductCount", "maxProductCount", TABLE_KEYS.FEATURED];
|
|
19
23
|
export function StoresIndexListing({ initialData }) {
|
|
20
|
-
const table = useUrlTable({ defaults: { pageSize: "24", sort:
|
|
21
|
-
const [searchInput, setSearchInput] = useState(table.get(
|
|
24
|
+
const table = useUrlTable({ defaults: { pageSize: "24", sort: DEFAULT_SORT } });
|
|
25
|
+
const [searchInput, setSearchInput] = useState(table.get(TABLE_KEYS.QUERY) || "");
|
|
22
26
|
const [filterOpen, setFilterOpen] = useState(false);
|
|
23
|
-
const [view, setView] = useState(table.get(
|
|
27
|
+
const [view, setView] = useState(table.get(TABLE_KEYS.VIEW) || VIEW_MODE.GRID);
|
|
24
28
|
const handleViewToggle = (next) => {
|
|
25
|
-
if (next ===
|
|
29
|
+
if (next === VIEW_MODE.TABLE)
|
|
26
30
|
return;
|
|
27
31
|
setView(next);
|
|
28
|
-
table.set(
|
|
32
|
+
table.set(TABLE_KEYS.VIEW, next);
|
|
29
33
|
};
|
|
30
34
|
// Pending filter state — buffered until "Apply Filters" clicked
|
|
31
35
|
const [pendingFilters, setPendingFilters] = useState(() => Object.fromEntries(FILTER_KEYS.map((k) => [k, table.get(k)])));
|
|
@@ -69,24 +73,24 @@ export function StoresIndexListing({ initialData }) {
|
|
|
69
73
|
setPendingFilters(Object.fromEntries(FILTER_KEYS.map((k) => [k, ""])));
|
|
70
74
|
}, []);
|
|
71
75
|
const resetAll = useCallback(() => {
|
|
72
|
-
const updates = {
|
|
76
|
+
const updates = { [TABLE_KEYS.QUERY]: "", [TABLE_KEYS.SORT]: "" };
|
|
73
77
|
for (const k of FILTER_KEYS)
|
|
74
78
|
updates[k] = "";
|
|
75
79
|
table.setMany(updates);
|
|
76
80
|
setSearchInput("");
|
|
77
81
|
}, [table]);
|
|
78
82
|
const activeFilterCount = FILTER_KEYS.filter((k) => !!table.get(k)).length;
|
|
79
|
-
const hasActiveState = !!table.get(
|
|
80
|
-
table.get(
|
|
83
|
+
const hasActiveState = !!table.get(TABLE_KEYS.QUERY) ||
|
|
84
|
+
table.get(TABLE_KEYS.SORT) !== DEFAULT_SORT ||
|
|
81
85
|
activeFilterCount > 0;
|
|
82
86
|
const commitSearch = useCallback(() => {
|
|
83
|
-
table.set(
|
|
87
|
+
table.set(TABLE_KEYS.QUERY, searchInput.trim());
|
|
84
88
|
}, [searchInput, table]);
|
|
85
89
|
// Build sieve filters from applied URL params
|
|
86
|
-
const ratingRaw = table.get(
|
|
90
|
+
const ratingRaw = table.get(TABLE_KEYS.RATING);
|
|
87
91
|
const minProductCount = table.get("minProductCount");
|
|
88
92
|
const maxProductCount = table.get("maxProductCount");
|
|
89
|
-
const featured = table.get(
|
|
93
|
+
const featured = table.get(TABLE_KEYS.FEATURED);
|
|
90
94
|
const filterParts = [];
|
|
91
95
|
if (ratingRaw) {
|
|
92
96
|
const ratings = ratingRaw.split("|").filter(Boolean);
|
|
@@ -100,15 +104,15 @@ export function StoresIndexListing({ initialData }) {
|
|
|
100
104
|
if (featured === "true")
|
|
101
105
|
filterParts.push("isFeatured==true");
|
|
102
106
|
const { stores, totalPages, isLoading } = useStores({
|
|
103
|
-
q: table.get(
|
|
104
|
-
page: table.getNumber(
|
|
105
|
-
pageSize: table.getNumber(
|
|
106
|
-
sort: table.get(
|
|
107
|
-
category: table.get(
|
|
107
|
+
q: table.get(TABLE_KEYS.QUERY) || undefined,
|
|
108
|
+
page: table.getNumber(TABLE_KEYS.PAGE, 1),
|
|
109
|
+
pageSize: table.getNumber(TABLE_KEYS.PAGE_SIZE, 24),
|
|
110
|
+
sort: table.get(TABLE_KEYS.SORT) || undefined,
|
|
111
|
+
category: table.get(TABLE_KEYS.CATEGORY) || undefined,
|
|
108
112
|
filters: filterParts.length > 0 ? filterParts.join(",") : undefined,
|
|
109
113
|
}, { initialData });
|
|
110
114
|
const selection = useBulkSelection({ items: stores, keyExtractor: (s) => s.id ?? s.storeSlug });
|
|
111
|
-
return (_jsxs("div", { className: "min-h-screen", children: [_jsx(ListingToolbar, { filterCount: activeFilterCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: "Search stores...", onSearchChange: setSearchInput, onSearchCommit: commitSearch, sortValue: table.get(
|
|
115
|
+
return (_jsxs("div", { className: "min-h-screen", children: [_jsx(ListingToolbar, { filterCount: activeFilterCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: "Search stores...", onSearchChange: setSearchInput, onSearchCommit: commitSearch, sortValue: table.get(TABLE_KEYS.SORT) || DEFAULT_SORT, sortOptions: STORE_SORT_OPTIONS, onSortChange: (v) => { table.set(TABLE_KEYS.SORT, v); }, view: view, onViewChange: handleViewToggle, onResetAll: resetAll, hasActiveState: hasActiveState, bulkMode: selection.isSelecting, bulkSelectedCount: selection.selectedCount, bulkTotalCount: stores.length, onBulkSelectAll: selection.toggleAll, onBulkClear: selection.clearSelection }), _jsx(BulkActionBar, { selectedCount: selection.selectedCount, onClearSelection: selection.clearSelection, actions: [
|
|
112
116
|
{
|
|
113
117
|
id: "compare",
|
|
114
118
|
label: "Compare",
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { STORE_FIELDS } from "../../../constants/field-names";
|
|
2
|
+
const { STATUS, IS_PUBLIC, STORE_SLUG, STORE_CATEGORY, STATS_FIELDS } = STORE_FIELDS;
|
|
3
|
+
const { ACTIVE } = STORE_FIELDS.STATUS_VALUES;
|
|
1
4
|
export class StoresRepository {
|
|
2
5
|
constructor(repo) {
|
|
3
6
|
this.repo = repo;
|
|
@@ -10,23 +13,23 @@ export class StoresRepository {
|
|
|
10
13
|
}
|
|
11
14
|
async findBySlug(storeSlug) {
|
|
12
15
|
const result = await this.repo.findAll({
|
|
13
|
-
filters:
|
|
16
|
+
filters: `${STORE_SLUG}==${storeSlug},${STATUS}==${ACTIVE}`,
|
|
14
17
|
perPage: 1,
|
|
15
18
|
});
|
|
16
19
|
return result.data[0] ?? null;
|
|
17
20
|
}
|
|
18
21
|
async findActive(page = 1, perPage = 20) {
|
|
19
22
|
return this.repo.findAll({
|
|
20
|
-
filters:
|
|
21
|
-
sort:
|
|
23
|
+
filters: `${STATUS}==${ACTIVE},${IS_PUBLIC}==true`,
|
|
24
|
+
sort: `-${STATS_FIELDS.ITEMS_SOLD}`,
|
|
22
25
|
page,
|
|
23
26
|
perPage,
|
|
24
27
|
});
|
|
25
28
|
}
|
|
26
29
|
async findByCategory(category, page = 1, perPage = 20) {
|
|
27
30
|
return this.repo.findAll({
|
|
28
|
-
filters:
|
|
29
|
-
sort:
|
|
31
|
+
filters: `${STORE_CATEGORY}==${category},${STATUS}==${ACTIVE}`,
|
|
32
|
+
sort: `-${STATS_FIELDS.AVERAGE_RATING}`,
|
|
30
33
|
page,
|
|
31
34
|
perPage,
|
|
32
35
|
});
|
|
@@ -34,14 +34,14 @@ export declare const storeListItemSchema: z.ZodObject<{
|
|
|
34
34
|
}, "strip", z.ZodTypeAny, {
|
|
35
35
|
id: string;
|
|
36
36
|
status: string;
|
|
37
|
-
isPublic: boolean;
|
|
38
37
|
storeName: string;
|
|
38
|
+
isPublic: boolean;
|
|
39
39
|
storeSlug: string;
|
|
40
40
|
ownerId: string;
|
|
41
41
|
createdAt?: string | undefined;
|
|
42
42
|
itemsSold?: number | undefined;
|
|
43
|
-
storeDescription?: string | undefined;
|
|
44
43
|
storeCategory?: string | undefined;
|
|
44
|
+
storeDescription?: string | undefined;
|
|
45
45
|
storeLogoURL?: string | undefined;
|
|
46
46
|
storeBannerURL?: string | undefined;
|
|
47
47
|
totalProducts?: number | undefined;
|
|
@@ -50,14 +50,14 @@ export declare const storeListItemSchema: z.ZodObject<{
|
|
|
50
50
|
}, {
|
|
51
51
|
id: string;
|
|
52
52
|
status: string;
|
|
53
|
-
isPublic: boolean;
|
|
54
53
|
storeName: string;
|
|
54
|
+
isPublic: boolean;
|
|
55
55
|
storeSlug: string;
|
|
56
56
|
ownerId: string;
|
|
57
57
|
createdAt?: string | undefined;
|
|
58
58
|
itemsSold?: number | undefined;
|
|
59
|
-
storeDescription?: string | undefined;
|
|
60
59
|
storeCategory?: string | undefined;
|
|
60
|
+
storeDescription?: string | undefined;
|
|
61
61
|
storeLogoURL?: string | undefined;
|
|
62
62
|
storeBannerURL?: string | undefined;
|
|
63
63
|
totalProducts?: number | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -528,7 +528,7 @@ export { storeRepository } from "./repositories/index";
|
|
|
528
528
|
export { scammerRepository } from "./repositories/index";
|
|
529
529
|
export { supportRepository, SupportRepository } from "./repositories/index";
|
|
530
530
|
export type { SupportTicketDocument, SupportTicketCreateInput, SupportTicketUpdateInput, TicketMessage, TicketCategory, TicketStatus, TicketPriority, } from "./repositories/index";
|
|
531
|
-
export { ELIGIBLE_ORDER_STATUSES_FOR_TICKET, SUPPORT_TICKET_COLLECTION, ACTIVE_TICKET_STATUSES, TicketCategoryValues, TicketStatusValues, TicketPriorityValues, } from "./features/support/schemas/firestore";
|
|
531
|
+
export { ELIGIBLE_ORDER_STATUSES_FOR_TICKET, SUPPORT_TICKET_COLLECTION, ACTIVE_TICKET_STATUSES, SUPPORT_TICKET_FIELDS, TicketCategoryValues, TicketStatusValues, TicketPriorityValues, } from "./features/support/schemas/firestore";
|
|
532
532
|
export { supportTicketsSeedData } from "./seed/index";
|
|
533
533
|
export { productFeaturesRepository } from "./repositories/index";
|
|
534
534
|
export type { ProductFeatureListFilter } from "./repositories/index";
|
|
@@ -3047,3 +3047,10 @@ export { getListingRule, getCategoryRule, pickOrderType, getSplitKey, runSyncPre
|
|
|
3047
3047
|
export type { ListingCheckoutRule, CategoryCheckoutRule, CartItemProductPair, OrderItemInput, RefundPolicy, } from "./_internal/shared/checkout/rules";
|
|
3048
3048
|
export { MEGABYTE, MAX_IMAGE_BYTES, MAX_PDF_BYTES, MAX_VIDEO_BYTES, MAX_LABEL, MAX_BYTES, ALLOWED_IMAGE_MIMES, ALLOWED_VIDEO_MIMES, ALLOWED_DOC_MIMES, ALLOWED_MIMES, ALLOWED_TYPES_LABEL, MIME_TO_EXT, PDF_MAGIC, VIDEO_CONVERSION_HINTS, classifyMime, isAllowedMime, maxBytesFor, getConversionHint, } from "./_internal/shared/media/limits";
|
|
3049
3049
|
export type { MediaKind, AllowedImageMime, AllowedVideoMime, AllowedDocMime, AllowedMime, } from "./_internal/shared/media/limits";
|
|
3050
|
+
export { PRODUCT_FIELDS, PRODUCT_STATUS_TRANSITIONS, ORDER_FIELDS, REVIEW_FIELDS, BID_FIELDS, AD_FIELDS, BLOG_FIELDS, BRAND_FIELDS, WISHLIST_FIELDS, HISTORY_FIELDS, COUPON_USAGE_FIELDS, CONVERSATION_FIELDS, CAROUSEL_FIELDS, FAQ_FIELDS, HOMEPAGE_SECTION_FIELDS, SITE_SETTINGS_FIELDS, COMMON_FIELDS, OAUTH_STATE_VALUES, SCHEMA_DEFAULTS, } from "./constants/field-names";
|
|
3051
|
+
export { SORT_DIR, sortBy } from "./constants/sort";
|
|
3052
|
+
export type { SortDirection } from "./constants/sort";
|
|
3053
|
+
export { TABLE_KEYS, VIEW_MODE } from "./constants/table-keys";
|
|
3054
|
+
export type { TableKey, ViewMode } from "./constants/table-keys";
|
|
3055
|
+
export { SIEVE_OP, SIEVE_PIPE_OPS, sieveFilter, sieveMultiEq, expandSieveParam, sieveAnd, } from "./utils/sieve-builder";
|
|
3056
|
+
export type { SieveOp } from "./utils/sieve-builder";
|
package/dist/index.js
CHANGED
|
@@ -1084,7 +1084,7 @@ export { storeRepository } from "./repositories/index";
|
|
|
1084
1084
|
export { scammerRepository } from "./repositories/index";
|
|
1085
1085
|
// supportRepository - Server-only repository for support tickets (BAN1).
|
|
1086
1086
|
export { supportRepository, SupportRepository } from "./repositories/index";
|
|
1087
|
-
export { ELIGIBLE_ORDER_STATUSES_FOR_TICKET, SUPPORT_TICKET_COLLECTION, ACTIVE_TICKET_STATUSES, TicketCategoryValues, TicketStatusValues, TicketPriorityValues, } from "./features/support/schemas/firestore";
|
|
1087
|
+
export { ELIGIBLE_ORDER_STATUSES_FOR_TICKET, SUPPORT_TICKET_COLLECTION, ACTIVE_TICKET_STATUSES, SUPPORT_TICKET_FIELDS, TicketCategoryValues, TicketStatusValues, TicketPriorityValues, } from "./features/support/schemas/firestore";
|
|
1088
1088
|
// Support tickets — seed data
|
|
1089
1089
|
export { supportTicketsSeedData } from "./seed/index";
|
|
1090
1090
|
// SB-UNI-B — sublistingCategoriesRepository + SublistingCategoryDocument deleted.
|
|
@@ -5488,3 +5488,14 @@ export { LISTING_TYPE_REGISTRY, pluginFor } from "./_internal/shared/listing-typ
|
|
|
5488
5488
|
export { getListingRule, getCategoryRule, pickOrderType, getSplitKey, runSyncPreflight, CHECKOUT_RULES, CATEGORY_CHECKOUT_RULES, CHECKOUT_MAX_ORDERS_PER_TX, PRIZE_DRAW_MAX_REVEALS_PER_ORDER, BUNDLE_MAX_QTY_PER_TX, STANDARD_MAX_QTY_PER_LINE, } from "./_internal/shared/checkout/rules";
|
|
5489
5489
|
// Media upload limits — pure constants, safe in both client and server bundles.
|
|
5490
5490
|
export { MEGABYTE, MAX_IMAGE_BYTES, MAX_PDF_BYTES, MAX_VIDEO_BYTES, MAX_LABEL, MAX_BYTES, ALLOWED_IMAGE_MIMES, ALLOWED_VIDEO_MIMES, ALLOWED_DOC_MIMES, ALLOWED_MIMES, ALLOWED_TYPES_LABEL, MIME_TO_EXT, PDF_MAGIC, VIDEO_CONVERSION_HINTS, classifyMime, isAllowedMime, maxBytesFor, getConversionHint, } from "./_internal/shared/media/limits";
|
|
5491
|
+
// ── Field name constants — canonical source of truth for all Firestore field names ──
|
|
5492
|
+
// NOTE: STORE_FIELDS, CATEGORY_FIELDS, EVENT_FIELDS, EVENT_ENTRY_FIELDS, PAYOUT_FIELDS,
|
|
5493
|
+
// COUPON_FIELDS, CART_FIELDS, USER_FIELDS, ADDRESS_FIELDS, NOTIFICATION_FIELDS,
|
|
5494
|
+
// SESSION_FIELDS, SCAMMER_FIELDS are already exported from feature barrels above.
|
|
5495
|
+
export { PRODUCT_FIELDS, PRODUCT_STATUS_TRANSITIONS, ORDER_FIELDS, REVIEW_FIELDS, BID_FIELDS, AD_FIELDS, BLOG_FIELDS, BRAND_FIELDS, WISHLIST_FIELDS, HISTORY_FIELDS, COUPON_USAGE_FIELDS, CONVERSATION_FIELDS, CAROUSEL_FIELDS, FAQ_FIELDS, HOMEPAGE_SECTION_FIELDS, SITE_SETTINGS_FIELDS, COMMON_FIELDS, OAUTH_STATE_VALUES, SCHEMA_DEFAULTS, } from "./constants/field-names";
|
|
5496
|
+
// ── Sort helpers ──────────────────────────────────────────────────────────────
|
|
5497
|
+
export { SORT_DIR, sortBy } from "./constants/sort";
|
|
5498
|
+
// ── URL table keys + view mode ────────────────────────────────────────────────
|
|
5499
|
+
export { TABLE_KEYS, VIEW_MODE } from "./constants/table-keys";
|
|
5500
|
+
// ── Sieve query builder ───────────────────────────────────────────────────────
|
|
5501
|
+
export { SIEVE_OP, SIEVE_PIPE_OPS, sieveFilter, sieveMultiEq, expandSieveParam, sieveAnd, } from "./utils/sieve-builder";
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
import { type Auth } from "firebase/auth";
|
|
1
2
|
import type { IClientAuthProvider } from "../../contracts/client-auth";
|
|
2
3
|
/**
|
|
3
4
|
* Firebase Auth client SDK implementation of IClientAuthProvider.
|
|
5
|
+
*
|
|
6
|
+
* Accepts the already-initialized Auth instance explicitly to avoid relying on
|
|
7
|
+
* the global Firebase app registry — which breaks when Turbopack resolves
|
|
8
|
+
* firebase/auth to a different module copy than the one that called initializeApp().
|
|
4
9
|
*/
|
|
5
10
|
export declare class FirebaseClientAuthProvider implements IClientAuthProvider {
|
|
11
|
+
private readonly _auth;
|
|
12
|
+
constructor(_auth: Auth);
|
|
6
13
|
signInWithEmailAndPassword(email: string, password: string): Promise<void>;
|
|
7
14
|
applyActionCode(code: string): Promise<void>;
|
|
8
15
|
sendPasswordResetEmail(email: string): Promise<void>;
|
|
@@ -1,22 +1,29 @@
|
|
|
1
|
-
import { applyActionCode as fbApplyActionCode, confirmPasswordReset as fbConfirmPasswordReset, EmailAuthProvider,
|
|
1
|
+
import { applyActionCode as fbApplyActionCode, confirmPasswordReset as fbConfirmPasswordReset, EmailAuthProvider, reauthenticateWithCredential, sendPasswordResetEmail as fbSendPasswordResetEmail, signInWithEmailAndPassword as fbSignInWithEmailAndPassword, updatePassword, verifyBeforeUpdateEmail, } from "firebase/auth";
|
|
2
2
|
/**
|
|
3
3
|
* Firebase Auth client SDK implementation of IClientAuthProvider.
|
|
4
|
+
*
|
|
5
|
+
* Accepts the already-initialized Auth instance explicitly to avoid relying on
|
|
6
|
+
* the global Firebase app registry — which breaks when Turbopack resolves
|
|
7
|
+
* firebase/auth to a different module copy than the one that called initializeApp().
|
|
4
8
|
*/
|
|
5
9
|
export class FirebaseClientAuthProvider {
|
|
10
|
+
constructor(_auth) {
|
|
11
|
+
this._auth = _auth;
|
|
12
|
+
}
|
|
6
13
|
async signInWithEmailAndPassword(email, password) {
|
|
7
|
-
await fbSignInWithEmailAndPassword(
|
|
14
|
+
await fbSignInWithEmailAndPassword(this._auth, email, password);
|
|
8
15
|
}
|
|
9
16
|
async applyActionCode(code) {
|
|
10
|
-
await fbApplyActionCode(
|
|
17
|
+
await fbApplyActionCode(this._auth, code);
|
|
11
18
|
}
|
|
12
19
|
async sendPasswordResetEmail(email) {
|
|
13
|
-
await fbSendPasswordResetEmail(
|
|
20
|
+
await fbSendPasswordResetEmail(this._auth, email);
|
|
14
21
|
}
|
|
15
22
|
async confirmPasswordReset(code, newPassword) {
|
|
16
|
-
await fbConfirmPasswordReset(
|
|
23
|
+
await fbConfirmPasswordReset(this._auth, code, newPassword);
|
|
17
24
|
}
|
|
18
25
|
async reauthenticateAndChangePassword(currentPassword, newPassword) {
|
|
19
|
-
const user =
|
|
26
|
+
const user = this._auth.currentUser;
|
|
20
27
|
if (!user?.email)
|
|
21
28
|
throw new Error("No authenticated user.");
|
|
22
29
|
const credential = EmailAuthProvider.credential(user.email, currentPassword);
|
|
@@ -24,7 +31,7 @@ export class FirebaseClientAuthProvider {
|
|
|
24
31
|
await updatePassword(user, newPassword);
|
|
25
32
|
}
|
|
26
33
|
async reauthenticateAndSendEmailUpdateVerification(currentPassword, newEmail) {
|
|
27
|
-
const user =
|
|
34
|
+
const user = this._auth.currentUser;
|
|
28
35
|
if (!user?.email)
|
|
29
36
|
throw new Error("No authenticated user.");
|
|
30
37
|
const credential = EmailAuthProvider.credential(user.email, currentPassword);
|
|
@@ -32,6 +39,6 @@ export class FirebaseClientAuthProvider {
|
|
|
32
39
|
await verifyBeforeUpdateEmail(user, newEmail);
|
|
33
40
|
}
|
|
34
41
|
async reloadCurrentUser() {
|
|
35
|
-
await
|
|
42
|
+
await this._auth.currentUser?.reload();
|
|
36
43
|
}
|
|
37
44
|
}
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
*/
|
|
35
35
|
import { useRouter, usePathname, useSearchParams } from "next/navigation";
|
|
36
36
|
import { useCallback, useRef } from "react";
|
|
37
|
-
|
|
37
|
+
import { TABLE_KEYS } from "../../constants/table-keys";
|
|
38
|
+
const NON_RESETTING_KEYS = [TABLE_KEYS.PAGE, TABLE_KEYS.PAGE_SIZE, TABLE_KEYS.VIEW];
|
|
38
39
|
export function useUrlTable(options) {
|
|
39
40
|
// Always call native hooks unconditionally (React rules).
|
|
40
41
|
const nativeRouter = useRouter();
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Auctions with bidCount = 0 (upcoming / no-bid) are intentionally absent.
|
|
5
5
|
* Buyer IDs from P15 users seed data.
|
|
6
6
|
*/
|
|
7
|
+
import { BID_FIELDS, SCHEMA_DEFAULTS } from "../constants/field-names";
|
|
7
8
|
const NOW = new Date();
|
|
8
9
|
const daysAgo = (n) => new Date(NOW.getTime() - n * 86400000);
|
|
9
10
|
const hoursAgo = (h) => new Date(NOW.getTime() - h * 3600000);
|
|
@@ -21,8 +22,8 @@ export const bidsSeedData = [
|
|
|
21
22
|
userName: "Rahul Sharma",
|
|
22
23
|
userEmail: "rahul.sharma@gmail.com",
|
|
23
24
|
bidAmount: 9999900,
|
|
24
|
-
currency:
|
|
25
|
-
status:
|
|
25
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
26
|
+
status: BID_FIELDS.STATUS_VALUES.OUTBID,
|
|
26
27
|
isWinning: false,
|
|
27
28
|
bidDate: daysAgo(14),
|
|
28
29
|
createdAt: daysAgo(14),
|
|
@@ -36,8 +37,8 @@ export const bidsSeedData = [
|
|
|
36
37
|
userName: "Priya Patel",
|
|
37
38
|
userEmail: "priya.patel@gmail.com",
|
|
38
39
|
bidAmount: 12000000,
|
|
39
|
-
currency:
|
|
40
|
-
status:
|
|
40
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
41
|
+
status: BID_FIELDS.STATUS_VALUES.OUTBID,
|
|
41
42
|
isWinning: false,
|
|
42
43
|
previousBidAmount: 9999900,
|
|
43
44
|
bidDate: daysAgo(10),
|
|
@@ -52,8 +53,8 @@ export const bidsSeedData = [
|
|
|
52
53
|
userName: "Rahul Sharma",
|
|
53
54
|
userEmail: "rahul.sharma@gmail.com",
|
|
54
55
|
bidAmount: 15000000,
|
|
55
|
-
currency:
|
|
56
|
-
status:
|
|
56
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
57
|
+
status: BID_FIELDS.STATUS_VALUES.OUTBID,
|
|
57
58
|
isWinning: false,
|
|
58
59
|
previousBidAmount: 12000000,
|
|
59
60
|
bidDate: daysAgo(7),
|
|
@@ -68,8 +69,8 @@ export const bidsSeedData = [
|
|
|
68
69
|
userName: "Meera Nair",
|
|
69
70
|
userEmail: "meera.nair@gmail.com",
|
|
70
71
|
bidAmount: 20000000,
|
|
71
|
-
currency:
|
|
72
|
-
status:
|
|
72
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
73
|
+
status: BID_FIELDS.STATUS_VALUES.OUTBID,
|
|
73
74
|
isWinning: false,
|
|
74
75
|
previousBidAmount: 15000000,
|
|
75
76
|
bidDate: daysAgo(4),
|
|
@@ -84,8 +85,8 @@ export const bidsSeedData = [
|
|
|
84
85
|
userName: "Arjun Singh",
|
|
85
86
|
userEmail: "arjun.singh@gmail.com",
|
|
86
87
|
bidAmount: 25000000,
|
|
87
|
-
currency:
|
|
88
|
-
status:
|
|
88
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
89
|
+
status: BID_FIELDS.STATUS_VALUES.OUTBID,
|
|
89
90
|
isWinning: false,
|
|
90
91
|
previousBidAmount: 20000000,
|
|
91
92
|
bidDate: daysAgo(2),
|
|
@@ -100,8 +101,8 @@ export const bidsSeedData = [
|
|
|
100
101
|
userName: "Rahul Sharma",
|
|
101
102
|
userEmail: "rahul.sharma@gmail.com",
|
|
102
103
|
bidAmount: 29999900,
|
|
103
|
-
currency:
|
|
104
|
-
status:
|
|
104
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
105
|
+
status: BID_FIELDS.STATUS_VALUES.ACTIVE,
|
|
105
106
|
isWinning: true,
|
|
106
107
|
previousBidAmount: 25000000,
|
|
107
108
|
bidDate: hoursAgo(4),
|
|
@@ -120,8 +121,8 @@ export const bidsSeedData = [
|
|
|
120
121
|
userName: "Priya Patel",
|
|
121
122
|
userEmail: "priya.patel@gmail.com",
|
|
122
123
|
bidAmount: 1499900,
|
|
123
|
-
currency:
|
|
124
|
-
status:
|
|
124
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
125
|
+
status: BID_FIELDS.STATUS_VALUES.OUTBID,
|
|
125
126
|
isWinning: false,
|
|
126
127
|
bidDate: daysAgo(7),
|
|
127
128
|
createdAt: daysAgo(7),
|
|
@@ -135,8 +136,8 @@ export const bidsSeedData = [
|
|
|
135
136
|
userName: "Arjun Singh",
|
|
136
137
|
userEmail: "arjun.singh@gmail.com",
|
|
137
138
|
bidAmount: 2000000,
|
|
138
|
-
currency:
|
|
139
|
-
status:
|
|
139
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
140
|
+
status: BID_FIELDS.STATUS_VALUES.OUTBID,
|
|
140
141
|
isWinning: false,
|
|
141
142
|
previousBidAmount: 1499900,
|
|
142
143
|
bidDate: daysAgo(5),
|
|
@@ -151,8 +152,8 @@ export const bidsSeedData = [
|
|
|
151
152
|
userName: "Priya Patel",
|
|
152
153
|
userEmail: "priya.patel@gmail.com",
|
|
153
154
|
bidAmount: 2999900,
|
|
154
|
-
currency:
|
|
155
|
-
status:
|
|
155
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
156
|
+
status: BID_FIELDS.STATUS_VALUES.OUTBID,
|
|
156
157
|
isWinning: false,
|
|
157
158
|
previousBidAmount: 2000000,
|
|
158
159
|
bidDate: daysAgo(3),
|
|
@@ -167,8 +168,8 @@ export const bidsSeedData = [
|
|
|
167
168
|
userName: "Rahul Sharma",
|
|
168
169
|
userEmail: "rahul.sharma@gmail.com",
|
|
169
170
|
bidAmount: 3999900,
|
|
170
|
-
currency:
|
|
171
|
-
status:
|
|
171
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
172
|
+
status: BID_FIELDS.STATUS_VALUES.OUTBID,
|
|
172
173
|
isWinning: false,
|
|
173
174
|
previousBidAmount: 2999900,
|
|
174
175
|
bidDate: daysAgo(2),
|
|
@@ -183,8 +184,8 @@ export const bidsSeedData = [
|
|
|
183
184
|
userName: "Priya Patel",
|
|
184
185
|
userEmail: "priya.patel@gmail.com",
|
|
185
186
|
bidAmount: 4999900,
|
|
186
|
-
currency:
|
|
187
|
-
status:
|
|
187
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
188
|
+
status: BID_FIELDS.STATUS_VALUES.ACTIVE,
|
|
188
189
|
isWinning: true,
|
|
189
190
|
previousBidAmount: 3999900,
|
|
190
191
|
bidDate: hoursAgo(12),
|
|
@@ -203,8 +204,8 @@ export const bidsSeedData = [
|
|
|
203
204
|
userName: "Meera Nair",
|
|
204
205
|
userEmail: "meera.nair@gmail.com",
|
|
205
206
|
bidAmount: 499900,
|
|
206
|
-
currency:
|
|
207
|
-
status:
|
|
207
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
208
|
+
status: BID_FIELDS.STATUS_VALUES.OUTBID,
|
|
208
209
|
isWinning: false,
|
|
209
210
|
bidDate: daysAgo(5),
|
|
210
211
|
createdAt: daysAgo(5),
|
|
@@ -218,8 +219,8 @@ export const bidsSeedData = [
|
|
|
218
219
|
userName: "Arjun Singh",
|
|
219
220
|
userEmail: "arjun.singh@gmail.com",
|
|
220
221
|
bidAmount: 750000,
|
|
221
|
-
currency:
|
|
222
|
-
status:
|
|
222
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
223
|
+
status: BID_FIELDS.STATUS_VALUES.OUTBID,
|
|
223
224
|
isWinning: false,
|
|
224
225
|
previousBidAmount: 499900,
|
|
225
226
|
bidDate: daysAgo(3),
|
|
@@ -234,8 +235,8 @@ export const bidsSeedData = [
|
|
|
234
235
|
userName: "Meera Nair",
|
|
235
236
|
userEmail: "meera.nair@gmail.com",
|
|
236
237
|
bidAmount: 1000000,
|
|
237
|
-
currency:
|
|
238
|
-
status:
|
|
238
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
239
|
+
status: BID_FIELDS.STATUS_VALUES.OUTBID,
|
|
239
240
|
isWinning: false,
|
|
240
241
|
previousBidAmount: 750000,
|
|
241
242
|
bidDate: daysAgo(1),
|
|
@@ -250,8 +251,8 @@ export const bidsSeedData = [
|
|
|
250
251
|
userName: "Arjun Singh",
|
|
251
252
|
userEmail: "arjun.singh@gmail.com",
|
|
252
253
|
bidAmount: 1299900,
|
|
253
|
-
currency:
|
|
254
|
-
status:
|
|
254
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
255
|
+
status: BID_FIELDS.STATUS_VALUES.ACTIVE,
|
|
255
256
|
isWinning: true,
|
|
256
257
|
previousBidAmount: 1000000,
|
|
257
258
|
bidDate: hoursAgo(3),
|
|
@@ -270,7 +271,7 @@ export const bidsSeedData = [
|
|
|
270
271
|
userName: "Arjun Singh",
|
|
271
272
|
userEmail: "arjun.singh@gmail.com",
|
|
272
273
|
bidAmount: 999900,
|
|
273
|
-
currency:
|
|
274
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
274
275
|
status: "lost",
|
|
275
276
|
isWinning: false,
|
|
276
277
|
bidDate: daysAgo(21),
|
|
@@ -285,7 +286,7 @@ export const bidsSeedData = [
|
|
|
285
286
|
userName: "Priya Patel",
|
|
286
287
|
userEmail: "priya.patel@gmail.com",
|
|
287
288
|
bidAmount: 1499900,
|
|
288
|
-
currency:
|
|
289
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
289
290
|
status: "lost",
|
|
290
291
|
isWinning: false,
|
|
291
292
|
previousBidAmount: 999900,
|
|
@@ -301,7 +302,7 @@ export const bidsSeedData = [
|
|
|
301
302
|
userName: "Arjun Singh",
|
|
302
303
|
userEmail: "arjun.singh@gmail.com",
|
|
303
304
|
bidAmount: 1999900,
|
|
304
|
-
currency:
|
|
305
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
305
306
|
status: "lost",
|
|
306
307
|
isWinning: false,
|
|
307
308
|
previousBidAmount: 1499900,
|
|
@@ -317,7 +318,7 @@ export const bidsSeedData = [
|
|
|
317
318
|
userName: "Priya Patel",
|
|
318
319
|
userEmail: "priya.patel@gmail.com",
|
|
319
320
|
bidAmount: 2499900,
|
|
320
|
-
currency:
|
|
321
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
321
322
|
status: "lost",
|
|
322
323
|
isWinning: false,
|
|
323
324
|
previousBidAmount: 1999900,
|
|
@@ -333,7 +334,7 @@ export const bidsSeedData = [
|
|
|
333
334
|
userName: "Arjun Singh",
|
|
334
335
|
userEmail: "arjun.singh@gmail.com",
|
|
335
336
|
bidAmount: 2799900,
|
|
336
|
-
currency:
|
|
337
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
337
338
|
status: "lost",
|
|
338
339
|
isWinning: false,
|
|
339
340
|
previousBidAmount: 2499900,
|
|
@@ -349,8 +350,8 @@ export const bidsSeedData = [
|
|
|
349
350
|
userName: "Priya Patel",
|
|
350
351
|
userEmail: "priya.patel@gmail.com",
|
|
351
352
|
bidAmount: 2999900,
|
|
352
|
-
currency:
|
|
353
|
-
status:
|
|
353
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
354
|
+
status: BID_FIELDS.STATUS_VALUES.WON,
|
|
354
355
|
isWinning: true,
|
|
355
356
|
previousBidAmount: 2799900,
|
|
356
357
|
bidDate: daysAgo(7),
|
|
@@ -369,7 +370,7 @@ export const bidsSeedData = [
|
|
|
369
370
|
userName: "Rahul Sharma",
|
|
370
371
|
userEmail: "rahul.sharma@gmail.com",
|
|
371
372
|
bidAmount: 299900,
|
|
372
|
-
currency:
|
|
373
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
373
374
|
status: "lost",
|
|
374
375
|
isWinning: false,
|
|
375
376
|
bidDate: daysAgo(45),
|
|
@@ -384,7 +385,7 @@ export const bidsSeedData = [
|
|
|
384
385
|
userName: "Meera Nair",
|
|
385
386
|
userEmail: "meera.nair@gmail.com",
|
|
386
387
|
bidAmount: 499900,
|
|
387
|
-
currency:
|
|
388
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
388
389
|
status: "lost",
|
|
389
390
|
isWinning: false,
|
|
390
391
|
previousBidAmount: 299900,
|
|
@@ -400,7 +401,7 @@ export const bidsSeedData = [
|
|
|
400
401
|
userName: "Rahul Sharma",
|
|
401
402
|
userEmail: "rahul.sharma@gmail.com",
|
|
402
403
|
bidAmount: 599900,
|
|
403
|
-
currency:
|
|
404
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
404
405
|
status: "lost",
|
|
405
406
|
isWinning: false,
|
|
406
407
|
previousBidAmount: 499900,
|
|
@@ -416,7 +417,7 @@ export const bidsSeedData = [
|
|
|
416
417
|
userName: "Meera Nair",
|
|
417
418
|
userEmail: "meera.nair@gmail.com",
|
|
418
419
|
bidAmount: 699900,
|
|
419
|
-
currency:
|
|
420
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
420
421
|
status: "lost",
|
|
421
422
|
isWinning: false,
|
|
422
423
|
previousBidAmount: 599900,
|
|
@@ -432,8 +433,8 @@ export const bidsSeedData = [
|
|
|
432
433
|
userName: "Meera Nair",
|
|
433
434
|
userEmail: "meera.nair@gmail.com",
|
|
434
435
|
bidAmount: 799900,
|
|
435
|
-
currency:
|
|
436
|
-
status:
|
|
436
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
437
|
+
status: BID_FIELDS.STATUS_VALUES.WON,
|
|
437
438
|
isWinning: true,
|
|
438
439
|
previousBidAmount: 699900,
|
|
439
440
|
bidDate: daysAgo(30),
|
|
@@ -671,7 +672,7 @@ function buildBidLadder({ productId, productTitle, amounts, bidders, daysAgoForF
|
|
|
671
672
|
userName: bidder.name,
|
|
672
673
|
userEmail: bidder.email,
|
|
673
674
|
bidAmount: amount,
|
|
674
|
-
currency:
|
|
675
|
+
currency: SCHEMA_DEFAULTS.CURRENCY,
|
|
675
676
|
status,
|
|
676
677
|
isWinning: isLast && endsActive ? true : winIdx === i,
|
|
677
678
|
previousBidAmount: i > 0 ? amounts[i - 1] : undefined,
|