diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9a102e9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.pyc +env/ diff --git a/run_site.py b/run_site.py new file mode 100644 index 0000000..82d87ef --- /dev/null +++ b/run_site.py @@ -0,0 +1,11 @@ +from flask import Flask + +app = Flask(__name__) + +@app.route('/') +def index(): + return "HEllo" + +@app.route('/test') +def test(): + return render_template('test.html') diff --git a/templates/add_department.html b/templates/add_department.html new file mode 100644 index 0000000..e1e8235 --- /dev/null +++ b/templates/add_department.html @@ -0,0 +1,17 @@ +{% extends "layout.html" %} +{% block body %} + +

Add Department(s)

+ +
+
+ + +
+
+ + +
+ +
+{% endblock %} \ No newline at end of file diff --git a/templates/add_employee.html b/templates/add_employee.html new file mode 100644 index 0000000..e24b4c4 --- /dev/null +++ b/templates/add_employee.html @@ -0,0 +1,26 @@ +{% extends "layout.html" %} +{% block body %} + +

Add Employee

+ +
+
+ + +
+
+ + +
+
+ + + +
+ +
+{% endblock %} \ No newline at end of file diff --git a/templates/add_time.html b/templates/add_time.html new file mode 100644 index 0000000..8e661f6 --- /dev/null +++ b/templates/add_time.html @@ -0,0 +1,46 @@ +{% extends "layout.html" %} +{% block body %} + +

Add Time

+{% with messages = get_flashed_messages() %} + {% if messages %} + + {% endif %} +{% endwith %} +
+ + + + + + + + + + + + + + + + +
EmployeeStart DateStart TimeEnd DateEnd Time
+ +
+
+ + + + + + + +{% endblock %} diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..5fda4f4 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,19 @@ + + + + + + + <Test + + + {% block content %}{% endblock %} + {% block body %}{% endblock %} + + + + diff --git a/templates/departments.html b/templates/departments.html new file mode 100644 index 0000000..f1d3013 --- /dev/null +++ b/templates/departments.html @@ -0,0 +1,48 @@ +{% extends "layout.html" %} +{% block body %} + +

Department(s)

+{% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} + + {% endif %} +{% endwith %} +{% if departments %} +

Add

+
+
+ + +
+
+ + +
+ +
+ +

View

+ + + + + + + {% for department in departments %} + + + + + + + {% endfor %} +
Department NameDepartment CodeNumber of Employees
{{ department.name }}{{ department.code }}Delete
+{% else %} +There is no data in department land! +{% endif %} + +{% endblock %} \ No newline at end of file diff --git a/templates/employee_index.html b/templates/employee_index.html new file mode 100644 index 0000000..b7d8daf --- /dev/null +++ b/templates/employee_index.html @@ -0,0 +1,61 @@ +{% extends "layout.html" %} +{% block body %} + +

Employees

+
+ + +

Add Employee

+
+
+ + +
+
+ + +
+
+ + +
+ +
+ + +
+{% if employees %} + + + + + + + + + {%for employee in employees %} + + + + + + + + + + {% endfor %} +
First NameLast NameDepartmentProject(s)Time Logged
{{employee.first_name}}{{employee.last_name}}{{employee.department}}{{employee.projects}}Edit / Delete
+{% endif %} + +{% endblock %} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..cd70a57 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,38 @@ +{% extends "layout.html" %} +{% block body %} + +

Timesheet

+

Bugs

+ +

To-do

+ + +{% endblock %} \ No newline at end of file diff --git a/templates/layout.html b/templates/layout.html new file mode 100644 index 0000000..de36a8b --- /dev/null +++ b/templates/layout.html @@ -0,0 +1,80 @@ + + + + + + + + Timesheet + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + {% block body %}{% endblock %} + + {% block footer %} {% endblock %} +
+ + + diff --git a/templates/project_index.html b/templates/project_index.html new file mode 100644 index 0000000..5d62554 --- /dev/null +++ b/templates/project_index.html @@ -0,0 +1,47 @@ +{% extends "layout.html" %} +{% block body %} + +

Add Project(s)

+{% with messages = get_flashed_messages() %} + {% if messages %} + + {% endif %} +{% endwith %} +
+
+ + +
+
+ + +
+ +
+ +{% if projects %} +

View

+ + + + + + + {% for project in projects %} + + + + + + + {% endfor %} +
Project NameProject IDNumber of Employees
{{ project.project_name }}{{ project.project_id }}Delete
+{% else %} +There is no data in project land! +{% endif %} + +{% endblock %} \ No newline at end of file diff --git a/templates/test.html b/templates/test.html new file mode 100644 index 0000000..89dcb3a --- /dev/null +++ b/templates/test.html @@ -0,0 +1 @@ +YOU SUCK1 diff --git a/templates/time_view.html b/templates/time_view.html new file mode 100644 index 0000000..04956b9 --- /dev/null +++ b/templates/time_view.html @@ -0,0 +1,66 @@ +{% extends "layout.html" %} +{% block body %} + +

Time Entries

+Filter: +
+ + + +
+ Start: {{ dates[0] }}
+ End: {{ dates[1] }} +
+{% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} + + {% endif %} +{% endwith %} +{% if time_entries %} + + + + + + + + + + + {% for time in time_entries %} + + + + + + + + + + {% endfor %} + + + + + + + + + + +
IDNameStart DateStart TimeEnd DateEnd TimeTotal
{{ time.employee_id }} + {% for employee in employees %} + {% if employee.id == time.employee_id %} + {{employee.first_name}} {{employee.last_name}} + {% endif %} + {% endfor %} + {{ time.date_start }}{{ time.start }}{{ time.date_end }}{{ time.end }}{{ time.total }}
Total{{ total[0] }}:{{ total[1] }}:00
+{% else %} +There is no data in time entry land! +{% endif %} + +{% endblock %} \ No newline at end of file