Skip to content
Open
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
10 changes: 9 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,12 @@ repos:
rev: 25.1.0
hooks:
- id: black
language_version: python3.12
- repo: local
hooks:
- id: run-tests
name: Run Django Tests
entry: poetry run python manage.py test
language: system
pass_filenames: false
always_run: true
stages: [pre-push]
25 changes: 14 additions & 11 deletions thebook/base/templates/base/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
<!-- Topbar -->
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
<!-- Sidebar Toggle (Topbar) -->
<button id="sidebarToggleTop"
class="btn btn-link d-md-none rounded-circle mr-3">
<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
<i class="fa fa-bars"></i>
</button>
<!-- Topbar Navbar -->
Expand All @@ -13,19 +12,23 @@
</div>
<!-- Nav Item - User Information -->
<li class="nav-item dropdown no-arrow">
<a class="nav-link dropdown-toggle"
href="#"
id="userDropdown"
role="button"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false">
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<span class="mr-2 d-none d-lg-inline text-gray-600 small">
{{ request.user.display_name }}
</span>
<img class="img-profile rounded-circle"
src="{% static 'img/undraw_profile_1.svg' %}" />
<img class="img-profile rounded-circle" src="{% static 'img/undraw_profile_1.svg' %}" />
</a>
<!-- Dropdown - User Information -->
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown">
<form method="post" action="{% url 'logout' %}">
{% csrf_token %}
<button class="dropdown-item" type="submit">
<i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
Logout
</button>
</form>
</div>
</li>
</ul>
</nav>
Expand Down
13 changes: 6 additions & 7 deletions thebook/base/templates/base/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,18 @@
</a>
</li>

<li class="nav-item active">
<a class="nav-link" href="{% url 'bookkeeping:report-cash-book' %}">
<i class="fas fa-fw fa-book-open"></i>
<span>{% translate "Cash Book" %}</span>
</a>
</li>

<li class="nav-item active">
<a class="nav-link" href="{% url 'members:members-list' %}">
<i class="fas fa-fw fa-people-arrows"></i>
<span>{% translate "Members" %}</span>
</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="{% url 'fornecedores:listar' %}">
<i class="fas fa-fw fa-truck-loading"></i>
<span>Fornecedores</span>
</a>
</li>
<!-- Sidebar Toggler (Sidebar) -->
<div class="text-center d-none d-md-inline">
<button class="rounded-circle border-0" id="sidebarToggle">
Expand Down
40 changes: 40 additions & 0 deletions thebook/base/templates/registration/logged_out.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{% extends "base/base.html" %}

{% load i18n static %}

{% block content_wrapper %}
<div class="container">
<div class="row justify-content-center">
<div class="col-xl-10 col-lg-12 col-md-9">
<div class="card o-hidden border-0 shadow-lg my-5">
<div class="card-body p-0">
<div class="row">
<div class="col-lg-6 d-none d-lg-block bg-login-image">
<center>
<img src="{% static 'img/login-image.png' %}" />
</center>
</div>
<div class="col-lg-6">
<div class="p-5">
<div class="text-center">
<h1 class="h4 text-gray-900 mb-4">{% translate "Logged Out" %}</h1>
<p class="mb-4">
{% translate "You have successfully logged out." %}
</p>
<p class="mb-4">
{% translate "Thank you for using The Book!" %}
</p>
</div>

<a href="{% url 'login' %}" class="btn btn-primary btn-user btn-block">
{% translate "Login Again" %}
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock content_wrapper %}
4 changes: 4 additions & 0 deletions thebook/bookkeeping/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class CategoryAdmin(admin.ModelAdmin): ...
@admin.register(CategoryMatchRule)
class CategoryMatchRuleAdmin(admin.ModelAdmin):
list_display = [
"priority",
"pattern",
"category",
]
Expand Down Expand Up @@ -84,16 +85,19 @@ class TransactionAdmin(admin.ModelAdmin):
"amount",
"category",
"bank_account",
"fornecedor",
"tag_list",
]
list_filter = [
"bank_account",
"category",
"date",
"fornecedor",
]
list_select_related = [
"bank_account",
"category",
"fornecedor",
]
inlines = [
DocumentInline,
Expand Down
Loading