App now runs on empty DB.
This commit is contained in:
parent
6f194deac5
commit
eb77d03ea3
|
@ -13,8 +13,3 @@ CREATE TABLE `services` (
|
|||
`odometer_done` INTEGER,
|
||||
`tasks` TEXT NOT NULL
|
||||
);
|
||||
insert into services (date, odometer_planned, odometer_done, tasks) values ( NULL, 500, NULL, 'Initialinspektion,Ölwechsel');
|
||||
insert into services (date, odometer_planned, odometer_done, tasks) values ( NULL, 2500, NULL, 'Ölwechsel');
|
||||
insert into services (date, odometer_planned, odometer_done, tasks) values ( NULL, 5000, NULL, 'Inspektion,Ölwechsel');
|
||||
insert into services (date, odometer_planned, odometer_done, tasks) values ( NULL, 7500, NULL, 'Ölwechsel');
|
||||
insert into services (date, odometer_planned, odometer_done, tasks) values ( NULL, 10000, NULL, 'Inspektion,Ölwechsel');
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{% macro alert_level(km_left) -%}
|
||||
{% if km_left < 0 %}
|
||||
{% if km_left == None %}
|
||||
alert-success
|
||||
{% elif km_left < 0 %}
|
||||
alert-danger
|
||||
{% elif km_left < 300 %}
|
||||
alert-warning
|
||||
|
@ -9,12 +11,14 @@
|
|||
{%- endmacro %}
|
||||
|
||||
{% macro service_warning() -%}
|
||||
{% if data != None and data.service_info != None and 'km_left' in data.service_info %}
|
||||
<div class="alert {{ alert_level(data.service_info['km_left']) }} alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
Service required in {{ data.service_info['km_left'] }} km. Tasks: {{ data.service_info['tasks'] }}.
|
||||
</div>
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro navigation() -%}
|
||||
|
|
Loading…
Reference in New Issue