6.18.1: Фикс логики минуса в полях прогрессии
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 1m15s

This commit is contained in:
poignatov
2026-03-15 18:14:41 +03:00
parent 7ec76ea59b
commit 912ae7a857
4 changed files with 6 additions and 4 deletions

View File

@@ -1 +1 @@
6.18.0 6.18.1

View File

@@ -1,6 +1,6 @@
{ {
"name": "play-life-web", "name": "play-life-web",
"version": "6.18.0", "version": "6.18.1",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@@ -185,7 +185,8 @@ function ShoppingItemDetail({ itemId, onClose, onRefresh, onItemCompleted, onNav
type="button" type="button"
className="progression-control-btn progression-control-minus" className="progression-control-btn progression-control-minus"
onClick={() => { onClick={() => {
const current = parseFloat(volumeValue) || 0 const base = item.last_volume ?? item.volume_base ?? 1
const current = volumeValue.trim() ? parseFloat(volumeValue) : base
const step = item.volume_base || 1 const step = item.volume_base || 1
setVolumeValue((current - step).toString()) setVolumeValue((current - step).toString())
}} }}

View File

@@ -829,7 +829,8 @@ function TaskDetail({ taskId, onClose, onRefresh, onTaskCompleted, onNavigate })
type="button" type="button"
className="progression-control-btn progression-control-minus" className="progression-control-btn progression-control-minus"
onClick={() => { onClick={() => {
const current = parseFloat(progressionValue) || 0 const base = task.progression_base ?? 1
const current = progressionValue.trim() ? parseFloat(progressionValue) : base
const step = task.progression_base || 1 const step = task.progression_base || 1
setProgressionValue((current - step).toString()) setProgressionValue((current - step).toString())
}} }}