diff --git a/call_center_pro.php b/call_center_pro.php index e59983e6..bf787f9d 100644 --- a/call_center_pro.php +++ b/call_center_pro.php @@ -317,7 +317,7 @@ function cc_test_panel_orders_signature(array $orders): string return sha1(json_encode($payload, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)); } -$view = $_GET['view'] ?? 'pendientes_hoy'; +$view = trim((string) ($_GET['view'] ?? '')); $storeKey = trim((string) ($_GET['store'] ?? 'flower')); $storeKey = mb_strtolower($storeKey); @@ -339,6 +339,7 @@ $isMainTuaniStore = cc_test_is_tuani_main_store_key($storeKey); $isTuaniRecuperablesStore = $storeKey === 'tuani_recuperables'; $canShowTuaniLogisticaButton = $isMainTuaniStore || $isTuaniRecuperablesStore; $viewCardColumnClass = $isTuaniRecuperablesStore ? 'col-md-6 col-xl-2' : 'col-md-6 col-xl-2'; +$defaultView = cc_test_callcenter_pro_default_view_key($storeKey); $viewCards = $isTuaniRecuperablesStore ? [ 'pendientes_hoy' => [ @@ -444,8 +445,11 @@ $allowedViews = []; foreach ($viewCards as $viewKey => $cardConfig) { $allowedViews[$viewKey] = $cardConfig['heading']; } +if ($view === '') { + $view = $defaultView; +} if (!isset($allowedViews[$view])) { - $view = array_key_first($allowedViews) ?: 'pendientes_hoy'; + $view = isset($allowedViews[$defaultView]) ? $defaultView : (array_key_first($allowedViews) ?: 'pendientes_hoy'); } $_SESSION[cc_test_callcenter_store_session_key()] = cc_test_normalize_context_key($storeKey); @@ -1335,7 +1339,7 @@ require_once 'layout_header.php'; Drive detectado: filas Agregados: : distribución desde fila · último procesado Extracción: desde fila - Actualización en vivo cada 10 min + Actualización en vivo cada 5 min Ver vista previa Drive @@ -2297,7 +2301,7 @@ ccCallCenterPanelBaseUrl.hash = ''; const ccCallCenterPanelRefreshUrl = new URL(ccCallCenterPanelBaseUrl.toString()); ccCallCenterPanelRefreshUrl.searchParams.set('ajax_refresh', '1'); const ccCallCenterPanelInitialSignature = ; -const ccCallCenterPanelRefreshMs = 600000; +const ccCallCenterPanelRefreshMs = 300000; let ccCallCenterPanelRefreshInFlight = false; let ccCallCenterPanelLastSignature = ccCallCenterPanelInitialSignature; diff --git a/gestiones_callcenter.php b/gestiones_callcenter.php index 30e2655a..63b0eb87 100644 --- a/gestiones_callcenter.php +++ b/gestiones_callcenter.php @@ -235,6 +235,7 @@ $isMainTuaniStore = cc_test_is_tuani_main_store_key($storeKey); $isTuaniRecuperablesStore = $storeKey === 'tuani_recuperables'; $canShowTuaniLogisticaButton = $isMainTuaniStore || $isTuaniRecuperablesStore; $viewCardColumnClass = $isTuaniRecuperablesStore ? 'col-md-6 col-xl-2' : 'col-md-6 col-xl-2'; +$callCenterDefaultView = $isMainTuaniStore ? cc_test_callcenter_pro_default_view_key($storeKey) : $view; $viewCards = $isTuaniRecuperablesStore ? [ 'pendientes_hoy' => [ @@ -1562,7 +1563,7 @@ require_once 'layout_header.php';