@extends('admin.layouts.master') @section('content')

{{ trans('app.warehouses') }}

@can('create', \App\Models\Warehouse::class) {{ trans('app.add_warehouse') }} @endcan
@can('massDelete', \App\Models\Warehouse::class) @endcan @foreach ($warehouses as $warehouse) @can('massDelete', \App\Models\Warehouse::class) @endcan @endforeach
{{ trans('app.image') }} {{ trans('app.name') }} {{ trans('app.email') }} {{ trans('app.incharge') }} {{ trans('app.status') }} {{ trans('app.option') }}
{{ trans('app.image') }} {{ $warehouse->name }} {{ $warehouse->email }} {{ $warehouse->manager ? $warehouse->manager->getName() : '' }} {{ $warehouse->active ? trans('app.active') : trans('app.inactive') }} @can('view', $warehouse)   @endcan @can('update', $warehouse)   @if ($warehouse->primaryAddress)   @else   @endif @endcan @can('delete', $warehouse) {!! Form::open(['route' => ['admin.stock.warehouse.trash', $warehouse->id], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button('', ['type' => 'submit', 'class' => 'confirm ajax-silent', 'title' => trans('app.trash'), 'data-toggle' => 'tooltip', 'data-placement' => 'top']) !!} {!! Form::close() !!} @endcan

@can('massDelete', \App\Models\Warehouse::class) {!! Form::open(['route' => ['admin.stock.warehouse.emptyTrash'], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button('', ['type' => 'submit', 'class' => 'confirm btn btn-default btn-flat ajax-silent', 'title' => trans('help.empty_trash'), 'data-toggle' => 'tooltip', 'data-placement' => 'right']) !!} {!! Form::close() !!} @else @endcan {{ trans('app.trash') }}

@foreach ($trashes as $trash) @endforeach
{{ trans('app.image') }} {{ trans('app.name') }} {{ trans('app.email') }} {{ trans('app.incharge') }} {{ trans('app.deleted_at') }} {{ trans('app.option') }}
{{ trans('app.image') }} {{ $trash->name }} {{ $trash->email }} {{ $trash->manager ? $trash->manager->getName() : '' }} {{ $trash->deleted_at->diffForHumans() }} @can('delete', $trash)   {!! Form::open(['route' => ['admin.stock.warehouse.destroy', $trash->id], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button('', ['type' => 'submit', 'class' => 'confirm ajax-silent', 'title' => trans('app.delete_permanently'), 'data-toggle' => 'tooltip', 'data-placement' => 'top']) !!} {!! Form::close() !!} @endcan
@endsection