-
Notifications
You must be signed in to change notification settings - Fork 0
/
constant.ts
113 lines (95 loc) · 2.14 KB
/
constant.ts
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
export interface Employee {
uniqueId: number;
name: string;
subordinates: Employee[];
}
export interface IEmployeeOrgApp {
ceo: Employee;
/**
* Moves the employee with employeeID (uniqueId) under a supervisor
(another employee) that has supervisorID (uniqueId).
* E.g. move Bob (employeeID) to be subordinate of Georgina
(supervisorID). * @param employeeID
* @param supervisorID
*/
move(employeeID: number, supervisorID: number): void;
/** Undo last move action */
undo(): void;
/** Redo last undone action */
redo(): void;
}
export const will: Employee = {
uniqueId: 15,
name: 'Will Turner',
subordinates: []
}
export const tina: Employee = {
uniqueId: 14,
name: 'Tina Teff',
subordinates: [will]
}
export const thomas: Employee = {
uniqueId: 13,
name: 'Thomas Brown',
subordinates: []
}
export const bob: Employee = {
uniqueId: 12,
name: 'Bob Saget',
subordinates: [tina]
}
export const marry: Employee = {
uniqueId: 11,
name: 'Mary Blue',
subordinates: []
}
export const sophie: Employee = {
uniqueId: 10,
name: 'Sophie Turner',
subordinates: []
}
export const gary: Employee = {
uniqueId: 9,
name: 'Gary Styles',
subordinates: []
}
export const george: Employee = {
uniqueId: 8,
name: 'George Carrey',
subordinates: []
}
export const harry: Employee = {
uniqueId: 7,
name: 'Harry Tobs',
subordinates: [thomas]
}
export const cassandra: Employee = {
uniqueId: 6,
name: 'Cassandra Reynolds',
subordinates: [marry, bob]
}
export const georgina: Employee = {
uniqueId: 5,
name: 'Georgina Flangy',
subordinates: [sophie]
};
export const bruce: Employee = {
uniqueId: 4,
name: 'Bruce Willis',
subordinates: []
};
export const tyler: Employee = {
uniqueId: 3,
name: 'Tyler Simpson',
subordinates: [harry, george, gary]
};
export const sarah: Employee = {
uniqueId: 2,
name: 'Sarah Donald',
subordinates: [cassandra]
};
export const ceo: Employee = {
uniqueId: 1,
name: 'Mark Zuckerberg',
subordinates: [sarah, tyler, bruce, georgina]
};