up
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user