Skip to content

Commit

Permalink
more performance
Browse files Browse the repository at this point in the history
  • Loading branch information
alexseif committed Jul 20, 2023
1 parent defeb60 commit 3953674
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 55 deletions.
55 changes: 0 additions & 55 deletions app/Resources/views/bottom-bar-details.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,6 @@
d="M21.1 18.3c.8.8.8 2 0 2.8-.4.4-.9.6-1.4.6s-1-.2-1.4-.6L12 14.8l-6.3 6.3c-.4.4-.9.6-1.4.6s-1-.2-1.4-.6a2 2 0 0 1 0-2.8L9.2 12 2.9 5.7a2 2 0 0 1 0-2.8 2 2 0 0 1 2.8 0L12 9.2l6.3-6.3a2 2 0 0 1 2.8 0c.8.8.8 2 0 2.8L14.8 12l6.3 6.3z"></path></svg>
</span>
<ul class="nav" {{ 1 == app.request.cookies.get('bottom-bar-closed') ? 'style="display:none;"' }}>
<li class="dropdown">
<a class="btn btn-secondary btn-sm dropdown-toggle" href="#" role="button"
id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
Progress
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
<div class="d-md-block d-sm-none progress-bars">
{% set progressBar = bb.getProgress() %}
{% set costOfLife = progressBar['costOfLife'] %}
{% set earned = progressBar['earned'] %}
{% set issuedThisMonth = progressBar['issuedThisMonth'] %}
{% for key, progress in progressBar['earned'] %}
{% if 'monthly' == key %}
{% include 'dashboard/progressBars.html.twig' with {'total': attribute(costOfLife, key), 'progress': progress, 'issued': issuedThisMonth} %}
{% else %}
{% include 'dashboard/progressBars.html.twig' with {'total': attribute(costOfLife, key), 'progress': progress} %}
{% endif %}
{% endfor %}
</div>
</div>
</li>
<li class="dropdown">
{% set contracts = bb.getContractsProgress() %}
<a class="btn btn-secondary btn-sm dropdown-toggle" href="#" role="button"
Expand Down Expand Up @@ -65,39 +43,6 @@
{% endfor %}
</div>
</li>
<li class="dropdown">
{% set tasks = bb.getTasks() %}
<a class="btn btn-secondary btn-sm dropdown-toggle" href="#" role="button"
id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
Tasks
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
{% for task in tasks %}
<a class="dropdown-item"
href="{{ path('focus') }}#task_{{ task.id }}">
{{ task.task }}
<span class="badge badge-info float-right">{{ task.taskList }}</span>
</a>
{% endfor %}
</div>
</li>
<li class="dropdown">
{% set objectives = bb.getObjectives() %}
<a class="btn btn-secondary btn-sm dropdown-toggle" href="#" role="button"
id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
Objectives
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
{% for objective in objectives %}
<a class="dropdown-item"
href="{{ path('objective_show', {'id': objective.id}) }}">
{{ objective.name }}
</a>
{% endfor %}
</div>
</li>
<li>
<a class="btn btn-success btn-sm">{{ WhatTodoNow.whatTodoNow().name }}</a>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@
d="M21.1 18.3c.8.8.8 2 0 2.8-.4.4-.9.6-1.4.6s-1-.2-1.4-.6L12 14.8l-6.3 6.3c-.4.4-.9.6-1.4.6s-1-.2-1.4-.6a2 2 0 0 1 0-2.8L9.2 12 2.9 5.7a2 2 0 0 1 0-2.8 2 2 0 0 1 2.8 0L12 9.2l6.3-6.3a2 2 0 0 1 2.8 0c.8.8.8 2 0 2.8L14.8 12l6.3 6.3z"></path></svg>
</span>
<ul class="nav" {{ 1 == app.request.cookies.get('bottom-bar-closed') ? 'style="display:none;"' }}>
<li class="dropdown">
<a class="btn btn-secondary btn-sm dropdown-toggle" href="#" role="button"
id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
Progress
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
<div class="d-md-block d-sm-none progress-bars">
{% set progressBar = bb.getProgress() %}
{% set costOfLife = progressBar['costOfLife'] %}
{% set earned = progressBar['earned'] %}
{% set issuedThisMonth = progressBar['issuedThisMonth'] %}
{% for key, progress in progressBar['earned'] %}
{% if 'monthly' == key %}
{% include 'dashboard/progressBars.html.twig' with {'total': attribute(costOfLife, key), 'progress': progress, 'issued': issuedThisMonth} %}
{% else %}
{% include 'dashboard/progressBars.html.twig' with {'total': attribute(costOfLife, key), 'progress': progress} %}
{% endif %}
{% endfor %}
</div>
</div>
</li>
<li class="dropdown">
{% set contracts = bb.getContractsProgress() %}
<a class="btn btn-secondary btn-sm dropdown-toggle" href="#" role="button"
Expand Down Expand Up @@ -43,6 +65,39 @@
{% endfor %}
</div>
</li>
<li class="dropdown">
{% set tasks = bb.getTasks() %}
<a class="btn btn-secondary btn-sm dropdown-toggle" href="#" role="button"
id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
Tasks
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
{% for task in tasks %}
<a class="dropdown-item"
href="{{ path('focus') }}#task_{{ task.id }}">
{{ task.task }}
<span class="badge badge-info float-right">{{ task.taskList }}</span>
</a>
{% endfor %}
</div>
</li>
<li class="dropdown">
{% set objectives = bb.getObjectives() %}
<a class="btn btn-secondary btn-sm dropdown-toggle" href="#" role="button"
id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
Objectives
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
{% for objective in objectives %}
<a class="dropdown-item"
href="{{ path('objective_show', {'id': objective.id}) }}">
{{ objective.name }}
</a>
{% endfor %}
</div>
</li>
<li>
<a class="btn btn-success btn-sm">{{ WhatTodoNow.whatTodoNow().name }}</a>
</li>
Expand Down

0 comments on commit 3953674

Please sign in to comment.