{{-- Shared table partial for both default and custom-store flow sections on /flows. Required: $flows Collection of Flow models $canManage boolean $allStores Collection of Store models for the Copy dropdown $tableTestKey string used as the `data-test` marker so the test suite can target each section --}}
@foreach ($flows as $flow) @endforeach
{{ __('Name') }} {{ __('Scope') }} {{ __('Status') }} {{ __('Updated') }}
{{ $flow->name }}
@if ($flow->needs_review) {{ __('Needs review') }} @endif @if ($flow->import_key) {{ __('Imported') }} @endif @if ($flow->isCopy()) {{ __('Copy') }} @endif
{{ $flow->slug }}
{{-- Source document trail. Imported flows carry the original .docx / .xlsx filename through `source_doc`; surfacing it in the row helps operators trace a flow back to the pack it came from without having to open Edit. --}} @if ($flow->source_doc)
{{ $flow->source_doc }}
@endif
@if ($flow->isDefault()) {{ __('Default') }} @else {{ $flow->store?->name ?? '—' }} @endif @if ($flow->category)
{{ $flow->category }}
@endif
{{ $flow->status->label() }} {{ $flow->updated_at?->diffForHumans() }} @if ($canManage)
@if ($confirmingDeleteId === $flow->id) {{ __('Cancel') }} {{ __('Delete flow') }} @else {{-- Copy dropdown — operators promote a default into a store override OR copy a store flow into a sibling store. Uses Flux dropdown so we get keyboard nav + accessible labelling for free. --}} {{ __('Copy') }} @if ($flow->store_id !== null) {{ __('Copy to default flows') }} @endif @foreach ($allStores as $store) @if ($store->id !== $flow->store_id) {{ __('Copy to :store', ['store' => $store->name]) }} @endif @endforeach {{ __('Edit') }} {{ __('Delete') }} @endif
@else {{ __('Read-only') }} @endif