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

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

@can('create', \App\Models\Supplier::class) {{ trans('app.add_supplier') }} @endcan
@can('massDelete', \App\Models\Supplier::class) @endcan @foreach ($suppliers as $supplier) @can('massDelete', \App\Models\Supplier::class) @endcan @endforeach
{{ trans('app.image') }} {{ trans('app.name') }} {{ trans('app.contact_person') }} {{ trans('app.email') }} {{ trans('app.status') }} {{ trans('app.option') }}
{{ trans('app.logo') }} {{ $supplier->name }} {{ $supplier->contact_person }} {{ $supplier->email }} {{ $supplier->active ? trans('app.active') : trans('app.inactive') }} @can('view', $supplier)   @endcan @can('update', $supplier)   @if ($supplier->primaryAddress)   @else   @endif @endcan @can('delete', $supplier) {!! Form::open(['route' => ['admin.stock.supplier.trash', $supplier->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\Supplier::class) {!! Form::open(['route' => ['admin.stock.supplier.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.contact_person') }} {{ trans('app.email') }} {{ trans('app.deleted_at') }} {{ trans('app.option') }}
{{ trans('app.logo') }} {{ $trash->name }} {{ $trash->contact_person }} {{ $trash->email }} {{ $trash->deleted_at->diffForHumans() }} @can('delete', $trash)   {!! Form::open(['route' => ['admin.stock.supplier.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