summaryrefslogtreecommitdiff
path: root/app/templates/modules
diff options
context:
space:
mode:
Diffstat (limited to 'app/templates/modules')
-rw-r--r--app/templates/modules/calculator.html8
-rw-r--r--app/templates/modules/catalog.html35
-rw-r--r--app/templates/modules/creator.html8
-rw-r--r--app/templates/modules/customers.html43
-rw-r--r--app/templates/modules/invoices.html44
-rw-r--r--app/templates/modules/logger.html136
-rw-r--r--app/templates/modules/orders.html37
-rw-r--r--app/templates/modules/products.html51
8 files changed, 310 insertions, 52 deletions
diff --git a/app/templates/modules/calculator.html b/app/templates/modules/calculator.html
deleted file mode 100644
index f951a17..0000000
--- a/app/templates/modules/calculator.html
+++ /dev/null
@@ -1,8 +0,0 @@
-{% extends "base.html" %}
-{% block title %}
-Calculator
-{% endblock %}
-
-{% block content %}
-<i>insert module content here.</i>
-{% endblock %}
diff --git a/app/templates/modules/catalog.html b/app/templates/modules/catalog.html
deleted file mode 100644
index 857c654..0000000
--- a/app/templates/modules/catalog.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!-- -*- mode: jinja2; -*- -->
-
-{% extends "base.html" %}
-{% block title %}
- Catalog
-{% endblock %}
-
-{% block content %}
- <i>insert module content here.</i>
-
- <p>
- <a href="{{ url_for('add_product') }}" class="button">Add product to your catalog</a>
- </p>
-
- <table>
- <thead>
- <tr>
- <th>Name</th>
- <th>Price</th>
- <th>Supplier</th>
- <th>Updated</th>
- </tr>
- </thead>
- <tbody>
- {% for product in catalog %}
- <tr>
- <td>{{ product.name }}</td>
- <td>{{ product.price }}</td>
- <td>{{ product.supplier }}</td>
- <td>{{ product.updated }}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
-{% endblock %}
diff --git a/app/templates/modules/creator.html b/app/templates/modules/creator.html
deleted file mode 100644
index 588f428..0000000
--- a/app/templates/modules/creator.html
+++ /dev/null
@@ -1,8 +0,0 @@
-{% extends "base.html" %}
-{% block title %}
-Creator
-{% endblock %}
-
-{% block content %}
-<i>insert module content here.</i>
-{% endblock %}
diff --git a/app/templates/modules/customers.html b/app/templates/modules/customers.html
new file mode 100644
index 0000000..c693097
--- /dev/null
+++ b/app/templates/modules/customers.html
@@ -0,0 +1,43 @@
+{# -*- mode: web; -*- #}
+
+{% extends "base.html" %}
+{% block title %}
+Customers
+{% endblock %}
+
+{% block content %}
+<div id="actions">
+ <a href="{{ url_for('add_item', item='customer') }}" class="button">Add customer</a>
+</div>
+
+<table>
+ <thead>
+ <tr>
+ <th></th>
+ <th>Name</th>
+ <th>City</th>
+ <th>Phone</th>
+ <th>E-mail</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for customer in customers %}
+ <tr>
+ <td><button>edit</button></td>
+ {% if customer.website %}
+ <td><a href="{{ customer.website }}">{{ customer.name }}</a></td>
+ {% else %}
+ <td>{{ customer.name }}</td>
+ {% endif %}
+ <td>{{ customer.city }}</td>
+ <td>{{ customer.phone }}</td>
+ {% if customer.email %}
+ <td><a href="mailto:{{ customer.email }}">{{ customer.email }}</a></td>
+ {% else %}
+ <td></td>
+ {% endif %}
+ </tr>
+ {% endfor %}
+ </tbody>
+</table>
+{% endblock %}
diff --git a/app/templates/modules/invoices.html b/app/templates/modules/invoices.html
new file mode 100644
index 0000000..76fe267
--- /dev/null
+++ b/app/templates/modules/invoices.html
@@ -0,0 +1,44 @@
+{# -*- mode: jinja2; -*- #}
+
+{% extends "base.html" %}
+{% block title %}
+ Products
+{% endblock %}
+
+{% block content %}
+
+ <div id="actions">
+ <a href="{{ url_for('add_invoice') }}" class="button">New invoice</a>
+ </div>
+
+ <i>Track your invoices and create new ones here.</i>
+
+ <table>
+ <thead>
+ <tr>
+ <th colspan=2><i>Actions</i></th>
+ <th>Name</th>
+ <th>Price (net)</th>
+ <th>Price (gross)</th>
+ <th>Updated</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for invoice in invoices %}
+ <tr>
+ <td><button>edit</button></td>
+ <td><button formaction="/">delete</button></td>
+ <td>{{ product.name }}</td>
+ <td>{{ product.price_net }}</td>
+ <td>{{ product.price_gross }}</td>
+ {% if product.date_time_updated %}
+ <td>{{ product.date_time_updated }}</td>
+ {% else %}
+ <td>{{ product.date_time_created }}</td>
+ {% endif %}
+
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+{% endblock %}
diff --git a/app/templates/modules/logger.html b/app/templates/modules/logger.html
index 7ba93b3..f3321e9 100644
--- a/app/templates/modules/logger.html
+++ b/app/templates/modules/logger.html
@@ -1,8 +1,142 @@
+{# -*- mode: web; -*- #}
+
{% extends "base.html" %}
+
{% block title %}
Logger
{% endblock %}
{% block content %}
-<i>insert module content here.</i>
+
+
+<div id="actions">
+ <a href="{{ url_for('add_item', item='log') }}" class="button">Add log</a>
+</div>
+
+<i>Track operating logs.</i>
+
+<p>Most recent target</p>
+<table>
+ <thead>
+ <tr>
+ <th colspan=2><i>Actions</i></th>
+ <th>ID</th>
+ <th>Type</th>
+ <th>Updated</th>
+ <th>NNO3</th>
+ <th>P</th>
+ <th>K</th>
+ <th>Ca</th>
+ <th>Mg</th>
+ <th>S</th>
+ <th>Na</th>
+ <th>Cl</th>
+ <th>Fe</th>
+ <th>Zn</th>
+ <th>B</th>
+ <th>Mn</th>
+ <th>Cu</th>
+ <th>Mo</th>
+ <th>Si</th>
+ <th>NNH4</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <button>edit</button>
+ </td>
+ <td>
+ <form method="post" action="{{ url_for('delete_item', pk=target.primary_key, table='Log' ) }}">
+ <button>delete</button>
+ </form>
+ </td>
+ <td>{{ target.primary_key }}</td>
+ <td>Target</td>
+ <td>{{ target.date_time_updated }}</td>
+ <td>{{ target.nno3 }}</td>
+ <td>{{ target.p }}</td>
+ <td>{{ target.k }}</td>
+ <td>{{ target.ca }}</td>
+ <td>{{ target.mg }}</td>
+ <td>{{ target.s }}</td>
+ <td>{{ target.na }}</td>
+ <td>{{ target.cl }}</td>
+ <td>{{ target.fe }}</td>
+ <td>{{ target.zn }}</td>
+ <td>{{ target.b }}</td>
+ <td>{{ target.mn }}</td>
+ <td>{{ target.cu }}</td>
+ <td>{{ target.mo }}</td>
+ <td>{{ target.si }}</td>
+ <td>{{ target.nnh4 }}</td>
+ </tr>
+ </tbody>
+</table>
+
+<p>Logs</p>
+
+<table>
+ <thead>
+ <tr>
+ <th colspan=2><i>Actions</i></th>
+ <th>ID</th>
+ <th>Type</th>
+ <th>Updated</th>
+ <th>NNO3</th>
+ <th>P</th>
+ <th>K</th>
+ <th>Ca</th>
+ <th>Mg</th>
+ <th>S</th>
+ <th>Na</th>
+ <th>Cl</th>
+ <th>Fe</th>
+ <th>Zn</th>
+ <th>B</th>
+ <th>Mn</th>
+ <th>Cu</th>
+ <th>Mo</th>
+ <th>Si</th>
+ <th>NNH4</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for log in logs %}
+ <tr>
+ <td>
+ <button>edit</button>
+ </td>
+ <td>
+ <form method="post" action="{{ url_for('delete_item', pk=log.primary_key, table='Log' ) }}">
+ <button>delete</button>
+ </form>
+ </td>
+ <td>{{ log.primary_key }}</td>
+ {% if log.target == "True" %}
+ <td>Target</td>
+ {% else %}
+ <td>Log</td>
+ {% endif %}
+ <td>{{ log.date_time_updated }}</td>
+ <td>{{ log.nno3 }}</td>
+ <td>{{ log.p }}</td>
+ <td>{{ log.k }}</td>
+ <td>{{ log.ca }}</td>
+ <td>{{ log.mg }}</td>
+ <td>{{ log.s }}</td>
+ <td>{{ log.na }}</td>
+ <td>{{ log.cl }}</td>
+ <td>{{ log.fe }}</td>
+ <td>{{ log.zn }}</td>
+ <td>{{ log.b }}</td>
+ <td>{{ log.mn }}</td>
+ <td>{{ log.cu }}</td>
+ <td>{{ log.mo }}</td>
+ <td>{{ log.si }}</td>
+ <td>{{ log.nnh4 }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+</table>
{% endblock %}
diff --git a/app/templates/modules/orders.html b/app/templates/modules/orders.html
new file mode 100644
index 0000000..bf94d3d
--- /dev/null
+++ b/app/templates/modules/orders.html
@@ -0,0 +1,37 @@
+{# -*- mode: web; -*- #}
+
+{% extends "base.html" %}
+{% block title %}
+Orders
+{% endblock %}
+
+{% block content %}
+<i>Track your orders and their payment status here.</i>
+
+<p>
+ <a href="{{ url_for('add_item', item='order') }}" class="button">Add order</a>
+</p>
+
+<table>
+ <thead>
+ <tr>
+ <th>ID</th>
+ <th>Date</th>
+ <th>Customer</th>
+ <th>Content</th>
+ <th>Updated</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for order in orders %}
+ <tr>
+ <td>{{ order.id }}</td>
+ <td>{{ order.date }}</td>
+ <td>{{ order.customer }}</td>
+ <td>{{ order.content }}</td>
+ <td>{{ order.updated }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+</table>
+{% endblock %}
diff --git a/app/templates/modules/products.html b/app/templates/modules/products.html
new file mode 100644
index 0000000..97b692a
--- /dev/null
+++ b/app/templates/modules/products.html
@@ -0,0 +1,51 @@
+{# -*- mode: web; -*- #}
+
+{% extends "base.html" %}
+{% block title %}
+Products
+{% endblock %}
+
+{% block content %}
+
+
+<div id="actions">
+ <a href="{{ url_for('add_item', item='product') }}" class="button">Add product</a>
+</div>
+
+<i>Track products you sell here.</i>
+
+<table>
+ <thead>
+ <tr>
+ <th colspan=2><i>Actions</i></th>
+ <th>Name</th>
+ <th>Price (net)</th>
+ <th>Price (gross)</th>
+ <th>Updated</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for product in products %}
+ <tr>
+ <td>
+ <button>edit</button>
+ </td>
+ <td>
+ <form method="post" action="{{ url_for('delete_item', pk=product.primary_key, table='Product' ) }}">
+ <button>delete</button>
+ </form>
+ </td>
+ <td>{{ product.name }}</td>
+ <td>{{ product.price_net }}</td>
+ <td>{{ product.price_gross }}</td>
+ {% if product.date_time_updated %}
+ <td>{{ product.date_time_updated }}</td>
+ {% else %}
+ <td>{{ product.date_time_created }}</td>
+ {% endif %}
+
+ </tr>
+ {% endfor %}
+ </tbody>
+</table>
+{% endblock %}
Copyright 2019--2024 Marius PETER