vernova/resources/views/inventory/create-warehouse.blade.php
2026-07-26 19:58:27 +03:30

48 lines
2.8 KiB
PHP

@extends('layouts.app')
@section('title', 'افزودن انبار جدید')
@section('content')
<div class="p-6">
<div class="mb-6">
<a href="{{ route('inventory.warehouses') }}" class="text-sm text-gray-500 hover:text-gray-700 mb-2 inline-flex items-center gap-1">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"/></svg>
بازگشت به لیست
</a>
<h1 class="text-2xl font-bold text-gray-900">افزودن انبار جدید</h1>
</div>
<div class="bg-white rounded-lg shadow p-6 max-w-2xl">
<form action="{{ route('inventory.warehouses.store') }}" method="POST">
@csrf
<div class="space-y-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">نام انبار <span class="text-red-500">*</span></label>
<input type="text" name="name" value="{{ old('name') }}" class="w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-emerald-500 focus:border-emerald-500" required>
@error('name')<p class="mt-1 text-xs text-red-500">{{ $message }}</p>@enderror
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">موقعیت</label>
<input type="text" name="location" value="{{ old('location') }}" class="w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-emerald-500 focus:border-emerald-500">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">توضیحات</label>
<textarea name="description" rows="3" class="w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-emerald-500 focus:border-emerald-500">{{ old('description') }}</textarea>
</div>
<div class="flex items-center gap-2">
<input type="checkbox" name="is_active" value="1" checked id="is_active" class="rounded border-gray-300 text-emerald-600 focus:ring-emerald-500">
<label for="is_active" class="text-sm text-gray-700">فعال</label>
</div>
</div>
<div class="mt-6 flex gap-3 pt-4 border-t">
<button type="submit" class="px-6 py-2 bg-emerald-600 text-white text-sm font-medium rounded-lg hover:bg-emerald-700">ذخیره</button>
<a href="{{ route('inventory.warehouses') }}" class="px-6 py-2 bg-gray-100 text-gray-700 text-sm font-medium rounded-lg hover:bg-gray-200">انصراف</a>
</div>
</form>
</div>
</div>
@endsection