Skip to content

Commit

Permalink
Fixed modals
Browse files Browse the repository at this point in the history
Signed-off-by: Trey <[email protected]>
  • Loading branch information
TreyWW committed Dec 31, 2024
1 parent 65b6a58 commit 5545d58
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
4 changes: 4 additions & 0 deletions backend/modals.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,7 @@ def get(self, request: WebRequest):
context["email_list"] = list(context["email_list"]) + context["selected_clients"]

return self.Response(request, context)


class GenerateReportModal(Modal):
modal_name = "generate_report"
2 changes: 1 addition & 1 deletion frontend/templates/modals/generate_api_key.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% fill "content" %}
<form class="py-4"
id="modal_generate_api_key-form"
hx-post="{% url 'api:settings:api_keys generate' %}"
hx-post="{% url 'core:api:settings:api_keys generate' %}"
hx-swap="none">
{% csrf_token %}
<div class="form-control w-full">
Expand Down
24 changes: 12 additions & 12 deletions frontend/templates/pages/reports/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h2 class="text-xl">Reports</h2>
<div class="divider"></div>
<div class="mb-4">
<button onclick="modal_generate_report.showModal();"
<button onclick="c.showModal();"
class="btn btn-primary mb-4 float-right"
hx-trigger="click once"
hx-swap="beforeend"
Expand Down Expand Up @@ -38,19 +38,19 @@ <h2 class="text-xl">Reports</h2>
hx-target="#table_body"
hx-get="{% url 'api:finance:reports:fetch' %}">
<thead>
<tr>
<th>Name</th>
<th>Start Date</th>
<th>End Date</th>
<th>Profit</th>
<th>Invoices Sent</th>
<th>Payments In</th>
<th>Payments Out</th>
<th>Actions</th>
</tr>
<tr>
<th>Name</th>
<th>Start Date</th>
<th>End Date</th>
<th>Profit</th>
<th>Invoices Sent</th>
<th>Payments In</th>
<th>Payments Out</th>
<th>Actions</th>
</tr>
</thead>
<tbody id="table_body">
{% include 'components/table/skeleton_rows.html' with rows=3 cols=8 %}
{% include 'components/table/skeleton_rows.html' with rows=3 cols=8 %}
</tbody>
</table>
</div>
Expand Down

0 comments on commit 5545d58

Please sign in to comment.