-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcustomer_view.html
More file actions
459 lines (367 loc) · 16.5 KB
/
customer_view.html
File metadata and controls
459 lines (367 loc) · 16.5 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
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
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Appointer</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet">
<link rel='stylesheet prefetch' href='http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css'>
<link rel="stylesheet" type="text/css"
media="screen and (max-device-width: 480px)"
href="style-sheet-small.css" >
<link rel="stylesheet" type="text/css"
media="screen and (min-device-width: 480px)"
href="style-sheet-medium.css" >
<link rel="stylesheet" type="text/css"
media="screen and (min-device-width: 786px)"
href="style-sheet-large.css" >
<link href='fullcalendar.min.css' rel='stylesheet' />
<link href='fullcalendar.print.min.css' rel='stylesheet' media='print' />
<script src='moment.min.js'></script>
<script src='jquery.min.js'></script>
<script src='fullcalendar.min.js'></script>
<script src="sweetalert.min.js"></script>
<script src="validation.js"></script>
<link rel="stylesheet" type="text/css" href="sweetalert.css">
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" type="text/css" href="default.css" />
<link rel="stylesheet" type="text/css" href="component.css" />
<script src="modernizr.custom.js"></script>
<script>
$(document).ready(function() {
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
defaultDate: '2016-12-12',
navLinks: true, // can click day/week names to navigate views
selectable: true,
selectHelper: true,
hover: function(start,end)
{
alert("uo");
},
select: function(start, end) {
swal({
title: "Add Appointment",
text: "Title:",
type: "input",
showCancelButton: true,
closeOnConfirm: false,
showCancelButton: true,
confirmButtonColor: "#ffa500",
confirmButtonText: "Add",
closeOnConfirm: false,
animation: "slide-from-top",
inputPlaceholder: "Title"
},
function(inputValue){
if (inputValue === false) return false;
if (inputValue === "") {
swal.showInputError("You need to write something!");
return false
}
swal("Appointment Added!", inputValue, "success");
var eventData;
eventData = {
title: inputValue,
start: start,
end: end
};
$('#calendar').fullCalendar('renderEvent', eventData, true); // stick? = true
$('#calendar').fullCalendar('unselect');
//RIGHT HERE SEND NEW APPOINTMENT TO PHP
});
},
eventClick: function( event, jsEvent, view )
{
//use event to access server to get gallery pictures
//if stylist field is set then it is a hair appointment so set the gallery field and add stylist info/profile page link. Otherwise dont not call those tabs and just provide date and title
//on customer view they need the option to add photos to the appointment, stylist can only see the photos
var modal = document.getElementById("eventPopup");
modal.style.display = "block";
var eventTitle = document.getElementById("eventTitle");
eventTitle.innerHTML=event.title;
var eventStart = document.getElementById("eventStart");
eventStart.innerHTML="Start Time: "+event.start;
var eventEnd = document.getElementById("eventEnd");
eventEnd.innerHTML="End Time: "+event.end;
//Add section for stylist if hair appointment
var eventEnd = document.getElementById("eventStylist");
eventEnd.innerHTML="Stylist: ";
var eventEnd = document.getElementById("eventLocation");
eventEnd.innerHTML="Salon Location: ";
//Add Gallery for stylist picture
var galleryBar = document.getElementById("galleryBar");
galleryBar.style.display="block";
var gallery = document.getElementById("og-grid2");
gallery.style.position="relative";
gallery.innerHTML="<li><img src=\'images/thumbs/3.jpg\' alt='img03'/></li><li> <img src=\'images/thumbs/1.jpg\' alt='img01'/></li>";
},
editable: true,
eventLimit: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2016-12-01'
},
{
title: 'Long Event',
start: '2016-12-07',
end: '2016-12-10'
},
{
id: 999,
title: 'Repeating Event',
start: '2016-12-09T16:00:00'
},
{
id: 999,
title: 'Repeating Event',
start: '2016-12-16T16:00:00'
},
{
title: 'Conference',
start: '2016-12-11',
end: '2016-12-13'
},
{
title: 'Meeting',
start: '2016-12-12T10:30:00',
end: '2016-12-12T12:30:00'
},
{
title: 'Lunch',
start: '2016-12-12T12:00:00'
},
{
title: 'Meeting',
start: '2016-12-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2016-12-12T17:30:00'
},
{
title: 'Dinner',
start: '2016-12-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2016-12-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2016-12-28'
}
]
});
});
</script>
<style>
body
{
margin: 40px 10px;
padding: 0;
font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
font-size: 14px;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
text-transform: uppercase;
letter-spacing: 1px;
font-weight: 700;
font-size: 12px;
cursor: pointer;
line-height: 24px;
}
</style>
</head>
<body>
<div class="background">
<!-- START OF TOOLBAR -->
<nav>
<ul class="toolbar__wrapper">
<a href="Appointer-Home.html"><img src="Photos/Logo.png" class="toolbarLogo"></a>
<li><a class="active" href="#home">Home</a></li>
<li><a href="#myprofile">My Profile</a></li>
<li><a href="#mystylist">My Stylist</a></li>
<li><a href="#logout">Logout</a></li>
</ul>
</nav>
<!-- END OF TOOLBAR -->
<!-- START OF CALENDAR -->
<div id='calendar'></div>
<!-- END OF CALENDAR -->
<!-- START OF SIDE PANEL -->
<div class="sidepanel__wrapper">
<h2 class="bookAppointmentHeader" id="bookAppointment-title">Book appointment</h2>
<div class="sminputs">
<div class="input full">
<label class="string optional" for="user-name" id="label-bookAppointment">Select a hairstyle</label>
<!-- The popup box for selecting a hairstyle-->
<div id="hairPopup" class="popup__wrapper">
<!-- Modal content -->
<div id="popup__content" class="popup__content">
<span class="close">×</span>
<p>Select a Hairstyle</p>
<div class="styled-select">
<select id="selectHairstyle">
<option value="Please Select">(Please select)</option>
<option value="cutW">Women's Haircut</option>
<option value="cutM">Men's Haircut</option>
<option value="cutK">Kid's Haircut</option>
<option value="dye">Hair Dye</option>
<option value="perm">Perm</option>
</select>
</div>
<br /><br />
<button id="submitSelectedHairstyle" class="bookAppointmentButton">Confirm</button>
<button id="cancelSelectedHairstyle" class="bookAppointmentButton">Cancel</button>
<br /><br />
</div>
</div>
<button class="bookAppointmentButton" id="selectHairstyleButton">Select Style</button>
<p id="selectHairstyleInput">Please select</p>
</div>
</div>
<div class="sminputs">
<div class="input full">
<label class="string optional" for="user-name" id="label-bookAppointment">Select a location</label>
<div class="styled-select">
<select id="selectLocation">
<option value="Please Select">(Please select)</option>
<option value="cutW">489 Albert St N</option>
<option value="cutM">2315 Victoria Ave.</option>
<option value="cutK">Cornwall Centre</option>
<option value="dye">Golden Mile Mall</option>
</select>
</div>
</div>
</div>
<div class="sminputs">
<div class="input full">
<label class="string optional" for="user-name" id="label-selectStylist">Select Stylist</label>
<!-- The popup box for selecting a hairstylist-->
<div id="popupStylist" class="popup__wrapper">
<!-- Modal content -->
<div id="popup__content" class="popup__content">
<span class="close">×</span>
<p>Select a Hairstylist</p>
<span id="picForm__wrapper">
<div id ="employee__wrapper" class="employee_wrapper">
<div class="main">
<ul id="selectStylistGrid" class="og-grid scrollable">
<li>
<a href="#" >
<div class="employeeInfo">
<img id="employeeProfilePic" class="employeeProfile" src="Photos/curlers.jpeg" alt="Stylist Image"/>
<div id="employeeName" class="employeeName">Stylist Name</div>
</div>
</a>
</li>
<li>
<a href="#" >
<div class="employeeInfo">
<img id="employeeProfilePic" class="employeeProfile" src="Photos/curlers.jpeg" alt="Stylist Image"/>
<div id="employeeName" class="employeeName">Stylist Name</div>
</div>
</a>
</li>
<li>
<a href="#" >
<div class="employeeInfo">
<img id="employeeProfilePic" class="employeeProfile" src="Photos/curlers.jpeg" alt="Stylist Image"/>
<div id="employeeName" class="employeeName">Stylist Name</div>
</div>
</a>
</li>
<li>
<a href="#" >
<div class="employeeInfo">
<img id="employeeProfilePic" class="employeeProfile" src="Photos/curlers.jpeg" alt="Stylist Image"/>
<div id="employeeName" class="employeeName">Stylist Name</div>
</div>
</a>
</li>
<li>
<a href="#" >
<div class="employeeInfo">
<img id="employeeProfilePic" class="employeeProfile" src="Photos/curlers.jpeg" alt="Stylist Image"/>
<div id="employeeName" class="employeeName">Stylist Name</div>
</div>
</a>
</li>
</ul>
</div><!-- /container -->
<br><br><br><br><br><br><br><br><br><br><br><br><br>
</div>
</span>
<br>
<button id="submitSelectedHairstylist" class="bookAppointmentButton">Confirm</button>
<button id="cancelSelectedHairstylist" class="bookAppointmentButton">Cancel</button>
<button id="defaultSelectedHairstylist" class="bookAppointmentButton">Set as My Stylist</button>
<br><br>
</div>
</div>
<button class="bookAppointmentButton" id="selectedHairstylist">Select Stylist</button>
<p id="selectHairstylistInput">Please select</p>
</div>
</div>
<div class="sminputs">
<div class="input full">
<label class="string optional" for="user-name" id="label-appointmentUpload">photo of desired hairstyle</label>
<input type="file" name="appointmentPic">
</div>
</div>
<div class="sminputs">
<div class="input full">
<label class="string optional" for="user-name" id="label-start">enter appointment time*</label>
<input class="string optional" maxlength="255" id="start" type="datetime-local" size="50" />
</div>
</div>
<div class="simform__actions">
<button class="sumbit" name="newAppointment" type="submit" id="newAppointment" value="Add">Add</button>
<br /><br /><br />
<button class="sumbit" name="payNow" type="submit" id="payNow" value="Pay Now">Pay Now</button>
</div>
</div>
<!-- END OF SIDE PANEL -->
</div>
<!-- The popup box for event information-->
<div id="eventPopup" class="popup__wrapper">
<!-- Modal content -->
<div id="eventPopup__content" class="popup__content">
<span class="close">×</span>
<div id="eventInfo" class="eventInfo">
<div id="eventTitle" class="eventTitle"></div>
<div id="eventStart" class="eventEtc"></div>
<div id="eventEnd" class="eventEtc"></div>
<div id="eventStylist" class="eventEtc"></div>
<div id="eventLocation" class="eventEtc"></div>
</div>
<button>CANCEL</button>
<div id="galleryBar" class="galleryBar">
Gallery
</div>
<div id="gallery" class="gallery">
<div class="main">
<ul id="og-grid2" class="og-grid scrollable">
</ul>
</div>
</div>
</div>
</div>
</body>
<script src="appointment_handler.js"></script>
<!--<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> This makes the photo grid run but crashes calendar -->
<script src="grid.js"></script>
<script>
$(function() {
Grid.init();
});
</script>
</html>