diff --git a/app/Providers/ConfigServiceProvider.php b/app/Providers/ConfigServiceProvider.php index c7ebe0e489..cc915d0f6f 100644 --- a/app/Providers/ConfigServiceProvider.php +++ b/app/Providers/ConfigServiceProvider.php @@ -166,7 +166,7 @@ class ConfigServiceProvider extends ServiceProvider 'Config', 'ExpandedForm' => [ 'is_safe' => [ - 'date', 'text', 'select', 'balance', 'optionsList', 'checkbox', 'amount' + 'date', 'text', 'select', 'balance', 'optionsList', 'checkbox', 'amount', 'tags', 'integer' ] ], 'Form' => [ diff --git a/resources/twig/bills/create.twig b/resources/twig/bills/create.twig new file mode 100644 index 0000000000..f7719b3214 --- /dev/null +++ b/resources/twig/bills/create.twig @@ -0,0 +1,69 @@ +{% extends "./layout/default.twig" %} +{% block content %} + {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, piggyBank) }} + {{ Form.open({'class' : 'form-horizontal','id' : 'store','url' : route('bills.store')}) }} + +
+
+ +
+
+ Mandatory fields +
+
+ {{ ExpandedForm.text('name') }} + {{ ExpandedForm.tags('match') }} + {{ ExpandedForm.amount('amount_min') }} + {{ ExpandedForm.amount('amount_max') }} + {{ ExpandedForm.date('date',phpdate('Y-m-d')) }} + {{ ExpandedForm.select('repeat_freq',periods,'monthly') }} +
+
+ +
+
+ +
+
+ Optional fields +
+
+ {{ ExpandedForm.integer('skip',0) }} + {{ ExpandedForm.checkbox('automatch',1,true) }} + {{ ExpandedForm.checkbox('active',1,true) }} +
+
+ + +
+
+ Options +
+
+ {{ ExpandedForm.optionsList('create','bill') }} +
+
+ +
+ +
+
+
+

+ +

+
+
+ + + +{% endblock %} + +{% block styles %} + +{% endblock %} +{% block scripts %} + +{% endblock %} diff --git a/resources/twig/bills/delete.twig b/resources/twig/bills/delete.twig new file mode 100644 index 0000000000..f58fd3db68 --- /dev/null +++ b/resources/twig/bills/delete.twig @@ -0,0 +1,32 @@ +{% extends "./layout/default.twig" %} +{% block content %} + {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, bill) }} + {{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('bills.destroy',bill.id)}) }} +
+
+
+
+ Delete bill "{{ bill.name }}" +
+
+

+ Are you sure that you want to delete bill "{{ bill.name }}"? +

+ + {% if bill.transactionjournals|length > 0 %} +

+ Bill "{{ bill.name }}" still has {{ bill.transactionjournals|length }} transactions connected + to it. These will not be removed but will lose their connection to this bill. +

+ {% endif %} + +

+ + Cancel +

+
+
+
+
+ +{% endblock %} \ No newline at end of file diff --git a/resources/twig/bills/edit.twig b/resources/twig/bills/edit.twig new file mode 100644 index 0000000000..5fd7e02a0e --- /dev/null +++ b/resources/twig/bills/edit.twig @@ -0,0 +1,66 @@ +{% extends "./layout/default.twig" %} +{% block content %} + {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, bill) }} + {{ Form.model(bill, {'class' : 'form-horizontal','id' : 'update','url' : route('bills.update', bill.id)}) }} + + + +
+
+
+
+ Mandatory fields +
+
+ {{ ExpandedForm.text('name') }} + {{ ExpandedForm.tags('match') }} + {{ ExpandedForm.amount('amount_min') }} + {{ ExpandedForm.amount('amount_max') }} + {{ ExpandedForm.date('date',bill.date.format('Y-m-d')) }} + {{ ExpandedForm.select('repeat_freq',periods) }} +
+
+ + +
+
+
+
+ Optional fields +
+
+ {{ ExpandedForm.integer('skip') }} + {{ ExpandedForm.checkbox('automatch',1) }} + {{ ExpandedForm.checkbox('active',1) }} + +
+
+
+
+ Options +
+
+ {{ ExpandedForm.optionsList('update','bill') }} +
+ +
+
+
+
+
+

+ +

+
+
+ + +{% endblock %} +{% block styles %} + +{% endblock %} +{% block scripts %} + +{% endblock %} diff --git a/resources/twig/bills/index.twig b/resources/twig/bills/index.twig new file mode 100644 index 0000000000..ef488037a5 --- /dev/null +++ b/resources/twig/bills/index.twig @@ -0,0 +1,27 @@ +{% extends "./layout/default.twig" %} +{% block content %} + {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, piggyBank) }} +
+
+
+
+ {{ title }} + + +
+
+ + +
+
+
+ {% include 'list/bills.twig' %} +
+
+
+{% endblock %} \ No newline at end of file diff --git a/resources/twig/bills/show.twig b/resources/twig/bills/show.twig new file mode 100644 index 0000000000..e6297668a7 --- /dev/null +++ b/resources/twig/bills/show.twig @@ -0,0 +1,113 @@ +{% extends "./layout/default.twig" %} +{% block content %} + {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, bill) }} +
+
+
+
+ {{ bill.name }} + + {% if bill.active %} + + {% else %} + + {% endif %} + + {% if bill.automatch %} + + {% else %} + + {% endif %} + +
+
+ + +
+
+ +
+
+ + + + + + + + + +
+ Matching on + {% for word in bill.match|split(',') %} + {{ word }} + {% endfor %} + between {{ bill.amount_min|formatAmount }} and {{ bill.amount_max|formatAmount }}. + Repeats {{ bill.repeat_freq }}.
Next expected match + {% if bill.nextExpectedMatch %} + {{bill.nextExpectedMatch.format('j F Y')}} + {% else %} + Unknown + {% endif %} +
+
+
+
+
+
+
+ More +
+ +
+
+
+ +
+
+
+
+ Chart +
+
+
+
+
+
+
+ +
+
+
+
+ Connected transaction journals +
+
+ {% include 'list/journals' %} +
+
+
+
+ +{% endblock %} + +{% block scripts %} + + + + + + +{% endblock %} \ No newline at end of file diff --git a/resources/twig/form/integer.twig b/resources/twig/form/integer.twig new file mode 100644 index 0000000000..527a5b2fea --- /dev/null +++ b/resources/twig/form/integer.twig @@ -0,0 +1,9 @@ +
+ +
+
+ {{ Form.input('number', name, value, options) }} + {% include 'form/feedback.twig' %} +
+
+
diff --git a/resources/twig/form/tags.twig b/resources/twig/form/tags.twig new file mode 100644 index 0000000000..9160512040 --- /dev/null +++ b/resources/twig/form/tags.twig @@ -0,0 +1,7 @@ +
+ +
+ {{ Form.input('text', name, value, options) }} + {% include 'form/feedback.twig' %} +
+
diff --git a/resources/twig/list/bills.twig b/resources/twig/list/bills.twig new file mode 100644 index 0000000000..2432efaf88 --- /dev/null +++ b/resources/twig/list/bills.twig @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + {% for entry in bills %} + + + + + + + + + + + + + + + {% endfor %} +
 NameMatches onMatching amountLast seen matchNext expected matchIs activeWill be automatchedRepeats every 
+
+ + +
+
+ {{ entry.name }} + + {% for match in entry.match|split(',') %} + {{ match }} + {% endfor %} + + {{ entry.amount_min|formatAmount }} + + {{ entry.amount_max|formatAmount }} + + {% if entry.lastFoundMatch %} + {{entry.lastFoundMatch.format('j F Y')}} + {% else %} + Unknown + {% endif %} + + {% if entry.nextExpectedMatch%} + {{entry.nextExpectedMatch.format('j F Y')}} + {% else %} + Unknown + {% endif %} + + {% if entry.active %} + + {% else %} + + {% endif %} + + {% if entry.automatch %} + + {% else %} + + {% endif %} + + {{ entry.repeat_freq }} + {% if entry.skip > 0 %} + skips over {{entry.skip}} + {% endif %} + + {% if entry.active %} + + {% endif %} +