2018-10-24 18:30:37 +03:00
|
|
|
@extends('layouts.wizard')
|
|
|
|
|
|
|
|
@section('title', trans('general.wizard'))
|
|
|
|
|
|
|
|
@section('content')
|
2019-11-16 10:21:14 +03:00
|
|
|
<div class="card">
|
2020-01-15 19:48:53 +03:00
|
|
|
@include('partials.wizard.steps')
|
2018-10-24 18:30:37 +03:00
|
|
|
|
2019-11-28 17:51:49 +03:00
|
|
|
<div class="card-body border-bottom-0">
|
2019-11-16 10:21:14 +03:00
|
|
|
<div class="row">
|
2019-11-28 17:51:49 +03:00
|
|
|
<div class="col-12 text-right">
|
2020-01-09 12:14:38 +03:00
|
|
|
<span>
|
2019-11-16 10:21:14 +03:00
|
|
|
<button type="button" @click="onAddCurrency" class="btn btn-success btn-sm">
|
|
|
|
<span class="fa fa-plus"></span> {{ trans('general.add_new') }}
|
|
|
|
</button>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-10-24 18:30:37 +03:00
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
<div class="table-responsive">
|
|
|
|
{!! Form::open([
|
|
|
|
'route' => 'wizard.currencies.store',
|
|
|
|
'id' => 'currency',
|
|
|
|
'@submit.prevent' => 'onSubmit',
|
|
|
|
'@keydown' => 'form.errors.clear($event.target.name)',
|
|
|
|
'files' => true,
|
|
|
|
'role' => 'form',
|
2019-11-27 13:45:04 +03:00
|
|
|
'class' => 'form-loading-button mb-0',
|
2019-11-16 10:21:14 +03:00
|
|
|
'novalidate' => true
|
|
|
|
]) !!}
|
|
|
|
<table class="table table-flush table-hover" id='tbl-currencies'>
|
|
|
|
<thead class="thead-light">
|
|
|
|
<tr class="row table-head-line">
|
|
|
|
<th class="col-xs-4 col-sm-3">@sortablelink('name', trans('general.name'))</th>
|
|
|
|
<th class="col-sm-3 hidden-sm">@sortablelink('code', trans('currencies.code'))</th>
|
|
|
|
<th class="col-sm-2 hidden-sm">@sortablelink('rate', trans('currencies.rate'))</th>
|
|
|
|
<th class="col-xs-4 col-sm-2">@sortablelink('enabled', trans('general.enabled'))</th>
|
|
|
|
<th class="col-xs-4 col-sm-2 text-center">{{ trans('general.actions') }}</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach($currencies as $item)
|
|
|
|
<tr class="row align-items-center border-top-1" id="currency-{{ $item->id }}">
|
|
|
|
<td class="col-xs-4 col-sm-3 currency-name">
|
|
|
|
<a href="javascript:void(0);" class="text-success" @click="onEditCurrency('{{ $item->id }}')">
|
|
|
|
{{ $item->name }}
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td class="col-sm-3 hidden-sm currency-code">{{ $item->code }}</td>
|
|
|
|
<td class="col-sm-2 hidden-sm currency-rate">{{ $item->rate }}</td>
|
|
|
|
<td class="col-xs-4 col-sm-2 currency-status">
|
|
|
|
@if (user()->can('update-settings-currencies'))
|
|
|
|
{{ Form::enabledGroup($item->id, $item->name, $item->enabled) }}
|
2018-10-24 18:30:37 +03:00
|
|
|
@else
|
2019-11-16 10:21:14 +03:00
|
|
|
@if ($item->enabled)
|
|
|
|
<badge rounded type="success">{{ trans('general.enabled') }}</badge>
|
|
|
|
@else
|
|
|
|
<badge rounded type="danger">{{ trans('general.disabled') }}</badge>
|
|
|
|
@endif
|
2018-10-24 18:30:37 +03:00
|
|
|
@endif
|
2019-11-16 10:21:14 +03:00
|
|
|
</td>
|
|
|
|
<td class="col-xs-4 col-sm-2 text-center">
|
|
|
|
<div class="dropdown">
|
|
|
|
<a class="btn btn-neutral btn-sm text-light items-align-center py-2" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
|
<i class="fa fa-ellipsis-h text-muted"></i>
|
|
|
|
</a>
|
|
|
|
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
|
|
|
<button type="button" class="dropdown-item" @click="onEditCurrency('{{ $item->id }}')">
|
|
|
|
{{ trans('general.edit') }}
|
|
|
|
</button>
|
|
|
|
@permission('delete-settings-currencies')
|
|
|
|
<div class="dropdown-divider"></div>
|
|
|
|
{!! Form::deleteLink($item, 'wizard/currencies') !!}
|
|
|
|
@endpermission
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
|
|
|
|
<tr class="row align-items-center border-top-1" v-show="show">
|
|
|
|
<td class="col-xs-4 col-sm-3 currency-name">
|
2019-11-28 17:51:49 +03:00
|
|
|
{{ Form::textGroup('name', trans('general.name'), 'font', [], null, '') }}
|
2019-11-16 10:21:14 +03:00
|
|
|
</td>
|
|
|
|
<td class="col-sm-3 hidden-sm currency-code">
|
|
|
|
{{ Form::selectGroup('code', trans('currencies.code'), 'code', $codes, null, ['required' => 'required', 'change' => 'onChangeCode'], '') }}
|
|
|
|
</td>
|
|
|
|
<td class="col-sm-2 hidden-sm currency-rate">
|
2019-11-28 17:51:49 +03:00
|
|
|
{{ Form::textGroup('rate', trans('currencies.rate'), 'percentage', ['required' => 'required'], null, '') }}
|
2019-11-16 10:21:14 +03:00
|
|
|
</td>
|
|
|
|
<td class="col-xs-4 col-sm-2 currency-status">
|
|
|
|
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
|
|
|
</td>
|
|
|
|
<td class="col-xs-4 col-sm-2 text-center">
|
|
|
|
{!! Form::button(
|
2020-01-09 12:14:38 +03:00
|
|
|
'<span class="btn-inner--icon"><i class="fas fa-save"></i></span>', [
|
2019-11-16 10:21:14 +03:00
|
|
|
':disabled' => 'form.loading',
|
|
|
|
'type' => 'submit',
|
2020-01-09 12:14:38 +03:00
|
|
|
'class' => 'btn btn-success',
|
2019-11-16 10:21:14 +03:00
|
|
|
'data-loading-text' => trans('general.loading'),
|
|
|
|
]) !!}
|
|
|
|
|
|
|
|
<div class="d-none">
|
|
|
|
{{ Form::numberGroup('precision', trans('currencies.precision'), 'bullseye') }}
|
|
|
|
|
|
|
|
{{ Form::textGroup('symbol', trans('currencies.symbol.symbol'), 'font') }}
|
|
|
|
|
|
|
|
{{ Form::selectGroup('symbol_first', trans('currencies.symbol.position'), 'text-width', ['1' => trans('currencies.symbol.before'), '0' => trans('currencies.symbol.after')]) }}
|
|
|
|
|
|
|
|
{{ Form::textGroup('decimal_mark', trans('currencies.decimal_mark'), 'columns') }}
|
|
|
|
|
|
|
|
{{ Form::textGroup('thousands_separator', trans('currencies.thousands_separator'), 'columns', []) }}
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2020-01-09 12:14:38 +03:00
|
|
|
<input type="hidden" name="bulk_action_path" value="settings/currencies"/>
|
2019-11-16 10:21:14 +03:00
|
|
|
{!! Form::close() !!}
|
2018-10-24 18:30:37 +03:00
|
|
|
</div>
|
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
<div class="card-footer">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12 text-right">
|
2020-01-15 19:48:53 +03:00
|
|
|
<a href="{{ url('wizard/taxes') }}" id="wizard-skip" class="btn btn-white header-button-top" @click="next">
|
2019-11-16 10:21:14 +03:00
|
|
|
<span class="fa fa-share"></span> {{ trans('general.skip') }}
|
|
|
|
</a>
|
|
|
|
</div>
|
2018-10-24 18:30:37 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
@push('scripts_start')
|
|
|
|
<script type="text/javascript">
|
|
|
|
var currencies = {!! json_encode($currencies->items()) !!}
|
|
|
|
</script>
|
2018-10-24 18:30:37 +03:00
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
<script src="{{ asset('public/js/wizard/currencies.js?v=' . version('short')) }}"></script>
|
2018-10-24 18:30:37 +03:00
|
|
|
@endpush
|