fix: [approvals] Alpine.js v3 호환 결재선 데이터 접근 방식 수정
- __x.$data (v2 문법) → _x_dataStack[0] (v3 문법)으로 변경 - 에디터에 id="approval-line-editor" 추가하여 정확한 요소 선택 - create.blade.php, edit.blade.php 동시 수정
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user