-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsub_task.html
More file actions
94 lines (65 loc) · 3.04 KB
/
Copy pathsub_task.html
File metadata and controls
94 lines (65 loc) · 3.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{% include 'links.html'%}
{%if session['role'] == 'PROJECT MANAGER' %}
{% include 'phome.html' %}
{% endif %}
{%if session['role'] == 'Team Member' %}
{% include 'thome.html' %}
{% endif %}
{%if session['role'] == 'admin' %}
{% include 'ahead.html' %}
{% endif %}
<div class="row-1">
{%if session['role'] == 'PROJECT MANAGER' %}
<div class="coll-4">
<form method="POST" action="/sub_task_action" >
<input type="text" name="task_id" value="{{task_id}}">
<label for="sub_task_title" class="form-label-1">Sub Task Title</label>
<input type="text" class="form-control" id="sub_task_title" name="sub_task_title" required>
<label for="description" class="form-label-1">Description</label>
<textarea class="form-control" id="description" name="description" rows="3" required></textarea>
<input type="hidden" name="assigned_by_member_id" value="{{ session['user_id'] }}">
<input type="hidden" name="assigned_to_member_id" value="{{ assigned_to_member_id }}">
<button type="submit" class="btn-primary mt-3">Create Sub Task</button>
</form>
</div>
{% endif %}
<div class="coll-8">
<div class="project-grid">
{% for sub_task in sub_tasks %}
<div class="project-card">
<div class="card-body">
{% set project_managers=get_project_manager_name_by_project_manager_id(sub_task['assigned_by_member_id']) %}
<h5 class="card-title " style="text-align: center; font-size: 25px;" >{{sub_task['sub_task_title'] }}</h5>
<div class="row p-15" >
<div class="card-section ml-21 ">
<strong>Assigned To:</strong>
{{ get_user_details_by_id(sub_task['assigned_to_member_id'])['name'] }}
</div>
<div class="card-section ml-21" >
<strong>Assigned By:</strong>{{project_managers['first_name']}}
</div>
<div class="card-section ml-21">
<strong>Assigned On:</strong> {{ sub_task.assigned_date.strftime('%Y-%m-%d %H:%M') if sub_task.assigned_date else 'Not Available' }}
</div>
</div>
<p class="card-text">{{ sub_task['description'] }}</p>
<div class="card-section">
<strong>Status:</strong> {{ sub_task['status'] }}
</div>
</div>
</div>
</div>
{% if session['role'] == 'Team Member' %}
{% if sub_task['status'] != 'Completed' %}
{% if sub_task['status'] == 'To Do' %}
<a href="/sub_to_do?sub_task_id={{ sub_task['_id'] }}" class="task-btn">TO DO</a>
{% endif %}
{% if sub_task['status'] == 'Progress' %}
<a href="/sub_complete?sub_task_id={{ sub_task['_id'] }}" class="task-btn complete-btn">Complete</a>
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
</div>
</div>
</div>