Merge branch 'master' of github.com:akaunting/akaunting
This commit is contained in:
commit
87e209b3f3
@ -22,6 +22,7 @@ class Widgets
|
|||||||
'App\Widgets\AccountBalance',
|
'App\Widgets\AccountBalance',
|
||||||
'App\Widgets\LatestIncome',
|
'App\Widgets\LatestIncome',
|
||||||
'App\Widgets\LatestExpenses',
|
'App\Widgets\LatestExpenses',
|
||||||
|
'App\Widgets\Currencies',
|
||||||
];
|
];
|
||||||
|
|
||||||
Module::enabled()->each(function ($module) use (&$list) {
|
Module::enabled()->each(function ($module) use (&$list) {
|
||||||
|
21
app/Widgets/Currencies.php
Normal file
21
app/Widgets/Currencies.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Widgets;
|
||||||
|
|
||||||
|
use App\Abstracts\Widget;
|
||||||
|
use App\Models\Setting\Currency;
|
||||||
|
|
||||||
|
class Currencies extends Widget
|
||||||
|
{
|
||||||
|
public $default_name = 'widgets.currencies';
|
||||||
|
|
||||||
|
public function show()
|
||||||
|
{
|
||||||
|
$currencies = Currency::enabled()->take(5)->get();
|
||||||
|
|
||||||
|
return $this->view('widgets.currencies', [
|
||||||
|
'currencies' => $currencies,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -84,6 +84,7 @@ class Permissions extends Seeder
|
|||||||
'widgets-total-expenses' => 'r',
|
'widgets-total-expenses' => 'r',
|
||||||
'widgets-total-income' => 'r',
|
'widgets-total-income' => 'r',
|
||||||
'widgets-total-profit' => 'r',
|
'widgets-total-profit' => 'r',
|
||||||
|
'widgets-currencies' => 'r',
|
||||||
],
|
],
|
||||||
'manager' => [
|
'manager' => [
|
||||||
'admin-panel' => 'r',
|
'admin-panel' => 'r',
|
||||||
@ -134,6 +135,7 @@ class Permissions extends Seeder
|
|||||||
'widgets-total-expenses' => 'r',
|
'widgets-total-expenses' => 'r',
|
||||||
'widgets-total-income' => 'r',
|
'widgets-total-income' => 'r',
|
||||||
'widgets-total-profit' => 'r',
|
'widgets-total-profit' => 'r',
|
||||||
|
'widgets-currencies' => 'r',
|
||||||
],
|
],
|
||||||
'customer' => [
|
'customer' => [
|
||||||
'client-portal' => 'r',
|
'client-portal' => 'r',
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
|
'currencies' => 'Currencies',
|
||||||
'total_income' => 'Total Income',
|
'total_income' => 'Total Income',
|
||||||
'receivables' => 'Receivables',
|
'receivables' => 'Receivables',
|
||||||
'open_invoices' => 'Open Invoices',
|
'open_invoices' => 'Open Invoices',
|
||||||
|
24
resources/views/widgets/currencies.blade.php
Normal file
24
resources/views/widgets/currencies.blade.php
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<div id="widget-{{ $class->model->id }}" class="{{ $class->model->settings->width }}">
|
||||||
|
<div class="card">
|
||||||
|
@include($class->views['header'], ['header_class' => 'border-bottom-0'])
|
||||||
|
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table align-items-center table-flush">
|
||||||
|
<thead class="thead-light">
|
||||||
|
<tr class="row table-head-line">
|
||||||
|
<th class="col-xs-6 col-md-6 text-left">{{ trans('general.name') }}</th>
|
||||||
|
<th class="col-xs-6 col-md-6 text-right">{{ trans('currencies.rate') }}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="thead-light">
|
||||||
|
@foreach($currencies as $item)
|
||||||
|
<tr class="row border-top-1 tr-py">
|
||||||
|
<td class="col-xs-6 col-md-6 text-left long-texts">{{ $item->name }}</td>
|
||||||
|
<td class="col-xs-6 col-md-6 text-right">{{ $item->rate }}</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
Loading…
x
Reference in New Issue
Block a user