Skip to content

Commit

Permalink
Añadida una etiqueta al mostrar los places que indica el nivel de pri…
Browse files Browse the repository at this point in the history
…vacidad.
  • Loading branch information
uo283840 committed Apr 13, 2023
1 parent ae971ea commit 4b762a1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion webapp/src/components/PlaceCard/PlaceCard.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import React from 'react';
import {Card, CardContent, CardHeader, IconButton, Menu, MenuItem, Typography} from "@mui/material";
import {Card, CardContent, CardHeader, IconButton, Menu, MenuItem, Typography, Chip} from "@mui/material";
import DeleteRoundedIcon from '@mui/icons-material/DeleteRounded';
import TravelExploreRoundedIcon from '@mui/icons-material/TravelExploreRounded';
import DeletePlaceConfirmDialog from "../DeletePlaceConfirmDialog/DeletePlaceConfirmDialog";
import {deletePlaceMarkByID} from "../../api/api";
import { removePlace } from '../../solidapi/solidAdapter';
import Diversity3Icon from '@mui/icons-material/Diversity3';
import PermIdentityIcon from '@mui/icons-material/PermIdentity';

const PlaceCard = (props) => {
const {place, setSelectedPlaceMyPlaces, deletePlace, session, showDeleteButton } = props;
Expand Down Expand Up @@ -34,10 +36,12 @@ const PlaceCard = (props) => {
return (
<div>
<Card style={{margin: '25px', marginTop:'0px'}}>

<CardHeader
component='div' style={{paddingBottom: '10px'}}
action={
<>
<Chip icon = {place.privacy === "Public" ? <Diversity3Icon/> : <PermIdentityIcon/>} label={place.privacy} />
<IconButton aria-label="view" onClick={()=>setSelectedPlaceMyPlaces({lat: place.latitude, lng: place.longitude})}>
<TravelExploreRoundedIcon style={{color: '#6986e8'}}/>
</IconButton>
Expand All @@ -48,13 +52,17 @@ const PlaceCard = (props) => {
) : null}
</>
}

title={<Typography variant="h5" style={{fontWeight: "bold"}}>{place.name}</Typography>}

subheader={<Typography variant="h6" color="textSecondary">{place.category}</Typography>}

/>
<CardContent component="div" style={{paddingTop: '0px'}} >
<Typography variant="body2" component="p">
{place.description}
</Typography>

</CardContent>
</Card>
<DeletePlaceConfirmDialog open={open} handleClose={handleClose} handleDeletePlace={handleDeletePlace}/>
Expand Down

0 comments on commit 4b762a1

Please sign in to comment.