diff --git a/src/containers/my-cooperations/cooperation-completion/CooperationCompletion.tsx b/src/containers/my-cooperations/cooperation-completion/CooperationCompletion.tsx index ae4db67ad..24648218e 100644 --- a/src/containers/my-cooperations/cooperation-completion/CooperationCompletion.tsx +++ b/src/containers/my-cooperations/cooperation-completion/CooperationCompletion.tsx @@ -1,4 +1,3 @@ -import { useState } from 'react' import { useTranslation } from 'react-i18next' import Box from '@mui/material/Box' import Typography from '@mui/material/Typography' @@ -6,24 +5,13 @@ import Divider from '@mui/material/Divider' import SettingItem from '~/components/setting-item/SettingItem' import AppButton from '~/components/app-button/AppButton' -import AppSelect from '~/components/app-select/AppSelect' -import { cooperationAccessValues } from '~/containers/my-cooperations/cooperation-completion/CooperationCompletion.constants' import { styles } from '~/containers/my-cooperations/cooperation-completion/CooperationCompletion.styles' -import { - ButtonVariantEnum, - SizeEnum, - CooperationMaterialsAccessEnum -} from '~/types' +import { ButtonVariantEnum, SizeEnum } from '~/types' const CooperationCompletion = () => { const { t } = useTranslation() - const [materialsAccess, setMaterialsAccess] = - useState( - CooperationMaterialsAccessEnum.OneMonthAccess - ) - return ( @@ -44,17 +32,6 @@ const CooperationCompletion = () => { {t('cooperationsPage.cooperationDetails.closeCooperationBtn')} - - - ) } diff --git a/src/containers/my-cooperations/cooperation-completion/StudyMaterials.tsx b/src/containers/my-cooperations/cooperation-completion/StudyMaterials.tsx new file mode 100644 index 000000000..147fdce23 --- /dev/null +++ b/src/containers/my-cooperations/cooperation-completion/StudyMaterials.tsx @@ -0,0 +1,34 @@ +import { useState } from 'react' + +import SettingItem from '~/components/setting-item/SettingItem' +import AppSelect from '~/components/app-select/AppSelect' +import { useTranslation } from 'react-i18next' +import { styles } from '~/containers/my-cooperations/cooperation-completion/CooperationCompletion.styles' + +import { cooperationAccessValues } from '~/containers/my-cooperations/cooperation-completion/CooperationCompletion.constants' +import { CooperationMaterialsAccessEnum } from '~/types' + +const StudyMaterials = () => { + const { t } = useTranslation() + + const [materialsAccess, setMaterialsAccess] = + useState( + CooperationMaterialsAccessEnum.OneMonthAccess + ) + + return ( + + + + ) +} + +export default StudyMaterials diff --git a/src/containers/offer-details/offer-general-info/OfferGeneralInfo.tsx b/src/containers/offer-details/offer-general-info/OfferGeneralInfo.tsx index ddf43c438..69ff50c7c 100644 --- a/src/containers/offer-details/offer-general-info/OfferGeneralInfo.tsx +++ b/src/containers/offer-details/offer-general-info/OfferGeneralInfo.tsx @@ -11,6 +11,7 @@ import DoneIcon from '@mui/icons-material/Done' import TitleWithDescription from '~/components/title-with-description/TitleWithDescription' import IconTitleDescription from '~/components/icon-title-description/IconTitleDescription' import AppCard from '~/components/app-card/AppCard' +import StudyMaterials from '~/containers/my-cooperations/cooperation-completion/StudyMaterials' import { styles } from '~/containers/offer-details/offer-general-info/OfferGeneralInfo.styles' import { Offer, SizeEnum } from '~/types' @@ -74,7 +75,10 @@ const OfferGeneralInfo: FC = ({ offer }) => { {t('offerDetailsPage.generalInfo.title')} - {generalInfoCards} + + {generalInfoCards} + + ) } diff --git a/src/containers/offer-page/teaching-block/TeachingBlock.tsx b/src/containers/offer-page/teaching-block/TeachingBlock.tsx index 976dc491f..f05258fa3 100644 --- a/src/containers/offer-page/teaching-block/TeachingBlock.tsx +++ b/src/containers/offer-page/teaching-block/TeachingBlock.tsx @@ -10,11 +10,13 @@ import AppTextField from '~/components/app-text-field/AppTextField' import AppChipList from '~/components/app-chips-list/AppChipList' import AppTextArea from '~/components/app-text-area/AppTextArea' import OrderedListItem from '~/components/ordered-list-item/OrderedListItem' +import StudyMaterials from '~/containers/my-cooperations/cooperation-completion/StudyMaterials' import { CreateOfferBlockProps, LanguagesEnum, - CreateOrUpdateOfferData + CreateOrUpdateOfferData, + UserRoleEnum } from '~/types' import { styles } from '~/containers/offer-page/OfferPage.styles' @@ -51,6 +53,8 @@ const TeachingBlock = ({ } } + const studyMaterials = userRole === UserRoleEnum.Student && + return ( ({ required value={data.price} /> + {studyMaterials}