@extends('appshell::layouts.private') @section('title') {{ $product->name ?? __('Unnamed Product') }} @stop @section('content')
@component('appshell::widgets.card_with_icon', [ 'icon' => ($product->is_active ?? false) ? 'product' : 'product-off', 'type' => ($product->is_active ?? false) ? 'success' : 'warning' ]) {{ $product->name ?? __('Unnamed Product') }} @if (!($product->is_active ?? true)) {{ __('inactive') }} @endif @slot('subtitle') {{ $product->sku ?? '' }} @endslot @endcomponent
@component('appshell::widgets.card_with_icon', [ 'icon' => 'time', 'type' => 'info' ]) {{ $product->state ?? '' }} @slot('subtitle') {{ __('Updated') }} {{ show_datetime($product->updated_at ?? null) }} | {{ __('Created at') }} {{ show_datetime($product->created_at ?? null) }} @endslot @endcomponent
@component('appshell::widgets.card_with_icon', ['icon' => 'bag']) {{ $product->units_sold ?? '0' }} {{ __('units sold') }} @slot('subtitle') @if (!empty($product->last_sale_at)) {{ __('Last sale at') }} {{ show_datetime($product->last_sale_at) }} @else {{ __('No sales were registered') }} @endif @endslot @endcomponent
@include('vanilo::product._show_categories', ['for' => $product, 'taxonomies' => $taxonomies]) @include('vanilo::product._show_properties', ['for' => $product])
@include('vanilo::media._index', ['model' => $product])
@can('edit products') {{ __('Edit product') }} @endcan @can('delete products') {!! Form::open(['route' => ['vanilo.admin.product.destroy', $product], 'method' => 'DELETE', 'class' => "float-right"]) !!} {!! Form::close() !!} @endcan
@stop