mirror of
https://github.com/gwenhael-le-moine/credger.git
synced 2024-12-26 09:58:36 +01:00
dual account selection
This commit is contained in:
parent
c41bbb85aa
commit
08861e44bc
1 changed files with 26 additions and 9 deletions
|
@ -4,6 +4,7 @@ app.component('dashboard',
|
||||||
function($filter, API) {
|
function($filter, API) {
|
||||||
let ctrl = this;
|
let ctrl = this;
|
||||||
ctrl.granularity = "monthly";
|
ctrl.granularity = "monthly";
|
||||||
|
ctrl.account_selection = "depth";
|
||||||
|
|
||||||
let is_monthly = () => { return ctrl.granularity == "monthly"; };
|
let is_monthly = () => { return ctrl.granularity == "monthly"; };
|
||||||
|
|
||||||
|
@ -167,18 +168,34 @@ ${prepare_series(e.series).map((s) => { return format_line(s); }).join("")}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
template: `
|
template: `
|
||||||
<div class="dashboard">
|
<div class="dashboard">
|
||||||
<div class="global-graph" style="height: 450px;">
|
<div class="global-graph" style="height: 450px;">
|
||||||
<div class="accounts" style="width: 20%; height: 100%; float: left;">
|
<div class="accounts" style="width: 20%; height: 100%; float: left;">
|
||||||
<label><input type="radio" ng:model="$ctrl.granularity" value="monthly" name="monthly" ng:change="$ctrl.compute_selected_accounts()" />monthly</label>
|
<div style="width: 100%; float: left;">
|
||||||
<label><input type="radio" ng:model="$ctrl.granularity" value="yearly" name="yearly" ng:change="$ctrl.compute_selected_accounts()" />yearly</label>
|
<label><input type="radio" ng:model="$ctrl.account_selection" value="depth" name="depth"/>depth</label>
|
||||||
<ul>
|
<label><input type="radio" ng:model="$ctrl.account_selection" value="list" name="list"/>list</label>
|
||||||
<li ng:repeat="account in $ctrl.main_accounts_depths">
|
</div>
|
||||||
<label>{{account.name}} depth</label>
|
<div style="width: 100%; height: 90%; float: left;">
|
||||||
<rzslider rz-slider-options="{floor: 0, ceil: account.max_depth, onEnd: $ctrl.compute_selected_accounts}" rz-slider:model="account.depth"></rzslider>
|
<ul ng:if="$ctrl.account_selection == 'depth'">
|
||||||
</li>
|
<li ng:repeat="account in $ctrl.main_accounts_depths">
|
||||||
</ul>
|
<label>{{account.name}} depth</label>
|
||||||
|
<rzslider rz-slider-options="{floor: 0, ceil: account.max_depth, onEnd: $ctrl.compute_selected_accounts}" rz-slider:model="account.depth"></rzslider>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<select style="height: 100%; width: 100%;" multiple
|
||||||
|
ng:model="$ctrl.graphed_accounts"
|
||||||
|
ng:change="$ctrl.retrieve_graph_values($ctrl.graphed_accounts)"
|
||||||
|
ng:if="$ctrl.account_selection == 'list'">
|
||||||
|
<option ng:repeat="account in $ctrl.accounts">{{account}}</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="width: 100%; float: left;">
|
||||||
|
<label><input type="radio" ng:model="$ctrl.granularity" value="monthly" name="monthly" ng:change="$ctrl.compute_selected_accounts()" />monthly</label>
|
||||||
|
<label><input type="radio" ng:model="$ctrl.granularity" value="yearly" name="yearly" ng:change="$ctrl.compute_selected_accounts()" />yearly</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="graph" style="width: 80%; float: left;">
|
<div class="graph" style="width: 80%; float: left;">
|
||||||
|
|
Loading…
Reference in a new issue