Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development luzma 2 #29

Closed
wants to merge 64 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
707515a
modificacion .env para añadir llave mapa
luzmagurzua Oct 30, 2024
15dc448
forms en proceso
J0SEF4 Oct 31, 2024
62af5e3
feat: add fetch to publicatiom view
gustfernandez Oct 31, 2024
f19a055
Merge branch 'development' into jose_desarrollo
luzmagurzua Nov 1, 2024
725eb88
Merge pull request #13 from iic2154-uc-cl/jose_desarrollo
luzmagurzua Nov 1, 2024
079ee24
forms
J0SEF4 Nov 2, 2024
28054a9
forms terminados
J0SEF4 Nov 2, 2024
b698f9f
forms listo
J0SEF4 Nov 2, 2024
31dbab0
cambios dome
domenicahoppe Nov 2, 2024
72c4c07
Merge branch 'development' into nueva_rama
luzmagurzua Nov 2, 2024
234c242
Merge pull request #14 from iic2154-uc-cl/nueva_rama
luzmagurzua Nov 2, 2024
39839fa
mejoras merge dome
domenicahoppe Nov 2, 2024
dd9072e
boton servicios-iniciar sesion
domenicahoppe Nov 2, 2024
ccd91aa
cambios
luzmagurzua Nov 2, 2024
b3319a6
cambios
luzmagurzua Nov 2, 2024
4b33f12
fix error
luzmagurzua Nov 2, 2024
c3dd3af
Revert "fix error"
luzmagurzua Nov 2, 2024
9b7bdeb
Revert "cambios"
luzmagurzua Nov 2, 2024
f91e5ce
Revert "cambios"
luzmagurzua Nov 2, 2024
ed09fef
forms 20
J0SEF4 Nov 2, 2024
b5f3193
fix: error development
luzmagurzua Nov 2, 2024
c279e28
merge errors
J0SEF4 Nov 2, 2024
73941d1
Merge pull request #18 from iic2154-uc-cl/jose-desarrollo-copy-3
J0SEF4 Nov 2, 2024
9b7648e
notificaciones
luzmagurzua Nov 2, 2024
7d482ee
add: incorporacion botones formularios
luzmagurzua Nov 2, 2024
cf8677f
boton siguiente implementado en formulario camping
luzmagurzua Nov 4, 2024
5e7d133
fix boton siguiente para formulario eventos
luzmagurzua Nov 4, 2024
ba91587
mapa_forms - gestion_sol - mejoras
domenicahoppe Nov 4, 2024
3f88514
Merge branch 'boton_siguiente' into development_dome
luzmagurzua Nov 4, 2024
d0d3f92
fix: button asistir calendario
gustfernandez Nov 4, 2024
240457c
feat: view structure of publication
gustfernandez Nov 4, 2024
6e96eb3
Merge pull request #20 from iic2154-uc-cl/post-page-info
gustfernandez Nov 4, 2024
0d11a7b
incorporar boton en formularios
luzmagurzua Nov 4, 2024
c645d60
Merge pull request #21 from iic2154-uc-cl/ok
luzmagurzua Nov 4, 2024
590d7fc
hospedaje y camping con boton
luzmagurzua Nov 4, 2024
70059c7
fix: hospedaje form
luzmagurzua Nov 5, 2024
a720912
style: restyle features of post in index
gustfernandez Nov 5, 2024
f69a9c6
feat: add calendario to navbar
gustfernandez Nov 5, 2024
967ca52
feat: add view of a post
gustfernandez Nov 5, 2024
f1d6d96
style: change style of features of post in map
gustfernandez Nov 5, 2024
973f658
feat: implement feedback in filters and map view
gustfernandez Nov 5, 2024
2bdcd94
style: change text eventos in calendar view
gustfernandez Nov 5, 2024
6e7f884
Merge branch 'development' into feat/post-page-info
gustfernandez Nov 5, 2024
3b13c12
mis favoritos cambio tarjeta y vista pagar y publicar
J0SEF4 Nov 5, 2024
52ab15e
Merge pull request #22 from iic2154-uc-cl/feat/post-page-info
gustfernandez Nov 5, 2024
a4b6ece
Merge pull request #23 from iic2154-uc-cl/fix/feedback-client
gustfernandez Nov 5, 2024
9c5d1a6
paginas terminos y politicas de privacidad y cambiar botón cerrar sesión
J0SEF4 Nov 6, 2024
ab0632a
paginas politca y terminos listas
J0SEF4 Nov 6, 2024
a9d6ea8
Merge branch 'development' into jose-development-post-webpay
domenicahoppe Nov 6, 2024
e3e16ba
Merge pull request #24 from iic2154-uc-cl/jose-development-post-webpay
domenicahoppe Nov 6, 2024
7903b95
formularios, inicio, navbar
luzmagurzua Nov 6, 2024
bc7b82f
Merge branch 'development' into fix/hospedaje-form
domenicahoppe Nov 6, 2024
9e7de2e
Merge pull request #25 from iic2154-uc-cl/fix/hospedaje-form
domenicahoppe Nov 6, 2024
38ed405
add: formularios funcionando
luzmagurzua Nov 6, 2024
6828091
fix favoritos border
luzmagurzua Nov 6, 2024
bd5b0bc
notificaciones
luzmagurzua Nov 6, 2024
7d39df6
notifiacion masiva funcional
FranciscoJorquera Nov 6, 2024
8f59aff
navbar admin, navbar moderador
luzmagurzua Nov 6, 2024
381f914
campana
luzmagurzua Nov 6, 2024
67798ac
Merge pull request #26 from iic2154-uc-cl/test_notificaciones
luzmagurzua Nov 6, 2024
cebd7df
campana funcional para masivas [muestra todas]
FranciscoJorquera Nov 7, 2024
c6e24f3
Merge pull request #27 from iic2154-uc-cl/get_campana
luzmagurzua Nov 7, 2024
fade211
notificaciones
luzmagurzua Nov 7, 2024
b04ff88
Merge branch 'main' into development_luzma_2
luzmagurzua Nov 7, 2024
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
11 changes: 11 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@
# NEXT_PUBLIC_LOGIN_REDIRECT_URL=http://localhost:3000/post/CreateProperty
# NEXT_PUBLIC_LOGOUT_REDIRECT_URL=http://localhost:3000


VITE_GOOGLE_MAPS_API_KEY=AIzaSyAJuzF9SX5VP6CU38hq-lgRopJ66jYgb5E

#VITE_AUTH0_AUDIENCE=https://geomap/
#VITE_AUTH0_DOMAIN=dev-7w1no2zl1opt24if.us.auth0.com
#VITE_AUTH0_CLIENT_ID=QrElcRF9AI2H6dRBwCChbc04JvtKygJo

VITE_AUTH0_AUDIENCE=https://geomap/
VITE_AUTH0_DOMAIN=dev-7w1no2zl1opt24if.us.auth0.com
VITE_AUTH0_CLIENT_ID=QrElcRF9AI2H6dRBwCChbc04JvtKygJo

VITE_API_URL=http://localhost:8000/
ONESIGNAL_APP_ID=a8f9feb6-81c6-464a-ac6d-56bf9fafba76
ONESIGNAL_REST_API_KEY=YmY2ZWEwMTUtNmMzZi00MDg1LWEyZDMtMDE5ZjQ0OWQ5NmQw
2 changes: 1 addition & 1 deletion .github/workflows/commit_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:
--sha "$SHA" \
--message "$MESSAGE" \
--webhook "$WEBHOOK" \
--websecret "$WEBSECRET"
--websecret "$WEBSECRET"
15 changes: 13 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,24 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="src/assets/logo_oficial.png" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Kaushan+Script&display=swap" rel="stylesheet">

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>GeoMapp</title>

<script src="https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js" defer></script>
<script>
window.OneSignalDeferred = window.OneSignalDeferred || [];
OneSignalDeferred.push(async function(OneSignal) {
await OneSignal.init({
appId: "a8f9feb6-81c6-464a-ac6d-56bf9fafba76",
});
});
</script>

<title>GEOMAPP</title>
</head>
<body>
<div id="root"></div>
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@material-tailwind/react": "^2.1.10",
"@mui/icons-material": "^6.1.6",
"@mui/lab": "^6.0.0-beta.10",
"@mui/material": "^6.1.2",
"@mui/system": "^6.1.2",
"@mui/x-date-pickers": "^7.19.0",
"@react-google-maps/api": "^2.19.3",
"@react-google-maps/api": "^2.20.3",
"aws-sdk": "^2.1691.0",
"axios": "^1.7.7",
"browser-image-compression": "^2.0.2",
"compress.js": "1.1.2",
"date-fns": "2.29.3",
"framer-motion": "^11.11.11",
"lucide-react": "^0.454.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand All @@ -39,6 +43,6 @@
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.12",
"globals": "^15.9.0",
"vite": "^5.4.8"
"vite": "^5.4.10"
}
}
1 change: 1 addition & 0 deletions public/OneSignalSDKWorker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
importScripts("https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.sw.js");
Binary file modified src/.DS_Store
Binary file not shown.
10 changes: 8 additions & 2 deletions src/Router.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import Favoritos from './pages/users/favoritos.jsx';
import Notification from './pages/users/notificaciones.jsx';
import NewMapa from './pages/newMapa.jsx';
import Calendario from './pages/calendario.jsx';
import GestionSolicitudes from './pages/GestionSolicitudes.jsx';
import TermCondition from './pages/TermCondition.jsx';
import Privacy from './pages/PrivacyPolitic.jsx';
import NewPublicacionInfo from './components/NewPublicacionInfo.jsx';

function Router() {

Expand All @@ -30,8 +34,10 @@ function Router() {
<Route path="/notificaciones" element={<Notification />} />
<Route path="/mapa-navegacion" element={<NewMapa />} />
<Route path="/calendario" element={<Calendario />} />


<Route path="/gestion-solicitudes" element={<GestionSolicitudes />} />
<Route path="/term-condition" element={<TermCondition />} />
<Route path="/privacy" element={<Privacy />} />
<Route path="/publicacion/:id" element={<NewPublicacionInfo />} />

</Routes>
</BrowserRouter>
Expand Down
Binary file added src/assets/Empanadas.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/Logo270.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/boton1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/boton2 2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/boton2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/boton3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/fblogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/iglogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/logo_admin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/logo_oficial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/pin2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/tellogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/boton1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/boton2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/boton3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions src/components/Campana.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import React, { useState, useEffect } from 'react';
import '../pages/users/campana.css';

const Campana = () => {
const [isOpen, setIsOpen] = useState(false);
const [notificaciones, setNotificaciones] = useState([]);

const toggleNotifications = () => {
setIsOpen(!isOpen);
};

useEffect(() => {
if (isOpen && notificaciones.length === 0) {
fetch('http://localhost:8000/onesignal/notificaciones/')
.then((response) => response.json())
.then((data) => setNotificaciones(data))
.catch((error) => console.error('Error fetching notifications:', error));
}
}, [isOpen]);

return (
<div className="campana-container">
<div className="loader" onClick={toggleNotifications}>
<svg
viewBox="0 0 24 24"
fill="none"
height="24"
width="24"
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
className="w-6 h-6 text-gray-800 dark:text-white"
>
<path
d="M12 5.365V3m0 2.365a5.338 5.338 0 0 1 5.133 5.368v1.8c0 2.386 1.867 2.982 1.867 4.175 0 .593 0 1.292-.538 1.292H5.538C5 18 5 17.301 5 16.708c0-1.193 1.867-1.789 1.867-4.175v-1.8A5.338 5.338 0 0 1 12 5.365ZM8.733 18c.094.852.306 1.54.944 2.112a3.48 3.48 0 0 0 4.646 0c.638-.572 1.236-1.26 1.33-2.112h-6.92Z"
strokeWidth="2"
strokeLinejoin="round"
strokeLinecap="round"
stroke="currentColor"
></path>
</svg>
<div className="point"></div>
</div>

{isOpen && (
<div className="notification-box">
<h4>Notificaciones</h4>
<ul>
{notificaciones.length > 0 ? (
notificaciones.map((notificacion, index) => (
<li key={index}>
<h5>{notificacion.title}</h5>
<p>{notificacion.message}</p>
</li>
))
) : (
<li>No hay notificaciones disponibles</li>
)}
</ul>
</div>
)}
</div>
);
};

export default Campana;
46 changes: 27 additions & 19 deletions src/components/Filter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,26 +180,34 @@ const Filter = ({ onCategoryChange, onSubCategoryChange, onRatingChange, onPrice

{/* linea de separación */}
<hr/>
{/* Solo se muestra si categoría: Propiedad o Camping */}
{selectedIndustries.includes('Propiedad') || selectedIndustries.includes('Camping') ? (
<>
<h3>Precio</h3>
<div className="price-list">
{/* rango de precio: 0 - 100000 */}
<Slider
value={rangePrice}
onChange={handlePriceChange}
valueLabelDisplay="off"
min={0}
max={100000}
step={1000}
style={{ width: '100%', color: '#fa7e02' }}
/>
<span className='price-text'>
<span>{`$${rangePrice[0]}`}</span>
<span>{' - '}</span>
<span>{`$${rangePrice[1]}`}</span>
</span>

</div>
</>
)
: null}

{/* linea de separación */}

<h3>Precio</h3>
<div className="price-list">
{/* rango de precio: 0 - 100000 */}
<Slider
value={rangePrice}
onChange={handlePriceChange}
valueLabelDisplay="off"
min={0}
max={100000}
step={1000}
style={{ width: '100%', color: '#fa7e02' }}
/>
<span className='price-text'>
<span>{`$${rangePrice[0]}`}</span>
<span>{' - '}</span>
<span>{`$${rangePrice[1]}`}</span>
</span>

</div>

<div className="buttons">
<button id="showResultsBtn" className="show-results-btn" onClick={handleReset}>
Expand Down
14 changes: 9 additions & 5 deletions src/components/Footer.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import React from 'react';
import '../styles/footer.css'; // Asegúrate de que este archivo está correctamente vinculado
import React, { useState } from 'react';
import { useAuth0 } from '@auth0/auth0-react';

//import '../styles/footer.css'; // Asegúrate de que este archivo está correctamente vinculado
import { Link } from 'react-router-dom';

function Footer() {
return (

return (
<footer className="footer">
<div className="footer-links">
<a href="Terminos.html" className="footer-link">Términos y Condiciones de uso</a>
<a href="Politicas.html" className="footer-link">Políticas de privacidad</a>
<Link to="/term-condition" className="footer-link">Términos y Condiciones de uso</Link>
<Link to="/privacy" className="footer-link">Políticas de privacidad</Link>
</div>
</footer>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/GoogleMap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const GoogleMapComponent = ({ onMapLoad, filterType, places }) => {
return (
<div style={containerStyle}>
<div style={mapStyle}>
<LoadScript googleMapsApiKey="AIzaSyAJuzF9SX5VP6CU38hq-lgRopJ66jYgb5E">
<LoadScript googleMapsApiKey={import.meta.env.VITE_GOOGLE_MAPS_API_KEY}>
<GoogleMap
mapContainerStyle={mapStyle}
center={userLocation}
Expand Down
59 changes: 59 additions & 0 deletions src/components/GoogleMapSelectLocation.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import React, { useState } from 'react';
import { GoogleMap, LoadScript, Marker } from '@react-google-maps/api';

const containerStyle = {
height: '400px', // Ajusta el tamaño del contenedor si es necesario
width: '100%',
};

const center = {
lat: -33.45694, // Coordenadas iniciales para Santiago, Chile
lng: -70.64827,
};

const GoogleMapSelectLocation = ({ onLocationSelect }) => {
const [selectedLocation, setSelectedLocation] = useState(null);

const handleMapClick = (event) => {
const location = {
lat: event.latLng.lat(),
lng: event.latLng.lng(),
};
setSelectedLocation(location);

//Llamada a la API de Geocoding
const geocoder = new window.google.maps.Geocoder();
geocoder.geocode({ location }, (results, status) => {
if (status === "OK") {
if (results[0]) {
const address = results[0].formatted_address;
onLocationSelect(address); // Pasar la dirección al formulario
} else {
console.log("No se encontraron resultados");
}
} else {
console.log("Geocoder falló debido a: " + status);
}
});
};

return (
<LoadScript googleMapsApiKey={import.meta.env.VITE_GOOGLE_MAPS_API_KEY}>
<GoogleMap
mapContainerStyle={containerStyle}
center={center}
zoom={12}
onClick={handleMapClick} // Añade la función para manejar clics en el mapa
>
{selectedLocation && (
<Marker
position={selectedLocation}
title="Ubicación seleccionada"
/>
)}
</GoogleMap>
</LoadScript>
);
};

export default GoogleMapSelectLocation;
46 changes: 46 additions & 0 deletions src/components/ImageUpload.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
html, body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /* Usar San Francisco */
}
.image-upload-container {
max-width: 800px;
margin: 0 auto;
}

.dropzone {
background-color: #f9fafb; /* Color de fondo más claro */
transition: background-color 0.2s;
}

.dropzone:hover {
background-color: #e5e7eb; /* Color de fondo al pasar el mouse */
}

.image-preview {
margin-top: 0.5rem;
width: 100%; /* Asegúrate de que ocupe todo el ancho de su contenedor */
height: 150px; /* Altura fija para todas las imágenes */
object-fit: cover; /* Mantener la relación de aspecto y recortar si es necesario */
}

.font-medium {
padding-left: 10px;
margin-bottom: 70px;
}
.absolute{
position: absolute;
border: none;
background-color: transparent;
}
.absolute:hover{
color: #666;
}
.flex{
display: flex flex-wrap;
}







Loading
Loading