This commit is contained in:
shafi54 2026-02-08 00:10:47 +05:30
parent d234c8a00f
commit 78e90fd398
15 changed files with 42 additions and 17 deletions

View file

@ -44,7 +44,6 @@ export default function EditProduct() {
tagIds: values.tagIds, tagIds: values.tagIds,
}; };
console.log({payload})
const formData = new FormData(); const formData = new FormData();
Object.entries(payload).forEach(([key, value]) => { Object.entries(payload).forEach(([key, value]) => {

View file

@ -63,7 +63,6 @@ const VendorSnippetForm: React.FC<VendorSnippetFormProps> = ({
}, },
onSubmit: async (values) => { onSubmit: async (values) => {
try { try {
console.log({values})
const submitData = { const submitData = {
snippetCode: values.snippetCode, snippetCode: values.snippetCode,

View file

@ -124,7 +124,6 @@ export const updateProduct = async (req: Request, res: Response) => {
const { id } = req.params; const { id } = req.params;
const { name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, deals:dealsRaw, imagesToDelete:imagesToDeleteRaw, tagIds } = req.body; 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 deals = dealsRaw ? JSON.parse(dealsRaw) : null;
const imagesToDelete = imagesToDeleteRaw ? JSON.parse(imagesToDeleteRaw) : []; const imagesToDelete = imagesToDeleteRaw ? JSON.parse(imagesToDeleteRaw) : [];

View file

@ -431,7 +431,6 @@ export const orderRouter = router({
.input(updateOrderItemPackagingSchema) .input(updateOrderItemPackagingSchema)
.mutation(async ({ input }) => { .mutation(async ({ input }) => {
const { orderItemId, isPackaged, isPackageVerified } = input; const { orderItemId, isPackaged, isPackageVerified } = input;
console.log({ orderItemId, isPackaged, isPackageVerified });
// Validate that orderItem exists // Validate that orderItem exists
const orderItem = await db.query.orderItems.findFirst({ const orderItem = await db.query.orderItems.findFirst({

View file

@ -543,9 +543,6 @@ export const slotsRouter = router({
const { id, deliverySequence } = input; const { id, deliverySequence } = input;
console.log({deliverySequence})
const [updatedSlot] = await db const [updatedSlot] = await db
.update(deliverySlotInfo) .update(deliverySlotInfo)
.set({ deliverySequence }) .set({ deliverySequence })

View file

@ -130,7 +130,6 @@ export const vendorSnippetsRouter = router({
.input(updateSnippetSchema) .input(updateSnippetSchema)
.mutation(async ({ input }) => { .mutation(async ({ input }) => {
const { id, updates } = input; const { id, updates } = input;
console.log({updates})
// Check if snippet exists // Check if snippet exists
const existingSnippet = await db.query.vendorSnippets.findFirst({ const existingSnippet = await db.query.vendorSnippets.findFirst({

View file

@ -30,8 +30,6 @@ export const bannerRouter = router({
}) })
); );
console.log({bannersWithSignedUrls})
return { return {
banners: bannersWithSignedUrls, banners: bannersWithSignedUrls,

View file

@ -713,8 +713,6 @@ export const orderRouter = router({
const userId = ctx.user.userId; const userId = ctx.user.userId;
const { id, reason } = input; const { id, reason } = input;
console.log({id, reason})
// Check if order exists and belongs to user // Check if order exists and belongs to user
const order = await db.query.orders.findFirst({ const order = await db.query.orders.findFirst({
where: eq(orders.id, Number(id)), where: eq(orders.id, Number(id)),

View file

@ -115,6 +115,8 @@ export const userRouter = router({
const userId = ctx.user.userId; const userId = ctx.user.userId;
const { token } = input; const { token } = input;
console.log({token})
if (!userId) { if (!userId) {
throw new ApiError('User not authenticated', 401); throw new ApiError('User not authenticated', 401);
} }

View file

@ -137,8 +137,6 @@ function ErrorPage() {
export function UserHomeRoute() { export function UserHomeRoute() {
const { user } = useUserStore() const { user } = useUserStore()
console.log({user})
return ( return (
<div className="max-w-6xl mx-auto space-y-6"> <div className="max-w-6xl mx-auto space-y-6">
{(user?.role?.name === 'admin' || user?.role?.name === 'super_admin') && <AdminDashboard />} {(user?.role?.name === 'admin' || user?.role?.name === 'super_admin') && <AdminDashboard />}

View file

@ -2,7 +2,7 @@
"expo": { "expo": {
"name": "Freshyo", "name": "Freshyo",
"slug": "freshyo", "slug": "freshyo",
"version": "1.1.0", "version": "1.2.0",
"orientation": "portrait", "orientation": "portrait",
"icon": "./assets/images/freshyo-logo.png", "icon": "./assets/images/freshyo-logo.png",
"scheme": "freshyo", "scheme": "freshyo",
@ -67,7 +67,8 @@
"backgroundColor": "#fff0f6" "backgroundColor": "#fff0f6"
}, },
"edgeToEdgeEnabled": true, "edgeToEdgeEnabled": true,
"package": "in.freshyo.app" "package": "in.freshyo.app",
"googleServicesFile": "./google-services.json"
}, },
"web": { "web": {
"bundler": "metro", "bundler": "metro",
@ -85,7 +86,8 @@
"backgroundColor": "#ffffff" "backgroundColor": "#ffffff"
} }
], ],
"expo-secure-store" "expo-secure-store",
"expo-notifications"
], ],
"experiments": { "experiments": {
"typedRoutes": true "typedRoutes": true

View file

@ -35,6 +35,8 @@ export default function RootLayout() {
SpaceMono: require("../assets/fonts/SpaceMono-Regular.ttf"), SpaceMono: require("../assets/fonts/SpaceMono-Regular.ttf"),
}); });
console.log('from layout')
React.useEffect(() => { React.useEffect(() => {
Appearance.setColorScheme('light') Appearance.setColorScheme('light')
}, []); }, []);

View file

@ -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"
}

View file

@ -19,6 +19,7 @@ function NotifChecker(props: Props) {
const { notifPermission, expoPushToken } = useNotification(); const { notifPermission, expoPushToken } = useNotification();
React.useEffect(() => { React.useEffect(() => {
console.log({isAuthenticated, expoPushToken, notifPermission});
if (isAuthenticated && expoPushToken && notifPermission === 'granted') { if (isAuthenticated && expoPushToken && notifPermission === 'granted') {
savePushTokenMutation.mutate( savePushTokenMutation.mutate(
{ token: expoPushToken }, { token: expoPushToken },

View file

@ -53,10 +53,13 @@ export const NotificationProvider: React.FC<NotificationProviderProps> = ({
useEffect(() => { useEffect(() => {
registerForPushNotificationsAsync() registerForPushNotificationsAsync()
.then((token) => { .then((token) => {
console.log({token})
setExpoPushToken(token); setExpoPushToken(token);
setNotifPermission("granted"); setNotifPermission("granted");
}) })
.catch((errorRaw) => { .catch((errorRaw) => {
console.log({errorRaw})
const err = String(errorRaw).slice(7); //remove the "Error: " string component in beginning const err = String(errorRaw).slice(7); //remove the "Error: " string component in beginning