bulltrackers-module 1.0.608 → 1.0.609

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.
@@ -1409,7 +1409,22 @@ const fetchAllReviewsForPI = async (db, piId, limit = 100) => {
1409
1409
  .limit(parseInt(limit))
1410
1410
  .get();
1411
1411
 
1412
- const reviews = snap.docs.map(doc => doc.data());
1412
+ // Convert Firestore timestamps to ISO strings for frontend
1413
+ const reviews = snap.docs.map(doc => {
1414
+ const data = doc.data();
1415
+ // Convert Firestore timestamps to ISO strings
1416
+ if (data.createdAt) {
1417
+ data.createdAt = data.createdAt.toDate ? data.createdAt.toDate().toISOString() :
1418
+ (data.createdAt.toISOString ? data.createdAt.toISOString() :
1419
+ (data.createdAt._seconds ? new Date(data.createdAt._seconds * 1000).toISOString() : data.createdAt));
1420
+ }
1421
+ if (data.updatedAt) {
1422
+ data.updatedAt = data.updatedAt.toDate ? data.updatedAt.toDate().toISOString() :
1423
+ (data.updatedAt.toISOString ? data.updatedAt.toISOString() :
1424
+ (data.updatedAt._seconds ? new Date(data.updatedAt._seconds * 1000).toISOString() : data.updatedAt));
1425
+ }
1426
+ return data;
1427
+ });
1413
1428
 
1414
1429
  // 2. Calculate Stats
1415
1430
  let total = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bulltrackers-module",
3
- "version": "1.0.608",
3
+ "version": "1.0.609",
4
4
  "description": "Helper Functions for Bulltrackers.",
5
5
  "main": "index.js",
6
6
  "files": [