Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
library-app-django
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ilham Maulana
library-app-django
Commits
fb91150f
Commit
fb91150f
authored
Jul 02, 2024
by
impfundev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: layout reports using card
parent
2038f57b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
79 additions
and
70 deletions
+79
-70
index.html
dashboards/templates/dashboard/index.html
+5
-11
login_history.html
dashboards/templates/dashboard/login_history.html
+21
-17
near_overdue_loan.html
dashboards/templates/dashboard/near_overdue_loan.html
+24
-19
overdue_loan.html
dashboards/templates/dashboard/overdue_loan.html
+21
-17
summary.html
dashboards/templates/dashboard/summary.html
+8
-6
No files found.
dashboards/templates/dashboard/index.html
View file @
fb91150f
{% extends "layout.html" %} {% block dashboard %}
<div
style=
"max-width: 80vw"
class=
"w-100 p-4"
>
<div
style=
"max-width: 80vw"
class=
"w-100 p-4
d-flex flex-column gap-4
"
>
<h1
class=
"h2"
>
Reports
</h1>
<div
class=
"row container pt-5"
>
{% include "dashboard/summary.html" %}
</div>
<div
class=
"row container pt-5"
>
{% include "dashboard/overdue_loan.html" %}
</div>
<div
class=
"row container pt-5"
>
{% include "dashboard/near_overdue_loan.html" %}
</div>
<div
class=
"row container pt-5"
>
{% include "dashboard/login_history.html" %}
</div>
<div
class=
"row card"
>
{% include "dashboard/summary.html" %}
</div>
<div
class=
"row card"
>
{% include "dashboard/overdue_loan.html" %}
</div>
<div
class=
"row card"
>
{% include "dashboard/near_overdue_loan.html" %}
</div>
<div
class=
"row card"
>
{% include "dashboard/login_history.html" %}
</div>
</div>
{% endblock dashboard %}
dashboards/templates/dashboard/login_history.html
View file @
fb91150f
<table
class=
"table"
>
<legend
class=
"h3"
>
Librarian Login History
</legend>
<thead>
<tr>
<th
scope=
"col"
>
Name
</th>
<th
scope=
"col"
>
Login At
</th>
</tr>
</thead>
<tbody>
{% for histori in login_histories %}
<tr>
<td>
{{ histori.librarian.name }}
</td>
<td>
{{ histori.login_at }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div
class=
"card-header"
>
<h2
class=
"h4"
>
Librarian Login History
</h2>
</div>
<div
class=
"card-body"
>
<table
class=
"table table-striped"
>
<thead>
<tr
class=
"table-primary"
>
<th
scope=
"col"
>
Name
</th>
<th
scope=
"col"
>
Login At
</th>
</tr>
</thead>
<tbody>
{% for histori in login_histories %}
<tr>
<td>
{{ histori.librarian.name }}
</td>
<td>
{{ histori.login_at }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
dashboards/templates/dashboard/near_overdue_loan.html
View file @
fb91150f
<table
class=
"table"
>
<legend
class=
"h3"
>
Near Overdue Book Loan
</legend>
<thead>
<tr>
<th
scope=
"col"
>
Book Title
</th>
<th
scope=
"col"
>
Due Date
</th>
<th
scope=
"col"
>
Loan Date
</th>
</tr>
</thead>
<tbody>
{% for loan in near_overdue_loans %}
<tr>
<td>
{{ loan.book.title }}
</td>
<td>
{{ loan.due_date }}
</td>
<td>
{{ loan.loan_date }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div
class=
"card-header"
>
<h2
class=
"h4"
>
Near Overdue Book Loan
</h2>
</div>
<div
class=
"card-body"
>
<table
class=
"table table-striped"
>
<legend
class=
"h3"
></legend>
<thead>
<tr
class=
"table-primary"
>
<th
scope=
"col"
>
Book Title
</th>
<th
scope=
"col"
>
Due Date
</th>
<th
scope=
"col"
>
Loan Date
</th>
</tr>
</thead>
<tbody>
{% for loan in near_overdue_loans %}
<tr>
<td>
{{ loan.book.title }}
</td>
<td>
{{ loan.due_date }}
</td>
<td>
{{ loan.loan_date }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
dashboards/templates/dashboard/overdue_loan.html
View file @
fb91150f
<table
class=
"table"
>
<legend
class=
"h3"
>
Overdue Book Loan
</legend>
<thead>
<tr>
<th
scope=
"col"
>
Book Title
</th>
<th
scope=
"col"
>
Due Date
</th>
</tr>
</thead>
<tbody>
{% for loan in overdue_loans %}
<tr>
<td>
{{ loan.book.title }}
</td>
<td>
{{ loan.due_date }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div
class=
"card-header"
>
<h2
class=
"h4"
>
Overdue Book Loan
</h2>
</div>
<div
class=
"card-body"
>
<table
class=
"table table-striped"
>
<thead>
<tr
class=
"table-primary"
>
<th
scope=
"col"
>
Book Title
</th>
<th
scope=
"col"
>
Due Date
</th>
</tr>
</thead>
<tbody>
{% for loan in overdue_loans %}
<tr>
<td>
{{ loan.book.title }}
</td>
<td>
{{ loan.due_date }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
dashboards/templates/dashboard/summary.html
View file @
fb91150f
<h3
class=
"h3"
>
At a Glance
</h3>
<div
class=
"row container text-center"
>
<div
class=
"card-header"
>
<h3
class=
"h4"
>
At a Glance
</h3>
</div>
<div
class=
"card-body row container text-center"
>
<div
class=
"col"
>
<div
class=
"card h-100 d-flex flex-column"
>
<div
class=
"card-body"
>
<div
class=
"card-body
row align-content-center
"
>
<h5
class=
"card-title"
><i
class=
"bi bi-book-half"
></i>
Total Book
</h5>
<p
class=
"h1"
>
{{ total_book }}
</p>
</div>
...
...
@@ -15,7 +17,7 @@
</div>
<div
class=
"col"
>
<div
class=
"card h-100"
>
<div
class=
"card-body"
>
<div
class=
"card-body
row align-content-center
"
>
<h5
class=
"card-title"
>
<i
class=
"bi bi-person-vcard"
></i>
Total Member
</h5>
...
...
@@ -30,11 +32,11 @@
</div>
<div
class=
"col"
>
<div
class=
"card h-100"
>
<div
class=
"card-body"
>
<div
class=
"card-body
row align-content-center
"
>
<h5
class=
"card-title"
>
<i
class=
"bi bi-calendar-week"
></i>
Book Loan
</h5>
<div
class=
"d-flex justify-content-center"
>
<div
class=
"d-flex justify-content-center
gap-2
"
>
<div
class=
"card"
>
<div
class=
"card-header"
>
Total
</div>
<p
class=
"h1"
>
{{ total_book_loans }}
</p>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment