Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 6 additions & 6 deletions Frontend/src/dataset/vehicles.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"id": 1,
"make": "Tesla",
"model": "Model X",
"type": "Electric",
"type": "Luxury",
"transmission": "Automatic",
"price_per_day": 120,
"description": "The Tesla Model X is an all-electric SUV that combines performance, safety, and utility. With falcon-wing doors and advanced autopilot features, it's a cutting-edge electric vehicle.",
Expand All @@ -19,7 +19,7 @@
"id": 2,
"make": "Nissan",
"model": "Leaf",
"type": "Electric",
"type": "Luxury",
"transmission": "Automatic",
"price_per_day": 120,
"description": "The Nissan Leaf is a popular electric hatchback with a focus on efficiency and sustainability. It's an ideal choice for those who prioritize eco-friendly driving.",
Expand Down Expand Up @@ -49,7 +49,7 @@
"id": 4,
"make": "Ford",
"model": "Focus",
"type": "Hatchback",
"type": "Sedan",
"transmission": "Automatic",
"price_per_day": 70,
"description": "The Ford Focus, known for its sharp handling and expressive design, offers an exciting driving experience. It's a versatile hatchback that's both efficient and fun to drive.",
Expand Down Expand Up @@ -79,7 +79,7 @@
"id": 6,
"make": "Honda",
"model": "Odyssey",
"type": "MPV",
"type": "Sedan",
"transmission": "Automatic",
"price_per_day": 75,
"description": "The Honda Odyssey is a family-friendly minivan with spacious interiors and advanced safety features. It provides comfort and convenience for long journeys with the family.",
Expand Down Expand Up @@ -109,7 +109,7 @@
"id": 8,
"make": "Jeep",
"model": "Wrangler",
"type": "Off-road",
"type": "SUV",
"transmission": "Manual",
"price_per_day": 110,
"description": "The Jeep Wrangler is an iconic off-road vehicle with rugged capabilities. It's designed for adventure seekers who want to explore challenging terrains and enjoy open-air driving.",
Expand All @@ -124,7 +124,7 @@
"id": 9,
"make": "Fiat",
"model": "Fiorino",
"type": "MPV",
"type": "Sedan",
"transmission": "Manual",
"price_per_day": 50,
"description": "Fiat Fiorino is a compact MPV that offers a practical and economical solution for city driving and small cargo transport. Its compact dimensions make it ideal for navigating narrow streets.",
Expand Down
2 changes: 1 addition & 1 deletion Frontend/src/screens/room/RoomDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import DateTimePicker from '@react-native-community/datetimepicker';
import MapComponent from '../../components/MapComponent';
const { width } = Dimensions.get('window');
const defaultImage = require('../../../assets/photo/pac1.jpg');
const backend_url = "http://10.16.54.141:3000"||process.env.backend_url;
const backend_url = "http://192.168.137.1:3000"||process.env.backend_url;

const RoomDetails = ({ route, navigation }) => {
const { room } = route.params;
Expand Down
2 changes: 1 addition & 1 deletion Frontend/src/screens/room/RoomScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {

const { width } = Dimensions.get('window');
const defaultImage = require('../../../assets/photo/pac1.jpg');
const backend_url="http://10.16.54.141:3000";
const backend_url="http://192.168.137.1:3000";

const RoomCard = ({ room, onPress }) => {
// Format location coordinates to a readable string
Expand Down
9 changes: 7 additions & 2 deletions Frontend/src/screens/tour/TourDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ const TourDetails = ({ route, navigation }) => {
<Text style={styles.highlightText}>• Lunch included</Text>
</View>

{/* Description Section */}
<Text style={styles.sectionTitle}>Description</Text>
<View style={styles.highlightsContainer}>

</View>
{/* Gallery */}
<Text style={styles.sectionTitle}>Gallery</Text>
<ScrollView horizontal showsHorizontalScrollIndicator={false} style={styles.gallery}>
Expand Down Expand Up @@ -169,15 +174,15 @@ const TourDetails = ({ route, navigation }) => {
</ScrollView>

{/* Bottom Bar */}
<View style={styles.bottomBar}>
{/* <View style={styles.bottomBar}>
<View style={styles.priceContainer}>
<Text style={styles.priceLabel}>Price per person</Text>
<Text style={styles.price}>₹{tour.price || '1500'}<Text style={styles.perDay}>/person</Text></Text>
</View>
<TouchableOpacity style={styles.bookButton} onPress={handleBookNow}>
<Text style={styles.bookButtonText}>Book Now</Text>
</TouchableOpacity>
</View>
</View> */}
</SafeAreaView>
);
};
Expand Down
2 changes: 1 addition & 1 deletion Frontend/src/screens/vehicle/VehicleDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import ReviewRating from '../room/ReviewRating';
import MapComponent from '../../components/MapComponent';

const { width } = Dimensions.get('window');
const backend_url="http://10.16.54.141:3000"||process.env.backend_url;
const backend_url="http://192.168.137.1:3000"||process.env.backend_url;
const defaultImage = require('../../../assets/photo/toyota-innova.jpg');
const FeatureItem = ({ icon, text }) => (
<View style={styles.featureItem}>
Expand Down
29 changes: 24 additions & 5 deletions Frontend/src/screens/vehicle/VehicleScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {

const { width } = Dimensions.get('window');
const defaultImage = require('../../../assets/photo/toyota-innova.jpg');
const backend_url="http://10.16.54.141:3000"||process.env.backend_url;
const backend_url="http://192.168.137.1:3000"||process.env.backend_url;

const VehicleCard = ({ vehicle, onPress }) => (
<TouchableOpacity style={styles.vehicleCard} onPress={onPress}>
Expand Down Expand Up @@ -72,8 +72,8 @@ const VehicleScreen = ({ navigation }) => {
const [locationLoading, setLocationLoading] = useState(false);
const [distanceFilter, setDistanceFilter] = useState(null);
const [sortByDistance, setSortByDistance] = useState(false);

const filters = ['All', 'SUV', 'Sedan', 'Luxury'];

const distanceFilters = [
{ label: 'All', value: null },
{ label: '5km', value: 5 },
Expand Down Expand Up @@ -137,9 +137,28 @@ const VehicleScreen = ({ navigation }) => {
};

const filteredVehicles = vehicles.filter(vehicle => {
const matchesSearch = vehicle.title?.toLowerCase().includes(searchQuery.toLowerCase()) ||
vehicle.location?.toLowerCase().includes(searchQuery.toLowerCase());
const matchesFilter = selectedFilter === 'all' || vehicle.type?.toLowerCase() === selectedFilter.toLowerCase();
const title = vehicle.title?.toLowerCase() || '';
// Try address, then location.name, then fallback to empty string
const locationString = vehicle.address?.toLowerCase() ||
vehicle.location?.name?.toLowerCase() ||
'';
const matchesSearch = title.includes(searchQuery.toLowerCase()) ||
locationString.includes(searchQuery.toLowerCase());

// Filter logic for ALL, SUV, Sedan, Luxury
let matchesFilter = false;
if (selectedFilter === 'all') {
matchesFilter = true; // Show all vehicles
} else if (typeof vehicle.type === 'string') {
const vehicleType = vehicle.type.trim().toLowerCase();
if (selectedFilter === 'suv' && vehicleType === 'suv') {
matchesFilter = true;
} else if (selectedFilter === 'sedan' && vehicleType === 'sedan') {
matchesFilter = true;
} else if (selectedFilter === 'luxury' && vehicleType === 'luxury') {
matchesFilter = true;
}
}

// Apply distance filter if set
let matchesDistance = true;
Expand Down
Binary file added backend/uploads/1750834058140-35678924.zip
Binary file not shown.