-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogic.js
More file actions
43 lines (40 loc) · 1.07 KB
/
Copy pathlogic.js
File metadata and controls
43 lines (40 loc) · 1.07 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
/**
* @function parkingStatus - is used to return a string value for a parking spot object
* @param val - is a number between 0-5 that defines the parking state
* @returns {String} - the output used in the object
*/
function parkingStatus(val){
var status;
switch (val){
case 0:
// Parking is available
status = 'available';
break;
case 1:
// Parking is about to be occupied
status = 'entering';
break;
case 2:
// Parking is occupied, but not validate
status = 'occupied';
break;
case 3:
// Parking is occupied but not authorized
status = 'violation';
break;
case 4:
// Parking is occupied and validated
status = 'validated';
break;
default:
//Statements executed when none of
status = null;
break;
}
return status;
}
/**
* @function - Should take values in a Moment.js format
*/
function timeStamp() {
}