-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-harness.js
77 lines (63 loc) · 2.19 KB
/
test-harness.js
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
const scheduler = require('./services/scheduler');
const { addRole, listRoles } = require('./services/role');
const { addRoleUsingTerminal, addWorkerUsingTerminal, addWorkerRoleUsingTerminal, addTimeOffUsingTerminal, newScheduleUsingTerminal } = require('./services/terminal');
const { workerQuestions, timeoffQuestions, scheduleQuestions, roleQuestions } = require('./services/questions');
const { addWorker, getWorkersByName, listWorkers, setWorkerRole, setWorkerTimeOff } = require('./services/worker');
//scheduler.newSchedule();
// var w = new Object();
// w.firstname = "r"
// w.lastname = "r"
// w.phone = "r"
// w.email = "R"
// roles = ['sound']
// addWorker(w, roles);
var i = "5ab85befb458f3b61d0a92e1"
// var t = new Object();
// t.datestart = "2018-03-20";
// t.dateend = "2018-03-21";
// setWorkerTimeOff(i, t);
// scheduler.getCurrentSchedule().then((response) => {
// console.log(response);
// });
// addRoleUsingTerminal();
//newScheduleUsingTerminal("april");
//newScheduleUsingTerminal();
exportSchedulesUsingTerminal("april");
//addWorkerUsingTerminal();
// addWorkerRoleUsingTerminal(i);
// var getRoles = function() {
// return new Promise((resolve, reject) => {
// resolve(listRoles());
// });
// };
// var qs = function(roles) {
// //return new Promise((resolve, reject) => {
// pfq = function (roles) {
// rs = []
// roles.forEach(r => {
// rs.push(sf.toLower(r.role));
// });
// return new Promise((resolve, reject) => {
// resolve(prompt(workerQuestions(rs)))
// })
// };
// ans = function (answers) {
// return new Promise((resolve, reject) => {
// roles = answers.roles;
// delete answers.roles;
// resolve([answers, roles]);
// })
// };
// return pfq(roles).then(ans);
// //});
// }
// var add = function(params) {
// var r = params[1]
// var w = params[0]
// return new Promise((resolve, reject) => {
// resolve(addWorker(w, r));
// })
// };
// getRoles().then(qs).then(add).then((response) => {
// console.info(response);
// })