vernova/resources/views/warehouses/show.blade.php
2026-07-26 19:58:27 +03:30

64 lines
3.4 KiB
PHP

@extends('layouts.app')
@section('title', $warehouse->name)
@section('content')
<div class="space-y-6">
<!-- Page Header -->
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
<div class="flex items-center gap-3">
<a href="{{ route('warehouses.index') }}" class="p-2 text-gray-500 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors">
<svg class="w-5 h-5" 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>
<div>
<h1 class="text-2xl font-bold text-gray-900">{{ $warehouse->name }}</h1>
</div>
</div>
<div class="flex items-center gap-2">
<a href="{{ route('warehouses.edit', $warehouse) }}" class="px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors">
{{ __('common.edit') }}
</a>
<form method="POST" action="{{ route('warehouses.destroy', $warehouse) }}" class="inline" onsubmit="return confirm('{{ __('common.confirm_delete') }}')">
@csrf @method('DELETE')
<button type="submit" class="px-4 py-2 text-sm font-medium text-red-700 bg-red-50 border border-red-200 rounded-lg hover:bg-red-100 transition-colors">
{{ __('common.delete') }}
</button>
</form>
</div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
<!-- Main Info -->
<div class="lg:col-span-2">
<div class="bg-white rounded-xl border border-gray-200 p-6">
<div class="grid grid-cols-2 gap-4">
<div>
<p class="text-xs text-gray-500">{{ __('warehouse.name') }}</p>
<p class="text-sm font-medium text-gray-900 mt-1">{{ $warehouse->name }}</p>
</div>
<div>
<p class="text-xs text-gray-500">{{ __('warehouse.location') }}</p>
<p class="text-sm font-medium text-gray-900 mt-1">{{ $warehouse->location ?? '-' }}</p>
</div>
<div>
<p class="text-xs text-gray-500">{{ __('expense.project') }}</p>
@if($warehouse->project)
<a href="{{ route('projects.show', $warehouse->project) }}" class="text-sm text-teal-600 hover:underline mt-1 inline-block">{{ $warehouse->project->name }}</a>
@else
<p class="text-sm font-medium text-gray-900 mt-1">-</p>
@endif
</div>
<div>
<p class="text-xs text-gray-500">{{ __('common.status') }}</p>
@if($warehouse->is_active)
<span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium mt-1 bg-emerald-50 text-emerald-700">{{ __('common.active') }}</span>
@else
<span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium mt-1 bg-gray-100 text-gray-600">{{ __('common.inactive') }}</span>
@endif
</div>
</div>
</div>
</div>
</div>
</div>
@endsection