|
@@ -83,6 +83,13 @@ export function IntegrationsContent() {
|
|
|
const data = await response.json();
|
|
const data = await response.json();
|
|
|
if (data.success) {
|
|
if (data.success) {
|
|
|
const stores = data.stores || [];
|
|
const stores = data.stores || [];
|
|
|
|
|
+ // Debug: Log the sync config for each store
|
|
|
|
|
+ stores.forEach((store: ConnectedStore) => {
|
|
|
|
|
+ console.log(`[DEBUG] Store ${store.store_name}:`, {
|
|
|
|
|
+ enabled: store.store_sync_config?.[0]?.enabled,
|
|
|
|
|
+ sync_config: store.store_sync_config
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
setConnectedShops(stores);
|
|
setConnectedShops(stores);
|
|
|
|
|
|
|
|
// Update syncingStores - remove stores that finished syncing
|
|
// Update syncingStores - remove stores that finished syncing
|
|
@@ -323,6 +330,7 @@ export function IntegrationsContent() {
|
|
|
|
|
|
|
|
const handleToggleStoreEnabled = async (storeId: string, storeName: string, currentEnabled: boolean) => {
|
|
const handleToggleStoreEnabled = async (storeId: string, storeName: string, currentEnabled: boolean) => {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ console.log('[DEBUG] Toggle called:', { storeId, storeName, currentEnabled, newEnabled: !currentEnabled });
|
|
|
const sessionData = localStorage.getItem('session_data');
|
|
const sessionData = localStorage.getItem('session_data');
|
|
|
if (!sessionData) {
|
|
if (!sessionData) {
|
|
|
throw new Error('No session data found');
|
|
throw new Error('No session data found');
|