From f8210d667f8737c69d2eb214f7b7666905ef7db2 Mon Sep 17 00:00:00 2001 From: BOHA Date: Tue, 24 Mar 2026 11:12:39 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20locked=20offers=20=E2=80=94=20selects,?= =?UTF-8?q?=20checkboxes,=20date=20pickers,=20rich=20editor=20all=20read-o?= =?UTF-8?q?nly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added isLockedByOther check to: - All disabled={} on selects (currency, language) and checkboxes (apply_vat) - All conditional renders that swap date pickers for read-only inputs - Rich editor conditional that swaps editor for static HTML display Co-Authored-By: Claude Opus 4.6 (1M context) --- src/admin/pages/OfferDetail.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/admin/pages/OfferDetail.tsx b/src/admin/pages/OfferDetail.tsx index 37eb33e..0930293 100644 --- a/src/admin/pages/OfferDetail.tsx +++ b/src/admin/pages/OfferDetail.tsx @@ -769,7 +769,7 @@ export default function OfferDetail() {
- {isInvalidated ? ( + {(isInvalidated || isLockedByOther) ? ( ) : ( - {isInvalidated ? ( + {(isInvalidated || isLockedByOther) ? ( ) : ( updateForm('currency', e.target.value)} className="admin-form-select" - disabled={isInvalidated} + disabled={isInvalidated || isLockedByOther} > @@ -817,7 +817,7 @@ export default function OfferDetail() { value={form.language} onChange={(e) => updateForm('language', e.target.value)} className="admin-form-select" - disabled={isInvalidated} + disabled={isInvalidated || isLockedByOther} > @@ -841,7 +841,7 @@ export default function OfferDetail() { type="checkbox" checked={form.apply_vat} onChange={(e) => updateForm('apply_vat', e.target.checked)} - disabled={isInvalidated} + disabled={isInvalidated || isLockedByOther} /> Účtovat DPH @@ -1097,7 +1097,7 @@ export default function OfferDetail() {
- {isInvalidated ? ( + {(isInvalidated || isLockedByOther) ? (