-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #325 from Studio-Yandex-Practicum/enhancement_310_…
…fix_routing_to_form_return_page enhancement_310_fix_routing_to_form_return_page
- Loading branch information
Showing
12 changed files
with
351 additions
and
173 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
@use '../../shared/styles/utils/mixins' as media; | ||
|
||
.formReturn { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 30px; | ||
width: 100%; | ||
padding: 0 0 56px; | ||
|
||
&__titleBox { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 10px; | ||
} | ||
|
||
&__title { | ||
width: 100%; | ||
} | ||
|
||
&__mainBox { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: flex-start; | ||
gap: 20px; | ||
|
||
@include media.respond-to('middle') { | ||
flex-direction: column; | ||
gap: 10px; | ||
} | ||
} | ||
|
||
&__burger { | ||
position: sticky; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
top: 20px; | ||
width: 342px; | ||
height: 255px; | ||
border-radius: 10px; | ||
border: 2px solid red; | ||
|
||
@include media.respond-to('middle') { | ||
width: 240px; | ||
height: 48px; | ||
} | ||
} | ||
} | ||
|
||
|
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,33 @@ | ||
import WrapperForMainContent from '@/components/WrapperForMainContent/WrapperForMainContent' | ||
import Breadcrumbs from '@/shared/ui/Breadcrumbs/Breadcrumbs' | ||
import Heading, { HeadingType } from '@/shared/ui/Heading/Heading' | ||
import FormReturn from '@/widgets/FormReturn' | ||
|
||
import styles from './FormReturnPage.module.scss' | ||
|
||
const links = [ | ||
{ heading: 'Главная', href: '/' }, | ||
{ heading: 'Личный Кабинет', href: '/login' }, | ||
{ heading: 'Возврат товара', href: '' } | ||
] | ||
|
||
const FormReturnPage = () => { | ||
return ( | ||
<WrapperForMainContent> | ||
<section className={styles.formReturn}> | ||
<div className={styles.formReturn__titleBox}> | ||
<Heading type={HeadingType.MAIN} className={styles.formReturn__title}> | ||
Возврат товара | ||
</Heading> | ||
<Breadcrumbs links={links} /> | ||
</div> | ||
<div className={styles.formReturn__mainBox}> | ||
<div className={styles.formReturn__burger}>Burger menu</div> | ||
<FormReturn /> | ||
</div> | ||
</section> | ||
</WrapperForMainContent> | ||
) | ||
} | ||
|
||
export default FormReturnPage |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,30 @@ | ||
import * as Yup from 'yup' | ||
|
||
export const validationSchema = Yup.object().shape({ | ||
email: Yup.string() | ||
.required('Введите электронную почту') | ||
.email('Укажите корректный адрес электронной почты'), | ||
password: Yup.string() | ||
.required('Введите пароль') | ||
.min(6, 'Минимальная длина пароля 6 символов') // поменял для тестового юзера | ||
.max(64, 'Максимальная длина пароля 64 символа'), | ||
name: Yup.string() | ||
.required('Введите имя') | ||
.min(6, 'Минимальная длина имени 6 символов') | ||
.min(2, 'Минимальная длина имени 6 символов') | ||
.max(64, 'Максимальная длина имени 64 символа'), | ||
surname: Yup.string() | ||
.required('Введите фамилию') | ||
.min(1, 'Минимальная длина фамилии 1 символ') | ||
.max(64, 'Максимальная длина фамилии 64 символа'), | ||
email: Yup.string() | ||
.required('Введите электронную почту') | ||
.email('Укажите корректный адрес электронной почты'), | ||
tel: Yup.string() | ||
.required('Введите номер телефона') | ||
.matches(/^\+7\d{10}$/, 'Номер телефона должен быть в формате +7XXXXXXXXXX (X - цифра)'), | ||
numberOrder: Yup.string().required('Введите номер заказа'), | ||
dateOrder: Yup.string().required('Введите дату заказа'), | ||
itemInfo: Yup.string().required('Введите наименование товара'), | ||
model: Yup.string().required('Введите название модели') | ||
orderNumber: Yup.string().required('Введите номер заказа'), | ||
orderDate: Yup.string().required('Введите дату заказа'), | ||
itemName: Yup.string().required('Введите наименование товара'), | ||
model: Yup.string().required('Введите название модели'), | ||
quantity: Yup.number() | ||
.required('Введите количество') | ||
.min(1, 'Количество должно быть не менее 1') | ||
.typeError('Количество указывается только цифрами'), | ||
reasons: Yup.string().required('Выберите причину возврата'), | ||
textArea: Yup.string() | ||
.min(10, 'Длина текста должна быть от 10 символов') | ||
.max(300, 'Длина текста должна быть до 300 символов') | ||
}) |
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.