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">
|
2020-01-16 14:57:27 +03:00
|
|
|
<div class="col-md-12 text-right">
|
2020-04-22 12:48:51 +03:00
|
|
|
<button type="button" @click="onAddCurrency" class="btn btn-success btn-sm">
|
|
|
|
{{ trans('general.add_new') }}
|
|
|
|
</button>
|
2019-11-16 10:21:14 +03:00
|
|
|
</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">
|
2020-01-16 14:57:27 +03:00
|
|
|
<th class="col-xs-4 col-sm-4 col-md-3">@sortablelink('name', trans('general.name'))</th>
|
|
|
|
<th class="col-md-3 d-none d-md-block">@sortablelink('code', trans('currencies.code'))</th>
|
|
|
|
<th class="col-md-2 d-none d-md-block">@sortablelink('rate', trans('currencies.rate'))</th>
|
|
|
|
<th class="col-xs-4 col-sm-4 col-md-2 ">@sortablelink('enabled', trans('general.enabled'))</th>
|
|
|
|
<th class="col-xs-4 col-sm-4 col-md-2 text-center">{{ trans('general.actions') }}</th>
|
2019-11-16 10:21:14 +03:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach($currencies as $item)
|
|
|
|
<tr class="row align-items-center border-top-1" id="currency-{{ $item->id }}">
|
2020-01-16 14:57:27 +03:00
|
|
|
<td class="col-xs-4 col-sm-4 col-md-3">
|
2020-01-22 19:03:34 +03:00
|
|
|
<a href="javascript:void(0);" @click="onEditCurrency('{{ $item->id }}')">
|
2019-11-16 10:21:14 +03:00
|
|
|
{{ $item->name }}
|
|
|
|
</a>
|
|
|
|
</td>
|
2020-01-16 14:57:27 +03:00
|
|
|
<td class="col-md-3 d-none d-md-block">{{ $item->code }}</td>
|
|
|
|
<td class="col-md-2 d-none d-md-block">{{ $item->rate }}</td>
|
|
|
|
<td class="col-xs-4 col-sm-4 col-md-2">
|
2019-11-16 10:21:14 +03:00
|
|
|
@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)
|
2020-02-13 16:37:27 +03:00
|
|
|
<badge rounded type="success" class="mw-60">{{ trans('general.yes') }}</badge>
|
2019-11-16 10:21:14 +03:00
|
|
|
@else
|
2020-02-13 16:37:27 +03:00
|
|
|
<badge rounded type="danger" class="mw-60">{{ trans('general.no') }}</badge>
|
2019-11-16 10:21:14 +03:00
|
|
|
@endif
|
2018-10-24 18:30:37 +03:00
|
|
|
@endif
|
2019-11-16 10:21:14 +03:00
|
|
|
</td>
|
2020-01-16 14:57:27 +03:00
|
|
|
<td class="col-xs-4 col-sm-4 col-md-2 text-center">
|
2019-11-16 10:21:14 +03:00
|
|
|
<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>
|
2020-04-22 12:48:51 +03:00
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
|
|
|
<button type="button" class="dropdown-item" @click="onEditCurrency('{{ $item->id }}')">
|
|
|
|
{{ trans('general.edit') }}
|
|
|
|
</button>
|
2020-10-14 17:07:59 +03:00
|
|
|
@can('delete-settings-currencies')
|
2019-11-16 10:21:14 +03:00
|
|
|
<div class="dropdown-divider"></div>
|
2021-04-19 19:47:23 +03:00
|
|
|
{!! Form::deleteLink($item, 'wizard.currencies.destroy') !!}
|
2020-10-14 17:07:59 +03:00
|
|
|
@endcan
|
2019-11-16 10:21:14 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
|
|
|
|
<tr class="row align-items-center border-top-1" v-show="show">
|
2020-01-16 14:57:27 +03:00
|
|
|
<td class="col-xs-4 col-sm-4 col-md-3">
|
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>
|
2020-01-16 14:57:27 +03:00
|
|
|
<td class="col-md-3 d-none d-md-block">
|
2020-04-18 21:46:28 +03:00
|
|
|
{{ Form::selectGroup('code', trans('currencies.code'), 'code', $codes, null, ['required' => 'required', 'change' => 'onChangeCode', 'model' => 'form.code'], '') }}
|
2019-11-16 10:21:14 +03:00
|
|
|
</td>
|
2020-01-16 14:57:27 +03:00
|
|
|
<td class="col-md-2 d-none d-md-block">
|
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>
|
2020-01-16 14:57:27 +03:00
|
|
|
<td class="col-xs-4 col-sm-4 col-md-2">
|
2019-11-16 10:21:14 +03:00
|
|
|
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
|
|
|
</td>
|
2020-01-16 14:57:27 +03:00
|
|
|
<td class="col-xs-4 col-sm-4 col-md-2 text-center">
|
2019-11-16 10:21:14 +03:00
|
|
|
{!! Form::button(
|
2020-04-22 12:48:51 +03:00
|
|
|
trans('general.save'), [
|
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
|
|
|
]) !!}
|
|
|
|
|
|
|
|
<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">
|
2020-01-16 14:57:27 +03:00
|
|
|
<div class="col-sm-6">
|
2020-10-22 18:58:58 +03:00
|
|
|
<a href="{{ route('wizard.companies.edit') }}" class="btn btn-icon btn-white">
|
2020-06-17 14:56:55 +03:00
|
|
|
<span class="btn-inner--text">{{ trans('pagination.previous') }}</span>
|
2020-01-15 20:59:21 +03:00
|
|
|
</a>
|
|
|
|
</div>
|
2020-04-22 12:48:51 +03:00
|
|
|
|
2020-01-16 14:57:27 +03:00
|
|
|
<div class="col-sm-6 text-right">
|
2020-10-22 18:58:58 +03:00
|
|
|
<a href="{{ route('wizard.taxes.index') }}" id="wizard-skip" class="btn btn-icon btn-white">
|
2020-06-17 14:56:55 +03:00
|
|
|
<span class="btn-inner--text">{{ trans('pagination.next') }}</span>
|
2019-11-16 10:21:14 +03:00
|
|
|
</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
|