@extends('layouts.app')
@section('title', $assignment->order->order_no)
@section('content')
@php
$a = $assignment;
$canUpdate = ! $a->isCompleted() && auth()->user()->can('work.update_own');
$max = (int) config('erp.work.max_photos_per_update');
$draftData = $drafts->map(function ($p) {
return ['id' => $p->id, 'thumb' => route('work-photos.show', [$p, 'thumb']), 'kb' => (int) round($p->bytes / 1024), 'has_location' => $p->hasLocation()];
})->values();
@endphp