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) --}} -