﻿@extends('layouts.app')

@section('content')
<div class="container m-auto p-4 sm:p-6 lg:p-8">
    <div class="bg-white rounded-lg shadow-lg p-6">
        <h1 class="text-2l font-bold text-gray-900 mb-6">تقرير حركة مخزن</h1>

        <div class="mb-6">
            <p class="text-gray-600 mb-4">يرجى اختيار المخزن لعرض تقرير الحركة الخاص به.</p>
            
            <form action="{{ route('inventory.reports.warehouse_movement') }}" method="GET" class="max-w-lg">
                <div class="mb-4">
                    <label for="warehouse_id" class="block text-sm font-medium text-gray-700 mb-1">المخزن</label>
                    <select id="warehouse_id" name="warehouse_id" required class="block w-full rounded-md border-gray-300 shadow-sm focus:border-primary-500 focus:ring focus:ring-primary-500 focus:ring-opacity-50">
                        <option value="">-- اختر المخزن --</option>
                        @foreach($warehouses as $warehouse)
                            <option value="{{ $warehouse->id }}">{{ $warehouse->name }}</option>
                        @endforeach
                    </select>
                </div>
                
                <div class="flex items-center">
                    <button type="submit" class="inline-flex items-center p-4 py-2 bg-primary-600 text-white rounded-md hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500">
                        عرض التقرير
                    </button>
                    <a href="{{ route('inventory.reports.index') }}" class="inline-flex items-center p-4 py-2 bg-gray-200 text-gray-700 rounded-md hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500 mr-2">
                        العودة
                    </a>
                </div>
            </form>
        </div>
    </div>
</div>
@endsection
