expenses prevision page start with example

This commit is contained in:
Baptiste Lemoine 2018-08-23 12:18:02 +02:00
parent 5acff1b274
commit e371483c59
No known key found for this signature in database
GPG Key ID: 3A3B8ADA21ADF899
9 changed files with 372 additions and 356 deletions

0
.gitmodules vendored Normal file → Executable file
View File

26
app/Resources/views/logged/previsionnel.html.twig Normal file → Executable file
View File

@ -1,6 +1,8 @@
{% extends 'base.html.twig' %}
{% trans_default_domain 'FOSUserBundle' %}
{% block body %}
{% verbatim %}
<div id="wrapper">
<div class="previsionnel"
ng-app="caisse"
@ -18,9 +20,12 @@
Dépenses mensuelles: {{ sumMonthlyExpenses }}
</div>
<div class="postes">
<h2>Postes de dépenses</h2>
<h2>Postes de dépenses
<button ng-click="addExpense()">+</button>
</h2>
<p class="desc">
Indiquez les catégories de dépenses mensuelles que vous faites pour faire évoluer la simulation de budget restant dans plusieurs mois.
Indiquez les catégories de dépenses mensuelles que vous faites pour faire évoluer la
simulation de budget restant dans plusieurs mois.
</p>
<table class="exepnse-table">
<thead>
@ -49,23 +54,24 @@
<tbody>
</tbody>
<tr ng-repeat="e in pCtrl.expenses">
<tr ng-repeat="e in expenses">
<td>
{{ e.name }}
<input type="text" ng-model="e.name">
</td>
<td>
{{ e.delay }}débute dans X mois
<input type="text" ng-model="e.delay">
</td>
<td>
{{ e.repeat }}
<input type="text" ng-model="e.repeat">
</td>
<td>
<td class="text-right padded">
{{ e.repeat * e.amount }}
</td>
<td>
{{ e.amount }}
<input type="text" ng-model="e.amount">
</td>
<td>
<td class="text-right padded">
{{ e.amount * 12 }}
</td>
</tr>
@ -103,6 +109,7 @@
<div class="col-6 col-xs-12 col-sm-6">
<h2>Simulation sur 5 ans (60 mois)</h2>
{{previsionTable.length}} lignes
<table>
<thead>
<tr>
@ -143,4 +150,5 @@
</div>
</div>
</div>
{% endverbatim %}
{% endblock %}

View File

@ -227,12 +227,12 @@ angular
let exampleExpenses = [
{name: "appart", amount: 600},
{name: "assurance voiture", amount: 50},
{name: "internet", amount: 20},
{name: "elec", amount: 100},
{name: "transports", amount: 70},
{name: "chat", amount: 20},
{name: "appart", amount: 600, delay: 0, repeat: 60},
{name: "assurance voiture", amount: 50, delay: 0, repeat: 60},
{name: "internet", amount: 20, delay: 0, repeat: 60},
{name: "elec", amount: 100, delay: 0, repeat: 60},
{name: "transports", amount: 70, delay: 0, repeat: 60},
{name: "chat", amount: 20, delay: 0, repeat: 60},
];
/**
* expenses kind of the user
@ -285,4 +285,12 @@ angular
console.log('save-my-expenses', rep);
})
};
$scope.addExpense = () => {
$scope.expenses.push({
name: "",
repeat: 0,
delay: 0,
amount: 0,
})
}
}]);

0
crowdin.yml Normal file → Executable file
View File

0
src/AppBundle/Entity/ExpenseKind.php Normal file → Executable file
View File

0
src/AppBundle/Entity/SerieFestival.php Normal file → Executable file
View File

0
src/AppBundle/Repository/ExpenseKindRepository.php Normal file → Executable file
View File

0
translations/de Normal file → Executable file
View File

0
translations/en Normal file → Executable file
View File