-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview_feedback.html
More file actions
108 lines (102 loc) · 3.69 KB
/
Copy pathview_feedback.html
File metadata and controls
108 lines (102 loc) · 3.69 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>View Feedback Submissions</title>
<style>
body {
font-family: sans-serif;
margin: 0;
}
header {
background: #007bff;
color: white;
padding: 1rem;
display: flex;
align-items: center;
justify-content: space-between;
}
nav {
background: white;
padding: 0.5rem;
border-radius: 5px;
margin-top: 0.5rem;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
z-index: 1;
}
.dropdown:hover .dropdown-content {
display: block;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
border-bottom: 1px solid #000000;
}
.submission {
background: #f2f2f2;
margin: 1rem;
padding: 1rem;
border-radius: 10px;
}
</style>
</head>
<body>
<header>
<nav>
<div class="dropdown">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b2/Hamburger_icon.svg/640px-Hamburger_icon.svg.png" alt="Menu" style="width: 30px; cursor: pointer;" />
<div class="dropdown-content">
<a href="alerts.html">Alerts</a>
<a href="educational_content.html">Educational Content</a>
<a href="report_damage.html">Report Damage</a>
<a href="provide_feedback.html">Provide Feedback</a>
<a href="view_feedback.html">View User Submitted Feedback</a>
<a href="view_reports.html">View User Submitted Reports</a>
</div>
</div>
</nav>
<h1 style="margin: 0">Feedback Submissions</h1>
</header>
<br>
<br>
<div id="loading" style="display: none; text-align: center;">Loading submissions, please wait...</div>
<div id="submissions">
</div>
<script>
const loadingMessage = document.getElementById('loading');
const submissionsDiv = document.getElementById('submissions');
loadingMessage.style.display = 'block';
submissionsDiv.style.display = 'none';
fetch('https://script.google.com/macros/s/AKfycbyaAleQ7SytywXPy0c8ufdep2w-74rC_YO-hRZEUKwnt42IS4N9nytGsJet1CjZvOsa/exec')
.then(response => response.json())
.then(data => {
loadingMessage.style.display = 'none';
submissionsDiv.style.display = 'block';
data.forEach(submission => {
const submissionDiv = document.createElement('div');
submissionDiv.classList.add('submission');
submissionDiv.innerHTML = `<strong>First Name:</strong> ${submission.firstName}<br>
<strong>Last Name:</strong> ${submission.lastName}<br>
<strong>Description:</strong> ${submission.description}`;
submissionsDiv.appendChild(submissionDiv);
});
})
.catch(error => {
loadingMessage.style.display = 'none';
console.error('Error fetching submissions:', error);
});
</script>
</body>
</html>