@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) {{-- section content --}} @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
| No | @foreach ($table_result as $result) @php $sAsArray = array_keys((array) $result); $i = 0; @endphp @endforeach @foreach ($sAsArray as $header) @php $i++; @endphp @endforeachTipe PO | No PO | Email To | Email CC | Subject | Body | File Path | TimeStamp | Status |
|---|---|---|---|---|---|---|---|---|---|
| {{ $loop->iteration }} | @foreach ($table_result as $result) @php $field = array_keys((array) $result); $i = 0; @endphp @endforeach @foreach ($field as $header) @php $string = $header; $img_id = ''; $characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; for ($i = 0; $i < 10; $i++) { $img_id .= $characters[mt_rand(0, strlen($characters) - 1)]; } @endphp @php $i++; @endphp @endforeach @php $decoded = json_decode($detail->email_to, true); $cccode = json_decode($detail->email_cc, true); $emailTo = is_array($decoded) ? implode(', ', $decoded) : $detail->email_to; $emailcc = is_array($cccode) ? implode(', ', $cccode) : $detail->email_cc; @endphp{{ $detail->tipe_pr }} | {{ $detail->no_po }} | {{ $emailTo }} | {{ $emailcc }} | {{ $detail->subject }} | View Body {{-- Simpan HTML body asli di textarea hidden --}} | @if (!empty($detail->file_path)) View PDF @endif | {{ $detail->created_at }} | {{ $detail->status == 2 ? 'terkirim' : ($detail->status == 3 ? 'gagal kirim' : $detail->status) }} |