mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Some small updates to piggy banks.
This commit is contained in:
parent
87fbf9c1a5
commit
40892ccfa7
@ -288,18 +288,21 @@ Breadcrumbs::register(
|
||||
$breadcrumbs->push($date->format('Y'), route('reports.year', $date->format('Y')));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'reports.budgets', function (Generator $breadcrumbs, Carbon $date) {
|
||||
'reports.month', function (Generator $breadcrumbs, Carbon $date) {
|
||||
$breadcrumbs->parent('reports.index');
|
||||
$breadcrumbs->push('Budgets in ' . $date->format('F Y'), route('reports.budgets', $date->format('Y')));
|
||||
$breadcrumbs->push('Monthly report for ' . $date->format('F Y'), route('reports.month', $date));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'reports.unbalanced', function (Generator $breadcrumbs, Carbon $date) {
|
||||
'reports.budget', function (Generator $breadcrumbs, Carbon $date) {
|
||||
$breadcrumbs->parent('reports.index');
|
||||
$breadcrumbs->push('Unbalanced transactions in ' . $date->format('F Y'), route('reports.unbalanced', $date->format('Y')));
|
||||
$breadcrumbs->push('Budget report for ' . $date->format('F Y'), route('reports.budget', $date));
|
||||
}
|
||||
);
|
||||
|
||||
// search
|
||||
Breadcrumbs::register(
|
||||
'search', function (Generator $breadcrumbs, $query) {
|
||||
|
@ -52,7 +52,7 @@ class ReportController extends BaseController
|
||||
$accounts = $this->_repository->getAccountListBudgetOverview($date);
|
||||
$budgets = $this->_repository->getBudgetsForMonth($date);
|
||||
|
||||
return View::make('reports.budget', compact('accounts', 'budgets', 'dayEarly'));
|
||||
return View::make('reports.budget', compact('date', 'accounts', 'budgets', 'dayEarly'));
|
||||
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ class ReportController extends BaseController
|
||||
|
||||
return View::make(
|
||||
'reports.month',
|
||||
compact('accounts', 'categories', 'budgets', 'expenses', 'subTitle', 'displaySum', 'subTitleIcon', 'income')
|
||||
compact('date', 'accounts', 'categories', 'budgets', 'expenses', 'subTitle', 'displaySum', 'subTitleIcon', 'income')
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -206,7 +206,7 @@ class PiggyBank implements CUD, CommonDatabaseCalls, PiggyBankInterface
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
return $this->getUser()->piggyBanks()->where('repeats', 0)->get();
|
||||
return $this->getUser()->piggyBanks()->where('repeats', 0)->orderBy('name')->get();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,19 +1,37 @@
|
||||
@extends('layouts.default')
|
||||
@section('content')
|
||||
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName()) }}
|
||||
<div class="row">
|
||||
@foreach($piggyBanks as $piggyBank)
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-fw fa-rocket"></i> <a href="{{route('piggy_banks.show',$piggyBank->id)}}" title="{{{$piggyBank->name}}}">{{{$piggyBank->name}}}</a>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-2 col-md-3 col-sm-4">
|
||||
<!-- One block -->
|
||||
<div class="col-lg-1 col-md-4 col-sm-4 col-xs-4">
|
||||
<div class="btn-group btn-group-xs">
|
||||
@if($piggyBank->leftToSave > 0)
|
||||
<a href="#" class="btn btn-default addMoney" data-id="{{{$piggyBank->id}}}"><span data-id="{{{$piggyBank->id}}}" class="glyphicon glyphicon-plus"></span></a>
|
||||
@endif
|
||||
<a href="#" class="btn btn-default removeMoney" data-id="{{{$piggyBank->id}}}"><span data-id="{{{$piggyBank->id}}}" class="glyphicon glyphicon-minus"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- One block -->
|
||||
<div class="col-lg-1 col-md-4 col-sm-4 col-xs-4">
|
||||
<div class="btn-group btn-group-xs">
|
||||
<a href="{{route('piggy_banks.edit',$piggyBank->id)}}" class="btn btn-default"><span class="glyphicon glyphicon-pencil"></span></a>
|
||||
<a href="{{route('piggy_banks.delete',$piggyBank->id)}}" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- One block -->
|
||||
<div class="col-lg-1 col-md-4 col-sm-4 col-xs-4">
|
||||
{{mf($piggyBank->savedSoFar,true)}}
|
||||
</div>
|
||||
<div class="col-lg-8 col-md-6 col-sm-4">
|
||||
<!-- One block -->
|
||||
<div class="col-lg-7 col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="progress progress-striped">
|
||||
<div
|
||||
@if($piggyBank->percentage == 100)
|
||||
@ -26,26 +44,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-3 col-sm-4">
|
||||
<!-- One block -->
|
||||
<div class="col-lg-1 col-md-6 col-sm-6 col-xs-6">
|
||||
{{mf($piggyBank->targetamount,true)}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-2 col-md-3 col-sm-4">
|
||||
<div class="btn-group btn-group-xs">
|
||||
@if($piggyBank->leftToSave > 0)
|
||||
<a href="#" class="btn btn-default addMoney" data-id="{{{$piggyBank->id}}}"><span data-id="{{{$piggyBank->id}}}" class="glyphicon glyphicon-plus"></span></a>
|
||||
@endif
|
||||
<a href="#" class="btn btn-default removeMoney" data-id="{{{$piggyBank->id}}}"><span data-id="{{{$piggyBank->id}}}" class="glyphicon glyphicon-minus"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-8 col-md-6 col-sm-4">
|
||||
<div class="btn-group btn-group-xs">
|
||||
<a href="{{route('piggy_banks.edit',$piggyBank->id)}}" class="btn btn-default"><span class="glyphicon glyphicon-pencil"></span></a>
|
||||
<a href="{{route('piggy_banks.delete',$piggyBank->id)}}" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-3 col-sm-4">
|
||||
<!-- One block -->
|
||||
<div class="col-lg-1 col-md-6 col-sm-6 col-xs-6">
|
||||
@if($piggyBank->leftToSave > 0)
|
||||
{{mf($piggyBank->leftToSave)}}
|
||||
@endif
|
||||
@ -54,7 +58,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
|
@ -1,6 +1,6 @@
|
||||
@extends('layouts.default')
|
||||
@section('content')
|
||||
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName()) }}
|
||||
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $date) }}
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
<table class="table table-bordered table-striped">
|
||||
|
@ -1,6 +1,6 @@
|
||||
@extends('layouts.default')
|
||||
@section('content')
|
||||
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName()) }}
|
||||
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $date) }}
|
||||
<div class="row">
|
||||
<div class="col-lg-5 col-md-5 col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
|
Loading…
Reference in New Issue
Block a user