diff --git a/resources/views/barobill/config/index.blade.php b/resources/views/barobill/config/index.blade.php index cb129b49..340d77ee 100644 --- a/resources/views/barobill/config/index.blade.php +++ b/resources/views/barobill/config/index.blade.php @@ -151,41 +151,6 @@ class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg transition - -
-
-
-
- - - -
-
-

테넌트(회원사) 동기화

-

sales 시스템의 테넌트 데이터를 회원사로 동기화합니다

-
-
- -
-
-
-
-

테넌트 목록을 불러오는 중...

-
-
-
-
-
@@ -543,113 +508,9 @@ class="w-full px-3 py-2 text-sm border-2 border-dashed border-gray-300 text-gray }); }; - // 테넌트 목록 로드 - async function loadCompanies() { - try { - const res = await fetch('/api/admin/barobill/companies', { - headers: { - 'X-CSRF-TOKEN': '{{ csrf_token() }}', - 'Accept': 'application/json' - } - }); - const result = await res.json(); - - const container = document.getElementById('companies-list'); - - if (result.success && result.data.length > 0) { - container.innerHTML = ` -
- - - - - - - - - - - - ${result.data.map(c => ` - - - - - - - - `).join('')} - -
ID회사명사업자번호바로빌 ID상태
${c.id}${c.company_name}${c.corp_num}${c.barobill_user_id} - - ${c.is_active ? '활성' : '비활성'} - -
-
-

총 ${result.data.length}개의 테넌트가 등록되어 있습니다.

- `; - } else { - container.innerHTML = ` -
- - - -

등록된 테넌트가 없습니다.

-

sales 시스템에서 테넌트를 등록해주세요.

-
- `; - } - } catch (error) { - console.error('테넌트 목록 로드 실패:', error); - document.getElementById('companies-list').innerHTML = ` -
-

테넌트 목록을 불러오는데 실패했습니다.

-
- `; - } - } - - // 동기화 실행 - async function syncCompanies() { - const btn = document.getElementById('syncBtn'); - const originalText = btn.innerHTML; - - btn.disabled = true; - btn.innerHTML = ` - - - - 동기화 중... - `; - - try { - const res = await fetch('/api/admin/barobill/companies/sync', { - method: 'POST', - headers: { - 'X-CSRF-TOKEN': '{{ csrf_token() }}', - 'Accept': 'application/json' - } - }); - const result = await res.json(); - - if (result.success) { - showToast(result.message, 'success'); - loadCompanies(); - } else { - showToast(result.message || '동기화 실패', 'error'); - } - } catch (error) { - showToast('통신 오류가 발생했습니다.', 'error'); - } finally { - btn.disabled = false; - btn.innerHTML = originalText; - } - } - // 초기화 document.addEventListener('DOMContentLoaded', function() { ConfigModal.init(); - loadCompanies(); // 환경 변경 시 URL 자동 설정 document.getElementById('configForm').environment.addEventListener('change', function(e) {