diff --git a/call_center_pro.php b/call_center_pro.php index 5a1cd562..a40f36c3 100644 --- a/call_center_pro.php +++ b/call_center_pro.php @@ -347,12 +347,6 @@ $viewCards = $isTuaniRecuperablesStore ? [ 'active_class' => 'bg-light border', ], ] : [ - 'pendientes_hoy' => [ - 'label' => 'Bandeja principal', - 'heading' => 'Bandeja principal', - 'stat_key' => 'pendientes_hoy', - 'active_class' => 'bg-dark text-white', - ], 'nuevos_hoy' => [ 'label' => 'Asignados hoy', 'heading' => 'Pedidos asignados hoy', @@ -401,6 +395,12 @@ $viewCards = $isTuaniRecuperablesStore ? [ 'stat_key' => 'cerrados', 'active_class' => 'bg-secondary-subtle border border-secondary', ], + 'pendientes_hoy' => [ + 'label' => 'Bandeja principal', + 'heading' => 'Bandeja principal', + 'stat_key' => 'pendientes_hoy', + 'active_class' => 'bg-dark text-white', + ], 'todos' => [ 'label' => 'Todos', 'heading' => 'Todos los pedidos cargados', @@ -842,12 +842,33 @@ try { } if ($view === 'ultimos_3_dias') { + $aOrderNumber = static function (array $order): int { + $codigo = trim((string) ($order['codigo'] ?? '')); + if ($codigo !== '') { + $digits = preg_replace("/[^0-9]+/", '', $codigo); + if ($digits !== '') { + return (int) $digits; + } + } + + $sourceRow = (int) ($order['source_row'] ?? 0); + if ($sourceRow > 0) { + return $sourceRow; + } + + return (int) ($order['id'] ?? 0); + }; + $aOrderNumberValue = $aOrderNumber($a); + $bOrderNumberValue = $aOrderNumber($b); + if ($aOrderNumberValue !== $bOrderNumberValue) { + return $bOrderNumberValue <=> $aOrderNumberValue; + } $aRecent = cc_test_recent_followup_anchor($a); $bRecent = cc_test_recent_followup_anchor($b); $aRecentTs = $aRecent instanceof DateTimeImmutable ? $aRecent->getTimestamp() : null; $bRecentTs = $bRecent instanceof DateTimeImmutable ? $bRecent->getTimestamp() : null; if ($aRecentTs !== null && $bRecentTs !== null && $aRecentTs !== $bRecentTs) { - return $aRecentTs <=> $bRecentTs; + return $bRecentTs <=> $aRecentTs; } if ($aRecentTs !== null && $bRecentTs === null) { return -1; @@ -1833,13 +1854,10 @@ require_once 'layout_header.php';
Úsalo cuando el cliente quede en Confirmado fecha.
-
- - -
+
@@ -1942,6 +1960,11 @@ require_once 'layout_header.php';
Si la provincia aún no tiene cobertura cargada, podrás escribir el distrito manualmente.
+
+ + +
+
@@ -2373,6 +2396,9 @@ function toggleAgendaFields(sourceKey) { document.querySelectorAll('.js-envio-group[data-source-key="' + sourceKey + '"]').forEach(group => { group.classList.toggle('d-none', !needsShippingDetails); }); + document.querySelectorAll('.js-numero-cuenta-break[data-source-key="' + sourceKey + '"]').forEach(breakElement => { + breakElement.classList.toggle('d-none', !needsAccountNumberDetails); + }); document.querySelectorAll('.js-numero-cuenta-group[data-source-key="' + sourceKey + '"]').forEach(group => { group.classList.toggle('d-none', !needsAccountNumberDetails); }); diff --git a/includes/callcenter_test_helpers.php b/includes/callcenter_test_helpers.php index 125b0772..f7f3b9d8 100644 --- a/includes/callcenter_test_helpers.php +++ b/includes/callcenter_test_helpers.php @@ -80,6 +80,8 @@ function cc_test_assessor_default_color_hex(string $assessorKey): string 'KARINA' => '#0D6EFD', 'ESTEFANYA' => '#198754', 'CARMEN' => '#FF00FF', + 'MIRELLA' => '#EFBF04', + 'LUCIBOT' => '#FD7E14', default => $palette[$paletteIndex], }; }