Skip to content

Instantly share code, notes, and snippets.

@cstefanache
Last active March 31, 2021 07:02
Show Gist options
  • Save cstefanache/033a0bf419c1565341af835237ea667d to your computer and use it in GitHub Desktop.
Save cstefanache/033a0bf419c1565341af835237ea667d to your computer and use it in GitHub Desktop.
Gantt Problem
[
{
"from": "Sami Rocha",
"date": "2019-06-07T19:25:48.141Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-10T22:05:50.567Z",
"to": [
"Aden Crane"
]
},
{
"from": "Arran Wise",
"date": "2019-06-11T14:49:15.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-26T13:56:06.096Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-02T13:36:25.367Z",
"to": [
"Aden Crane",
"Kyla Bartlett",
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-02T14:57:14.028Z",
"to": [
"Aden Crane",
"Kyla Bartlett",
"Joss Hills"
]
},
{
"from": "Sneha Puckett",
"date": "2019-07-08T14:22:19.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Cai Whitehouse",
"date": "2019-07-08T14:49:36.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-10T14:34:56.116Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-05T21:32:05.374Z",
"to": [
"Arran Wise",
"Aden Crane",
"Estelle Cohen",
"Jasmine Burgess",
"Chelsea Alvarado",
"Emily Mckenna"
]
},
{
"from": "Aairah Nicholls",
"date": "2019-06-06T19:07:19.000Z",
"to": [
"Audrey Chandler",
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-06T19:08:08.703Z",
"to": [
"Aairah Nicholls"
]
},
{
"from": "Aairah Nicholls",
"date": "2019-06-06T19:08:00.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-06T19:25:47.837Z",
"to": [
"Aairah Nicholls",
"Audrey Chandler"
]
},
{
"from": "Aden Crane",
"date": "2019-06-07T19:20:10.000Z",
"to": [
"Sami Rocha",
"Aairah Nicholls"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-07T19:21:36.091Z",
"to": [
"Aden Crane",
"Aairah Nicholls"
]
},
{
"from": "Aden Crane",
"date": "2019-06-07T19:22:29.000Z",
"to": [
"Sami Rocha",
"Aairah Nicholls"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-07T19:23:59.914Z",
"to": [
"Aden Crane",
"Aairah Nicholls"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-10T20:16:01.233Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-06-10T20:16:59.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-06-11T19:28:57.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-06-13T19:28:31.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-18T13:16:07.124Z",
"to": [
"Aden Crane",
"Arran Wise"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-24T19:13:34.045Z",
"to": [
"Aden Crane",
"Arran Wise"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-25T17:43:21.047Z",
"to": [
"Aden Crane",
"Arran Wise"
]
},
{
"from": "Aden Crane",
"date": "2019-06-25T18:00:51.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-25T18:03:46.980Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-25T18:05:55.864Z",
"to": [
"Aden Crane"
]
},
{
"from": "Joss Hills",
"date": "2019-06-25T19:37:33.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-25T20:57:11.471Z",
"to": [
"Joss Hills"
]
},
{
"from": "Joss Hills",
"date": "2019-06-25T21:14:15.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-25T21:15:28.522Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-25T21:17:31.536Z",
"to": [
"Joss Hills"
]
},
{
"from": "Aden Crane",
"date": "2019-06-26T14:31:48.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-26T19:00:19.411Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-27T16:43:54.701Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-27T17:17:30.573Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-27T17:27:31.694Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-28T12:34:06.578Z",
"to": [
"Aden Crane"
]
},
{
"from": "Joss Hills",
"date": "2019-07-02T12:55:50.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-07-02T12:37:47.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-02T13:01:18.710Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-02T12:49:09.738Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-02T13:33:05.879Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-02T13:38:44.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-02T13:41:10.466Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-02T14:22:16.000Z",
"to": [
"Kyla Bartlett",
"Joss Hills"
]
},
{
"from": "Richie Oneal",
"date": "2019-07-02T14:32:37.000Z",
"to": [
"Sami Rocha",
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-02T14:40:58.091Z",
"to": [
"Richie Oneal",
"Joss Hills"
]
},
{
"from": "Richie Oneal",
"date": "2019-07-02T14:46:55.000Z",
"to": [
"Sami Rocha",
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-02T14:53:55.984Z",
"to": [
"Richie Oneal",
"Joss Hills"
]
},
{
"from": "Joss Hills",
"date": "2019-07-02T14:56:31.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-02T14:57:37.966Z",
"to": [
"Joss Hills"
]
},
{
"from": "Richie Oneal",
"date": "2019-07-02T15:07:31.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-09T23:11:04.912Z",
"to": [
"Richie Oneal",
"Acacia Chamberlain",
"Virginia Lynn",
"Jayson Mclaughlin",
"Joss Hills",
"Arran Wise",
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-09T23:11:32.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-10T14:25:29.503Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-10T14:32:21.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-10T14:33:34.342Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-10T14:35:49.296Z",
"to": [
"Joss Hills"
]
},
{
"from": "Aden Crane",
"date": "2019-07-10T14:48:33.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Joss Hills",
"date": "2019-07-10T19:31:47.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-07-11T18:03:37.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-11T18:04:47.708Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-15T15:43:02.583Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-15T21:23:09.175Z",
"to": [
"Jada Simons",
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-15T22:06:29.768Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-15T22:19:17.893Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-16T13:05:55.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-16T13:27:53.789Z",
"to": [
"Joss Hills"
]
},
{
"from": "Joss Hills",
"date": "2019-07-16T14:51:25.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-16T21:38:01.322Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-16T22:12:12.239Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-16T22:20:34.010Z",
"to": [
"Janice Santana"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-16T22:36:31.796Z",
"to": [
"Aden Crane"
]
},
{
"from": "Joss Hills",
"date": "2019-07-16T22:51:07.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Joss Hills",
"date": "2019-07-17T12:30:54.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-07-16T23:04:40.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-17T12:56:41.790Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-16T23:08:04.067Z",
"to": [
"Joss Hills"
]
},
{
"from": "Joss Hills",
"date": "2019-07-17T13:56:31.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-17T14:06:58.100Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-17T21:03:08.763Z",
"to": [
"Karolina Medrano"
]
},
{
"from": "Karolina Medrano",
"date": "2019-07-17T21:21:48.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-17T21:32:14.689Z",
"to": [
"Karolina Medrano"
]
},
{
"from": "Karolina Medrano",
"date": "2019-07-17T21:34:12.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-17T21:48:49.668Z",
"to": [
"Karolina Medrano"
]
},
{
"from": "Maurice Garcia",
"date": null,
"to": []
},
{
"from": "Aden Crane",
"date": "2019-07-17T23:38:10.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Karolina Medrano",
"date": "2019-07-17T22:21:50.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-18T02:46:03.514Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-18T01:13:22.616Z",
"to": [
"Karolina Medrano"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-17T23:52:53.264Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-18T19:32:53.684Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-19T15:26:46.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-19T16:46:26.711Z",
"to": [
"Aden Crane"
]
},
{
"from": "Joss Hills",
"date": "2019-07-19T22:27:43.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-07-19T21:48:41.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-19T22:26:18.429Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-20T00:33:14.999Z",
"to": [
"Joss Hills"
]
},
{
"from": "Joss Hills",
"date": "2019-07-22T00:16:10.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-07-21T23:35:34.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-21T23:52:07.241Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T13:44:14.495Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T14:15:11.791Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T14:54:19.264Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T15:07:28.684Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-22T15:11:22.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-07-22T15:10:35.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T15:14:13.294Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T15:14:24.723Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T15:35:21.099Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-22T16:19:42.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T16:21:29.465Z",
"to": [
"Joss Hills"
]
},
{
"from": "Aden Crane",
"date": "2019-07-22T16:37:49.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T16:39:39.660Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T19:15:51.177Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T19:33:00.230Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T21:23:54.385Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-22T23:52:19.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-23T03:01:18.703Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-23T00:27:59.689Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-23T19:22:02.001Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-23T19:31:22.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-24T16:16:56.244Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-25T17:49:11.641Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-26T02:16:40.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Joss Hills",
"date": "2019-07-26T01:37:43.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-07-26T01:12:52.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-26T02:29:31.097Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-26T01:27:33.514Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-26T14:44:55.989Z",
"to": [
"Jada Simons",
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-26T14:45:57.347Z",
"to": [
"Aden Crane"
]
},
{
"from": "Jada Simons",
"date": "2019-07-26T15:05:00.000Z",
"to": [
"Sami Rocha",
"Joss Hills",
"Mateo Rollins"
]
},
{
"from": "Mateo Rollins",
"date": "2019-07-26T15:19:42.000Z",
"to": [
"Jada Simons",
"Sami Rocha",
"Joss Hills"
]
},
{
"from": "Jada Simons",
"date": "2019-07-26T15:39:09.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-26T15:41:29.101Z",
"to": [
"Mateo Rollins",
"Jada Simons",
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-26T17:13:27.735Z",
"to": [
"Jada Simons"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-26T17:20:44.677Z",
"to": [
"Jada Simons",
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-26T17:39:48.296Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-29T22:18:05.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-29T23:41:09.059Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-30T15:37:28.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-07-30T16:01:08.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-30T16:12:51.951Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-30T16:24:17.914Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-30T18:47:16.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-30T18:53:16.251Z",
"to": [
"Kayden Lyon",
"Joss Hills"
]
},
{
"from": "Kayden Lyon",
"date": "2019-07-30T19:23:01.000Z",
"to": [
"Sami Rocha",
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-30T19:45:49.502Z",
"to": [
"Kayden Lyon",
"Joss Hills"
]
},
{
"from": "Joss Hills",
"date": "2019-08-01T15:48:13.000Z",
"to": [
"Kayden Lyon",
"Sami Rocha"
]
},
{
"from": "Kayden Lyon",
"date": "2019-08-01T15:46:45.000Z",
"to": [
"Sami Rocha",
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-02T20:40:43.726Z",
"to": [
"Aden Crane",
"Estelle Cohen"
]
},
{
"from": "Aden Crane",
"date": "2019-08-03T21:49:06.000Z",
"to": [
"Sami Rocha",
"Estelle Cohen",
"Arran Wise"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-05T14:03:27.567Z",
"to": [
"Estelle Cohen",
"Emily Mckenna"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-05T16:51:46.396Z",
"to": [
"Aden Crane",
"Estelle Cohen",
"Arran Wise"
]
},
{
"from": "Arran Wise",
"date": "2019-08-05T17:31:21.000Z",
"to": [
"Sami Rocha",
"Aden Crane",
"Estelle Cohen"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-05T17:49:06.379Z",
"to": [
"Joss Hills"
]
},
{
"from": "Joss Hills",
"date": "2019-08-05T18:20:50.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-05T18:21:31.613Z",
"to": [
"Joss Hills"
]
},
{
"from": "Joss Hills",
"date": "2019-08-05T18:22:04.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Estelle Cohen",
"date": "2019-08-05T19:11:37.000Z",
"to": [
"Sami Rocha",
"Emily Mckenna",
"Kayden Lyon"
]
},
{
"from": "Kayden Lyon",
"date": "2019-08-05T19:16:38.000Z",
"to": [
"Estelle Cohen",
"Sami Rocha",
"Emily Mckenna",
"Jasmine Burgess",
"Chelsea Alvarado"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-05T21:17:46.159Z",
"to": [
"Arran Wise",
"Aden Crane",
"Estelle Cohen",
"Jasmine Burgess",
"Chelsea Alvarado",
"Emily Mckenna"
]
},
{
"from": "Aden Crane",
"date": "2019-08-06T13:11:17.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Estelle Cohen",
"date": "2019-08-07T14:52:32.000Z",
"to": [
"Sami Rocha",
"Arran Wise",
"Aden Crane",
"Jasmine Burgess",
"Chelsea Alvarado",
"Emily Mckenna"
]
},
{
"from": "Arran Wise",
"date": "2019-08-08T16:43:20.000Z",
"to": [
"Sami Rocha",
"Aden Crane",
"Estelle Cohen",
"Jasmine Burgess",
"Chelsea Alvarado",
"Emily Mckenna"
]
},
{
"from": "Arran Wise",
"date": "2019-08-08T16:43:16.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-08T17:12:44.984Z",
"to": [
"Arran Wise",
"Aden Crane",
"Estelle Cohen",
"Jasmine Burgess",
"Chelsea Alvarado",
"Emily Mckenna"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-13T13:59:16.238Z",
"to": [
"Estelle Cohen",
"Emily Mckenna"
]
},
{
"from": "Estelle Cohen",
"date": "2019-08-13T16:17:09.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Estelle Cohen",
"date": "2019-08-13T16:19:43.000Z",
"to": [
"Emily Mckenna",
"Jasmine Burgess",
"Sami Rocha",
"Chelsea Alvarado"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-13T17:07:32.328Z",
"to": [
"Estelle Cohen"
]
},
{
"from": "Estelle Cohen",
"date": "2019-08-14T18:04:54.000Z",
"to": [
"Aden Crane",
"Arran Wise",
"Sami Rocha",
"Chelsea Alvarado",
"Emily Mckenna"
]
},
{
"from": "Chelsea Alvarado",
"date": "2019-08-16T20:40:47.000Z",
"to": [
"Estelle Cohen",
"Aden Crane",
"Arran Wise",
"Sami Rocha",
"Emily Mckenna",
"Rehaan Kearney"
]
},
{
"from": "Estelle Cohen",
"date": "2019-08-21T17:06:14.000Z",
"to": [
"Aden Crane",
"Arran Wise",
"Rehaan Kearney",
"Emily Mckenna",
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-08-21T17:11:54.000Z",
"to": [
"Estelle Cohen",
"Arran Wise",
"Rehaan Kearney",
"Emily Mckenna",
"Sami Rocha"
]
},
{
"from": "Estelle Cohen",
"date": "2019-08-21T18:11:48.000Z",
"to": [
"Aden Crane",
"Arran Wise",
"Rehaan Kearney",
"Emily Mckenna",
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-08-21T18:49:21.000Z",
"to": [
"Estelle Cohen",
"Arran Wise",
"Rehaan Kearney",
"Emily Mckenna",
"Sami Rocha"
]
},
{
"from": "Estelle Cohen",
"date": "2019-08-21T23:16:48.000Z",
"to": [
"Aden Crane",
"Arran Wise",
"Rehaan Kearney",
"Emily Mckenna",
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-08-23T17:25:58.000Z",
"to": [
"Estelle Cohen",
"Emily Mckenna",
"Sami Rocha",
"Rehaan Kearney",
"Arran Wise"
]
},
{
"from": "Aden Crane",
"date": "2019-08-28T17:02:27.000Z",
"to": [
"Brady Cohen",
"Maddox Christie",
"Imaad Bostock",
"Rebekka Jackson",
"Arran Wise",
"Cai Whitehouse",
"Sneha Puckett",
"Richie Oneal",
"Kathleen French",
"Estelle Cohen",
"Sami Rocha",
"Emily Mckenna",
"Rehaan Kearney",
"Jasmine Burgess",
"Ivo Driscoll",
"Antonina Vaughn",
"Leroy Truong",
"Kaitlyn Smith",
null
]
},
{
"from": "Sami Rocha",
"date": "2019-08-28T17:11:00.732Z",
"to": [
"Estelle Cohen",
"Emily Mckenna",
"Rehaan Kearney",
"Jasmine Burgess"
]
},
{
"from": "Jasmine Burgess",
"date": "2019-08-28T17:24:28.000Z",
"to": [
"Sami Rocha",
"Estelle Cohen",
"Emily Mckenna",
"Rehaan Kearney"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-28T17:24:44.464Z",
"to": [
"Jasmine Burgess",
"Estelle Cohen",
"Emily Mckenna",
"Rehaan Kearney"
]
},
{
"from": "Aden Crane",
"date": "2019-08-29T14:34:47.000Z",
"to": [
"Brady Cohen",
"Maddox Christie",
"Imaad Bostock",
"Rebekka Jackson",
"Arran Wise",
"Cai Whitehouse",
"Sneha Puckett",
"Richie Oneal",
"Kathleen French",
"Estelle Cohen",
"Sami Rocha",
"Emily Mckenna",
"Rehaan Kearney",
"Jasmine Burgess",
"Ivo Driscoll",
"Antonina Vaughn",
"Leroy Truong",
"Kaitlyn Smith",
null,
null,
null
]
},
{
"from": "Estelle Cohen",
"date": "2019-09-05T20:18:14.000Z",
"to": [
"Aden Crane",
"Sami Rocha",
"Rehaan Kearney"
]
},
{
"from": "Aden Crane",
"date": "2019-09-06T17:44:48.000Z",
"to": [
"Estelle Cohen",
"Sami Rocha",
"Rehaan Kearney"
]
}
]

Requirements

Given the data.json dataset

Compute the Gantt diagram

Consider the following interaction between 3 peers:

A -> B   (02 Mar)
A -> B   (03 Mar)
B -> A   (03 Mar)
A -> B,C (04 Mar)
B -> C   (04 Mar)
C -> B   (04 Mar)
C -> A   (05 Mar)
A -> C   (06 Mar)
C -> B   (06 Mar)
A -> B   (07 Mar)
C -> A   (07 Mar)
A -> C   (08 Mar)

The generated Gantt diagram should look like the one below:

Mar 01 02 03 04 05 06 07 08 
---------------------------
 A  --[========]---[======]
 B  ------[====]-----------
 C  ---------[=========]---

The logic is to identify consecutive actions from the same person. If the one person is not part of a 'From' for one day its continuity gets interrupted.

The logic should be applied on the provided dataset

console.clear()
const data = [
{
"from": "Sami Rocha",
"date": "2019-06-07T19:25:48.141Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-10T22:05:50.567Z",
"to": [
"Aden Crane"
]
},
{
"from": "Arran Wise",
"date": "2019-06-11T14:49:15.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-26T13:56:06.096Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-02T13:36:25.367Z",
"to": [
"Aden Crane",
"Kyla Bartlett",
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-02T14:57:14.028Z",
"to": [
"Aden Crane",
"Kyla Bartlett",
"Joss Hills"
]
},
{
"from": "Sneha Puckett",
"date": "2019-07-08T14:22:19.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Cai Whitehouse",
"date": "2019-07-08T14:49:36.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-10T14:34:56.116Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-05T21:32:05.374Z",
"to": [
"Arran Wise",
"Aden Crane",
"Estelle Cohen",
"Jasmine Burgess",
"Chelsea Alvarado",
"Emily Mckenna"
]
},
{
"from": "Aairah Nicholls",
"date": "2019-06-06T19:07:19.000Z",
"to": [
"Audrey Chandler",
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-06T19:08:08.703Z",
"to": [
"Aairah Nicholls"
]
},
{
"from": "Aairah Nicholls",
"date": "2019-06-06T19:08:00.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-06T19:25:47.837Z",
"to": [
"Aairah Nicholls",
"Audrey Chandler"
]
},
{
"from": "Aden Crane",
"date": "2019-06-07T19:20:10.000Z",
"to": [
"Sami Rocha",
"Aairah Nicholls"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-07T19:21:36.091Z",
"to": [
"Aden Crane",
"Aairah Nicholls"
]
},
{
"from": "Aden Crane",
"date": "2019-06-07T19:22:29.000Z",
"to": [
"Sami Rocha",
"Aairah Nicholls"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-07T19:23:59.914Z",
"to": [
"Aden Crane",
"Aairah Nicholls"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-10T20:16:01.233Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-06-10T20:16:59.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-06-11T19:28:57.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-06-13T19:28:31.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-18T13:16:07.124Z",
"to": [
"Aden Crane",
"Arran Wise"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-24T19:13:34.045Z",
"to": [
"Aden Crane",
"Arran Wise"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-25T17:43:21.047Z",
"to": [
"Aden Crane",
"Arran Wise"
]
},
{
"from": "Aden Crane",
"date": "2019-06-25T18:00:51.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-25T18:03:46.980Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-25T18:05:55.864Z",
"to": [
"Aden Crane"
]
},
{
"from": "Joss Hills",
"date": "2019-06-25T19:37:33.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-25T20:57:11.471Z",
"to": [
"Joss Hills"
]
},
{
"from": "Joss Hills",
"date": "2019-06-25T21:14:15.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-25T21:15:28.522Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-25T21:17:31.536Z",
"to": [
"Joss Hills"
]
},
{
"from": "Aden Crane",
"date": "2019-06-26T14:31:48.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-26T19:00:19.411Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-27T16:43:54.701Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-27T17:17:30.573Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-27T17:27:31.694Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-06-28T12:34:06.578Z",
"to": [
"Aden Crane"
]
},
{
"from": "Joss Hills",
"date": "2019-07-02T12:55:50.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-07-02T12:37:47.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-02T13:01:18.710Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-02T12:49:09.738Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-02T13:33:05.879Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-02T13:38:44.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-02T13:41:10.466Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-02T14:22:16.000Z",
"to": [
"Kyla Bartlett",
"Joss Hills"
]
},
{
"from": "Richie Oneal",
"date": "2019-07-02T14:32:37.000Z",
"to": [
"Sami Rocha",
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-02T14:40:58.091Z",
"to": [
"Richie Oneal",
"Joss Hills"
]
},
{
"from": "Richie Oneal",
"date": "2019-07-02T14:46:55.000Z",
"to": [
"Sami Rocha",
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-02T14:53:55.984Z",
"to": [
"Richie Oneal",
"Joss Hills"
]
},
{
"from": "Joss Hills",
"date": "2019-07-02T14:56:31.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-02T14:57:37.966Z",
"to": [
"Joss Hills"
]
},
{
"from": "Richie Oneal",
"date": "2019-07-02T15:07:31.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-09T23:11:04.912Z",
"to": [
"Richie Oneal",
"Acacia Chamberlain",
"Virginia Lynn",
"Jayson Mclaughlin",
"Joss Hills",
"Arran Wise",
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-09T23:11:32.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-10T14:25:29.503Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-10T14:32:21.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-10T14:33:34.342Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-10T14:35:49.296Z",
"to": [
"Joss Hills"
]
},
{
"from": "Aden Crane",
"date": "2019-07-10T14:48:33.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Joss Hills",
"date": "2019-07-10T19:31:47.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-07-11T18:03:37.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-11T18:04:47.708Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-15T15:43:02.583Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-15T21:23:09.175Z",
"to": [
"Jada Simons",
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-15T22:06:29.768Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-15T22:19:17.893Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-16T13:05:55.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-16T13:27:53.789Z",
"to": [
"Joss Hills"
]
},
{
"from": "Joss Hills",
"date": "2019-07-16T14:51:25.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-16T21:38:01.322Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-16T22:12:12.239Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-16T22:20:34.010Z",
"to": [
"Janice Santana"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-16T22:36:31.796Z",
"to": [
"Aden Crane"
]
},
{
"from": "Joss Hills",
"date": "2019-07-16T22:51:07.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Joss Hills",
"date": "2019-07-17T12:30:54.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-07-16T23:04:40.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-17T12:56:41.790Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-16T23:08:04.067Z",
"to": [
"Joss Hills"
]
},
{
"from": "Joss Hills",
"date": "2019-07-17T13:56:31.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-17T14:06:58.100Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-17T21:03:08.763Z",
"to": [
"Karolina Medrano"
]
},
{
"from": "Karolina Medrano",
"date": "2019-07-17T21:21:48.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-17T21:32:14.689Z",
"to": [
"Karolina Medrano"
]
},
{
"from": "Karolina Medrano",
"date": "2019-07-17T21:34:12.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-17T21:48:49.668Z",
"to": [
"Karolina Medrano"
]
},
{
"from": "Maurice Garcia",
"date": null,
"to": []
},
{
"from": "Aden Crane",
"date": "2019-07-17T23:38:10.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Karolina Medrano",
"date": "2019-07-17T22:21:50.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-18T02:46:03.514Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-18T01:13:22.616Z",
"to": [
"Karolina Medrano"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-17T23:52:53.264Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-18T19:32:53.684Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-19T15:26:46.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-19T16:46:26.711Z",
"to": [
"Aden Crane"
]
},
{
"from": "Joss Hills",
"date": "2019-07-19T22:27:43.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-07-19T21:48:41.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-19T22:26:18.429Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-20T00:33:14.999Z",
"to": [
"Joss Hills"
]
},
{
"from": "Joss Hills",
"date": "2019-07-22T00:16:10.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-07-21T23:35:34.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-21T23:52:07.241Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T13:44:14.495Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T14:15:11.791Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T14:54:19.264Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T15:07:28.684Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-22T15:11:22.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-07-22T15:10:35.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T15:14:13.294Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T15:14:24.723Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T15:35:21.099Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-22T16:19:42.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T16:21:29.465Z",
"to": [
"Joss Hills"
]
},
{
"from": "Aden Crane",
"date": "2019-07-22T16:37:49.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T16:39:39.660Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T19:15:51.177Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T19:33:00.230Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-22T21:23:54.385Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-22T23:52:19.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-23T03:01:18.703Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-23T00:27:59.689Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-23T19:22:02.001Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-23T19:31:22.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-24T16:16:56.244Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-25T17:49:11.641Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-26T02:16:40.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Joss Hills",
"date": "2019-07-26T01:37:43.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-07-26T01:12:52.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-26T02:29:31.097Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-26T01:27:33.514Z",
"to": [
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-26T14:44:55.989Z",
"to": [
"Jada Simons",
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-26T14:45:57.347Z",
"to": [
"Aden Crane"
]
},
{
"from": "Jada Simons",
"date": "2019-07-26T15:05:00.000Z",
"to": [
"Sami Rocha",
"Joss Hills",
"Mateo Rollins"
]
},
{
"from": "Mateo Rollins",
"date": "2019-07-26T15:19:42.000Z",
"to": [
"Jada Simons",
"Sami Rocha",
"Joss Hills"
]
},
{
"from": "Jada Simons",
"date": "2019-07-26T15:39:09.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-26T15:41:29.101Z",
"to": [
"Mateo Rollins",
"Jada Simons",
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-26T17:13:27.735Z",
"to": [
"Jada Simons"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-26T17:20:44.677Z",
"to": [
"Jada Simons",
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-26T17:39:48.296Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-29T22:18:05.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-29T23:41:09.059Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-30T15:37:28.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-07-30T16:01:08.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-30T16:12:51.951Z",
"to": [
"Aden Crane"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-30T16:24:17.914Z",
"to": [
"Aden Crane"
]
},
{
"from": "Aden Crane",
"date": "2019-07-30T18:47:16.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-30T18:53:16.251Z",
"to": [
"Kayden Lyon",
"Joss Hills"
]
},
{
"from": "Kayden Lyon",
"date": "2019-07-30T19:23:01.000Z",
"to": [
"Sami Rocha",
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-07-30T19:45:49.502Z",
"to": [
"Kayden Lyon",
"Joss Hills"
]
},
{
"from": "Joss Hills",
"date": "2019-08-01T15:48:13.000Z",
"to": [
"Kayden Lyon",
"Sami Rocha"
]
},
{
"from": "Kayden Lyon",
"date": "2019-08-01T15:46:45.000Z",
"to": [
"Sami Rocha",
"Joss Hills"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-02T20:40:43.726Z",
"to": [
"Aden Crane",
"Estelle Cohen"
]
},
{
"from": "Aden Crane",
"date": "2019-08-03T21:49:06.000Z",
"to": [
"Sami Rocha",
"Estelle Cohen",
"Arran Wise"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-05T14:03:27.567Z",
"to": [
"Estelle Cohen",
"Emily Mckenna"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-05T16:51:46.396Z",
"to": [
"Aden Crane",
"Estelle Cohen",
"Arran Wise"
]
},
{
"from": "Arran Wise",
"date": "2019-08-05T17:31:21.000Z",
"to": [
"Sami Rocha",
"Aden Crane",
"Estelle Cohen"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-05T17:49:06.379Z",
"to": [
"Joss Hills"
]
},
{
"from": "Joss Hills",
"date": "2019-08-05T18:20:50.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-05T18:21:31.613Z",
"to": [
"Joss Hills"
]
},
{
"from": "Joss Hills",
"date": "2019-08-05T18:22:04.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Estelle Cohen",
"date": "2019-08-05T19:11:37.000Z",
"to": [
"Sami Rocha",
"Emily Mckenna",
"Kayden Lyon"
]
},
{
"from": "Kayden Lyon",
"date": "2019-08-05T19:16:38.000Z",
"to": [
"Estelle Cohen",
"Sami Rocha",
"Emily Mckenna",
"Jasmine Burgess",
"Chelsea Alvarado"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-05T21:17:46.159Z",
"to": [
"Arran Wise",
"Aden Crane",
"Estelle Cohen",
"Jasmine Burgess",
"Chelsea Alvarado",
"Emily Mckenna"
]
},
{
"from": "Aden Crane",
"date": "2019-08-06T13:11:17.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Estelle Cohen",
"date": "2019-08-07T14:52:32.000Z",
"to": [
"Sami Rocha",
"Arran Wise",
"Aden Crane",
"Jasmine Burgess",
"Chelsea Alvarado",
"Emily Mckenna"
]
},
{
"from": "Arran Wise",
"date": "2019-08-08T16:43:20.000Z",
"to": [
"Sami Rocha",
"Aden Crane",
"Estelle Cohen",
"Jasmine Burgess",
"Chelsea Alvarado",
"Emily Mckenna"
]
},
{
"from": "Arran Wise",
"date": "2019-08-08T16:43:16.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-08T17:12:44.984Z",
"to": [
"Arran Wise",
"Aden Crane",
"Estelle Cohen",
"Jasmine Burgess",
"Chelsea Alvarado",
"Emily Mckenna"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-13T13:59:16.238Z",
"to": [
"Estelle Cohen",
"Emily Mckenna"
]
},
{
"from": "Estelle Cohen",
"date": "2019-08-13T16:17:09.000Z",
"to": [
"Sami Rocha"
]
},
{
"from": "Estelle Cohen",
"date": "2019-08-13T16:19:43.000Z",
"to": [
"Emily Mckenna",
"Jasmine Burgess",
"Sami Rocha",
"Chelsea Alvarado"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-13T17:07:32.328Z",
"to": [
"Estelle Cohen"
]
},
{
"from": "Estelle Cohen",
"date": "2019-08-14T18:04:54.000Z",
"to": [
"Aden Crane",
"Arran Wise",
"Sami Rocha",
"Chelsea Alvarado",
"Emily Mckenna"
]
},
{
"from": "Chelsea Alvarado",
"date": "2019-08-16T20:40:47.000Z",
"to": [
"Estelle Cohen",
"Aden Crane",
"Arran Wise",
"Sami Rocha",
"Emily Mckenna",
"Rehaan Kearney"
]
},
{
"from": "Estelle Cohen",
"date": "2019-08-21T17:06:14.000Z",
"to": [
"Aden Crane",
"Arran Wise",
"Rehaan Kearney",
"Emily Mckenna",
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-08-21T17:11:54.000Z",
"to": [
"Estelle Cohen",
"Arran Wise",
"Rehaan Kearney",
"Emily Mckenna",
"Sami Rocha"
]
},
{
"from": "Estelle Cohen",
"date": "2019-08-21T18:11:48.000Z",
"to": [
"Aden Crane",
"Arran Wise",
"Rehaan Kearney",
"Emily Mckenna",
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-08-21T18:49:21.000Z",
"to": [
"Estelle Cohen",
"Arran Wise",
"Rehaan Kearney",
"Emily Mckenna",
"Sami Rocha"
]
},
{
"from": "Estelle Cohen",
"date": "2019-08-21T23:16:48.000Z",
"to": [
"Aden Crane",
"Arran Wise",
"Rehaan Kearney",
"Emily Mckenna",
"Sami Rocha"
]
},
{
"from": "Aden Crane",
"date": "2019-08-23T17:25:58.000Z",
"to": [
"Estelle Cohen",
"Emily Mckenna",
"Sami Rocha",
"Rehaan Kearney",
"Arran Wise"
]
},
{
"from": "Aden Crane",
"date": "2019-08-28T17:02:27.000Z",
"to": [
"Brady Cohen",
"Maddox Christie",
"Imaad Bostock",
"Rebekka Jackson",
"Arran Wise",
"Cai Whitehouse",
"Sneha Puckett",
"Richie Oneal",
"Kathleen French",
"Estelle Cohen",
"Sami Rocha",
"Emily Mckenna",
"Rehaan Kearney",
"Jasmine Burgess",
"Ivo Driscoll",
"Antonina Vaughn",
"Leroy Truong",
"Kaitlyn Smith",
null
]
},
{
"from": "Sami Rocha",
"date": "2019-08-28T17:11:00.732Z",
"to": [
"Estelle Cohen",
"Emily Mckenna",
"Rehaan Kearney",
"Jasmine Burgess"
]
},
{
"from": "Jasmine Burgess",
"date": "2019-08-28T17:24:28.000Z",
"to": [
"Sami Rocha",
"Estelle Cohen",
"Emily Mckenna",
"Rehaan Kearney"
]
},
{
"from": "Sami Rocha",
"date": "2019-08-28T17:24:44.464Z",
"to": [
"Jasmine Burgess",
"Estelle Cohen",
"Emily Mckenna",
"Rehaan Kearney"
]
},
{
"from": "Aden Crane",
"date": "2019-08-29T14:34:47.000Z",
"to": [
"Brady Cohen",
"Maddox Christie",
"Imaad Bostock",
"Rebekka Jackson",
"Arran Wise",
"Cai Whitehouse",
"Sneha Puckett",
"Richie Oneal",
"Kathleen French",
"Estelle Cohen",
"Sami Rocha",
"Emily Mckenna",
"Rehaan Kearney",
"Jasmine Burgess",
"Ivo Driscoll",
"Antonina Vaughn",
"Leroy Truong",
"Kaitlyn Smith",
null,
null,
null
]
},
{
"from": "Estelle Cohen",
"date": "2019-09-05T20:18:14.000Z",
"to": [
"Aden Crane",
"Sami Rocha",
"Rehaan Kearney"
]
},
{
"from": "Aden Crane",
"date": "2019-09-06T17:44:48.000Z",
"to": [
"Estelle Cohen",
"Sami Rocha",
"Rehaan Kearney"
]
}
]
type incomingType = {
from: string;
date: string;
to: string[]
}
type ganntType = {
from: string;
date: Date;
to?: string[]
}
class Gantt {
private dataset: ganntType[];
private minDate: Date;
private maxDate: Date;
private maxLen: number
constructor(data: incomingType[]) {
this.dataset = []
if (data && data.length) {
data.forEach(item => {
try {
this.dataset.push(this.transform(item))
} catch (e) { }
})
}
this.dataset.sort((a, b) => a.date.getTime() - b.date.getTime());
this.minDate = this.dataset[0].date
this.maxDate = this.dataset[this.dataset.length - 1].date
const timeDiff = this.maxDate.getTime() - this.minDate.getTime()
this.maxLen = Math.ceil(timeDiff / (1000 * 60 * 60 * 24))
this.buildDictionary()
}
private buildDictionary() {
const dict: any = {}
this.dataset.forEach(item => {
let stored = dict[item.from];
if (!stored) {
stored = new Array(this.maxLen).fill('-')
dict[item.from] = stored
}
const timeDiff = item.date.getTime() - this.minDate.getTime()
const diffInDays = Math.ceil(timeDiff / (1000 * 60 * 60 * 24))
stored[diffInDays] = '='
})
Object.keys(dict).forEach(key => {
console.log(`${key.padStart(20)}: [${dict[key].join('')}]`)
})
}
private transform(incoming: incomingType): ganntType {
if (incoming.date === null) {
throw new Error('missing')
}
return {
from: incoming.from,
date: new Date(incoming.date),
to: incoming.to
}
}
}
new Gantt(data as incomingType[])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment