From 0dca57964daae1fff92c666cdaf7526b2b84c098 Mon Sep 17 00:00:00 2001 From: poignatov Date: Fri, 13 Mar 2026 15:15:01 +0300 Subject: [PATCH] =?UTF-8?q?6.15.3:=20=D0=A4=D0=B8=D0=BA=D1=81=20=D0=BE?= =?UTF-8?q?=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B4?= =?UTF-8?q?=D0=B0=D0=BD=D0=BD=D1=8B=D1=85=20=D0=BF=D1=80=D0=B8=20=D1=80?= =?UTF-8?q?=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D0=B8=20=D0=B7=D0=B0=D0=B2=D0=B5=D1=80=D1=88=D1=91?= =?UTF-8?q?=D0=BD=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=B6=D0=B5=D0=BB=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VERSION | 2 +- play-life-web/package.json | 2 +- play-life-web/src/App.jsx | 5 +++++ play-life-web/src/components/Wishlist.jsx | 3 ++- play-life-web/src/components/WishlistDetail.jsx | 8 +++++++- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 0bffdbe..93cf8e3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.15.2 +6.15.3 diff --git a/play-life-web/package.json b/play-life-web/package.json index 9aa1ce7..612f99a 100644 --- a/play-life-web/package.json +++ b/play-life-web/package.json @@ -1,6 +1,6 @@ { "name": "play-life-web", - "version": "6.15.2", + "version": "6.15.3", "type": "module", "scripts": { "dev": "vite", diff --git a/play-life-web/src/App.jsx b/play-life-web/src/App.jsx index 845d3a2..743dca4 100644 --- a/play-life-web/src/App.jsx +++ b/play-life-web/src/App.jsx @@ -1080,6 +1080,11 @@ function AppContent() { setWordsRefreshTrigger(prev => prev + 1) } + // Обновляем список желаний при возврате из формы редактирования + if (prevActiveTabRef.current === 'wishlist-form' && activeTab === 'wishlist') { + setWishlistRefreshTrigger(prev => prev + 1) + } + if (isFirstLoad) { // Первая загрузка таба lastLoadedTabRef.current = tabKey diff --git a/play-life-web/src/components/Wishlist.jsx b/play-life-web/src/components/Wishlist.jsx index 5181c49..7d2dd44 100644 --- a/play-life-web/src/components/Wishlist.jsx +++ b/play-life-web/src/components/Wishlist.jsx @@ -338,7 +338,7 @@ function Wishlist({ onNavigate, refreshTrigger = 0, isActive = false, initialBoa } fetchBoards() fetchItems(selectedBoardId) - if (completedExpanded && completedCount > 0) { + if (completedExpanded) { fetchCompleted(selectedBoardId) } } @@ -809,6 +809,7 @@ function Wishlist({ onNavigate, refreshTrigger = 0, isActive = false, initialBoa wishlistId={selectedWishlistForDetail} onNavigate={onNavigate} boardId={selectedBoardId} + refreshTrigger={refreshTrigger} onRefresh={async () => { await fetchItems(selectedBoardId) if (completedExpanded) { diff --git a/play-life-web/src/components/WishlistDetail.jsx b/play-life-web/src/components/WishlistDetail.jsx index 324c1c3..ae86c59 100644 --- a/play-life-web/src/components/WishlistDetail.jsx +++ b/play-life-web/src/components/WishlistDetail.jsx @@ -9,7 +9,7 @@ import './TaskList.css' const API_URL = '/api/wishlist' -function WishlistDetail({ wishlistId, onNavigate, onRefresh, boardId, onClose, previousTab }) { +function WishlistDetail({ wishlistId, onNavigate, onRefresh, boardId, onClose, previousTab, refreshTrigger = 0 }) { const { authFetch, user } = useAuth() const [wishlistItem, setWishlistItem] = useState(null) const [loading, setLoading] = useState(true) @@ -51,6 +51,12 @@ function WishlistDetail({ wishlistId, onNavigate, onRefresh, boardId, onClose, p } }, [wishlistId, fetchWishlistDetail]) + useEffect(() => { + if (refreshTrigger > 0 && wishlistId) { + fetchWishlistDetail() + } + }, [refreshTrigger]) + const handleEdit = () => { // Сбрасываем флаг, чтобы handleClose не вызвал history.back() // handleTabChange заменит запись модального окна через replaceState