first commit
This commit is contained in:
		
							
								
								
									
										88
									
								
								resources/views/incomes/customers/create.blade.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										88
									
								
								resources/views/incomes/customers/create.blade.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,88 @@
 | 
			
		||||
@extends('layouts.admin')
 | 
			
		||||
 | 
			
		||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.customers', 1)]))
 | 
			
		||||
 | 
			
		||||
@section('content')
 | 
			
		||||
    <!-- Default box -->
 | 
			
		||||
    <div class="box box-success">
 | 
			
		||||
        {!! Form::open(['url' => 'incomes/customers', 'role' => 'form']) !!}
 | 
			
		||||
 | 
			
		||||
        <div class="box-body">
 | 
			
		||||
            {{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::textGroup('email', trans('general.email'), 'envelope') }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', []) }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, setting('general.default_currency')) }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::textGroup('phone', trans('general.phone'), 'phone', []) }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::textGroup('website', trans('general.website'), 'globe', []) }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::textareaGroup('address', trans('general.address')) }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::radioGroup('enabled', trans('general.enabled')) }}
 | 
			
		||||
 | 
			
		||||
            <div class="form-group col-md-12">
 | 
			
		||||
                {!! Form::label('create_user', trans('general.create_user'), ['class' => 'control-label']) !!}
 | 
			
		||||
                <br/>
 | 
			
		||||
                <div class="col-md-12">
 | 
			
		||||
                    {{ Form::checkbox('create_user', '1') }}   {{ trans('general.create_user') }}
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
            {{ Form::passwordGroup('password', trans('auth.password.current'), 'key', [], null, 'col-md-6 password hidden') }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::passwordGroup('password_confirmation', trans('auth.password.current_confirm'), 'key', [], null, 'col-md-6 password hidden') }}
 | 
			
		||||
 | 
			
		||||
        </div>
 | 
			
		||||
        <!-- /.box-body -->
 | 
			
		||||
 | 
			
		||||
        <div class="box-footer">
 | 
			
		||||
            {{ Form::saveButtons('incomes/customers') }}
 | 
			
		||||
        </div>
 | 
			
		||||
        <!-- /.box-footer -->
 | 
			
		||||
 | 
			
		||||
        {!! Form::close() !!}
 | 
			
		||||
    </div>
 | 
			
		||||
@endsection
 | 
			
		||||
 | 
			
		||||
@section('js')
 | 
			
		||||
    <script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/icheck.min.js') }}"></script>
 | 
			
		||||
@endsection
 | 
			
		||||
 | 
			
		||||
@section('css')
 | 
			
		||||
    <link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/square/green.css') }}">
 | 
			
		||||
@endsection
 | 
			
		||||
 | 
			
		||||
@section('scripts')
 | 
			
		||||
    <script type="text/javascript">
 | 
			
		||||
        var text_yes = '{{ trans('general.yes') }}';
 | 
			
		||||
        var text_no = '{{ trans('general.no') }}';
 | 
			
		||||
 | 
			
		||||
        $(document).ready(function(){
 | 
			
		||||
            $('#enabled_1').trigger('click');
 | 
			
		||||
 | 
			
		||||
            $('#name').focus();
 | 
			
		||||
 | 
			
		||||
            $("#currency_code").select2({
 | 
			
		||||
                placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            $('#create_user').iCheck({
 | 
			
		||||
                checkboxClass: 'icheckbox_square-green',
 | 
			
		||||
                radioClass: 'iradio_square-green',
 | 
			
		||||
                increaseArea: '20%' // optional
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            $('#create_user').on('ifClicked', function (event) {
 | 
			
		||||
                if ($(this).prop('checked')) {
 | 
			
		||||
                    $('.col-md-6.password').addClass('hidden');
 | 
			
		||||
                } else {
 | 
			
		||||
                    $('.col-md-6.password').removeClass('hidden');
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
        });
 | 
			
		||||
    </script>
 | 
			
		||||
@endsection
 | 
			
		||||
							
								
								
									
										93
									
								
								resources/views/incomes/customers/edit.blade.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										93
									
								
								resources/views/incomes/customers/edit.blade.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,93 @@
 | 
			
		||||
@extends('layouts.admin')
 | 
			
		||||
 | 
			
		||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.customers', 1)]))
 | 
			
		||||
 | 
			
		||||
@section('content')
 | 
			
		||||
<!-- Default box -->
 | 
			
		||||
<div class="box box-success">
 | 
			
		||||
    {!! Form::model($customer, [
 | 
			
		||||
        'method' => 'PATCH',
 | 
			
		||||
        'url' => ['incomes/customers', $customer->id],
 | 
			
		||||
        'role' => 'form'
 | 
			
		||||
    ]) !!}
 | 
			
		||||
 | 
			
		||||
    <div class="box-body">
 | 
			
		||||
        {{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
 | 
			
		||||
 | 
			
		||||
        {{ Form::textGroup('email', trans('general.email'), 'envelope') }}
 | 
			
		||||
 | 
			
		||||
        {{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', []) }}
 | 
			
		||||
 | 
			
		||||
        {{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies) }}
 | 
			
		||||
 | 
			
		||||
        {{ Form::textGroup('phone', trans('general.phone'), 'phone', []) }}
 | 
			
		||||
 | 
			
		||||
        {{ Form::textGroup('website', trans('general.website'), 'globe',[]) }}
 | 
			
		||||
 | 
			
		||||
        {{ Form::textareaGroup('address', trans('general.address')) }}
 | 
			
		||||
 | 
			
		||||
        {{ Form::radioGroup('enabled', trans('general.enabled')) }}
 | 
			
		||||
 | 
			
		||||
        <div class="form-group col-md-12">
 | 
			
		||||
            {!! Form::label('create_user', trans('general.create_user'), ['class' => 'control-label']) !!}
 | 
			
		||||
            <br/>
 | 
			
		||||
            <div class="col-md-12">
 | 
			
		||||
                @if ($customer->user_id)
 | 
			
		||||
                    {{ Form::checkbox('create_user', '1', 1, array('disabled')) }}   {{ trans('general.created_user') }}
 | 
			
		||||
                @else
 | 
			
		||||
                    {{ Form::checkbox('create_user', '1') }}   {{ trans('general.create_user') }}
 | 
			
		||||
                @endif
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        {{ Form::textGroup('password', trans('auth.password.current'), 'key', [], null, 'col-md-6 password hidden') }}
 | 
			
		||||
 | 
			
		||||
        {{ Form::textGroup('password_confirmation', trans('auth.password.current_confirm'), 'key', [], null, 'col-md-6 password hidden') }}
 | 
			
		||||
    </div>
 | 
			
		||||
    <!-- /.box-body -->
 | 
			
		||||
 | 
			
		||||
    @permission('update-incomes-customers')
 | 
			
		||||
    <div class="box-footer">
 | 
			
		||||
        {{ Form::saveButtons('incomes/customers') }}
 | 
			
		||||
    </div>
 | 
			
		||||
    <!-- /.box-footer -->
 | 
			
		||||
    @endpermission
 | 
			
		||||
 | 
			
		||||
    {!! Form::close() !!}
 | 
			
		||||
</div>
 | 
			
		||||
@endsection
 | 
			
		||||
 | 
			
		||||
@section('js')
 | 
			
		||||
    <script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/icheck.min.js') }}"></script>
 | 
			
		||||
@endsection
 | 
			
		||||
 | 
			
		||||
@section('css')
 | 
			
		||||
    <link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/square/green.css') }}">
 | 
			
		||||
@endsection
 | 
			
		||||
 | 
			
		||||
@section('scripts')
 | 
			
		||||
    <script type="text/javascript">
 | 
			
		||||
        var text_yes = '{{ trans('general.yes') }}';
 | 
			
		||||
        var text_no = '{{ trans('general.no') }}';
 | 
			
		||||
 | 
			
		||||
        $(document).ready(function(){
 | 
			
		||||
            $("#currency_code").select2({
 | 
			
		||||
                placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            $('#create_user').iCheck({
 | 
			
		||||
                checkboxClass: 'icheckbox_square-green',
 | 
			
		||||
                radioClass: 'iradio_square-green',
 | 
			
		||||
                increaseArea: '20%' // optional
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            $('#create_user').on('ifClicked', function (event) {
 | 
			
		||||
                if ($(this).prop('checked')) {
 | 
			
		||||
                    $('.col-md-6.password').addClass('hidden');
 | 
			
		||||
                } else {
 | 
			
		||||
                    $('.col-md-6.password').removeClass('hidden');
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
        });
 | 
			
		||||
    </script>
 | 
			
		||||
@endsection
 | 
			
		||||
							
								
								
									
										75
									
								
								resources/views/incomes/customers/index.blade.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										75
									
								
								resources/views/incomes/customers/index.blade.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,75 @@
 | 
			
		||||
@extends('layouts.admin')
 | 
			
		||||
 | 
			
		||||
@section('title', trans_choice('general.customers', 2))
 | 
			
		||||
 | 
			
		||||
@permission('create-incomes-customers')
 | 
			
		||||
@section('new_button')
 | 
			
		||||
<span class="new-button"><a href="{{ url('incomes/customers/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span>  {{ trans('general.add_new') }}</a></span>
 | 
			
		||||
@endsection
 | 
			
		||||
@endpermission
 | 
			
		||||
 | 
			
		||||
@section('content')
 | 
			
		||||
<!-- Default box -->
 | 
			
		||||
<div class="box box-success">
 | 
			
		||||
    <div class="box-header">
 | 
			
		||||
        {!! Form::open(['url' => 'incomes/customers', 'role' => 'form', 'method' => 'GET']) !!}
 | 
			
		||||
        <div class="pull-left">
 | 
			
		||||
            <span class="title-filter">{{ 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">{{ 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="box-body">
 | 
			
		||||
        <div class="table table-responsive">
 | 
			
		||||
            <table class="table table-bordered table-striped table-hover" id="tbl-customers">
 | 
			
		||||
                <thead>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <th>@sortablelink('name', trans('general.name'))</th>
 | 
			
		||||
                        <th>@sortablelink('email', trans('general.email'))</th>
 | 
			
		||||
                        <th>@sortablelink('phone', trans('general.phone'))</th>
 | 
			
		||||
                        <th>@sortablelink('enabled', trans('general.status'))</th>
 | 
			
		||||
                        <th style="width: 15%;">{{ trans('general.actions') }}</th>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </thead>
 | 
			
		||||
                <tbody>
 | 
			
		||||
                @foreach($customers as $item)
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td><a href="{{ url('incomes/customers/' . $item->id . '/edit') }}">{{ $item->name }}</a></td>
 | 
			
		||||
                        <td>{{ $item->email }}</td>
 | 
			
		||||
                        <td>{{ $item->phone }}</td>
 | 
			
		||||
                        <td>
 | 
			
		||||
                            @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>
 | 
			
		||||
                            <a href="{{ url('incomes/customers/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
 | 
			
		||||
 | 
			
		||||
                            @permission('delete-incomes-customers')
 | 
			
		||||
                            {!! Form::deleteButton($item, 'incomes/customers') !!}
 | 
			
		||||
                            @endpermission
 | 
			
		||||
                        </td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                @endforeach
 | 
			
		||||
                </tbody>
 | 
			
		||||
            </table>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <!-- /.box-body -->
 | 
			
		||||
    <div class="box-footer">
 | 
			
		||||
        @include('partials.admin.pagination', ['items' => $customers, 'type' => 'customers'])
 | 
			
		||||
    </div>
 | 
			
		||||
    <!-- /.box-footer -->
 | 
			
		||||
</div>
 | 
			
		||||
<!-- /.box -->
 | 
			
		||||
@endsection
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user