v2 first commit

This commit is contained in:
denisdulici
2019-11-16 10:21:14 +03:00
parent 5b23e9c2c4
commit 6d50fa8442
3075 changed files with 3451681 additions and 65594 deletions

View File

@ -0,0 +1,48 @@
@extends('layouts.admin')
@section('title', trans('general.title.new', ['type' => trans_choice('general.reports', 1)]))
@section('content')
<div class="card">
{!! Form::open([
'id' => 'report',
'route' => 'reports.store',
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'role' => 'form',
'class' => 'form-loading-button',
'novalidate' => true
]) !!}
<div class="card-body">
<div class="row">
{{ Form::textGroup('name', trans('general.name'), 'font') }}
{{ Form::selectGroup('class', trans_choice('general.types', 1), 'bars', $classes, null, ['required' => 'required', 'change' => 'onChangeClass']) }}
{{ Form::textareaGroup('description', trans('general.description'), null, null, ['rows' => '3', 'required' => 'required']) }}
{{ Form::selectGroup('group', trans('general.group_by'), 'folder', $groups, 'category') }}
{{ Form::selectGroup('period', trans('general.period'), 'calendar', $periods, 'yearly') }}
{{ Form::selectGroup('basis', trans('general.basis'), 'file', $basises, 'accrual') }}
{{ Form::selectGroup('chart', trans_choice('general.charts', 1), 'chart-pie', $charts, 'line') }}
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
</div>
</div>
<div class="card-footer">
<div class="row float-right">
{{ Form::saveButtons('common/reports') }}
</div>
</div>
{!! Form::close() !!}
</div>
@endsection
@push('scripts_start')
<script src="{{ asset('public/js/common/reports.js?v=' . version('short')) }}"></script>
@endpush

View File

@ -0,0 +1,53 @@
@extends('layouts.admin')
@section('title', trans('general.title.edit', ['type' => trans_choice('general.reports', 1)]))
@section('content')
<div class="card">
{!! Form::model($report, [
'id' => 'report',
'method' => 'PATCH',
'route' => ['reports.update', $report->id],
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'role' => 'form',
'class' => 'form-loading-button',
'novalidate' => true
]) !!}
<div class="card-body">
<div class="row">
{{ Form::textGroup('name', trans('general.name'), 'font') }}
{{ Form::selectGroup('class', trans_choice('general.types', 1), 'bars', $classes, $report->class, ['required' => 'required', 'change' => 'onChangeClass']) }}
{{ Form::textareaGroup('description', trans('general.description'), null, null, ['rows' => '3', 'required' => 'required']) }}
{{ Form::selectGroup('group', trans('general.group_by'), 'folder', $groups, $report->group) }}
{{ Form::selectGroup('period', trans('general.period'), 'calendar', $periods, $report->period) }}
{{ Form::selectGroup('basis', trans('general.basis'), 'file', $basises, $report->basis) }}
{{ Form::selectGroup('chart', trans_choice('general.charts', 1), 'chart-pie', $charts, $report->chart) }}
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
</div>
</div>
<div class="card-footer">
<div class="row float-right">
{{ Form::saveButtons('common/reports') }}
</div>
</div>
{!! Form::close() !!}
</div>
@endsection
@push('scripts_start')
<script type="text/javascript">
var class =
</script>
<script src="{{ asset('public/js/common/reports.js?v=' . version('short')) }}"></script>
@endpush

View File

@ -0,0 +1,122 @@
@extends('layouts.admin')
@section('title', trans_choice('general.reports', 2))
@section('new_button')
@permission('create-common-reports')
<span class="new-button">
<a href="{{ route('reports.create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> &nbsp;{{ trans('general.add_new') }}</a>
</span>
@endpermission
@endsection
@section('content')
<div class="row mb-4">
<div class="col-md-12">
<h3 id="stats">{{ trans('reports.income-expense') }}</h3>
</div>
@foreach($reports['income-expense'] as $report)
<div class="col-md-4">
<div class="card card-stats">
<span>
<div class="dropdown card-action-button">
<a class="btn btn-sm items-align-center py-2 mr-0 shadow-none--hover" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-ellipsis-v text-primary"></i>
</a>
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
@permission('create-common-reports')
<a class="dropdown-item" href="{{ route('reports.edit', $report->id) }}">{{ trans('general.edit') }}</a>
<div class="dropdown-divider"></div>
@endpermission
@permission('delete-common-reports')
{!! Form::deleteLink($report, 'common/reports') !!}
@endpermission
</div>
</div>
</span>
<div class="card-body">
<div class="row">
<div class="col">
<a href="{{ route('reports.show', $report->id) }}">
<h5 class="card-title text-uppercase text-muted mb-0">{{ $report->name }}</h5>
<span class="h2 font-weight-bold mb-0">{{ $classes[$report->id]->getTotal() }}</span>
</a>
</div>
<div class="col-auto">
<a href="{{ route('reports.show', $report->id) }}">
<div class="icon icon-shape bg-orange text-white rounded-circle shadow">
<i class="{{ $classes[$report->id]->getIcon() }}"></i>
</div>
</a>
</div>
</div>
<p class="mt-3 mb-0 text-sm">
<a href="{{ route('reports.show', $report->id) }}">
<span class="text-nowrap">{{ $report->description }}</span>
</a>
</p>
</div>
</div>
</div>
@endforeach
<div class="col-md-12">
<h3 id="stats">{{ trans('general.accounting') }}</h3>
</div>
@foreach($reports['accounting'] as $report)
<div class="col-md-4">
<div class="card card-stats">
<span>
<div class="dropdown card-action-button">
<a class="btn btn-sm items-align-center py-2 mr-0 shadow-none--hover" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-ellipsis-v text-primary"></i>
</a>
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
@permission('create-common-reports')
<a class="dropdown-item" href="{{ route('reports.edit', $report->id) }}">{{ trans('general.edit') }}</a>
<div class="dropdown-divider"></div>
@endpermission
@permission('delete-common-reports')
{!! Form::deleteLink($report, 'common/reports') !!}
@endpermission
</div>
</div>
</span>
<div class="card-body">
<div class="row">
<div class="col">
<a href="{{ route('reports.show', $report->id) }}">
<h5 class="card-title text-uppercase text-muted mb-0">{{ $report->name }}</h5>
<span class="h2 font-weight-bold mb-0">{{ $classes[$report->id]->getTotal() }}</span>
</a>
</div>
<div class="col-auto">
<a href="{{ route('reports.show', $report->id) }}">
<div class="icon icon-shape bg-orange text-white rounded-circle shadow">
<i class="{{ $classes[$report->id]->getIcon() }}"></i>
</div>
</a>
</div>
</div>
<p class="mt-3 mb-0 text-sm">
<a href="{{ route('reports.show', $report->id) }}">
<span class="text-nowrap">{{ $report->description }}</span>
</a>
</p>
</div>
</div>
</div>
@endforeach
</div>
@endsection
@push('scripts_start')
<script src="{{ asset('public/js/common/reports.js?v=' . version('short')) }}"></script>
@endpush