-
Notifications
You must be signed in to change notification settings - Fork 0
/
operationperson.html
82 lines (79 loc) · 3.44 KB
/
operationperson.html
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
{% extends 'base.html' %}
{% block title %}
<title>Inventory Managmnet App</title>
{% endblock %}
{% block content %}
<main>
<div class="container-fluid">
<h1 class="mt-4">Dashboard</h1>
<ol class="breadcrumb mb-4">
<li class="breadcrumb-item"><a href="/">Dashboard</a></li>
<li class="breadcrumb-item active">Operations Person</li>
</ol>
<div class="card mb-4">
<div class="card-header">Operations Person</div>
<div class="card-body">
<div class="card mb-4">
<div class="card-header">New Operations Person</div>
<div class="card-body">
<form action="/operationperson/" method="POST" id="operationperson_form">
<label for="operationperson_id" class="col-form-label">Operations Person Name</label>
<input type="text" name="operationperson_id" id="operationperson_id">
<label for="operationperson_phn" class="col-form-label">Phone number</label>
<input type="number" name="operationperson_phn" id="operationperson_phn">
<input id="submitPerson" value="Add Person" class="btn btn-primary">
</form>
</div>
</div>
<div class="card mb-4">
<div class="card-header">
<i class="fas fa-table mr-1"></i>
Table
</div>
<div class="card-body">
<div class="table-responsive">
{% if persons|length < 1 %}
<h4>There are no Operation Person, add one above</h4>
{% else %}
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<thead>
<tr>
<th>Operations Person Name</th>
<th>Phone number</th>
<th>Date</th>
<th>Actions</th>
</tr>
</thead>
<tfoot>
</tfoot>
<tbody>
{% for person in persons %}
<tr>
<td>{{ person.operationperson_id }}</td>
<td>{{ person.operationperson_phn }}</td>
<td>{{ person.date_created.date() }}</td>
<td>
<a href="/delete-person/{{ person.operationperson_id }}" onclick="return confirmDelete();">Delete</a>
<script>
function confirmDelete() {
if (confirm("Are you sure you want to delete this person?")) {
return true;
} else {
return false;
}
}
</script>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
</main>
{% endblock %}