enh
This commit is contained in:
parent
d234c8a00f
commit
78e90fd398
15 changed files with 42 additions and 17 deletions
|
|
@ -44,7 +44,6 @@ export default function EditProduct() {
|
|||
tagIds: values.tagIds,
|
||||
};
|
||||
|
||||
console.log({payload})
|
||||
|
||||
const formData = new FormData();
|
||||
Object.entries(payload).forEach(([key, value]) => {
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ const VendorSnippetForm: React.FC<VendorSnippetFormProps> = ({
|
|||
},
|
||||
onSubmit: async (values) => {
|
||||
try {
|
||||
console.log({values})
|
||||
|
||||
const submitData = {
|
||||
snippetCode: values.snippetCode,
|
||||
|
|
|
|||
|
|
@ -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) : [];
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -543,9 +543,6 @@ export const slotsRouter = router({
|
|||
|
||||
const { id, deliverySequence } = input;
|
||||
|
||||
|
||||
console.log({deliverySequence})
|
||||
|
||||
const [updatedSlot] = await db
|
||||
.update(deliverySlotInfo)
|
||||
.set({ deliverySequence })
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@ export const bannerRouter = router({
|
|||
}
|
||||
})
|
||||
);
|
||||
|
||||
console.log({bannersWithSignedUrls})
|
||||
|
||||
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -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)),
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,8 +137,6 @@ function ErrorPage() {
|
|||
export function UserHomeRoute() {
|
||||
const { user } = useUserStore()
|
||||
|
||||
console.log({user})
|
||||
|
||||
return (
|
||||
<div className="max-w-6xl mx-auto space-y-6">
|
||||
{(user?.role?.name === 'admin' || user?.role?.name === 'super_admin') && <AdminDashboard />}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ export default function RootLayout() {
|
|||
SpaceMono: require("../assets/fonts/SpaceMono-Regular.ttf"),
|
||||
});
|
||||
|
||||
console.log('from layout')
|
||||
|
||||
React.useEffect(() => {
|
||||
Appearance.setColorScheme('light')
|
||||
}, []);
|
||||
|
|
|
|||
29
apps/user-ui/google-services.json
Normal file
29
apps/user-ui/google-services.json
Normal 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"
|
||||
}
|
||||
|
|
@ -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 },
|
||||
|
|
|
|||
|
|
@ -53,10 +53,13 @@ export const NotificationProvider: React.FC<NotificationProviderProps> = ({
|
|||
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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue