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,
|
`odometer_done` INTEGER,
|
||||||
`tasks` TEXT NOT NULL
|
`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) -%}
|
{% macro alert_level(km_left) -%}
|
||||||
{% if km_left < 0 %}
|
{% if km_left == None %}
|
||||||
|
alert-success
|
||||||
|
{% elif km_left < 0 %}
|
||||||
alert-danger
|
alert-danger
|
||||||
{% elif km_left < 300 %}
|
{% elif km_left < 300 %}
|
||||||
alert-warning
|
alert-warning
|
||||||
|
@ -9,12 +11,14 @@
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{% macro service_warning() -%}
|
{% 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">
|
<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">
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
Service required in {{ data.service_info['km_left'] }} km. Tasks: {{ data.service_info['tasks'] }}.
|
Service required in {{ data.service_info['km_left'] }} km. Tasks: {{ data.service_info['tasks'] }}.
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{% macro navigation() -%}
|
{% macro navigation() -%}
|
||||||
|
|
Loading…
Reference in New Issue