v2 first commit
This commit is contained in:
		@@ -3,97 +3,49 @@
 | 
			
		||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.accounts', 1)]))
 | 
			
		||||
 | 
			
		||||
@section('content')
 | 
			
		||||
    <!-- Default box -->
 | 
			
		||||
    <div class="box box-success">
 | 
			
		||||
        {!! Form::open(['url' => 'banking/accounts', 'role' => 'form', 'class' => 'form-loading-button']) !!}
 | 
			
		||||
    <div class="card">
 | 
			
		||||
        {!! Form::open([
 | 
			
		||||
            'route' => 'accounts.store',
 | 
			
		||||
            'id' => 'account',
 | 
			
		||||
            '@submit.prevent' => 'onSubmit',
 | 
			
		||||
            '@keydown' => 'form.errors.clear($event.target.name)',
 | 
			
		||||
            'files' => true,
 | 
			
		||||
            'role' => 'form',
 | 
			
		||||
            'class' => 'form-loading-button',
 | 
			
		||||
            'novalidate' => true
 | 
			
		||||
        ]) !!}
 | 
			
		||||
 | 
			
		||||
        <div class="box-body">
 | 
			
		||||
            {{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
 | 
			
		||||
            <div class="card-body">
 | 
			
		||||
                <div class="row">
 | 
			
		||||
                    {{ Form::textGroup('name', trans('general.name'), 'font') }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::textGroup('number', trans('accounts.number'), 'pencil') }}
 | 
			
		||||
                    {{ Form::textGroup('number', trans('accounts.number'), 'pencil-alt') }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, setting('general.default_currency')) }}
 | 
			
		||||
                    {{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, setting('default.currency'), ['required' => 'required', 'change' => 'onChangeCurrency']) }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::textGroup('opening_balance', trans('accounts.opening_balance'), 'money', ['required' => 'required'], 0) }}
 | 
			
		||||
                    {{ Form::moneyGroup('opening_balance', trans('accounts.opening_balance'), 'balance-scale', ['required' => 'required', 'currency' => $currency], 0) }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::textGroup('bank_name', trans('accounts.bank_name'), 'university', []) }}
 | 
			
		||||
                    {{ Form::textGroup('bank_name', trans('accounts.bank_name'), 'university', []) }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::textGroup('bank_phone', trans('accounts.bank_phone'), 'phone', []) }}
 | 
			
		||||
                    {{ Form::textGroup('bank_phone', trans('accounts.bank_phone'), 'phone', []) }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::textareaGroup('bank_address', trans('accounts.bank_address')) }}
 | 
			
		||||
                    {{ Form::textareaGroup('bank_address', trans('accounts.bank_address')) }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::radioGroup('default_account', trans('accounts.default_account')) }}
 | 
			
		||||
                    {{ Form::radioGroup('default_account', trans('accounts.default_account')) }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::radioGroup('enabled', trans('general.enabled')) }}
 | 
			
		||||
        </div>
 | 
			
		||||
        <!-- /.box-body -->
 | 
			
		||||
 | 
			
		||||
        <div class="box-footer">
 | 
			
		||||
            {{ Form::saveButtons('banking/accounts') }}
 | 
			
		||||
        </div>
 | 
			
		||||
        <!-- /.box-footer -->
 | 
			
		||||
                    {{ Form::radioGroup('enabled', trans('general.enabled')) }}
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
            <div class="card-footer">
 | 
			
		||||
                <div class="row float-right">
 | 
			
		||||
                    {{ Form::saveButtons('banking/accounts') }}
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
        {!! Form::close() !!}
 | 
			
		||||
    </div>
 | 
			
		||||
@endsection
 | 
			
		||||
 | 
			
		||||
@push('scripts')
 | 
			
		||||
    <script type="text/javascript">
 | 
			
		||||
        var text_yes = '{{ trans('general.yes') }}';
 | 
			
		||||
        var text_no = '{{ trans('general.no') }}';
 | 
			
		||||
 | 
			
		||||
        $(document).ready(function(){
 | 
			
		||||
            $("#opening_balance").maskMoney({
 | 
			
		||||
                thousands : '{{ $currency->thousands_separator }}',
 | 
			
		||||
                decimal : '{{ $currency->decimal_mark }}',
 | 
			
		||||
                precision : {{ $currency->precision }},
 | 
			
		||||
                allowZero : true,
 | 
			
		||||
                @if($currency->symbol_first)
 | 
			
		||||
                prefix : '{{ $currency->symbol }}'
 | 
			
		||||
                @else
 | 
			
		||||
                suffix : '{{ $currency->symbol }}'
 | 
			
		||||
                @endif
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            $("#opening_balance").focusout();
 | 
			
		||||
 | 
			
		||||
            $('#enabled_1').trigger('click');
 | 
			
		||||
 | 
			
		||||
            $('#name').focus();
 | 
			
		||||
 | 
			
		||||
            $("#currency_code").select2({
 | 
			
		||||
                placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
 | 
			
		||||
            });
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        $(document).on('change', '#currency_code', function (e) {
 | 
			
		||||
            $.ajax({
 | 
			
		||||
                url: '{{ url("settings/currencies/currency") }}',
 | 
			
		||||
                type: 'GET',
 | 
			
		||||
                dataType: 'JSON',
 | 
			
		||||
                data: 'code=' + $(this).val(),
 | 
			
		||||
                success: function(data) {
 | 
			
		||||
                    $('#currency').val(data.code);
 | 
			
		||||
 | 
			
		||||
                    $('#currency_code').val(data.code);
 | 
			
		||||
                    $('#currency_rate').val(data.rate);
 | 
			
		||||
 | 
			
		||||
                    opening_balance = $('#opening_balance').maskMoney('unmasked')[0];
 | 
			
		||||
 | 
			
		||||
                    $("#opening_balance").maskMoney({
 | 
			
		||||
                        thousands : data.thousands_separator,
 | 
			
		||||
                        decimal : data.decimal_mark,
 | 
			
		||||
                        precision : data.precision,
 | 
			
		||||
                        allowZero : true,
 | 
			
		||||
                        prefix : (data.symbol_first) ? data.symbol : '',
 | 
			
		||||
                        suffix : (data.symbol_first) ? '' : data.symbol
 | 
			
		||||
                    });
 | 
			
		||||
 | 
			
		||||
                    $('#opening_balance').val(opening_balance);
 | 
			
		||||
 | 
			
		||||
                    $('#opening_balance').trigger('focusout');
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
        });
 | 
			
		||||
    </script>
 | 
			
		||||
@push('scripts_start')
 | 
			
		||||
    <script src="{{ asset('public/js/banking/accounts.js?v=' . version('short')) }}"></script>
 | 
			
		||||
@endpush
 | 
			
		||||
 
 | 
			
		||||
@@ -3,100 +3,52 @@
 | 
			
		||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.accounts', 1)]))
 | 
			
		||||
 | 
			
		||||
@section('content')
 | 
			
		||||
    <!-- Default box -->
 | 
			
		||||
    <div class="box box-success">
 | 
			
		||||
    <div class="card">
 | 
			
		||||
        {!! Form::model($account, [
 | 
			
		||||
            'id' => 'account',
 | 
			
		||||
            'method' => 'PATCH',
 | 
			
		||||
            'url' => ['banking/accounts', $account->id],
 | 
			
		||||
            'route' => ['accounts.update', $account->id],
 | 
			
		||||
            '@submit.prevent' => 'onSubmit',
 | 
			
		||||
            '@keydown' => 'form.errors.clear($event.target.name)',
 | 
			
		||||
            'files' => true,
 | 
			
		||||
            'role' => 'form',
 | 
			
		||||
            'class' => 'form-loading-button'
 | 
			
		||||
            'class' => 'form-loading-button',
 | 
			
		||||
            'novalidate' => true
 | 
			
		||||
        ]) !!}
 | 
			
		||||
 | 
			
		||||
        <div class="box-body">
 | 
			
		||||
            {{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
 | 
			
		||||
            <div class="card-body">
 | 
			
		||||
                <div class="row">
 | 
			
		||||
                    {{ Form::textGroup('name', trans('general.name'), 'font') }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::textGroup('number', trans('accounts.number'), 'pencil') }}
 | 
			
		||||
                    {{ Form::textGroup('number', trans('accounts.number'), 'pencil-alt') }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies) }}
 | 
			
		||||
                    {{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, $account->currency_code, ['required' => 'required', 'change' => 'onChangeCurrency']) }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::textGroup('opening_balance', trans('accounts.opening_balance'), 'money') }}
 | 
			
		||||
                    {{ Form::moneyGroup('opening_balance', trans('accounts.opening_balance'), 'balance-scale', ['required' => 'required', 'currency' => $currency], $account->opening_balance) }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::textGroup('bank_name', trans('accounts.bank_name'), 'university', []) }}
 | 
			
		||||
                    {{ Form::textGroup('bank_name', trans('accounts.bank_name'), 'university', []) }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::textGroup('bank_phone', trans('accounts.bank_phone'), 'phone', []) }}
 | 
			
		||||
                    {{ Form::textGroup('bank_phone', trans('accounts.bank_phone'), 'phone', []) }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::textareaGroup('bank_address', trans('accounts.bank_address')) }}
 | 
			
		||||
                    {{ Form::textareaGroup('bank_address', trans('accounts.bank_address')) }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::radioGroup('default_account', trans('accounts.default_account')) }}
 | 
			
		||||
                    {{ Form::radioGroup('default_account', trans('accounts.default_account')) }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::radioGroup('enabled', trans('general.enabled')) }}
 | 
			
		||||
        </div>
 | 
			
		||||
        <!-- /.box-body -->
 | 
			
		||||
 | 
			
		||||
        @permission('update-banking-accounts')
 | 
			
		||||
        <div class="box-footer">
 | 
			
		||||
            {{ Form::saveButtons('banking/accounts') }}
 | 
			
		||||
        </div>
 | 
			
		||||
        <!-- /.box-footer -->
 | 
			
		||||
        @endpermission
 | 
			
		||||
                    {{ Form::radioGroup('enabled', trans('general.enabled')) }}
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
            @permission('update-banking-accounts')
 | 
			
		||||
                <div class="card-footer">
 | 
			
		||||
                    <div class="row float-right">
 | 
			
		||||
                        {{ Form::saveButtons('banking/accounts') }}
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
            @endpermission
 | 
			
		||||
        {!! Form::close() !!}
 | 
			
		||||
    </div>
 | 
			
		||||
@endsection
 | 
			
		||||
 | 
			
		||||
@push('scripts')
 | 
			
		||||
    <script type="text/javascript">
 | 
			
		||||
        var text_yes = '{{ trans('general.yes') }}';
 | 
			
		||||
        var text_no = '{{ trans('general.no') }}';
 | 
			
		||||
 | 
			
		||||
        $(document).ready(function(){
 | 
			
		||||
            $("#opening_balance").maskMoney({
 | 
			
		||||
                thousands : '{{ $currency->thousands_separator }}',
 | 
			
		||||
                decimal : '{{ $currency->decimal_mark }}',
 | 
			
		||||
                precision : {{ $currency->precision }},
 | 
			
		||||
                allowZero : true,
 | 
			
		||||
                @if($currency->symbol_first)
 | 
			
		||||
                prefix : '{{ $currency->symbol }}'
 | 
			
		||||
                @else
 | 
			
		||||
                suffix : '{{ $currency->symbol }}'
 | 
			
		||||
                @endif
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            $("#opening_balance").focusout();
 | 
			
		||||
 | 
			
		||||
            $("#currency_code").select2({
 | 
			
		||||
                placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
 | 
			
		||||
            });
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        $(document).on('change', '#currency_code', function (e) {
 | 
			
		||||
            $.ajax({
 | 
			
		||||
                url: '{{ url("settings/currencies/currency") }}',
 | 
			
		||||
                type: 'GET',
 | 
			
		||||
                dataType: 'JSON',
 | 
			
		||||
                data: 'code=' + $(this).val(),
 | 
			
		||||
                success: function(data) {
 | 
			
		||||
                    $('#currency').val(data.code);
 | 
			
		||||
 | 
			
		||||
                    $('#currency_code').val(data.code);
 | 
			
		||||
                    $('#currency_rate').val(data.rate);
 | 
			
		||||
 | 
			
		||||
                    opening_balance = $('#opening_balance').maskMoney('unmasked')[0];
 | 
			
		||||
 | 
			
		||||
                    $("#opening_balance").maskMoney({
 | 
			
		||||
                        thousands : data.thousands_separator,
 | 
			
		||||
                        decimal : data.decimal_mark,
 | 
			
		||||
                        precision : data.precision,
 | 
			
		||||
                        allowZero : true,
 | 
			
		||||
                        prefix : (data.symbol_first) ? data.symbol : '',
 | 
			
		||||
                        suffix : (data.symbol_first) ? '' : data.symbol
 | 
			
		||||
                    });
 | 
			
		||||
 | 
			
		||||
                    $('#opening_balance').val(opening_balance);
 | 
			
		||||
 | 
			
		||||
                    $('#opening_balance').trigger('focusout');
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
        });
 | 
			
		||||
    </script>
 | 
			
		||||
@push('scripts_start')
 | 
			
		||||
    <script src="{{ asset('public/js/banking/accounts.js?v=' . version('short')) }}"></script>
 | 
			
		||||
@endpush
 | 
			
		||||
 
 | 
			
		||||
@@ -2,91 +2,93 @@
 | 
			
		||||
 | 
			
		||||
@section('title', trans_choice('general.accounts', 2))
 | 
			
		||||
 | 
			
		||||
@permission('create-banking-accounts')
 | 
			
		||||
@section('new_button')
 | 
			
		||||
<span class="new-button"><a href="{{ url('banking/accounts/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span>  {{ trans('general.add_new') }}</a></span>
 | 
			
		||||
    @permission('create-banking-accounts')
 | 
			
		||||
        <span><a href="{{ route('accounts.create') }}" class="btn btn-success btn-sm btn-alone"><span class="fa fa-plus"></span>  {{ trans('general.add_new') }}</a></span>
 | 
			
		||||
    @endpermission
 | 
			
		||||
@endsection
 | 
			
		||||
@endpermission
 | 
			
		||||
 | 
			
		||||
@section('content')
 | 
			
		||||
<!-- Default box -->
 | 
			
		||||
<div class="box box-success">
 | 
			
		||||
    <div class="box-header with-border">
 | 
			
		||||
        {!! Form::open(['url' => 'banking/accounts', 'role' => 'form', 'method' => 'GET']) !!}
 | 
			
		||||
        <div class="pull-left">
 | 
			
		||||
            <span class="title-filter hidden-xs">{{ trans('general.search') }}:</span>
 | 
			
		||||
            {!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
 | 
			
		||||
            {!! Form::button('<span class="fa fa-filter"></span>  ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="pull-right">
 | 
			
		||||
            <span class="title-filter hidden-xs">{{ trans('general.show') }}:</span>
 | 
			
		||||
            {!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
 | 
			
		||||
        </div>
 | 
			
		||||
        {!! Form::close() !!}
 | 
			
		||||
    </div>
 | 
			
		||||
    <!-- /.box-header -->
 | 
			
		||||
    <div class="card">
 | 
			
		||||
        <div class="card-header border-bottom-0" v-bind:class="[bulk_action.show ? 'bg-gradient-primary' : '']">
 | 
			
		||||
            {!! Form::open([
 | 
			
		||||
                'url' => 'banking/accounts',
 | 
			
		||||
                'role' => 'form',
 | 
			
		||||
                'method' => 'GET',
 | 
			
		||||
                'class' => 'mb-0'
 | 
			
		||||
            ]) !!}
 | 
			
		||||
                <div class="row" v-if="!bulk_action.show">
 | 
			
		||||
                    <div class="col-12 card-header-search card-header-space">
 | 
			
		||||
                        <span class="table-text hidden-lg card-header-search-text">{{ trans('general.search') }}:</span>
 | 
			
		||||
                        <akaunting-search></akaunting-search>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
    <div class="box-body">
 | 
			
		||||
        <div class="table table-responsive">
 | 
			
		||||
            <table class="table table-striped table-hover" id="tbl-accounts">
 | 
			
		||||
                <thead>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <th class="col-md-4">@sortablelink('name', trans('general.name'))</th>
 | 
			
		||||
                        <th class="col-md-3 hidden-xs">@sortablelink('number', trans('accounts.number'))</th>
 | 
			
		||||
                        <th class="col-md-3 text-right amount-space">@sortablelink('opening_balance', trans('accounts.current_balance'))</th>
 | 
			
		||||
                        <th class="col-md-1 hidden-xs">@sortablelink('enabled', trans_choice('general.statuses', 1))</th>
 | 
			
		||||
                        <th class="col-md-1 text-center">{{ trans('general.actions') }}</th>
 | 
			
		||||
                {{ Form::bulkActionRowGroup('general.accounts', $bulk_actions, 'banking/accounts') }}
 | 
			
		||||
            {!! Form::close() !!}
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <div class="table-responsive">
 | 
			
		||||
            <table class="table table-flush table-hover">
 | 
			
		||||
                <thead class="thead-light">
 | 
			
		||||
                    <tr class="row table-head-line">
 | 
			
		||||
                        <th class="col-sm-2 col-md-1 col-lg-1 col-xl-1 hidden-sm">{{ Form::bulkActionAllGroup() }}</th>
 | 
			
		||||
                        <th class="col-xs-4 col-sm-4 col-md-3 col-lg-3 col-xl-4">@sortablelink('name', trans('general.name'), ['filter' => 'active, visible'], ['class' => 'col-aka', 'rel' => 'nofollow'])</th>
 | 
			
		||||
                        <th class="col-md-2 col-lg-2 col-xl-2 text-center hidden-md">@sortablelink('number', trans('accounts.number'))</th>
 | 
			
		||||
                        <th class="col-sm-2 col-md-2 col-lg-3 col-xl-3 text-right hidden-sm">@sortablelink('opening_balance', trans('accounts.current_balance'))</th>
 | 
			
		||||
                        <th class="col-xs-4 col-sm-2 col-md-2 col-lg-2 col-xl-1">@sortablelink('enabled', trans('general.enabled'))</th>
 | 
			
		||||
                        <th class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1 text-center">{{ trans('general.actions') }}</th>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </thead>
 | 
			
		||||
 | 
			
		||||
                <tbody>
 | 
			
		||||
                @foreach($accounts as $item)
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        @if ($auth_user->can('read-reports-income-expense-summary'))
 | 
			
		||||
                        <td><a href="{{ url('reports/income-expense-summary?accounts[]=' . $item->id) }}">{{ $item->name }}</a></td>
 | 
			
		||||
                        @else
 | 
			
		||||
                        <td><a href="{{ route('accounts.edit', $item->id) }}">{{ $item->name }}</a></td>
 | 
			
		||||
                        @endif
 | 
			
		||||
                        <td class="hidden-xs">{{ $item->number }}</td>
 | 
			
		||||
                        <td class="text-right amount-space">@money($item->balance, $item->currency_code, true)</td>
 | 
			
		||||
                        <td class="hidden-xs">
 | 
			
		||||
                            @if ($item->enabled)
 | 
			
		||||
                                <span class="label label-success">{{ trans('general.enabled') }}</span>
 | 
			
		||||
                            @else
 | 
			
		||||
                                <span class="label label-danger">{{ trans('general.disabled') }}</span>
 | 
			
		||||
                            @endif
 | 
			
		||||
                        </td>
 | 
			
		||||
                        <td class="text-center">
 | 
			
		||||
                            <div class="btn-group">
 | 
			
		||||
                                <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" data-toggle-position="left" aria-expanded="false">
 | 
			
		||||
                                    <i class="fa fa-ellipsis-h"></i>
 | 
			
		||||
                                </button>
 | 
			
		||||
                                <ul class="dropdown-menu dropdown-menu-right">
 | 
			
		||||
                                    <li><a href="{{ route('accounts.edit', $item->id) }}">{{ trans('general.edit') }}</a></li>
 | 
			
		||||
                    @foreach($accounts as $item)
 | 
			
		||||
                        <tr class="row align-items-center border-top-1">
 | 
			
		||||
                            <td class="col-sm-2 col-md-1 col-lg-1 col-xl-1 hidden-sm">
 | 
			
		||||
                                {{ Form::bulkActionGroup($item->id, $item->name) }}
 | 
			
		||||
                            </td>
 | 
			
		||||
                            <td class="col-xs-4 col-sm-4 col-md-3 col-lg-3 col-xl-4"><a class="col-aka text-success" href="{{ route('accounts.edit', $item->id) }}">{{ $item->name }}</a></td>
 | 
			
		||||
                            <td class="col-md-2 col-lg-2 col-xl-2 text-center hidden-md">{{ $item->number }}</td>
 | 
			
		||||
                            <td class="col-sm-2 col-md-2 col-lg-3 col-xl-3 text-right hidden-sm">@money($item->balance, $item->currency_code, true)</td>
 | 
			
		||||
                            <td class="col-xs-4 col-sm-2 col-md-2 col-lg-2 col-xl-1">
 | 
			
		||||
                                @if (user()->can('update-banking-accounts'))
 | 
			
		||||
                                    {{ Form::enabledGroup($item->id, $item->name, $item->enabled) }}
 | 
			
		||||
                                @else
 | 
			
		||||
                                    @if ($item->enabled)
 | 
			
		||||
                                    <li><a href="{{ route('accounts.disable', $item->id) }}">{{ trans('general.disable') }}</a></li>
 | 
			
		||||
                                        <badge rounded type="success">{{ trans('general.enabled') }}</badge>
 | 
			
		||||
                                    @else
 | 
			
		||||
                                    <li><a href="{{ route('accounts.enable', $item->id) }}">{{ trans('general.enable') }}</a></li>
 | 
			
		||||
                                        <badge rounded type="danger">{{ trans('general.disabled') }}</badge>
 | 
			
		||||
                                    @endif
 | 
			
		||||
                                    @permission('delete-banking-accounts')
 | 
			
		||||
                                    <li class="divider"></li>
 | 
			
		||||
                                    <li>{!! Form::deleteLink($item, 'banking/accounts') !!}</li>
 | 
			
		||||
                                    @endpermission
 | 
			
		||||
                                </ul>
 | 
			
		||||
                            </div>
 | 
			
		||||
                        </td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                @endforeach
 | 
			
		||||
                                @endif
 | 
			
		||||
                            </td>
 | 
			
		||||
                            <td class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1 text-center border-0">
 | 
			
		||||
                                <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">
 | 
			
		||||
                                        <a class="dropdown-item" href="{{ route('accounts.edit', $item->id) }}">{{ trans('general.edit') }}</a>
 | 
			
		||||
                                        @permission('delete-banking-accounts')
 | 
			
		||||
                                            <div class="dropdown-divider"></div>
 | 
			
		||||
                                            {!! Form::deleteLink($item, 'banking/accounts') !!}
 | 
			
		||||
                                        @endpermission
 | 
			
		||||
                                    </div>
 | 
			
		||||
                                </div>
 | 
			
		||||
                            </td>
 | 
			
		||||
                        </tr>
 | 
			
		||||
                    @endforeach
 | 
			
		||||
                </tbody>
 | 
			
		||||
            </table>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <!-- /.box-body -->
 | 
			
		||||
 | 
			
		||||
    <div class="box-footer">
 | 
			
		||||
        @include('partials.admin.pagination', ['items' => $accounts, 'type' => 'accounts'])
 | 
			
		||||
        <div class="card-footer table-action">
 | 
			
		||||
            <div class="row">
 | 
			
		||||
                @include('partials.admin.pagination', ['items' => $accounts, 'type' => 'accounts'])
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <!-- /.box-footer -->
 | 
			
		||||
</div>
 | 
			
		||||
<!-- /.box -->
 | 
			
		||||
@endsection
 | 
			
		||||
 | 
			
		||||
@push('scripts_start')
 | 
			
		||||
    <script src="{{ asset('public/js/banking/accounts.js?v=' . version('short')) }}"></script>
 | 
			
		||||
@endpush
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user