@extends('backend.layout.master')

@section('content')
    <!--<div class="main-content">-->
        <section class="section">
            <div class="section-header">
                <h1>{{ __($pageTitle) }}</h1>
            </div>
            <div class="row">
                <div class="col-md-12 stretch-card">
                    <div class="card">
                        <div class="card-header">
                            <a href="" class="btn btn-primary"><i
                                    class="fa fa-arrow-left mr-2"></i>{{ __('Back') }}</a>
                        </div>
                        
                        
                        
                        
                        
                        <div class="card-body">
                            
                            
                            
                            
                            
                            
                            <form method="POST" action="{{ route('tradersadminupdate', ['id' => $trader->id]) }}" enctype="multipart/form-data">
                                    @csrf
                                    @method('PUT')
                                    
                                                    <div class="form-group col-md-3">
                                <label class="col-form-label">{{__('Trader Image')}}</label>

                                <div id="image-preview" class="image-preview"
                                    style="background-image:url({{ getFile('' , 'placeholder.png') }});">
                                    <label for="image-upload" id="image-label">{{__('Choose File')}}</label>
                                    <input type="file" name="image" id="image-upload" />
                                </div>

                            </div>
                                <div class="form-row">
                                    

                                    <div class="form-group col-md-3">
                                        <label class="font-weight-bold">{{ __('trader Name') }}
                                            <span class="text-danger">*</span></label>
                                        <input type="text" class="form-control" name="trader_name"
                                            value="{{ $trader->trader_name }}" placeholder="trader name">
                                        @error('name')
                                            <span class="invalid-feedback" role="alert">
                                                <strong>{{ $message }}</strong>
                                                <span />
                                            @enderror
                                    </div>




                                    <div class="form-group offman col-md-3" >
                                        <label class="font-weight-bold">{{ __('Return Rate') }}<span
                                                class="text-danger">*</span></label></label>
                                        <div class="input-group">
                                            <input type="number" class="form-control" name="return_rate"
                                                value="{{$trader->return_rate}}" placeholder="Return rate">
                                            <div class="input-group-append">
                                                <div class="input-group-text"></div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="form-group offman col-md-3" id="maximum">
                                        <label class="font-weight-bold">{{ __('Followers') }}</label>
                                        <div class="input-group">
                                            <input type="number" class="form-control" name="followers"
                                                value="{{$trader->Followers}}" placeholder="Followers">
                                            <div class="input-group-append">
                                                <div class="input-group-text"></div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="form-group onman col-md-3 amount">
                                        <label class="font-weight-bold"> {{ __('Number of Copiers') }}</label>
                                        <div class="input-group">
                                            <input type="number" class="form-control" name="number_of_copiers"
                                                value="{{$trader->Number_of_copiers}}" placeholder="Number of Copiers">
                                            <div class="input-group-append">
                                                <div class="input-group-text"></div>
                                            </div>
                                        </div>
                                    </div>
                                                                        <div class="form-group onman col-md-3 amount">
                                        <label class="font-weight-bold"> {{ __('Accuracy') }}</label>
                                        <div class="input-group">
                                            <input type="number" class="form-control" name="accuracy"
                                                value="{{$trader->Accuracy}}" placeholder="Accuracy">
                                            <div class="input-group-append">
                                                <div class="input-group-text"></div>
                                            </div>
                                        </div>
                                    </div>

                                  <div class="form-group col-md-3">
                                        <label class="font-weight-bold">{{ __('Status') }}</label>
                                        <select name="status" class="form-control selectric">
                                            <option value="0" {{ $trader->status == 0 ? 'selected' : '' }}>{{ __('Disable') }}</option>
                                            <option value="1" {{ $trader->status == 1 ? 'selected' : '' }}>{{ __('Active') }}</option>
                                        </select>
                                    </div>


                                </div>
                                <button type="submit" class="btn btn-primary">{{ __('trader Update') }}</button>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    <!--</div>-->
@endsection


@push('script')

@endpush
