-
Notifications
You must be signed in to change notification settings - Fork 0
/
tracking.html
168 lines (158 loc) · 7.75 KB
/
tracking.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
name="viewport">
<meta content="ie=edge" http-equiv="X-UA-Compatible">
<!-- Gotham Font -->
<link href="https://cdn.jsdelivr.net/npm/gotham-fonts@1.0.3/css/gotham-rounded.min.css" rel="stylesheet">
<!-- Latest compiled and minified CSS -->
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/css/bootstrap.min.css"
integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" rel="stylesheet">
<!-- CSS -->
<link rel="stylesheet" href="style.css">
<!-- Font Awesome icon -->
<script crossorigin="anonymous" src="https://kit.fontawesome.com/f99be2198e.js"></script>
<title>Tracking Safety Reports</title>
</head>
<body>
<main>
<div class="container">
<div class="corp-logo">
<figure>
<img alt="angkasa pura 2 logo" src="./osrs-logo.png">
</figure>
</div>
<div class="information">
<h3>Information Report #HDK762AS</h3>
<div class="row bg-secondary">
<div class="col-xs-6 col-md-2">
<h5>ID</h5>
<p>#451</p>
</div>
<div class="col-xs-6 col-md-3">
<h5>Report Time</h5>
<p>26-02-2024 17:14</p>
</div>
<div class="col-xs-6 col-md-3">
<h5>Event Time</h5>
<p>26-02-2024 12:30</p>
</div>
<div class="col-xs-6 col-md-4">
<h5>Reporter</h5>
<p>benaleo | benaleo@gmail.com</p>
</div>
</div>
<h3>Detail Reports</h3>
<div class="list-reports">
<ul class="timeline">
<li>
<div class="timeline-line">
<div class="warp-bg">
<div class="bg-report"></div>
<h4>Report has been recorded.</h4>
<p>Your report has been registered in our system.</p>
<p><small>28 February 2024 12:30 GMT+7</small></p>
</div>
</div>
</li>
<li>
<div class="timeline-line">
<div class="warp-bg">
<div class="bg-report"></div>
<h4>Report in follow-up process 1</h4>
<p>Incident experienced while in the lobby area of the airport</p>
<p><small>28 February 2024 18:30 GMT+7</small></p>
</div>
</div>
</li>
<li>
<div class="timeline-line">
<div class="warp-bg">
<div class="bg-report"></div>
<h4>Report in follow-up process 2</h4>
<p>The outcome of this incident has been settled with the affected parties.</p>
<p><small>28 February 2024 19:12 GMT+7</small></p>
</div>
</div>
</li>
<li>
<div class="timeline-line">
<div class="warp-bg">
<div class="bg-report"></div>
<h4>Report completed follow-up.</h4>
<p>Report has been finished on follow-up.</p>
<p><small>28 February 2024 21:44 GMT+7</small></p>
</div>
</div>
</li>
</ul>
</div>
<div class="d-flex justify-center" style="gap: 10px">
<button class="btn btn-success" type="submit" onclick="window.location='/detail.html'">See Detail Report</button>
<button class="btn btn-info" id="feedbackBtn" type="reset">Feedback</button>
</div>
</div>
</div>
<div class="feedback-alert d-none">
<div class="notif-alert">
<div class="container">
<form action="">
<label for="rating">Rating</label>
<fieldset class="rating">
<input id="star5" name="rating" type="radio" value="5"/><label class="full" for="star5" title="5 stars"></label>
<input id="star4half" name="rating" type="radio" value="4.5"/><label class="half" for="star4half" title="4.5 stars"></label>
<input id="star4" name="rating" type="radio" value="4"/><label class="full" for="star4" title="4 stars"></label>
<input id="star3half" name="rating" type="radio" value="3.5"/><label class="half" for="star3half" title="3.5 stars"></label>
<input id="star3" name="rating" type="radio" value="3"/><label class="full" for="star3" title="3 stars"></label>
<input id="star2half" name="rating" type="radio" value="2.5"/><label class="half" for="star2half" title="2.5 stars"></label>
<input id="star2" name="rating" type="radio" value="2"/><label class="full" for="star2" title="2 stars"></label>
<input id="star1half" name="rating" type="radio" value="1.5"/><label class="half" for="star1half" title="1.5 stars"></label>
<input id="star1" name="rating" type="radio" value="1"/><label class="full" for="star1" title="1 star"></label>
<input id="starhalf" name="rating" type="radio" value="0.5"/><label class="half" for="starhalf" title="0.5 stars"></label>
</fieldset>
<label for="inputComment">Comment</label>
<textarea class="form-control" id="inputComment" name="comment" rows="3"></textarea>
<div class="d-flex">
<button class="btn btn-success" type="submit">Submit</button>
</div>
</form>
</div>
<button class="btn btn-secondary" id="closeBtn">x</button>
</div>
</div>
</main>
<script>
// to open and close feedback popup
const feedbackAlert = document.getElementById('feedbackBtn');
feedbackAlert.addEventListener('click', () => {
document.querySelector('.feedback-alert').classList.add('show');
})
const closeAlert = document.getElementById('closeBtn');
closeAlert.addEventListener('click', () => {
document.querySelector('.feedback-alert').classList.remove('show');
})
// save user rating on local storage
let savedRating = localStorage.getItem("userRating");
if (savedRating) {
document.querySelector('input[name="rating"][value="' + savedRating + '"]').checked = true;
}
let ratingInputs = document.querySelectorAll('input[name="rating"]');
ratingInputs.forEach(function (input) {
input.addEventListener("change", function () {
localStorage.setItem("userRating", this.value);
});
});
// save comment
const inputComment = document.getElementById('inputComment');
const savedComment = localStorage.getItem("userComment");
if (savedComment) {
inputComment.value = savedComment;
}
inputComment.addEventListener('input', function (){
localStorage.setItem('userComment', this.value);
});
</script>
</body>
</html>