Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve the colors of buttons #382

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading