From 710adff3857a785ecc4ebf878ef0680904d1fe62 Mon Sep 17 00:00:00 2001 From: poignatov Date: Sun, 15 Mar 2026 18:01:28 +0300 Subject: [PATCH] =?UTF-8?q?6.17.3:=20=D0=A4=D0=B8=D0=BA=D1=81=20=D0=BD?= =?UTF-8?q?=D0=B0=D0=B2=D0=B8=D0=B3=D0=B0=D1=86=D0=B8=D0=B8=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=20=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=B8=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D0=B8=D0=B8=20=D0=B8=D0=B7=20=D0=B7=D0=B0?= =?UTF-8?q?=D0=BA=D1=83=D0=BF=D0=BA=D0=B8?= 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/components/PurchaseScreen.jsx | 5 +++-- play-life-web/src/components/ShoppingItemForm.jsx | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/VERSION b/VERSION index e0fd9e0..83aa95a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.17.2 +6.17.3 diff --git a/play-life-web/package.json b/play-life-web/package.json index 62aa05b..1424784 100644 --- a/play-life-web/package.json +++ b/play-life-web/package.json @@ -1,6 +1,6 @@ { "name": "play-life-web", - "version": "6.17.2", + "version": "6.17.3", "type": "module", "scripts": { "dev": "vite", diff --git a/play-life-web/src/components/PurchaseScreen.jsx b/play-life-web/src/components/PurchaseScreen.jsx index bbe8a2e..5d6f80d 100644 --- a/play-life-web/src/components/PurchaseScreen.jsx +++ b/play-life-web/src/components/PurchaseScreen.jsx @@ -231,11 +231,12 @@ function PurchaseScreen({ onNavigate, purchaseConfigId, taskId, taskName }) { })) } - const handleCloseDetail = () => { - if (historyPushedForDetailRef.current) { + const handleCloseDetail = (skipHistoryBack) => { + if (!skipHistoryBack && historyPushedForDetailRef.current) { window.history.back() } else { setSelectedItemForDetail(null) + historyPushedForDetailRef.current = false } } diff --git a/play-life-web/src/components/ShoppingItemForm.jsx b/play-life-web/src/components/ShoppingItemForm.jsx index 9f9b1e5..ecae55b 100644 --- a/play-life-web/src/components/ShoppingItemForm.jsx +++ b/play-life-web/src/components/ShoppingItemForm.jsx @@ -132,7 +132,7 @@ function ShoppingItemForm({ onNavigate, itemId, boardId, previousTab, onSaved }) if (res.ok) { onSaved?.() - onNavigate(previousTab || 'shopping', { boardId }) + window.history.back() } else { const err = await res.json() setToastMessage({ text: err.error || 'Ошибка сохранения', type: 'error' }) @@ -152,7 +152,7 @@ function ShoppingItemForm({ onNavigate, itemId, boardId, previousTab, onSaved }) const res = await authFetch(`/api/shopping/items/${itemId}`, { method: 'DELETE' }) if (res.ok) { onSaved?.() - onNavigate(previousTab || 'shopping', { boardId }) + window.history.back() } else { setToastMessage({ text: 'Ошибка удаления', type: 'error' }) setIsDeleting(false)