@extends('admin.layout')
@section('admin-title')
{{ ucfirst(__('dailies.daily')) }}
@endsection
@section('admin-content')
{!! breadcrumbs([
'Admin Panel' => 'admin',
ucfirst(__('dailies.daily')) => 'admin/data/dailies',
($daily->id ? 'Edit ' : 'Create ') . ucfirst(__('dailies.daily')) => $daily->id ? 'admin/data/dailies/edit/' . $daily->id : 'admin/data/dailies/create',
]) !!}
{{ $daily->id ? 'Edit' : 'Create' }} {{ ucfirst(__('dailies.daily')) }}
@if ($daily->id)
({!! $daily->displayName !!})
Delete {{ ucfirst(__('dailies.daily')) }}
@endif
{!! Form::open(['url' => $daily->id ? 'admin/data/dailies/edit/' . $daily->id : 'admin/data/dailies/create', 'files' => true]) !!}
Basic Information
{!! Form::label('Name') !!}
{!! Form::text('name', $daily->name, ['class' => 'form-control']) !!}
@if (!$daily->id)
{!! Form::label('type', 'Daily Type') !!} {!! add_help('Buttons are just one click to collect a reward. Wheels allow users to spin a wheel each day.') !!}
{!! Form::select('type', ['Button' => 'Button', 'Wheel' => 'Wheel'], $daily ? $daily->type : null, ['class' => 'form-control']) !!}
@endif
{!! Form::label('Description (Optional)') !!}
{!! Form::textarea('description', $daily->description, ['class' => 'form-control wysiwyg']) !!}
{!! Form::label('Fee (Optional)') !!} {!! add_help('Add a fee here if the user should pay for rolling the daily.') !!}
{!! Form::text('fee', $daily->fee ?? 0, ['class' => 'form-control']) !!}
{!! Form::label('currency_id', 'Currency (Optional)') !!} {!! add_help('Which currency the fee should be in. If left unselected, no fee will be applied.') !!}
{!! Form::select('currency_id', $currencies, $daily->currency_id ?? null, ['class' => 'form-control', 'placeholder' => 'Select Currency']) !!}
@if ($daily->id)
@if ($daily->type == 'Button')
@include('admin.dailies._create_edit_button_daily')
@elseif($daily->type == 'Wheel')
@include('admin.dailies._create_edit_wheel_daily', ['wheel' => $daily->wheel])
@endif
@endif
{!! Form::submit($daily->id ? 'Edit' : 'Create', ['class' => 'btn btn-primary']) !!}
{!! Form::close() !!}
@include('dailies._loot_select_row', ['items' => $items, 'currencies' => $currencies, 'tables' => $tables, 'raffles' => $raffles, 'showLootTables' => true, 'showRaffles' => true])
@endsection
@section('scripts')
@parent
@include('js._loot_js', ['showLootTables' => true, 'showRaffles' => true])
@endsection