-
Notifications
You must be signed in to change notification settings - Fork 0
/
createnewinspection.html
270 lines (228 loc) · 9.28 KB
/
createnewinspection.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
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
261
262
263
264
265
266
267
268
269
270
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>createnewinspection</title>
<link
href="https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,200..1000;1,200..1000&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,200..1000;1,200..1000&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Inter:[email protected]&family=Mulish:ital,wght@0,200..1000;1,200..1000&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="css/createnew.css" />
<link rel="icon" href="images/favicon-16x16.png" type="favicon" />
</head>
<body>
<div class="container">
<!-- Aside section holding navbar of icon linked to other pages -->
<aside class="sidebar" id="sidebar">
<nav>
<ul>
<li>
<a href="dashboard.html"
><img src="images/icon1.png" alt="" />
</a>
</li>
<li>
<a href="createnewinspection.html" class="active">
<img src="images/icon2.png" alt="" />
</a>
</li>
<li>
<a href="report.html"><img src="images/icon3.png" alt="" /> </a>
</li>
<li>
<a href="details.html"><img src="images/icon4.png" alt="" /></a>
</li>
<li>
<a href="createnewinspection.html"><img src="images/icon5.png" alt="" /></a>
</li>
<li>
<a href="inspectionlist.html"><img src="images/icon6.png" alt="" /></a>
</li>
</ul>
</nav>
</aside>
<!-- Container holding logo request and overview -->
<div class="logo-container" id="logoContainer">
<div class="logo">
<img src="images/alt.png" alt="Leadway Assurance" />
</div>
<h3 class="trm">TRM</h3>
<nav>
<ul>
<li>
<div class="overview">
<a href="dashboard.html"><img src="images/over.png" alt=" /></a>
<a href="#">Overview</a>
</div>
</li>
<div class="request-grey">
<li>
<img src="images/req.png" alt="" /><a href="#">Requests</a>
</li>
</div>
</ul>
</nav>
</div>
<!-- Main content -->
<div class="main-content" id="main-content">
<div class="top-container">
<div class="hamburger" id="hamburger">
<img src="images/hamburger1.svg" alt="icon" id="ham" />
<img
src="images/cancel.svg"
alt="icon"
id="canc"
style="display: none"
/>
</div>
<div class="top-content">
<img src="images/Vector.png" class="notification" />
<img src="images/group38.png" />
<select name="navigation" class="user" id="choose">
<option value="dashboard.html">Godwin</option>
<option value="details.html">Details</option>
<option value="report.html">Report</option>
<option value="createnewinspection.html">Sign-up</option>
<option value="index.html">Log-out</option>
</select>
</div>
</div>
<!-- Header section with the welcome note and a paragraph also includes a button-->
<header>
<div class="welcome">
<div class="header-text">
<h1>Create New Inspection</h1>
<p>See Inspections across all business classes</p>
</div>
<a href="dashboard.html" class="closebtn"><div class="close"><button class="close-btn"><span class="x">×</span>Close</button></div></a>
</div>
</header>
<!-- div container holdeing the pre-loss and post-loss, select options -->
<div class="wrapper">
<div class="inspection-options" id="jaj">
<div class="option pre-loss active" id="kenya">
<img src="images/preloss.png" alt="Pre-loss Inspection" />
</div>
<div class="option post-loss">
<img src="images/postloss.png" alt="Post-loss Inspection" />
</div>
</div>
<div class="option-button">
<div class="selection">
<label for="dropdown">Choose a class</label>
<select id="dropdown">
<div class="dot-text">
<option value="property"> Property </option>
<option value="motors">Motors</option>
<option value="marine">Marine</option>
<option value="agric">Agric</option>
<option value="bond">Bond</option>
<option value="engineering">Engineering</option>
</select>
</div>
<button id= "jaju" class="create-request" disabled> ➩ Create Request</button></div>
</div>
</div>
<script>const preInspection = document.querySelector(".pre-loss");
const postInspection = document.querySelector(".post-loss");
const btnButtom = document.querySelector(".create-request");
preInspection.addEventListener("click", () => {
preInspection.style.border = "1px solid #FF7A00";
postInspection.style.border = "0";
// change the color of the button then cursor to pointer
btnButtom.style.background = "#FF7A00";
btnButtom.style.cursor = "pointer";
btnButtom.disabled = false;
});
postInspection.addEventListener("click", () => {
postInspection.style.border = "1.5px solid #FF7A00";
preInspection.style.border = "0";
// change the color of the button then cursor to pointer
btnButtom.style.background = "#FF7A00";
btnButtom.style.cursor = "pointer";
btnButtom.disabled = false;
});
// Changing location to respective pages if preInspection or postInspection is clicked (contains colored border) is orange
btnButtom.addEventListener("click", () => {
if (
postInspection.style.border !== "" &&
postInspection.style.border !== "0px"
) {
window.location.href = "./post-loss.html";
} else if (
preInspection.style.border !== "" &&
preInspection.style.border !== "0px"
) {
window.location.href = "./pre-loss.html";
}
});
// hamburgerMenu
var hamburger = document.getElementById("ham");
var cancel = document.getElementById("canc");
var sidebar = document.getElementById("sidebar");
var logoContainer = document.getElementById("logoContainer");
document.addEventListener("DOMContentLoaded", function () {
// var hamburger = document.getElementById("hamburger");
var logoContainer = document.getElementById("logoContainer");
var main = document.getElementById("main");
hamburger.addEventListener("click", function () {
sidebar.style.display = "flex";
hamburger.classList.toggle("open");
if (hamburger.classList.contains("open")) {
cancel.style.display = "block";
cancel.style.marginLeft = "50px";
hamburger.style.display = "none";
logoContainer.style.display = "none";
main.style.marginLeft = "0";
}
});
canc.addEventListener("click", function () {
sidebar.style.display = "none";
hamburger.classList.toggle("open");
if (!hamburger.classList.contains("open")) {
cancel.style.display = "none";
cancel.style.marginLeft = "0";
hamburger.style.display = "block";
logoContainer.style.display = "none";
main.style.marginLeft= "-270";
}
});
});
window.addEventListener("resize", () => {
if (window.innerWidth > 835) {
hamburger.style.display = "none";
cancel.style.display = "block";
sidebarParent.style.display = "block";
} else {
hamburger.style.display = "block";
cancel.style.display = "none";
sidebarParent.style.display = "none";
}
});
document.getElementById("req").onclick = function () {
window.location.href = "inspectionlist.html";
};
document.getElementById("ass").onclick = function () {
window.location.href = "createnewinspection.html";
};
document.getElementById('choose').addEventListener('change', function() {
var selectedValue = this.value;
if (selectedValue) {
window.location.href = selectedValue;
}
});
</script>
<!-- funtionalities with js -->
<!-- <script src="js/createnew.js"</script></script> -->
<!-- <script src="js/dashboard.js"></script> -->
</body>
</html>