-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
145 additions
and
38 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
client/src/components/apartment/customViews/ApartmentOne.jsx
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
client/src/components/building/customViews/BuildingRosenstrasse.jsx
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
client/src/components/building/customViews/rosenstrasse/ApartmentOne.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Box } from '@material-ui/core' | ||
import React from 'react' | ||
import LockCell from '../../../dashboard/LockCell' | ||
|
||
const ApartmentOne = (props) => { | ||
/* */ | ||
return ( | ||
<Box bgcolor="red" display="flex" margin={2}> | ||
<Box id="links" display="flex" flexDirection="column"> | ||
<LockCell/> | ||
<LockCell/> | ||
</Box> | ||
<Box id="eingang" bgcolor="blue" padding={2} flexDirection="column"> | ||
Eingang | ||
</Box> | ||
<Box id="rechts" display="flex" justifyContent="stretch" flexDirection="column"> | ||
<LockCell/> | ||
<LockCell/> | ||
<LockCell/> | ||
<LockCell/> | ||
</Box> | ||
</Box> | ||
) | ||
} | ||
|
||
export default ApartmentOne |
4 changes: 2 additions & 2 deletions
4
.../apartment/customViews/ApartmentThree.jsx → ...stomViews/rosenstrasse/ApartmentThree.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import React from 'react' | ||
|
||
const ApartmentOne = (props) => { | ||
const ApartmentThree = (props) => { | ||
return ( | ||
<div> | ||
|
||
</div> | ||
) | ||
} | ||
|
||
export default ApartmentOne | ||
export default ApartmentThree |
File renamed without changes.
40 changes: 40 additions & 0 deletions
40
client/src/components/building/customViews/rosenstrasse/BuildingRosenstrasse.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { useState, useEffect } from 'react' | ||
import { Box, Typography } from '@material-ui/core' | ||
import React from 'react' | ||
import ApartmentOne from './ApartmentOne' | ||
|
||
|
||
|
||
const BuildingRosenstrasse = (props) => { | ||
const [modalOpen, setOpen]=useState(false); | ||
const [building, setBuilding]=useState({}); | ||
/* get data for building rosenstrasse */ | ||
useEffect(() => { | ||
fetch(`https://localhost:5000/api/building/1`) | ||
.then(data=>data.json()) | ||
.then(json=>setBuilding(json)) | ||
.catch(error=>console.log(error)) | ||
|
||
}, []) | ||
|
||
console.log(building) | ||
return ( | ||
<Box display="inline-block"> | ||
<Typography> | ||
Gebäude Rosenstraße | ||
</Typography> | ||
<Box position="relative" /* bgcolor="blue" */ display="flex" flexDirection="column"> | ||
<Box paddingY={4} paddingX={2} marginX="auto" marginY={0} bgcolor="red" display="inline-block"> | ||
Haupteingang | ||
</Box> | ||
<Box display="flex" justifyContent="space-between" paddingTop={4} bgcolor="orange"> {/* Apartments */} | ||
<ApartmentOne /> | ||
<ApartmentOne /> | ||
<ApartmentOne /> | ||
</Box> | ||
</Box> | ||
</Box> | ||
) | ||
} | ||
|
||
export default BuildingRosenstrasse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from 'react' | ||
import Box from '@material-ui/core/Box' | ||
import { styled } from '@material-ui/core'; | ||
|
||
const Cell=styled(Box)({ | ||
transition: "0.2s", | ||
cursor: "pointer", | ||
'&:hover': { | ||
transform: "scale(1.08)" | ||
} | ||
}) | ||
|
||
const LockCell = ({ | ||
lock={}, | ||
style={}, | ||
colors={ | ||
open: "green", | ||
closed: "red", | ||
taken: "orange", | ||
free: "grey" | ||
}, | ||
onClick, | ||
...props} | ||
) => { | ||
const lockNumber=props.lockNumber || 0; | ||
return ( | ||
<Cell | ||
padding={2} | ||
border="1px solid black" | ||
bgcolor={lock.open? colors.open : colors.closed} | ||
flex={1} | ||
style={style} | ||
onClick={onClick} | ||
> | ||
{lockNumber} | ||
</Cell> | ||
) | ||
} | ||
|
||
export default LockCell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters