From 0d0ad5e4a63a1796666bb8915f8fd143b5128025 Mon Sep 17 00:00:00 2001 From: VPS 4 Deploy Agent Date: Mon, 1 Jun 2026 00:09:05 +0200 Subject: [PATCH] fix: sidebar height scroll, saveTransform bypassing flip config and api gto insert syntax parse --- dental-server/dental-client/public/version.txt | 2 +- dental-server/dental-client/src/index.css | 2 ++ dental-server/dental-client/src/pages/ImageDetailsPage.jsx | 2 +- dental-server/routes/gtos.js | 7 +++++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dental-server/dental-client/public/version.txt b/dental-server/dental-client/public/version.txt index c594452..429988a 100644 --- a/dental-server/dental-client/public/version.txt +++ b/dental-server/dental-client/public/version.txt @@ -1 +1 @@ -2.1.51 +2.1.53 diff --git a/dental-server/dental-client/src/index.css b/dental-server/dental-client/src/index.css index db76090..ccb7693 100644 --- a/dental-server/dental-client/src/index.css +++ b/dental-server/dental-client/src/index.css @@ -64,6 +64,8 @@ body { ================================================================ */ .sidebar { width: var(--sidebar-width); + height: 100vh; + overflow-y: auto; background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); diff --git a/dental-server/dental-client/src/pages/ImageDetailsPage.jsx b/dental-server/dental-client/src/pages/ImageDetailsPage.jsx index dcb0fa0..fc88067 100644 --- a/dental-server/dental-client/src/pages/ImageDetailsPage.jsx +++ b/dental-server/dental-client/src/pages/ImageDetailsPage.jsx @@ -153,7 +153,7 @@ export default function ImageDetailsPage() { const totalRotation = ((baseRotation + fineTuneAngle) % 360 + 360) % 360; const saveTransform = async () => { - if (totalRotation === 0 && remark === (image.remark || '')) { + if (totalRotation === 0 && !baseFlipH && !baseFlipV && remark === (image.remark || '')) { showToast('Nenhuma edição aplicada.', 'error'); return; } diff --git a/dental-server/routes/gtos.js b/dental-server/routes/gtos.js index 60749ce..3270410 100644 --- a/dental-server/routes/gtos.js +++ b/dental-server/routes/gtos.js @@ -169,16 +169,19 @@ router.post('/:id/images', async (req, res) => { const { image_id } = req.body; if (!image_id) return res.status(400).json({ error: 'image_id é obrigatório' }); + const gId = parseInt(req.params.id, 10); + const imgId = parseInt(image_id, 10); + // Verificar se já está vinculada const existing = await db.get( 'SELECT id FROM gto_images WHERE gto_id = $1 AND image_id = $2', - [req.params.id, image_id] + [gId, imgId] ); if (existing) return res.status(409).json({ error: 'Imagem já vinculada a esta GTO' }); await db.run( 'INSERT INTO gto_images (gto_id, image_id) VALUES ($1, $2) RETURNING id', - [req.params.id, image_id] + [gId, imgId] ); res.status(201).json({ success: true, message: 'Imagem vinculada à GTO' }); } catch (err) {