-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add possibility for a student to close a cooperation * add functionality to close cooperation * add colors to palette * add some tests * add test for CooperationContainer * one more test for CooperationContainer * add one more test for CooperationCompletion * removed onResponseError import * add test for CooperationContainer * implemented comments suggestions * fixed test * add test for handleCooperationStatusUpdate func * delete unused test * added useCallback and fixed translation * changed || to ?? * fixed comments * fixed tests
- Loading branch information
Showing
21 changed files
with
404 additions
and
31 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{ | ||
"confirmTitle": "Please Confirm", | ||
"discardOffer": "Discard offer changes?", | ||
"discardChanges": "Discard recent changes?" | ||
"discardChanges": "Discard recent changes?", | ||
"confirmCooperationClosing": "Confirmation of cooperation closing", | ||
"acceptCooperationClosing": "Cooperation closing process" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{ | ||
"confirmTitle": "Підтвердіть вихід", | ||
"discardOffer": "Відхилити зміни пропозиції?", | ||
"discardChanges": "Зберегти останні зміни?" | ||
"discardChanges": "Зберегти останні зміни?", | ||
"confirmCooperationClosing": "Підтвердження припинення cпівпраці", | ||
"acceptCooperationClosing": "Процес припинення співпраці" | ||
} |
27 changes: 27 additions & 0 deletions
27
src/containers/my-cooperations/accept-cooperation-close/AcceptCooperationClosing.styles.ts
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,27 @@ | ||
import palette from '~/styles/app-theme/app.pallete' | ||
|
||
export const styles = { | ||
root: { | ||
display: 'flex', | ||
alignItems: 'center', | ||
border: `1px solid ${palette.basic.pinkishRed}`, | ||
backgroundColor: palette.basic.softGray, | ||
borderRadius: '5px', | ||
padding: '24px', | ||
justifyContent: 'space-between', | ||
gap: '16px' | ||
}, | ||
span: { | ||
fontWeight: '500' | ||
}, | ||
title: { | ||
color: palette.basic.mediumRed, | ||
fontWeight: '500', | ||
display: 'flex', | ||
gap: '8px', | ||
mb: '4px' | ||
}, | ||
body: { | ||
color: palette.basic.darkGray | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
src/containers/my-cooperations/accept-cooperation-close/AcceptCooperationClosing.tsx
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,43 @@ | ||
import { Box, styled, Typography } from '@mui/material' | ||
import { FC } from 'react' | ||
import { styles } from './AcceptCooperationClosing.styles' | ||
import { ErrorOutlineRounded } from '@mui/icons-material' | ||
import Button from '~/design-system/components/button/Button' | ||
import { useTranslation } from 'react-i18next' | ||
|
||
interface AcceptCooperationClosureProps { | ||
user: string | ||
onAccept: () => void | ||
} | ||
|
||
const BoldText = styled('span')({ | ||
fontWeight: 500 | ||
}) | ||
|
||
const AcceptCooperationClosing: FC<AcceptCooperationClosureProps> = ({ | ||
user, | ||
onAccept | ||
}) => { | ||
const { t } = useTranslation() | ||
return ( | ||
<Box sx={styles.root}> | ||
<Box> | ||
<Box sx={styles.title}> | ||
<ErrorOutlineRounded /> | ||
<Typography>{t('titles.acceptCooperationClosing')}</Typography> | ||
</Box> | ||
<Typography sx={styles.body}> | ||
<BoldText>{user}</BoldText> | ||
{t('cooperationDetailsPage.closingMessage1')} | ||
<BoldText>{t('cooperationDetailsPage.accessDuration')}</BoldText> | ||
{t('cooperationDetailsPage.closingMessage2')} | ||
</Typography> | ||
</Box> | ||
<Button color='tonal-error' onClick={onAccept} size='xs'> | ||
{t('cooperationDetailsPage.acceptBtn')} | ||
</Button> | ||
</Box> | ||
) | ||
} | ||
|
||
export default AcceptCooperationClosing |
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
Oops, something went wrong.