update
This commit is contained in:
@@ -553,6 +553,13 @@ class ReportController extends Controller
|
||||
->whereIn('id', array_unique($poli_ids))
|
||||
->get()
|
||||
->keyBy('id');
|
||||
$preliminaries = DB::table('riwayatjawaban')
|
||||
->select('nofoto', 'created_at')
|
||||
->whereIn('nofoto', array_unique($acc))
|
||||
->where('keterangan', 'Preliminary Results')
|
||||
->orderBy('created_at', 'DESC')
|
||||
->get()
|
||||
->groupBy('nofoto');
|
||||
foreach ($hasil as $row) {
|
||||
$k = $komponen[$row->nofoto] ?? collect([]);
|
||||
$row->id_bakteri01 = optional($k->firstWhere('komponen','id_bakteri01'))->isidata;
|
||||
@@ -567,6 +574,7 @@ class ReportController extends Controller
|
||||
->implode('; ');
|
||||
|
||||
$row->filefoto = "<a href='".url('/hasil/'.$row->nofoto)."'>$row->nofoto</a>";
|
||||
$row->tgl_preliminary = optional(($preliminaries[$row->nofoto] ?? collect([]))->first())->created_at;
|
||||
$p = $poli[$row->poli_id] ?? null;
|
||||
$row->subpoli = $p->subpoli ?? null;
|
||||
$row->modaliti2 = $this->resolveTatTargetDays($p->modaliti2 ?? '1');
|
||||
|
||||
Reference in New Issue
Block a user