This commit is contained in:
Lizandro Guarnizo
2026-04-25 14:54:19 -05:00
parent bbf34d08d0
commit 2228818c85
4 changed files with 204 additions and 2 deletions
@@ -3,6 +3,7 @@
namespace App\Http\Livewire\Whatsapp;
use App\Models\WhatsappSystemConfig;
use App\Services\BancolombiaParser;
use App\Services\CorreoImapService;
use Livewire\Component;
use Jantinnerezo\LivewireAlert\LivewireAlert;
@@ -82,7 +83,14 @@ class ShowCorreoConfig extends Component
timeout: 20
);
$this->emails = $service->fetchLatest(5);
$raw = $service->fetchLatest(5);
// Añadir datos parseados de Bancolombia a cada correo
$this->emails = array_map(function (array $email) {
$email['bancolombia'] = BancolombiaParser::parse($email['body']);
return $email;
}, $raw);
$this->testStatus = 'ok';
} catch (\Throwable $e) {
$this->testStatus = 'error';