diff --git a/dmapp/dmweb/dm.py b/dmapp/dmweb/dm.py index 5d45580..9ebd4e3 100644 --- a/dmapp/dmweb/dm.py +++ b/dmapp/dmweb/dm.py @@ -116,7 +116,7 @@ def get_period_totals(start, end, task=None): refactor to pass in the timezone and make the variable names clearer """ - task_query = {"task": task} if task else {} + task_query = {"task": {"$in": task.split(",")}} if task else {} queries = { "period": {"date": {"$gt": start, "$lt": end}}, diff --git a/dmapp/dmweb/dmcal.py b/dmapp/dmweb/dmcal.py index 036a113..1397121 100644 --- a/dmapp/dmweb/dmcal.py +++ b/dmapp/dmweb/dmcal.py @@ -130,19 +130,3 @@ def month(month=None, year=None, task=None): cal.setcalyear(useyear) return render_template("calendar.html", content=cal.formatmonth(useyear, usemonth)) - - -@dmbp.route("/week") -@dmbp.route("/week/") -def week(month=None): - usemonth = datetime.today().month - useyear = datetime.today().year - if month: - usemonth = month - - cal = DMHTMLCalendar(calendar.SATURDAY) - - cal.setcalmonth(usemonth) - cal.setcalyear(useyear) - - return render_template("calendar.html", content=cal.formatmonth(useyear, usemonth)) diff --git a/dmapp/dmweb/templates/main.html b/dmapp/dmweb/templates/main.html index 50fae73..b3de627 100644 --- a/dmapp/dmweb/templates/main.html +++ b/dmapp/dmweb/templates/main.html @@ -15,6 +15,10 @@ margin: 0; /* Remove default margin */ } + .grey { + color:grey; + } + table { font-size: 84pt } @@ -33,10 +37,11 @@ {% block content %} {% for row in rows %} - - - - + {% set my_class = 'grey' if row["ws"] not in ['Active', 'Idle'] else '' %} + + + + {% endfor %}
{{ row["ws"] }}{{ row["total"] }}
{{ row["ws"] }}{{ row["total"] }}
{% endblock %}