This repository has been archived by the owner on May 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.html
184 lines (170 loc) · 7.38 KB
/
profile.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
---
title: My Profile
layout: default
permalink: /my-profile/
---
<script>
$(document).ready(function(){
var profiles = JSON.parse(localStorage.getItem('profiles'));
var user = localStorage.getItem('iAm');
if (!user) user = 'angela';
var p = profiles[user];
$("#greetings").html("Hi, " + p.firstName + "!");
$("#name").html(p.firstName + " " + p.lastName);
$("#email").html(p.email);
$("#street").html(p.street);
$("#street2").html(p.city + " " + p.province + " " + p.postalCode);
$("#phone").html(p.phone);
$("#dateOfBirth").html(p.dateOfBirth);
$.each(p.ygInfo, function(index, info){
var li = $('<li class="list-group-item"><div>' + info.name + ' #' + info.number + '</div></li>');
if (info.expiry !== '') {
li.append(
'<small class="text-danger">Expires ' + info.expiry + '</small>'
)
}
$("#ygInfo").append(
li
);
});
$.each(p.licenses, function(index, license){
var li = $('<li class="list-group-item"><div>' + license.name + '</div></li>');
if (license.expiry !== '') {
li.append(
'<small class="text-danger">Expires ' + license.expiry + '</small>'
)
}
$("#licenses").append(
li
);
});
$.each(p.vehicles, function(index, vehicle){
var li = $('<li class="list-group-item d-flex align-items-start"></li>');
if (vehicle.expiry !== '') {
li.append(
'<div><div>' + vehicle.name + '</div><small class="text-danger">Registration expires ' + vehicle.expiry + '</small></div><a href="/view-form/?form=https://eservices.gov.yk.ca/en/renew-vehicle-registration/plate%20" class="btn btn-primary ml-auto btn-sm">Renew</a>'
)
} else {
li.append('<div>' + vehicle.name + '</div>');
}
$("#vehicles").append(
li
);
});
$.each(p.property, function(index, property){
var li = $('<li class="list-group-item d-flex align-items-start"></li>');
if (property.expiry !== '') {
li.append(
'<div><div>' + property.name + '</div><small class="text-danger">Property tax due by June 1st 2019 </small></div><a href="./" class="btn btn-primary ml-auto btn-sm">Pay</a>'
)
} else {
li.append('<div>' + property.name + '</div><small>Property tax due by June 1st 2019' + property.expiry + '</small>');
}
$("#property").append(
li
);
})
if (p.notifications === 'yes') {
$('#notifications').html(
`<a href="#" class="list-group-item list-group-item-action d-flex">
<div>
<h6 class="my-0">Your vehicle registration is nearing expiry</h6>
</div>
<i class="fas fa-arrow-right ml-auto"></i>
</a>
<a href="#" class="list-group-item list-group-item-action d-flex">
<div>
<h6 class="my-0">Apply for a new Fishing license</h6>
</div>
<i class="fas fa-arrow-right ml-auto"></i>
</a>
<a href="#" class="list-group-item list-group-item-action d-flex">
<div>
<h6 class="my-0">The results of the permit hunt lottery you entered are available</h6>
</div>
<i class="fas fa-arrow-right ml-auto"></i>
<!--<a class="btn btn-primary btn-sm ml-auto" href="./">View</a>-->
</a>`
);
$("#notifications-counter").html("3");
} else {
$("#notifications-counter").html("0");
}
});
</script>
<div class="py-5 text-center">
<h2 id="greetings"></h2>
<p class="lead">The weather is super cold today, eh?</p>
</div>
<div class="row profile">
<div class="col-lg-4 order-lg-2 mb-4">
<h4 class="d-flex justify-content-between align-items-center mb-3">
<span class="text-muted">Notifications</span>
<span class="badge badge-success badge-pill" id="notifications-counter">3</span>
</h4>
<div class="list-group mb-3" id="notifications">
</div>
</div>
<div class="col-lg-8 order-md-1">
<div class="row mb-4">
<div class="col-md-6 mb-4">
<div class="card h-100">
<div class="card-header d-flex">
<div><i class="fas fa-user"></i> Personal Information</div>
<a href="{{ '/my-profile/edit-profile' | absolute_url}}" class="ml-auto">Edit</a>
</div>
<div class="card-body">
<div><strong id="name"></strong></div>
<div><span id="street"></span><br><span id="street2"></span></div>
<div id="email"></div>
<div id="phone"></div>
<div id="dateOfBirth"></div>
</div>
</div>
</div>
<div class="col-md-6 mb-4">
<div class="card h-100">
<div class="card-header d-flex">
<div><i class="fas fa-id-card"></i> YG Information</div>
<a href="{{ '/my-profile/edit-yg-info' | absolute_url}}" class="ml-auto">Edit</a>
</div>
<ul class="list-group list-group-flush d-flex" id="ygInfo">
</ul>
</div>
</div>
<div class="col-md-6 mb-4">
<div class="card h-100">
<div class="card-header d-flex">
<div><i class="fas fa-tag"></i> Permits & Licenses</div>
<a href="{{ '/my-profile/edit-permits-licenses' | absolute_url}}" class="ml-auto">Edit</a>
</div>
<ul class="list-group list-group-flush d-flex" id="licenses">
</ul>
</div>
</div>
<div class="col-md-6 mb-4">
<div class="card h-100">
<div class="card-header d-flex">
<div><i class="fas fa-car-side"></i> Vehicles</div>
<a href="{{ '/my-profile/edit-vehicles' | absolute_url}}" class="ml-auto">Edit</a>
</div>
<ul class="list-group list-group-flush" id="vehicles">
</ul>
</div>
</div>
<div class="col-md-6 mb-4">
<div class="card h-100">
<div class="card-header d-flex">
<div><i class="fas fa-home"></i> Property</div>
<a href="{{ '/my-profile/edit-houses' | absolute_url}}" class="ml-auto">Edit</a>
</div>
<ul class="list-group list-group-flush" id="property">
</ul>
</div>
</div>
</div>
</div>
<div class="col-12 order-md-5">
<img class="aurora" src="http://localhost:4000/images/Aurora-main.svg" alt="">
</div>
</div>