@extends('layouts.app') @section('title','Warehouses') @section('content')

Warehouses

{{ $company->name }} — locations and access grants

@if(session('success'))
{{ session('success') }}
@endif @if($errors->any())@endif @if($canManage)

Add warehouse

@csrf
@endif
@forelse($warehouses as $warehouse) @empty @endforelse
WarehouseCodeBranchStatus / actions
{{ $warehouse->name }}{{ $warehouse->code }}{{ $branches->firstWhere('id',$warehouse->branch_id)?->name ?? ($warehouse->branch_id ? 'Inactive branch' : 'Company-wide') }}{{ $warehouse->is_active ? 'Active' : 'Inactive' }} @if($canManage)
Edit warehouse
@csrf @method('PUT')
@endif @if($canGrant)
Access grants

Users need both a warehouse grant and warehouses.view permission. Owners and system administrators retain administrative access.

@foreach($grants->get($warehouse->id,collect()) as $grant)
@csrf @method('DELETE') {{ $grant->name }}
@endforeach
@csrf
@endif
No warehouses available for your current access.
@endsection