From 5b31822453e0141f8cd0dca1c41e720b96cca248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Sat, 28 Feb 2026 00:45:08 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[approvals]=20Alpine.js=20v3=20=ED=98=B8?= =?UTF-8?q?=ED=99=98=20=EA=B2=B0=EC=9E=AC=EC=84=A0=20=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20=EC=A0=91=EA=B7=BC=20=EB=B0=A9=EC=8B=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - __x.$data (v2 문법) → _x_dataStack[0] (v3 문법)으로 변경 - 에디터에 id="approval-line-editor" 추가하여 정확한 요소 선택 - create.blade.php, edit.blade.php 동시 수정 --- resources/views/approvals/create.blade.php | 4 ++-- resources/views/approvals/edit.blade.php | 4 ++-- .../views/approvals/partials/_approval-line-editor.blade.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/views/approvals/create.blade.php b/resources/views/approvals/create.blade.php index ff235395..ab12b7a1 100644 --- a/resources/views/approvals/create.blade.php +++ b/resources/views/approvals/create.blade.php @@ -83,8 +83,8 @@ class="w-full bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg tran return; } - const editor = document.querySelector('[x-data]').__x.$data; - const steps = editor.getStepsData(); + const editorEl = document.getElementById('approval-line-editor'); + const steps = editorEl._x_dataStack[0].getStepsData(); if (action === 'submit' && steps.filter(s => s.step_type !== 'reference').length === 0) { showToast('결재자를 1명 이상 추가해주세요.', 'warning'); diff --git a/resources/views/approvals/edit.blade.php b/resources/views/approvals/edit.blade.php index 60fa7ae5..8a8d6d86 100644 --- a/resources/views/approvals/edit.blade.php +++ b/resources/views/approvals/edit.blade.php @@ -119,8 +119,8 @@ class="w-full bg-red-100 hover:bg-red-200 text-red-700 px-4 py-2 rounded-lg tran return; } - const editor = document.querySelector('[x-data]').__x.$data; - const steps = editor.getStepsData(); + const editorEl = document.getElementById('approval-line-editor'); + const steps = editorEl._x_dataStack[0].getStepsData(); if (action === 'submit' && steps.filter(s => s.step_type !== 'reference').length === 0) { showToast('결재자를 1명 이상 추가해주세요.', 'warning'); diff --git a/resources/views/approvals/partials/_approval-line-editor.blade.php b/resources/views/approvals/partials/_approval-line-editor.blade.php index 17ea9c9f..1e440849 100644 --- a/resources/views/approvals/partials/_approval-line-editor.blade.php +++ b/resources/views/approvals/partials/_approval-line-editor.blade.php @@ -1,5 +1,5 @@ {{-- 결재선 편집 컴포넌트 (Alpine.js) --}} -
+

결재선

{{-- 결재선 템플릿 선택 --}}