Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge payments into prod #207

Merged
merged 90 commits into from
Dec 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
201ffd0
Merge pull request #158 from Lapkipomoshi/dev
bevuxyna Aug 15, 2023
ec4a1e7
Revert "fix"
bevuxyna Mar 20, 2023
96478b2
Create pr_opened.yml
jingleMyBells Apr 25, 2023
531d9c8
Update pr_opened.yml
jingleMyBells Apr 25, 2023
5219ee8
Create pr_closed.yml
jingleMyBells Apr 25, 2023
5436935
Rename pr_closed.yml to pr_closed_test.yml
jingleMyBells Apr 25, 2023
3b73f6d
Create pr_closed.yml
jingleMyBells Apr 25, 2023
d848a6c
Update pr_closed_test.yml
jingleMyBells Apr 25, 2023
dfd7d38
Update pr_closed.yml
jingleMyBells Apr 25, 2023
128abac
Update pr_closed_test.yml
jingleMyBells Apr 26, 2023
e68e338
Update pr_closed_test.yml
jingleMyBells May 2, 2023
cc4c9b0
Update pr_closed.yml
jingleMyBells Jul 12, 2023
4b37e4f
Update pr_closed_test.yml
jingleMyBells Jul 12, 2023
00db52c
deleted .github
Bogdan-Torkhov Aug 15, 2023
4292374
added .github
Bogdan-Torkhov Aug 15, 2023
a7710a3
fix: test
Aug 15, 2023
4c47425
Dev (#162)
ponomareva-frontend Aug 15, 2023
e8454ef
fix: github fix test stand (#164)
ponomareva-frontend Aug 21, 2023
c4fa346
fix: revert prev commit (#165)
ponomareva-frontend Aug 21, 2023
08f8168
fix: removed homepage
jingleMyBells Aug 24, 2023
774eb20
Merge pull request #167 from Lapkipomoshi/remove_homepage
jingleMyBells Aug 24, 2023
8331509
Merge remote-tracking branch 'origin/dev' into test
bevuxyna Aug 29, 2023
58710bf
Merge pull request #175 from Lapkipomoshi/dev
bevuxyna Aug 29, 2023
fb3c46a
Merge pull request #180 from Lapkipomoshi/dev
bevuxyna Aug 30, 2023
844ec37
feat: add a tooltip after taking home and add request
Sep 4, 2023
c0e72d4
fix: make a universal tooltip, move request
Sep 4, 2023
fcc576c
fix: Take out the handler
Sep 4, 2023
bf46b11
fix: change button classname
Sep 5, 2023
1e59f5e
Merge pull request #185 from Lapkipomoshi/dev_klaurrr
Klaurrr Sep 6, 2023
4a71056
fix news title
bevuxyna Sep 6, 2023
dcf7526
fix hidden button
bevuxyna Sep 6, 2023
2642c9f
fix link to back
bevuxyna Sep 6, 2023
b2f4159
fix titles on main page
bevuxyna Sep 6, 2023
9996de0
fix
bevuxyna Sep 6, 2023
2cda22a
fix path
bevuxyna Sep 6, 2023
a26f988
fix normalize
bevuxyna Sep 6, 2023
fab303d
fix Tooltip
bevuxyna Sep 6, 2023
a16bb97
feat: add pet content
Sep 7, 2023
1b002cc
Merge pull request #186 from Lapkipomoshi/bugfix/test
Klaurrr Sep 7, 2023
eec0211
fix: change classname
Klaurrr Sep 7, 2023
b40e5ba
fix: change classname
Klaurrr Sep 7, 2023
21bcabc
fix: delete empty strings, change name of ui elements
Sep 8, 2023
fbb7a06
Merge branch 'dev_klaurrr' of https://github.com/Lapkipomoshi/help_pa…
Sep 8, 2023
b2dd5fa
Merge branch 'dev' into dev_klaurrr
Klaurrr Sep 19, 2023
fe1aede
Merge pull request #188 from Lapkipomoshi/dev_klaurrr
Klaurrr Sep 19, 2023
e1d0d52
fix: поправил отображение картинки (костыль), список питомцев готов
n1k-deco Sep 28, 2023
99783c7
Merge pull request #190 from Lapkipomoshi/dev_n1k
Klaurrr Sep 29, 2023
36f52c5
feat: добавлены кнопки редактирования \ удаления
n1k-deco Oct 1, 2023
e84837e
fix: исправил отображение 'График работы'
n1k-deco Oct 1, 2023
d1290af
fix: количество открытых вакансий (цвет цифры), изменен mail с info@l…
n1k-deco Oct 2, 2023
efa045e
feat: добавлено модальное окно. fix: исправлен PrivacyCheckbox, измен…
n1k-deco Oct 4, 2023
436f045
fix: исправил загрузку новостей. Теперь загружается по приютам
n1k-deco Oct 4, 2023
6b3bff7
fix: добавить функционал открытия модального окна
Oct 4, 2023
38d6a8d
Merge pull request #191 from Lapkipomoshi/dev_n1k
Klaurrr Oct 6, 2023
5744abd
feat: Исправил форму добавления вакансий. Теперь данные для секлектов…
n1k-deco Oct 25, 2023
8290359
feat: реализовано добавление вакансий через сайт
n1k-deco Oct 31, 2023
248688b
refactor: Добавление вакансий с сайта для владельца
n1k-deco Nov 1, 2023
5f4171e
Merge pull request #192 from Lapkipomoshi/dev_n1k
nickoff Nov 1, 2023
f31ff2d
Merge pull request #195 from Lapkipomoshi/dev
n1k-deco Nov 1, 2023
4c0d1d8
feat: Добавлено удаление вакансии с сайта
n1k-deco Nov 10, 2023
b40a907
fix: частично поправил странику модуль ShelterOwnerProfile и ProfileS…
Nov 11, 2023
f0be697
Тест для Коли
n1k-deco Nov 14, 2023
4a33e09
feat: добавил ссылку-кнопку на переход в личный кабинет
Nov 14, 2023
dfa6e65
fix: поправил название ивента в PrivasyCheckbox
Nov 14, 2023
bd8ff3d
Merge pull request #196 from Lapkipomoshi/fix/registerPage
n1k-deco Nov 14, 2023
90103be
Merge branch 'dev' into test
Nov 15, 2023
2b92363
тест вакансий
n1k-deco Nov 15, 2023
3ccd203
Fix: фикс баг-репортов, части
n1k-deco Nov 15, 2023
903cf50
Merge pull request #197 from Lapkipomoshi/dev_n1k_fixBags
nickoff Nov 16, 2023
b5296ec
Merge pull request #198 from Lapkipomoshi/dev
n1k-deco Nov 16, 2023
fa28a28
chore: merge from dev
Nov 16, 2023
4eaf6d8
fix: правка баг-репортов
n1k-deco Nov 16, 2023
cc240a4
Merge pull request #199 from Lapkipomoshi/dev_n1k_fixBags
nickoff Nov 16, 2023
cd42661
Merge pull request #200 from Lapkipomoshi/dev
nickoff Nov 16, 2023
f6953ce
feat: сверстал страницу в 6.2.1.2
Nov 16, 2023
6ecc6c6
Merge branch 'dev' into feat/shelter-owner-layout-6.2.1.2-6.2.1.8
Nov 17, 2023
4fdfad8
feat: добавил оболочку и настроил роуты на страницу редактирования пр…
Nov 17, 2023
10426f1
feat: добавлена кнопка материальной помощи и подключения платежей
n1k-deco Nov 17, 2023
626e62b
Merge pull request #201 from Lapkipomoshi/dev_n1k
n1k-deco Nov 17, 2023
210a51a
Merge pull request #202 from Lapkipomoshi/dev_n1k_fixBags
n1k-deco Nov 17, 2023
19721cb
Merge branch 'dev' into dev_n1k
n1k-deco Nov 22, 2023
260ce34
feat: реализовано удаления \ редактирование вакансий
n1k-deco Nov 22, 2023
1678b1b
Merge branch 'dev' into dev_n1k
n1k-deco Nov 22, 2023
d02bb54
Merge pull request #203 from Lapkipomoshi/dev_n1k
nickoff Nov 22, 2023
2618d71
feat: начало работы над страницей редактирования приюта
Nov 22, 2023
7fd26a9
fix: fix merge conflict
Nov 22, 2023
50b776a
Merge pull request #204 from Lapkipomoshi/feat/shelter-owner-layout-6…
n1k-deco Dec 2, 2023
53f8858
feat: подключение платежа и правки баг-репортов
n1k-deco Dec 4, 2023
8f3e8ed
Merge pull request #205 from Lapkipomoshi/dev_n1k
nickoff Dec 4, 2023
59e06b2
Merge pull request #206 from Lapkipomoshi/dev
nickoff Dec 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/DetailsCard/svg/PlusMinus.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.plus-minus {
width: 32px;
height: 32px;
width: 29px;
height: 29px;
}

.plus-minus line {
Expand Down
104 changes: 104 additions & 0 deletions src/components/Modal/Modal.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
import React, { useState } from 'react';
import './Modal.scss';
import DeclarationInput from '../../ui/DeclarationInput/DeclarationInput';
import { Button } from '../../ui';
import PrivacyCheckbox from '../PrivacyCheckbox/PrivacyCheckbox';
import EscapeIcon from '../../images/EscapeIcon/EscapeIcon';

const Modal = ({ descrText, onClose, handleTakePet }) => {
const createInputState = (initialValue = '', allowText = true) => {
const [inputState, setInputState] = useState({
value: initialValue,
onChange: (e) => {
let newValue = e.target.value;
if (!allowText) {
newValue = newValue.replace(/\D/g, '');
}

setInputState((prevState) => {
return {
...prevState,
value: newValue,
dirty: true,
// invalidText: newValue.length >= 2 ? '' : 'Введите хотя бы 2 символа',
};
});
},
onBlur: () => {
// Здесь можно добавить дополнительную логику, если нужно
},
dirty: false,
invalidText: '',
});

return inputState;
};

const [isModalOpen, setIsModalOpen] = useState(true);
const [isPrivacyChecked, setIsPrivacyChecked] = useState(false);

const nameInputState = createInputState();
const phoneInputState = createInputState('', false);
const emailInputState = createInputState();

const handleTakeHomeButtonClick = () => {
setIsModalOpen(false);
handleTakePet();
};

const isSubmitButtonEnabled = () => {
return nameInputState.value.trim() !== '' && phoneInputState.value.trim() !== '' && emailInputState.value.trim() !== '' && isPrivacyChecked;
};

return (
isModalOpen && (
<div className='modal-overlay'>
<div className='wrapper'>
{/* <EscapeIcon onClick={handleTakeHomeButtonClick} /> */}
<EscapeIcon
onClick={() => {
setIsModalOpen(false);
onClose(); // Добавьте вызов onClose, чтобы установить isApplicationSent в true при закрытии по иконке
}}
/>
<div className='modal'>
<div className='modal__title standard-font standard-font_type_h3'>Оставьте заявку и приют с вами свяжется</div>
<div className='modal__descr standard-font standard-font_type_small'>{descrText}</div>
<DeclarationInput caption='Имя' inputState={nameInputState} type='text' name='name' required showError={false} />
<DeclarationInput
caption='Номер телефона'
inputState={phoneInputState}
type='tel'
name='phone'
placeholder='+7 (999) 999-99-99'
required
showError={false}
/>
<DeclarationInput
caption='E-mail'
inputState={emailInputState}
type='email'
name='email'
placeholder='email@email.com'
required
showError={false}
/>
<PrivacyCheckbox
isChecked={isPrivacyChecked}
onChange={(isChecked) => {
setIsPrivacyChecked(isChecked);
}}
/>
</div>
<div className='btn'>
<Button className='btn__modal' theme='accent' type='button' onClick={handleTakeHomeButtonClick} disabled={!isSubmitButtonEnabled()}>
Отправить заявку
</Button>
</div>
</div>
</div>
)
);
};

export default Modal;
43 changes: 43 additions & 0 deletions src/components/Modal/Modal.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.32);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
}

.wrapper {
padding: 52px 32px;
width: 482px;
display: flex;
flex-direction: column;
gap: 32px;
background-color: white;
border-radius: 30px;
position: relative;
}

.modal {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 20px;

&__title {
color: var(--color-text-base);
}

&__descr {
color: var(--color-text-additional);
}
}

.btn__modal {
font-size: 16px;
padding: 12px 24px;
}
2 changes: 1 addition & 1 deletion src/components/NewBigCard/NewBigCard.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
@import url('./styles/__info-block/new-big-card__info-block.css');
@import url('./styles/__icon/new-big-card__icon.css');
@import url('./styles/__info/new-big-card__info.css');
@import url('./styles/__header/new-big-card__header.css');
@import url('./styles/__header/new-big-card__header.scss');
@import url('./styles/__text/new-big-card__text.css');
2 changes: 1 addition & 1 deletion src/components/NewBigCard/NewBigCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const NewBigCard = ({
<p className='new-big-card__info'>{shelter.name}</p>
</div>
</div>
<h3 className='new-big-card__header'>{header}</h3>
<h3 className='standard-font standard-font_type_h3 new-big-card__header'>{header}</h3>
<p className='new-big-card__text'>{description}</p>
</div>
</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
background-image: linear-gradient(rgba(43,43,43,0), #2b2b2b); /* 43 = 2b */
color: #fff;
flex-direction: column;
justify-content: end;
/* justify-content: end; */
justify-content: flex-end;
box-sizing: border-box;
z-index: 2;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@
width: 92%;
margin: 0 0 12px;
padding: 0;
font-size: 24px;
line-height: 29px;
font-weight: 500;
}
1 change: 1 addition & 0 deletions src/components/NewCard/styles/__info/new-card__info.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
font-size: 16px;
line-height: 19px;
font-weight: 300;
color: var(--color-text-additional)
}
4 changes: 2 additions & 2 deletions src/components/PetCard/PetCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import maleIcon from '../../images/icons/ic_male.svg';
import femaleIcon from '../../images/icons/ic_female.svg';

const PetCard = ({
id, shelterId, name, age, sex, photo,
id, shelterId, name, age, sex, gallery,
}) => {
return (
<Link
className='pet-card'
to={`/shelters/${shelterId}/pets/${id}`}
>
<img className='pet-card__photo' src={photo} alt={name} />
<img className='pet-card__photo' src={gallery[0].image} alt={name} />
<div className='pet-card__cover' />
<img className='pet-card__icon' src={sex === 'male' ? maleIcon : femaleIcon} alt={sex === 'male' ? 'самец' : 'самка'} />
<p className='pet-card__name'>{name}</p>
Expand Down
13 changes: 11 additions & 2 deletions src/components/PrivacyCheckbox/PrivacyCheckbox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,20 @@ import { Link } from 'react-router-dom';

import './PrivacyCheckbox.scss';

const PrivacyCheckbox = ({ onClick }) => {
const PrivacyCheckbox = ({ isChecked, onChange }) => {
const handleCheckboxChange = () => {
onChange(!isChecked);
};

return (
<div className='privacy-checkbox'>
<label className='privacy-checkbox__container'>
<input className='privacy-checkbox__input' type='checkbox' onClick={onClick} />
<input
className='privacy-checkbox__input'
type='checkbox'
checked={isChecked}
onChange={handleCheckboxChange}
/>
<span className='privacy-checkbox__checkbox' />
</label>

Expand Down
52 changes: 26 additions & 26 deletions src/components/ProfileSheltersBlock/ProfileSheltersBlock.jsx
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
import React from 'react';
import { useNavigate } from 'react-router-dom';
import './ProfileSheltersBlock.scss';
import ShelterCard from '../ShelterCard/ShelterCard';
import Button from '../../ui/Button/Button';
import CardsSlider from '../CardsSlider/CardsSlider';

const ProfileSheltersBlock = ({ shelters, sheltersTitle, owner }) => {
const ProfileSheltersBlock = ({ myShelters, sheltersTitle }) => {
const navigate = useNavigate();

return (
<div className='profile-shelters'>
{shelters && shelters.length !== 0 &&
{myShelters && myShelters.length !== 0 &&
<div className='profile-shelters__container'>
<h3 className='profile-shelters__title standard-font standard-font_type_h3'>{sheltersTitle}</h3>

<div className='profile-shelters__shelters'>
<CardsSlider modifier='profile'>
<ul className='profile-shelters__shelters-container'>
{shelters.map((shelter) => {
return (
<li key={shelter.id}>
<ShelterCard
id={shelter.id}
name={shelter.name}
address={shelter.address}
workingFromHour={shelter.working_from_hour}
workingToHour={shelter.working_to_hour}
workingHours={shelter.working_hours}
logo={shelter.logo}
profileImage={shelter.profile_image}
/>
</li>
);
})}
</ul>
</CardsSlider>

{owner && <Button link to='/'>Перейти в приют</Button>}
<ul className='profile-shelters__shelters-container'>
{myShelters.map((shelter) => {
return (
<li key={shelter.id}>
<ShelterCard
id={shelter.id}
name={shelter.name}
address={shelter.address}
workingFromHour={shelter.working_from_hour}
workingToHour={shelter.working_to_hour}
workingHours={shelter.working_hours}
logo={shelter.logo}
profileImage={shelter.profile_image}
/>
</li>
);
})}
</ul>
{myShelters && <Button onClick={
() => {return navigate('my-shelter');}
}>Перейти в приют</Button>}
</div>
</div>
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.profile-shelters__shelters {
display: flex;
flex-direction: column;
align-items: center;
}

.profile-shelters__container {
Expand Down
Loading
Loading