Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
ce4e340
mi baby that's my first commit here
andreribeiro87 May 12, 2025
0ba9d66
Adds @turf/turf (geospatial)
falcaodiogo May 14, 2025
3335c6a
Diogo's house
falcaodiogo May 14, 2025
f9ee6f5
Updates coordinates for the "bacalhau"
falcaodiogo May 14, 2025
d05b8da
Improves directional text handling and distance formatting
falcaodiogo May 14, 2025
bf50fdb
Uses GPS (for now) for showing near products
falcaodiogo May 14, 2025
ca517fe
Adds utility to calculate distance between coordinates«
falcaodiogo May 14, 2025
daf0859
Refines navigation logic and proximity handling
falcaodiogo May 14, 2025
dfa0b8a
Vibrations with directions
falcaodiogo May 14, 2025
94492e2
Start and end navigations bottom sheets
falcaodiogo May 14, 2025
928e31f
ups logs
falcaodiogo May 14, 2025
e45458a
Replaces vibration feedback with haptic feedback
falcaodiogo May 15, 2025
52a5fd0
Modal at product w/ no image
falcaodiogo May 15, 2025
e1386bc
Ieeta geojson
falcaodiogo May 16, 2025
c5f13af
No photo product modal navigation
falcaodiogo May 16, 2025
8a2a2d8
Updates map layers and navigation logic for IEETA building
falcaodiogo May 16, 2025
2d5cc55
change geojson colors
falcaodiogo May 16, 2025
cec1f21
3D Ieeta on app
falcaodiogo May 16, 2025
fad68e9
importante
andreribeiro87 May 19, 2025
3802423
importante
andreribeiro87 May 19, 2025
b794be1
passado distante
andreribeiro87 May 19, 2025
d853bbe
talvez precise de levar limpeza
andreribeiro87 May 19, 2025
7525afc
que chato
andreribeiro87 May 19, 2025
d4f4dce
Merge remote-tracking branch 'origin/FINDIT-146-MapLibre-GL-setup' in…
andreribeiro87 May 19, 2025
8de5d39
diogo see it
andreribeiro87 May 19, 2025
8426d75
sorry ruben
andreribeiro87 May 19, 2025
10a1d4a
crazy bro
andreribeiro87 May 19, 2025
436cc3a
Identification of beacons
falcaodiogo May 19, 2025
48ee946
crazy brotha
andreribeiro87 May 19, 2025
db47f3f
Merge branch 'FINDIT-153-Beacon-development' of github.com:PI-FindIt/…
andreribeiro87 May 19, 2025
475e66d
finally
andreribeiro87 May 19, 2025
04d1d84
amazing
andreribeiro87 May 19, 2025
8fbfdc2
vamos ficar por aqui
andreribeiro87 May 21, 2025
1ccb998
let's atualizar
andreribeiro87 May 22, 2025
8461b31
Merge remote-tracking branch 'origin/main' into FINDIT-153-Beacon-dev…
andreribeiro87 May 22, 2025
30e00bb
uma merda eu sei
andreribeiro87 May 22, 2025
1f78a2f
Fix voice auto fetching
andreribeiro87 May 22, 2025
ad380b4
uma merda eu sei
andreribeiro87 May 24, 2025
a5a6e68
eu sou um pau mandado, ass: ruben
andreribeiro87 May 26, 2025
edab0c6
Merge branch 'main' into FINDIT-153-Beacon-development
andreribeiro87 May 26, 2025
8dab16a
tu cansas-me
andreribeiro87 May 26, 2025
9d716d5
tu és o melhor do mundo
andreribeiro87 May 26, 2025
89a16f7
fixes are fixing
andreribeiro87 May 26, 2025
b645b42
Merge branch 'main' into FINDIT-153-Beacon-development
andreribeiro87 May 27, 2025
e451142
NÃO ACREDITO, IT'S WORKING
andreribeiro87 May 27, 2025
b12bb44
nav icon
falcaodiogo May 27, 2025
d7c4d24
Icons
falcaodiogo May 27, 2025
de556b4
Adds product and user location icons to map
falcaodiogo May 27, 2025
8a605ef
Animais
RGarrido03 May 27, 2025
96e89c7
Use selected list id
RGarrido03 May 27, 2025
60021e3
try new precision
RGarrido03 May 27, 2025
8b032d8
inactive list after finishing
RGarrido03 May 27, 2025
bc96d46
caga na luz animal
andreribeiro87 May 28, 2025
5ab42de
Merge remote-tracking branch 'origin/FINDIT-153-Beacon-development' i…
andreribeiro87 May 28, 2025
3b77d6d
students@deti
RGarrido03 May 28, 2025
2b9b856
Merge remote-tracking branch 'origin/FINDIT-153-Beacon-development' i…
RGarrido03 May 28, 2025
98c8f4c
Revert "students@deti"
RGarrido03 May 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions andreribeiro.tail05225.ts.net.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
-----BEGIN CERTIFICATE-----
MIIDpTCCAyugAwIBAgISBWj/gCcn0eX+LC+ZTjt6cqUQMAoGCCqGSM49BAMDMDIx
CzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQDEwJF
NTAeFw0yNTA1MTEyMjIyNThaFw0yNTA4MDkyMjIyNTdaMCgxJjAkBgNVBAMTHWFu
ZHJlcmliZWlyby50YWlsMDUyMjUudHMubmV0MFkwEwYHKoZIzj0CAQYIKoZIzj0D
AQcDQgAE2Yt8Qw/jpCrfqAbwaqb7IYEg59uFCbm6WJXKvGGgE6b0gUevDRoCvLRB
pekd8BoRSnB0J96MbN92m7COrHrlWaOCAikwggIlMA4GA1UdDwEB/wQEAwIHgDAd
BgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0TAQH/BAIwADAdBgNV
HQ4EFgQUnCVU3h0zoWYDl5Wm63qKmvhweWwwHwYDVR0jBBgwFoAUnytfzzwhT50E
t+0rLMTGcIvS1w0wMgYIKwYBBQUHAQEEJjAkMCIGCCsGAQUFBzAChhZodHRwOi8v
ZTUuaS5sZW5jci5vcmcvMCgGA1UdEQQhMB+CHWFuZHJlcmliZWlyby50YWlsMDUy
MjUudHMubmV0MBMGA1UdIAQMMAowCAYGZ4EMAQIBMC0GA1UdHwQmMCQwIqAgoB6G
HGh0dHA6Ly9lNS5jLmxlbmNyLm9yZy8xNy5jcmwwggECBgorBgEEAdZ5AgQCBIHz
BIHwAO4AdQDM+w9qhXEJZf6Vm1PO6bJ8IumFXA2XjbapflTA/kwNsAAAAZbBp0to
AAAEAwBGMEQCIDRM8CoRAXL7KbTKpKCSfSZKz+vTKz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BQcB
AQQmMCQwIgYIKwYBBQUHMAKGFmh0dHA6Ly94MS5pLmxlbmNyLm9yZy8wEwYDVR0g
BAwwCjAIBgZngQwBAgEwJwYDVR0fBCAwHjAcoBqgGIYWaHR0cDovL3gxLmMubGVu
Y3Iub3JnLzANBgkqhkiG9w0BAQsFAAOCAgEAH3KdNEVCQdqk0LKyuNImTKdRJY1C
2uw2SJajuhqkyGPY8C+zzsufZ+mgnhnq1A2KVQOSykOEnUbx1cy637rBAihx97r+
bcwbZM6sTDIaEriR/PLk6LKs9Be0uoVxgOKDcpG9svD33J+G9Lcfv1K9luDmSTgG
6XNFIN5vfI5gs/lMPyojEMdIzK9blcl2/1vKxO8WGCcjvsQ1nJ/Pwt8LQZBfOFyV
XP8ubAp/au3dc4EKWG9MO5zcx1qT9+NXRGdVWxGvmBFRAajciMfXME1ZuGmk3/GO
koAM7ZkjZmleyokP1LGzmfJcUd9s7eeu1/9/eg5XlXd/55GtYjAM+C4DG5i7eaNq
cm2F+yxYIPt6cbbtYVNJCGfHWqHEQ4FYStUyFnv8sjyqU8ypgZaNJ9aVcWSICLOI
E1/Qv/7oKsnZCWJ926wU6RqG1OYPGOi1zuABhLw61cuPVDT28nQS/e6z95cJXq0e
K1BcaJ6fJZsmbjRgD5p3mvEf5vdQM7MCEvU0tHbsx2I5mHHJoABHb8KVBgWp/lcX
GWiWaeOyB7RP+OfDtvi2OsapxXiV7vNVs7fMlrRjY1joKaqmmycnBvAq14AEbtyL
sVfOS66B8apkeFX2NY4XPEYV4ZSCe8VHPrdrERk2wILG3T/EGmSIkCYVUMSnjmJd
VQD9F6Na/+zmXCc=
-----END CERTIFICATE-----
27 changes: 26 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
"foregroundImage": "./assets/images/logos/android-adaptive-icon.png",
"monochromeImage": "./assets/images/logos/android-tinted-icon.png"
},
"permissions": [
"ACCESS_BACKGROUND_LOCATION",
"ACCESS_COARSE_LOCATION",
"ACCESS_FINE_LOCATION",
"BLUETOOTH_SCAN",
"BLUETOOTH_CONNECT",
"BLUETOOTH_ADVERTISE"
],
"package": "pt.findit.clientapp"
},
"web": {
Expand Down Expand Up @@ -61,6 +69,23 @@
{
"iosUrlScheme": "com.googleusercontent.apps.742231570327-s21pt82lc97lc35obefgn5nrdq4m0rn6"
}
],
[
"react-native-permissions",
{
"iosPermissions": [
"BluetoothAlways",
"BluetoothPeripheral",
"LocationAlwaysAndWhenInUse",
"LocationWhenInUse"
]
}
],
[
"expo-sensors",
{
"motionPermission": "Allow $(PRODUCT_NAME) to access your device motion"
}
]
],
"experiments": {
Expand All @@ -82,4 +107,4 @@
"url": "https://u.expo.dev/0bab4576-b4ae-4290-9835-f6e61e1b2bf8"
}
}
}
}
46 changes: 31 additions & 15 deletions app/(tabs)/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Sparkles } from "lucide-react-native";
import { useEffect, useMemo, useState } from "react";
import { ScrollView, View } from "react-native";
import ItemCountCard from "@/components/ui/totalItemsAndPrice";
import { router } from "expo-router";
import { useRouter } from "expo-router";
import { useQuery } from "@apollo/client";
import ErrorComponent from "@/components/ErrorComponent";
import { gql } from "@/graphql/gql";
Expand Down Expand Up @@ -47,28 +47,32 @@ const GET_FILTERED_SUPERMARKETS = gql(`
`);

const NavigationScreen = () => {
const { currentListId } = useAuth();
const { id, currentListId } = useAuth();
const { toast, toastOnError } = useToast();
const router = useRouter();
const { setState: setBackground } = useBackground();
const iconBackgroundColor = useThemeColor("text");
const [userLocation, setUserLocation] = useState<Coordinate | null>(null);

const { loading, error, data } = useQuery(GET_FILTERED_SUPERMARKETS, {
variables: {
listId: currentListId ?? "",
coordinateFilter: {
op: Operator.Le,
value: {
latitude: userLocation?.latitude ?? 0, // REAL CORDINATES
longitude: userLocation?.longitude ?? 0,
// latitude: 40.64427, // TEST CORDINATES
// longitude: -8.64554,
distance: 10,
const { loading, error, data, refetch } = useQuery(
GET_FILTERED_SUPERMARKETS,
{
variables: {
listId: currentListId ?? "",
coordinateFilter: {
op: Operator.Le,
value: {
latitude: userLocation?.latitude ?? 0, // REAL CORDINATES
longitude: userLocation?.longitude ?? 0,
// latitude: 40.64427, // TEST CORDINATES
// longitude: -8.64554,
distance: 10,
},
},
},
skip: !userLocation || !currentListId,
},
skip: !userLocation || !currentListId,
});
);

const isLoading = loading || !userLocation;
const [debouncedLoading, setDebouncedLoading] = useDebouncedState(
Expand All @@ -92,11 +96,23 @@ const NavigationScreen = () => {
}

const location = await Location.getCurrentPositionAsync({});
console.log("User location:", location);
setUserLocation({
latitude: location.coords.latitude,
longitude: location.coords.longitude,
distance: 0,
});
await refetch({
listId: currentListId ?? "",
coordinateFilter: {
op: Operator.Le,
value: {
latitude: location.coords.latitude,
longitude: location.coords.longitude,
distance: 10,
},
},
});
};

getLocation().catch(toastOnError);
Expand Down
Loading
Loading