Skip to content

Commit

Permalink
improve the colors of buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
puppe1990 committed Oct 15, 2024
1 parent d36e84b commit 66a78e2
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
36 changes: 34 additions & 2 deletions app/views/productions/calendar.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<br><br>
<h1 class="mb-4">Productions Calendar</h1>
<h1 class="mb-4"><%= t('productions.calendar') %></h1>

<div class="card">
<div class="card-body">
Expand All @@ -23,7 +23,16 @@
<% end %>
<% end %>
<% else %>
<span class="badge badge-warning">Não Entregue</span>
<span class="badge badge-orange">Não Entregue</span>
<% if production.expected_delivery_date %>
<% if production.expected_delivery_date < Date.today %>
<span class="badge badge-danger">Entrega Atrasada</span>
<% else %>
<span class="badge badge-info">Entrega em Dia</span>
<% end %>
<% else %>
<span class="badge badge-secondary">Sem Data de Entrega</span>
<% end %>
<% end %>
</div>
<% end %>
Expand Down Expand Up @@ -94,4 +103,27 @@
background-color: #17a2b8;
color: white;
}

.badge-secondary {
background-color: #6c757d;
color: white;
}

.badge-orange {
background-color: #fd7e14;
color: white;
}
</style>

<script>
document.addEventListener('DOMContentLoaded', function() {
// Translate calendar navigation buttons
var prevButton = document.querySelector('.calendar-heading a:first-child');
var nextButton = document.querySelector('.calendar-heading a:last-child');
var todayButton = document.querySelector('.calendar-heading .calendar-title');

if (prevButton) prevButton.textContent = '<%= t('productions.previous') %>';
if (nextButton) nextButton.textContent = '<%= t('productions.next') %>';
if (todayButton) todayButton.textContent = '<%= t('productions.today') %>';
});
</script>
3 changes: 3 additions & 0 deletions config/locales/sidebar.pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ pt-BR:
products_in_production_report: "Produtos em Produção"
price_per_piece_report: "Preço por Peça"
calendar: "Calendário de Produções"
previous: "Anterior"
today: "Hoje"
next: "Próximo"
tailors:
one: Costureiro
two: Costureiros
Expand Down

0 comments on commit 66a78e2

Please sign in to comment.