transfer
This commit is contained in:
parent
f9fa6412ef
commit
6748309fbd
@ -114,7 +114,7 @@ const SaveButton = styled.div`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const ExchangesWrapper = styled.div`
|
const ExchangesWrapper = styled.div`
|
||||||
flex:5;
|
flex: 4;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
::-webkit-scrollbar-track {
|
::-webkit-scrollbar-track {
|
||||||
@ -128,6 +128,7 @@ const ExchangesWrapper = styled.div`
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background-color: #4b4b4b;
|
background-color: #4b4b4b;
|
||||||
}
|
}
|
||||||
|
border-top: 1px solid;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const ExchangesRow = styled.div`
|
const ExchangesRow = styled.div`
|
||||||
@ -145,14 +146,12 @@ const Icon = styled.img`
|
|||||||
const Exchange = styled.div`
|
const Exchange = styled.div`
|
||||||
background-color: #b5d2e0;
|
background-color: #b5d2e0;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
width:200px;
|
width: 300px;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
height:50px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
`
|
`;
|
||||||
|
|
||||||
const deleteExchange = async (id: number) => {
|
const deleteExchange = async (id: number) => {
|
||||||
try {
|
try {
|
||||||
@ -276,9 +275,19 @@ export const Transfer = ({ handleClose, isTransferOpen }: TransferProps) => {
|
|||||||
>
|
>
|
||||||
{assignmentsClasses.map((el) => {
|
{assignmentsClasses.map((el) => {
|
||||||
return (
|
return (
|
||||||
<MenuItem key={el.id} value={el} >
|
<MenuItem
|
||||||
|
key={el.id}
|
||||||
|
value={el}
|
||||||
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
textAlign: 'center',
|
||||||
|
}}
|
||||||
|
>
|
||||||
{`${el.name} `}
|
{`${el.name} `}
|
||||||
<br></br>{`(${dayMapping[el.day]} ${el.time} ${el.endTime})`}
|
<br></br>
|
||||||
|
{`(${dayMapping[el.day]} ${el.time} - ${el.endTime})`}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
@ -299,6 +308,7 @@ export const Transfer = ({ handleClose, isTransferOpen }: TransferProps) => {
|
|||||||
<TransferReceiveStyled>
|
<TransferReceiveStyled>
|
||||||
<TransferTextStyled>Przyjmę</TransferTextStyled>
|
<TransferTextStyled>Przyjmę</TransferTextStyled>
|
||||||
<TransferInputStyled>
|
<TransferInputStyled>
|
||||||
|
<FormControl disabled>
|
||||||
<Select
|
<Select
|
||||||
labelId="demo-simple-select-label"
|
labelId="demo-simple-select-label"
|
||||||
id="assignments-groups"
|
id="assignments-groups"
|
||||||
@ -309,12 +319,24 @@ export const Transfer = ({ handleClose, isTransferOpen }: TransferProps) => {
|
|||||||
>
|
>
|
||||||
{groups.map((el: any, index: number) => {
|
{groups.map((el: any, index: number) => {
|
||||||
return (
|
return (
|
||||||
<MenuItem key={index} value={el}>
|
<MenuItem
|
||||||
{`${selectedAssignmentsClasses.name} ${el.time} ${el.endTime} ${dayMapping[el.day]}`}
|
key={index}
|
||||||
|
value={el}
|
||||||
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
textAlign: 'center',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{`${selectedAssignmentsClasses.name} `}
|
||||||
|
<br></br>
|
||||||
|
{`(${dayMapping[el.day]} ${el.time} - ${el.endTime})`}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</Select>
|
</Select>
|
||||||
|
</FormControl>
|
||||||
</TransferInputStyled>
|
</TransferInputStyled>
|
||||||
</TransferReceiveStyled>
|
</TransferReceiveStyled>
|
||||||
</InputWrapper>
|
</InputWrapper>
|
||||||
@ -324,8 +346,13 @@ export const Transfer = ({ handleClose, isTransferOpen }: TransferProps) => {
|
|||||||
exchanges.map((name: any) => (
|
exchanges.map((name: any) => (
|
||||||
<ExchangesRow>
|
<ExchangesRow>
|
||||||
<Exchange>
|
<Exchange>
|
||||||
{name.desiredGroup.id} </Exchange> <Icon alt="transfer" src={TransferIcon} /><Exchange>{name.ownedAssignment.id}
|
{name.desiredGroup.lecturer} <br></br> {dayMapping[name.desiredGroup.day]} <br></br>{' '}
|
||||||
</Exchange>
|
{name.desiredGroup.time} - {name.desiredGroup.endTime}
|
||||||
|
</Exchange>{' '}
|
||||||
|
<Icon alt="transfer" src={TransferIcon} />
|
||||||
|
<Exchange>
|
||||||
|
{name.ownedAssignment.lecturer} <br></br> {dayMapping[name.ownedAssignment.day]} <br></br>{' '}
|
||||||
|
{name.ownedAssignment.time} - {name.ownedAssignment.endTime}</Exchange>
|
||||||
</ExchangesRow>
|
</ExchangesRow>
|
||||||
))
|
))
|
||||||
) : (
|
) : (
|
||||||
|
Loading…
Reference in New Issue
Block a user