Update app.json configuration and enhance logging in index.tsx and schedule.tsx
This commit is contained in:
11
app.json
11
app.json
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"expo": {
|
"expo": {
|
||||||
"name": "iso-test-app",
|
"name": "iso-test-app",
|
||||||
"slug": "iso-test-app",
|
"slug": "mcbeno",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"orientation": "portrait",
|
"orientation": "portrait",
|
||||||
"icon": "./assets/images/icon.png",
|
"icon": "./assets/images/icon.png",
|
||||||
@@ -38,6 +38,13 @@
|
|||||||
],
|
],
|
||||||
"experiments": {
|
"experiments": {
|
||||||
"typedRoutes": true
|
"typedRoutes": true
|
||||||
}
|
},
|
||||||
|
"extra": {
|
||||||
|
"router": {},
|
||||||
|
"eas": {
|
||||||
|
"projectId": "972fe547-cd46-4ed0-b9e1-9f13b035e4b7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"owner": "devbeni"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -55,7 +55,7 @@ export default function Index() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
console.log('Login response:', response.data, response.headers);
|
//console.log('Login response:', response.data, response.headers);
|
||||||
const cookie = response.headers['set-cookie']?.join('; ');
|
const cookie = response.headers['set-cookie']?.join('; ');
|
||||||
const userId = response.data.Data.UserID;
|
const userId = response.data.Data.UserID;
|
||||||
const fullName = response.data.Data.FullName;
|
const fullName = response.data.Data.FullName;
|
||||||
@@ -64,7 +64,7 @@ export default function Index() {
|
|||||||
await SecureStore.setItemAsync('email', user);
|
await SecureStore.setItemAsync('email', user);
|
||||||
await SecureStore.setItemAsync('password', pass);
|
await SecureStore.setItemAsync('password', pass);
|
||||||
await SecureStore.setItemAsync('fullName', fullName || '');
|
await SecureStore.setItemAsync('fullName', fullName || '');
|
||||||
console.log('Saved to SecureStore:', { cookie, userId, user, pass, fullName });
|
//console.log('Saved to SecureStore:', { cookie, userId, user, pass, fullName });
|
||||||
if (isAuto) {
|
if (isAuto) {
|
||||||
if (Platform.OS === 'android') {
|
if (Platform.OS === 'android') {
|
||||||
ToastAndroid.show('Sikeres automatikus bejelentkezés', ToastAndroid.SHORT);
|
ToastAndroid.show('Sikeres automatikus bejelentkezés', ToastAndroid.SHORT);
|
||||||
|
@@ -36,6 +36,9 @@ export default function Schedule() {
|
|||||||
setWorkdays([]);
|
setWorkdays([]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('Beosztás API hívás:', { year, month });
|
||||||
|
|
||||||
const response = await axios.post(
|
const response = await axios.post(
|
||||||
'https://mymenu.mcdonalds.hu/api/UserDataApi/GetWorkDayMonthList',
|
'https://mymenu.mcdonalds.hu/api/UserDataApi/GetWorkDayMonthList',
|
||||||
{ Data: { Year: year, Month: month } },
|
{ Data: { Year: year, Month: month } },
|
||||||
@@ -44,9 +47,7 @@ export default function Schedule() {
|
|||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'cookie': userCookie,
|
'cookie': userCookie,
|
||||||
'origin': 'https://mymenu.mcdonalds.hu',
|
'origin': 'https://mymenu.mcdonalds.hu',
|
||||||
},
|
}
|
||||||
// Axios v1: get full response
|
|
||||||
withCredentials: true,
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
// Cookie frissítés, ha van új set-cookie header
|
// Cookie frissítés, ha van új set-cookie header
|
||||||
|
Reference in New Issue
Block a user