Removed references to repeated expenses.

This commit is contained in:
James Cole 2015-03-27 18:15:10 +01:00
parent 6870d13b72
commit b17f8ac311
7 changed files with 0 additions and 320 deletions

View File

@ -256,40 +256,6 @@ Breadcrumbs::register(
} }
); );
// repeated expenses
Breadcrumbs::register(
'repeated.index', function (Generator $breadcrumbs) {
$breadcrumbs->parent('home');
$breadcrumbs->push('Repeated expenses', route('repeated.index'));
}
);
Breadcrumbs::register(
'repeated.create', function (Generator $breadcrumbs) {
$breadcrumbs->parent('repeated.index');
$breadcrumbs->push('Create new repeated expense', route('repeated.create'));
}
);
Breadcrumbs::register(
'repeated.edit', function (Generator $breadcrumbs, PiggyBank $piggyBank) {
$breadcrumbs->parent('repeated.show', $piggyBank);
$breadcrumbs->push('Edit ' . e($piggyBank->name), route('repeated.edit', $piggyBank->id));
}
);
Breadcrumbs::register(
'repeated.delete', function (Generator $breadcrumbs, PiggyBank $piggyBank) {
$breadcrumbs->parent('repeated.show', $piggyBank);
$breadcrumbs->push('Delete ' . e($piggyBank->name), route('repeated.delete', $piggyBank->id));
}
);
Breadcrumbs::register(
'repeated.show', function (Generator $breadcrumbs, PiggyBank $piggyBank) {
$breadcrumbs->parent('repeated.index');
$breadcrumbs->push(e($piggyBank->name), route('repeated.show', $piggyBank->id));
}
);
// reports // reports
Breadcrumbs::register( Breadcrumbs::register(

View File

@ -161,9 +161,6 @@
<li> <li>
<a @if($isBill)class="active"@endif href="{{route('bills.index')}}"><i class="fa fa-calendar-o fa-fw"></i> Bills</a> <a @if($isBill)class="active"@endif href="{{route('bills.index')}}"><i class="fa fa-calendar-o fa-fw"></i> Bills</a>
</li> </li>
<li>
<a @if($isRep)class="active"@endif href="{{route('repeated.index')}}"><i class="fa fa-rotate-left fa-fw"></i> Repeated expenses</a>
</li>
</ul> </ul>
<!-- /.nav-second-level --> <!-- /.nav-second-level -->
</li> </li>

View File

@ -1,58 +0,0 @@
@extends('layouts.default')
@section('content')
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName()) !!}
{!! Form::open(['class' => 'form-horizontal','id' => 'store','url' => route('repeated.store')]) !!}
<input type="hidden" name="repeats" value="1" />
<div class="row">
<div class="col-lg-6 col-md-12 col-sm-6">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-fw fa-exclamation"></i> Mandatory fields
</div>
<div class="panel-body">
{!! ExpandedForm::text('name') !!}
{!! ExpandedForm::select('account_id',$accounts,null,['label' => 'Save on account']) !!}
{!! ExpandedForm::amount('targetamount') !!}
{!! ExpandedForm::date('targetdate',null,['label' => 'First target date']) !!}
{!! ExpandedForm::select('rep_length',$periods,'month',['label' => 'Repeats every']) !!}
{!! ExpandedForm::integer('rep_every',0,['label' => 'Skip period']) !!}
{!! ExpandedForm::integer('rep_times',0,['label' => 'Repeat times']) !!}
</div>
</div>
<p>
<button type="submit" class="btn btn-lg btn-success">
<i class="fa fa-plus-circle"></i> Store new repeated expense
</button>
</p>
</div>
<div class="col-lg-6 col-md-12 col-sm-12">
<!-- panel for optional fields -->
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-smile-o"></i> Optional fields
</div>
<div class="panel-body">
{!! ExpandedForm::checkbox('remind_me','1',false,['label' => 'Remind me']) !!}
{!! ExpandedForm::select('reminder',$periods,'month',['label' => 'Remind every']) !!}
</div>
</div>
<!-- panel for options -->
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bolt"></i> Options
</div>
<div class="panel-body">
{!! ExpandedForm::optionsList('create','repeated expense') !!}
</div>
</div>
</div>
</div>
{!! Form::close() !!}
@stop

View File

@ -1,37 +0,0 @@
@extends('layouts.default')
@section('content')
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $repeatedExpense) !!}
{!! Form::open(['class' => 'form-horizontal','id' => 'destroy','url' => route('repeated.destroy',$repeatedExpense->id)]) !!}
<div class="row">
<div class="col-lg-6 col-md-12 col-sm-12">
<div class="panel panel-red">
<div class="panel-heading">
Delete repeated expense "{{{$repeatedExpense->name}}}"
</div>
<div class="panel-body">
<p>
Are you sure?
</p>
<p>
<button type="submit" class="btn btn-default btn-danger">Delete permanently</button>
<a href="{{URL::previous()}}" class="btn-default btn">Cancel</a >
</p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<div class="col-sm-8">
</div>
</div>
</div>
</div>
{!! Form::close() !!}
@stop

View File

@ -1,58 +0,0 @@
@extends('layouts.default')
@section('content')
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $repeatedExpense) !!}
{!! Form::model($repeatedExpense, ['class' => 'form-horizontal','id' => 'update','url' => route('repeated.update',$repeatedExpense->id)]) !!}
<input type="hidden" name="id" value="{{$repeatedExpense->id}}" />
<input type="hidden" name="repeats" value="0" />
<div class="row">
<div class="col-lg-6 col-md-12 col-sm-6">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-fw fa-exclamation"></i> Mandatory fields
</div>
<div class="panel-body">
{!! ExpandedForm::text('name') !!}
{!! ExpandedForm::select('account_id',$accounts,null,['label' => 'Save on account']) !!}
{!! ExpandedForm::amount('targetamount') !!}
{!! ExpandedForm::date('targetdate',null,['label' => 'First target date']) !!}
{!! ExpandedForm::select('rep_length',$periods,null,['label' => 'Repeats every']) !!}
{!! ExpandedForm::integer('rep_every',null,['label' => 'Skip period']) !!}
{!! ExpandedForm::integer('rep_times',null,['label' => 'Repeat times']) !!}
</div>
</div>
<p>
<button type="submit" class="btn btn-lg btn-success">
<i class="fa fa-pencil"></i> Update repeated expense
</button>
</p>
</div>
<div class="col-lg-6 col-md-12 col-sm-12">
<!-- panel for optional fields -->
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-smile-o"></i> Optional fields
</div>
<div class="panel-body">
{!! ExpandedForm::checkbox('remind_me','1',$preFilled['remind_me'],['label' => 'Remind me']) !!}
{!! ExpandedForm::select('reminder',$periods,$preFilled['reminder'],['label' => 'Remind every']) !!}
</div>
</div>
<!-- panel for options -->
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bolt"></i> Options
</div>
<div class="panel-body">
{!! ExpandedForm::optionsList('update','piggy bank') !!}
</div>
</div>
</div>
</div>
{!! Form::close() !!}
@stop

View File

@ -1,69 +0,0 @@
@extends('layouts.default')
@section('content')
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName()) !!}
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<p>
<a class="btn btn-success" href="{{route('repeated.create')}}">Create new repeated expense</a>
</p>
</div>
</div>
@foreach($expenses as $entry)
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">
<a href="{{route('repeated.show',$entry->id)}}" title="{{{$entry->name}}}">{{{$entry->name}}}</a>
({!! Amount::format($entry->targetamount) !!})
<!-- ACTIONS MENU -->
<div class="pull-right">
<div class="btn-group">
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
Actions
<span class="caret"></span>
</button>
<ul class="dropdown-menu pull-right" role="menu">
<li><a href="{{route('repeated.edit',$entry->id)}}"><i class="fa fa-pencil fa-fw"></i> Edit</a></li>
<li><a href="{{route('repeated.delete',$entry->id)}}"><i class="fa fa-trash fa-fw"></i> Delete</a></li>
</ul>
</div>
</div>
</div>
<div class="panel-body">
<div class="progress progress-striped">
<div class="progress-bar" role="progressbar" aria-valuenow="{{Steam::percentage($entry,$entry->currentRep)}}" aria-valuemin="0" aria-valuemax="100" style="width: {{Steam::percentage($entry,$entry->currentRep)}}%; min-width:15px;">
@if(Steam::percentage($entry,$entry->currentRep) > 30)
{{Amount::format($entry->currentRep->currentamount,false)}}
@endif
</div>
@if(Steam::percentage($entry,$entry->currentRep) <= 30)
&nbsp;<small>{{Amount::format($entry->currentRep->currentamount,false)}}</small>
@endif
</div>
</div>
<div class="panel-footer">
<small>{{$entry->currentRep->startdate->format('j F Y')}} to {{$entry->currentRep->targetdate->format('j F Y')}}</small>
</div>
</div>
</div>
</div>
@endforeach
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<p>
<a class="btn btn-success" href="{{route('repeated.create')}}">Create new repeated expense</a>
</p>
</div>
</div>
@stop
@section('scripts')
@stop

View File

@ -1,61 +0,0 @@
@extends('layouts.default')
@section('content')
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $repeatedExpense) !!}
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
@foreach($repetitions as $rep)
<?php
$barSize = floor(12 / $rep->bars->count()) == 0 ? 1 : floor(12 / $rep->bars->count());
?>
<div class="panel
@if($today > $rep->startdate && $today < $rep->targetdate)
panel-primary
@else
panel-default
@endif
">
<div class="panel-heading">
Repetition from {{$rep->startdate->format('j F Y')}} to {{$rep->targetdate->format('j F Y')}}
</div>
<div class="panel-body">
<p>
Target amount: {!! Amount::format($repeatedExpense->targetamount) !!}. Currently saved: {!! Amount::format($rep->currentamount) !!}.
</p>
<div class="row">
@foreach($rep->bars as $bar)
<div class="col-lg-{{$barSize}} col-md-{{$barSize}} col-sm-{{$barSize}}">
<div class="progress">
<!-- currentAmount:{{$bar->getCurrentAmount()}} getAmount:{{$bar->getCumulativeAmount()}} -->
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="{{$bar->percentage()}}" aria-valuemin="0" aria-valuemax="100" style="width: {{$bar->percentage()}}%;">
@if($bar->percentage() > 50 && $bar->percentage() == 100)
@if($bar->hasReminder() && $bar->getReminder()->active == 1)
<a href="{{route('reminders.show',$bar->getReminder()->id)}}" style="color:#fff;"><i class="fa fa-fw fa-clock-o"></i></a>
@endif
@if($bar->hasReminder() && $bar->getReminder()->active == 0 && $bar->getReminder()->notnow == 0)
<i class="fa fa-fw fa-thumbs-up"></i>
@endif
@if($bar->hasReminder() && $bar->getReminder()->active == 0 && $bar->getReminder()->notnow == 1)
<i class="fa fa-fw fa-thumbs-down"></i>
@endif
@endif
@if($bar->percentage() > 50 && $bar->percentage() < 100)
{{Amount::format($rep->currentamount,false)}}
@endif
</div>
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="{{100-$bar->percentage()}}" aria-valuemin="0" aria-valuemax="100" style="width: {{100-$bar->percentage()}}%;"></div>
</div>
<p class="small">
{{$bar->getStartDate()->format('j F Y')}} &mdash; {{$bar->getTargetDate()->format('j F Y')}}
</p>
</div>
@endforeach
</div>
</div>
</div>
@endforeach
</div>
</div>
@stop