File size: 12,722 Bytes
bdb271a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>ALISTO</title>
    <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&family=Roboto:wght@400;500&display=swap" rel="stylesheet" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div id="login-modal" class="modal-overlay hidden">
        <div class="modal-content small-modal">
            <div class="modal-header">
                <h2>Responder Login</h2>
                <button id="close-login-btn" class="icon-btn-ghost"><i class="fa-solid fa-xmark"></i></button>
            </div>
            <div class="login-form">
                <input type="text" id="username" placeholder="Username" class="login-input">
                <input type="password" id="password" placeholder="Password" class="login-input">
                <button id="login-submit-btn" class="action-btn resolve-btn full-width">Log In</button>
                <p id="login-error" style="color: #ff4444; margin-top: 10px; font-size: 0.9em;"></p>
            </div>
        </div>
    </div>
    
    <div id="logout-modal" class="modal-overlay hidden">
        <div class="modal-content" style="max-width: 400px; text-align: center;">
            <div class="modal-header" style="justify-content: center; margin-bottom: 10px;">
                <h2 style="color: #ed4801;">Confirm Logout</h2>
            </div>
            <p style="color: #ccc; margin-bottom: 30px;">Are you sure you want to end your session?</p>
            
            <div class="action-buttons" style="justify-content: center; gap: 15px;">
                <button id="cancel-logout-btn" class="action-btn" style="background: #444; padding: 10px 20px;">Cancel</button>
                <button id="confirm-logout-btn" class="action-btn confirm-btn" style="padding: 10px 20px;">Yes, Logout</button>
            </div>
        </div>
    </div>

    <div id="new-alert-notification" class="alert-popup hidden">
        <i class="fa-solid fa-bell"></i> 
        <span id="notification-message">New URGENT Alert Received!</span>
    </div>
    
    <audio id="alert-sound" src="https://assets.mixkit.co/active_storage/sfx/2869/2869-preview.mp3" preload="auto"></audio>

    <div id="stats-modal" class="modal-overlay hidden">
        <div class="modal-content">
            <div class="modal-header">
                <h2>Situation Report</h2>
                <button id="close-stats-btn" class="icon-btn-ghost"><i class="fa-solid fa-xmark"></i></button>
            </div>
            <div class="charts-container">
                <div class="chart-wrapper">
                    <h3>Active Incidents by Type</h3>
                    <canvas id="typeChart"></canvas>
                </div>
                <div class="chart-wrapper">
                    <h3>Urgency Breakdown</h3>
                    <canvas id="urgencyChart"></canvas>
                </div>
            </div>
        </div>
    </div>

    <header class="main-header">
        <div class="logo">
            <span class="logo-main">ALISTO</span> 
            <span class="logo-sub">Alert System</span>
        </div>

        <div class="search-container">
            <i class="fa-solid fa-xmark clear-icon hidden"></i>
            <input type="text" placeholder="Search incidents..." class="search-input">
            <i class="fa-solid fa-magnifying-glass search-icon clickable" data_tooltip="Search"></i>
        </div>
        
        <nav class="main-nav">
            <a href="index.html" class="nav-link active" data_tooltip="Go to Posts">Dashboard</a>
            <a href="map.html" class="nav-link" data_tooltip="Go to Live Map">Live Map</a>
            <a href="#" id="nav-login-btn" class="nav-link" style="color: #ed4801;">Login</a>
            
            <div class="profile-container" id="profile-container-wrap" style="display: none;">
                
                <div id="profile-toggle" class="profile-icon">
                    <i class="fa-solid fa-user"></i> 
                </div>

                <div id="profile-dropdown" class="profile-dropdown hidden">
                    <div class="profile-info-header">
                        <div class="profile-icon-large">
                            <i class="fa-solid fa-user"></i>
                        </div>
                        <div id="dropdown-username" class="dropdown-username">Officer ID</div>
                    </div>
                    
                    <hr class="dropdown-separator">
                    
                    <button id="dropdown-logout-btn" class="dropdown-logout-btn">
                        <i class="fa-solid fa-right-from-bracket"></i> Logout
                    </button>
                </div>
            </div>
        </nav>
    </header>

    <section class="hero">
        
        <div class="sidebar-wrapper">
            <div class="filter-bar">
                
                <button id="show-stats-btn" class="pulse-btn" data_tooltip="View Real-time Alert Statistics" data_tooltip_align="left">
                    <i class="fa-solid fa-chart-pie"></i>
                </button>

                <div class="separator"></div>
                    
                <div class="filter-bar-c">
                    <div class="filter-bar-r">
                        
                        <div class="filter-wrap1" data_tooltip="Sort alerts by Time">
                            <select id="sort-select" class="filter-select">
                                <option value="newest" title="Hi">Newest</option>
                                <option value="oldest">Oldest</option>
                            </select>
                        </div>

                        <div class="filter-wrap2" data_tooltip="Filter by Urgency Level">
                            <select id="urgency-select" class="filter-select">
                                <option value="all">All Levels</option>
                                <option value="High">High</option>
                                <option value="Medium">Medium</option>
                                <option value="Low">Low</option>
                            </select>
                        </div>

                        <div class="filter-wrap3" data_tooltip="Filter alerts by status">
                            <select id="view-select" class="filter-select">
                                <option value="all">All Status</option>
                                <option value="active">Active</option>
                                <!-- <option value="active">Verified</option> -->
                                <option value="archived">Resolved</option>
                            </select>
                        </div>
                    </div>

                    <div class="filter-bar-r">
                        <div class="filter-wrap4" data_tooltip="Filter by Disaster Type">
                            <select id="type-select" class="filter-select">
                                <option value="all">All Disaster Types</option>
                                <option value="Flood">Flood</option>
                                <option value="Typhoon">Typhoon</option>
                                <option value="Earthquake">Earthquake</option>
                                <option value="Fire">Fire</option>
                                <option value="Volcano">Volcano</option>
                                <option value="Landslide">Landslide</option>
                                <option value="General Emergency">General</option>
                            </select>
                        </div>

                        <div class="filter-wrap5" data_tooltip="Filter by Assistance Needed">
                            <select id="assist-select" class="filter-select">
                                <option value="all">All Assistances</option>
                                <option value="Rescue">Rescue</option>
                                <option value="Medical">Medical</option>
                                <option value="Evacuation">Evacuation</option>
                                <option value="Food/Water">Food/Water</option>
                                <option value="General Assistance">General</option>
                            </select>
                        </div>
                    </div>
                </div>
                
                <button id="export-btn" class="icon-btn" data_tooltip="Download Report (CSV)">
                    <i class="fa-solid fa-download"></i>
                </button>

            </div>

            <div class="sidebar" id="incident-feed">
                <p style="color: white; padding: 20px; text-align: center;">Loading alerts...</p>
            </div>

            <div class="active-alert-counter">
                <span style="font-size: 0.9em; color: #ccc;">Active Alerts: </span>
                <span id="dashboard-alert-count" style="font-weight: 700; color: #ffc107;">0</span> 
            </div>
            
        </div>

        <div class="detail-box" id="postInfo">
            <div class="detail-header-r">
                <h2 class="detail-title" id="detail-title">Select an Alert</h2>
                
                <div class="action-buttons">
                    <button id="verify-btn" class="action-btn1 verify-btn" onclick="updateStatus('Verified')" data_tooltip="Mark this alert as Verified (Confirmed)">
                        <i class="fa-solid fa-check"></i> 
                        <span class="btn-text">Verify</span>
                    </button>
                    <button id="resolve-btn" class="action-btn1 resolve-btn" onclick="updateStatus('Resolved')" data_tooltip="Mark this alert as Resolved and dismiss">
                        <i class="fa-solid fa-box-archive"></i> 
                        <span class="btn-text">Resolve</span>
                    </button>
                    <a href="#" id="detail-link" target="_blank" class="detail-redirect" data_tooltip="Go to Reddit Post">
                        <i class="fa-brands fa-reddit-alien"></i> Post
                    </a>
                </div>
            </div>

            <hr class="detail-line">

            <div class="detail-important-r">
                <div class="detail-row1-c"> 
                    <div>
                        <div class="detail-label" style="margin-top: 10px;">Assistance Needed</div>
                        <div id="detail-assistance" style="color: #ed4801; font-weight: bold; text-transform: uppercase;">-</div>
                    </div> 
                    <div> 
                        <div class="detail-label">Location / Address</div>
                        <span id="detail-location" style="color: white;">-</span>
                    </div>
                    
                    <div class="detail-row1-col2-r">
                        <div class="contact-c">
                            <div class="detail-label">Contact Person</div>
                            <span id="detail-contact-name" style="color: white;">-</span>
                        </div>

                        <div class="contact-c">
                            <div class="detail-label">Contact Number</div>
                            <span id="detail-contact-number" style="color: white;">-</span>
                        </div>
                    </div>
                </div>
                
                <div style="text-align: right;"> 
                    <div class="detail-label">Posted</div>
                    <div class="time" id="detail-time">_ mins ago at __:__ __</div>
                    
                    <!-- <div class="detail-label" style="margin-top: 10px;">Assistance Needed</div>
                    <div id="detail-assistance" style="color: #ed4801; font-weight: bold; text-transform: uppercase;">-</div>  -moved above --> 

                    <div class="detail-label" style="margin-top: 10px;">Status</div>
                    <div id="detail-urgency" style="color: white;">-</div>
                    <div id="detail-status" class="status-badge">New</div>
                </div>
            </div>

            <div class="detail-content" id="detail-body">
                Click on an alert from the sidebar to view full details here.
            </div>
        </div>

    </section>

    <script src="script.js"></script>
</body>
</html>