cronofy-elements 1.42.0 → 1.44.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.yaml +31 -30
- package/Makefile +6 -12
- package/build/CronofyElements.v1.44.1.js +2 -0
- package/build/{CronofyElements.v1.42.0.js.LICENSE.txt → CronofyElements.v1.44.1.js.LICENSE.txt} +1 -1
- package/build/npm/CronofyElements.js +2 -2
- package/demo/date-time-picker.ejs +83 -23
- package/package.json +57 -57
- package/src/js/components/DateTimePicker/DateTimePicker.js +5 -0
- package/src/js/components/DateTimePicker/Details.js +5 -3
- package/src/js/components/DateTimePicker/SequencedSlotButton.js +71 -0
- package/src/js/components/DateTimePicker/SlotsList.js +6 -1
- package/src/js/components/DateTimePicker/Wrapper.js +21 -19
- package/src/js/components/DateTimePicker/contexts/status-reducer.js +30 -8
- package/src/js/components/DateTimePicker/utils/slots.js +69 -3
- package/src/js/helpers/connections.js +38 -0
- package/src/js/helpers/init.DateTimePicker.js +4 -0
- package/tests/DateTimePicker/SequencedSlotButton.test.js +130 -0
- package/tests/DateTimePicker/contexts/status-reducer.test.js +265 -67
- package/tests/DateTimePicker/dummy-data.js +277 -0
- package/tests/DateTimePicker/utils.test.js +53 -1
- package/build/CronofyElements.v1.42.0.js +0 -2
|
@@ -6,7 +6,10 @@ import {
|
|
|
6
6
|
testSlotsObjectPartial,
|
|
7
7
|
testSlotsArray,
|
|
8
8
|
testSlotsArrayAdditional,
|
|
9
|
+
testSequencedSlotsArray,
|
|
9
10
|
testDaySlots,
|
|
11
|
+
testDaySequencedSlots,
|
|
12
|
+
testSequencedSlotsAObject,
|
|
10
13
|
testQuery,
|
|
11
14
|
} from "../dummy-data";
|
|
12
15
|
|
|
@@ -212,17 +215,26 @@ describe("Date Time Picker status reducer", () => {
|
|
|
212
215
|
});
|
|
213
216
|
|
|
214
217
|
it("NO_SLOTS_FOUND", async () => {
|
|
218
|
+
const callbackSpy = jest.spyOn(startingState, "callback");
|
|
215
219
|
const oldState = { ...startingState };
|
|
216
220
|
const result = statusReducer(oldState, {
|
|
217
221
|
type: "NO_SLOTS_FOUND",
|
|
218
222
|
});
|
|
219
223
|
|
|
224
|
+
const expectedNotification = {
|
|
225
|
+
notification: {
|
|
226
|
+
type: "no_slots_found",
|
|
227
|
+
},
|
|
228
|
+
};
|
|
229
|
+
|
|
220
230
|
delete oldState.columnView;
|
|
221
231
|
|
|
222
232
|
const { columnView, ...newState } = result;
|
|
223
233
|
|
|
224
234
|
// These values have been updated
|
|
225
235
|
expect(columnView).toBe("no-slots");
|
|
236
|
+
expect(callbackSpy).toHaveBeenCalled();
|
|
237
|
+
expect(callbackSpy).toHaveBeenCalledWith(expectedNotification);
|
|
226
238
|
// All other values are unchanged
|
|
227
239
|
expect(newState).toStrictEqual(oldState);
|
|
228
240
|
});
|
|
@@ -340,6 +352,45 @@ describe("Date Time Picker status reducer", () => {
|
|
|
340
352
|
expect(newState).toStrictEqual(oldState);
|
|
341
353
|
});
|
|
342
354
|
|
|
355
|
+
it("sets slots when there are no slots", () => {
|
|
356
|
+
const oldState = {
|
|
357
|
+
...startingState,
|
|
358
|
+
slots: {},
|
|
359
|
+
availableDays: [],
|
|
360
|
+
slotFetchCount: 0,
|
|
361
|
+
slotInjectionPoint: undefined,
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
const result = statusReducer(oldState, {
|
|
365
|
+
type: "SET_SLOTS",
|
|
366
|
+
slots: [],
|
|
367
|
+
month: "2021-09",
|
|
368
|
+
tzid: "Europe/London",
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
delete oldState.slots;
|
|
372
|
+
delete oldState.availableDays;
|
|
373
|
+
delete oldState.slotFetchCount;
|
|
374
|
+
delete oldState.slotInjectionPoint;
|
|
375
|
+
|
|
376
|
+
const {
|
|
377
|
+
slots,
|
|
378
|
+
availableDays,
|
|
379
|
+
slotFetchCount,
|
|
380
|
+
slotInjectionPoint,
|
|
381
|
+
...newState
|
|
382
|
+
} = result;
|
|
383
|
+
|
|
384
|
+
// These values have been updated
|
|
385
|
+
expect(slots).toStrictEqual({});
|
|
386
|
+
expect(availableDays).toStrictEqual([]);
|
|
387
|
+
expect(slotFetchCount).toBe(1);
|
|
388
|
+
expect(slotInjectionPoint).toBe(undefined);
|
|
389
|
+
|
|
390
|
+
// All other values are unchanged
|
|
391
|
+
expect(newState).toStrictEqual(oldState);
|
|
392
|
+
});
|
|
393
|
+
|
|
343
394
|
it("sets additional slots", () => {
|
|
344
395
|
const oldState = {
|
|
345
396
|
...startingState,
|
|
@@ -403,6 +454,65 @@ describe("Date Time Picker status reducer", () => {
|
|
|
403
454
|
|
|
404
455
|
expect(newState).toStrictEqual(oldState);
|
|
405
456
|
});
|
|
457
|
+
|
|
458
|
+
it("sets sequenced slots", () => {
|
|
459
|
+
const oldState = {
|
|
460
|
+
...startingState,
|
|
461
|
+
slots: {},
|
|
462
|
+
availableDays: [],
|
|
463
|
+
slotFetchCount: 0,
|
|
464
|
+
slotInjectionPoint: undefined,
|
|
465
|
+
sequenced_availability: true,
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
const result = statusReducer(oldState, {
|
|
469
|
+
type: "SET_SLOTS",
|
|
470
|
+
slots: testSequencedSlotsArray,
|
|
471
|
+
month: "2021-09",
|
|
472
|
+
tzid: "Europe/London",
|
|
473
|
+
});
|
|
474
|
+
|
|
475
|
+
const newMonthsLoading = [
|
|
476
|
+
{
|
|
477
|
+
month: "2021-09",
|
|
478
|
+
loading: false,
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
month: "2021-10",
|
|
482
|
+
loading: true,
|
|
483
|
+
},
|
|
484
|
+
];
|
|
485
|
+
|
|
486
|
+
delete oldState.slots;
|
|
487
|
+
delete oldState.availableDays;
|
|
488
|
+
delete oldState.slotFetchCount;
|
|
489
|
+
delete oldState.slotInjectionPoint;
|
|
490
|
+
delete oldState.monthsLoading;
|
|
491
|
+
|
|
492
|
+
const {
|
|
493
|
+
slots,
|
|
494
|
+
availableDays,
|
|
495
|
+
slotFetchCount,
|
|
496
|
+
slotInjectionPoint,
|
|
497
|
+
monthsLoading,
|
|
498
|
+
...newState
|
|
499
|
+
} = result;
|
|
500
|
+
|
|
501
|
+
// These values have been updated
|
|
502
|
+
expect(slots).toStrictEqual(testSequencedSlotsAObject);
|
|
503
|
+
expect(availableDays).toStrictEqual([
|
|
504
|
+
"2021-09-29",
|
|
505
|
+
"2021-09-30",
|
|
506
|
+
"2021-10-01",
|
|
507
|
+
"2021-10-04",
|
|
508
|
+
]);
|
|
509
|
+
expect(slotFetchCount).toBe(1);
|
|
510
|
+
expect(slotInjectionPoint).toBe("2021-09-29");
|
|
511
|
+
expect(monthsLoading).toStrictEqual(newMonthsLoading);
|
|
512
|
+
|
|
513
|
+
// All other values are unchanged
|
|
514
|
+
expect(newState).toStrictEqual(oldState);
|
|
515
|
+
});
|
|
406
516
|
});
|
|
407
517
|
|
|
408
518
|
it("SET_FOCUS", async () => {
|
|
@@ -423,58 +533,104 @@ describe("Date Time Picker status reducer", () => {
|
|
|
423
533
|
expect(newState).toStrictEqual(oldState);
|
|
424
534
|
});
|
|
425
535
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
536
|
+
describe("SELECT_DAY", () => {
|
|
537
|
+
it("SELECT_DAY", async () => {
|
|
538
|
+
const oldState = { ...startingState };
|
|
539
|
+
const date = "2021-10-04";
|
|
540
|
+
const result = statusReducer(oldState, {
|
|
541
|
+
type: "SELECT_DAY",
|
|
542
|
+
day: date,
|
|
543
|
+
});
|
|
544
|
+
|
|
545
|
+
const expectedDaySlots = [
|
|
546
|
+
{
|
|
547
|
+
start: "2021-10-04T09:00:00Z",
|
|
548
|
+
end: "2021-10-04T10:00:00Z",
|
|
549
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
start: "2021-10-04T10:00:00Z",
|
|
553
|
+
end: "2021-10-01T11:00:00Z",
|
|
554
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
start: "2021-10-04T11:00:00Z",
|
|
558
|
+
end: "2021-10-04T12:00:00Z",
|
|
559
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
start: "2021-10-04T15:00:00Z",
|
|
563
|
+
end: "2021-10-04T16:00:00Z",
|
|
564
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
start: "2021-10-04T17:00:00Z",
|
|
568
|
+
end: "2021-10-04T18:00:00Z",
|
|
569
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
570
|
+
},
|
|
571
|
+
];
|
|
572
|
+
|
|
573
|
+
delete oldState.selectedDay;
|
|
574
|
+
delete oldState.focusedDay;
|
|
575
|
+
delete oldState.focusedSlot;
|
|
576
|
+
delete oldState.columnView;
|
|
577
|
+
delete oldState.daySlots;
|
|
578
|
+
|
|
579
|
+
const {
|
|
580
|
+
selectedDay,
|
|
581
|
+
focusedDay,
|
|
582
|
+
focusedSlot,
|
|
583
|
+
columnView,
|
|
584
|
+
daySlots,
|
|
585
|
+
...newState
|
|
586
|
+
} = result;
|
|
587
|
+
|
|
588
|
+
// These values have been updated
|
|
589
|
+
expect(selectedDay).toBe(date);
|
|
590
|
+
expect(focusedDay).toBe(date);
|
|
591
|
+
expect(focusedSlot).toBe("2021-10-04T09:00:00Z");
|
|
592
|
+
expect(daySlots).toStrictEqual(expectedDaySlots);
|
|
593
|
+
expect(columnView).toBe("slots");
|
|
594
|
+
// All other values are unchanged
|
|
595
|
+
expect(newState).toStrictEqual(oldState);
|
|
432
596
|
});
|
|
433
597
|
|
|
434
|
-
|
|
435
|
-
{
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
}
|
|
445
|
-
{
|
|
446
|
-
start: "2021-10-04T11:00:00Z",
|
|
447
|
-
end: "2021-10-04T12:00:00Z",
|
|
448
|
-
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
449
|
-
},
|
|
450
|
-
{
|
|
451
|
-
start: "2021-10-04T15:00:00Z",
|
|
452
|
-
end: "2021-10-04T16:00:00Z",
|
|
453
|
-
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
454
|
-
},
|
|
455
|
-
{
|
|
456
|
-
start: "2021-10-04T17:00:00Z",
|
|
457
|
-
end: "2021-10-04T18:00:00Z",
|
|
458
|
-
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
459
|
-
},
|
|
460
|
-
];
|
|
598
|
+
it("SELECT_DAY for sequenced slots", async () => {
|
|
599
|
+
const oldState = {
|
|
600
|
+
...startingState,
|
|
601
|
+
slots: testSequencedSlotsAObject,
|
|
602
|
+
sequenced_availability: true,
|
|
603
|
+
};
|
|
604
|
+
const date = "2021-09-29";
|
|
605
|
+
const result = statusReducer(oldState, {
|
|
606
|
+
type: "SELECT_DAY",
|
|
607
|
+
day: date,
|
|
608
|
+
});
|
|
461
609
|
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
610
|
+
delete oldState.selectedDay;
|
|
611
|
+
delete oldState.focusedDay;
|
|
612
|
+
delete oldState.focusedSlot;
|
|
613
|
+
delete oldState.columnView;
|
|
614
|
+
delete oldState.daySlots;
|
|
467
615
|
|
|
468
|
-
|
|
616
|
+
const {
|
|
617
|
+
selectedDay,
|
|
618
|
+
focusedDay,
|
|
619
|
+
focusedSlot,
|
|
620
|
+
columnView,
|
|
621
|
+
daySlots,
|
|
622
|
+
...newState
|
|
623
|
+
} = result;
|
|
469
624
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
625
|
+
// These values have been updated
|
|
626
|
+
expect(selectedDay).toBe(date);
|
|
627
|
+
expect(focusedDay).toBe(date);
|
|
628
|
+
expect(focusedSlot).toBe("2021-09-29T08:00:00Z");
|
|
629
|
+
expect(daySlots).toStrictEqual(testDaySequencedSlots);
|
|
630
|
+
expect(columnView).toBe("slots");
|
|
631
|
+
// All other values are unchanged
|
|
632
|
+
expect(newState).toStrictEqual(oldState);
|
|
633
|
+
});
|
|
478
634
|
});
|
|
479
635
|
|
|
480
636
|
describe("SELECT_MONTH", () => {
|
|
@@ -621,30 +777,72 @@ describe("Date Time Picker status reducer", () => {
|
|
|
621
777
|
});
|
|
622
778
|
});
|
|
623
779
|
});
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
780
|
+
|
|
781
|
+
describe("SELECT_SLOT", () => {
|
|
782
|
+
it("SELECT_SLOT", async () => {
|
|
783
|
+
const oldState = { ...startingState };
|
|
784
|
+
const slot = {
|
|
785
|
+
start: "2021-09-30T14:00:00Z",
|
|
786
|
+
end: "2021-09-30T15:00:00Z",
|
|
787
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
788
|
+
};
|
|
789
|
+
const result = statusReducer(oldState, {
|
|
790
|
+
type: "SELECT_SLOT",
|
|
791
|
+
slot: slot,
|
|
792
|
+
});
|
|
793
|
+
|
|
794
|
+
delete oldState.selected;
|
|
795
|
+
delete oldState.focusedSlot;
|
|
796
|
+
delete oldState.columnView;
|
|
797
|
+
|
|
798
|
+
const { selected, focusedSlot, columnView, ...newState } = result;
|
|
799
|
+
|
|
800
|
+
// These values have been updated
|
|
801
|
+
expect(selected).toStrictEqual(slot);
|
|
802
|
+
expect(focusedSlot).toBe("2021-09-30T14:00:00Z");
|
|
803
|
+
expect(columnView).toBe("confirm");
|
|
804
|
+
// All other values are unchanged
|
|
805
|
+
expect(newState).toStrictEqual(oldState);
|
|
634
806
|
});
|
|
635
807
|
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
808
|
+
it("SELECT_SLOT for sequenced availability", async () => {
|
|
809
|
+
const oldState = { ...startingState };
|
|
810
|
+
const slot = {
|
|
811
|
+
start: "2021-09-29T10:00:00Z",
|
|
812
|
+
end: "2021-09-29T11:30:00Z",
|
|
813
|
+
sequence: [
|
|
814
|
+
{
|
|
815
|
+
sequence_id: "test-one",
|
|
816
|
+
start: "2021-09-29T10:00:00Z",
|
|
817
|
+
end: "2021-09-29T11:00:00Z",
|
|
818
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
sequence_id: "test-two",
|
|
822
|
+
start: "2021-09-29T11:00:00Z",
|
|
823
|
+
end: "2021-09-29T11:30:00Z",
|
|
824
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
825
|
+
},
|
|
826
|
+
],
|
|
827
|
+
};
|
|
828
|
+
const result = statusReducer(oldState, {
|
|
829
|
+
type: "SELECT_SLOT",
|
|
830
|
+
slot: slot,
|
|
831
|
+
});
|
|
639
832
|
|
|
640
|
-
|
|
833
|
+
delete oldState.selected;
|
|
834
|
+
delete oldState.focusedSlot;
|
|
835
|
+
delete oldState.columnView;
|
|
641
836
|
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
837
|
+
const { selected, focusedSlot, columnView, ...newState } = result;
|
|
838
|
+
|
|
839
|
+
// These values have been updated
|
|
840
|
+
expect(selected).toStrictEqual(slot);
|
|
841
|
+
expect(focusedSlot).toBe("2021-09-29T10:00:00Z");
|
|
842
|
+
expect(columnView).toBe("confirm");
|
|
843
|
+
// All other values are unchanged
|
|
844
|
+
expect(newState).toStrictEqual(oldState);
|
|
845
|
+
});
|
|
648
846
|
});
|
|
649
847
|
|
|
650
848
|
it("SELECT_TZID", async () => {
|
|
@@ -266,6 +266,137 @@ export const testSlotsArrayAdditional = [
|
|
|
266
266
|
},
|
|
267
267
|
];
|
|
268
268
|
|
|
269
|
+
export const testSequencedSlotsArray = [
|
|
270
|
+
{
|
|
271
|
+
sequence: [
|
|
272
|
+
{
|
|
273
|
+
sequence_id: "test-one",
|
|
274
|
+
start: "2021-09-29T08:00:00Z",
|
|
275
|
+
end: "2021-09-29T09:00:00Z",
|
|
276
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
sequence_id: "test-two",
|
|
280
|
+
start: "2021-09-29T09:00:00Z",
|
|
281
|
+
end: "2021-09-29T09:30:00Z",
|
|
282
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
283
|
+
},
|
|
284
|
+
],
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
sequence: [
|
|
288
|
+
{
|
|
289
|
+
sequence_id: "test-one",
|
|
290
|
+
start: "2021-09-29T10:00:00Z",
|
|
291
|
+
end: "2021-09-29T11:00:00Z",
|
|
292
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
sequence_id: "test-two",
|
|
296
|
+
start: "2021-09-29T11:00:00Z",
|
|
297
|
+
end: "2021-09-29T11:30:00Z",
|
|
298
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
299
|
+
},
|
|
300
|
+
],
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
sequence: [
|
|
304
|
+
{
|
|
305
|
+
sequence_id: "test-one",
|
|
306
|
+
start: "2021-09-30T08:00:00Z",
|
|
307
|
+
end: "2021-09-30T09:00:00Z",
|
|
308
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
sequence_id: "test-two",
|
|
312
|
+
start: "2021-09-30T09:00:00Z",
|
|
313
|
+
end: "2021-09-30T09:30:00Z",
|
|
314
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
315
|
+
},
|
|
316
|
+
],
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
sequence: [
|
|
320
|
+
{
|
|
321
|
+
sequence_id: "test-one",
|
|
322
|
+
start: "2021-09-30T10:00:00Z",
|
|
323
|
+
end: "2021-09-30T11:00:00Z",
|
|
324
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
sequence_id: "test-two",
|
|
328
|
+
start: "2021-09-30T11:00:00Z",
|
|
329
|
+
end: "2021-09-30T11:30:00Z",
|
|
330
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
331
|
+
},
|
|
332
|
+
],
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
sequence: [
|
|
336
|
+
{
|
|
337
|
+
sequence_id: "test-one",
|
|
338
|
+
start: "2021-09-30T11:30:00Z",
|
|
339
|
+
end: "2021-09-30T12:30:00Z",
|
|
340
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
sequence_id: "test-two",
|
|
344
|
+
start: "2021-09-30T12:30:00Z",
|
|
345
|
+
end: "2021-09-30T13:00:00Z",
|
|
346
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
347
|
+
},
|
|
348
|
+
],
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
sequence: [
|
|
352
|
+
{
|
|
353
|
+
sequence_id: "test-one",
|
|
354
|
+
start: "2021-10-01T08:00:00Z",
|
|
355
|
+
end: "2021-10-01T09:00:00Z",
|
|
356
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
sequence_id: "test-two",
|
|
360
|
+
start: "2021-10-01T09:00:00Z",
|
|
361
|
+
end: "2021-10-01T09:30:00Z",
|
|
362
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
363
|
+
},
|
|
364
|
+
],
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
sequence: [
|
|
368
|
+
{
|
|
369
|
+
sequence_id: "test-one",
|
|
370
|
+
start: "2021-10-04T08:00:00Z",
|
|
371
|
+
end: "2021-10-04T09:00:00Z",
|
|
372
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
sequence_id: "test-two",
|
|
376
|
+
start: "2021-10-04T09:00:00Z",
|
|
377
|
+
end: "2021-10-04T09:30:00Z",
|
|
378
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
379
|
+
},
|
|
380
|
+
],
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
sequence: [
|
|
384
|
+
{
|
|
385
|
+
sequence_id: "test-one",
|
|
386
|
+
start: "2021-10-04T10:00:00Z",
|
|
387
|
+
end: "2021-10-04T11:00:00Z",
|
|
388
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
sequence_id: "test-two",
|
|
392
|
+
start: "2021-10-04T11:00:00Z",
|
|
393
|
+
end: "2021-10-04T11:30:00Z",
|
|
394
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
395
|
+
},
|
|
396
|
+
],
|
|
397
|
+
},
|
|
398
|
+
];
|
|
399
|
+
|
|
269
400
|
export const testSlotsObject = {
|
|
270
401
|
"2021-09-29T08:00:00Z": {
|
|
271
402
|
start: "2021-09-29T08:00:00Z",
|
|
@@ -402,6 +533,121 @@ export const testSlotsObjectPartial = {
|
|
|
402
533
|
},
|
|
403
534
|
};
|
|
404
535
|
|
|
536
|
+
export const testSequencedSlotsAObject = {
|
|
537
|
+
"2021-09-29T08:00:00Z": [
|
|
538
|
+
{
|
|
539
|
+
sequence_id: "test-one",
|
|
540
|
+
start: "2021-09-29T08:00:00Z",
|
|
541
|
+
end: "2021-09-29T09:00:00Z",
|
|
542
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
sequence_id: "test-two",
|
|
546
|
+
start: "2021-09-29T09:00:00Z",
|
|
547
|
+
end: "2021-09-29T09:30:00Z",
|
|
548
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
549
|
+
},
|
|
550
|
+
],
|
|
551
|
+
"2021-09-29T10:00:00Z": [
|
|
552
|
+
{
|
|
553
|
+
sequence_id: "test-one",
|
|
554
|
+
start: "2021-09-29T10:00:00Z",
|
|
555
|
+
end: "2021-09-29T11:00:00Z",
|
|
556
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
sequence_id: "test-two",
|
|
560
|
+
start: "2021-09-29T11:00:00Z",
|
|
561
|
+
end: "2021-09-29T11:30:00Z",
|
|
562
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
563
|
+
},
|
|
564
|
+
],
|
|
565
|
+
"2021-09-30T08:00:00Z": [
|
|
566
|
+
{
|
|
567
|
+
sequence_id: "test-one",
|
|
568
|
+
start: "2021-09-30T08:00:00Z",
|
|
569
|
+
end: "2021-09-30T09:00:00Z",
|
|
570
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
sequence_id: "test-two",
|
|
574
|
+
start: "2021-09-30T09:00:00Z",
|
|
575
|
+
end: "2021-09-30T09:30:00Z",
|
|
576
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
577
|
+
},
|
|
578
|
+
],
|
|
579
|
+
"2021-09-30T10:00:00Z": [
|
|
580
|
+
{
|
|
581
|
+
sequence_id: "test-one",
|
|
582
|
+
start: "2021-09-30T10:00:00Z",
|
|
583
|
+
end: "2021-09-30T11:00:00Z",
|
|
584
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
sequence_id: "test-two",
|
|
588
|
+
start: "2021-09-30T11:00:00Z",
|
|
589
|
+
end: "2021-09-30T11:30:00Z",
|
|
590
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
591
|
+
},
|
|
592
|
+
],
|
|
593
|
+
"2021-09-30T11:30:00Z": [
|
|
594
|
+
{
|
|
595
|
+
sequence_id: "test-one",
|
|
596
|
+
start: "2021-09-30T11:30:00Z",
|
|
597
|
+
end: "2021-09-30T12:30:00Z",
|
|
598
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
sequence_id: "test-two",
|
|
602
|
+
start: "2021-09-30T12:30:00Z",
|
|
603
|
+
end: "2021-09-30T13:00:00Z",
|
|
604
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
605
|
+
},
|
|
606
|
+
],
|
|
607
|
+
"2021-10-01T08:00:00Z": [
|
|
608
|
+
{
|
|
609
|
+
sequence_id: "test-one",
|
|
610
|
+
start: "2021-10-01T08:00:00Z",
|
|
611
|
+
end: "2021-10-01T09:00:00Z",
|
|
612
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
sequence_id: "test-two",
|
|
616
|
+
start: "2021-10-01T09:00:00Z",
|
|
617
|
+
end: "2021-10-01T09:30:00Z",
|
|
618
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
619
|
+
},
|
|
620
|
+
],
|
|
621
|
+
"2021-10-04T08:00:00Z": [
|
|
622
|
+
{
|
|
623
|
+
sequence_id: "test-one",
|
|
624
|
+
start: "2021-10-04T08:00:00Z",
|
|
625
|
+
end: "2021-10-04T09:00:00Z",
|
|
626
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
sequence_id: "test-two",
|
|
630
|
+
start: "2021-10-04T09:00:00Z",
|
|
631
|
+
end: "2021-10-04T09:30:00Z",
|
|
632
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
633
|
+
},
|
|
634
|
+
],
|
|
635
|
+
"2021-10-04T10:00:00Z": [
|
|
636
|
+
{
|
|
637
|
+
sequence_id: "test-one",
|
|
638
|
+
start: "2021-10-04T10:00:00Z",
|
|
639
|
+
end: "2021-10-04T11:00:00Z",
|
|
640
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
sequence_id: "test-two",
|
|
644
|
+
start: "2021-10-04T11:00:00Z",
|
|
645
|
+
end: "2021-10-04T11:30:00Z",
|
|
646
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
647
|
+
},
|
|
648
|
+
],
|
|
649
|
+
};
|
|
650
|
+
|
|
405
651
|
export const testDaySlots = [
|
|
406
652
|
{
|
|
407
653
|
start: "2021-09-29T08:00:00Z",
|
|
@@ -419,3 +665,34 @@ export const testDaySlots = [
|
|
|
419
665
|
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
420
666
|
},
|
|
421
667
|
];
|
|
668
|
+
|
|
669
|
+
export const testDaySequencedSlots = [
|
|
670
|
+
[
|
|
671
|
+
{
|
|
672
|
+
sequence_id: "test-one",
|
|
673
|
+
start: "2021-09-29T08:00:00Z",
|
|
674
|
+
end: "2021-09-29T09:00:00Z",
|
|
675
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
sequence_id: "test-two",
|
|
679
|
+
start: "2021-09-29T09:00:00Z",
|
|
680
|
+
end: "2021-09-29T09:30:00Z",
|
|
681
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
682
|
+
},
|
|
683
|
+
],
|
|
684
|
+
[
|
|
685
|
+
{
|
|
686
|
+
sequence_id: "test-one",
|
|
687
|
+
start: "2021-09-29T10:00:00Z",
|
|
688
|
+
end: "2021-09-29T11:00:00Z",
|
|
689
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
sequence_id: "test-two",
|
|
693
|
+
start: "2021-09-29T11:00:00Z",
|
|
694
|
+
end: "2021-09-29T11:30:00Z",
|
|
695
|
+
participants: [{ sub: "acc_5f35432b3f07d06753082354" }],
|
|
696
|
+
},
|
|
697
|
+
],
|
|
698
|
+
];
|