@extends('home.user_shops.layout')
@section('home.user_shops-title')
My Shops
@endsection
@section('home.user_shops-content')
{!! breadcrumbs([
'My Shops' => 'user-shops',
($shop->id ? 'Edit' : 'Create') . ' Shop' => $shop->id ? 'user-shops/edit/' . $shop->id : 'user-shops/create',
]) !!}
{{ $shop->id ? 'Edit' : 'Create' }} Shop
@if ($shop->id)
({!! $shop->displayName !!})
Delete Shop
@endif
{!! Form::open(['url' => $shop->id ? 'user-shops/edit/' . $shop->id : 'user-shops/create', 'files' => true]) !!}
Basic Information
{!! Form::label('Name') !!}
{!! Form::text('name', $shop->name, ['class' => 'form-control']) !!}
{!! Form::label('Description (Optional)') !!}
{!! Form::textarea('description', $shop->description, ['class' => 'form-control wysiwyg']) !!}
{!! Form::checkbox('is_active', 1, $shop->id ? $shop->is_active : 1, [
'class' => 'form-check-input',
'data-toggle' => 'toggle',
]) !!}
{!! Form::label('is_active', 'Set Active', ['class' => 'form-check-label ml-3']) !!} {!! add_help('If turned off, the shop will not be visible to regular users.') !!}
{!! Form::submit($shop->id ? 'Edit' : 'Create', ['class' => 'btn btn-primary']) !!}
{!! Form::close() !!}
@if ($shop->id)
Shop Stock
Other users cannot buy items until the stock is set to visible.
@if ($shop->stock->where('quantity', '>', 0)->count())
Quick edit your shop's stock here. Please keep in mind that any quantity set above 0 will
REMOVE
stock from your shop. You don't need to set a quantity to edit stock.
{!! Form::open(['url' => 'user-shops/quickstock/' . $shop->id]) !!}
@include('widgets._user_shop_select')
{!! Form::submit('Edit Stock', ['class' => 'btn btn-primary']) !!}
{!! Form::close() !!}
@else
Add stock to your shop from your inventory.
@endif
Preview
{{ $shop->name }}
Owned by {!! $shop->user->displayName !!}
{!! $shop->parsed_description !!}
@endif
@endsection
@section('scripts')
@parent
@include('widgets._inventory_select_js', ['readOnly' => true])
@endsection