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

<div class="card">
    <div class="card-header">
        {{ trans('global.create') }} {{ trans('cruds.commissionData.title_singular') }}
    </div>

    <div class="card-body">
        <form method="POST" action="{{ route("admin.commission-datas.store") }}" enctype="multipart/form-data">
            @csrf
            <div class="form-group">
                <label class="required" for="commission_id">{{ trans('cruds.commissionData.fields.commission') }}</label>
                <select class="form-control select2 {{ $errors->has('commission') ? 'is-invalid' : '' }}" name="commission_id" id="commission_id" required>
                    @foreach($commissions as $id => $entry)
                        <option value="{{ $id }}" {{ old('commission_id') == $id ? 'selected' : '' }}>{{ $entry }}</option>
                    @endforeach
                </select>
                @if($errors->has('commission'))
                    <div class="invalid-feedback">
                        {{ $errors->first('commission') }}
                    </div>
                @endif
                <span class="help-block">{{ trans('cruds.commissionData.fields.commission_helper') }}</span>
            </div>
            <div class="form-group">
                <label class="required" for="commission_category_name_id">{{ trans('cruds.commissionData.fields.commission_category_name') }}</label>
                <select class="form-control select2 {{ $errors->has('commission_category_name') ? 'is-invalid' : '' }}" name="commission_category_name_id" id="commission_category_name_id" required>
                    @foreach($commission_category_names as $id => $entry)
                        <option value="{{ $id }}" {{ old('commission_category_name_id') == $id ? 'selected' : '' }}>{{ $entry }}</option>
                    @endforeach
                </select>
                @if($errors->has('commission_category_name'))
                    <div class="invalid-feedback">
                        {{ $errors->first('commission_category_name') }}
                    </div>
                @endif
                <span class="help-block">{{ trans('cruds.commissionData.fields.commission_category_name_helper') }}</span>
            </div>
            <div class="form-group">
                <label class="required" for="commission_type_id">{{ trans('cruds.commissionData.fields.commission_type') }}</label>
                <select class="form-control select2 {{ $errors->has('commission_type') ? 'is-invalid' : '' }}" name="commission_type_id" id="commission_type_id" required>
                    @foreach($commission_types as $id => $entry)
                        <option value="{{ $id }}" {{ old('commission_type_id') == $id ? 'selected' : '' }}>{{ $entry }}</option>
                    @endforeach
                </select>
                @if($errors->has('commission_type'))
                    <div class="invalid-feedback">
                        {{ $errors->first('commission_type') }}
                    </div>
                @endif
                <span class="help-block">{{ trans('cruds.commissionData.fields.commission_type_helper') }}</span>
            </div>
            <div class="form-group">
                <label for="commission_value">{{ trans('cruds.commissionData.fields.commission_value') }}</label>
                <input class="form-control {{ $errors->has('commission_value') ? 'is-invalid' : '' }}" type="text" name="commission_value" id="commission_value" value="{{ old('commission_value', '') }}">
                @if($errors->has('commission_value'))
                    <div class="invalid-feedback">
                        {{ $errors->first('commission_value') }}
                    </div>
                @endif
                <span class="help-block">{{ trans('cruds.commissionData.fields.commission_value_helper') }}</span>
            </div>
            <div class="form-group">
                <label for="commission_value_text_1">{{ trans('cruds.commissionData.fields.commission_value_text_1') }}</label>
                <input class="form-control {{ $errors->has('commission_value_text_1') ? 'is-invalid' : '' }}" type="text" name="commission_value_text_1" id="commission_value_text_1" value="{{ old('commission_value_text_1', '') }}">
                @if($errors->has('commission_value_text_1'))
                    <div class="invalid-feedback">
                        {{ $errors->first('commission_value_text_1') }}
                    </div>
                @endif
                <span class="help-block">{{ trans('cruds.commissionData.fields.commission_value_text_1_helper') }}</span>
            </div>
            <div class="form-group">
                <label for="commission_value_text_2">{{ trans('cruds.commissionData.fields.commission_value_text_2') }}</label>
                <input class="form-control {{ $errors->has('commission_value_text_2') ? 'is-invalid' : '' }}" type="text" name="commission_value_text_2" id="commission_value_text_2" value="{{ old('commission_value_text_2', '') }}">
                @if($errors->has('commission_value_text_2'))
                    <div class="invalid-feedback">
                        {{ $errors->first('commission_value_text_2') }}
                    </div>
                @endif
                <span class="help-block">{{ trans('cruds.commissionData.fields.commission_value_text_2_helper') }}</span>
            </div>
            <div class="form-group">
                <label for="commission_value_text_3">{{ trans('cruds.commissionData.fields.commission_value_text_3') }}</label>
                <input class="form-control {{ $errors->has('commission_value_text_3') ? 'is-invalid' : '' }}" type="text" name="commission_value_text_3" id="commission_value_text_3" value="{{ old('commission_value_text_3', '') }}">
                @if($errors->has('commission_value_text_3'))
                    <div class="invalid-feedback">
                        {{ $errors->first('commission_value_text_3') }}
                    </div>
                @endif
                <span class="help-block">{{ trans('cruds.commissionData.fields.commission_value_text_3_helper') }}</span>
            </div>
            <div class="form-group">
                <label for="commission_value_fusion_types_1_id">{{ trans('cruds.commissionData.fields.commission_value_fusion_types_1') }}</label>
                <select class="form-control select2 {{ $errors->has('commission_value_fusion_types_1') ? 'is-invalid' : '' }}" name="commission_value_fusion_types_1_id" id="commission_value_fusion_types_1_id">
                    @foreach($commission_value_fusion_types_1s as $id => $entry)
                        <option value="{{ $id }}" {{ old('commission_value_fusion_types_1_id') == $id ? 'selected' : '' }}>{{ $entry }}</option>
                    @endforeach
                </select>
                @if($errors->has('commission_value_fusion_types_1'))
                    <div class="invalid-feedback">
                        {{ $errors->first('commission_value_fusion_types_1') }}
                    </div>
                @endif
                <span class="help-block">{{ trans('cruds.commissionData.fields.commission_value_fusion_types_1_helper') }}</span>
            </div>
            <div class="form-group">
                <label for="commission_value_fusion_types_2_id">{{ trans('cruds.commissionData.fields.commission_value_fusion_types_2') }}</label>
                <select class="form-control select2 {{ $errors->has('commission_value_fusion_types_2') ? 'is-invalid' : '' }}" name="commission_value_fusion_types_2_id" id="commission_value_fusion_types_2_id">
                    @foreach($commission_value_fusion_types_2s as $id => $entry)
                        <option value="{{ $id }}" {{ old('commission_value_fusion_types_2_id') == $id ? 'selected' : '' }}>{{ $entry }}</option>
                    @endforeach
                </select>
                @if($errors->has('commission_value_fusion_types_2'))
                    <div class="invalid-feedback">
                        {{ $errors->first('commission_value_fusion_types_2') }}
                    </div>
                @endif
                <span class="help-block">{{ trans('cruds.commissionData.fields.commission_value_fusion_types_2_helper') }}</span>
            </div>
            <div class="form-group">
                <label for="team_id">{{ trans('cruds.commissionData.fields.team') }}</label>
                <select class="form-control select2 {{ $errors->has('team') ? 'is-invalid' : '' }}" name="team_id" id="team_id">
                    @foreach($teams as $id => $entry)
                        <option value="{{ $id }}" {{ old('team_id') == $id ? 'selected' : '' }}>{{ $entry }}</option>
                    @endforeach
                </select>
                @if($errors->has('team'))
                    <div class="invalid-feedback">
                        {{ $errors->first('team') }}
                    </div>
                @endif
                <span class="help-block">{{ trans('cruds.commissionData.fields.team_helper') }}</span>
            </div>
            <div class="form-group">
                <button class="btn btn-danger" type="submit">
                    {{ trans('global.save') }}
                </button>
            </div>
        </form>
    </div>
</div>



@endsection