@extends('adminlte::page')
@section('title', 'Bots')
@section('content_header')
Listado de Bots
@stop
@section('content')
| id |
Nombre |
URL |
Session Tag |
Calentamiento de línea |
Opciones |
@foreach($secretaries as $row)
@php
$warmupStartedAt = $row->warmup_started_at ? \Carbon\Carbon::parse($row->warmup_started_at) : null;
$daysInWarmup = $warmupStartedAt ? $warmupStartedAt->diffInDays(\Carbon\Carbon::today()) + 1 : 0;
// Calcular progreso (máximo 7 días para warmup completo)
$maxDays = 7;
$percentage = $warmupStartedAt ? min(($daysInWarmup / $maxDays) * 100, 100) : 0;
// Determinar color basado en el progreso
if ($percentage == 0) {
$barColor = '#6c757d'; // gris - sin warmup
} elseif ($percentage < 30) {
$barColor = '#dc3545'; // rojo - inicio
} elseif ($percentage < 60) {
$barColor = '#ffc107'; // amarillo - medio
} elseif ($percentage < 100) {
$barColor = '#17a2b8'; // cyan - avanzado
} else {
$barColor = '#28a745'; // verde - completo
}
// Determinar límite diario según días
if (!$warmupStartedAt) {
$dailyLimit = 'Sin límite';
} elseif ($daysInWarmup === 1) {
$dailyLimit = '20/día';
} elseif ($daysInWarmup === 2) {
$dailyLimit = '40/día';
} elseif ($daysInWarmup === 3) {
$dailyLimit = '80/día';
} elseif ($daysInWarmup >= 4 && $daysInWarmup <= 7) {
$dailyLimit = '200/día';
} else {
$dailyLimit = 'Sin límite';
}
@endphp
| {{$row->id}} |
{{$row->name}} |
{{$row->url}} |
{{$row->session_tag}} |
@if($warmupStartedAt)
Día {{$daysInWarmup}}/{{$maxDays}}
{{$dailyLimit}}
Inicio: {{$warmupStartedAt->format('d/m/Y')}}
@else
Sin calentamiento
@endif
|
|
@endforeach
@stop
@section('css')
@stop
@section('js')
@stop