6.17.3: Фикс навигации при редактировании из закупки
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 1m14s
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 1m14s
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "play-life-web",
|
"name": "play-life-web",
|
||||||
"version": "6.17.2",
|
"version": "6.17.3",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -231,11 +231,12 @@ function PurchaseScreen({ onNavigate, purchaseConfigId, taskId, taskName }) {
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleCloseDetail = () => {
|
const handleCloseDetail = (skipHistoryBack) => {
|
||||||
if (historyPushedForDetailRef.current) {
|
if (!skipHistoryBack && historyPushedForDetailRef.current) {
|
||||||
window.history.back()
|
window.history.back()
|
||||||
} else {
|
} else {
|
||||||
setSelectedItemForDetail(null)
|
setSelectedItemForDetail(null)
|
||||||
|
historyPushedForDetailRef.current = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ function ShoppingItemForm({ onNavigate, itemId, boardId, previousTab, onSaved })
|
|||||||
|
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
onSaved?.()
|
onSaved?.()
|
||||||
onNavigate(previousTab || 'shopping', { boardId })
|
window.history.back()
|
||||||
} else {
|
} else {
|
||||||
const err = await res.json()
|
const err = await res.json()
|
||||||
setToastMessage({ text: err.error || 'Ошибка сохранения', type: 'error' })
|
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' })
|
const res = await authFetch(`/api/shopping/items/${itemId}`, { method: 'DELETE' })
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
onSaved?.()
|
onSaved?.()
|
||||||
onNavigate(previousTab || 'shopping', { boardId })
|
window.history.back()
|
||||||
} else {
|
} else {
|
||||||
setToastMessage({ text: 'Ошибка удаления', type: 'error' })
|
setToastMessage({ text: 'Ошибка удаления', type: 'error' })
|
||||||
setIsDeleting(false)
|
setIsDeleting(false)
|
||||||
|
|||||||
Reference in New Issue
Block a user