FC本部メニューに戻る

🏢 店舗申請管理システム

👑 FC本部管理者専用

待機中

-

🔍

審査中

-

承認済み

-

却下

-

待機中の申請

申請を読み込み中...

全申請一覧

承認履歴

\n' + ''; alert(codeExample); } function closeGoogleCalendarModal() { const modal = document.getElementById('google-calendar-modal'); if (modal) modal.remove(); } // JavaScript SDK統合例表示(重複削除済み) // ウィジェット統合例表示 function showWidgetIntegration() { // 実際にウィジェットをテスト表示 const testDiv = document.createElement('div'); testDiv.id = 'test-widget-' + Date.now(); testDiv.style.cssText = 'margin: 20px; padding: 20px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;'; document.body.appendChild(testDiv); // ウィジェットを実際に読み込み loadFENICEReservationWidget(testDiv.id, { apiBaseUrl: '/api/fc-integration', theme: 'modern' }); alert('ウィジェット統合例 loadFENICEReservationWidget関数でウィジェットが表示されました! 画面下部をご確認ください。'); // 5秒後に削除 setTimeout(() => testDiv.remove(), 5000); } // iframe統合例表示 function showIframeIntegration() { const iframeCode = ''; alert('iframe統合例(最も簡単) ' + iframeCode); } // API動作テスト async function testApiEndpoint() { try { showAlert('APIテスト実行中...', 'info'); const baseUrl = window.location.origin; console.log('Testing APIs at:', baseUrl); // 店舗一覧テスト const storesResponse = await fetch(baseUrl + '/api/fc-integration/stores'); const storesData = await storesResponse.json(); // 予約作成テスト const reservationResponse = await fetch(baseUrl + '/api/fc-integration/reservations', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ storeId: 'shinjuku', serviceId: 'cut', dateTime: '2025-01-15T14:00:00.000Z', customerInfo: { name: 'API テスト太郎', email: 'test@fenice-fc.com', phone: '090-0000-0000' } }) }); const reservationData = await reservationResponse.json(); if (storesData.success && reservationData.success) { showAlert('APIテスト成功! 店舗数: ' + storesData.stores.length + '件 予約ID: ' + reservationData.reservationId, 'success'); } else { throw new Error('APIレスポンスエラー'); } } catch (error) { console.error('APIテストエラー:', error); showAlert('APIテストに失敗しました', 'error'); } } // お客様画面デモを開く function openCustomerWidget() { const demoUrl = (typeof window !== 'undefined' ? window.location.origin : 'https://your-system.pages.dev') + '/static/customer-reservation-widget-demo.html'; console.log('Opening demo at:', demoUrl); if (typeof window !== 'undefined') { window.open(demoUrl, '_blank'); alert('お客様向け予約画面を新しいタブで開きました'); } else { console.log('Window object not available'); } } // Googleカレンダー設定ガイド function showGoogleCalendarSetup() { const setupGuide = 'Googleカレンダー設定手順\n\n' + '1. Google Cloud Platformでプロジェクト作成\n' + '2. Calendar API有効化\n' + '3. OAuth 2.0 認証情報作成\n' + '4. 環境変数設定\n' + '5. Cloudflare Secrets設定'; alert(setupGuide); } // 統合ガイドダウンロード function downloadIntegrationGuide() { const guideContent = 'FENICE Googleカレンダー連携システム - 統合ガイド\n\n' + '=== 概要 ===\n' + 'FC本部のお客様向けホームページとGoogleカレンダーが完全連携した予約システム。\n\n' + '=== API情報 ===\n' + 'Base URL: ' + window.location.origin + '/api/fc-integration\n\n' + 'エンドポイント:\n' + '- GET /stores: 店舗一覧取得\n' + '- POST /reservations: 予約受付\n' + '- DELETE /reservations/{id}: 予約取消\n\n' + '=== 統合方法 ===\n' + '1. JavaScript SDK統合\n' + '2. ウィジェット埋め込み\n' + '3. iframe統合(推奨)'; try { const blob = new Blob([guideContent], { type: 'text/plain;charset=utf-8;' }); const url = window.URL.createObjectURL(blob); const link = document.createElement('a'); const today = new Date().toISOString().split('T')[0]; link.href = url; link.download = 'FENICE_Googleカレンダー連携_統合ガイド_' + today + '.txt'; document.body.appendChild(link); link.click(); document.body.removeChild(link); window.URL.revokeObjectURL(url); showAlert('統合ガイドをダウンロードしました', 'success'); } catch (error) { console.error('Download error:', error); alert('ガイドのダウンロードに失敗しました'); } } // グローバル関数として公開 window.showTab = showTab; window.applyFilters = applyFilters; window.showApplicationDetail = showApplicationDetail; window.closeApplicationModal = closeApplicationModal; window.reviewApplication = reviewApplication; window.setApplicationUnderReview = setApplicationUnderReview; window.exportApplicationData = exportApplicationData; window.showAdvancedFilter = showAdvancedFilter; // showGoogleCalendarIntegration関数は既存システムへのリダイレクト window.closeGoogleCalendarModal = closeGoogleCalendarModal; window.showJavaScriptIntegration = showJavaScriptIntegration; window.showWidgetIntegration = showWidgetIntegration; window.showIframeIntegration = showIframeIntegration; window.testApiEndpoint = testApiEndpoint; window.openCustomerWidget = openCustomerWidget; window.showGoogleCalendarSetup = showGoogleCalendarSetup; window.downloadIntegrationGuide = downloadIntegrationGuide; console.log('All functions loaded successfully:', { FENICEReservationClient: typeof window.FENICEReservationClient, loadFENICEReservationWidget: typeof window.loadFENICEReservationWidget, showGoogleCalendarIntegration: 'redirected' });