From 78e90fd398983c013c8c7146194c3c29b3c342c5 Mon Sep 17 00:00:00 2001 From: shafi54 <108669266+shafi-aviz@users.noreply.github.com> Date: Sun, 8 Feb 2026 00:10:47 +0530 Subject: [PATCH] enh --- apps/admin-ui/app/(drawer)/products/edit.tsx | 1 - .../admin-ui/components/VendorSnippetForm.tsx | 1 - .../src/admin-apis/product.controller.ts | 1 - apps/backend/src/trpc/admin-apis/order.ts | 1 - apps/backend/src/trpc/admin-apis/slots.ts | 3 -- .../src/trpc/admin-apis/vendor-snippets.ts | 1 - apps/backend/src/trpc/user-apis/banners.ts | 2 -- apps/backend/src/trpc/user-apis/order.ts | 2 -- apps/backend/src/trpc/user-apis/user.ts | 2 ++ apps/fallback-ui/src/routes/user-home.tsx | 2 -- apps/user-ui/app.json | 8 +++-- apps/user-ui/app/_layout.tsx | 2 ++ apps/user-ui/google-services.json | 29 +++++++++++++++++++ .../services/notif-service/notif-checker.tsx | 1 + .../services/notif-service/notif-context.tsx | 3 ++ 15 files changed, 42 insertions(+), 17 deletions(-) create mode 100644 apps/user-ui/google-services.json diff --git a/apps/admin-ui/app/(drawer)/products/edit.tsx b/apps/admin-ui/app/(drawer)/products/edit.tsx index eb7f115..e0bea74 100644 --- a/apps/admin-ui/app/(drawer)/products/edit.tsx +++ b/apps/admin-ui/app/(drawer)/products/edit.tsx @@ -44,7 +44,6 @@ export default function EditProduct() { tagIds: values.tagIds, }; - console.log({payload}) const formData = new FormData(); Object.entries(payload).forEach(([key, value]) => { diff --git a/apps/admin-ui/components/VendorSnippetForm.tsx b/apps/admin-ui/components/VendorSnippetForm.tsx index 30bc243..2148a77 100644 --- a/apps/admin-ui/components/VendorSnippetForm.tsx +++ b/apps/admin-ui/components/VendorSnippetForm.tsx @@ -63,7 +63,6 @@ const VendorSnippetForm: React.FC = ({ }, onSubmit: async (values) => { try { - console.log({values}) const submitData = { snippetCode: values.snippetCode, diff --git a/apps/backend/src/admin-apis/product.controller.ts b/apps/backend/src/admin-apis/product.controller.ts index 2beeae0..28c0c42 100644 --- a/apps/backend/src/admin-apis/product.controller.ts +++ b/apps/backend/src/admin-apis/product.controller.ts @@ -124,7 +124,6 @@ export const updateProduct = async (req: Request, res: Response) => { const { id } = req.params; const { name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, deals:dealsRaw, imagesToDelete:imagesToDeleteRaw, tagIds } = req.body; - console.log({productQuantity}) const deals = dealsRaw ? JSON.parse(dealsRaw) : null; const imagesToDelete = imagesToDeleteRaw ? JSON.parse(imagesToDeleteRaw) : []; diff --git a/apps/backend/src/trpc/admin-apis/order.ts b/apps/backend/src/trpc/admin-apis/order.ts index 48610fd..cd84fa2 100644 --- a/apps/backend/src/trpc/admin-apis/order.ts +++ b/apps/backend/src/trpc/admin-apis/order.ts @@ -431,7 +431,6 @@ export const orderRouter = router({ .input(updateOrderItemPackagingSchema) .mutation(async ({ input }) => { const { orderItemId, isPackaged, isPackageVerified } = input; - console.log({ orderItemId, isPackaged, isPackageVerified }); // Validate that orderItem exists const orderItem = await db.query.orderItems.findFirst({ diff --git a/apps/backend/src/trpc/admin-apis/slots.ts b/apps/backend/src/trpc/admin-apis/slots.ts index 6cb020c..9297e32 100644 --- a/apps/backend/src/trpc/admin-apis/slots.ts +++ b/apps/backend/src/trpc/admin-apis/slots.ts @@ -543,9 +543,6 @@ export const slotsRouter = router({ const { id, deliverySequence } = input; - - console.log({deliverySequence}) - const [updatedSlot] = await db .update(deliverySlotInfo) .set({ deliverySequence }) diff --git a/apps/backend/src/trpc/admin-apis/vendor-snippets.ts b/apps/backend/src/trpc/admin-apis/vendor-snippets.ts index 653f1f7..80fe66f 100644 --- a/apps/backend/src/trpc/admin-apis/vendor-snippets.ts +++ b/apps/backend/src/trpc/admin-apis/vendor-snippets.ts @@ -130,7 +130,6 @@ export const vendorSnippetsRouter = router({ .input(updateSnippetSchema) .mutation(async ({ input }) => { const { id, updates } = input; - console.log({updates}) // Check if snippet exists const existingSnippet = await db.query.vendorSnippets.findFirst({ diff --git a/apps/backend/src/trpc/user-apis/banners.ts b/apps/backend/src/trpc/user-apis/banners.ts index fb0a571..9123859 100644 --- a/apps/backend/src/trpc/user-apis/banners.ts +++ b/apps/backend/src/trpc/user-apis/banners.ts @@ -29,8 +29,6 @@ export const bannerRouter = router({ } }) ); - - console.log({bannersWithSignedUrls}) return { diff --git a/apps/backend/src/trpc/user-apis/order.ts b/apps/backend/src/trpc/user-apis/order.ts index 492233d..9d17965 100644 --- a/apps/backend/src/trpc/user-apis/order.ts +++ b/apps/backend/src/trpc/user-apis/order.ts @@ -713,8 +713,6 @@ export const orderRouter = router({ const userId = ctx.user.userId; const { id, reason } = input; - console.log({id, reason}) - // Check if order exists and belongs to user const order = await db.query.orders.findFirst({ where: eq(orders.id, Number(id)), diff --git a/apps/backend/src/trpc/user-apis/user.ts b/apps/backend/src/trpc/user-apis/user.ts index 6ef72dd..007bd37 100644 --- a/apps/backend/src/trpc/user-apis/user.ts +++ b/apps/backend/src/trpc/user-apis/user.ts @@ -115,6 +115,8 @@ export const userRouter = router({ const userId = ctx.user.userId; const { token } = input; + console.log({token}) + if (!userId) { throw new ApiError('User not authenticated', 401); } diff --git a/apps/fallback-ui/src/routes/user-home.tsx b/apps/fallback-ui/src/routes/user-home.tsx index 225087c..d7684b6 100644 --- a/apps/fallback-ui/src/routes/user-home.tsx +++ b/apps/fallback-ui/src/routes/user-home.tsx @@ -137,8 +137,6 @@ function ErrorPage() { export function UserHomeRoute() { const { user } = useUserStore() - console.log({user}) - return (
{(user?.role?.name === 'admin' || user?.role?.name === 'super_admin') && } diff --git a/apps/user-ui/app.json b/apps/user-ui/app.json index 91d3f2e..8ed79dc 100644 --- a/apps/user-ui/app.json +++ b/apps/user-ui/app.json @@ -2,7 +2,7 @@ "expo": { "name": "Freshyo", "slug": "freshyo", - "version": "1.1.0", + "version": "1.2.0", "orientation": "portrait", "icon": "./assets/images/freshyo-logo.png", "scheme": "freshyo", @@ -67,7 +67,8 @@ "backgroundColor": "#fff0f6" }, "edgeToEdgeEnabled": true, - "package": "in.freshyo.app" + "package": "in.freshyo.app", + "googleServicesFile": "./google-services.json" }, "web": { "bundler": "metro", @@ -85,7 +86,8 @@ "backgroundColor": "#ffffff" } ], - "expo-secure-store" + "expo-secure-store", + "expo-notifications" ], "experiments": { "typedRoutes": true diff --git a/apps/user-ui/app/_layout.tsx b/apps/user-ui/app/_layout.tsx index cf34719..db3e60d 100755 --- a/apps/user-ui/app/_layout.tsx +++ b/apps/user-ui/app/_layout.tsx @@ -35,6 +35,8 @@ export default function RootLayout() { SpaceMono: require("../assets/fonts/SpaceMono-Regular.ttf"), }); + console.log('from layout') + React.useEffect(() => { Appearance.setColorScheme('light') }, []); diff --git a/apps/user-ui/google-services.json b/apps/user-ui/google-services.json new file mode 100644 index 0000000..70a10aa --- /dev/null +++ b/apps/user-ui/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "535753078248", + "project_id": "freshyo-cefb2", + "storage_bucket": "freshyo-cefb2.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:535753078248:android:d00803550e29eb3238605d", + "android_client_info": { + "package_name": "in.freshyo.app" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyDW4w6vGDrZnkf8vgwdQObBLnT_iucs2H8" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/apps/user-ui/services/notif-service/notif-checker.tsx b/apps/user-ui/services/notif-service/notif-checker.tsx index ab309ad..2024482 100755 --- a/apps/user-ui/services/notif-service/notif-checker.tsx +++ b/apps/user-ui/services/notif-service/notif-checker.tsx @@ -19,6 +19,7 @@ function NotifChecker(props: Props) { const { notifPermission, expoPushToken } = useNotification(); React.useEffect(() => { + console.log({isAuthenticated, expoPushToken, notifPermission}); if (isAuthenticated && expoPushToken && notifPermission === 'granted') { savePushTokenMutation.mutate( { token: expoPushToken }, diff --git a/apps/user-ui/services/notif-service/notif-context.tsx b/apps/user-ui/services/notif-service/notif-context.tsx index db392b1..713fbe3 100755 --- a/apps/user-ui/services/notif-service/notif-context.tsx +++ b/apps/user-ui/services/notif-service/notif-context.tsx @@ -53,10 +53,13 @@ export const NotificationProvider: React.FC = ({ useEffect(() => { registerForPushNotificationsAsync() .then((token) => { + console.log({token}) + setExpoPushToken(token); setNotifPermission("granted"); }) .catch((errorRaw) => { + console.log({errorRaw}) const err = String(errorRaw).slice(7); //remove the "Error: " string component in beginning