Merge branch 'master' of github.com:akaunting/akaunting

This commit is contained in:
Cüneyt Şentürk 2019-12-26 12:24:58 +03:00
commit 67a6415f77
21 changed files with 511 additions and 493 deletions

View File

@ -2,7 +2,6 @@
namespace App\Http\ViewComposers; namespace App\Http\ViewComposers;
use Auth;
use App\Utilities\Updater; use App\Utilities\Updater;
use Illuminate\View\View; use Illuminate\View\View;
use App\Traits\Modules as RemoteModules; use App\Traits\Modules as RemoteModules;
@ -21,11 +20,11 @@ class Header
{ {
$user = user(); $user = user();
$bills = []; $invoices = $bills = [];
$invoices = []; $updates = $notifications = 0;
$notifications = 0;
$company = null; $company = null;
if (!empty($user)) {
// Get customer company // Get customer company
if ($user->can('read-client-portal')) { if ($user->can('read-client-portal')) {
$company = (object) [ $company = (object) [
@ -56,6 +55,7 @@ class Header
$updates = count(Updater::all()); $updates = count(Updater::all());
$this->loadSuggestions(); $this->loadSuggestions();
}
$view->with([ $view->with([
'user' => $user, 'user' => $user,

View File

@ -19,7 +19,7 @@ class Notifications
public function compose(View $view) public function compose(View $view)
{ {
// No need to add suggestions in console // No need to add suggestions in console
if (app()->runningInConsole() || !env('APP_INSTALLED')) { if (app()->runningInConsole() || !env('APP_INSTALLED') || !user()) {
return; return;
} }

View File

@ -26,6 +26,7 @@ class Suggestions
$modules = false; $modules = false;
if (user()) {
$path = Route::current()->uri(); $path = Route::current()->uri();
if ($path) { if ($path) {
@ -35,7 +36,7 @@ class Suggestions
$suggestion_modules = $suggestions->modules; $suggestion_modules = $suggestions->modules;
foreach ($suggestion_modules as $key => $module) { foreach ($suggestion_modules as $key => $module) {
$installed = Module::where('company_id', '=', session('company_id'))->where('alias', '=', $module->alias)->first(); $installed = Module::where('company_id', session('company_id'))->where('alias', $module->alias)->first();
if ($installed) { if ($installed) {
unset($suggestion_modules[$key]); unset($suggestion_modules[$key]);
@ -49,6 +50,7 @@ class Suggestions
} }
} }
} }
}
$view->with(['suggestion_modules' => $modules]); $view->with(['suggestion_modules' => $modules]);
} }

View File

@ -152,8 +152,8 @@ return [
'subunit' => 100, 'subunit' => 100,
'symbol' => 'лв', 'symbol' => 'лв',
'symbol_first' => false, 'symbol_first' => false,
'decimal_mark' => '.', 'decimal_mark' => ',',
'thousands_separator' => ',', 'thousands_separator' => ' ',
], ],
'BHD' => [ 'BHD' => [

View File

@ -2,23 +2,22 @@
return [ return [
'forbidden_access' => 'Forbidden Access', 'title' => [
'error_page' => 'Error Page', '403' => 'Oops! Forbidden Access',
'page_not_found' => 'Page Not Found', '404' => 'Oops! Page not found',
'500' => 'Oops! Something went wrong',
'body' => [
'forbidden_access' => 'Oops! Forbidden Access.',
'error_page' => 'Oops! Something went wrong.',
'page_not_found' => 'Oops! Page not found.',
], ],
'messages' => [ 'header' => [
'forbidden_access' => 'You can not access this page. '403' => '403 Forbidden',
Meanwhile, you may <a href=":link">return to dashboard</a>.', '404' => '404 Not Found',
'error_page' => 'We will work on fixing that right away. '500' => '500 Internal Server Error',
Meanwhile, you may <a href=":link">return to dashboard</a>.', ],
'page_not_found' => 'We could not find the page you were looking for.
Meanwhile, you may <a href=":link">return to dashboard</a>.', 'message' => [
'403' => 'You can not access this page.',
'404' => 'We could not find the page you were looking for.',
'500' => 'We will work on fixing that right away.',
], ],
]; ];

View File

@ -1,16 +1,16 @@
@extends('layouts.admin') @extends('layouts.error')
@section('title', trans('errors.forbidden_access')) @section('title', trans('errors.title.403'))
@section('content') @section('content')
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
<h2 class="mb-0 text-warning">403 Forbidden</h2> <h2 class="mb-0 text-danger"><i class="fa fa-exclamation-triangle text-danger"></i>&nbsp;&nbsp;{{ trans('errors.header.403') }}</h2>
</div> </div>
<div class="card-body"> <div class="card-body">
<h3><i class="fa fa-exclamation-triangle text-danger"></i> {{ trans('errors.body.forbidden_access') }}</h3> <p>{{ trans('errors.message.403') }}</p>
<p>{!! trans('errors.messages.forbidden_access', ['link' => url('/') ]) !!}</p> <a href="{{ url('/') }}" class="btn btn-success header-button-top"><span class="fa fa-tachometer-alt"></span> &nbsp;{{ trans('general.go_to', ['name' => trans('general.dashboard')]) }}</a>
</div> </div>
</div> </div>
@endsection @endsection

View File

@ -1,16 +1,16 @@
@extends('layouts.admin') @extends('layouts.error')
@section('title', trans('errors.page_not_found')) @section('title', trans('errors.title.404'))
@section('content') @section('content')
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
<h2 class="mb-0 text-yellow">404 Not Found</h2> <h2 class="mb-0 text-warning"><i class="fa fa-exclamation-triangle text-warning"></i>&nbsp;&nbsp;{{ trans('errors.header.404') }}</h2>
</div> </div>
<div class="card-body"> <div class="card-body">
<h3><i class="fa fa-exclamation-triangle text-yellow"></i> {{ trans('errors.body.page_not_found') }}</h3> <p>{{ trans('errors.message.404') }}</p>
<p>{!! trans('errors.messages.page_not_found', ['link' => url('/')]) !!}</p> <a href="{{ url('/') }}" class="btn btn-success header-button-top"><span class="fa fa-tachometer-alt"></span> &nbsp;{{ trans('general.go_to', ['name' => trans('general.dashboard')]) }}</a>
</div> </div>
</div> </div>
@endsection @endsection

View File

@ -1,16 +1,17 @@
@extends('layouts.admin') @extends('layouts.error')
@section('title', trans('errors.error_page')) @section('title', trans('errors.title.500'))
@section('content') @section('content')
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
<h2 class="mb-0 text-danger">500 Internal Server Error</h2> <h2 class="mb-0 text-danger"><i class="fa fa-exclamation-triangle text-danger"></i>&nbsp;&nbsp;{{ trans('errors.header.500') }}</h2>
</div> </div>
<div class="card-body"> <div class="card-body">
<h3><i class="fa fa-exclamation-triangle text-danger"></i> {{ trans('errors.body.error_page') }}</h3> <p>{{ trans('errors.message.500') }}</p>
<p>{!! trans('errors.messages.error_page', ['link' => url('/') ]) !!}</p> <a href="{{ url('/') }}" class="btn btn-success header-button-top"><span class="fa fa-tachometer-alt"></span> &nbsp;{{ trans('general.go_to', ['name' => trans('general.dashboard')]) }}</a>
</div> </div>
</div> </div>
@endsection @endsection

View File

@ -3,7 +3,6 @@
@include('partials.admin.head') @include('partials.admin.head')
<body class="g-sidenav-show g-sidenav-pinned"> <body class="g-sidenav-show g-sidenav-pinned">
@stack('body_start') @stack('body_start')
@include('partials.admin.menu') @include('partials.admin.menu')
@ -31,7 +30,6 @@
@stack('body_end') @stack('body_end')
@include('partials.admin.scripts') @include('partials.admin.scripts')
</body> </body>
</html> </html>

View File

@ -3,7 +3,6 @@
@include('partials.auth.head') @include('partials.auth.head')
<body class="login-page"> <body class="login-page">
@stack('body_start') @stack('body_start')
<div class="main-content"> <div class="main-content">
@ -65,7 +64,6 @@
@stack('body_end') @stack('body_end')
@include('partials.auth.scripts') @include('partials.auth.scripts')
</body> </body>
</html> </html>

View File

@ -0,0 +1,31 @@
<html lang="{{ app()->getLocale() }}">
@include('partials.admin.head')
<body class="g-sidenav-show g-sidenav-pinned">
@stack('body_start')
<div class="main-content" id="panel">
<div id="main-body">
@include('partials.admin.header')
<div class="container-fluid content-layout mt--6">
@include('partials.admin.content')
@include('partials.admin.footer')
</div>
</div>
</div>
@stack('body_end')
@include('partials.admin.scripts')
</body>
</html>

View File

@ -3,7 +3,6 @@
@include('partials.modules.head') @include('partials.modules.head')
<body class="g-sidenav-show g-sidenav-pinned"> <body class="g-sidenav-show g-sidenav-pinned">
@stack('body_start') @stack('body_start')
@include('partials.admin.menu') @include('partials.admin.menu')
@ -31,7 +30,6 @@
@stack('body_end') @stack('body_end')
@include('partials.admin.scripts') @include('partials.admin.scripts')
</body> </body>
</html> </html>

View File

@ -3,7 +3,6 @@
@include('partials.portal.head') @include('partials.portal.head')
<body class="g-sidenav-show g-sidenav-pinned"> <body class="g-sidenav-show g-sidenav-pinned">
@stack('body_start') @stack('body_start')
@include('partials.portal.menu') @include('partials.portal.menu')
@ -31,7 +30,6 @@
@stack('body_end') @stack('body_end')
@include('partials.portal.scripts') @include('partials.portal.scripts')
</body> </body>
</html> </html>

View File

@ -9,13 +9,11 @@
</style> </style>
<body onload="window.print();"> <body onload="window.print();">
@stack('body_start') @stack('body_start')
@yield('content') @yield('content')
@stack('body_end') @stack('body_end')
</body> </body>
</html> </html>

View File

@ -2,7 +2,6 @@
@include('partials.signed.head') @include('partials.signed.head')
<body> <body>
@stack('body_start') @stack('body_start')
<div class="container-fluid content-layout mt-4"> <div class="container-fluid content-layout mt-4">
@ -14,7 +13,6 @@
</div> </div>
@stack('body_end') @stack('body_end')
</body> </body>
</html> </html>

View File

@ -4,7 +4,6 @@
<body class="wizard-page"> <body class="wizard-page">
<div class="container mt--5"> <div class="container mt--5">
@stack('body_start') @stack('body_start')
<div id="app"> <div id="app">
@ -14,11 +13,9 @@
</div> </div>
@stack('body_end') @stack('body_end')
</div> </div>
@include('partials.wizard.scripts') @include('partials.wizard.scripts')
</body> </body>
</html> </html>

View File

@ -1,5 +1,5 @@
@stack('header_start') @stack('header_start')
<div id="header" class="header pb-6"> <div id="header" class="header pb-6">
<div class="container-fluid content-layout"> <div class="container-fluid content-layout">
<div class="header-body"> <div class="header-body">
<div class="row py-4 align-items-center"> <div class="row py-4 align-items-center">
@ -27,5 +27,5 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@stack('header_end') @stack('header_end')

View File

@ -1,5 +1,5 @@
@stack('menu_start') @stack('menu_start')
<nav class="sidenav navbar navbar-vertical fixed-left navbar-expand-xs navbar-light bg-default" id="sidenav-main"> <nav class="sidenav navbar navbar-vertical fixed-left navbar-expand-xs navbar-light bg-default" id="sidenav-main">
<div class="scrollbar-inner"> <div class="scrollbar-inner">
<div class="sidenav-header d-flex align-items-center ml-4"> <div class="sidenav-header d-flex align-items-center ml-4">
<ul class="navbar-nav"> <ul class="navbar-nav">
@ -42,5 +42,5 @@
</div> </div>
{!! menu('admin') !!} {!! menu('admin') !!}
</div> </div>
</nav> </nav>
@stack('menu_end') @stack('menu_end')

View File

@ -1,8 +1,8 @@
@stack('navbar_start') @stack('navbar_start')
<nav class="navbar navbar-top navbar-expand navbar-dark border-bottom"> <nav class="navbar navbar-top navbar-expand navbar-dark border-bottom">
<div class="container-fluid"> <div class="container-fluid">
<div class="collapse navbar-collapse" id="navbarSupportedContent"> <div class="collapse navbar-collapse" id="navbarSupportedContent">
@if (user()->can('read-common-search')) @permission('read-common-search')
<form class="navbar-search navbar-search-light form-inline mb-0" id="navbar-search-main" autocomplete="off"> <form class="navbar-search navbar-search-light form-inline mb-0" id="navbar-search-main" autocomplete="off">
<div id="global-search" class="form-group mb-0 mr-sm-3"> <div id="global-search" class="form-group mb-0 mr-sm-3">
<div class="input-group input-group-alternative input-group-merge"> <div class="input-group input-group-alternative input-group-merge">
@ -34,7 +34,7 @@
<span aria-hidden="true">×</span> <span aria-hidden="true">×</span>
</button> </button>
</form> </form>
@endif @endpermission
<ul class="navbar-nav align-items-center ml-md-auto"> <ul class="navbar-nav align-items-center ml-md-auto">
<li class="nav-item d-xl-none"> <li class="nav-item d-xl-none">
@ -53,7 +53,7 @@
</a> </a>
</li> </li>
@if (user()->can(['create-incomes-invoices', 'create-incomes-revenues', 'create-incomes-customers', 'create-expenses-bills', 'create-expenses-payments', 'create-expenses-vendors'])) @permission(['create-incomes-invoices', 'create-incomes-revenues', 'create-incomes-customers', 'create-expenses-bills', 'create-expenses-payments', 'create-expenses-vendors'])
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="nav-link" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <a class="nav-link" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-plus"></i> <i class="fas fa-plus"></i>
@ -248,5 +248,5 @@
</ul> </ul>
</div> </div>
</div> </div>
</nav> </nav>
@stack('navbar_end') @stack('navbar_end')

View File

@ -1,5 +1,5 @@
@stack('header_start') @stack('header_start')
<div id="header" class="header pb-6"> <div id="header" class="header pb-6">
<div class="container-fluid content-layout"> <div class="container-fluid content-layout">
<div class="header-body"> <div class="header-body">
<div class="row py-4 align-items-center"> <div class="row py-4 align-items-center">
@ -17,5 +17,5 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@stack('header_end') @stack('header_end')

View File

@ -1,5 +1,5 @@
@stack('menu_start') @stack('menu_start')
<nav class="sidenav navbar navbar-vertical fixed-left navbar-expand-xs navbar-light bg-default" id="sidenav-main"> <nav class="sidenav navbar navbar-vertical fixed-left navbar-expand-xs navbar-light bg-default" id="sidenav-main">
<div class="scrollbar-inner"> <div class="scrollbar-inner">
<div class="sidenav-header d-flex align-items-center ml-4"> <div class="sidenav-header d-flex align-items-center ml-4">
<ul class="navbar-nav"> <ul class="navbar-nav">
@ -24,5 +24,5 @@
</div> </div>
{!! menu('portal') !!} {!! menu('portal') !!}
</div> </div>
</nav> </nav>
@stack('menu_end') @stack('menu_end')