@extends('layouts.app') @section('title', 'Job Information') @section('content')
Export Job and Waste Details to Excel
@foreach ($jobs as $job)
Job No: {{ $job['job_no'] }}

Address: {{ $job['address'] }}

Site: {{ $job['site'] }}

Created At: {{ \Carbon\Carbon::parse($job['created_at'])->format('d M Y, h:i A') }}

@endforeach

Job Details

{{-- --}} @foreach ($jobs as $job) @php $jobInformation = json_decode($job['information'], true); @endphp @foreach ($jobInformation as $info) {{-- --}} @endforeach @endforeach
Job Length Used Piece Qty SourceRemaining Waste
{{ $info['length'] }} mm {{ $info['used_piece'] }} mm {{ $info['qty'] }} {{ ucfirst($info['source']) }}{{ $info['remaining_waste'] }}

Waste Details

@foreach ($jobs as $job) @php $lengths = json_decode($job['length']); $wastes = $job['wastes']; @endphp @foreach ($lengths as $index => $length) @endforeach @endforeach
Job Length Waste Length
{{ $length }} mm @if (isset($wastes[$index])) {{ $wastes[$index]['length'] }} mm @else 0 mm @endif
@endsection @push('styles') @endpush