diff --git a/src/modules/ShelterOwnerStatistics/ShelterOwnerStatistics.jsx b/src/modules/ShelterOwnerStatistics/ShelterOwnerStatistics.jsx
index 24ee2d49..34627e59 100644
--- a/src/modules/ShelterOwnerStatistics/ShelterOwnerStatistics.jsx
+++ b/src/modules/ShelterOwnerStatistics/ShelterOwnerStatistics.jsx
@@ -9,7 +9,7 @@ const ShelterOwnerStatistics = ({ shelter }) => {
{ title: 'Количество питомцев: ',
valueKey: shelter.count_pets,
actionText: 'Посмотреть всех питомцев',
- path: `/profile/my-shelter/${shelter.id}/all-pets` },
+ path: `/my-shelter/${shelter.id}/all-pets` },
{ title: 'Количество вакансий: ', valueKey: shelter.count_vacancies, actionText: 'Посмотреть все вакансии', path: `/shelters/${shelter.id}/vacancies` },
{ title: 'Количество тегов: ', valueKey: shelter.count_pets, actionText: 'Посмотреть все теги', path: '/' },
{ title: 'Количество новостей: ', valueKey: shelter.count_news, actionText: 'Посмотреть новости приюта', path: `/shelters/${shelter.id}/news` },
diff --git a/src/modules/ShelterPetsType/ShelterPetsType.jsx b/src/modules/ShelterPetsType/ShelterPetsType.jsx
index 56380675..60f939ba 100644
--- a/src/modules/ShelterPetsType/ShelterPetsType.jsx
+++ b/src/modules/ShelterPetsType/ShelterPetsType.jsx
@@ -11,7 +11,7 @@ const ShelterPetsType = ({ type }) => {
const [pets, setPets] = useState([]);
const [isChecked, setIsChecked] = useState(false);
const [isSelected, setIsSelected] = useState(false);
- const [checkedId, setCheckedId] = useState([]);
+ const [checkedPets, setCheckedPets] = useState([]);
useEffect(() => {
shelterPetsApi
@@ -46,41 +46,53 @@ const ShelterPetsType = ({ type }) => {
};
const handleButtonCancelSelectedClick = () => {
setIsSelected(false);
- setCheckedId([]);
+ setCheckedPets([]);
};
const handleButtonSelectedAllClick = () => {
setIsSelected(true);
setIsChecked(true);
- setCheckedId((items) => {
+ setCheckedPets((items) => {
return [...items, ...pets];
});
};
const handleButtonCancelSelectedAllClick = () => {
setIsSelected(false);
setIsChecked(false);
- setCheckedId([]);
+ setCheckedPets([]);
};
const handleChangePet = (pet) => {
- if (!checkedId.includes(pet)) {
- setCheckedId((items) => {
+ if (!checkedPets.includes(pet)) {
+ setCheckedPets((items) => {
return [...items, pet];
});
} else {
- setCheckedId (
- checkedId.filter((petsId) => {
- return !(petsId === pet);
+ setCheckedPets (
+ checkedPets.filter((checkedPet) => {
+ return !(checkedPet === pet);
})
);
- }
+ };
};
+ // const handleButtonDeletedClick = () => {
+ // checkedPets.forEach((checkedPet) => {
+ // pets.filter((pet) => {
+ // return pet === checkedPet;
+ // });
+ // });
+ // };
+
+
return (
{petType}
- {checkedId.length !== 0 ? (
-